Class dedicated to the analysis of KM3NeT runs.
More...
#include <RunAnalyzer.hh>
Class dedicated to the analysis of KM3NeT runs.
- Author
- rgruiz
Definition at line 37 of file RunAnalyzer.hh.
◆ RunAnalyzer() [1/2]
RunAnalyzer::RunAnalyzer |
( |
| ) |
|
|
inline |
◆ RunAnalyzer() [2/2]
RunAnalyzer::RunAnalyzer |
( |
string |
file, |
|
|
string |
detector_file |
|
) |
| |
|
inline |
Constructor.
- Parameters
-
file | Path to the file to be analyzed |
detector_file | path to a detector file |
Definition at line 68 of file RunAnalyzer.hh.
84 cerr <<
"FATAL ERROR. Could not open detector file '" << detector_file <<
"'." << endl ;
◆ ~RunAnalyzer()
RunAnalyzer::~RunAnalyzer |
( |
| ) |
|
|
inline |
◆ iterate_daqevent_tree()
Definition at line 116 of file RunAnalyzer.hh.
118 while (scanner.hasNext()){
130 if (event.hasTriggerBit(i)) {
158 if (hit -> hasTriggerBit(i)) {
174 int pmt = hit -> getPMT() ;
◆ iterate_summaryslice_tree()
Definition at line 197 of file RunAnalyzer.hh.
205 while (scanner.hasNext()){
217 for (JDAQSummaryslice::const_iterator s_frame = slice.begin() ; s_frame != slice.end() ; ++ s_frame) {
227 HRV_quantile.
put ( nHRVcount ) ;
229 FIFO_quantile.
put ( nFIFOcount ) ;
235 if ( nHRVcount > 0 ){
263 rate += s_frame -> getRate(i) ;
287 for (
int i = 0 ; i < (int)frame_indices.size() ; i++){
293 for (
std::map<
int ,
vector<JQuantile> >::const_iterator i = DOM_rate_quantiles.begin() ; i!= DOM_rate_quantiles.end() ; ++i){
◆ read_summaryslices_from_file()
void RunAnalyzer::read_summaryslices_from_file |
( |
| ) |
|
|
inline |
Definition at line 330 of file RunAnalyzer.hh.
336 if( scanner.hasNext() ){
338 range =
JFrameIndexRange (scanner.begin()->getFrameIndex() , scanner.rbegin()->getFrameIndex()) ;
◆ iterate_timeslice_tree()
Definition at line 359 of file RunAnalyzer.hh.
365 while (scanner.hasNext()){
367 T slice = *(scanner.next()) ;
369 double time_since_run_start = (slice.getFrameIndex() - frame_index_range.
first) *
getFrameTime() * 1.0e-9 ;
377 for(
auto & s_frame : slice){
381 double rate = s_frame.numberOfHits / (1.0e-9 *
getFrameTime()) ;
387 DOM_rate_quantiles[string][floor].put(rate) ;
389 detector_rate_quantile.
put (rate) ;
395 active_DOM_quantile.
put ( 1 ) ;
397 active_DOM_DU_quantiles [string].put(1) ;
413 hit_time_buffers[hit->getPMT()].push_back (hit->getT()) ;
415 tot_quantiles[hit->getPMT()].put (hit->getToT()) ;
417 pmt_rate_quantiles[hit->getPMT()].put (1) ;
419 if (hit->getToT() == 255) {
441 if (pmt->second.getCount() > 0){
449 for (
int i=1 ; i < (int)hit_time_buffers[pmt->first].size() ; i++){
◆ read_timeslices_from_file()
template<class T >
void RunAnalyzer::read_timeslices_from_file |
( |
| ) |
|
|
inline |
Definition at line 491 of file RunAnalyzer.hh.
497 if( scanner.hasNext() ){
499 range =
JFrameIndexRange (scanner.begin()->getFrameIndex() , scanner.rbegin()->getFrameIndex()) ;
◆ read_daqevents_from_file()
void RunAnalyzer::read_daqevents_from_file |
( |
| ) |
|
|
inline |
Definition at line 518 of file RunAnalyzer.hh.
524 if( scanner.hasNext() ){
526 range =
JFrameIndexRange (scanner.begin()->getFrameIndex() , scanner.rbegin()->getFrameIndex()) ;
◆ getHistograms()
◆ inputfile
string RunAnalyzer::inputfile |
|
private |
◆ detector
◆ module_router
◆ default_module_location
◆ histograms
◆ DU_IDs
◆ modules_per_string
int RunAnalyzer::modules_per_string |
|
private |
The documentation for this class was generated from the following file:
JManager< string, TH2D > * m_Snapshot_hits_per_pmt
double getToT(const T &tot, const JCalibration &cal)
Get calibrated time-over-threshold of hit.
void iterate_timeslice_tree(JTreeScanner< T, JDAQEvaluator > &scanner, JFrameIndexRange frame_index_range)
TH2D * h_Snapshot_hits_per_module
JRA_Histograms histograms
bool testHighRateVeto() const
Test high-rate veto status.
TH1D * h_pmt_distribution_triggered_hits
vector< JManager< string, TH2D > * > m_pmt_tot_distributions
int countFIFOStatus() const
Count FIFO status.
void iterate_summaryslice_tree(JTreeScanner< JDAQSummaryslice, JDAQEvaluator > &scanner, JFrameIndexRange frame_index_range)
void initialize_timeslice_histograms(JFrameIndexRange &range)
TH1D * h_Trigger_bit_event
void init_h_frame_index_check(int n_frames)
const JModule & getModule(const JDetector &detector, const JModuleLocation &location)
find module with a given string and floor number
void load(const JString &file_name, JDetector &detector)
Load detector from input file.
TH1D * h_n_triggered_hits_distribution
vector< JManager< string, TProfile2D > * > m_pmt_rates_vs_time
int getFrameIndex() const
Get frame index.
vector< TProfile2D * > h_du_active_modules
TH1D * h_pmt_distribution_snapshot_hits
SummaryHistograms h_summary
TH1D * h_frame_index_check
static const int NUMBER_OF_PMTS
Total number of PMTs in module.
TH1D * h_pmt_rate_distribution
#define MAKE_STRING(A)
Make string.
int getNumberOfStrings(const JDetector &detector)
Get number of strings.
static const unsigned int NUMBER_OF_TRIGGER_BITS
Number of trigger bits.
TH2D * h_daq_status_per_dom
vector< TH2D * > h_ToT_255_Floor_vs_time
JManager< string, TH1D > * m_trigger_rates
double getFrameTime()
Get frame time duration.
TH1D * h_tot_distribution_triggered_hits
int countHighRateVeto() const
Count high-rate veto status.
JDAQFrame::const_iterator const_iterator
void iterate_daqevent_tree(JTreeScanner< JDAQEvent, JDAQEvaluator > &scanner, JFrameIndexRange frame_index_range)
void initialize_summary_histograms(JFrameIndexRange &range)
JManager< string, TProfile2D > * m_hrv
vector< JManager< string, TProfile2D > * > m_pmt_tot_vs_time
TH1D * h_tot_distribution_snapshot_hits
JManager< string, TH2D > * m_mean_summary_rate
int getNumberOfModules(const JDetector &detector)
Get number of modules.
Indexing of data type in type list.
Data structure for a composite optical module.
bool testFIFOStatus() const
Test FIFO status.
std::string to_string(const T &value)
Convert value to string.
bool testDAQStatus() const
Test DAQ status of packets.
Router for direct addressing of module data in detector data structure.
vector< TH1D * > h_ToT_255_vs_time
TH2D * h_Triggered_hits_per_module
TriggerHistograms h_trigger
TimesliceHistograms h_timeslice
JManager< string, TProfile2D > * m_summary_rate_vs_time
JManager< string, TH2D > * m_Trigger_map
std::set< int > getStringIDs(const JDetector &detector)
Get list of strings IDs.
const char * getTriggerName(JTriggerbit_t bit)
Get trigger name.
JManager< string, TH2D > * m_summary_rate_distribution
void initialize_trigger_histograms(JFrameIndexRange &range)
JManager< string, TProfile2D > * m_fifo_full
int getFloor() const
Get floor number.
double getMean(vector< double > &v)
get mean of vector content
JManager< string, TProfile > * m_module_rates_vs_time
vector< JManager< string, TH2D > * > m_ToT_255
JTOOLS::JRange< int > JFrameIndexRange
Type definition for frame index range.
vector< JManager< string, TH2D > * > m_pmt_rate_distributions
vector< JManager< string, TH2D > * > m_pmt_dt_consecutive_hits
vector< TH2D * > h_dom_mean_rates
vector< TProfile * > h_rate
JModuleRouter * module_router
vector< TH1D * > h_slice_start_time
vector< TProfile * > h_active_modules
vector< JManager< string, TProfile > * > m_module_rates_vs_time
int getString() const
Get string number.
int getCount(const JHitL0 &hit)
Get hit count.
General purpose string class.
vector< TH2D * > h_ToT_255_Floor_vs_time_2