Jpp 20.0.0-rc.2
the software that should make you happy
Loading...
Searching...
No Matches
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 133 of file JRunHistograms.hh.

Constructor & Destructor Documentation

◆ TimesliceHistograms()

TimesliceHistograms::TimesliceHistograms ( )
inline

Definition at line 154 of file JRunHistograms.hh.

154 :
155 min_logdt (0),
156 max_logdt (9),
157 nbins_logdt (150),
158 nbins_time (200)
159 {
160 int number_of_timeslice_types = JLength<JDAQTimesliceTypes_t>::value ;
161
162 h_dom_mean_rates .resize (number_of_timeslice_types , NULL);
163 m_mean_ToT .resize (number_of_timeslice_types , NULL);
164 m_mean_ToT_distribution .resize (number_of_timeslice_types , NULL);
165 m_pmt_tot_distributions .resize (number_of_timeslice_types , NULL);
166 m_pmt_rate_distributions .resize (number_of_timeslice_types , NULL);
167 }
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 177 of file JRunHistograms.hh.

177 {
178
179 h_dom_mean_rates[ts_type] = h2_detector_map_factory(MAKE_STRING ("h_mean_dom_rates_" + ts_name).c_str(),
180 MAKE_STRING (ts_name + " ; DU number ; Floor number ; time slice averaged rate [Hz]").c_str(),
181
182 du_ids, modules_per_string);
183
184 m_mean_ToT[ts_type] = new JManager < string , TH2D > (new TH2D (MAKE_STRING ("%/h_mean_ToT_" + ts_name).c_str(),
185 MAKE_STRING (ts_name + " ; TDC channel ; Floor number ; mean ToT [ns] ").c_str(),
186 NUMBER_OF_PMTS , -0.5 , NUMBER_OF_PMTS - 0.5 ,
187 modules_per_string , 0.5 , 0.5 + modules_per_string));
188
189 m_mean_ToT_distribution[ts_type] = new JManager < string , TH1D > (new TH1D (MAKE_STRING ("%/h_mean_ToT_distribution" + ts_name).c_str(),
190 MAKE_STRING (ts_name + " ; ToT [ns] ; # PMTS ").c_str(),
191 256, -0.5, 255.5));
192
193 TH2D* h = new TH2D (MAKE_STRING ("%_" + ts_name + "_2SToT").c_str(),
194 MAKE_STRING (ts_name + " ; TDC channel ; ToT [ns] ; counts").c_str(),
195 NUMBER_OF_PMTS , -0.5 , NUMBER_OF_PMTS - 0.5 , 256, -0.5, 255.5);
196
197 h->Sumw2();
198
199 m_pmt_tot_distributions[ts_type] = new JManager < string , TH2D > (h);
200
201 int NBinsY=0;
202 double Ymax=0;
203
205 NBinsY=100;
206 Ymax=25;
208 NBinsY=100;
209 Ymax=2;
211 NBinsY=10;
212 Ymax=0.1;
213 }
214
215 TH2D* h_pmt_rate_distributions = new TH2D (MAKE_STRING ("%/h_pmt_rate_distributions_" + ts_name).c_str(),
216 MAKE_STRING (ts_name + " ; TDC channel ; rate [kHz] ; counts ").c_str(),
217 NUMBER_OF_PMTS , -0.5 , NUMBER_OF_PMTS - 0.5 ,
218 NBinsY, 0, Ymax);
219
220 m_pmt_rate_distributions[ts_type] = new JManager < string , TH2D > (h_pmt_rate_distributions);
221
222 }
#define MAKE_STRING(A)
Make string.
Definition JPrint.hh:63
TH2D * h2_detector_map_factory(const char *name, const char *title, std::set< int > &du_ids, int modules_per_string)
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 231 of file JRunHistograms.hh.

231 {
232
233 int i = 0 ;
234
235 for (typename vector < JManager < string , TH2D >* >::const_iterator it = m_pmt_tot_distributions.begin() ; it != m_pmt_tot_distributions.end() ; ++it , ++i){
236
237 if ((*it)){
238
239 for (typename JManager < string , TH2D >::const_iterator j = (*it) -> begin() ; j != (*it) -> end() ; ++j){
240
241 TString s (MAKE_STRING(j -> first).c_str());
242 TPRegexp r ("(\\w+)/(\\DU)(\\d+)/(F)(\\d+)");
243
244 TObjArray* o = r.MatchS(s);
245
246 int String = ((TObjString *)o->At(3))->GetString().Atoi();
247 int Floor = ((TObjString *)o->At(5))->GetString().Atoi();
248
249 for (int pmt = 1 ; pmt <= (j -> second) -> GetXaxis() -> GetNbins() ; pmt++){
250
251 (*m_mean_ToT[i])[MAKE_STRING("Detector/DU" + to_string(String))] -> Fill((j->second) -> GetXaxis() -> GetBinCenter(pmt) , Floor , (j -> second) -> ProjectionY ("" , pmt , pmt) -> GetMean () );
252 (*m_mean_ToT_distribution[i])[MAKE_STRING("Detector/DU" + to_string(String))] -> Fill((j -> second) -> ProjectionY ("" , pmt , pmt) -> GetMean () );
253 }
254 }
255 }
256 }
257 }
std::string to_string(const T &value)
Convert value to string.
int j
Definition JPolint.hh:801
General purpose string class.
Definition JHead.hh:152

Member Data Documentation

◆ min_logdt

int TimesliceHistograms::min_logdt

Definition at line 135 of file JRunHistograms.hh.

◆ max_logdt

int TimesliceHistograms::max_logdt

Definition at line 136 of file JRunHistograms.hh.

◆ nbins_logdt

int TimesliceHistograms::nbins_logdt

Definition at line 137 of file JRunHistograms.hh.

◆ nbins_time

int TimesliceHistograms::nbins_time

Definition at line 138 of file JRunHistograms.hh.

◆ h_dom_mean_rates

vector< TH2D* > TimesliceHistograms::h_dom_mean_rates

Definition at line 142 of file JRunHistograms.hh.

◆ m_mean_ToT

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

Definition at line 146 of file JRunHistograms.hh.

◆ m_mean_ToT_distribution

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

Definition at line 147 of file JRunHistograms.hh.

◆ m_pmt_tot_distributions

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

Definition at line 151 of file JRunHistograms.hh.

◆ m_pmt_rate_distributions

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

Definition at line 152 of file JRunHistograms.hh.


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