Jpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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_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_pmt_tot_distributions (int ts_type, string ts_name)
 
void init_m_pmt_rate_distributions (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< JManager< string, TH2D > * > m_mean_ToT
 
vector< JManager< string, TH1D > * > m_mean_ToT_distribution
 
vector< JManager< string, TH2D > * > m_pmt_tot_distributions
 
vector< JManager< string, TH2D > * > m_pmt_rate_distributions
 

Detailed Description

Definition at line 301 of file JRunHistograms.hh.

Constructor & Destructor Documentation

TimesliceHistograms::TimesliceHistograms ( )
inline

Definition at line 324 of file JRunHistograms.hh.

324  :
325  min_ToT (0),
326  max_ToT (255),
327  min_logdt (0),
328  max_logdt (9),
329  nbins_logdt (150),
330  nbins_time (200)
331  {
332  int number_of_timeslice_types = JLength<JDAQTimesliceTypes_t>::value ;
333 
334  h_dom_mean_rates .resize (number_of_timeslice_types , NULL);
335  m_mean_ToT .resize (number_of_timeslice_types , NULL);
336  m_mean_ToT_distribution .resize (number_of_timeslice_types , NULL);
337  m_pmt_tot_distributions .resize (number_of_timeslice_types , NULL);
338  m_pmt_rate_distributions .resize (number_of_timeslice_types , NULL);
339  }
vector< JManager< string, TH2D > * > m_pmt_tot_distributions
vector< TH2D * > h_dom_mean_rates
Length of type list.
Definition: JTypeList.hh:176
vector< JManager< string, TH1D > * > m_mean_ToT_distribution
vector< JManager< string, TH2D > * > m_mean_ToT
vector< JManager< string, TH2D > * > m_pmt_rate_distributions

Member Function Documentation

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

Definition at line 349 of file JRunHistograms.hh.

349  {
350 
351  init_h_dom_mean_rates (ts_type , du_ids , modules_per_string , ts_name);
352  init_m_mean_ToT (ts_type , modules_per_string , ts_name);
353  init_m_mean_ToT_distribution (ts_type , ts_name);
354  init_m_pmt_tot_distributions (ts_type , ts_name);
355  init_m_pmt_rate_distributions (ts_type , ts_name);
356  }
void init_h_dom_mean_rates(int ts_type, std::set< int > du_ids, int modules_per_string, std::string ts_name)
void init_m_mean_ToT_distribution(int ts_type, string ts_name)
void init_m_pmt_rate_distributions(int ts_type, string ts_name)
void init_m_mean_ToT(int ts_type, int modules_per_string, string ts_name)
void init_m_pmt_tot_distributions(int ts_type, string ts_name)
void TimesliceHistograms::Fill_mean_ToT_histograms ( )
inline

Definition at line 365 of file JRunHistograms.hh.

365  {
366 
367  int i = 0 ;
368 
369  for (typename vector < JManager < string , TH2D >* >::const_iterator it = m_pmt_tot_distributions.begin() ; it != m_pmt_tot_distributions.end() ; ++it , ++i){
370 
371  if ((*it)){
372 
373  for (typename JManager < string , TH2D >::const_iterator j = (*it) -> begin() ; j != (*it) -> end() ; ++j){
374 
375  TString s (MAKE_STRING(j -> first).c_str());
376  TPRegexp r ("(\\w+)/(\\DU)(\\d+)/(F)(\\d+)");
377 
378  TObjArray* o = r.MatchS(s);
379 
380  int String = ((TObjString *)o->At(3))->GetString().Atoi();
381  int Floor = ((TObjString *)o->At(5))->GetString().Atoi();
382 
383  for (int pmt = 1 ; pmt <= (j -> second) -> GetXaxis() -> GetNbins() ; pmt++){
384 
385  (*m_mean_ToT[i])[MAKE_STRING("Detector/DU" + to_string(String))] -> Fill((j->second) -> GetXaxis() -> GetBinCenter(pmt) , Floor , (j -> second) -> ProjectionY ("" , pmt , pmt) -> GetMean () );
386  (*m_mean_ToT_distribution[i])[MAKE_STRING("Detector/DU" + to_string(String))] -> Fill((j -> second) -> ProjectionY ("" , pmt , pmt) -> GetMean () );
387  }
388  }
389  }
390  }
391  }
vector< JManager< string, TH2D > * > m_pmt_tot_distributions
data_type r[M+1]
Definition: JPolint.hh:742
then echo The file $DIR KM3NeT_00000001_00000000 root already please rename or remove it first
#define MAKE_STRING(A)
Make string.
Definition: JPrint.hh:142
Auxiliary class to manage set of compatible ROOT objects (e.g. histograms) using unique keys...
Definition: JManager.hh:43
do $DIR JTransitTime o
Definition: JTransitTime.sh:44
vector< JManager< string, TH1D > * > m_mean_ToT_distribution
General purpose string class.
Definition: JHead.hh:122
std::string to_string(const T &value)
Convert value to string.
vector< JManager< string, TH2D > * > m_mean_ToT
int j
Definition: JPolint.hh:666
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 400 of file JRunHistograms.hh.

400  {
401 
402  string name = MAKE_STRING ("h_mean_dom_rates_" + ts_name);
403  string title = MAKE_STRING (ts_name + " ; Floor number ; DU number ; time slice averaged rate [Hz]");
404 
405  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);
406  }
vector< TH2D * > h_dom_mean_rates
#define MAKE_STRING(A)
Make string.
Definition: JPrint.hh:142
then echo n User name
Definition: JCookie.sh:45
void TimesliceHistograms::init_m_mean_ToT ( int  ts_type,
int  modules_per_string,
string  ts_name 
)
inline

Definition at line 415 of file JRunHistograms.hh.

415  {
416 
417  string name = MAKE_STRING ("%/h_mean_ToT_" + ts_name);
418  string title = MAKE_STRING (ts_name + " ; TDC channel ; Floor number ; mean ToT [ns] ");
419 
420  m_mean_ToT[ts_type] = new JManager < string , TH2D > (new TH2D (name.c_str() , title.c_str() , NUMBER_OF_PMTS , -0.5 , NUMBER_OF_PMTS - 0.5 , modules_per_string , 0.5 , 0.5 + modules_per_string));
421  }
#define MAKE_STRING(A)
Make string.
Definition: JPrint.hh:142
Auxiliary class to manage set of compatible ROOT objects (e.g. histograms) using unique keys...
Definition: JManager.hh:43
then echo n User name
Definition: JCookie.sh:45
vector< JManager< string, TH2D > * > m_mean_ToT
static const int NUMBER_OF_PMTS
Total number of PMTs in module.
Definition: JDAQ.hh:26
void TimesliceHistograms::init_m_mean_ToT_distribution ( int  ts_type,
string  ts_name 
)
inline

Definition at line 430 of file JRunHistograms.hh.

430  {
431 
432  string name = MAKE_STRING ("%/h_mean_ToT_distribution" + ts_name);
433  string title = MAKE_STRING (ts_name + " ; ToT [ns] ; # PMTS ");
434 
435  m_mean_ToT_distribution[ts_type] = new JManager < string , TH1D > (new TH1D (name.c_str() , title.c_str() , 255 , 0.5 , 255.5));
436  }
#define MAKE_STRING(A)
Make string.
Definition: JPrint.hh:142
Auxiliary class to manage set of compatible ROOT objects (e.g. histograms) using unique keys...
Definition: JManager.hh:43
vector< JManager< string, TH1D > * > m_mean_ToT_distribution
then echo n User name
Definition: JCookie.sh:45
void TimesliceHistograms::init_m_pmt_tot_distributions ( int  ts_type,
string  ts_name 
)
inline

Definition at line 444 of file JRunHistograms.hh.

444  {
445 
446  string name = MAKE_STRING ("%_" + ts_name + "_2SToT");
447  string title = MAKE_STRING (ts_name + " ; TDC channel ; ToT [ns] ; counts");
448 
449  TH2D* h = new TH2D (name.c_str() , title.c_str() , NUMBER_OF_PMTS , -0.5 , NUMBER_OF_PMTS - 0.5 , nbinsToT , binsToT);
450 
451  h->Sumw2();
452 
454 
455  }
vector< JManager< string, TH2D > * > m_pmt_tot_distributions
#define MAKE_STRING(A)
Make string.
Definition: JPrint.hh:142
Auxiliary class to manage set of compatible ROOT objects (e.g. histograms) using unique keys...
Definition: JManager.hh:43
then echo n User name
Definition: JCookie.sh:45
double binsToT[]
int nbinsToT
static const int NUMBER_OF_PMTS
Total number of PMTs in module.
Definition: JDAQ.hh:26
void TimesliceHistograms::init_m_pmt_rate_distributions ( int  ts_type,
string  ts_name 
)
inline

Definition at line 463 of file JRunHistograms.hh.

463  {
464 
465  string name = MAKE_STRING ("%/h_pmt_rate_distributions_" + ts_name);
466  string title = MAKE_STRING (ts_name + " ; TDC channel ; rate [kHz] ; counts ");
467 
468  TH2D* h_pmt_rate_distributions = new TH2D (name.c_str() , title.c_str(),
469  NUMBER_OF_PMTS , -0.5 , NUMBER_OF_PMTS - 0.5 ,
470  60 , -6 , log10(1000));
471 
472  BinLogY (h_pmt_rate_distributions);
473 
474  m_pmt_rate_distributions[ts_type] = new JManager < string , TH2D > (h_pmt_rate_distributions);
475  }
#define MAKE_STRING(A)
Make string.
Definition: JPrint.hh:142
Auxiliary class to manage set of compatible ROOT objects (e.g. histograms) using unique keys...
Definition: JManager.hh:43
void BinLogY(T *h)
then echo n User name
Definition: JCookie.sh:45
vector< JManager< string, TH2D > * > m_pmt_rate_distributions
static const int NUMBER_OF_PMTS
Total number of PMTs in module.
Definition: JDAQ.hh:26

Member Data Documentation

int TimesliceHistograms::min_ToT

Definition at line 303 of file JRunHistograms.hh.

int TimesliceHistograms::max_ToT

Definition at line 304 of file JRunHistograms.hh.

int TimesliceHistograms::min_logdt

Definition at line 305 of file JRunHistograms.hh.

int TimesliceHistograms::max_logdt

Definition at line 306 of file JRunHistograms.hh.

int TimesliceHistograms::nbins_logdt

Definition at line 307 of file JRunHistograms.hh.

int TimesliceHistograms::nbins_time

Definition at line 308 of file JRunHistograms.hh.

vector< TH2D* > TimesliceHistograms::h_dom_mean_rates

Definition at line 312 of file JRunHistograms.hh.

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

Definition at line 316 of file JRunHistograms.hh.

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

Definition at line 317 of file JRunHistograms.hh.

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

Definition at line 321 of file JRunHistograms.hh.

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

Definition at line 322 of file JRunHistograms.hh.


The documentation for this struct was generated from the following file: