Jpp  17.1.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 ()
 

Public Attributes

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

Constructor & Destructor Documentation

TimesliceHistograms::TimesliceHistograms ( )
inline

Definition at line 140 of file JRunHistograms.hh.

140  :
141  min_logdt (0),
142  max_logdt (9),
143  nbins_logdt (150),
144  nbins_time (200)
145  {
146  int number_of_timeslice_types = JLength<JDAQTimesliceTypes_t>::value ;
147 
148  h_dom_mean_rates .resize (number_of_timeslice_types , NULL);
149  m_mean_ToT .resize (number_of_timeslice_types , NULL);
150  m_mean_ToT_distribution .resize (number_of_timeslice_types , NULL);
151  m_pmt_tot_distributions .resize (number_of_timeslice_types , NULL);
152  m_pmt_rate_distributions .resize (number_of_timeslice_types , NULL);
153  }
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 163 of file JRunHistograms.hh.

163  {
164 
165  h_dom_mean_rates[ts_type] = new TH2D (MAKE_STRING ("h_mean_dom_rates_" + ts_name).c_str(),
166  MAKE_STRING (ts_name + " ; DU number ; Floor number ; time slice averaged rate [Hz]").c_str() ,
167  *du_ids.rbegin() , 0.5 , *du_ids.rbegin() + 0.5 ,
168  modules_per_string , 0.5 , 0.5 + modules_per_string);
169 
170  m_mean_ToT[ts_type] = new JManager < string , TH2D > (new TH2D (MAKE_STRING ("%/h_mean_ToT_" + ts_name).c_str(),
171  MAKE_STRING (ts_name + " ; TDC channel ; Floor number ; mean ToT [ns] ").c_str(),
172  NUMBER_OF_PMTS , -0.5 , NUMBER_OF_PMTS - 0.5 ,
173  modules_per_string , 0.5 , 0.5 + modules_per_string));
174 
175  m_mean_ToT_distribution[ts_type] = new JManager < string , TH1D > (new TH1D (MAKE_STRING ("%/h_mean_ToT_distribution" + ts_name).c_str(),
176  MAKE_STRING (ts_name + " ; ToT [ns] ; # PMTS ").c_str(),
177  256, -0.5, 255.5));
178 
179  TH2D* h = new TH2D (MAKE_STRING ("%_" + ts_name + "_2SToT").c_str(),
180  MAKE_STRING (ts_name + " ; TDC channel ; ToT [ns] ; counts").c_str(),
181  NUMBER_OF_PMTS , -0.5 , NUMBER_OF_PMTS - 0.5 , 256, -0.5, 255.5);
182 
183  h->Sumw2();
184 
186 
187  int NBinsY=0;
188  double Ymax=0;
189 
191  NBinsY=100;
192  Ymax=25;
194  NBinsY=100;
195  Ymax=2;
197  NBinsY=10;
198  Ymax=0.1;
199  }
200 
201  TH2D* h_pmt_rate_distributions = new TH2D (MAKE_STRING ("%/h_pmt_rate_distributions_" + ts_name).c_str(),
202  MAKE_STRING (ts_name + " ; TDC channel ; rate [kHz] ; counts ").c_str(),
203  NUMBER_OF_PMTS , -0.5 , NUMBER_OF_PMTS - 0.5 ,
204  NBinsY, 0, Ymax);
205 
206  m_pmt_rate_distributions[ts_type] = new JManager < string , TH2D > (h_pmt_rate_distributions);
207 
208  }
vector< JManager< string, TH2D > * > m_pmt_tot_distributions
vector< TH2D * > h_dom_mean_rates
#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
vector< JManager< string, TH2D > * > m_mean_ToT
vector< JManager< string, TH2D > * > m_pmt_rate_distributions
Indexing of data type in type list.
Definition: JTypeList.hh:310
static const int NUMBER_OF_PMTS
Total number of PMTs in module.
Definition: JDAQ.hh:26
void TimesliceHistograms::Fill_mean_ToT_histograms ( )
inline

Definition at line 217 of file JRunHistograms.hh.

217  {
218 
219  int i = 0 ;
220 
221  for (typename vector < JManager < string , TH2D >* >::const_iterator it = m_pmt_tot_distributions.begin() ; it != m_pmt_tot_distributions.end() ; ++it , ++i){
222 
223  if ((*it)){
224 
225  for (typename JManager < string , TH2D >::const_iterator j = (*it) -> begin() ; j != (*it) -> end() ; ++j){
226 
227  TString s (MAKE_STRING(j -> first).c_str());
228  TPRegexp r ("(\\w+)/(\\DU)(\\d+)/(F)(\\d+)");
229 
230  TObjArray* o = r.MatchS(s);
231 
232  int String = ((TObjString *)o->At(3))->GetString().Atoi();
233  int Floor = ((TObjString *)o->At(5))->GetString().Atoi();
234 
235  for (int pmt = 1 ; pmt <= (j -> second) -> GetXaxis() -> GetNbins() ; pmt++){
236 
237  (*m_mean_ToT[i])[MAKE_STRING("Detector/DU" + to_string(String))] -> Fill((j->second) -> GetXaxis() -> GetBinCenter(pmt) , Floor , (j -> second) -> ProjectionY ("" , pmt , pmt) -> GetMean () );
238  (*m_mean_ToT_distribution[i])[MAKE_STRING("Detector/DU" + to_string(String))] -> Fill((j -> second) -> ProjectionY ("" , pmt , pmt) -> GetMean () );
239  }
240  }
241  }
242  }
243  }
vector< JManager< string, TH2D > * > m_pmt_tot_distributions
data_type r[M+1]
Definition: JPolint.hh:758
then fatal Wrong number of arguments fi JConvertDetectorFormat a o
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
vector< JManager< string, TH1D > * > m_mean_ToT_distribution
General purpose string class.
Definition: JHead.hh:152
std::string to_string(const T &value)
Convert value to string.
vector< JManager< string, TH2D > * > m_mean_ToT
int j
Definition: JPolint.hh:682

Member Data Documentation

int TimesliceHistograms::min_logdt

Definition at line 121 of file JRunHistograms.hh.

int TimesliceHistograms::max_logdt

Definition at line 122 of file JRunHistograms.hh.

int TimesliceHistograms::nbins_logdt

Definition at line 123 of file JRunHistograms.hh.

int TimesliceHistograms::nbins_time

Definition at line 124 of file JRunHistograms.hh.

vector< TH2D* > TimesliceHistograms::h_dom_mean_rates

Definition at line 128 of file JRunHistograms.hh.

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

Definition at line 132 of file JRunHistograms.hh.

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

Definition at line 133 of file JRunHistograms.hh.

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

Definition at line 137 of file JRunHistograms.hh.

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

Definition at line 138 of file JRunHistograms.hh.


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