ATLAS Offline Software
ZDCTreeAnalysis.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // This class has been automatically generated on
7 // Wed Dec 16 10:23:25 2015 by ROOT version 6.04/12
8 // from TTree zdcTree/ZDC Tree
9 // found on file: data15_hi.00287259.calibration_zdcCalib.recon.AOD.c931.root
11 
12 #ifndef ZDCTreeAnalysis_h
13 #define ZDCTreeAnalysis_h
14 
15 #include <TROOT.h>
16 #include <TChain.h>
17 #include <TFile.h>
18 #include <TH1.h>
19 #include <TF1.h>
20 #include <TSpline.h>
21 
22 // Header file for the classes stored in the TTree if any.
23 #include <vector>
24 #include <iostream>
25 #include <sstream>
26 
27 #include "ZDCDataAnalyzer.h"
28 
30 public :
31  TTree *fChain;
32  Int_t fCurrent;
33 
34  TFile* _outTFile;
35  TTree* _outTree;
36  bool _doOutput;
37 
38 // Fixed size dimensions of array or collections stored in the TTree if any.
39 
40  // Declaration of leaf types
41  UInt_t runNumber;
42  UInt_t eventNumber;
43  UInt_t lumiBlock;
44  UInt_t bcid;
45  ULong64_t trigger;
46  UInt_t trigger_TBP;
47  UInt_t tbp[16];
48  UInt_t tav[16];
49 
50  UInt_t passBits;
51  UShort_t zdc_raw[2][4][2][2][7];
52 
53  Float_t fcalEt;
54  Int_t ntrk;
55  Int_t nvx;
56  Float_t vx[3];
57  Int_t vxntrk;
58  Float_t vxcov[6];
59  UShort_t mbts_countA;
60  UShort_t mbts_countC;
61  Float_t mbts_timeA;
62  Float_t mbts_timeC;
63  Float_t mbts_timeDiff;
64 
65  Bool_t L1_ZDC_A;
66  Float_t ps_L1_ZDC_A;
67  Bool_t L1_ZDC_C;
68  Float_t ps_L1_ZDC_C;
69  Bool_t L1_ZDC_AND;
70  Float_t ps_L1_ZDC_AND;
71  Bool_t L1_ZDC_A_C;
72  Float_t ps_L1_ZDC_A_C;
73 
74  // Data for branches that are to be added to the tree
75  //
76  int bcidGap;
78 
79  // Data obtained from the analysis
80  //
81  // Summary data
82  //
84  float zdc_SumAmp[2];
85  float zdc_SumCalibAmp[2];
86  float zdc_AvgTime[2];
87  bool zdc_sideFailed[2];
88 
89  // Per-module data
90  //
91  std::vector<float>* zdc_samplesSub;
92  std::vector<float>* zdc_samplesDeriv;
93  std::vector<float>* zdc_samplesDeriv2nd;
94 
95  float zdc_Presample[2][4];
96 
97  float zdc_MaxADC[2][4];
98  int zdc_MaxADCSample[2][4];
99 
100  float zdc_MinADC[2][4];
101  int zdc_MinADCSample[2][4];
102 
103  float zdc_Min2ndDeriv[2][4];
105 
106  int zdc_Status[2][4];
107  float zdc_Amp[2][4];
108  float zdc_FitT0[2][4];
109  float zdc_FitChisq[2][4];
110  float zdc_T0Corr[2][4];
111 
112  float zdc_CalibAmp[2][4];
113  float zdc_CalibTime[2][4];
114 
115  // The object responsible for the actual analysis
116  //
118 
119 private:
120  // Critical construction parameters
121  //
122  int _nSample;
125  std::string _fitFunction;
126 
129 
130  // Cut quantities
131  //
132  float _HGOverFlowADC[2][4];
133  float _HGUnderFlowADC[2][4];
134  float _DeltaT0CutLow[2][4];
135  float _DeltaT0CutHigh[2][4];
136  float _chisqDivAmpCutHG[2][4];
137  float _chisqDivAmpCutLG[2][4];
138 
139  // Per-module calibration factors
140  //
141  // Time-dependent
142  //
143  bool _haveLBDepT0[2][4];
144  TSpline* _moduleT0HGLB[2][4];
145  TSpline* _moduleT0LGLB[2][4];
146 
148  float _modECalib[2][4];
149 
150  bool _haveLBDepECalib[2][4];
151  TSpline* _modECalibLB[2][4];
152 
153  // Allow per-module Tau1, tau2 settings
154  //
156  bool _fixTau1[2][4];
157  bool _fixTau2[2][4];
158  float _moduleTau1[2][4];
159  float _moduleTau2[2][4];
160  float _moduleT0LG[2][4];
161  float _moduleT0HG[2][4];
162 
163  std::array<std::array<float, 4>, 2> _moduleHGGains;
164 
165  // Time slewing corrections
166  //
167  float _T0SlewCoeffHG[2][4][3];
168  float _T0SlewCoeffLG[2][4][3];
169 
170  // Bunch information
171  //
172  std::vector<std::set<int> > _trains;
173  std::vector<int> _BCIDGap;
174  std::vector<int> _BCIDPosInTrain;
175 
176  // Which entry we're reading
177  //
178  bool _inLoop;
180  unsigned int _runNumber;
181 
182 private:
183  // List of branches
184  TBranch *b_runNumber;
185  TBranch *b_eventNumber;
186  TBranch *b_lumiBlock;
187  TBranch *b_bcid;
188  TBranch *b_trigger;
189  TBranch *b_trigger_TBP;
190  TBranch *b_tbp;
191  TBranch *b_tav;
192  TBranch *b_decisions;
193  TBranch *b_prescales;
194  TBranch *b_passBits;
195 
196  TBranch *b_zdc_raw;
197  // TBranch *b_fcalEt; //!
198  // TBranch *b_ntrk; //!
199  // TBranch *b_nvx; //!
200  // TBranch *b_vx; //!
201  // TBranch *b_vxntrk; //!
202  // TBranch *b_vxcov; //!
203  // TBranch *b_mbts_countA; //!
204  // TBranch *b_mbts_countC; //!
205  // TBranch *b_mbts_timeA; //!
206  // TBranch *b_mbts_timeC; //!
207  // TBranch *b_mbts_timeDiff; //!
208 
209  TBranch *b_L1_ZDC_A;
210  TBranch *b_ps_L1_ZDC_A;
211  TBranch *b_L1_ZDC_C;
212  TBranch *b_ps_L1_ZDC_C;
213  TBranch *b_L1_ZDC_AND;
214  TBranch *b_ps_L1_ZDC_AND;
215  TBranch *b_L1_ZDC_A_C;
216  TBranch *b_ps_L1_ZDC_A_C;
217 
218  void InitInternal();
220 
221 public:
222 
223  ZDCTreeAnalysis(std::string filename, int nSample = 7, double deltaT = 12.5, int preSamplIdx = 1, std::string fitFunction = "FermiExp");
224 
226  const ZDCDataAnalyzer::ZDCModuleFloatArray& HGUnderFlowADC,
227  const ZDCDataAnalyzer::ZDCModuleFloatArray& LGOverFlowADC)
228  {
229  _dataAnalyzer_p->SetADCOverUnderflowValues(HGOverFlowADC, HGUnderFlowADC, LGOverFlowADC);
230  }
231 
232  void SetCutValues(const ZDCDataAnalyzer::ZDCModuleFloatArray& chisqDivAmpCutHG,
233  const ZDCDataAnalyzer::ZDCModuleFloatArray& chisqDivAmpCutLG,
234  const ZDCDataAnalyzer::ZDCModuleFloatArray& DeltaT0CutLowHG,
235  const ZDCDataAnalyzer::ZDCModuleFloatArray& DeltaT0CutHighHG,
236  const ZDCDataAnalyzer::ZDCModuleFloatArray& DeltaT0CutLowLG,
237  const ZDCDataAnalyzer::ZDCModuleFloatArray& DeltaT0CutHighLG)
238 
239  {
240  _dataAnalyzer_p->SetCutValues(chisqDivAmpCutHG, chisqDivAmpCutLG,
241  DeltaT0CutLowHG, DeltaT0CutHighHG,
242  DeltaT0CutLowLG, DeltaT0CutHighLG);
243  }
244 
246  const ZDCDataAnalyzer::ZDCModuleBoolArray& fixTau2,
251  {
252  _dataAnalyzer_p->SetTauT0Values(fixTau1, fixTau2, tau1, tau2, t0HG, t0LG);
253  }
254 
255 
256  void SetDebugLevel(int debugLevel = 0)
257  {
258  _dataAnalyzer_p->SetDebugLevel(debugLevel);
259  }
260 
261  void LoadEnergyCalibrations(const std::array<std::array<TSpline*, 4>, 2>& calibSplines)
262  {
264  }
265 
266  void LoadT0Calibrations(const std::array<std::array<TSpline*, 4>, 2>& calibSplinesHG,
267  const std::array<std::array<TSpline*, 4>, 2>& calibSplinesLG)
268  {
269  _dataAnalyzer_p->LoadtT0Calibrations(calibSplinesHG, calibSplinesLG);
270  }
271 
272  void SetLBDepT0(int iside, int imod, TSpline* t0SplineLG, TSpline* t0SplineHG);
273 
274  void SetSlewingCoeff(const std::array<std::array<std::vector<float>, 4>, 2>& HGParamArr,
275  const std::array<std::array<std::vector<float>, 4>, 2>& LGParamArr)
276  {
277  _dataAnalyzer_p->SetTimingCorrParams(HGParamArr, LGParamArr);
278  }
279 
280  void OpenOutputTree(const std::string & file);
282 
283  void PlotFits(const std::string & canvasSavePath = "");
284 
285  virtual ~ZDCTreeAnalysis();
286  virtual Int_t Cut(Long64_t entry);
287  virtual Int_t GetEntry(Long64_t entry);
288  virtual Long64_t LoadTree(Long64_t entry);
289  virtual void Init(TTree *tree);
290  virtual void Loop(int numEntries = -1, int startEntry = 0);
291  virtual Bool_t Notify();
292  virtual void Show(Long64_t entry = -1);
293 
294  void LoadEntry(int entry)
295  {
296  GetEntry(entry);
297  DoAnalysis();
298  }
299 
301  {
302  GetEntry(_currentEntry + 1);
303  DoAnalysis();
304  }
305 
306  unsigned int GetRunNumber() const {return _runNumber;}
307 
308  void DoAnalysis();
309 };
310 
311 
312 #endif
313 
314 #ifdef ZDCTreeAnalysis_cxx
315 
316 ZDCTreeAnalysis::ZDCTreeAnalysis(const std::string & filename, int nSample, double deltaT, int preSamplIdx, const std::string & fitFunction) :
317  fChain(0), _outTFile(0), _outTree(0),
318  _nSample(nSample), _deltaTSample(deltaT), _preSampleIdx(preSamplIdx),
319  _doOutput(false), _currentEntry(-1), _inLoop(false),
320  _haveCalibrations(false)
321 {
322 
323  // Open the fiel, extract and initialize the tree
324  //
325  TTree* tree;
326  TFile* f = new TFile(filename.c_str());
327  f->GetObject("zdcTree",tree);
328  Init(tree);
329 
330  // Capture the run number
331  //
332  GetEntry(1);
334 
335  InitInternal();
336 
337  // Figure out the bunch spacing
338  //
340 
341  // Set the HV gains
342  //
343  _moduleHGGains = {9.51122, 9.51980, 9.51122, 9.51122,
344  9.51415, 9.5049, 9.51659, 9.51415};
345 
346  _peak2ndDerivMinSamples = {3, 3, 3, 2,
347  2, 2, 2, 2};
348 
349  _peak2ndDerivMinThresholds = {-7, -7, -7, -7,
350  -7, -7, -7, -7};
351 
354 
355 /* 81Undelayed */
356 /* 81H1: 9.5049 */
357 /* 81H2: 9.51659 */
358 /* 81H3: 9.50119 */
359 /* 81EM: 9.51415 */
360 /* 81Delayed */
361 /* 81H1: 9.52632 */
362 /* 81H2: 9.49662 */
363 /* 81H3: 9.50853 */
364 /* 81EM: 9.50842 */
365 /* 12Undelayed */
366 /* 12H1: 9.5198 */
367 /* 12H2: 9.51122 */
368 /* 12H3: 9.51122 */
369 /* 12EM: 9.51122 */
370 /* 12Delayed */
371 /* 12H1: 9.51237 */
372 /* 12H2: 9.50178 */
373 /* 12H3: 9.50178 */
374 /* 12EM: 9.50178 */
375 }
376 
378 {
379  if (!fChain) return;
380  delete fChain->GetCurrentFile();
381 }
382 
383 Int_t ZDCTreeAnalysis::GetEntry(Long64_t entry)
384 {
385 // Read contents of entry.
386  if (!fChain) return 0;
387  int result = fChain->GetEntry(entry);
388  if (result > 0) _currentEntry = entry;
389  return result;
390 }
391 Long64_t ZDCTreeAnalysis::LoadTree(Long64_t entry)
392 {
393 // Set the environment to read one entry
394  if (!fChain) return -5;
395  Long64_t centry = fChain->LoadTree(entry);
396  if (centry < 0) return centry;
397  if (fChain->GetTreeNumber() != fCurrent) {
398  fCurrent = fChain->GetTreeNumber();
399  Notify();
400  }
401  return centry;
402 }
403 
404 void ZDCTreeAnalysis::Init(TTree *tree)
405 {
406  // The Init() function is called when the selector needs to initialize
407  // a new tree or chain. Typically here the branch addresses and branch
408  // pointers of the tree will be set.
409  // It is normally not necessary to make changes to the generated
410  // code, but the routine can be extended by the user if needed.
411  // Init() will be called many times when running on PROOF
412  // (once per file to be processed).
413 
414  // Set object pointer
415  // decisions = 0;
416  // prescales = 0;
417  // Set branch addresses and branch pointers
418  if (!tree) return;
419  fChain = tree;
420  fCurrent = -1;
421  // fChain->SetMakeClass(1);
422 
423  fChain->SetBranchAddress("runNumber", &runNumber, &b_runNumber);
424  fChain->SetBranchAddress("eventNumber", &eventNumber, &b_eventNumber);
425  fChain->SetBranchAddress("lumiBlock", &lumiBlock, &b_lumiBlock);
426  fChain->SetBranchAddress("bcid", &bcid, &b_bcid);
427  // fChain->SetBranchAddress("trigger", &trigger, &b_trigger);
428  // fChain->SetBranchAddress("trigger_TBP", &trigger_TBP, &b_trigger_TBP);
429  fChain->SetBranchAddress("tbp", tbp, &b_tbp);
430 
431  // fChain->SetBranchAddress("tav", tav, &b_tav);
432  // // fChain->SetBranchAddress("decisions", &decisions, &b_decisions);
433  // // fChain->SetBranchAddress("prescales", &prescales, &b_prescales);
434  fChain->SetBranchAddress("passBits", &passBits, &b_passBits);
435 
436  // fChain->SetBranchAddress("zdc_amp", zdc_amp, &b_zdc_amp);
437  // fChain->SetBranchAddress("zdc_amp_rp", zdc_amp_rp, &b_zdc_amp_rp);
438  // fChain->SetBranchAddress("zdc_time", zdc_time, &b_zdc_time);
439  fChain->SetBranchAddress("zdc_raw", zdc_raw, &b_zdc_raw);
440  // fChain->SetBranchAddress("zdc_ampHG", zdc_ampHG, &b_zdc_ampHG);
441  // fChain->SetBranchAddress("zdc_ampLG", zdc_ampLG, &b_zdc_ampLG);
442  // fChain->SetBranchAddress("zdc_sumHG", zdc_sumHG, &b_zdc_sumHG);
443  // fChain->SetBranchAddress("zdc_sumLG", zdc_sumLG, &b_zdc_sumLG);
444  // fChain->SetBranchAddress("zdc_ampHG_rp", zdc_ampHG_rp, &b_zdc_ampHG_rp);
445  // fChain->SetBranchAddress("zdc_ampLG_rp", zdc_ampLG_rp, &b_zdc_ampLG_rp);
446  // fChain->SetBranchAddress("zdc_sumHG_rp", zdc_sumHG_rp, &b_zdc_sumHG_rp);
447  // fChain->SetBranchAddress("zdc_sumLG_rp", zdc_sumLG_rp, &b_zdc_sumLG_rp);
448  // fChain->SetBranchAddress("fcalEt", &fcalEt, &b_fcalEt);
449  // fChain->SetBranchAddress("ntrk", &ntrk, &b_ntrk);
450  // fChain->SetBranchAddress("nvx", &nvx, &b_nvx);
451  // fChain->SetBranchAddress("vx", vx, &b_vx);
452  // fChain->SetBranchAddress("vxntrk", &vxntrk, &b_vxntrk);
453  // fChain->SetBranchAddress("vxcov", vxcov, &b_vxcov);
454  // fChain->SetBranchAddress("mbts_countA", &mbts_countA, &b_mbts_countA);
455  // fChain->SetBranchAddress("mbts_countC", &mbts_countC, &b_mbts_countC);
456  // fChain->SetBranchAddress("mbts_timeA", &mbts_timeA, &b_mbts_timeA);
457  // fChain->SetBranchAddress("mbts_timeC", &mbts_timeC, &b_mbts_timeC);
458  // fChain->SetBranchAddress("mbts_timeDiff", &mbts_timeDiff, &b_mbts_timeDiff);
459 
460  fChain->SetBranchAddress("L1_ZDC_A", &L1_ZDC_A, &b_L1_ZDC_A);
461  // fChain->SetBranchAddress("ps_L1_ZDC_A", &ps_L1_ZDC_A, &b_ps_L1_ZDC_A);
462  fChain->SetBranchAddress("L1_ZDC_C", &L1_ZDC_C, &b_L1_ZDC_C);
463  // fChain->SetBranchAddress("ps_L1_ZDC_C", &ps_L1_ZDC_C, &b_ps_L1_ZDC_C);
464  fChain->SetBranchAddress("L1_ZDC_AND", &L1_ZDC_AND, &b_L1_ZDC_AND);
465  // fChain->SetBranchAddress("ps_L1_ZDC_AND", &ps_L1_ZDC_AND, &b_ps_L1_ZDC_AND);
466  fChain->SetBranchAddress("L1_ZDC_A_C", &L1_ZDC_A_C, &b_L1_ZDC_A_C);
467  // fChain->SetBranchAddress("ps_L1_ZDC_A_C", &ps_L1_ZDC_A_C, &b_ps_L1_ZDC_A_C);
468 
469  fChain->SetBranchStatus("*", 0);
470  fChain->SetBranchStatus("runNumber", 1);
471  fChain->SetBranchStatus("eventNumber", 1);
472  fChain->SetBranchStatus("lumiBlock", 1);
473  fChain->SetBranchStatus("bcid", 1);
474  fChain->SetBranchStatus("zdc_raw", 1);
475  fChain->SetBranchStatus("tbp", 1);
476 
477  fChain->SetBranchStatus("passBits", 1);
478 
479  fChain->SetBranchStatus("L1_ZDC_A", 1);
480  fChain->SetBranchStatus("L1_ZDC_C", 1);
481  fChain->SetBranchStatus("L1_ZDC_AND", 1);
482  fChain->SetBranchStatus("L1_ZDC_A_C", 1);
483 
484  Notify();
485 }
486 
488 {
489  // The Notify() function is called when a new file is opened. This
490  // can be either for a new TTree in a TChain or when when a new TTree
491  // is started when using PROOF. It is normally not necessary to make changes
492  // to the generated code, but the routine can be extended by the
493  // user if needed. The return value is currently not used.
494 
495  return kTRUE;
496 }
497 
498 void ZDCTreeAnalysis::Show(Long64_t entry)
499 {
500 // Print contents of entry.
501 // If entry is not specified, print current entry
502  if (!fChain) return;
503  fChain->Show(entry);
504 }
505 Int_t ZDCTreeAnalysis::Cut(Long64_t entry)
506 {
507 // This function may be called from Loop.
508 // returns 1 if entry is accepted.
509 // returns -1 otherwise.
510  return 1;
511 }
512 #endif // #ifdef ZDCTreeAnalysis_cxx
ZDCTreeAnalysis::zdc_MinADCSample
int zdc_MinADCSample[2][4]
Definition: ZDCTreeAnalysis.h:101
ZDCTreeAnalysis::zdc_Min2ndDeriv
float zdc_Min2ndDeriv[2][4]
Definition: ZDCTreeAnalysis.h:103
ZDCTreeAnalysis::L1_ZDC_AND
Bool_t L1_ZDC_AND
Definition: ZDCTreeAnalysis.h:69
ZDCTreeAnalysis::runNumber
UInt_t runNumber
Definition: ZDCTreeAnalysis.h:41
ZDCTreeAnalysis::zdc_Amp
float zdc_Amp[2][4]
Definition: ZDCTreeAnalysis.h:107
ZDCTreeAnalysis::zdc_sideFailed
bool zdc_sideFailed[2]
Definition: ZDCTreeAnalysis.h:87
ZDCTreeAnalysis::_haveLBDepT0
bool _haveLBDepT0[2][4]
Definition: ZDCTreeAnalysis.h:143
python.CaloRecoConfig.f
f
Definition: CaloRecoConfig.py:127
ZDCTreeAnalysis::_dataAnalyzer_p
ZDCDataAnalyzer * _dataAnalyzer_p
Definition: ZDCTreeAnalysis.h:117
ZDCTreeAnalysis::_modECalibLB
TSpline * _modECalibLB[2][4]
Definition: ZDCTreeAnalysis.h:151
ZDCTreeAnalysis::b_passBits
TBranch * b_passBits
Definition: ZDCTreeAnalysis.h:194
ZDCTreeAnalysis::Cut
virtual Int_t Cut(Long64_t entry)
ZDCTreeAnalysis::eventNumber
UInt_t eventNumber
Definition: ZDCTreeAnalysis.h:42
get_generator_info.result
result
Definition: get_generator_info.py:21
ZDCTreeAnalysis::_haveCalibrations
bool _haveCalibrations
Definition: ZDCTreeAnalysis.h:147
ZDCTreeAnalysis::b_zdc_raw
TBranch * b_zdc_raw
Definition: ZDCTreeAnalysis.h:196
ZDCTreeAnalysis::_BCIDGap
std::vector< int > _BCIDGap
Definition: ZDCTreeAnalysis.h:173
ZDCTreeAnalysis::_chisqDivAmpCutLG
float _chisqDivAmpCutLG[2][4]
Definition: ZDCTreeAnalysis.h:137
ZDCTreeAnalysis::L1_ZDC_A
Bool_t L1_ZDC_A
Definition: ZDCTreeAnalysis.h:65
ZDCTreeAnalysis::Show
virtual void Show(Long64_t entry=-1)
ZDCTreeAnalysis::SetDebugLevel
void SetDebugLevel(int debugLevel=0)
Definition: ZDCTreeAnalysis.h:256
ZDCTreeAnalysis::GetEntry
virtual Int_t GetEntry(Long64_t entry)
ZDCTreeAnalysis::LoadEnergyCalibrations
void LoadEnergyCalibrations(const std::array< std::array< TSpline *, 4 >, 2 > &calibSplines)
Definition: ZDCTreeAnalysis.h:261
ZDCTreeAnalysis::_moduleT0LG
float _moduleT0LG[2][4]
Definition: ZDCTreeAnalysis.h:160
ZDCTreeAnalysis::bcidPosInTrain
int bcidPosInTrain
Definition: ZDCTreeAnalysis.h:77
ZDCTreeAnalysis::zdc_samplesSub
std::vector< float > * zdc_samplesSub
Definition: ZDCTreeAnalysis.h:91
ZDCTreeAnalysis::LoadTree
virtual Long64_t LoadTree(Long64_t entry)
ZDCTreeAnalysis::SetCutValues
void SetCutValues(const ZDCDataAnalyzer::ZDCModuleFloatArray &chisqDivAmpCutHG, const ZDCDataAnalyzer::ZDCModuleFloatArray &chisqDivAmpCutLG, const ZDCDataAnalyzer::ZDCModuleFloatArray &DeltaT0CutLowHG, const ZDCDataAnalyzer::ZDCModuleFloatArray &DeltaT0CutHighHG, const ZDCDataAnalyzer::ZDCModuleFloatArray &DeltaT0CutLowLG, const ZDCDataAnalyzer::ZDCModuleFloatArray &DeltaT0CutHighLG)
Definition: ZDCTreeAnalysis.h:232
ZDCDataAnalyzer::ZDCModuleFloatArray
std::array< std::array< float, 4 >, 2 > ZDCModuleFloatArray
Definition: ZDCDataAnalyzer.h:22
ZDCTreeAnalysis::b_bcid
TBranch * b_bcid
Definition: ZDCTreeAnalysis.h:187
ZDCTreeAnalysis::~ZDCTreeAnalysis
virtual ~ZDCTreeAnalysis()
ZDCTreeAnalysis::b_L1_ZDC_A_C
TBranch * b_L1_ZDC_A_C
Definition: ZDCTreeAnalysis.h:215
ZDCTreeAnalysis::b_tbp
TBranch * b_tbp
Definition: ZDCTreeAnalysis.h:190
ZDCTreeAnalysis::_DeltaT0CutHigh
float _DeltaT0CutHigh[2][4]
Definition: ZDCTreeAnalysis.h:135
tree
TChain * tree
Definition: tile_monitor.h:30
ZDCTreeAnalysis::_T0SlewCoeffLG
float _T0SlewCoeffLG[2][4][3]
Definition: ZDCTreeAnalysis.h:168
ZDCTreeAnalysis::zdc_CalibAmp
float zdc_CalibAmp[2][4]
Definition: ZDCTreeAnalysis.h:112
ZDCTreeAnalysis::zdc_SumCalibAmp
float zdc_SumCalibAmp[2]
Definition: ZDCTreeAnalysis.h:85
ZDCTreeAnalysis::zdc_FitChisq
float zdc_FitChisq[2][4]
Definition: ZDCTreeAnalysis.h:109
ZDCTreeAnalysis::zdc_AvgTime
float zdc_AvgTime[2]
Definition: ZDCTreeAnalysis.h:86
ZDCTreeAnalysis::zdc_Presample
float zdc_Presample[2][4]
Definition: ZDCTreeAnalysis.h:95
ZDCTreeAnalysis::Notify
virtual Bool_t Notify()
ZDCTreeAnalysis::bcidGap
int bcidGap
Definition: ZDCTreeAnalysis.h:76
ZDCTreeAnalysis::_haveModuleSettings
bool _haveModuleSettings[2][4]
Definition: ZDCTreeAnalysis.h:155
ZDCTreeAnalysis::OpenOutputTree
void OpenOutputTree(const std::string &file)
ZDCTreeAnalysis::_moduleTau1
float _moduleTau1[2][4]
Definition: ZDCTreeAnalysis.h:158
ZDCTreeAnalysis::b_L1_ZDC_C
TBranch * b_L1_ZDC_C
Definition: ZDCTreeAnalysis.h:211
ZDCTreeAnalysis::zdc_SumAmp
float zdc_SumAmp[2]
Definition: ZDCTreeAnalysis.h:84
ZDCTreeAnalysis::ps_L1_ZDC_A
Float_t ps_L1_ZDC_A
Definition: ZDCTreeAnalysis.h:66
ZDCTreeAnalysis::b_L1_ZDC_A
TBranch * b_L1_ZDC_A
Definition: ZDCTreeAnalysis.h:209
ZDCTreeAnalysis::_runNumber
unsigned int _runNumber
Definition: ZDCTreeAnalysis.h:180
ZDCDataAnalyzer::LoadEnergyCalibrations
void LoadEnergyCalibrations(std::array< std::array< std::unique_ptr< TSpline >, 4 >, 2 > &calibSplines)
Definition: ZDCDataAnalyzer.h:182
ZDCTreeAnalysis::zdc_MinADC
float zdc_MinADC[2][4]
Definition: ZDCTreeAnalysis.h:100
ZDCTreeAnalysis::fcalEt
Float_t fcalEt
Definition: ZDCTreeAnalysis.h:53
ZDCTreeAnalysis::zdc_Status
int zdc_Status[2][4]
Definition: ZDCTreeAnalysis.h:106
ZDCTreeAnalysis::passBits
UInt_t passBits
Definition: ZDCTreeAnalysis.h:50
ZDCTreeAnalysis::b_ps_L1_ZDC_AND
TBranch * b_ps_L1_ZDC_AND
Definition: ZDCTreeAnalysis.h:214
ZDCDataAnalyzer::SetCutValues
void SetCutValues(const ZDCModuleFloatArray &chisqDivAmpCutHG, const ZDCModuleFloatArray &chisqDivAmpCutLG, const ZDCModuleFloatArray &deltaT0MinHG, const ZDCModuleFloatArray &deltaT0MaxHG, const ZDCModuleFloatArray &deltaT0MinLG, const ZDCModuleFloatArray &deltaT0MaxLG)
Definition: ZDCDataAnalyzer.cxx:291
ZDCTreeAnalysis::_chisqDivAmpCutHG
float _chisqDivAmpCutHG[2][4]
Definition: ZDCTreeAnalysis.h:136
ZDCTreeAnalysis::mbts_countC
UShort_t mbts_countC
Definition: ZDCTreeAnalysis.h:60
ZDCTreeAnalysis::zdc_FitT0
float zdc_FitT0[2][4]
Definition: ZDCTreeAnalysis.h:108
ZDCTreeAnalysis::GetRunNumber
unsigned int GetRunNumber() const
Definition: ZDCTreeAnalysis.h:306
ZDCDataAnalyzer
Definition: ZDCDataAnalyzer.h:20
ZDCTreeAnalysis::_trains
std::vector< std::set< int > > _trains
Definition: ZDCTreeAnalysis.h:172
ZDCTreeAnalysis::vx
Float_t vx[3]
Definition: ZDCTreeAnalysis.h:56
ZDCDataAnalyzer.h
ZDCTreeAnalysis::_outTree
TTree * _outTree
Definition: ZDCTreeAnalysis.h:35
ZDCTreeAnalysis::mbts_timeC
Float_t mbts_timeC
Definition: ZDCTreeAnalysis.h:62
ZDCTreeAnalysis::b_prescales
TBranch * b_prescales
Definition: ZDCTreeAnalysis.h:193
ZDCTreeAnalysis::_HGUnderFlowADC
float _HGUnderFlowADC[2][4]
Definition: ZDCTreeAnalysis.h:133
ZDCTreeAnalysis::_T0SlewCoeffHG
float _T0SlewCoeffHG[2][4][3]
Definition: ZDCTreeAnalysis.h:167
ZDCTreeAnalysis::ZDCTreeAnalysis
ZDCTreeAnalysis(std::string filename, int nSample=7, double deltaT=12.5, int preSamplIdx=1, std::string fitFunction="FermiExp")
ZDCTreeAnalysis::LoadT0Calibrations
void LoadT0Calibrations(const std::array< std::array< TSpline *, 4 >, 2 > &calibSplinesHG, const std::array< std::array< TSpline *, 4 >, 2 > &calibSplinesLG)
Definition: ZDCTreeAnalysis.h:266
ZDCTreeAnalysis::bcid
UInt_t bcid
Definition: ZDCTreeAnalysis.h:44
ZDCTreeAnalysis::b_runNumber
TBranch * b_runNumber
Definition: ZDCTreeAnalysis.h:184
ZDCTreeAnalysis::Loop
virtual void Loop(int numEntries=-1, int startEntry=0)
ZDCTreeAnalysis::zdc_samplesDeriv2nd
std::vector< float > * zdc_samplesDeriv2nd
Definition: ZDCTreeAnalysis.h:93
ZDCTreeAnalysis::tav
UInt_t tav[16]
Definition: ZDCTreeAnalysis.h:48
ZDCTreeAnalysis::fCurrent
Int_t fCurrent
pointer to the analyzed TTree or TChain
Definition: ZDCTreeAnalysis.h:32
ZDCTreeAnalysis::_moduleT0HG
float _moduleT0HG[2][4]
Definition: ZDCTreeAnalysis.h:161
ZDCTreeAnalysis::ntrk
Int_t ntrk
Definition: ZDCTreeAnalysis.h:54
ZDCTreeAnalysis::InitInternal
void InitInternal()
ZDCTreeAnalysis::trigger
ULong64_t trigger
Definition: ZDCTreeAnalysis.h:45
ZDCDataAnalyzer::SetADCOverUnderflowValues
void SetADCOverUnderflowValues(const ZDCModuleFloatArray &HGOverflowADC, const ZDCModuleFloatArray &HGUnderflowADC, const ZDCModuleFloatArray &LGOverflowADC)
Definition: ZDCDataAnalyzer.cxx:281
ZDCTreeAnalysis::mbts_timeA
Float_t mbts_timeA
Definition: ZDCTreeAnalysis.h:61
file
TFile * file
Definition: tile_monitor.h:29
ZDCTreeAnalysis::SetLBDepT0
void SetLBDepT0(int iside, int imod, TSpline *t0SplineLG, TSpline *t0SplineHG)
ZDCTreeAnalysis
Definition: ZDCTreeAnalysis.h:29
ZDCTreeAnalysis::_fixTau1
bool _fixTau1[2][4]
Definition: ZDCTreeAnalysis.h:156
ZDCTreeAnalysis::_nSample
int _nSample
Definition: ZDCTreeAnalysis.h:122
ZDCTreeAnalysis::b_lumiBlock
TBranch * b_lumiBlock
Definition: ZDCTreeAnalysis.h:186
ZDCTreeAnalysis::zdc_MaxADC
float zdc_MaxADC[2][4]
Definition: ZDCTreeAnalysis.h:97
ZDCTreeAnalysis::_fixTau2
bool _fixTau2[2][4]
Definition: ZDCTreeAnalysis.h:157
DQHistogramMerge.debugLevel
debugLevel
Definition: DQHistogramMerge.py:40
ZDCTreeAnalysis::_peak2ndDerivMinSamples
ZDCDataAnalyzer::ZDCModuleFloatArray _peak2ndDerivMinSamples
Definition: ZDCTreeAnalysis.h:127
ZDCDataAnalyzer::SetTauT0Values
void SetTauT0Values(const ZDCModuleBoolArray &fxiTau1, const ZDCModuleBoolArray &fxiTau2, const ZDCModuleFloatArray &tau1, const ZDCModuleFloatArray &tau2, const ZDCModuleFloatArray &t0HG, const ZDCModuleFloatArray &t0LG)
Definition: ZDCDataAnalyzer.cxx:231
ZDCTreeAnalysis::_fitFunction
std::string _fitFunction
Definition: ZDCTreeAnalysis.h:125
ZDCTreeAnalysis::b_trigger
TBranch * b_trigger
Definition: ZDCTreeAnalysis.h:188
ZDCTreeAnalysis::SetTauT0Values
void SetTauT0Values(const ZDCDataAnalyzer::ZDCModuleBoolArray &fixTau1, const ZDCDataAnalyzer::ZDCModuleBoolArray &fixTau2, const ZDCDataAnalyzer::ZDCModuleFloatArray &tau1, const ZDCDataAnalyzer::ZDCModuleFloatArray &tau2, const ZDCDataAnalyzer::ZDCModuleFloatArray &t0HG, const ZDCDataAnalyzer::ZDCModuleFloatArray &t0LG)
Definition: ZDCTreeAnalysis.h:245
ZDCTreeAnalysis::CloseOutputTree
void CloseOutputTree()
ZDCTreeAnalysis::_deltaTSample
float _deltaTSample
Definition: ZDCTreeAnalysis.h:123
lumiFormat.array
array
Definition: lumiFormat.py:98
ZDCTreeAnalysis::PlotFits
void PlotFits(const std::string &canvasSavePath="")
GetAllXsec.entry
list entry
Definition: GetAllXsec.py:132
ZDCTreeAnalysis::L1_ZDC_A_C
Bool_t L1_ZDC_A_C
Definition: ZDCTreeAnalysis.h:71
ZDCTreeAnalysis::mbts_timeDiff
Float_t mbts_timeDiff
Definition: ZDCTreeAnalysis.h:63
ZDCTreeAnalysis::L1_ZDC_C
Bool_t L1_ZDC_C
Definition: ZDCTreeAnalysis.h:67
ZDCTreeAnalysis::zdc_CalibTime
float zdc_CalibTime[2][4]
Definition: ZDCTreeAnalysis.h:113
ZDCTreeAnalysis::b_eventNumber
TBranch * b_eventNumber
Definition: ZDCTreeAnalysis.h:185
ZDCTreeAnalysis::_moduleHGGains
std::array< std::array< float, 4 >, 2 > _moduleHGGains
Definition: ZDCTreeAnalysis.h:163
ZDCTreeAnalysis::fChain
TTree * fChain
Definition: ZDCTreeAnalysis.h:31
ZDCTreeAnalysis::SetADCOverUnderflowValues
void SetADCOverUnderflowValues(const ZDCDataAnalyzer::ZDCModuleFloatArray &HGOverFlowADC, const ZDCDataAnalyzer::ZDCModuleFloatArray &HGUnderFlowADC, const ZDCDataAnalyzer::ZDCModuleFloatArray &LGOverFlowADC)
Definition: ZDCTreeAnalysis.h:225
ZDCTreeAnalysis::SetupBunchTrains
void SetupBunchTrains()
ZDCTreeAnalysis::_doOutput
bool _doOutput
Definition: ZDCTreeAnalysis.h:36
ZDCTreeAnalysis::b_decisions
TBranch * b_decisions
Definition: ZDCTreeAnalysis.h:192
ZDCTreeAnalysis::b_ps_L1_ZDC_A_C
TBranch * b_ps_L1_ZDC_A_C
Definition: ZDCTreeAnalysis.h:216
ZDCTreeAnalysis::_preSampleIdx
int _preSampleIdx
Definition: ZDCTreeAnalysis.h:124
ZDCTreeAnalysis::mbts_countA
UShort_t mbts_countA
Definition: ZDCTreeAnalysis.h:59
ZDCTreeAnalysis::DoAnalysis
void DoAnalysis()
ZDCTreeAnalysis::trigger_TBP
UInt_t trigger_TBP
Definition: ZDCTreeAnalysis.h:46
ZDCTreeAnalysis::_DeltaT0CutLow
float _DeltaT0CutLow[2][4]
Definition: ZDCTreeAnalysis.h:134
ZDCTreeAnalysis::_inLoop
bool _inLoop
Definition: ZDCTreeAnalysis.h:178
ZDCTreeAnalysis::zdc_MaxADCSample
int zdc_MaxADCSample[2][4]
Definition: ZDCTreeAnalysis.h:98
ZDCTreeAnalysis::b_tav
TBranch * b_tav
Definition: ZDCTreeAnalysis.h:191
ZDCDataAnalyzer::ZDCModuleBoolArray
std::array< std::array< bool, 4 >, 2 > ZDCModuleBoolArray
Definition: ZDCDataAnalyzer.h:23
ZDCTreeAnalysis::b_L1_ZDC_AND
TBranch * b_L1_ZDC_AND
Definition: ZDCTreeAnalysis.h:213
ZDCTreeAnalysis::b_ps_L1_ZDC_C
TBranch * b_ps_L1_ZDC_C
Definition: ZDCTreeAnalysis.h:212
ZDCTreeAnalysis::zdc_Min2ndDerivSample
int zdc_Min2ndDerivSample[2][4]
Definition: ZDCTreeAnalysis.h:104
ZDCTreeAnalysis::Init
virtual void Init(TTree *tree)
ZDCTreeAnalysis::ps_L1_ZDC_A_C
Float_t ps_L1_ZDC_A_C
Definition: ZDCTreeAnalysis.h:72
ZDCTreeAnalysis::_BCIDPosInTrain
std::vector< int > _BCIDPosInTrain
Definition: ZDCTreeAnalysis.h:174
CaloCellTimeCorrFiller.filename
filename
Definition: CaloCellTimeCorrFiller.py:24
ZDCTreeAnalysis::zdc_ModuleMask
int zdc_ModuleMask
Definition: ZDCTreeAnalysis.h:83
ZDCTreeAnalysis::_moduleT0LGLB
TSpline * _moduleT0LGLB[2][4]
Definition: ZDCTreeAnalysis.h:145
ZDCTreeAnalysis::nvx
Int_t nvx
Definition: ZDCTreeAnalysis.h:55
ZDCTreeAnalysis::_modECalib
float _modECalib[2][4]
Definition: ZDCTreeAnalysis.h:148
ZDCTreeAnalysis::_moduleTau2
float _moduleTau2[2][4]
Definition: ZDCTreeAnalysis.h:159
ZDCTreeAnalysis::zdc_raw
UShort_t zdc_raw[2][4][2][2][7]
Definition: ZDCTreeAnalysis.h:51
ZDCTreeAnalysis::vxcov
Float_t vxcov[6]
Definition: ZDCTreeAnalysis.h:58
ZDCTreeAnalysis::ps_L1_ZDC_C
Float_t ps_L1_ZDC_C
Definition: ZDCTreeAnalysis.h:68
ZDCTreeAnalysis::_moduleT0HGLB
TSpline * _moduleT0HGLB[2][4]
Definition: ZDCTreeAnalysis.h:144
ZDCTreeAnalysis::_haveLBDepECalib
bool _haveLBDepECalib[2][4]
Definition: ZDCTreeAnalysis.h:150
ZDCTreeAnalysis::_currentEntry
int _currentEntry
Definition: ZDCTreeAnalysis.h:179
ZDCTreeAnalysis::b_ps_L1_ZDC_A
TBranch * b_ps_L1_ZDC_A
Definition: ZDCTreeAnalysis.h:210
ZDCTreeAnalysis::ps_L1_ZDC_AND
Float_t ps_L1_ZDC_AND
Definition: ZDCTreeAnalysis.h:70
ZDCTreeAnalysis::LoadNextEntry
void LoadNextEntry()
Definition: ZDCTreeAnalysis.h:300
ZDCTreeAnalysis::vxntrk
Int_t vxntrk
Definition: ZDCTreeAnalysis.h:57
ZDCTreeAnalysis::lumiBlock
UInt_t lumiBlock
Definition: ZDCTreeAnalysis.h:43
ZDCDataAnalyzer::SetTimingCorrParams
void SetTimingCorrParams(ZDCPulseAnalyzer::TimingCorrMode mode, float refADC, float refScale, const std::array< std::array< std::vector< float >, 4 >, 2 > &HGParamArr, const std::array< std::array< std::vector< float >, 4 >, 2 > &LGParamArr)
Definition: ZDCDataAnalyzer.cxx:304
ZDCTreeAnalysis::zdc_samplesDeriv
std::vector< float > * zdc_samplesDeriv
Definition: ZDCTreeAnalysis.h:92
ZDCTreeAnalysis::zdc_T0Corr
float zdc_T0Corr[2][4]
Definition: ZDCTreeAnalysis.h:110
ZDCTreeAnalysis::tbp
UInt_t tbp[16]
Definition: ZDCTreeAnalysis.h:47
ZDCTreeAnalysis::_outTFile
TFile * _outTFile
current Tree number in a TChain
Definition: ZDCTreeAnalysis.h:34
ZDCTreeAnalysis::LoadEntry
void LoadEntry(int entry)
Definition: ZDCTreeAnalysis.h:294
ZDCTreeAnalysis::SetSlewingCoeff
void SetSlewingCoeff(const std::array< std::array< std::vector< float >, 4 >, 2 > &HGParamArr, const std::array< std::array< std::vector< float >, 4 >, 2 > &LGParamArr)
Definition: ZDCTreeAnalysis.h:274
ZDCTreeAnalysis::b_trigger_TBP
TBranch * b_trigger_TBP
Definition: ZDCTreeAnalysis.h:189
ZDCTreeAnalysis::_HGOverFlowADC
float _HGOverFlowADC[2][4]
Definition: ZDCTreeAnalysis.h:132
ZDCTreeAnalysis::_peak2ndDerivMinThresholds
ZDCDataAnalyzer::ZDCModuleFloatArray _peak2ndDerivMinThresholds
Definition: ZDCTreeAnalysis.h:128