Jpp
Public Member Functions | Public Attributes | List of all members
TimesliceHistograms Struct Reference

#include <JRunHistograms.hh>

Public Member Functions

 TimesliceHistograms ()
 
void initialize (std::set< int > du_ids, int modules_per_string, int ts_type, std::string ts_name)
 
void Fill_mean_ToT_histograms ()
 
void init_h_dom_mean_rates (int ts_type, std::set< int > du_ids, int modules_per_string, std::string ts_name)
 
void init_h_ToT_255_vs_time (int ts_type, string ts_name)
 
void init_h_ToT_255_Floor_vs_time (int ts_type, int modules_per_string, string ts_name)
 
void init_h_ToT_255_Floor_vs_time_2 (int ts_type, int modules_per_string, string ts_name)
 
void init_m_mean_ToT (int ts_type, int modules_per_string, string ts_name)
 
void init_m_mean_ToT_distribution (int ts_type, string ts_name)
 
void init_m_ToT_255 (int ts_type, int modules_per_string, string ts_name)
 
void init_m_pmt_tot_distributions (int ts_type, string ts_name)
 
void init_m_pmt_rate_distributions (int ts_type, string ts_name)
 
void init_m_pmt_dt_consecutive_hits (int ts_type, string ts_name)
 

Public Attributes

int min_ToT
 
int max_ToT
 
int min_logdt
 
int max_logdt
 
int nbins_logdt
 
int nbins_time
 
vector< TH2D * > h_dom_mean_rates
 
vector< TH1D * > h_ToT_255_vs_time
 
vector< TH2D * > h_ToT_255_Floor_vs_time
 
vector< TH2D * > h_ToT_255_Floor_vs_time_2
 
vector< JManager< string, TH2D > * > m_mean_ToT
 
vector< JManager< string, TH1D > * > m_mean_ToT_distribution
 
vector< JManager< string, TH2D > * > m_ToT_255
 
vector< JManager< string, TH2D > * > m_pmt_tot_distributions
 
vector< JManager< string, TH2D > * > m_pmt_rate_distributions
 
vector< JManager< string, TH2D > * > m_pmt_dt_consecutive_hits
 

Detailed Description

Definition at line 287 of file JRunHistograms.hh.

Constructor & Destructor Documentation

◆ TimesliceHistograms()

TimesliceHistograms::TimesliceHistograms ( )
inline

Definition at line 315 of file JRunHistograms.hh.

315  :
316  min_ToT (0),
317  max_ToT (255),
318  min_logdt (0),
319  max_logdt (9),
320  nbins_logdt (150),
321  nbins_time (200)
322  {
323  int number_of_timeslice_types = JLength<JDAQTimesliceTypes_t>::value ;
324 
325  h_dom_mean_rates .resize (number_of_timeslice_types , NULL);
326  h_ToT_255_vs_time .resize (number_of_timeslice_types , NULL);
327  h_ToT_255_Floor_vs_time .resize (number_of_timeslice_types , NULL);
328  h_ToT_255_Floor_vs_time_2.resize (number_of_timeslice_types , NULL);
329  m_mean_ToT .resize (number_of_timeslice_types , NULL);
330  m_mean_ToT_distribution .resize (number_of_timeslice_types , NULL);
331  m_ToT_255 .resize (number_of_timeslice_types , NULL);
332  m_pmt_tot_distributions .resize (number_of_timeslice_types , NULL);
333  m_pmt_rate_distributions .resize (number_of_timeslice_types , NULL);
334  m_pmt_dt_consecutive_hits.resize (number_of_timeslice_types , NULL);
335  }

Member Function Documentation

◆ initialize()

void TimesliceHistograms::initialize ( std::set< int >  du_ids,
int  modules_per_string,
int  ts_type,
std::string  ts_name 
)
inline

Definition at line 345 of file JRunHistograms.hh.

345  {
346 
347  init_h_dom_mean_rates (ts_type , du_ids , modules_per_string , ts_name);
348  init_h_ToT_255_vs_time (ts_type , ts_name);
349  init_h_ToT_255_Floor_vs_time (ts_type , modules_per_string , ts_name);
350  init_h_ToT_255_Floor_vs_time_2 (ts_type , modules_per_string , ts_name);
351  init_m_mean_ToT (ts_type , modules_per_string , ts_name);
352  init_m_mean_ToT_distribution (ts_type , ts_name);
353  init_m_ToT_255 (ts_type , modules_per_string , ts_name);
354  init_m_pmt_tot_distributions (ts_type , ts_name);
355  init_m_pmt_rate_distributions (ts_type , ts_name);
356  init_m_pmt_dt_consecutive_hits (ts_type , ts_name);
357  }

◆ Fill_mean_ToT_histograms()

void TimesliceHistograms::Fill_mean_ToT_histograms ( )
inline

Definition at line 366 of file JRunHistograms.hh.

366  {
367 
368  int i = 0 ;
369 
370  for (typename vector < JManager < string , TH2D >* >::const_iterator it = m_pmt_tot_distributions.begin() ; it != m_pmt_tot_distributions.end() ; ++it , ++i){
371 
372  if ((*it)){
373 
374  for (typename JManager < string , TH2D >::const_iterator j = (*it) -> begin() ; j != (*it) -> end() ; ++j){
375 
376  TString s (MAKE_STRING(j -> first).c_str());
377  TPRegexp r ("(\\w+)/(\\DU)(\\d+)/(F)(\\d+)");
378 
379  TObjArray* o = r.MatchS(s);
380 
381  int String = ((TObjString *)o->At(3))->GetString().Atoi();
382  int Floor = ((TObjString *)o->At(5))->GetString().Atoi();
383 
384  for (int pmt = 1 ; pmt <= (j -> second) -> GetXaxis() -> GetNbins() ; pmt++){
385 
386  (*m_mean_ToT[i])[MAKE_STRING("Detector/DU" + to_string(String))] -> Fill(Floor , (j->second) -> GetXaxis() -> GetBinCenter(pmt) , (j -> second) -> ProjectionY ("" , pmt , pmt) -> GetMean () );
387  (*m_mean_ToT_distribution[i])[MAKE_STRING("Detector/DU" + to_string(String))] -> Fill((j -> second) -> ProjectionY ("" , pmt , pmt) -> GetMean () );
388  }
389  }
390  }
391  }
392  }

◆ init_h_dom_mean_rates()

void TimesliceHistograms::init_h_dom_mean_rates ( int  ts_type,
std::set< int >  du_ids,
int  modules_per_string,
std::string  ts_name 
)
inline

Definition at line 401 of file JRunHistograms.hh.

401  {
402 
403  string name = MAKE_STRING ("h_mean_dom_rates_" + ts_name);
404  string title = MAKE_STRING (ts_name + " ; Floor number ; DU number ; time slice averaged rate [Hz]");
405 
406  h_dom_mean_rates[ts_type] = new TH2D (name.c_str() , title.c_str() , *du_ids.rbegin() , 0.5 , *du_ids.rbegin() + 0.5 , modules_per_string , 0.5 , 0.5 + modules_per_string);
407  }

◆ init_h_ToT_255_vs_time()

void TimesliceHistograms::init_h_ToT_255_vs_time ( int  ts_type,
string  ts_name 
)
inline

Definition at line 415 of file JRunHistograms.hh.

415  {
416 
417  string name = MAKE_STRING ("h_ToT_255_vs_time_" + ts_name);
418  string title = MAKE_STRING (" (" + ts_name + ") Hits with ToT = 255 ns. All PMTs, all timeslices ; Time since beginning of slice [ns] ; counts ");
419 
420  h_ToT_255_vs_time[ts_type] = new TH1D (name.c_str() , title.c_str() , 100 , 0 , log10(getFrameTime()));
421 
422  BinLogX (h_ToT_255_vs_time[ts_type]);
423  }

◆ init_h_ToT_255_Floor_vs_time()

void TimesliceHistograms::init_h_ToT_255_Floor_vs_time ( int  ts_type,
int  modules_per_string,
string  ts_name 
)
inline

Definition at line 432 of file JRunHistograms.hh.

432  {
433 
434  string name = MAKE_STRING ("h_ToT_255_Floor_vs_time_" + ts_name);
435  string title = MAKE_STRING (" (" + ts_name + ") Hits with ToT = 255 ns. All DUs , all timeslices ; Time since beginning of slice [ns] ; Floor number ; counts ");
436 
437  h_ToT_255_Floor_vs_time[ts_type] = new TH2D (name.c_str() , title.c_str() , 100 , 0 , log10(getFrameTime()) , modules_per_string , 0.5 , 0.5 + modules_per_string);
438 
440  }

◆ init_h_ToT_255_Floor_vs_time_2()

void TimesliceHistograms::init_h_ToT_255_Floor_vs_time_2 ( int  ts_type,
int  modules_per_string,
string  ts_name 
)
inline

Definition at line 449 of file JRunHistograms.hh.

449  {
450 
451  string name = MAKE_STRING ("h_ToT_255_Floor_vs_time_2_" + ts_name);
452  string title = MAKE_STRING (" (" + ts_name + ") Hits with ToT = 255 ns. All DUs , all timeslices ; Time since beginning of slice [ns] ; Floor number ; counts ");
453 
454  h_ToT_255_Floor_vs_time_2[ts_type] = new TH2D (name.c_str() , title.c_str() , 100 , 0 , getFrameTime() , modules_per_string , 0.5 , 0.5 + modules_per_string);
455  }

◆ init_m_mean_ToT()

void TimesliceHistograms::init_m_mean_ToT ( int  ts_type,
int  modules_per_string,
string  ts_name 
)
inline

Definition at line 464 of file JRunHistograms.hh.

464  {
465 
466  string name = MAKE_STRING ("%/h_mean_ToT_" + ts_name);
467  string title = MAKE_STRING (ts_name + " ; Floor number ; TDC channel ; mean ToT over all timeslices [ns] ");
468 
469  m_mean_ToT[ts_type] = new JManager < string , TH2D > (new TH2D (name.c_str() , title.c_str() , modules_per_string , 0.5 , 0.5 + modules_per_string , NUMBER_OF_PMTS , -0.5 , NUMBER_OF_PMTS - 0.5));
470  }

◆ init_m_mean_ToT_distribution()

void TimesliceHistograms::init_m_mean_ToT_distribution ( int  ts_type,
string  ts_name 
)
inline

Definition at line 479 of file JRunHistograms.hh.

479  {
480 
481  string name = MAKE_STRING ("%/h_mean_ToT_distribution" + ts_name);
482  string title = MAKE_STRING (ts_name + " ; ToT [ns] ; # PMTS ");
483 
484  m_mean_ToT_distribution[ts_type] = new JManager < string , TH1D > (new TH1D (name.c_str() , title.c_str() , 255 , 0.5 , 255.5));
485  }

◆ init_m_ToT_255()

void TimesliceHistograms::init_m_ToT_255 ( int  ts_type,
int  modules_per_string,
string  ts_name 
)
inline

Definition at line 494 of file JRunHistograms.hh.

494  {
495 
496  string name = MAKE_STRING ("%/h_ToT_255_" + ts_name);
497  string title = MAKE_STRING (ts_name + " ; Floor number ; TDC channel ; number of hits with ToT = 255 ns ");
498 
499  m_ToT_255[ts_type] = new JManager < string , TH2D > (new TH2D (name.c_str() , title.c_str() , modules_per_string , 0.5 , 0.5 + modules_per_string , NUMBER_OF_PMTS , -0.5 , NUMBER_OF_PMTS - 0.5));
500  }

◆ init_m_pmt_tot_distributions()

void TimesliceHistograms::init_m_pmt_tot_distributions ( int  ts_type,
string  ts_name 
)
inline

Definition at line 508 of file JRunHistograms.hh.

508  {
509 
510  string name = MAKE_STRING ("%_" + ts_name + "_2SToT");
511  string title = MAKE_STRING (ts_name + " ; TDC channel ; ToT [ns] ; counts");
512 
513  double bins[] = {-0.5 , 0.5 , 1.5 , 2.5 , 3.5 , 4.5 , 5.5 , 6.5 , 7.5 , 8.5 , 9.5 , 10.5 , 11.5 , 12.5 , 13.5 , 14.5 , 15.5 , 16.5 , 17.5 , 18.5 , 19.5 ,
514  20.5 , 21.5 , 22.5 , 23.5 , 24.5 , 25.5 , 26.5 , 27.5 , 28.5 , 29.5 , 30.5 , 35.5 , 40.5 , 45.5 , 55.5 , 60.5 , 65.5 , 70.5 , 75.5 , 80.5 ,
515  85.5 , 90.5 , 95.5 , 100.5 , 120.5 , 140.5 , 160.5 , 180.5 , 200.5 , 254.5 , 255.5 , 256.5};
516 
517  TH2D* h = new TH2D (name.c_str() , title.c_str() , NUMBER_OF_PMTS , -0.5 , NUMBER_OF_PMTS - 0.5 , 52 , bins);
518 
519  h->Sumw2();
520 
522 
523  }

◆ init_m_pmt_rate_distributions()

void TimesliceHistograms::init_m_pmt_rate_distributions ( int  ts_type,
string  ts_name 
)
inline

Definition at line 531 of file JRunHistograms.hh.

531  {
532 
533  string name = MAKE_STRING ("%/h_pmt_rate_distributions_" + ts_name);
534  string title = MAKE_STRING (ts_name + " ; TDC channel ; rate [kHz] ; counts ");
535 
536  TH2D* h_pmt_rate_distributions = new TH2D (name.c_str() , title.c_str(),
537  NUMBER_OF_PMTS , -0.5 , NUMBER_OF_PMTS - 0.5 ,
538  60 , -6 , log10(1000));
539 
540  BinLogY (h_pmt_rate_distributions);
541 
542  m_pmt_rate_distributions[ts_type] = new JManager < string , TH2D > (h_pmt_rate_distributions);
543  }

◆ init_m_pmt_dt_consecutive_hits()

void TimesliceHistograms::init_m_pmt_dt_consecutive_hits ( int  ts_type,
string  ts_name 
)
inline

Definition at line 551 of file JRunHistograms.hh.

551  {
552 
553  string name = MAKE_STRING ("%/h_dt_consecutive_hits_" + ts_name);
554  string title = MAKE_STRING (ts_name + " ; log(dt [ns]); TDC channel ; counts");
555 
556  m_pmt_dt_consecutive_hits[ts_type] = new JManager < string , TH2D > (new TH2D (name.c_str() , title.c_str() , nbins_logdt , min_logdt , max_logdt, NUMBER_OF_PMTS , -0.5 , NUMBER_OF_PMTS - 0.5));
557  }

Member Data Documentation

◆ min_ToT

int TimesliceHistograms::min_ToT

Definition at line 289 of file JRunHistograms.hh.

◆ max_ToT

int TimesliceHistograms::max_ToT

Definition at line 290 of file JRunHistograms.hh.

◆ min_logdt

int TimesliceHistograms::min_logdt

Definition at line 291 of file JRunHistograms.hh.

◆ max_logdt

int TimesliceHistograms::max_logdt

Definition at line 292 of file JRunHistograms.hh.

◆ nbins_logdt

int TimesliceHistograms::nbins_logdt

Definition at line 293 of file JRunHistograms.hh.

◆ nbins_time

int TimesliceHistograms::nbins_time

Definition at line 294 of file JRunHistograms.hh.

◆ h_dom_mean_rates

vector< TH2D* > TimesliceHistograms::h_dom_mean_rates

Definition at line 298 of file JRunHistograms.hh.

◆ h_ToT_255_vs_time

vector< TH1D* > TimesliceHistograms::h_ToT_255_vs_time

Definition at line 299 of file JRunHistograms.hh.

◆ h_ToT_255_Floor_vs_time

vector< TH2D* > TimesliceHistograms::h_ToT_255_Floor_vs_time

Definition at line 300 of file JRunHistograms.hh.

◆ h_ToT_255_Floor_vs_time_2

vector< TH2D* > TimesliceHistograms::h_ToT_255_Floor_vs_time_2

Definition at line 301 of file JRunHistograms.hh.

◆ m_mean_ToT

vector< JManager < string , TH2D >* > TimesliceHistograms::m_mean_ToT

Definition at line 305 of file JRunHistograms.hh.

◆ m_mean_ToT_distribution

vector< JManager < string , TH1D >* > TimesliceHistograms::m_mean_ToT_distribution

Definition at line 306 of file JRunHistograms.hh.

◆ m_ToT_255

vector< JManager < string , TH2D >* > TimesliceHistograms::m_ToT_255

Definition at line 307 of file JRunHistograms.hh.

◆ m_pmt_tot_distributions

vector< JManager < string , TH2D >* > TimesliceHistograms::m_pmt_tot_distributions

Definition at line 311 of file JRunHistograms.hh.

◆ m_pmt_rate_distributions

vector< JManager < string , TH2D >* > TimesliceHistograms::m_pmt_rate_distributions

Definition at line 312 of file JRunHistograms.hh.

◆ m_pmt_dt_consecutive_hits

vector< JManager < string , TH2D >* > TimesliceHistograms::m_pmt_dt_consecutive_hits

Definition at line 313 of file JRunHistograms.hh.


The documentation for this struct was generated from the following file:
JManager< string, TH2D >
TimesliceHistograms::init_m_mean_ToT_distribution
void init_m_mean_ToT_distribution(int ts_type, string ts_name)
Definition: JRunHistograms.hh:479
TimesliceHistograms::m_pmt_tot_distributions
vector< JManager< string, TH2D > * > m_pmt_tot_distributions
Definition: JRunHistograms.hh:311
TimesliceHistograms::init_m_ToT_255
void init_m_ToT_255(int ts_type, int modules_per_string, string ts_name)
Definition: JRunHistograms.hh:494
TimesliceHistograms::init_h_ToT_255_vs_time
void init_h_ToT_255_vs_time(int ts_type, string ts_name)
Definition: JRunHistograms.hh:415
TimesliceHistograms::init_h_dom_mean_rates
void init_h_dom_mean_rates(int ts_type, std::set< int > du_ids, int modules_per_string, std::string ts_name)
Definition: JRunHistograms.hh:401
std::vector
Definition: JSTDTypes.hh:12
JTOOLS::j
int j
Definition: JPolint.hh:634
KM3NETDAQ::NUMBER_OF_PMTS
static const int NUMBER_OF_PMTS
Total number of PMTs in module.
Definition: JDAQ.hh:26
MAKE_STRING
#define MAKE_STRING(A)
Make string.
Definition: JPrint.hh:699
TimesliceHistograms::init_h_ToT_255_Floor_vs_time_2
void init_h_ToT_255_Floor_vs_time_2(int ts_type, int modules_per_string, string ts_name)
Definition: JRunHistograms.hh:449
JGIZMO::JManager
Auxiliary class to manage set of compatible ROOT objects (e.g.
Definition: JManager.hh:40
TimesliceHistograms::init_h_ToT_255_Floor_vs_time
void init_h_ToT_255_Floor_vs_time(int ts_type, int modules_per_string, string ts_name)
Definition: JRunHistograms.hh:432
TimesliceHistograms::h_ToT_255_Floor_vs_time
vector< TH2D * > h_ToT_255_Floor_vs_time
Definition: JRunHistograms.hh:300
BinLogX
void BinLogX(T *h)
Definition: JRunHistograms.hh:48
KM3NETDAQ::getFrameTime
double getFrameTime()
Get frame time duration.
Definition: JDAQClock.hh:162
JLANG::JLength
Length of type list.
Definition: JTypeList.hh:176
TimesliceHistograms::m_mean_ToT
vector< JManager< string, TH2D > * > m_mean_ToT
Definition: JRunHistograms.hh:305
TimesliceHistograms::m_mean_ToT_distribution
vector< JManager< string, TH1D > * > m_mean_ToT_distribution
Definition: JRunHistograms.hh:306
TimesliceHistograms::min_ToT
int min_ToT
Definition: JRunHistograms.hh:289
TimesliceHistograms::max_ToT
int max_ToT
Definition: JRunHistograms.hh:290
TimesliceHistograms::max_logdt
int max_logdt
Definition: JRunHistograms.hh:292
JLANG::to_string
std::string to_string(const T &value)
Convert value to string.
Definition: JLangToolkit.hh:192
TimesliceHistograms::nbins_logdt
int nbins_logdt
Definition: JRunHistograms.hh:293
TimesliceHistograms::nbins_time
int nbins_time
Definition: JRunHistograms.hh:294
TimesliceHistograms::h_ToT_255_vs_time
vector< TH1D * > h_ToT_255_vs_time
Definition: JRunHistograms.hh:299
TimesliceHistograms::init_m_mean_ToT
void init_m_mean_ToT(int ts_type, int modules_per_string, string ts_name)
Definition: JRunHistograms.hh:464
TimesliceHistograms::init_m_pmt_tot_distributions
void init_m_pmt_tot_distributions(int ts_type, string ts_name)
Definition: JRunHistograms.hh:508
BinLogY
void BinLogY(T *h)
Definition: JRunHistograms.hh:73
JTOOLS::r
data_type r[M+1]
Definition: JPolint.hh:709
TimesliceHistograms::init_m_pmt_dt_consecutive_hits
void init_m_pmt_dt_consecutive_hits(int ts_type, string ts_name)
Definition: JRunHistograms.hh:551
TimesliceHistograms::init_m_pmt_rate_distributions
void init_m_pmt_rate_distributions(int ts_type, string ts_name)
Definition: JRunHistograms.hh:531
TimesliceHistograms::m_ToT_255
vector< JManager< string, TH2D > * > m_ToT_255
Definition: JRunHistograms.hh:307
TimesliceHistograms::m_pmt_rate_distributions
vector< JManager< string, TH2D > * > m_pmt_rate_distributions
Definition: JRunHistograms.hh:312
TimesliceHistograms::min_logdt
int min_logdt
Definition: JRunHistograms.hh:291
TimesliceHistograms::m_pmt_dt_consecutive_hits
vector< JManager< string, TH2D > * > m_pmt_dt_consecutive_hits
Definition: JRunHistograms.hh:313
TimesliceHistograms::h_dom_mean_rates
vector< TH2D * > h_dom_mean_rates
Definition: JRunHistograms.hh:298
JAANET::String
General purpose string class.
Definition: JHead.hh:102
TimesliceHistograms::h_ToT_255_Floor_vs_time_2
vector< TH2D * > h_ToT_255_Floor_vs_time_2
Definition: JRunHistograms.hh:301