|
ATLAS Offline Software
|
Go to the documentation of this file.
12 #ifndef ZDCTreeAnalysis_h
13 #define ZDCTreeAnalysis_h
223 ZDCTreeAnalysis(std::string
filename,
int nSample = 7,
double deltaT = 12.5,
int preSamplIdx = 1, std::string fitFunction =
"FermiExp");
241 DeltaT0CutLowHG, DeltaT0CutHighHG,
242 DeltaT0CutLowLG, DeltaT0CutHighLG);
267 const std::array<std::array<TSpline*, 4>, 2>& calibSplinesLG)
272 void SetLBDepT0(
int iside,
int imod, TSpline* t0SplineLG, TSpline* t0SplineHG);
283 void PlotFits(
const std::string & canvasSavePath =
"");
290 virtual void Loop(
int numEntries = -1,
int startEntry = 0);
314 #ifdef ZDCTreeAnalysis_cxx
317 fChain(0), _outTFile(0), _outTree(0),
318 _nSample(nSample), _deltaTSample(deltaT), _preSampleIdx(preSamplIdx),
319 _doOutput(false), _currentEntry(-1), _inLoop(false),
320 _haveCalibrations(false)
327 f->GetObject(
"zdcTree",
tree);
344 9.51415, 9.5049, 9.51659, 9.51415};
380 delete fChain->GetCurrentFile();
396 if (centry < 0)
return centry;
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);
477 fChain->SetBranchStatus(
"passBits", 1);
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);
512 #endif // #ifdef ZDCTreeAnalysis_cxx
int zdc_MinADCSample[2][4]
float zdc_Min2ndDeriv[2][4]
ZDCDataAnalyzer * _dataAnalyzer_p
TSpline * _modECalibLB[2][4]
virtual Int_t Cut(Long64_t entry)
std::vector< int > _BCIDGap
float _chisqDivAmpCutLG[2][4]
virtual void Show(Long64_t entry=-1)
void SetDebugLevel(int debugLevel=0)
virtual Int_t GetEntry(Long64_t entry)
void LoadEnergyCalibrations(const std::array< std::array< TSpline *, 4 >, 2 > &calibSplines)
std::vector< float > * zdc_samplesSub
virtual Long64_t LoadTree(Long64_t entry)
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)
std::array< std::array< float, 4 >, 2 > ZDCModuleFloatArray
virtual ~ZDCTreeAnalysis()
float _DeltaT0CutHigh[2][4]
float _T0SlewCoeffLG[2][4][3]
float zdc_Presample[2][4]
bool _haveModuleSettings[2][4]
void OpenOutputTree(const std::string &file)
void LoadEnergyCalibrations(std::array< std::array< std::unique_ptr< TSpline >, 4 >, 2 > &calibSplines)
TBranch * b_ps_L1_ZDC_AND
void SetCutValues(const ZDCModuleFloatArray &chisqDivAmpCutHG, const ZDCModuleFloatArray &chisqDivAmpCutLG, const ZDCModuleFloatArray &deltaT0MinHG, const ZDCModuleFloatArray &deltaT0MaxHG, const ZDCModuleFloatArray &deltaT0MinLG, const ZDCModuleFloatArray &deltaT0MaxLG)
float _chisqDivAmpCutHG[2][4]
unsigned int GetRunNumber() const
std::vector< std::set< int > > _trains
float _HGUnderFlowADC[2][4]
float _T0SlewCoeffHG[2][4][3]
ZDCTreeAnalysis(std::string filename, int nSample=7, double deltaT=12.5, int preSamplIdx=1, std::string fitFunction="FermiExp")
void LoadT0Calibrations(const std::array< std::array< TSpline *, 4 >, 2 > &calibSplinesHG, const std::array< std::array< TSpline *, 4 >, 2 > &calibSplinesLG)
virtual void Loop(int numEntries=-1, int startEntry=0)
std::vector< float > * zdc_samplesDeriv2nd
Int_t fCurrent
pointer to the analyzed TTree or TChain
void SetADCOverUnderflowValues(const ZDCModuleFloatArray &HGOverflowADC, const ZDCModuleFloatArray &HGUnderflowADC, const ZDCModuleFloatArray &LGOverflowADC)
void SetLBDepT0(int iside, int imod, TSpline *t0SplineLG, TSpline *t0SplineHG)
ZDCDataAnalyzer::ZDCModuleFloatArray _peak2ndDerivMinSamples
void SetTauT0Values(const ZDCModuleBoolArray &fxiTau1, const ZDCModuleBoolArray &fxiTau2, const ZDCModuleFloatArray &tau1, const ZDCModuleFloatArray &tau2, const ZDCModuleFloatArray &t0HG, const ZDCModuleFloatArray &t0LG)
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)
void PlotFits(const std::string &canvasSavePath="")
float zdc_CalibTime[2][4]
std::array< std::array< float, 4 >, 2 > _moduleHGGains
void SetADCOverUnderflowValues(const ZDCDataAnalyzer::ZDCModuleFloatArray &HGOverFlowADC, const ZDCDataAnalyzer::ZDCModuleFloatArray &HGUnderFlowADC, const ZDCDataAnalyzer::ZDCModuleFloatArray &LGOverFlowADC)
TBranch * b_ps_L1_ZDC_A_C
float _DeltaT0CutLow[2][4]
int zdc_MaxADCSample[2][4]
std::array< std::array< bool, 4 >, 2 > ZDCModuleBoolArray
int zdc_Min2ndDerivSample[2][4]
virtual void Init(TTree *tree)
std::vector< int > _BCIDPosInTrain
TSpline * _moduleT0LGLB[2][4]
UShort_t zdc_raw[2][4][2][2][7]
TSpline * _moduleT0HGLB[2][4]
bool _haveLBDepECalib[2][4]
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)
std::vector< float > * zdc_samplesDeriv
TFile * _outTFile
current Tree number in a TChain
void LoadEntry(int entry)
void SetSlewingCoeff(const std::array< std::array< std::vector< float >, 4 >, 2 > &HGParamArr, const std::array< std::array< std::vector< float >, 4 >, 2 > &LGParamArr)
float _HGOverFlowADC[2][4]
ZDCDataAnalyzer::ZDCModuleFloatArray _peak2ndDerivMinThresholds