Jpp  16.0.0
the software that should make you happy
 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 251 of file JRunHistograms.hh.

Constructor & Destructor Documentation

TimesliceHistograms::TimesliceHistograms ( )
inline

Definition at line 274 of file JRunHistograms.hh.

274  :
275  min_ToT (0),
276  max_ToT (255),
277  min_logdt (0),
278  max_logdt (9),
279  nbins_logdt (150),
280  nbins_time (200)
281  {
282  int number_of_timeslice_types = JLength<JDAQTimesliceTypes_t>::value ;
283 
284  h_dom_mean_rates .resize (number_of_timeslice_types , NULL);
285  m_mean_ToT .resize (number_of_timeslice_types , NULL);
286  m_mean_ToT_distribution .resize (number_of_timeslice_types , NULL);
287  m_pmt_tot_distributions .resize (number_of_timeslice_types , NULL);
288  m_pmt_rate_distributions .resize (number_of_timeslice_types , NULL);
289  }
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 299 of file JRunHistograms.hh.

299  {
300 
301  init_h_dom_mean_rates (ts_type , du_ids , modules_per_string , ts_name);
302  init_m_mean_ToT (ts_type , modules_per_string , ts_name);
303  init_m_mean_ToT_distribution (ts_type , ts_name);
304  init_m_pmt_tot_distributions (ts_type , ts_name);
305  init_m_pmt_rate_distributions (ts_type , ts_name);
306  }
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 315 of file JRunHistograms.hh.

315  {
316 
317  int i = 0 ;
318 
319  for (typename vector < JManager < string , TH2D >* >::const_iterator it = m_pmt_tot_distributions.begin() ; it != m_pmt_tot_distributions.end() ; ++it , ++i){
320 
321  if ((*it)){
322 
323  for (typename JManager < string , TH2D >::const_iterator j = (*it) -> begin() ; j != (*it) -> end() ; ++j){
324 
325  TString s (MAKE_STRING(j -> first).c_str());
326  TPRegexp r ("(\\w+)/(\\DU)(\\d+)/(F)(\\d+)");
327 
328  TObjArray* o = r.MatchS(s);
329 
330  int String = ((TObjString *)o->At(3))->GetString().Atoi();
331  int Floor = ((TObjString *)o->At(5))->GetString().Atoi();
332 
333  for (int pmt = 1 ; pmt <= (j -> second) -> GetXaxis() -> GetNbins() ; pmt++){
334 
335  (*m_mean_ToT[i])[MAKE_STRING("Detector/DU" + to_string(String))] -> Fill((j->second) -> GetXaxis() -> GetBinCenter(pmt) , Floor , (j -> second) -> ProjectionY ("" , pmt , pmt) -> GetMean () );
336  (*m_mean_ToT_distribution[i])[MAKE_STRING("Detector/DU" + to_string(String))] -> Fill((j -> second) -> ProjectionY ("" , pmt , pmt) -> GetMean () );
337  }
338  }
339  }
340  }
341  }
vector< JManager< string, TH2D > * > m_pmt_tot_distributions
data_type r[M+1]
Definition: JPolint.hh:758
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
then JConvertDetectorFormat a $DETECTOR[1] o
vector< JManager< string, TH1D > * > m_mean_ToT_distribution
General purpose string class.
Definition: JHead.hh:150
std::string to_string(const T &value)
Convert value to string.
vector< JManager< string, TH2D > * > m_mean_ToT
int j
Definition: JPolint.hh:682
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 350 of file JRunHistograms.hh.

350  {
351 
352  string name = MAKE_STRING ("h_mean_dom_rates_" + ts_name);
353  string title = MAKE_STRING (ts_name + " ; DU number ; Floor number ; time slice averaged rate [Hz]");
354 
355  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);
356  }
vector< TH2D * > h_dom_mean_rates
then echo Enter input within $TIMEOUT_S seconds echo n User name
Definition: JCookie.sh:42
#define MAKE_STRING(A)
Make string.
Definition: JPrint.hh:142
void TimesliceHistograms::init_m_mean_ToT ( int  ts_type,
int  modules_per_string,
string  ts_name 
)
inline

Definition at line 365 of file JRunHistograms.hh.

365  {
366 
367  string name = MAKE_STRING ("%/h_mean_ToT_" + ts_name);
368  string title = MAKE_STRING (ts_name + " ; TDC channel ; Floor number ; mean ToT [ns] ");
369 
370  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));
371  }
then echo Enter input within $TIMEOUT_S seconds echo n User name
Definition: JCookie.sh:42
#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, 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 380 of file JRunHistograms.hh.

380  {
381 
382  string name = MAKE_STRING ("%/h_mean_ToT_distribution" + ts_name);
383  string title = MAKE_STRING (ts_name + " ; ToT [ns] ; # PMTS ");
384 
385  m_mean_ToT_distribution[ts_type] = new JManager < string , TH1D > (new TH1D (name.c_str() , title.c_str() , 255 , 0.5 , 255.5));
386  }
then echo Enter input within $TIMEOUT_S seconds echo n User name
Definition: JCookie.sh:42
#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
void TimesliceHistograms::init_m_pmt_tot_distributions ( int  ts_type,
string  ts_name 
)
inline

Definition at line 394 of file JRunHistograms.hh.

394  {
395 
396  string name = MAKE_STRING ("%_" + ts_name + "_2SToT");
397  string title = MAKE_STRING (ts_name + " ; TDC channel ; ToT [ns] ; counts");
398 
399  TH2D* h = new TH2D (name.c_str() , title.c_str() , NUMBER_OF_PMTS , -0.5 , NUMBER_OF_PMTS - 0.5 , nbinsToT , binsToT);
400 
401  h->Sumw2();
402 
404 
405  }
vector< JManager< string, TH2D > * > m_pmt_tot_distributions
then echo Enter input within $TIMEOUT_S seconds echo n User name
Definition: JCookie.sh:42
#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
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 413 of file JRunHistograms.hh.

413  {
414 
415  string name = MAKE_STRING ("%/h_pmt_rate_distributions_" + ts_name);
416  string title = MAKE_STRING (ts_name + " ; TDC channel ; rate [kHz] ; counts ");
417 
418  TH2D* h_pmt_rate_distributions = new TH2D (name.c_str() , title.c_str(),
419  NUMBER_OF_PMTS , -0.5 , NUMBER_OF_PMTS - 0.5 ,
420  60 , -6 , log10(1000));
421 
422  setLogarithmicY (h_pmt_rate_distributions);
423 
424  m_pmt_rate_distributions[ts_type] = new JManager < string , TH2D > (h_pmt_rate_distributions);
425  }
then echo Enter input within $TIMEOUT_S seconds echo n User name
Definition: JCookie.sh:42
#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
set_variable E_E log10(E_{fit}/E_{#mu})"
void setLogarithmicY(TList *list)
Make y-axis of objects in list logarithmic (e.g. after using log10()).
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 253 of file JRunHistograms.hh.

int TimesliceHistograms::max_ToT

Definition at line 254 of file JRunHistograms.hh.

int TimesliceHistograms::min_logdt

Definition at line 255 of file JRunHistograms.hh.

int TimesliceHistograms::max_logdt

Definition at line 256 of file JRunHistograms.hh.

int TimesliceHistograms::nbins_logdt

Definition at line 257 of file JRunHistograms.hh.

int TimesliceHistograms::nbins_time

Definition at line 258 of file JRunHistograms.hh.

vector< TH2D* > TimesliceHistograms::h_dom_mean_rates

Definition at line 262 of file JRunHistograms.hh.

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

Definition at line 266 of file JRunHistograms.hh.

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

Definition at line 267 of file JRunHistograms.hh.

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

Definition at line 271 of file JRunHistograms.hh.

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

Definition at line 272 of file JRunHistograms.hh.


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