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 299 of file JRunHistograms.hh.

Constructor & Destructor Documentation

TimesliceHistograms::TimesliceHistograms ( )
inline

Definition at line 322 of file JRunHistograms.hh.

322  :
323  min_ToT (0),
324  max_ToT (255),
325  min_logdt (0),
326  max_logdt (9),
327  nbins_logdt (150),
328  nbins_time (200)
329  {
330  int number_of_timeslice_types = JLength<JDAQTimesliceTypes_t>::value ;
331 
332  h_dom_mean_rates .resize (number_of_timeslice_types , NULL);
333  m_mean_ToT .resize (number_of_timeslice_types , NULL);
334  m_mean_ToT_distribution .resize (number_of_timeslice_types , NULL);
335  m_pmt_tot_distributions .resize (number_of_timeslice_types , NULL);
336  m_pmt_rate_distributions .resize (number_of_timeslice_types , NULL);
337  }
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 347 of file JRunHistograms.hh.

347  {
348 
349  init_h_dom_mean_rates (ts_type , du_ids , modules_per_string , ts_name);
350  init_m_mean_ToT (ts_type , modules_per_string , ts_name);
351  init_m_mean_ToT_distribution (ts_type , ts_name);
352  init_m_pmt_tot_distributions (ts_type , ts_name);
353  init_m_pmt_rate_distributions (ts_type , ts_name);
354  }
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 363 of file JRunHistograms.hh.

363  {
364 
365  int i = 0 ;
366 
367  for (typename vector < JManager < string , TH2D >* >::const_iterator it = m_pmt_tot_distributions.begin() ; it != m_pmt_tot_distributions.end() ; ++it , ++i){
368 
369  if ((*it)){
370 
371  for (typename JManager < string , TH2D >::const_iterator j = (*it) -> begin() ; j != (*it) -> end() ; ++j){
372 
373  TString s (MAKE_STRING(j -> first).c_str());
374  TPRegexp r ("(\\w+)/(\\DU)(\\d+)/(F)(\\d+)");
375 
376  TObjArray* o = r.MatchS(s);
377 
378  int String = ((TObjString *)o->At(3))->GetString().Atoi();
379  int Floor = ((TObjString *)o->At(5))->GetString().Atoi();
380 
381  for (int pmt = 1 ; pmt <= (j -> second) -> GetXaxis() -> GetNbins() ; pmt++){
382 
383  (*m_mean_ToT[i])[MAKE_STRING("Detector/DU" + to_string(String))] -> Fill((j->second) -> GetXaxis() -> GetBinCenter(pmt) , Floor , (j -> second) -> ProjectionY ("" , pmt , pmt) -> GetMean () );
384  (*m_mean_ToT_distribution[i])[MAKE_STRING("Detector/DU" + to_string(String))] -> Fill((j -> second) -> ProjectionY ("" , pmt , pmt) -> GetMean () );
385  }
386  }
387  }
388  }
389  }
vector< JManager< string, TH2D > * > m_pmt_tot_distributions
data_type r[M+1]
Definition: JPolint.hh:709
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:699
esac $JPP_DIR examples JDetector JTransitTime o $OUTPUT_FILE n N $NPE T $TTS_NS d $DEBUG for HISTOGRAM in tts tt2 pmt
Definition: JTransitTime.sh:36
Auxiliary class to manage set of compatible ROOT objects (e.g.
Definition: JManager.hh:42
vector< JManager< string, TH1D > * > m_mean_ToT_distribution
General purpose string class.
Definition: JHead.hh:102
std::string to_string(const T &value)
Convert value to string.
vector< JManager< string, TH2D > * > m_mean_ToT
int j
Definition: JPolint.hh:634
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 398 of file JRunHistograms.hh.

398  {
399 
400  string name = MAKE_STRING ("h_mean_dom_rates_" + ts_name);
401  string title = MAKE_STRING (ts_name + " ; Floor number ; DU number ; time slice averaged rate [Hz]");
402 
403  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);
404  }
vector< TH2D * > h_dom_mean_rates
#define MAKE_STRING(A)
Make string.
Definition: JPrint.hh:699
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 413 of file JRunHistograms.hh.

413  {
414 
415  string name = MAKE_STRING ("%/h_mean_ToT_" + ts_name);
416  string title = MAKE_STRING (ts_name + " ; TDC channel ; Floor number ; mean ToT [ns] ");
417 
418  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));
419  }
#define MAKE_STRING(A)
Make string.
Definition: JPrint.hh:699
Auxiliary class to manage set of compatible ROOT objects (e.g.
Definition: JManager.hh:42
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 428 of file JRunHistograms.hh.

428  {
429 
430  string name = MAKE_STRING ("%/h_mean_ToT_distribution" + ts_name);
431  string title = MAKE_STRING (ts_name + " ; ToT [ns] ; # PMTS ");
432 
433  m_mean_ToT_distribution[ts_type] = new JManager < string , TH1D > (new TH1D (name.c_str() , title.c_str() , 255 , 0.5 , 255.5));
434  }
#define MAKE_STRING(A)
Make string.
Definition: JPrint.hh:699
Auxiliary class to manage set of compatible ROOT objects (e.g.
Definition: JManager.hh:42
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 442 of file JRunHistograms.hh.

442  {
443 
444  string name = MAKE_STRING ("%_" + ts_name + "_2SToT");
445  string title = MAKE_STRING (ts_name + " ; TDC channel ; ToT [ns] ; counts");
446 
447  TH2D* h = new TH2D (name.c_str() , title.c_str() , NUMBER_OF_PMTS , -0.5 , NUMBER_OF_PMTS - 0.5 , nbinsToT , binsToT);
448 
449  h->Sumw2();
450 
452 
453  }
vector< JManager< string, TH2D > * > m_pmt_tot_distributions
#define MAKE_STRING(A)
Make string.
Definition: JPrint.hh:699
Auxiliary class to manage set of compatible ROOT objects (e.g.
Definition: JManager.hh:42
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 461 of file JRunHistograms.hh.

461  {
462 
463  string name = MAKE_STRING ("%/h_pmt_rate_distributions_" + ts_name);
464  string title = MAKE_STRING (ts_name + " ; TDC channel ; rate [kHz] ; counts ");
465 
466  TH2D* h_pmt_rate_distributions = new TH2D (name.c_str() , title.c_str(),
467  NUMBER_OF_PMTS , -0.5 , NUMBER_OF_PMTS - 0.5 ,
468  60 , -6 , log10(1000));
469 
470  BinLogY (h_pmt_rate_distributions);
471 
472  m_pmt_rate_distributions[ts_type] = new JManager < string , TH2D > (h_pmt_rate_distributions);
473  }
#define MAKE_STRING(A)
Make string.
Definition: JPrint.hh:699
Auxiliary class to manage set of compatible ROOT objects (e.g.
Definition: JManager.hh:42
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 301 of file JRunHistograms.hh.

int TimesliceHistograms::max_ToT

Definition at line 302 of file JRunHistograms.hh.

int TimesliceHistograms::min_logdt

Definition at line 303 of file JRunHistograms.hh.

int TimesliceHistograms::max_logdt

Definition at line 304 of file JRunHistograms.hh.

int TimesliceHistograms::nbins_logdt

Definition at line 305 of file JRunHistograms.hh.

int TimesliceHistograms::nbins_time

Definition at line 306 of file JRunHistograms.hh.

vector< TH2D* > TimesliceHistograms::h_dom_mean_rates

Definition at line 310 of file JRunHistograms.hh.

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

Definition at line 314 of file JRunHistograms.hh.

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

Definition at line 315 of file JRunHistograms.hh.

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

Definition at line 319 of file JRunHistograms.hh.

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

Definition at line 320 of file JRunHistograms.hh.


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