Jpp  17.2.0
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Public Member Functions | Private Attributes | List of all members
JRunAnalyzer Class Reference

Class dedicated to the analysis of KM3NeT runs. More...

#include <JRunAnalyzer.hh>

Classes

struct  dom_type
 

Public Member Functions

 JRunAnalyzer (const JSingleFileScanner<> &file, const JDetector &detector, TFile *out, JLimit_t nTimeslices, JLimit_t nSummaryslices, JLimit_t nEvents, int analysislevel)
 Constructor. More...
 
 ~JRunAnalyzer ()
 Destructor. More...
 
void iterateEventTree (JTreeScanner< JDAQEvent > &scanner)
 
void iterateRecoEventTree (JParallelFileScanner< JTypeList< JDAQEvent, JFIT::JEvt > > &scanner, TFile &f)
 
void iterateSummarysliceTree (JTreeScanner< JDAQSummaryslice > &scanner)
 
template<class T >
void iterateTimesliceTree (JTreeScanner< T > &scanner)
 
void readSummaryData ()
 
template<class T >
void readTimesliceData ()
 
void readEvents ()
 
void readRecoEvents ()
 
void writeToFile (TFile *f, int analysis_level)
 

Private Attributes

JSingleFileScanner inputFile
 
JModuleRouter router
 
TFile * outputFile
 
JRA_Histograms histograms
 
int highest_floor
 
JLimit_t numberOfTimeslices
 
JLimit_t numberOfSummaryslices
 
JLimit_t numberOfEvents
 
int analysis_level
 

Detailed Description

Class dedicated to the analysis of KM3NeT runs.

Definition at line 32 of file JRunAnalyzer.hh.

Constructor & Destructor Documentation

JRunAnalyzer::JRunAnalyzer ( const JSingleFileScanner<> &  file,
const JDetector detector,
TFile *  out,
JLimit_t  nTimeslices,
JLimit_t  nSummaryslices,
JLimit_t  nEvents,
int  analysislevel 
)
inline

Constructor.

Parameters
filefile name
detectordetector
outpointer to output file
nTimeslicesnumber of timeslices to be read
nSummaryslicesnumber of summary slices to be read
nEventsnumber of events to be read
analysisleveloption for analysis of PMT or reco data

Definition at line 57 of file JRunAnalyzer.hh.

58  :
59  inputFile (file),
60  router (detector),
61  outputFile (out),
62  numberOfTimeslices (nTimeslices),
63  numberOfSummaryslices (nSummaryslices),
64  numberOfEvents (nEvents),
65  analysis_level (analysislevel)
66  {
67  using namespace JPP;
68  using namespace std;
69 
70  histograms = JRA_Histograms(detector);
72  }
TFile * outputFile
Definition: JRunAnalyzer.hh:36
JRA_Histograms histograms
Definition: JRunAnalyzer.hh:37
JLimit_t numberOfTimeslices
Definition: JRunAnalyzer.hh:39
JSingleFileScanner inputFile
Definition: JRunAnalyzer.hh:34
floor_range getRangeOfFloors(const JDetector &detector)
Get range of floors.
JModuleRouter router
Definition: JRunAnalyzer.hh:35
T getUpperLimit() const
Get upper limit.
Definition: JRange.hh:213
JLimit_t numberOfEvents
Definition: JRunAnalyzer.hh:41
JLimit_t numberOfSummaryslices
Definition: JRunAnalyzer.hh:40
JRunAnalyzer::~JRunAnalyzer ( )
inline

Destructor.

Definition at line 77 of file JRunAnalyzer.hh.

77 {}

Member Function Documentation

void JRunAnalyzer::iterateEventTree ( JTreeScanner< JDAQEvent > &  scanner)
inline

Definition at line 85 of file JRunAnalyzer.hh.

85  {
86 
87  while (scanner.hasNext()) {
88 
89  JDAQEvent event = *(scanner.next());
90 
91  histograms.h_trigger.h_Snapshot_hits -> Fill((Double_t) event.size<JDAQSnapshotHit> ());
92  histograms.h_trigger.h_Triggered_hits -> Fill((Double_t) event.size<JDAQTriggeredHit> ());
93  histograms.h_trigger.h_Triggered_over_Snapshot_hits -> Fill((Double_t) event.size<JDAQTriggeredHit> () / event.size<JDAQSnapshotHit > ());
94  histograms.h_trigger.h_Number_of_overlays -> Fill(event.getOverlays());
95 
96  for (unsigned int i = 0; i != NUMBER_OF_TRIGGER_BITS; ++i) {
97 
98  if (event.hasTriggerBit(i)) {
99 
100  histograms.h_trigger.h_Trigger_bit_event -> Fill((Double_t) i);
101  }
102  }
103 
104  int counter_3dmuon = 0;
105  typedef JRange<double> JRange_t;
106  JRange_t range(JRange_t::DEFAULT_RANGE);
107 
108  for (JDAQEvent::const_iterator<JDAQTriggeredHit> hit = event.begin<JDAQTriggeredHit>(); hit != event.end<JDAQTriggeredHit>(); ++hit) {
109 
110  const JModule& module = router.getModule(hit->getModuleID());
111  const double t1 = getTime(hit->getT(), module.getPMT(hit->getPMT()));
112 
113  range.include(t1);
114 
115  JDAQTriggerMask trigger_mask(event.getTriggerMask(*hit));
116 
117  if(trigger_mask.hasTriggerBit(getTriggerBit<JTrigger3DMuon>())) counter_3dmuon++;
118 
119  if (router.hasModule(hit->getModuleID())) {
120 
121  const JModule& module = router.getModule (hit->getModuleID());
122 
125 
126  int String = module.getString();
127  int Floor = module.getFloor();
128 
129  histograms.h_trigger.h_Triggered_hits_per_module -> Fill(String , Floor);
130 
131  if(trigger_mask.hasTriggerBit(getTriggerBit<JTrigger3DMuon>())){
133  }
134 
135  for (unsigned int i = 0; i != NUMBER_OF_TRIGGER_BITS; ++i) {
136 
137  if (hit -> hasTriggerBit(i)) {
138 
139  histograms.h_trigger.h_Trigger_bit_hit->Fill((Double_t) i);
140  }
141  }
142  }else{
143  FATAL("JModuleRouter trying to access non existing identifier: "<< hit->getModuleID());
144  }
145  }
146 
147  histograms.h_trigger.h_event_duration->Fill(range.getLength());
148 
149  histograms.h_trigger.h_pmt_distribution_triggered_hits->Scale(1. / (Double_t) event.size<JDAQTriggeredHit> ());
150 
151  if(counter_3dmuon != 0) histograms.h_trigger.h_Triggered_hits_3dmuon->Fill(counter_3dmuon);
152 
153  for (JDAQEvent::const_iterator<JDAQSnapshotHit> hit = event.begin<JDAQSnapshotHit>() ; hit != event.end<JDAQSnapshotHit>() ; ++hit){
154 
155  if (router.hasModule(hit->getModuleID())) {
156 
157  const JModule& module = router.getModule (hit->getModuleID());
158 
159  int String = module.getString();
160  int Floor = module.getFloor();
161  int pmt = hit-> getPMT();
162 
163  if(analysis_level == 1){
164 
165  (*histograms.h_trigger.m_Snapshot_hits_per_pmt)[MAKE_STRING("Detector/DU" + to_string(String))] -> Fill(pmt, Floor);
166 
167  }
168 
169  histograms.h_trigger.h_pmt_distribution_snapshot_hits -> Fill(hit->getPMT());
171  histograms.h_trigger.h_Snapshot_hits_per_module -> Fill(String, Floor);
172 
173  }else{
174  FATAL("JModuleRouter trying to access non existing identifier: "<< hit->getModuleID());
175  }
176  }
177  }
178  }
TH1D * h_pmt_distribution_snapshot_hits
TH2D * h_Snapshot_hits_per_module
DAQ key hit.
Definition: JDAQKeyHit.hh:19
static const unsigned int NUMBER_OF_TRIGGER_BITS
Number of trigger bits.
TH1D * h_pmt_distribution_triggered_hits
int getFloor() const
Get floor number.
Definition: JLocation.hh:145
const JModule & getModule(const JObjectID &id) const
Get module parameters.
Data structure for a composite optical module.
Definition: JModule.hh:68
Auxiliary class for trigger mask.
JRA_Histograms histograms
Definition: JRunAnalyzer.hh:37
TH2D * h_Triggered_hits_per_module
Template const_iterator.
Definition: JDAQEvent.hh:68
double getTime(const Hit &hit)
Get true time of hit.
#define MAKE_STRING(A)
Make string.
Definition: JPrint.hh:127
Type definition of range.
Definition: JHead.hh:41
JModuleRouter router
Definition: JRunAnalyzer.hh:35
TH1D * h_tot_distribution_snapshot_hits
TriggerHistograms h_trigger
const JPMT & getPMT(const int index) const
Get PMT.
Definition: JModule.hh:173
#define FATAL(A)
Definition: JMessage.hh:67
z range($ZMAX-$ZMIN)< $MINIMAL_DZ." fi fi typeset -Z 4 STRING typeset -Z 2 FLOOR JPlot1D -f $
int getString() const
Get string number.
Definition: JLocation.hh:134
General purpose string class.
Definition: JHead.hh:152
std::string to_string(const T &value)
Convert value to string.
bool hasModule(const JObjectID &id) const
Has module.
TH1D * h_tot_distribution_triggered_hits
TH1D * h_Triggered_hits_3dmuon
TH2D * h_Triggered_hits_3dmuon_per_module
JManager< string, TH2D > * m_Snapshot_hits_per_pmt
TH1D * h_Triggered_over_Snapshot_hits
void JRunAnalyzer::iterateRecoEventTree ( JParallelFileScanner< JTypeList< JDAQEvent, JFIT::JEvt > > &  scanner,
TFile &  f 
)
inline

Definition at line 186 of file JRunAnalyzer.hh.

186  {
187 
188  TH1D* h_tres = new TH1D("h_tres", ";Time residuals [ns]; Entries", 100, -50, 150);
189  TH1D* h_likelihood = new TH1D ("h_likelihood", " ; Likelihood; Reconstructed Events ", 100, -1000, 1000);
190  TH1D* h_beta0 = new TH1D("h_beta0", "; beta0; Reconstructed Events", 20, 0, 1);
191  TH1D* h_energy = new TH1D ("h_energy", " ; Energy [GeV]; Reconstructed Events ", 65, 0, 9);
192  setLogarithmicX(h_energy);
193  TH1D* h_zenith = new TH1D("h_zenith", "; cosZenith; Reconstructed Events", 20, -1, 1);
194  TH1D* h_azimuth = new TH1D("h_azimuth", "; cosAzimuth; Reconstructed Events", 20, -1, 1);
195  TH1D* h_radial_position = new TH1D ("h_radial_position", "; Radial Position [m]; Reconstructed Events", 60, 0, 4.2);
196  setLogarithmicX(h_radial_position);
197  TH1D* h_z_position = new TH1D ("h_z_position", "; Z Position [m] ; Reconstructed Events", 50, 0, 3.2);
198  setLogarithmicX(h_z_position);
199 
200  while (scanner.hasNext()) {
201 
202  JParallelFileScanner< JTypeList<JDAQEvent, JFIT::JEvt> >::multi_pointer_type ps = scanner.next();
203 
204  JEvt* evt = ps;
205  JDAQEvent* event = ps;
206 
207  if (!evt->empty()) {
208 
209  JEvt::iterator best = evt->begin();
210  h_energy -> Fill(best->getE());
211  h_likelihood -> Fill(best->getQ());
212  h_z_position -> Fill(best->getZ());
213  h_radial_position -> Fill(sqrt(best->getX()*best->getX() + best->getY()*best->getY()));
214 
215  JTrack3D track = getTrack(*best);
216  h_zenith -> Fill(cos(track.getDirection().getTheta()));
217  h_azimuth -> Fill(cos(track.getDirection().getPhi()));
218  h_beta0 -> Fill(best->getW(JGANDALF_BETA0_RAD));
219 
220  std::vector<JHitL0> dataL0;
221  const JBuildL0<JHitL0> buildL0;
222  buildL0(JDAQTimeslice(*event, false), router, back_inserter(dataL0));
223 
224  for (std::vector<JHitL0>::const_iterator hit = dataL0.begin(); hit != dataL0.end(); ++hit) {
225 
226  h_tres -> Fill(hit->getT() - track.getT(hit->getPosition()));
227  }
228  }
229  }
230 
231  f.mkdir("Reco");
232  f.cd("Reco");
233 
234  h_energy->Write();
235  h_likelihood -> Write();
236  h_z_position -> Write();
237  h_radial_position -> Write();
238  h_zenith -> Write();
239  h_azimuth -> Write();
240  h_beta0 -> Write();
241  h_tres -> Write();
242  }
virtual const multi_pointer_type & next() override
Get next element.
JTrack3E getTrack(const Trk &track)
Get track.
Template specialisation of L0 builder for JHitL0 data type.
Definition: JBuildL0.hh:102
o $QUALITY_ROOT d $DEBUG!JPlot1D f
Definition: JDataQuality.sh:66
General purpose class for parallel reading of objects from a single file or multiple files...
double getPhi() const
Get phi angle.
Definition: JVersor3D.hh:144
JVersor3D getDirection(const JVector3D &pos) const
Get photon direction of Cherenkov light on PMT.
Definition: JTrack3D.hh:147
JModuleRouter router
Definition: JRunAnalyzer.hh:35
Acoustic event fit.
void setLogarithmicX(TList *list)
Make x-axis of objects in list logarithmic (e.g. after using log10()).
double getTheta() const
Get theta angle.
Definition: JVersor3D.hh:128
Data time slice.
static const int JGANDALF_BETA0_RAD
KM3NeT Data Definitions v3.0.0 https://git.km3net.de/common/km3net-dataformat.
double getT(const JVector3D &pos) const
Get arrival time of Cherenkov light at given position.
Definition: JTrack3D.hh:126
void JRunAnalyzer::iterateSummarysliceTree ( JTreeScanner< JDAQSummaryslice > &  scanner)
inline

Definition at line 257 of file JRunAnalyzer.hh.

257  {
258 
259  using namespace std;
260  using namespace JPP;
261 
262  map<int, map<int, dom_type> > PMT_rate_quantiles;
263  map<int, map<int, JQuantile> > DOM_rate_quantiles;
264 
265  while (scanner.hasNext()){
266 
267  JDAQSummaryslice slice = *(scanner.next());
268 
269  for (JDAQSummaryslice::const_iterator frame = slice.begin() ; frame != slice.end() ; ++ frame) {
270 
271  if (router.hasModule(frame->getModuleID())) {
272 
273  const JModule& module = router.getModule (frame->getModuleID());
274 
275  int string = module.getString();
276  int floor = module.getFloor ();
277 
278  JDAQFrameStatus status = frame -> getDAQFrameStatus();
279  int nFIFOcount = status.countFIFOStatus();
280  int nHRVcount = status.countHighRateVeto();
281 
282  if (nHRVcount > 0) {
283  histograms.h_summary.h_hrv_per_dom->Fill(string , floor, nHRVcount);
284  }
285 
286  if (status.testDAQStatus() == false) {
287  histograms.h_summary.h_daq_status_per_dom->Fill(string , floor, (1./distance(scanner.begin(), scanner.end()))*100);
288  }
289 
290  histograms.h_summary.h_fifo_per_dom->Fill(string , floor , nFIFOcount);
291 
292  if(analysis_level == 1){
293 
294  TH2D* h2 = (*histograms.h_summary.m_summary_rate_distribution)[MAKE_STRING("Detector/DU" + to_string(string) + "/F" + to_string(floor))];
295 
296  double rate = 0;
297  const double factor = 1.0e-3; // [kHz]
298 
299  for (int i = 0 ; i < NUMBER_OF_PMTS ; i++){
300 
301  rate += frame->getRate(i, factor);
302 
303  h2->Fill(i , frame->getRate(i, factor));
304 
305  PMT_rate_quantiles[string][floor][i].put(frame->getRate(i, factor));
306 
307  histograms.h_summary.h_pmt_rate_distribution->Fill(frame->getRate(i, factor), frame->getWeight(i, factor));
308 
309  }
310 
312 
313  DOM_rate_quantiles[string][floor].put(rate);
314 
315  } else {
316 
317  double rate = 0;
318  const double factor = 1.0e-3; // [kHz]
319 
320  for (int i = 0 ; i < NUMBER_OF_PMTS ; i++){
321 
322  rate += frame->getRate(i, factor);
323 
324  histograms.h_summary.h_pmt_rate_distribution->Fill(frame->getRate(i, factor), frame->getWeight(i, factor));
325  }
326 
328 
329  DOM_rate_quantiles[string][floor].put(rate);
330 
331  }
332 
333  }else{
334  FATAL("JModuleRouter trying to access non existing identifier: "<< frame->getModuleID());
335  }
336  }
337  }
338 
339  for(auto& i : DOM_rate_quantiles){
340 
341  for (int j=1; j <= highest_floor; j++) {
342 
343  if (i.second[j].getCount() > 0) histograms.h_summary.h_rate_summary->Fill(i.first, j, i.second[j].getMean());
344  }
345  }
346 
347  if(analysis_level == 1){
348 
349  for(auto& i : PMT_rate_quantiles){
350 
351  for (int j = 1; j <= highest_floor; j++){
352 
353  for (int k=0 ; k < NUMBER_OF_PMTS ; k++){
354 
355  if (i.second[j][k].getCount() > 0){
356 
357  (*histograms.h_summary.m_mean_summary_rate) [MAKE_STRING("Detector/DU" + to_string(i.first))]->Fill(k, j, i.second[j][k].getMean());
358  (*histograms.h_summary.m_mean_summary_rate_distribution)[MAKE_STRING("Detector/DU" + to_string(i.first))]->Fill( i.second[j][k].getMean());
359  }
360  }
361  }
362  }
363  }
364  }
then fatal No hydrophone data file $HYDROPHONE_TXT fi sort gr k
int countFIFOStatus() const
Count FIFO status.
JManager< string, TH1D > * m_mean_summary_rate_distribution
int getFloor() const
Get floor number.
Definition: JLocation.hh:145
const JModule & getModule(const JObjectID &id) const
Get module parameters.
Data structure for a composite optical module.
Definition: JModule.hh:68
std::vector< T >::difference_type distance(typename std::vector< T >::const_iterator first, typename PhysicsEvent::const_iterator< T > second)
Specialisation of STL distance.
JRA_Histograms histograms
Definition: JRunAnalyzer.hh:37
then set_variable singlesRate set_variable doublesRate set_variable numberOfSlices echo Generating random background echo Singles rate
JManager< string, TH2D > * m_mean_summary_rate
TH1D * h_dom_rate_distribution
#define MAKE_STRING(A)
Make string.
Definition: JPrint.hh:127
JModuleRouter router
Definition: JRunAnalyzer.hh:35
TH1D * h_pmt_rate_distribution
#define FATAL(A)
Definition: JMessage.hh:67
SummaryHistograms h_summary
int getString() const
Get string number.
Definition: JLocation.hh:134
int countHighRateVeto() const
Count high-rate veto status.
JManager< string, TH2D > * m_summary_rate_distribution
std::string to_string(const T &value)
Convert value to string.
bool hasModule(const JObjectID &id) const
Has module.
int j
Definition: JPolint.hh:703
static const int NUMBER_OF_PMTS
Total number of PMTs in module.
Definition: JDAQ.hh:26
bool testDAQStatus() const
Test DAQ status of packets.
template<class T >
void JRunAnalyzer::iterateTimesliceTree ( JTreeScanner< T > &  scanner)
inline

Definition at line 372 of file JRunAnalyzer.hh.

372  {
373 
375 
376  std::map < int , std::map <int , JQuantile> > DOM_rate_quantiles;
377 
378  double inverseFrameTimeSec = 1. / (1.0e-9 * getFrameTime());
379 
380  while (scanner.hasNext()){
381 
382  T slice = *(scanner.next());
383 
384  for(auto & frame : slice) {
385  if (router.hasModule(frame.getModuleID())) {
386 
387  const JModule& module = router.getModule (frame.getModuleID());
388  double rate = frame.numberOfHits * inverseFrameTimeSec;
389  int string = module.getString();
390  int floor = module.getFloor ();
391 
392  DOM_rate_quantiles[string][floor].put(rate);
393 
394  vector <int> pmt_hit_count (NUMBER_OF_PMTS , 0) ;
395 
396  if(analysis_level == 1){
397 
398  TH2D* h2 = (*histograms.h_timeslice.m_pmt_tot_distributions[ts_type])[MAKE_STRING("Detector/DU" + to_string(string) + "/F" + to_string(floor) + "/" + to_string(frame.getModuleID()))];
399 
400  for (JDAQSuperFrame::const_iterator hit = frame.begin() ; hit != frame.end() ; ++hit){
401 
402  h2 -> Fill(hit->getPMT() , hit->getToT()) ;
403 
404  pmt_hit_count[hit->getPMT()]++;
405 
406  }
407 
408  for (int pmt = 0 ; pmt != NUMBER_OF_PMTS ; ++pmt) {
409 
410  (*histograms.h_timeslice.m_pmt_rate_distributions[ts_type])[MAKE_STRING("Detector/DU" + to_string(string) + "/F" + to_string(floor))] -> Fill(pmt , 1e-3 * pmt_hit_count[pmt] * inverseFrameTimeSec);
411 
412  }
413 
414  }
415 
416  }else{
417  FATAL("JModuleRouter trying to access non existing identifier: "<< frame.getModuleID());
418  }
419  }
420  }
421 
422  for (std::map< int , std::map<int,JQuantile>>::const_iterator i = DOM_rate_quantiles.begin() ; i != DOM_rate_quantiles.end() ; i++){
423 
424  for (std::map<int , JQuantile>::const_iterator j = i->second.begin() ; j != i->second.end() ; j++){
425 
426  if (j->second.getCount() > 0) histograms.h_timeslice.h_dom_mean_rates[ts_type] -> Fill (i->first , j->first , j->second.getMean() ) ;
427  }
428  }
429  }
vector< JManager< string, TH2D > * > m_pmt_tot_distributions
int getFloor() const
Get floor number.
Definition: JLocation.hh:145
const JModule & getModule(const JObjectID &id) const
Get module parameters.
Data structure for a composite optical module.
Definition: JModule.hh:68
vector< TH2D * > h_dom_mean_rates
JRA_Histograms histograms
Definition: JRunAnalyzer.hh:37
then set_variable singlesRate set_variable doublesRate set_variable numberOfSlices echo Generating random background echo Singles rate
#define MAKE_STRING(A)
Make string.
Definition: JPrint.hh:127
TimesliceHistograms h_timeslice
JModuleRouter router
Definition: JRunAnalyzer.hh:35
Hit data structure.
Definition: JDAQHit.hh:34
double getFrameTime()
Get frame time duration.
Definition: JDAQClock.hh:162
do set_variable OUTPUT_DIRECTORY $WORKDIR T
#define FATAL(A)
Definition: JMessage.hh:67
int getString() const
Get string number.
Definition: JLocation.hh:134
std::string to_string(const T &value)
Convert value to string.
vector< JManager< string, TH2D > * > m_pmt_rate_distributions
bool hasModule(const JObjectID &id) const
Has module.
int j
Definition: JPolint.hh:703
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 JRunAnalyzer::readSummaryData ( )
inline

Definition at line 436 of file JRunAnalyzer.hh.

436  {
437 
439  if (scanner.hasNext()) {
441  scanner.rewind();
442  iterateSummarysliceTree(scanner);
443  }
444  }
JRA_Histograms histograms
Definition: JRunAnalyzer.hh:37
void initialize_summary_histograms()
JSingleFileScanner inputFile
Definition: JRunAnalyzer.hh:34
void iterateSummarysliceTree(JTreeScanner< JDAQSummaryslice > &scanner)
Template definition for direct access of elements in ROOT TChain.
JLimit_t numberOfSummaryslices
Definition: JRunAnalyzer.hh:40
template<class T >
void JRunAnalyzer::readTimesliceData ( )
inline

Definition at line 452 of file JRunAnalyzer.hh.

452  {
453 
455  if(scanner.hasNext()) {
456 
458  scanner.rewind();
459  iterateTimesliceTree(scanner);
460  }
461  }
void iterateTimesliceTree(JTreeScanner< T > &scanner)
JRA_Histograms histograms
Definition: JRunAnalyzer.hh:37
JLimit_t numberOfTimeslices
Definition: JRunAnalyzer.hh:39
JSingleFileScanner inputFile
Definition: JRunAnalyzer.hh:34
do set_variable OUTPUT_DIRECTORY $WORKDIR T
void initialize_timeslice_histograms()
void JRunAnalyzer::readEvents ( )
inline

Definition at line 468 of file JRunAnalyzer.hh.

468  {
469 
471 
472  if(scanner.hasNext()) {
473 
475  scanner.rewind();
476  iterateEventTree(scanner);
477  }
478  }
JRA_Histograms histograms
Definition: JRunAnalyzer.hh:37
JSingleFileScanner inputFile
Definition: JRunAnalyzer.hh:34
Template definition for direct access of elements in ROOT TChain.
void iterateEventTree(JTreeScanner< JDAQEvent > &scanner)
Definition: JRunAnalyzer.hh:85
JLimit_t numberOfEvents
Definition: JRunAnalyzer.hh:41
void initialize_trigger_histograms()
void JRunAnalyzer::readRecoEvents ( )
inline

Definition at line 484 of file JRunAnalyzer.hh.

484  {
485 
487 
488  if(scanner.hasNext()) {
489 
490  scanner.rewind();
491  iterateRecoEventTree(scanner, *outputFile);
492  }
493  }
TFile * outputFile
Definition: JRunAnalyzer.hh:36
General purpose class for parallel reading of objects from a single file or multiple files...
JSingleFileScanner inputFile
Definition: JRunAnalyzer.hh:34
void iterateRecoEventTree(JParallelFileScanner< JTypeList< JDAQEvent, JFIT::JEvt > > &scanner, TFile &f)
JLimit_t numberOfEvents
Definition: JRunAnalyzer.hh:41
void JRunAnalyzer::writeToFile ( TFile *  f,
int  analysis_level 
)
inline

Definition at line 499 of file JRunAnalyzer.hh.

499  {
500 
501  f->mkdir("Detector");
502  f->cd("Detector");
503 
510 
512 
513  for (typename vector < JManager < string , TH2D >* >::const_iterator i = histograms.h_timeslice.m_pmt_tot_distributions.begin();
515 
516  if ((*i)){
517 
518  for (typename JManager < string , TH2D >::const_iterator j = (*i) -> begin() ; j != (*i) -> end() ; ++j){
519 
520  j->second->Scale(1., "width");
521  }
522  }
523  }
524 
527 
529 
532 
534 
537 
538  f->mkdir ( MAKE_STRING ("JDAQEvent").c_str());
539  f->cd ("JDAQEvent");
540 
557 
558  }
TH1D * h_pmt_distribution_snapshot_hits
TH2D * h_Snapshot_hits_per_module
TH1D * h_pmt_distribution_triggered_hits
vector< JManager< string, TH2D > * > m_pmt_tot_distributions
JManager< string, TH1D > * m_mean_summary_rate_distribution
vector< TH2D * > h_dom_mean_rates
JRA_Histograms histograms
Definition: JRunAnalyzer.hh:37
TH2D * h_Triggered_hits_per_module
o $QUALITY_ROOT d $DEBUG!JPlot1D f
Definition: JDataQuality.sh:66
JManager< string, TH2D > * m_mean_summary_rate
TH1D * h_dom_rate_distribution
#define MAKE_STRING(A)
Make string.
Definition: JPrint.hh:127
Auxiliary class to manage set of compatible ROOT objects (e.g. histograms) using unique keys...
Definition: JManager.hh:43
TimesliceHistograms h_timeslice
TH1D * h_tot_distribution_snapshot_hits
TriggerHistograms h_trigger
void Write_manager_table_in_key_dir(TFile &f, vector< JManager< T, V > * > table)
TH1D * h_pmt_rate_distribution
void Write_histogram_table_to_file(TFile &f, string dirname, vector< vector< T * > > table)
vector< JManager< string, TH1D > * > m_mean_ToT_distribution
SummaryHistograms h_summary
JManager< string, TH2D > * m_summary_rate_distribution
void Write_manager_in_key_dir(TFile &f, JManager< T, V > *manager)
vector< JManager< string, TH2D > * > m_mean_ToT
vector< JManager< string, TH2D > * > m_pmt_rate_distributions
TH1D * h_tot_distribution_triggered_hits
TH1D * h_Triggered_hits_3dmuon
int j
Definition: JPolint.hh:703
TH2D * h_Triggered_hits_3dmuon_per_module
JManager< string, TH2D > * m_Snapshot_hits_per_pmt
TH1D * h_Triggered_over_Snapshot_hits

Member Data Documentation

JSingleFileScanner JRunAnalyzer::inputFile
private

Definition at line 34 of file JRunAnalyzer.hh.

JModuleRouter JRunAnalyzer::router
private

Definition at line 35 of file JRunAnalyzer.hh.

TFile* JRunAnalyzer::outputFile
private

Definition at line 36 of file JRunAnalyzer.hh.

JRA_Histograms JRunAnalyzer::histograms
private

Definition at line 37 of file JRunAnalyzer.hh.

int JRunAnalyzer::highest_floor
private

Definition at line 38 of file JRunAnalyzer.hh.

JLimit_t JRunAnalyzer::numberOfTimeslices
private

Definition at line 39 of file JRunAnalyzer.hh.

JLimit_t JRunAnalyzer::numberOfSummaryslices
private

Definition at line 40 of file JRunAnalyzer.hh.

JLimit_t JRunAnalyzer::numberOfEvents
private

Definition at line 41 of file JRunAnalyzer.hh.

int JRunAnalyzer::analysis_level
private

Definition at line 42 of file JRunAnalyzer.hh.


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