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

Constructor & Destructor Documentation

◆ TimesliceHistograms()

TimesliceHistograms::TimesliceHistograms ( )
inline

Definition at line 138 of file JRunHistograms.hh.

138  :
139  min_logdt (0),
140  max_logdt (9),
141  nbins_logdt (150),
142  nbins_time (200)
143  {
144  int number_of_timeslice_types = JLength<JDAQTimesliceTypes_t>::value ;
145 
146  h_dom_mean_rates .resize (number_of_timeslice_types , NULL);
147  m_mean_ToT .resize (number_of_timeslice_types , NULL);
148  m_mean_ToT_distribution .resize (number_of_timeslice_types , NULL);
149  m_pmt_tot_distributions .resize (number_of_timeslice_types , NULL);
150  m_pmt_rate_distributions .resize (number_of_timeslice_types , NULL);
151  }
Length of type list.
Definition: JTypeList.hh:176
vector< JManager< string, TH2D > * > m_pmt_tot_distributions
vector< JManager< string, TH2D > * > m_pmt_rate_distributions
vector< JManager< string, TH2D > * > m_mean_ToT
vector< TH2D * > h_dom_mean_rates
vector< JManager< string, TH1D > * > m_mean_ToT_distribution

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

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

◆ Fill_mean_ToT_histograms()

void TimesliceHistograms::Fill_mean_ToT_histograms ( )
inline

Definition at line 215 of file JRunHistograms.hh.

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

Member Data Documentation

◆ min_logdt

int TimesliceHistograms::min_logdt

Definition at line 119 of file JRunHistograms.hh.

◆ max_logdt

int TimesliceHistograms::max_logdt

Definition at line 120 of file JRunHistograms.hh.

◆ nbins_logdt

int TimesliceHistograms::nbins_logdt

Definition at line 121 of file JRunHistograms.hh.

◆ nbins_time

int TimesliceHistograms::nbins_time

Definition at line 122 of file JRunHistograms.hh.

◆ h_dom_mean_rates

vector< TH2D* > TimesliceHistograms::h_dom_mean_rates

Definition at line 126 of file JRunHistograms.hh.

◆ m_mean_ToT

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

Definition at line 130 of file JRunHistograms.hh.

◆ m_mean_ToT_distribution

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

Definition at line 131 of file JRunHistograms.hh.

◆ m_pmt_tot_distributions

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

Definition at line 135 of file JRunHistograms.hh.

◆ m_pmt_rate_distributions

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

Definition at line 136 of file JRunHistograms.hh.


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