ATLAS Offline Software
Loading...
Searching...
No Matches
ZdcNtuple.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
8
10#include "xAODRootAccess/Init.h"
13
15
16#include <TTree.h>
17#include <TH1.h>
18#include <TSystem.h>
19#include <TFile.h>
20
21
22// this is needed to distribute the algorithm to the workers
23//ClassImp(ZdcNtuple)
24
25ZdcNtuple :: ZdcNtuple (const std::string& name, ISvcLocator *pSvcLocator)
26 : EL::AnaAlgorithm(name, pSvcLocator),
27 m_grl ("GoodRunsListSelectionTool/grl", this),
28 //m_zdcAnalysisTool("ZDC::ZdcAnalysisTool/ZdcAnalysisTool", this),
29 m_selTool( "InDet::InDetTrackSelectionTool/TrackSelectionTool", this )
30{
31 // Here you put any code for the base initialization of variables,
32 // e.g. initialize all pointers to 0. Note that you should only put
33 // the most basic initialization here, since this method will be
34 // called on both the submission and the worker node. Most of your
35 // initialization code will go into histInitialize() and
36 // initialize().
37 m_setupTrigHist = false;
39
40 declareProperty("isMC", m_isMC = false, "MC mode");
41 declareProperty("enableOutputTree", enableOutputTree = false, "Enable output tree");
42 declareProperty("enableOutputSamples", enableOutputSamples = false, "Output ZDC and RPD raw data");
43 declareProperty("enableTrigger", enableTrigger = true, "comment");
44 declareProperty("enableTracks", enableTracks = false, "comment");
45 declareProperty("trackLimit", trackLimit = 500, "comment");
46 declareProperty("enableID", enableID = false, "turn on to enable ID tracks & vertices for physics streams");
47 declareProperty("enableCalo", enableCalo = false, "turn on to enable calorimeter energy info for physics streams");
48 declareProperty("enableClusters", enableClusters = false, "turn on to enable calo topo cluster info for physics streams");
49 declareProperty("writeOnlyTriggers", writeOnlyTriggers = false, "comment");
50 declareProperty("useGRL", useGRL = true, "comment");
51 declareProperty("grlFilename", grlFilename = "$ROOTCOREBIN/data/ZdcNtuple/data16_hip8TeV.periodAllYear_DetStatus-v86-pro20-19_DQDefects-00-02-04_PHYS_HeavyIonP_All_Good.xml", "comment");
52 declareProperty("slimmed", slimmed = false, "comment");
53 declareProperty("zdcCalib", zdcCalib = false, "zdc/ZDCCalib file");
54 declareProperty("zdcInj", zdcInj = false, "ZDC injected pulse");
55 declareProperty("zdcLaser", zdcLaser = false, "Run 2 ZDC Laser");
56 declareProperty("zdcOnly", zdcOnly = false, "comment");
57 declareProperty("zdcLowGainMode", zdcLowGainMode = 0, "comment");
58
59 declareProperty("flipDelay", flipDelay = 0, "comment");
60 declareProperty("reprocZdc", reprocZdc = 0, "comment");
61 declareProperty("auxSuffix", auxSuffix = "", "comment");
62 declareProperty("nsamplesZdc", nsamplesZdc = 24, "number of samples, 7 = most of Run 2, 24,32,40 = Run 3");
63 declareProperty("lhcf2022", lhcf2022 = false,"LHCf2022 general config");
64 declareProperty("lhcf2022afp", lhcf2022afp = false,"LHCf2022 AFP-specific config");
65 declareProperty("lhcf2022zdc", lhcf2022zdc = false,"LHCf2022 ZDC-specific config");
66 declareProperty("pbpb2023", pbpb2023 = true, "PbPb2023 config");
67 declareProperty("zdcConfig", zdcConfig = "PbPb2018", "argument to configure ZdcAnalysisTool");
68 declareProperty("doZdcCalib", doZdcCalib = false, "perform ZDC energy calibration");
69 declareProperty("enableZDC", enableZDC = true);
70 declareProperty("enableRPD",enableRPD = false,"enable reading any RPD decorations");
71 declareProperty("enableRPDAmp",enableRPDAmp = false,"enable reading RPD amplitudes (also requires enableRPD)");
72 declareProperty("enableCentroid",enableCentroid = false,"enable reading centroid decorations (also requires enableRPD)");
73
74 declareProperty( "TrackSelectionTool", m_selTool );
75
76 m_zdcAnalysisTool.declarePropertyFor (this, "zdcAnalysisTool");
77
78}
79
80/*
81StatusCode ZdcNtuple :: setupJob (EL::Job& job)
82{
83 // Here you put code that sets up the job on the submission object
84 // so that it is ready to work with your algorithm, e.g. you can
85 // request the D3PDReader service or add output files. Any code you
86 // put here could instead also go into the submission script. The
87 // sole advantage of putting it here is that it gets automatically
88 // activated/deactivated when you add/remove the algorithm from your
89 // job, which may or may not be of value to you.
90
91 job.useXAOD ();
92 ANA_CHECK( "setupJob()", xAOD::Init() ); // call before opening first file
93
94 return StatusCode::SUCCESS;
95}
96*/
97
98
99StatusCode ZdcNtuple :: initialize ()
100{
101 // Here you do everything that needs to be done at the very
102 // beginning on each worker node, e.g. create histograms and output
103 // trees. This method gets called before any input files are
104 // connected.
105
106 ANA_MSG_DEBUG("Howdy from Initialize!");
107
109 ANA_CHECK(m_zdcSumContainerName.initialize());
111
113 {
114
115 ANA_CHECK( book(TTree("zdcTree", "ZDC Tree")));
116 m_outputTree = tree( "zdcTree" );
117
118 m_outputTree->Branch("runNumber", &t_runNumber, "runNumber/i");
119 m_outputTree->Branch("eventNumber", &t_eventNumber, "eventNumber/i");
120 m_outputTree->Branch("lumiBlock", &t_lumiBlock, "lumiBlock/i");
121 m_outputTree->Branch("bunchGroup", &t_bunchGroup, "bunchGroup/b");
122 m_outputTree->Branch("bcid", &t_bcid, "bcid/i");
123 if (zdcInj) m_outputTree->Branch("vInj",&t_vInj,"vInj/F");
124 m_outputTree->Branch("avgIntPerCrossing", &t_avgIntPerCrossing, "avgIntPerCrossing/F");
125 m_outputTree->Branch("actIntPerCrossing", &t_actIntPerCrossing, "actIntPerCrossing/F");
126 m_outputTree->Branch("trigger", &t_trigger, "trigger/l");
127 m_outputTree->Branch("trigger_TBP", &t_trigger_TBP, "trigger_TBP/i");
128 m_outputTree->Branch("tbp", &t_tbp, "tbp[16]/i");
129 m_outputTree->Branch("tav", &t_tav, "tav[16]/i");
130 m_outputTree->Branch("passBits", &t_passBits, "passBits/i");
131 m_outputTree->Branch("extendedLevel1ID",&t_extendedLevel1ID,"extendedLevel1ID/i");
132 m_outputTree->Branch("timeStamp",&t_timeStamp,"timeStamp/i");
133 m_outputTree->Branch("timeStampNSOffset",&t_timeStampNSOffset,"timeStampNSOffset/i");
134 m_outputTree->Branch("zdcEventInfoError",&t_zdcEventInfoError,"zdcEventInfoError/b");
135 m_outputTree->Branch("zdcEventInfoErrorWord",&t_zdcEventInfoErrorWord,"zdcEventInfoErrorWord/i");
136 // ZDC and RPD decoding errors
137 m_outputTree->Branch("zdcDecodingError",&t_zdcDecodingError,"zdcDecodingError/b");
138 m_outputTree->Branch("rpdDecodingError",&t_rpdDecodingError,"rpdDecodingError/b");
139
140 if (enableZDC)
141 {
143 {
144 if (nsamplesZdc == 7)
145 {
146 ANA_MSG_INFO("Setting up for 7 samples");
147 m_outputTree->Branch("zdc_raw", &t_raw7, "zdc_raw[2][4][2][2][7]/s"); // 7 samples
148 }
149
150 if (nsamplesZdc == 15)
151 {
152 ANA_MSG_INFO("Setting up for 15 samples");
153 m_outputTree->Branch("zdc_raw", &t_raw15, "zdc_raw[2][4][2][2][15]/s"); // 15 samples
154 }
155
156 if (nsamplesZdc == 24)
157 {
158 ANA_MSG_INFO("Setting up for 24 samples");
159 m_outputTree->Branch("zdc_raw", &t_raw24, "zdc_raw[2][4][2][2][24]/s"); // 24 samples
160 m_outputTree->Branch("rpd_raw", &t_rpdRaw, "rpd_raw[2][16][24]/s"); // 24 samples
161 }
162 if (nsamplesZdc == 32)
163 {
164 ANA_MSG_INFO("Setting up for 32 samples");
165 m_outputTree->Branch("zdc_raw", &t_raw32, "zdc_raw[2][4][2][2][32]/s"); // 32 samples
166 m_outputTree->Branch("rpd_raw", &t_rpdRaw32, "rpd_raw[2][16][32]/s"); // 32 samples
167 }
168 if (nsamplesZdc == 40)
169 {
170 ANA_MSG_INFO("Setting up for 40 samples");
171 m_outputTree->Branch("zdc_raw", &t_raw40, "zdc_raw[2][4][2][2][40]/s"); // 40 samples
172 m_outputTree->Branch("rpd_raw", &t_rpdRaw40, "rpd_raw[2][16][40]/s"); // 40 samples
173 }
174 }
175
176 m_outputTree->Branch("zdc_ZdcAmp", &t_ZdcAmp, "zdc_ZdcAmp[2]/F");
177 m_outputTree->Branch("zdc_ZdcAmpErr", &t_ZdcAmpErr, "zdc_ZdcAmpErr[2]/F");
178 m_outputTree->Branch("zdc_ZdcEnergy", &t_ZdcEnergy, "zdc_ZdcEnergy[2]/F");
179 m_outputTree->Branch("zdc_ZdcEnergyErr", &t_ZdcEnergyErr, "zdc_ZdcEnergyErr[2]/F");
180 m_outputTree->Branch("zdc_ZdcNLEnergy", &t_ZdcNLEnergy, "zdc_ZdcNLEnergy[2]/F");
181 m_outputTree->Branch("zdc_ZdcNLEnergyErr", &t_ZdcNLEnergyErr, "zdc_ZdcNLEnergyErr[2]/F");
182 m_outputTree->Branch("zdc_ZdcTime", &t_ZdcTime, "zdc_ZdcTime[2]/F");
183 m_outputTree->Branch("zdc_ZdcStatus", &t_ZdcStatus, "zdc_ZdcStatus[2]/S");
184 m_outputTree->Branch("zdc_ZdcTrigEff", &t_ZdcTrigEff, "zdc_ZdcTrigEff[2]/F");
185 m_outputTree->Branch("zdc_ZdcModuleMask", &t_ZdcModuleMask, "zdc_ZdcModuleMask/i");
186 m_outputTree->Branch("zdc_ZdcLucrodTriggerSideAmp",&t_ZdcLucrodTriggerSideAmp,"zdc_ZdcLucrodTriggerSideAmp[2]/S");
187 m_outputTree->Branch("zdc_ZdcLucrodTriggerSideAmpLG",&t_ZdcLucrodTriggerSideAmpLG,"zdc_ZdcLucrodTriggerSideAmpLG[2]/S");
188
189 m_outputTree->Branch("zdc_ZdcModuleAmp", &t_ZdcModuleAmp, "zdc_ZdcModuleAmp[2][4]/F");
190 m_outputTree->Branch("zdc_ZdcModuleTime", &t_ZdcModuleTime, "zdc_ZdcModuleTime[2][4]/F");
191 m_outputTree->Branch("zdc_ZdcModuleFitAmp", &t_ZdcModuleFitAmp, "zdc_ZdcModuleFitAmp[2][4]/F");
192 m_outputTree->Branch("zdc_ZdcModuleFitT0", &t_ZdcModuleFitT0, "zdc_ZdcModuleFitT0[2][4]/F");
193 m_outputTree->Branch("zdc_ZdcModuleStatus", &t_ZdcModuleStatus, "zdc_ZdcModuleStatus[2][4]/i");
194 m_outputTree->Branch("zdc_ZdcModuleChisq", &t_ZdcModuleChisq, "zdc_ZdcModuleChisq[2][4]/F");
195 m_outputTree->Branch("zdc_ZdcModuleCalibAmp", &t_ZdcModuleCalibAmp, "zdc_ZdcModuleCalibAmp[2][4]/F");
196 m_outputTree->Branch("zdc_ZdcModuleCalibTime", &t_ZdcModuleCalibTime, "zdc_ZdcModuleCalibTime[2][4]/F");
197 m_outputTree->Branch("zdc_ZdcModuleBkgdMaxFraction", &t_ZdcModuleBkgdMaxFraction, "zdc_ZdcModuleBkgdMaxFraction[2][4]/F");
198 m_outputTree->Branch("zdc_ZdcModuleAmpError", &t_ZdcModuleAmpError, "zdc_ZdcModuleAmpError[2][4]/F");
199 m_outputTree->Branch("zdc_ZdcModuleMinDeriv2nd", &t_ZdcModuleMinDeriv2nd, "zdc_ZdcModuleMinDeriv2nd[2][4]/F");
200 m_outputTree->Branch("zdc_ZdcModulePresample", &t_ZdcModulePresample, "zdc_ZdcModulePresample[2][4]/F");
201 m_outputTree->Branch("zdc_ZdcModulePreSampleAmp", &t_ZdcModulePreSampleAmp, "zdc_ZdcModulePreSampleAmp[2][4]/F");
202 m_outputTree->Branch("zdc_ZdcLucrodTriggerAmp",&t_ZdcLucrodTriggerAmp,"zdc_ZdcLucrodTriggerAmp[2][4]/S");
203 m_outputTree->Branch("zdc_ZdcLucrodTriggerAmpLG",&t_ZdcLucrodTriggerAmpLG,"zdc_ZdcLucrodTriggerAmpLG[2][4]/S");
204 m_outputTree->Branch("zdc_ZdcModuleMaxADC",&t_ZdcModuleMaxADC,"zdc_ZdcModuleMaxADC[2][4]/F");
205 m_outputTree->Branch("zdc_ZdcModuleMaxADCHG",&t_ZdcModuleMaxADCHG,"zdc_ZdcModuleMaxADCHG[2][4]/F");
206 m_outputTree->Branch("zdc_ZdcModuleMaxADCLG",&t_ZdcModuleMaxADCLG,"zdc_ZdcModuleMaxADCLG[2][4]/F");
207 m_outputTree->Branch("zdc_ZdcModulePeakADCHG",&t_ZdcModulePeakADCHG,"zdc_ZdcModulePeakADCHG[2][4]/F");
208 m_outputTree->Branch("zdc_ZdcModulePeakADCLG",&t_ZdcModulePeakADCLG,"zdc_ZdcModulePeakADCLG[2][4]/F");
209 m_outputTree->Branch("zdc_ZdcModuleAmpLGRefit", &t_ZdcModuleAmpLGRefit, "zdc_ZdcModuleAmpLGRefit[2][4]/F");
210 m_outputTree->Branch("zdc_ZdcModuleAmpCorrLGRefit", &t_ZdcModuleAmpCorrLGRefit, "zdc_ZdcModuleAmpCorrLGRefit[2][4]/F");
211 m_outputTree->Branch("zdc_ZdcModuleT0LGRefit", &t_ZdcModuleT0LGRefit, "zdc_ZdcModuleT0LGRefit[2][4]/F");
212 m_outputTree->Branch("zdc_ZdcModuleT0SubLGRefit", &t_ZdcModuleT0SubLGRefit, "zdc_ZdcModuleT0SubLGRefit[2][4]/F");
213 m_outputTree->Branch("zdc_ZdcModuleChisqLGRefit", &t_ZdcModuleChisqLGRefit, "zdc_ZdcModuleChisqLGRefit[2][4]/F");
214
215 if(m_isMC){
216 //Modules
217 m_outputTree->Branch("zdc_ZdcModuleTruthTotal",&t_ZdcModuleTruthTotal,"zdc_ZdcModuleTruthTotal[2][7]/F");
218 m_outputTree->Branch("zdc_ZdcModuleTruthInvisible",&t_ZdcModuleTruthInvis,"zdc_ZdcModuleTruthInvisible[2][7]/F");
219 m_outputTree->Branch("zdc_ZdcModuleTruthEM",&t_ZdcModuleTruthEM,"zdc_ZdcModuleTruthEM[2][7]/F");
220 m_outputTree->Branch("zdc_ZdcModuleTruthNonEM",&t_ZdcModuleTruthNonEM,"zdc_ZdcModuleTruthNonEM[2][7]/F");
221 m_outputTree->Branch("zdc_ZdcModuleTruthEscaped",&t_ZdcModuleTruthEscaped,"zdc_ZdcModuleTruthEscaped[2][7]/F");
222 m_outputTree->Branch("zdc_ZdcModuleTruthNphotons",&t_ZdcModuleTruthNphotons,"zdc_ZdcModuleTruthNphotons[2][7]/i");
223 m_outputTree->Branch("zdc_RpdModuleTruthNphotons",&t_RpdModuleTruthNphotons,"zdc_RpdModuleTruthNphotons[2][16]/i");
224
225 //Sums
226 m_outputTree->Branch("zdc_ZdcTruthTotal",&t_ZdcTruthTotal,"zdc_ZdcTruthTotal[2]/F");
227 m_outputTree->Branch("zdc_ZdcTruthInvisible",&t_ZdcTruthInvis, "zdc_ZdcTruthInvisible[2]/F");
228 m_outputTree->Branch("zdc_ZdcTruthEM",&t_ZdcTruthEM,"zdc_ZdcTruthEM[2]/F");
229 m_outputTree->Branch("zdc_ZdcTruthNonEM",&t_ZdcTruthNonEM,"zdc_ZdcTruthNonEM[2]/F");
230 m_outputTree->Branch("zdc_ZdcTruthEscaped",&t_ZdcTruthEscaped,"zdc_ZdcTruthEscaped[2]/F");
231
232 //Event gen particles
233 m_outputTree->Branch("zdc_ZdcTruthParticlePosx",&t_ZdcTruthParticlePosx);
234 m_outputTree->Branch("zdc_ZdcTruthParticlePosy",&t_ZdcTruthParticlePosy);
235 m_outputTree->Branch("zdc_ZdcTruthParticlePosz",&t_ZdcTruthParticlePosz);
236 m_outputTree->Branch("zdc_ZdcTruthParticleTime",&t_ZdcTruthParticleTime);
237 m_outputTree->Branch("zdc_ZdcTruthParticlePx",&t_ZdcTruthParticlePx);
238 m_outputTree->Branch("zdc_ZdcTruthParticlePy",&t_ZdcTruthParticlePy);
239 m_outputTree->Branch("zdc_ZdcTruthParticlePz",&t_ZdcTruthParticlePz);
240 m_outputTree->Branch("zdc_ZdcTruthParticleEnergy",&t_ZdcTruthParticleEnergy);
241 m_outputTree->Branch("zdc_ZdcTruthParticlePid",&t_ZdcTruthParticlePid);
242 m_outputTree->Branch("zdc_ZdcTruthParticleStatus",&t_ZdcTruthParticleStatus);
243 }
244 }
245 if (enableRPD)
246 {
247 if (enableRPDAmp) {
248 m_outputTree->Branch("zdc_RpdChannelBaseline",&t_RpdChannelBaseline,"zdc_RpdChannelBaseline[2][16]/F");
249 m_outputTree->Branch("zdc_RpdChannelPileupExpFitParams",&t_RpdChannelPileupExpFitParams,"zdc_RpdChannelPileupExpFitParams[2][16][2]/F");
250 m_outputTree->Branch("zdc_RpdChannelPileupStretchedExpFitParams",&t_RpdChannelPileupStretchedExpFitParams,"zdc_RpdChannelPileupStretchedExpFitParams[2][16][3]/F");
251 m_outputTree->Branch("zdc_RpdChannelPileupExpFitParamErrs",&t_RpdChannelPileupExpFitParamErrs,"zdc_RpdChannelPileupExpFitParamErrs[2][16][2]/F");
252 m_outputTree->Branch("zdc_RpdChannelPileupStretchedExpFitParamErrs",&t_RpdChannelPileupStretchedExpFitParamErrs,"zdc_RpdChannelPileupStretchedExpFitParamErrs[2][16][3]/F");
253 m_outputTree->Branch("zdc_RpdChannelPileupExpFitMSE",&t_RpdChannelPileupExpFitMSE,"zdc_RpdChannelPileupExpFitMSE[2][16]/F");
254 m_outputTree->Branch("zdc_RpdChannelPileupStretchedExpFitMSE",&t_RpdChannelPileupStretchedExpFitMSE,"zdc_RpdChannelPileupStretchedExpFitMSE[2][16]/F");
255 m_outputTree->Branch("zdc_RpdChannelAmplitude",&t_RpdChannelAmplitude,"zdc_RpdChannelAmplitude[2][16]/F");
256 m_outputTree->Branch("zdc_RpdChannelAmplitudeCalib",&t_RpdChannelAmplitudeCalib,"zdc_RpdChannelAmplitudeCalib[2][16]/F");
257 m_outputTree->Branch("zdc_RpdChannelMaxADC",&t_RpdChannelMaxADC,"zdc_RpdChannelMaxADC[2][16]/F");
258 m_outputTree->Branch("zdc_RpdChannelMaxADCCalib",&t_RpdChannelMaxADCCalib,"zdc_RpdChannelMaxADCCalib[2][16]/F");
259 m_outputTree->Branch("zdc_RpdChannelMaxSample",&t_RpdChannelMaxSample,"zdc_RpdChannelMaxSample[2][16]/i");
260 m_outputTree->Branch("zdc_RpdChannelStatus",&t_RpdChannelStatus,"zdc_RpdChannelStatus[2][16]/i");
261 m_outputTree->Branch("zdc_RpdChannelPileupFrac",&t_RpdChannelPileupFrac,"zdc_RpdChannelPileupFrac[2][16]/F");
262 m_outputTree->Branch("zdc_RpdSideStatus",&t_RpdSideStatus,"zdc_RpdSideStatus[2]/i");
263 }
264 if (enableCentroid)
265 {
266 m_outputTree->Branch("zdc_centroidAvailable", &t_centroidDecorationsAvailable);
267 m_outputTree->Branch("zdc_centroidEventValid", &t_centroidEventValid, "zdc_centroidEventValid/B");
268 m_outputTree->Branch("zdc_centroidStatus", &t_centroidStatus, "zdc_centroidStatus[2]/i");
269 m_outputTree->Branch("zdc_RPDChannelSubtrAmp", &t_RPDChannelSubtrAmp, "zdc_RPDChannelSubtrAmp[2][16]/F");
270 m_outputTree->Branch("zdc_RPDSubtrAmpSum", &t_RPDSubtrAmpSum, "zdc_RPDSubtrAmpSum[2]/F");
271 m_outputTree->Branch("zdc_xCentroidPreGeomCorPreAvgSubtr", &t_xCentroidPreGeomCorPreAvgSubtr, "zdc_xCentroidPreGeomCorPreAvgSubtr[2]/F");
272 m_outputTree->Branch("zdc_yCentroidPreGeomCorPreAvgSubtr", &t_yCentroidPreGeomCorPreAvgSubtr, "zdc_yCentroidPreGeomCorPreAvgSubtr[2]/F");
273 m_outputTree->Branch("zdc_xCentroidPreAvgSubtr", &t_xCentroidPreAvgSubtr, "zdc_xCentroidPreAvgSubtr[2]/F");
274 m_outputTree->Branch("zdc_yCentroidPreAvgSubtr", &t_yCentroidPreAvgSubtr, "zdc_yCentroidPreAvgSubtr[2]/F");
275 m_outputTree->Branch("zdc_xCentroid", &t_xCentroid, "zdc_xCentroid[2]/F");
276 m_outputTree->Branch("zdc_yCentroid", &t_yCentroid, "zdc_yCentroid[2]/F");
277 m_outputTree->Branch("zdc_xRowCentroid", &t_xRowCentroid, "zdc_xRowCentroid[2][4]/F");
278 m_outputTree->Branch("zdc_yColCentroid", &t_yColCentroid, "zdc_yColCentroid[2][4]/F");
279 m_outputTree->Branch("zdc_reactionPlaneAngle", &t_reactionPlaneAngle, "zdc_reactionPlaneAngle[2]/F");
280 m_outputTree->Branch("zdc_cosDeltaReactionPlaneAngle", &t_cosDeltaReactionPlaneAngle, "zdc_cosDeltaReactionPlaneAngle/F");
281 }
282 }
283
284 if (!(zdcCalib || zdcLaser || zdcOnly || zdcInj))
285 {
286 m_outputTree->Branch("mbts_in_e", &t_mbts_in_e, "mbts_in_e[2][8]/F");
287 m_outputTree->Branch("mbts_in_t", &t_mbts_in_t, "mbts_in_t[2][8]/F");
288 m_outputTree->Branch("mbts_out_e", &t_mbts_out_e, "mbts_out_e[2][4]/F");
289 m_outputTree->Branch("mbts_out_t", &t_mbts_out_t, "mbts_out_t[2][4]/F");
290
291 m_outputTree->Branch("T2mbts_in_e", &t_T2mbts_in_e, "T2mbts_in_e[2][8]/F");
292 m_outputTree->Branch("T2mbts_in_t", &t_T2mbts_in_t, "T2mbts_in_t[2][8]/F");
293 m_outputTree->Branch("T2mbts_out_e", &t_T2mbts_out_e, "T2mbts_out_e[2][4]/F");
294 m_outputTree->Branch("T2mbts_out_t", &t_T2mbts_out_t, "T2mbts_out_t[2][4]/F");
295
296 m_outputTree->Branch("L1ET", &t_L1ET, "L1ET/F");
297 m_outputTree->Branch("L1ET24", &t_L1ET24, "L1ET24/F");
298
299 m_outputTree->Branch("totalEt", &t_totalEt, "totalEt/F");
300 m_outputTree->Branch("totalEt_TTsum", &t_totalEt_TTsum, "totalEt_TTsum/F");
301
302 m_outputTree->Branch("totalEt24", &t_totalEt24, "totalEt24/F");
303 m_outputTree->Branch("totalEt24_TTsum", &t_totalEt24_TTsum, "totalEt24_TTsum/F");
304
305 m_outputTree->Branch("fcalEt", &t_fcalEt, "fcalEt/F");
306 m_outputTree->Branch("fcalEtA", &t_fcalEtA, "fcalEtA/F");
307 m_outputTree->Branch("fcalEtC", &t_fcalEtC, "fcalEtC/F");
308 m_outputTree->Branch("fcalEtA_TT", &t_fcalEtA_TT, "fcalEtA_TT/F");
309 m_outputTree->Branch("fcalEtC_TT", &t_fcalEtC_TT, "fcalEtC_TT/F");
310
311 m_outputTree->Branch("nvx", &t_nvx, "nvx/I");
312 m_outputTree->Branch("vx", &t_vx, "vx[3]/F");
313 m_outputTree->Branch("pvindex", &t_pvindex, "pvindex/I");
314 m_outputTree->Branch("vxntrk", &t_vxntrk, "vxntrk/I");
315 m_outputTree->Branch("vx_trk_index", "vector<int>", &t_vx_trk_index);
316 m_outputTree->Branch("vxtype", &t_vxtype, "vxtype/I");
317 m_outputTree->Branch("vxcov", &t_vxcov, "vxcov[6]/F");
318 m_outputTree->Branch("vxsumpt2", &t_vxsumpt2, "vxsumpt2/F");
319 m_outputTree->Branch("nstrong", &t_nstrong, "nstrong/I");
320 m_outputTree->Branch("puvxntrk", &t_puvxntrk, "puvxntrk/I");
321 m_outputTree->Branch("puvxsumpt", &t_puvxsumpt, "puvxsumpt/F");
322 m_outputTree->Branch("puvxz", &t_puvxz, "puvxz/F");
323 m_outputTree->Branch("vxnlooseprimary", &t_vxnlooseprimary, "vxnlooseprimary/I");
324 m_outputTree->Branch("vxnminbias", &t_vxnminbias, "vxnminbias/I");
325 m_outputTree->Branch("vxngoodmuon", &t_vxngoodmuon, "vxngoodmuon/I");
326
327 m_outputTree->Branch("t_nvtx", &t_nvtx, "nvtx/I");
328 m_outputTree->Branch("vtx_type", "vector<int8_t>", &t_vtx_type);
329 m_outputTree->Branch("vtx_x", "vector<float>", &t_vtx_x);
330 m_outputTree->Branch("vtx_y", "vector<float>", &t_vtx_y);
331 m_outputTree->Branch("vtx_z", "vector<float>", &t_vtx_z);
332 m_outputTree->Branch("vtx_ntrk_all", "vector<int16_t>", &t_vtx_ntrk_all);
333 m_outputTree->Branch("vtx_sumpt2_all", "vector<float>", &t_vtx_sumpt2_all);
334 m_outputTree->Branch("vtx_ntrk", "vector<int16_t>", &t_vtx_ntrk);
335 m_outputTree->Branch("vtx_sumpt2", "vector<float>", &t_vtx_sumpt2);
336 m_outputTree->Branch("vtx_trk_index", "vector< vector<int16_t> >", &t_vtx_trk_index);
337
338 m_outputTree->Branch("mbts_countA", &t_mbts_countA, "mbts_countA/s");
339 m_outputTree->Branch("mbts_countC", &t_mbts_countC, "mbts_countC/s");
340 m_outputTree->Branch("T2mbts_countAin", &t_T2mbts_countAin, "T2mbts_countAin/s");
341 m_outputTree->Branch("T2mbts_countCin", &t_T2mbts_countCin, "T2mbts_countCin/s");
342 m_outputTree->Branch("mbts_timeA", &t_mbts_timeA, "mbts_timeA/F");
343 m_outputTree->Branch("mbts_timeC", &t_mbts_timeC, "mbts_timeC/F");
344 m_outputTree->Branch("mbts_timeDiff", &t_mbts_timeDiff, "mbts_timeDiff/F");
345
346 t_nclus = 0;
347 m_outputTree->Branch("nclus", &t_nclus, "nclus/i");
348 m_outputTree->Branch("clusEt", &t_clusEt, "clusEt/F");
349 m_outputTree->Branch("clusEtMax", &t_clusEtMax, "clusEtMax/F");
350 m_outputTree->Branch("clusetaMax", &t_clusetaMax, "clusetaMax/F");
351 m_outputTree->Branch("clusphiMax", &t_clusphiMax, "clusphiMax/F");
352
353 m_outputTree->Branch("cc_pt", "vector<float>", &t_cc_pt);
354 m_outputTree->Branch("cc_eta", "vector<float>", &t_cc_eta);
355 m_outputTree->Branch("cc_phi", "vector<float>", &t_cc_phi);
356 m_outputTree->Branch("cc_e", "vector<float>", &t_cc_e);
357 m_outputTree->Branch("cc_raw_m", "vector<float>", &t_cc_raw_m);
358 m_outputTree->Branch("cc_raw_eta", "vector<float>", &t_cc_raw_eta);
359 m_outputTree->Branch("cc_raw_phi", "vector<float>", &t_cc_raw_phi);
360 m_outputTree->Branch("cc_raw_e", "vector<float>", &t_cc_raw_e);
361 m_outputTree->Branch("cc_raw_samp", "vector<vector<float>>", &t_cc_raw_samp);
362 m_outputTree->Branch("cc_sig", "vector<float>", &t_cc_sig);
363 m_outputTree->Branch("cc_layer", "vector<int>", &t_cc_layer);
364
365 m_outputTree->Branch("edgeGapA", &t_edgeGapA, "edgeGapA/F");
366 m_outputTree->Branch("edgeGapC", &t_edgeGapC, "edgeGapC/F");
367
368 m_outputTree->Branch("ntrk", &t_ntrk, "ntrk/i");
369 if (enableTracks)
370 {
371 m_outputTree->Branch("trk_pt", "vector<float>", &t_trk_pt);
372 m_outputTree->Branch("trk_eta", "vector<float>", &t_trk_eta);
373 m_outputTree->Branch("trk_theta", "vector<float>", &t_trk_theta);
374 m_outputTree->Branch("trk_phi", "vector<float>", &t_trk_phi);
375 m_outputTree->Branch("trk_e", "vector<float>", &t_trk_e);
376 m_outputTree->Branch("trk_index", "vector<int>", &t_trk_index);
377 m_outputTree->Branch("trk_d0", "vector<float>", &t_trk_d0);
378 m_outputTree->Branch("trk_z0", "vector<float>", &t_trk_z0);
379 m_outputTree->Branch("trk_vz", "vector<float>", &t_trk_vz);
380 m_outputTree->Branch("trk_vtxz", "vector<float>", &t_trk_vtxz);
381 m_outputTree->Branch("trk_pixeldEdx", "vector<float>", &t_trk_pixeldEdx);
382 m_outputTree->Branch("trk_charge", "vector<int8_t>", &t_trk_charge);
383 m_outputTree->Branch("trk_quality", "vector<int16_t>", &t_trk_quality);
384 m_outputTree->Branch("trk_nPixHits", "vector<uint8_t>", &t_trk_nPixHits);
385 m_outputTree->Branch("trk_nSctHits", "vector<uint8_t>", &t_trk_nSctHits);
386 m_outputTree->Branch("trk_nPixDead", "vector<uint8_t>", &t_trk_nPixDead);
387 m_outputTree->Branch("trk_nSctDead", "vector<uint8_t>", &t_trk_nSctDead);
388 m_outputTree->Branch("trk_nPixHoles", "vector<uint8_t>", &t_trk_nPixHoles);
389 m_outputTree->Branch("trk_nSctHoles", "vector<uint8_t>", &t_trk_nSctHoles);
390 m_outputTree->Branch("trk_nTrtHits", "vector<uint8_t>", &t_trk_nTrtHits);
391 m_outputTree->Branch("trk_nTrtOutliers", "vector<uint8_t>", &t_trk_nTrtOutliers);
392 m_outputTree->Branch("trk_inPixHits", "vector<uint8_t>", &t_trk_inPixHits);
393 m_outputTree->Branch("trk_exPixHits", "vector<uint8_t>", &t_trk_exPixHits);
394 m_outputTree->Branch("trk_ninPixHits", "vector<uint8_t>", &t_trk_ninPixHits);
395 m_outputTree->Branch("trk_nexPixHits", "vector<uint8_t>", &t_trk_nexPixHits);
396 }
397
399 m_outputTree->Branch("nProtons", &nProtons, "nProtons/i");
400 m_outputTree->Branch("proton_pt", "vector<double>", &proton_pt);
401 m_outputTree->Branch("proton_eta", "vector<double>", &proton_eta);
402 m_outputTree->Branch("proton_phi", "vector<double>", &proton_phi);
403 m_outputTree->Branch("proton_e", "vector<double>", &proton_e);
404 m_outputTree->Branch("proton_side", "vector<int>", &proton_side);
405 m_outputTree->Branch("proton_eLoss", "vector<double>", &proton_eLoss);
406 m_outputTree->Branch("proton_t", "vector<double>", &proton_t);
407 m_outputTree->Branch("proton_track_stationID", "vector<vector<int>>", &proton_track_stationID);
408 m_outputTree->Branch("proton_track_nClusters", "vector<vector<int>>", &proton_track_nClusters);
409 m_outputTree->Branch("proton_track_xLocal", "vector<vector<float>>", &proton_track_xLocal);
410 m_outputTree->Branch("proton_track_yLocal", "vector<vector<float>>", &proton_track_yLocal);
411 m_outputTree->Branch("proton_track_zLocal", "vector<vector<float>>", &proton_track_zLocal);
412 m_outputTree->Branch("proton_track_xSlope", "vector<vector<float>>", &proton_track_xSlope);
413 m_outputTree->Branch("proton_track_ySlope", "vector<vector<float>>", &proton_track_ySlope);
414 }
415
416 }
417 }
418
419 ANA_MSG_DEBUG("Anti-howdy from Initialize!");
420
421
422 // Here you do everything that you need to do after the first input
423 // file has been connected and before the first event is processed,
424 // e.g. create additional histograms based on which variables are
425 // available in the input files. You can also create all of your
426 // histograms and trees in here, but be aware that this method
427 // doesn't get called if no events are processed. So any objects
428 // you create here won't be available in the output if you have no
429 // input events.
430
431 ANA_MSG_INFO("enableOutputTree = " << enableOutputTree);
432 ANA_MSG_INFO("writeOnlyTriggers = " << writeOnlyTriggers);
433 ANA_MSG_INFO("enableOutputSamples = " << enableOutputSamples);
434 ANA_MSG_INFO("enableTrigger = " << enableTrigger);
435 ANA_MSG_INFO("enableRPD = " << enableRPD);
436 ANA_MSG_INFO("enableCentroid = " << enableCentroid);
437 ANA_MSG_INFO("zdcCalib = " << zdcCalib);
438 ANA_MSG_INFO("zdcInj = " << zdcInj);
439 ANA_MSG_INFO("zdcLaser = " << zdcLaser);
440 ANA_MSG_INFO("zdcConfig = " << zdcConfig);
441 ANA_MSG_INFO("reprocZdc = " << reprocZdc);
442 ANA_MSG_INFO("auxSuffix = " << auxSuffix );
443 ANA_MSG_INFO("zdcLowGainMode = " << zdcLowGainMode);
444 ANA_MSG_INFO("enableID = " << enableID);
445 ANA_MSG_INFO("enableCalo = " << enableCalo);
446 ANA_MSG_INFO("enableClusters = " << enableClusters);
447 ANA_MSG_INFO("trackLimit = " << trackLimit);
448 ANA_MSG_INFO("trackLimitReject = " << trackLimitReject);
449 ANA_MSG_INFO("isMC = " << m_isMC);
450 ANA_MSG_INFO("useGRL = " << useGRL);
451 ANA_MSG_INFO("grlFilename = " << grlFilename);
452 ANA_MSG_INFO("slimmed = " << slimmed);
453 ANA_MSG_INFO("zdcOnly = " << zdcOnly);
454 ANA_MSG_INFO("flipDelay = " << flipDelay);
455 ANA_MSG_INFO("nsamplesZdc = " << nsamplesZdc);
456 ANA_MSG_INFO("lhcf2022 = " << lhcf2022);
457 ANA_MSG_INFO("lhcf2022afp = " << lhcf2022afp);
458 ANA_MSG_INFO("lhcf2022zdc = " << lhcf2022zdc);
459 ANA_MSG_INFO("doZdcCalib = " << doZdcCalib);
460
461 ANA_MSG_DEBUG("initialize: Initialize!");
462
463
464 // GRL
465
466 if (useGRL)
467 {
468 const char* fullGRLFilePath = gSystem->ExpandPathName (grlFilename.c_str());
469 ANA_MSG_INFO("GRL: " << fullGRLFilePath);
470 std::vector<std::string> vecStringGRL;
471 vecStringGRL.push_back(fullGRLFilePath);
472 ANA_CHECK(m_grl.setProperty( "GoodRunsListVec", vecStringGRL));
473 ANA_CHECK(m_grl.setProperty("PassThrough", false)); // if true (default) will ignore result of GRL and will just pass all events
474 ANA_CHECK(m_grl.initialize());
475
476 }
477
478 if (enableTracks)
479 {
480 ANA_CHECK(m_selTool.retrieve());
481 }
482
483 if (enableTrigger) // HLT related
484 {
485 ANA_MSG_INFO("Trying to initialize TDT");
486 ANA_CHECK(m_trigDecisionTool.retrieve());
487 }
488
489 // ZDC re-reco tool
490 if (reprocZdc)
491 {
492 m_zdcAnalysisTool.setTypeAndName("ZDC::ZdcAnalysisTool/ZdcAnalysisTool");
493
494 ANA_MSG_INFO("Trying to configure ZDC Analysis Tool!");
495
496 ANA_CHECK(m_zdcAnalysisTool.setProperty("FlipEMDelay", flipDelay));
497 ANA_CHECK(m_zdcAnalysisTool.setProperty("LowGainMode", zdcLowGainMode));
498 ANA_CHECK(m_zdcAnalysisTool.setProperty("DoCalib", doZdcCalib));
499 ANA_CHECK(m_zdcAnalysisTool.setProperty("Configuration", zdcConfig));
500 ANA_CHECK(m_zdcAnalysisTool.setProperty("AuxSuffix", auxSuffix));
501 ANA_CHECK(m_zdcAnalysisTool.setProperty("ForceCalibRun", -1));
502
503 ANA_MSG_INFO("Setting up zdcConfig=" << zdcConfig);
504 if (zdcConfig=="LHCf2022")
505 {
506 ANA_CHECK(m_zdcAnalysisTool.setProperty("DoTrigEff", false)); // for now
507 ANA_CHECK(m_zdcAnalysisTool.setProperty("DoTimeCalib", false)); // for now
508 ANA_CHECK(m_zdcAnalysisTool.setProperty("Configuration", "LHCf2022"));
509 }
510 else if (zdcConfig == "PbPb2018")
511 {
512 ANA_CHECK(m_zdcAnalysisTool.setProperty("Configuration", "PbPb2018"));
513 }
514 else if (zdcConfig == "pPb2016")
515 {
516 ANA_CHECK(m_zdcAnalysisTool.setProperty("Configuration", "pPb2016"));
517 }
518 else if (zdcConfig == "PbPb2015")
519 {
520 ANA_CHECK(m_zdcAnalysisTool.setProperty("Configuration", "PbPb2015"));
521 }
522
523 if (flipDelay)
524 ANA_MSG_INFO("FLIP ZDC DELAY IN EM MODULES");
525 else
526 ANA_MSG_INFO("NO FLIP ZDC DELAY IN EM MODULES");
527
528
529 ANA_MSG_INFO("Trying to initialize ZDC Analysis Tool!");
530 ANA_CHECK(m_zdcAnalysisTool.initialize());
531 }
532
533 if (zdcInj)
534 {
535 m_zdcInjPulserAmpMap = std::make_shared<ZdcInjPulserAmpMap>();
536 ATH_MSG_INFO( "Using JSON file for injector-pulse voltage at path " << m_zdcInjPulserAmpMap->getFilePath() );
537 }
538
539 return StatusCode::SUCCESS;
540}
541
542
543
544StatusCode ZdcNtuple :: execute ()
545{
546 // Here you do everything that needs to be done on every single
547 // events, e.g. read input variables, apply cuts, and fill
548 // histograms and trees. This is where most of your actual analysis
549 // code will go.
550
551
552 // prefilter with a track limit
553
554 if (!evtStore())
555 {
556 ANA_MSG_INFO("*** No event found! ***");
557 return StatusCode::SUCCESS;
558 }
559
560 ANA_CHECK(evtStore()->retrieve( m_eventInfo, "EventInfo"));
562 if (zdcInj){
564 }
565
566 //tracks used to go here
567
569
570 if ((!(zdcCalib || zdcLaser || zdcOnly || zdcInj)) && enableID)
571 {
572 ANA_MSG_DEBUG("Trying to extract InDetTrackParticles from evtStore()=" << evtStore());
573 ANA_CHECK(evtStore()->retrieve( m_trackParticles, "InDetTrackParticles") );
574 size_t n = m_trackParticles->size();
575 ANA_MSG_DEBUG("Done w/ extracting InDetTrackParticles with size = " << n);
576
577 if (n > trackLimit && trackLimitReject) return StatusCode::SUCCESS;
578 }
579
580 bool passTrigger = true;
581 m_trigDecision = 0;
582 if (enableTrigger)
583 {
584 ANA_CHECK(evtStore()->retrieve( m_trigDecision, "xTrigDecision"));
586 passTrigger = processTriggerDecision();
587 }
588
589 if (reprocZdc){
590 ANA_MSG_INFO ("Reprocessing ZDC in ZdcNtuple");
591 ANA_CHECK(m_zdcAnalysisTool->reprocessZdc());
592 }else{
593 ANA_MSG_DEBUG ("No ZDC reprocessing");
594 }
595
596 processZdcNtupleFromModules(); // same model in both cases -- processZdcNtuple() goes straight to the anlaysis tool, which is good for debugging
597
598 if(m_isMC){
600 }
601
602 if (!(zdcCalib || zdcLaser || zdcOnly || zdcInj))
603 {
604
605 // PLEASE NOTE: the commented sections here will be restored once we have a better sense of the Run 3 HI data
606
607 // Global E_T quantities for centrality
608 if (enableCalo){
609 ANA_CHECK(evtStore()->retrieve( m_caloSums, "CaloSums") );
610 ANA_CHECK(evtStore()->retrieve( m_eventShapes, "HIEventShape") );
611
613 ANA_CHECK(evtStore()->retrieve( m_lvl1EnergySumRoI, "LVL1EnergySumRoI") );
614
615 processFCal();
616 }
617
618 // MBTS quantities, but may require a derivation to be accessible (required STDM6 in pp)
619 //ANA_CHECK(evtStore()->retrieve( m_mbtsInfo, "MBTSForwardEventInfo") );
620 //ANA_CHECK(evtStore()->retrieve( m_mbtsModules, "MBTSModules") );
621 //m_trigT2MbtsBits = 0;
622 //ANA_CHECK(evtStore()->retrieve( m_trigT2MbtsBits, "HLT_xAOD__TrigT2MbtsBitsContainer_T2Mbts") );
623 //processMBTS();
624
625 if (enableID){
626 ANA_CHECK(evtStore()->retrieve( m_primaryVertices, "PrimaryVertices") );
627 processInDet();
628 }
629
630
631 if (enableClusters){
632 ANA_CHECK(evtStore()->retrieve( m_caloClusters, "CaloCalTopoClusters"));
634 }
635
636 // Gaps will require some evaluation of Run 3 performance of the clusters
637 //processGaps();
638
640 ANA_CHECK(evtStore()->retrieve( m_afpProtons, "AFPProtonContainer"));
642 }
643 }
644
645 // if trigger enabled, only write out events which pass one of them, unless using MC
646
647 if (enableTrigger && !passTrigger && !m_isMC && writeOnlyTriggers) return StatusCode::SUCCESS;
648
649
651 {
652 tree( "zdcTree" )->Fill();
653 }
654
655 return StatusCode::SUCCESS;
656}
657
659{
660
663
664 ANA_MSG_DEBUG ("copying already processed info!");
665
666 //Reset the truth separately since it has a different range
667 for(int iside : {0,1}){
668 for(int imod = 0; imod < 7; ++imod){
669 t_ZdcModuleTruthTotal[iside][imod] = 0;
670 t_ZdcModuleTruthInvis[iside][imod] = 0;
671 t_ZdcModuleTruthEM[iside][imod] = 0;
672 t_ZdcModuleTruthNonEM[iside][imod] = 0;
673 t_ZdcModuleTruthEscaped[iside][imod] = 0;
674 t_ZdcModuleTruthNphotons[iside][imod] = 0;
675 }
676 for(int ch = 0; ch < 16; ++ch){
677 t_RpdModuleTruthNphotons[iside][ch] = 0;
678 }
679 }
680
681 for (size_t iside = 0; iside < 2; iside++)
682 {
683 t_ZdcAmp[iside] = 0; t_ZdcEnergy[iside] = 0; t_ZdcEnergyErr[iside] = 0;t_ZdcTime[iside] = 0; t_ZdcStatus[iside] = 0;
684 t_ZdcNLEnergy[iside] = 0;t_ZdcNLEnergyErr[iside] = 0;
685 t_ZdcTrigEff[iside] = 0;t_ZdcLucrodTriggerSideAmp[iside] = 0; t_ZdcLucrodTriggerSideAmpLG[iside] = 0; t_ZdcTruthTotal[iside] = 0;
686 t_ZdcTruthInvis[iside] = 0; t_ZdcTruthEM[iside] = 0; t_ZdcTruthNonEM[iside] = 0;
687 t_ZdcTruthEscaped[iside] = 0;
688 for (int imod = 0; imod < 4; imod++)
689 {
690 t_ZdcModuleAmp[iside][imod] = 0; t_ZdcModuleTime[iside][imod] = 0; t_ZdcModuleStatus[iside][imod] = 0;
691
692 t_ZdcModuleCalibAmp[iside][imod] = 0; t_ZdcModuleCalibTime[iside][imod] = 0; t_ZdcModuleChisq[iside][imod] = 0; t_ZdcModuleFitAmp[iside][imod] = 0;
693 t_ZdcModuleFitT0[iside][imod] = 0; t_ZdcModuleBkgdMaxFraction[iside][imod] = 0; t_ZdcModuleAmpError[iside][imod] = 0;
694 t_ZdcModuleMinDeriv2nd[iside][imod] = 0; t_ZdcModulePresample[iside][imod] = 0; t_ZdcModulePreSampleAmp[iside][imod] = 0;
695 t_ZdcLucrodTriggerAmp[iside][imod] = 0;t_ZdcLucrodTriggerAmpLG[iside][imod] = 0;
696 t_ZdcModuleMaxADC[iside][imod] = 0; t_ZdcModuleMaxADCHG[iside][imod] = 0; t_ZdcModuleMaxADCLG[iside][imod] = 0;
697 t_ZdcModulePeakADCHG[iside][imod] = 0; t_ZdcModulePeakADCLG[iside][imod] = 0;
698 t_ZdcModuleAmpLGRefit[iside][imod] = 0; t_ZdcModuleAmpCorrLGRefit[iside][imod] = 0;
699 t_ZdcModuleT0LGRefit[iside][imod] = 0; t_ZdcModuleT0SubLGRefit[iside][imod] = 0; t_ZdcModuleChisqLGRefit[iside][imod] = 0;
700
702 {
703 for (int ig=0;ig<2;ig++)
704 {
705 for (int id=0;id<2;id++)
706 {
707 for (unsigned int isamp=0;isamp<nsamplesZdc;isamp++)
708 {
709 if (nsamplesZdc==7) t_raw7[iside][imod][ig][id][isamp]=0;
710 if (nsamplesZdc==15) t_raw15[iside][imod][ig][id][isamp]=0;
711 if (nsamplesZdc==24) t_raw24[iside][imod][ig][id][isamp]=0;
712 if (nsamplesZdc==32) t_raw32[iside][imod][ig][id][isamp]=0;
713 if (nsamplesZdc==40) t_raw40[iside][imod][ig][id][isamp]=0;
714 }
715 }
716 }
717 if (nsamplesZdc==24||nsamplesZdc==32||nsamplesZdc==40)
718 {
719 for (int ch=0;ch<16;ch++)
720 {
721 for (unsigned int isamp=0;isamp<nsamplesZdc;isamp++)
722 {
723 t_rpdRaw[iside][ch][isamp]=0;
724 }
725 }
726 }
727 }
728 if (enableRPD)
729 {
730 for (int ch = 0; ch < 16; ch++) {
731 t_RpdChannelBaseline[iside][ch] = 0;
732 std::fill(t_RpdChannelPileupExpFitParams[iside][ch], t_RpdChannelPileupExpFitParams[iside][ch] + 2, 0);
734 std::fill(t_RpdChannelPileupExpFitParamErrs[iside][ch], t_RpdChannelPileupExpFitParamErrs[iside][ch] + 2, 0);
736 t_RpdChannelPileupExpFitMSE[iside][ch] = 0;
738 t_RpdChannelAmplitude[iside][ch] = 0;
739 t_RpdChannelAmplitudeCalib[iside][ch] = 0;
740 t_RpdChannelMaxADC[iside][ch] = 0;
741 t_RpdChannelMaxADCCalib[iside][ch] = 0;
742 t_RpdChannelMaxSample[iside][ch] = 0;
743 t_RpdChannelStatus[iside][ch] = 0;
744 t_RpdChannelPileupFrac[iside][ch] = 0;
745 }
746 t_RpdSideStatus[iside] = 0;
747 }
748 if (enableCentroid)
749 {
750 t_centroidStatus[iside] = 0;
751 std::fill(t_RPDChannelSubtrAmp[iside], t_RPDChannelSubtrAmp[iside] + 16, 0);
752 t_RPDSubtrAmpSum[iside] = 0;
755 t_xCentroidPreAvgSubtr[iside] = 0;
756 t_yCentroidPreAvgSubtr[iside] = 0;
757 t_xCentroid[iside] = 0;
758 t_yCentroid[iside] = 0;
759 std::fill(t_xRowCentroid[iside], t_xRowCentroid[iside] + 4, 0);
760 std::fill(t_yColCentroid[iside], t_yColCentroid[iside] + 4, 0);
761 t_reactionPlaneAngle[iside] = 0;
762 }
763 }
764 }
765
766 t_ZdcModuleMask = 0;
767 if (enableCentroid) {
769 t_centroidEventValid = false;
771 }
772
773 /*
774 if (t_zdcEventInfoError == xAOD::EventInfo::Error)
775 {
776 ANA_MSG_INFO("ZDC event failed EventInfo error check - aborting!");
777 return;
778 }
779 */
780
781 static const SG::ConstAccessor<char> centroidEventValidAcc("centroidEventValid" + auxSuffix);
782 static const SG::ConstAccessor<float> cosDeltaReactionPlaneAngleAcc("cosDeltaReactionPlaneAngle" + auxSuffix);
783 static const SG::ConstAccessor<float> CalibEnergyAcc("CalibEnergy"+auxSuffix);
784 static const SG::ConstAccessor<float> CalibEnergyErrAcc("CalibEnergyErr"+auxSuffix);
785 static const SG::ConstAccessor<float> NLCalibEnergyAcc("NLCalibEnergy"+auxSuffix);
786 static const SG::ConstAccessor<float> NLCalibEnergyErrAcc("NLCalibEnergyErr"+auxSuffix);
787 static const SG::ConstAccessor<float> UncalibSumAcc("UncalibSum"+auxSuffix);
788 static const SG::ConstAccessor<float> UncalibSumErrAcc("UncalibSumErr"+auxSuffix);
789 static const SG::ConstAccessor<float> AverageTimeAcc("AverageTime"+auxSuffix);
790 static const SG::ConstAccessor<unsigned int> StatusAcc("Status"+auxSuffix);
791 static const SG::ConstAccessor<unsigned int> ModuleMaskAcc("ModuleMask"+auxSuffix);
792 static const SG::ConstAccessor<float> TruthTotalEnergyAcc("TruthTotalEnergy" + auxSuffix);
793 static const SG::ConstAccessor<float> TruthInvisibleEnergyAcc("TruthInvisibleEnergy" + auxSuffix);
794 static const SG::ConstAccessor<float> TruthEMEnergyAcc("TruthEMEnergy" + auxSuffix);
795 static const SG::ConstAccessor<float> TruthNonEMEnergyAcc("TruthNonEMEnergy" + auxSuffix);
796 static const SG::ConstAccessor<float> TruthEscapedEnergyAcc("TruthEscapedEnergy" + auxSuffix);
797 static const SG::ConstAccessor<unsigned int> centroidStatusAcc("centroidStatus" + auxSuffix);
798 static const SG::ConstAccessor<std::vector<float> > RPDChannelSubtrAmpAcc("RPDChannelSubtrAmp" + auxSuffix);
799 static const SG::ConstAccessor<float> RPDSubtrAmpSumAcc("RPDSubtrAmpSum" + auxSuffix);
800 static const SG::ConstAccessor<float> xCentroidPreGeomCorPreAvgSubtrAcc("xCentroidPreGeomCorPreAvgSubtr" + auxSuffix);
801 static const SG::ConstAccessor<float> yCentroidPreGeomCorPreAvgSubtrAcc("yCentroidPreGeomCorPreAvgSubtr" + auxSuffix);
802 static const SG::ConstAccessor<float> xCentroidPreAvgSubtrAcc("xCentroidPreAvgSubtr" + auxSuffix);
803 static const SG::ConstAccessor<float> yCentroidPreAvgSubtrAcc("yCentroidPreAvgSubtr" + auxSuffix);
804 static const SG::ConstAccessor<float> xCentroidAcc("xCentroid" + auxSuffix);
805 static const SG::ConstAccessor<float> yCentroidAcc("yCentroid" + auxSuffix);
806 static const SG::ConstAccessor<std::vector<float> > xRowCentroidAcc("xRowCentroid" + auxSuffix);
807 static const SG::ConstAccessor<std::vector<float> > yColCentroidAcc("yColCentroid" + auxSuffix);
808 static const SG::ConstAccessor<float> reactionPlaneAngleAcc("reactionPlaneAngle" + auxSuffix);
809 static const SG::ConstAccessor<unsigned int> RPDStatusAcc("RPDStatus" + auxSuffix);
810 static const SG::ConstAccessor<unsigned int> nPhotonsAcc("nPhotons" + auxSuffix);
811 static const SG::ConstAccessor<float> CalibTimeAcc("CalibTime" + auxSuffix);
812 static const SG::ConstAccessor<float> AmplitudeAcc("Amplitude" + auxSuffix);
813 static const SG::ConstAccessor<float> TimeAcc("Time" + auxSuffix);
814 static const SG::ConstAccessor<float> ChisqAcc("Chisq" + auxSuffix);
815 static const SG::ConstAccessor<float> FitAmpAcc("FitAmp" + auxSuffix);
816 static const SG::ConstAccessor<float> FitAmpErrorAcc("FitAmpError" + auxSuffix);
817 static const SG::ConstAccessor<float> FitT0Acc("FitT0" + auxSuffix);
818 static const SG::ConstAccessor<float> BkgdMaxFractionAcc("BkgdMaxFraction" + auxSuffix);
819 static const SG::ConstAccessor<float> MinDeriv2ndAcc("MinDeriv2nd" + auxSuffix);
820 static const SG::ConstAccessor<float> PresampleAcc("Presample" + auxSuffix);
821 static const SG::ConstAccessor<float> PreSampleAmpAcc("PreSampleAmp" + auxSuffix);
822 static const SG::ConstAccessor<float> RPDChannelBaselineAcc("RPDChannelBaseline" + auxSuffix);
823 static const SG::ConstAccessor<std::vector<float> > RPDChannelPileupExpFitParamsAcc("RPDChannelPileupExpFitParams" + auxSuffix);
824 static const SG::ConstAccessor<std::vector<float> > RPDChannelPileupExpFitParamErrsAcc("RPDChannelPileupExpFitParamErrs" + auxSuffix);
825 static const SG::ConstAccessor<std::vector<float> > RPDChannelPileupStretchedExpFitParamsAcc("RPDChannelPileupStretchedExpFitParams" + auxSuffix);
826 static const SG::ConstAccessor<std::vector<float> > RPDChannelPileupStretchedExpFitParamErrsAcc("RPDChannelPileupStretchedExpFitParamErrs" + auxSuffix);
827 static const SG::ConstAccessor<float> RPDChannelPileupExpFitMSEAcc("RPDChannelPileupExpFitMSE" + auxSuffix);
828 static const SG::ConstAccessor<float> RPDChannelPileupStretchedExpFitMSEAcc("RPDChannelPileupStretchedExpFitMSE" + auxSuffix);
829 static const SG::ConstAccessor<float> RPDChannelAmplitudeAcc("RPDChannelAmplitude" + auxSuffix);
830 static const SG::ConstAccessor<float> RPDChannelAmplitudeCalibAcc("RPDChannelAmplitudeCalib" + auxSuffix);
831 static const SG::ConstAccessor<float> RPDChannelMaxADCAcc("RPDChannelMaxADC" + auxSuffix);
832 static const SG::ConstAccessor<float> RPDChannelMaxADCCalibAcc("RPDChannelMaxADCCalib" + auxSuffix);
833 static const SG::ConstAccessor<unsigned int> RPDChannelMaxSampleAcc("RPDChannelMaxSample" + auxSuffix);
834 static const SG::ConstAccessor<unsigned int> RPDChannelStatusAcc("RPDChannelStatus" + auxSuffix);
835 static const SG::ConstAccessor<float> RPDChannelPileupFracAcc("RPDChannelPileupFrac" + auxSuffix);
836 static const SG::ConstAccessor<float> AmpLGRefitAcc("AmpLGRefit" + auxSuffix);
837 static const SG::ConstAccessor<float> T0LGRefitAcc("T0LGRefit" + auxSuffix);
838 static const SG::ConstAccessor<float> T0SubLGRefitAcc("T0SubLGRefit" + auxSuffix);
839 static const SG::ConstAccessor<float> ChisqLGRefitAcc("ChisqLGRefit" + auxSuffix);
840
841 static const SG::ConstAccessor<uint16_t> LucrodTriggerAmpAcc("LucrodTriggerAmp");
842 static const SG::ConstAccessor<uint16_t> LucrodTriggerAmpLGAcc("LucrodTriggerAmpLG");
843 static const SG::ConstAccessor<uint16_t> LucrodTriggerSideAmpAcc("LucrodTriggerSideAmp");
844 static const SG::ConstAccessor<uint16_t> LucrodTriggerSideAmpLGAcc("LucrodTriggerSideAmpLG");
845 static const SG::ConstAccessor<float> Amplitude0Acc("Amplitude");
846 static const SG::ConstAccessor<float> MaxADCAcc("MaxADC");
847 static const SG::ConstAccessor<float> MaxADCHGAcc("MaxADCHG");
848 static const SG::ConstAccessor<float> MaxADCLGAcc("MaxADCLG");
849 static const SG::ConstAccessor<float> PeakADCHGAcc("PeakADCHG");
850 static const SG::ConstAccessor<float> PeakADCLGAcc("PeakADCLG");
851 static const SG::ConstAccessor<std::vector<uint16_t> > g0d0DataAcc("g0d0Data");
852 static const SG::ConstAccessor<std::vector<uint16_t> > g0d1DataAcc("g0d1Data");
853 static const SG::ConstAccessor<std::vector<uint16_t> > g1d0DataAcc("g1d0Data");
854 static const SG::ConstAccessor<std::vector<uint16_t> > g1d1DataAcc("g1d1Data");
855 static const SG::ConstAccessor<std::vector<uint16_t> > g0dataAcc("g0data");
856 static const SG::ConstAccessor<std::vector<uint16_t> > g1dataAcc("g1data");
857
860 t_rpdDecodingError = rpdErr;
861 t_zdcDecodingError = zdcErr;
862 if (enableCentroid) {
863 // locate global sum (only if centroid is needed)
864 xAOD::ZdcModule const * globalSum = nullptr;
865 for (auto const * zdcSum : *zdcSums) {
866 if (zdcSum->zdcSide() == 0) {
867 globalSum = zdcSum;
868 break;
869 }
870 }
871 if (!globalSum) {
872 ANA_MSG_ERROR("unable to locate global ZdcSum (side = 0)");
874 }
875 else {
876 t_centroidDecorationsAvailable = centroidStatusAcc.isAvailable(*globalSum);
877 }
878 }
879
880 if (rpdErr||zdcErr) ANA_MSG_WARNING( "Decoding errors ZDC=" << zdcErr << " RPD=" << rpdErr );
881
882 if (zdcSums.ptr())
883 {
884 ANA_MSG_DEBUG( "accessing ZdcSums" );
885 for (const auto zdcSum : *zdcSums)
886 {
887 if (zdcSum->zdcSide()==0) {
888 // trap new global sum
890 t_centroidEventValid = centroidEventValidAcc(*zdcSum);
891 t_cosDeltaReactionPlaneAngle = cosDeltaReactionPlaneAngleAcc(*zdcSum);
892 }
893 // no other branches are filled from global sum - skip to the real sides (C=-1 and A=1)
894 continue;
895 }
896 int iside = 0;
897 if (zdcSum->zdcSide() > 0) iside = 1;
898
899 //static SG::AuxElement::ConstAccessor< float > acc( "CalibEnergy" );
900 //t_ZdcEnergy[iside] = acc(*zdcSum);
901
902 if (enableZDC && !zdcErr)
903 {
904 t_ZdcEnergy[iside] = CalibEnergyAcc(*zdcSum);
905 t_ZdcEnergyErr[iside] = CalibEnergyErrAcc(*zdcSum);
906 t_ZdcNLEnergy[iside] = NLCalibEnergyAcc(*zdcSum);
907 t_ZdcNLEnergyErr[iside] = NLCalibEnergyErrAcc(*zdcSum);
908
909 t_ZdcAmp[iside] = UncalibSumAcc(*zdcSum);
910 t_ZdcAmpErr[iside] = UncalibSumErrAcc(*zdcSum);
911 if (LucrodTriggerSideAmpAcc.isAvailable(*zdcSum))
912 t_ZdcLucrodTriggerSideAmp[iside] = LucrodTriggerSideAmpAcc(*zdcSum);
913 if (LucrodTriggerSideAmpLGAcc.isAvailable(*zdcSum))
914 t_ZdcLucrodTriggerSideAmpLG[iside] = LucrodTriggerSideAmpLGAcc(*zdcSum);
915
916 ANA_MSG_VERBOSE("processZdcNtupleFromModules: ZdcSum energy = " << t_ZdcEnergy[iside]);
917
918 t_ZdcTime[iside] = AverageTimeAcc(*zdcSum);
919 t_ZdcStatus[iside] = StatusAcc(*zdcSum);
920 t_ZdcModuleMask += ( ModuleMaskAcc(*zdcSum) << 4 * iside);
921
922 if(m_isMC){
923 ANA_MSG_DEBUG("Filling sum truth");
924 t_ZdcTruthTotal [iside] = TruthTotalEnergyAcc(*zdcSum);
925 t_ZdcTruthInvis [iside] = TruthInvisibleEnergyAcc(*zdcSum);
926 t_ZdcTruthEM [iside] = TruthEMEnergyAcc(*zdcSum);
927 t_ZdcTruthNonEM [iside] = TruthNonEMEnergyAcc(*zdcSum);
928 t_ZdcTruthEscaped[iside] = TruthEscapedEnergyAcc(*zdcSum);
929 }
930
931 }
932
933 if (enableRPD)
934 {
935 if (enableRPDAmp && !rpdErr)
936 {
937 t_RpdSideStatus[iside] = RPDStatusAcc(*zdcSum);
938 }
940 {
941 t_centroidStatus[iside] = centroidStatusAcc(*zdcSum);
942 std::vector<float> const& rpdChannelSubtrAmp = RPDChannelSubtrAmpAcc(*zdcSum);
943 std::copy(rpdChannelSubtrAmp.begin(), rpdChannelSubtrAmp.end(), t_RPDChannelSubtrAmp[iside]);
944 t_RPDSubtrAmpSum[iside] = RPDSubtrAmpSumAcc(*zdcSum);
945 t_xCentroidPreGeomCorPreAvgSubtr[iside] = xCentroidPreGeomCorPreAvgSubtrAcc(*zdcSum);
946 t_yCentroidPreGeomCorPreAvgSubtr[iside] = yCentroidPreGeomCorPreAvgSubtrAcc(*zdcSum);
947 t_xCentroidPreAvgSubtr[iside] = xCentroidPreAvgSubtrAcc(*zdcSum);
948 t_yCentroidPreAvgSubtr[iside] = yCentroidPreAvgSubtrAcc(*zdcSum);
949 t_xCentroid[iside] = xCentroidAcc(*zdcSum);
950 t_yCentroid[iside] = yCentroidAcc(*zdcSum);
951 std::vector<float> const& xRowCentroid = xRowCentroidAcc(*zdcSum);
952 std::copy(xRowCentroid.begin(), xRowCentroid.end(), t_xRowCentroid[iside]);
953 std::vector<float> const& yColCentroid = yColCentroidAcc(*zdcSum);
954 std::copy(yColCentroid.begin(), yColCentroid.end(), t_yColCentroid[iside]);
955 t_reactionPlaneAngle[iside] = reactionPlaneAngleAcc(*zdcSum);
956 }
957 }
958 }
959 }
960
961 ANA_MSG_DEBUG( "accessing ZdcModules" );
962
963 if (zdcModules.ptr())
964 {
965 for (const auto zdcMod : *zdcModules)
966 {
967 int iside = 0;
968 if (zdcMod->zdcSide() > 0) iside = 1;
969 int imod = zdcMod->zdcModule();
970
971 if (m_isMC){
972 //Calib hits are only stored in channel 0 of the RPD
973 if(!(imod == 4 && zdcMod->zdcChannel() != 0)){
974 t_ZdcModuleTruthTotal [iside][imod] = TruthTotalEnergyAcc(*zdcMod);
975 t_ZdcModuleTruthInvis [iside][imod] = TruthInvisibleEnergyAcc(*zdcMod);
976 t_ZdcModuleTruthEM [iside][imod] = TruthEMEnergyAcc(*zdcMod);
977 t_ZdcModuleTruthNonEM [iside][imod] = TruthNonEMEnergyAcc(*zdcMod);
978 t_ZdcModuleTruthEscaped[iside][imod] = TruthEscapedEnergyAcc(*zdcMod);
979 t_ZdcModuleTruthNphotons[iside][imod] = nPhotonsAcc(*zdcMod);
980 }
981 //Calib hits are stored for all modules
982 //Other data is only valid for module 1-4
983 if(imod > 4) continue;
984 }
985
986 ANA_MSG_VERBOSE ("Module " << zdcMod->zdcSide() << " " << zdcMod->zdcModule() << " amp:" << AmplitudeAcc(*zdcMod));
987
988 if (zdcMod->zdcType() == 0 && !zdcErr)
989 {
990 // ZDC energy type modules
991 t_ZdcModuleCalibAmp[iside][imod] = CalibEnergyAcc(*zdcMod);
992 t_ZdcModuleCalibTime[iside][imod] = CalibTimeAcc(*zdcMod);
993 t_ZdcModuleStatus[iside][imod] = StatusAcc(*zdcMod);
994 if (t_ZdcModuleAmp[iside][imod] != 0.)
995 Warning("processZdcNtupleFromModules", "overwriting side %d module %d!", iside, imod);
996 t_ZdcModuleAmp[iside][imod] = AmplitudeAcc(*zdcMod);
997 t_ZdcModuleTime[iside][imod] = TimeAcc(*zdcMod);
998
999 t_ZdcModuleChisq[iside][imod] = ChisqAcc(*zdcMod);
1000 t_ZdcModuleFitAmp[iside][imod] = FitAmpAcc(*zdcMod);
1001 t_ZdcModuleAmpError[iside][imod] = FitAmpErrorAcc(*zdcMod);
1002 t_ZdcModuleFitT0[iside][imod] = FitT0Acc(*zdcMod);
1003 t_ZdcModuleBkgdMaxFraction[iside][imod] = BkgdMaxFractionAcc(*zdcMod);
1004 t_ZdcModuleMinDeriv2nd[iside][imod] = MinDeriv2ndAcc(*zdcMod);
1005 t_ZdcModulePresample[iside][imod] = PresampleAcc(*zdcMod);
1006 t_ZdcModulePreSampleAmp[iside][imod] = PreSampleAmpAcc(*zdcMod);
1007
1008 if (AmpLGRefitAcc.isAvailable(*zdcMod)) {
1009 t_ZdcModuleAmpLGRefit[iside][imod] = AmpLGRefitAcc(*zdcMod);
1010 t_ZdcModuleT0LGRefit[iside][imod] = T0LGRefitAcc(*zdcMod);
1011 t_ZdcModuleT0SubLGRefit[iside][imod] = T0SubLGRefitAcc(*zdcMod);
1012 t_ZdcModuleChisqLGRefit[iside][imod] = ChisqLGRefitAcc(*zdcMod);
1013 }
1014
1015 if (LucrodTriggerAmpAcc.isAvailable(*zdcMod))
1016 t_ZdcLucrodTriggerAmp[iside][imod] = LucrodTriggerAmpAcc(*zdcMod);
1017 if (LucrodTriggerAmpLGAcc.isAvailable(*zdcMod))
1018 t_ZdcLucrodTriggerAmpLG[iside][imod] = LucrodTriggerAmpLGAcc(*zdcMod);
1019
1020 if (MaxADCAcc.isAvailable(*zdcMod))
1021 t_ZdcModuleMaxADC[iside][imod] = MaxADCAcc(*zdcMod);
1022 if (MaxADCHGAcc.isAvailable(*zdcMod))
1023 t_ZdcModuleMaxADCHG[iside][imod] = MaxADCHGAcc(*zdcMod);
1024 if (MaxADCLGAcc.isAvailable(*zdcMod))
1025 t_ZdcModuleMaxADCLG[iside][imod] = MaxADCLGAcc(*zdcMod);
1026 if (PeakADCHGAcc.isAvailable(*zdcMod))
1027 t_ZdcModulePeakADCHG[iside][imod] = PeakADCHGAcc(*zdcMod);
1028 if (PeakADCLGAcc.isAvailable(*zdcMod))
1029 t_ZdcModulePeakADCLG[iside][imod] = PeakADCLGAcc(*zdcMod);
1030
1031 if (enableOutputSamples && !zdcErr)
1032 {
1033 for (unsigned int isamp = 0; isamp < nsamplesZdc; isamp++) // 7 samples
1034 {
1035 if (nsamplesZdc == 7)
1036 {
1037 t_raw7[iside][imod][0][0][isamp] = g0d0DataAcc(*zdcMod).at(isamp);
1038 t_raw7[iside][imod][0][1][isamp] = g0d1DataAcc(*zdcMod).at(isamp);
1039 t_raw7[iside][imod][1][0][isamp] = g1d0DataAcc(*zdcMod).at(isamp);
1040 t_raw7[iside][imod][1][1][isamp] = g1d1DataAcc(*zdcMod).at(isamp);
1041 }
1042
1043 if (nsamplesZdc == 15)
1044 {
1045 t_raw15[iside][imod][0][0][isamp] = g0d0DataAcc(*zdcMod).at(isamp);
1046 t_raw15[iside][imod][0][1][isamp] = g0d1DataAcc(*zdcMod).at(isamp);
1047 t_raw15[iside][imod][1][0][isamp] = g1d0DataAcc(*zdcMod).at(isamp);
1048 t_raw15[iside][imod][1][1][isamp] = g1d1DataAcc(*zdcMod).at(isamp);
1049 }
1050
1051 if (nsamplesZdc == 24)
1052 {
1053 t_raw24[iside][imod][0][0][isamp] = g0dataAcc(*zdcMod).at(isamp);
1054 t_raw24[iside][imod][1][0][isamp] = g1dataAcc(*zdcMod).at(isamp);
1055 }
1056 if (nsamplesZdc == 32)
1057 {
1058 t_raw32[iside][imod][0][0][isamp] = g0dataAcc(*zdcMod).at(isamp);
1059 t_raw32[iside][imod][1][0][isamp] = g1dataAcc(*zdcMod).at(isamp);
1060 }
1061 if (nsamplesZdc == 40)
1062 {
1063 t_raw40[iside][imod][0][0][isamp] = g0dataAcc(*zdcMod).at(isamp);
1064 t_raw40[iside][imod][1][0][isamp] = g1dataAcc(*zdcMod).at(isamp);
1065 }
1066 }
1067 }
1068 }
1069 else if (zdcMod->zdcType() == 1 && nsamplesZdc == 24)
1070 {
1071 // this is the RPD
1072 if (enableRPD)
1073 {
1074 if (enableRPDAmp && !rpdErr)
1075 {
1076 t_RpdChannelBaseline[iside][zdcMod->zdcChannel()] = RPDChannelBaselineAcc(*zdcMod);
1077 std::vector<float> const &rpdChannelPileupExpFitParams = RPDChannelPileupExpFitParamsAcc(*zdcMod);
1078 std::copy(rpdChannelPileupExpFitParams.begin(), rpdChannelPileupExpFitParams.end(), t_RpdChannelPileupExpFitParams[iside][zdcMod->zdcChannel()]);
1079 std::vector<float> const &rpdChannelPileupExpFitParamErrs = RPDChannelPileupExpFitParamErrsAcc(*zdcMod);
1080 std::copy(rpdChannelPileupExpFitParamErrs.begin(), rpdChannelPileupExpFitParamErrs.end(), t_RpdChannelPileupExpFitParamErrs[iside][zdcMod->zdcChannel()]);
1081 std::vector<float> const &rpdChannelPileupStretchedExpFitParams = RPDChannelPileupStretchedExpFitParamsAcc(*zdcMod);
1082 std::copy(rpdChannelPileupStretchedExpFitParams.begin(), rpdChannelPileupStretchedExpFitParams.end(), t_RpdChannelPileupStretchedExpFitParams[iside][zdcMod->zdcChannel()]);
1083 std::vector<float> const &rpdChannelPileupStretchedExpFitParamErrs = RPDChannelPileupStretchedExpFitParamErrsAcc(*zdcMod);
1084 std::copy(rpdChannelPileupStretchedExpFitParamErrs.begin(), rpdChannelPileupStretchedExpFitParamErrs.end(), t_RpdChannelPileupStretchedExpFitParamErrs[iside][zdcMod->zdcChannel()]);
1085 t_RpdChannelPileupExpFitMSE[iside][zdcMod->zdcChannel()] = RPDChannelPileupExpFitMSEAcc(*zdcMod);
1086 t_RpdChannelPileupStretchedExpFitMSE[iside][zdcMod->zdcChannel()] = RPDChannelPileupStretchedExpFitMSEAcc(*zdcMod);
1087 t_RpdChannelAmplitude[iside][zdcMod->zdcChannel()] = RPDChannelAmplitudeAcc(*zdcMod);
1088 t_RpdChannelAmplitudeCalib[iside][zdcMod->zdcChannel()] = RPDChannelAmplitudeCalibAcc(*zdcMod);
1089 t_RpdChannelMaxADC[iside][zdcMod->zdcChannel()] = RPDChannelMaxADCAcc(*zdcMod);
1090 t_RpdChannelMaxADCCalib[iside][zdcMod->zdcChannel()] = RPDChannelMaxADCCalibAcc(*zdcMod);
1091 t_RpdChannelMaxSample[iside][zdcMod->zdcChannel()] = RPDChannelMaxSampleAcc(*zdcMod);
1092 t_RpdChannelStatus[iside][zdcMod->zdcChannel()] = RPDChannelStatusAcc(*zdcMod);
1093 t_RpdChannelPileupFrac[iside][zdcMod->zdcChannel()] = RPDChannelPileupFracAcc(*zdcMod);
1094 if(m_isMC){
1095 t_RpdModuleTruthNphotons[iside][zdcMod->zdcChannel()] = nPhotonsAcc(*zdcMod);
1096 }
1097 }
1099 {
1100 std::vector<uint16_t> const &rpdChannelRaw = g0dataAcc(*zdcMod);
1101 std::copy(rpdChannelRaw.begin(), rpdChannelRaw.end(), t_rpdRaw[iside][zdcMod->zdcChannel()]);
1102 }
1103 }
1104 }
1105 }
1106 }
1107 else
1108 {
1109 ANA_MSG_INFO("No ZdcModules" << auxSuffix << " when expected!");
1110 }
1111
1112 if (msgLvl (MSG::VERBOSE))
1113 {
1114 std::ostringstream message;
1115 message << "Dump zdc_ZdcModuleAmp: ";
1116 for (int iside = 0; iside < 2; iside++)
1117 {
1118 for (int imod = 0; imod < 4; imod++)
1119 {
1120 message << t_ZdcModuleAmp[iside][imod] << " ";
1121 }
1122 }
1123 }
1124}
1125
1127 /******************************************
1128 * Get the McEventCollection (input)
1129 ******************************************/
1130 SG::ReadHandle<McEventCollection> mcEventCollection (m_mcEventCollectionName, getContext());
1131 if (!mcEventCollection.isValid()){
1132 ANA_MSG_ERROR("Could not retrieve HepMC with key:" << m_mcEventCollectionName.key());
1133 return;
1134 }else{
1135 ANA_MSG_DEBUG("Retrieved HepMC with key: " << m_mcEventCollectionName.key());
1136 }
1137
1138 /******************************************
1139 * Clear and resize the output vectors
1140 ******************************************/
1141 t_ZdcTruthParticlePosx.clear();
1142 t_ZdcTruthParticlePosy.clear();
1143 t_ZdcTruthParticlePosz.clear();
1144 t_ZdcTruthParticleTime.clear();
1145 t_ZdcTruthParticlePx.clear();
1146 t_ZdcTruthParticlePy.clear();
1147 t_ZdcTruthParticlePz.clear();
1149 t_ZdcTruthParticlePid.clear();
1151
1152 /******************************************
1153 * Sort the particles into sides and add
1154 * them to the output vectors
1155 ******************************************/
1156 for (unsigned int cntr = 0; cntr < mcEventCollection->size(); ++cntr){
1157 const HepMC::GenEvent *genEvt = (*mcEventCollection)[cntr];
1158#ifdef HEPMC3
1159 for (const auto &vertex : genEvt->vertices()){
1160 for (const auto &particle : vertex->particles_in()){
1161#else
1162 for (const auto &vertex : genEvt->vertex_range()){
1163 for (auto ip = vertex->particles_in_const_begin();
1164 ip != vertex->particles_in_const_end();
1165 ++ip) {
1166 auto particle = *ip;
1167#endif
1168 t_ZdcTruthParticlePosx.push_back(vertex->position().x());
1169 t_ZdcTruthParticlePosy.push_back(vertex->position().y());
1170 t_ZdcTruthParticlePosz.push_back(vertex->position().z());
1171 t_ZdcTruthParticleTime.push_back(vertex->position().t());
1172 t_ZdcTruthParticlePx.push_back(particle->momentum().x());
1173 t_ZdcTruthParticlePy.push_back(particle->momentum().y());
1174 t_ZdcTruthParticlePz.push_back(particle->momentum().z());
1175 t_ZdcTruthParticleEnergy.push_back(particle->momentum().e());
1176 t_ZdcTruthParticlePid.push_back(particle->pdg_id());
1177 t_ZdcTruthParticleStatus.push_back(particle->status());
1178 } // end loop over particles
1179 }// end loop over vertices
1180 }// end loop over HepMC events
1181}
1182
1184{
1185 ANA_MSG_DEBUG ("Processing trigger");
1186
1187 bool passTrigger = false;
1188
1189 t_trigger = 0;
1190 t_trigger_TBP = 0;
1191
1192 for (int i = 0; i < 16; i++)
1193 {
1194 t_tav[i] = 0;
1195 t_tbp[i] = 0;
1196 }
1197
1198 if (m_trigDecision)
1199 {
1200 for (int i = 0; i < 16; i++)
1201 {
1202 t_tbp[i] = m_trigDecision->tbp().at(i);
1203 t_tav[i] = m_trigDecision->tav().at(i);
1204 ANA_MSG_DEBUG( "TD: " << i << " tbp: " << std::hex << t_tbp[i] << "\t" << t_tav[i] );
1205 }
1206 t_bunchGroup = m_trigDecision->bgCode();
1207 }
1208
1209 if (enableTrigger)
1210 {
1211
1212 int ic = 0;
1213 for (auto cg : m_chainGroups)
1214 {
1215
1216 if (zdcCalib)
1217 {
1218 std::string name = cg->getListOfTriggers().at(0);
1219 const unsigned int triggerbits = m_trigDecisionTool->isPassedBits(name);
1220 // deferred functionality
1221 //bool tbp = triggerbits&TrigDefs::L1_isPassedBeforePrescale;
1222 //bool tap = triggerbits&TrigDefs::L1_isPassedAfterPrescale;
1223 bool tav = triggerbits&TrigDefs::L1_isPassedAfterVeto;
1224 ANA_MSG_DEBUG("TD: checking trigger name=" << name<< " tav=" << tav);
1225 if (tav)
1226 {
1227 t_trigger += (1 << ic);
1228 t_decisions[ic] = true;
1229 t_prescales[ic] = cg->getPrescale();
1230 passTrigger = true;
1231 }
1232 else
1233 {
1234 t_decisions[ic] = 0;
1235 t_prescales[ic] = 0;
1236 }
1237 }
1238 else
1239 {
1240 if (cg->isPassed())
1241 {
1242 t_trigger += (1 << ic);
1243 t_decisions[ic] = true;
1244 t_prescales[ic] = cg->getPrescale();
1245 passTrigger = true;
1246 }
1247 else
1248 {
1249 t_decisions[ic] = 0;
1250 t_prescales[ic] = 0;
1251 }
1252 }
1253
1254 if (cg->isPassedBits()&TrigDefs::EF_passedRaw)
1255 {
1256 t_trigger_TBP += (1 << ic);
1257 }
1258
1259
1260 ic++;
1261 }
1262
1263 int irc = 0;
1264 for (auto cg : m_rerunChainGroups)
1265 {
1266 t_rerunDecisions[irc] = false;
1267 if (cg->isPassedBits()&TrigDefs::EF_passedRaw)
1268 {
1269 t_rerunDecisions[irc] = true;
1270 }
1271 irc++;
1272 }
1273
1274 }
1275
1276 return passTrigger;
1277}
1278
1280{
1281 ANA_MSG_DEBUG( "processing event info");
1282
1283 t_bcid = m_eventInfo->bcid();
1284 t_runNumber = m_eventInfo->runNumber();
1285 t_eventNumber = m_eventInfo->eventNumber();
1286 t_lumiBlock = m_eventInfo->lumiBlock();
1287 t_bunchGroup = -1;
1288 t_extendedLevel1ID = m_eventInfo->extendedLevel1ID();
1289 t_timeStamp = m_eventInfo->timeStamp();
1290 t_timeStampNSOffset = m_eventInfo->timeStampNSOffset();
1292 t_avgIntPerCrossing = m_eventInfo->averageInteractionsPerCrossing();
1293 t_actIntPerCrossing = m_eventInfo->actualInteractionsPerCrossing();
1296
1297 if ( !(m_eventCounter++ % 1000) || msgLvl(MSG::DEBUG))
1298 {
1299 ANA_MSG_INFO("Event# " << m_eventCounter << " Run " << m_eventInfo->runNumber() << " Event " << m_eventInfo->eventNumber() << " LB " << m_eventInfo->lumiBlock() );
1300 }
1301
1302}
1303
1305 // Check for new run number
1306 //
1308 //
1309 // Get access to the injector pulse steps for this run
1310 //
1312 if (!m_injMapRunToken.isValid()) {
1313 ANA_MSG_ERROR("Unable to obtain injector pulse steps for run " << t_runNumber);
1314 }
1315 else {
1316 unsigned int startLB = m_zdcInjPulserAmpMap->getFirstLumiBlock(m_injMapRunToken);
1317 unsigned int nsteps = m_zdcInjPulserAmpMap->getNumSteps(m_injMapRunToken);
1318 ANA_MSG_DEBUG("Successfully obtained injector pulse steps for run " << t_runNumber
1319 << ", first LB = " << startLB << ", number of steps = " << nsteps);
1320 }
1321
1322 // update the last run number to be the current run number
1324 }
1325
1327}
1328
1330{
1331 ANA_MSG_DEBUG("processInDet(): processing tracks & vertices!");
1332 t_ntrk = 0;
1333 t_nvx = 0;
1334 t_vxntrk = 0;
1335 t_vx_trk_index.clear();
1336 t_vxsumpt2 = 0;
1337 t_vxtype = 0;
1338 t_pvindex = -1;
1339 t_puvxntrk = 0;
1340 t_puvxsumpt = 0;
1342 t_vxnminbias = 0;
1343
1344 int i;
1345 for (i = 0; i < 3; i++) t_vx[i] = 0;
1346 for (i = 0; i < 6; i++) t_vxcov[i] = 0;
1347
1348 const xAOD::Vertex* primary_vertex = nullptr;
1349 size_t pv_index = -1;
1350 size_t vx_index = 0;
1351 float max_pileup_sumpT = 0.;
1352 int max_pileup_nTrack = 0;
1353 float max_pileup_z = 0;
1354 int nStrongPileup = 0;
1355
1356 t_nvtx = 0;
1357 t_vtx_type.clear();
1358 t_vtx_x.clear();
1359 t_vtx_y.clear();
1360 t_vtx_z.clear();
1361 t_vtx_ntrk_all.clear();
1362 t_vtx_sumpt2_all.clear();
1363 t_vtx_ntrk.clear();
1364 t_vtx_sumpt2.clear();
1365 t_vtx_trk_index.clear();
1366
1368 {
1369 ANA_MSG_DEBUG("processInDet: processing vertices");
1370
1371 t_nvx = m_primaryVertices->size();
1372
1373 static const SG::ConstAccessor<float> sumPt2Acc("sumPt2");
1374
1375 // start of new vertex representation
1376 t_nvtx = m_primaryVertices->size();
1377 for (const auto vertex : *m_primaryVertices)
1378 {
1379 float vtx_sumpt2 = 0;
1380 int vtx_ntrk = 0;
1381
1382 t_vtx_type.push_back(vertex->vertexType());
1383 t_vtx_x.push_back(0);
1384 t_vtx_y.push_back(0);
1385 t_vtx_z.push_back(vertex->z());
1386
1387 t_vtx_ntrk.push_back(vtx_ntrk);
1388 t_vtx_sumpt2.push_back(vtx_sumpt2 / 1e6);
1389 t_vtx_ntrk_all.push_back(vertex->nTrackParticles());
1390
1391 if (sumPt2Acc.isAvailable(*vertex))
1392 t_vtx_sumpt2_all.push_back(sumPt2Acc(*vertex));
1393 else
1394 t_vtx_sumpt2_all.push_back(-1);
1395
1396 std::vector<int16_t> trk_index;
1397 if ( m_trackParticles && vertex->nTrackParticles() <= trackLimit )
1398 {
1399 const std::vector< ElementLink< xAOD::TrackParticleContainer > >& vxTrackParticles = vertex->trackParticleLinks();
1400 for (size_t itrk = 0; itrk < vxTrackParticles.size(); itrk++)
1401 {
1402 ElementLink< xAOD::TrackParticleContainer > trkLink = vxTrackParticles.at(itrk);
1403 trk_index.push_back(trkLink.index());
1404 }
1405 }
1406 t_vtx_trk_index.push_back(trk_index);
1407
1408 // end of new vertex representation
1409
1410 if (vertex->vertexType() == xAOD::VxType::PriVtx)
1411 {
1412 primary_vertex = vertex;
1413 pv_index = vx_index;
1414 }
1415 if (vertex->vertexType() == xAOD::VxType::PileUp)
1416 {
1417 float pileup_sumpT = 0;
1418 int pileup_nTrack = 0;
1419 for (size_t itr = 0; itr < vertex->nTrackParticles(); itr++)
1420 {
1421 int track_quality = trackQuality(vertex->trackParticle(itr), vertex);
1422 if (track_quality != -1 && (track_quality & 128) != 0)
1423 {
1424 pileup_nTrack++;
1425 pileup_sumpT += vertex->trackParticle(itr)->pt();
1426 }
1427 }
1428 if (pileup_sumpT > max_pileup_sumpT)
1429 {
1430 max_pileup_sumpT = pileup_sumpT;
1431 max_pileup_nTrack = pileup_nTrack;
1432 max_pileup_z = vertex->z();
1433 }
1434 if (pileup_sumpT > 5e3 || pileup_nTrack > 5) nStrongPileup++;
1435 }
1436 vx_index++;
1437 }
1438 }
1439
1440 t_nstrong = nStrongPileup;
1441
1442 if (primary_vertex != nullptr)
1443 {
1444 t_vx[0] = primary_vertex->x();
1445 t_vx[1] = primary_vertex->y();
1446 t_vx[2] = primary_vertex->z();
1447 /*
1448 const std::vector<float>& cov = primary_vertex->covariance();
1449 */
1450 //for (size_t i=0;i<cov.size();i++)
1451 for (size_t i = 0; i < 6; i++)
1452 {
1453 //t_vxcov[i] = cov.at(i);
1454 t_vxcov[i] = 0;
1455 }
1456 t_vxntrk = primary_vertex->nTrackParticles();
1457 static const SG::ConstAccessor<float> sumPt2Acc("sumPt2");
1458 if (sumPt2Acc.isAvailable(*primary_vertex))
1459 t_vxsumpt2 = sumPt2Acc(*primary_vertex);
1460 else
1461 t_vxsumpt2 = 0;
1462
1463 t_vxtype = primary_vertex->vertexType();
1464 t_pvindex = pv_index;
1465 t_puvxz = max_pileup_z;
1466 t_puvxsumpt = max_pileup_sumpT;
1467 t_puvxntrk = max_pileup_nTrack;
1468
1469 const std::vector< ElementLink< xAOD::TrackParticleContainer > >& vxTrackParticles = primary_vertex->trackParticleLinks();
1470
1471 for (size_t itrk = 0; itrk < vxTrackParticles.size(); itrk++)
1472 {
1473 ElementLink< xAOD::TrackParticleContainer > trkLink = vxTrackParticles.at(itrk);
1474 if (!trkLink.isValid()) continue;
1475 if (m_trackParticles)
1476 {
1477 if (m_trackParticles->size() <= trackLimit)
1478 t_vx_trk_index.push_back(trkLink.index());
1479 }
1480 }
1481
1482 }
1483
1484
1485 if (m_trackParticles)
1486 {
1487 ANA_MSG_DEBUG("processInDet: processing trackss");
1488
1489 t_trk_pt.clear();
1490 t_trk_eta.clear();
1491 t_trk_phi.clear();
1492 t_trk_e.clear();
1493 t_trk_index.clear();
1494 t_trk_theta.clear();
1495 t_trk_charge.clear();
1496 t_trk_d0.clear();
1497 t_trk_z0.clear();
1498 t_trk_vz.clear();
1499 t_trk_vtxz.clear();
1500 t_trk_quality.clear();
1501 t_trk_nPixHits.clear();
1502 t_trk_nSctHits.clear();
1503 t_trk_nPixDead.clear();
1504 t_trk_nSctDead.clear();
1505 t_trk_nPixHoles.clear();
1506 t_trk_nSctHoles.clear();
1507 t_trk_nTrtHits.clear();
1508 t_trk_nTrtOutliers.clear();
1509 t_trk_inPixHits.clear();
1510 t_trk_exPixHits.clear();
1511 t_trk_ninPixHits.clear();
1512 t_trk_nexPixHits.clear();
1513 t_trk_pixeldEdx.clear();
1514
1515 t_ntrk = m_trackParticles->size();
1516
1517 if ( !enableTracks ) return;
1518
1519 if ( t_ntrk <= trackLimit ) // dump all tracks
1520 {
1521 int trk_index = 0;
1522 for (const auto track : *m_trackParticles)
1523 {
1524 writeTrack(track, primary_vertex, trk_index++);
1525 }
1526 }
1527 else // write small vertices
1528 {
1529 for (const auto vertex : *m_primaryVertices)
1530 {
1531 if (vertex->nTrackParticles() <= trackLimit )
1532 {
1533 const std::vector< ElementLink< xAOD::TrackParticleContainer > >& vxTrackParticles = vertex->trackParticleLinks();
1534 for (size_t itrk = 0; itrk < vxTrackParticles.size(); itrk++)
1535 {
1536 ElementLink< xAOD::TrackParticleContainer > trkLink = vxTrackParticles.at(itrk);
1537 writeTrack(*trkLink, vertex, trkLink.index());
1538 }
1539 }
1540 }
1541 }
1542 }
1543
1544 return;
1545}
1546
1547
1549{
1550
1551 if (!track) return -1;
1552
1553 bool pass_looseprimary = false;
1554 if (m_selTool->accept(*track,vertex))
1555 {
1556 pass_looseprimary = true;
1557 }
1558
1559 int quality = 0;
1560 if (pass_looseprimary) quality += 1;
1561
1562 return quality;
1563
1564}
1565
1566
1567
1568void ZdcNtuple::writeTrack(const xAOD::TrackParticle* track, const xAOD::Vertex* vertex, int trk_index)
1569{
1570 t_trk_pt.push_back(track->pt());
1571 t_trk_eta.push_back(track->eta());
1572 t_trk_phi.push_back(track->phi());
1573 t_trk_e.push_back(track->e());
1574 t_trk_index.push_back(trk_index);
1575 t_trk_theta.push_back(track->theta());
1576 t_trk_charge.push_back(track->charge());
1577 t_trk_d0.push_back(track->d0());
1578 t_trk_z0.push_back(track->z0());
1579 t_trk_vz.push_back(track->vz());
1580
1581 float vtxz = -999.;
1582 t_trk_vtxz.push_back(vtxz);
1583
1584 static const SG::ConstAccessor<uint8_t> numberOfInnermostPixelLayerHitsAcc("numberOfInnermostPixelLayerHits");
1585 static const SG::ConstAccessor<uint8_t> expectInnermostPixelLayerHitAcc("expectInnermostPixelLayerHit");
1586 static const SG::ConstAccessor<uint8_t> numberOfNextToInnermostPixelLayerHitsAcc("numberOfNextToInnermostPixelLayerHits");
1587 static const SG::ConstAccessor<uint8_t> expectNextToInnermostPixelLayerHitAcc("expectNextToInnermostPixelLayerHit");
1588 static const SG::ConstAccessor<uint8_t> numberOfSCTHitsAcc("numberOfSCTHits");
1589 static const SG::ConstAccessor<uint8_t> numberOfPixelHitsAcc("numberOfPixelHits");
1590 static const SG::ConstAccessor<uint8_t> numberOfSCTDeadSensorsAcc("numberOfSCTDeadSensors");
1591 static const SG::ConstAccessor<uint8_t> numberOfPixelDeadSensorsAcc("numberOfPixelDeadSensors");
1592 static const SG::ConstAccessor<uint8_t> numberOfSCTHolesAcc("numberOfSCTHoles");
1593 static const SG::ConstAccessor<uint8_t> numberOfPixelHolesAcc("numberOfPixelHoles");
1594 static const SG::ConstAccessor<uint8_t> numberOfTRTHitsAcc("numberOfTRTHits");
1595 static const SG::ConstAccessor<uint8_t> numberOfTRTOutliersAcc("numberOfTRTOutliers");
1596
1597 t_trk_quality.push_back(trackQuality(track, vertex));
1598 t_trk_inPixHits.push_back(numberOfInnermostPixelLayerHitsAcc(*track));
1599 t_trk_exPixHits.push_back(expectInnermostPixelLayerHitAcc(*track));
1600 t_trk_ninPixHits.push_back(numberOfNextToInnermostPixelLayerHitsAcc(*track));
1601 t_trk_nexPixHits.push_back(expectNextToInnermostPixelLayerHitAcc(*track));
1602 t_trk_nSctHits.push_back(numberOfSCTHitsAcc(*track));
1603 t_trk_nPixHits.push_back(numberOfPixelHitsAcc(*track));
1604 t_trk_nSctDead.push_back(numberOfSCTDeadSensorsAcc(*track));
1605 t_trk_nPixDead.push_back(numberOfPixelDeadSensorsAcc(*track));
1606 t_trk_nSctHoles.push_back(numberOfSCTHolesAcc(*track));
1607 t_trk_nPixHoles.push_back(numberOfPixelHolesAcc(*track));
1608 t_trk_nTrtHits.push_back(numberOfTRTHitsAcc(*track));
1609 t_trk_nTrtOutliers.push_back(numberOfTRTOutliersAcc(*track));
1610
1611 float pixeldEdx = 0;
1612 track->summaryValue(pixeldEdx, xAOD::SummaryType::pixeldEdx);
1613 t_trk_pixeldEdx.push_back(pixeldEdx);
1614}
1615
1616
1618{
1619 ANA_MSG_DEBUG("processFCal: processing FCal");
1620
1621 t_fcalEt = 0.;
1622 t_fcalEtA = 0.;
1623 t_fcalEtC = 0.;
1624 t_fcalEtA_TT = 0.;
1625 t_fcalEtC_TT = 0.;
1626
1627 if (m_caloSums)
1628 {
1629 static const SG::ConstAccessor<std::string> SummaryAcc("Summary");
1630 for (const auto calosum : *m_caloSums)
1631 {
1632 const std::string name = SummaryAcc(*calosum);
1633 if (name == "FCal")
1634 {
1635 t_fcalEt = calosum->et();
1636 ANA_MSG_DEBUG("processFCal: fcalEt = " << t_fcalEt);
1637 }
1638
1639 if (name == "All")
1640 {
1641 t_totalEt = calosum->et();
1642 ANA_MSG_DEBUG("processFCal: totalEt = " << t_totalEt);
1643 }
1644 }
1645 }
1646
1647 t_fcalEtA = 0;
1648 t_fcalEtC = 0;
1649 t_totalEt24 = 0;
1650
1651 if (m_eventShapes)
1652 {
1653 for (const auto eventShape : *m_eventShapes)
1654 {
1655 int layer = eventShape->layer();
1656 float eta = eventShape->etaMin();
1657 float et = eventShape->et();
1658 if (layer == 21 || layer == 22 || layer == 23)
1659 {
1660 if (eta > 0) t_fcalEtA += et;
1661 if (eta < 0) t_fcalEtC += et;
1662 }
1663
1664 if (TMath::Abs(eta) < 2.4)
1665 {
1666 t_totalEt24 += et;
1667 }
1668 }
1669 }
1670
1671 t_L1ET = 0;
1672 t_L1ET24 = 0;
1673
1675 {
1676 t_L1ET = m_lvl1EnergySumRoI->energyT();
1677 //t_L1ET24 = m_lvl1EnergySumRoI->energyTRestricted(); // TBD when limited eta ET available
1678 }
1679
1680 return;
1681}
1682
1684{
1685
1686 float eta_min = 5;
1687 float eta_max = -5;
1688
1689 if (!m_caloClusters) return;
1690 for (const auto cl : *m_caloClusters)
1691 {
1692
1693 if (cl->pt() < m_gapPtMin) continue;
1694
1695 int etabin = h_TCSigCut->GetXaxis()->FindBin(cl->eta());
1696 if (etabin < 1 || etabin > h_TCSigCut->GetNbinsX()) continue;
1697 float sig_cut = h_TCSigCut->GetBinContent(etabin);
1698 float sig = cl->getMomentValue(xAOD::CaloCluster::CELL_SIGNIFICANCE);
1699 int cl_cell_sig_samp = static_cast<int>(cl->getMomentValue(xAOD::CaloCluster::CELL_SIG_SAMPLING));
1700
1701 ANA_MSG_VERBOSE ("gapclus: etabin " << etabin << " sig_cut=" << sig_cut << " sig=" << sig << " samp=" << cl_cell_sig_samp);
1702
1703 if (sig < sig_cut) continue;
1704
1705 if (cl_cell_sig_samp >= CaloSampling::TileBar0 && cl_cell_sig_samp <= CaloSampling::TileExt2) continue;
1706
1707 if (cl->eta() < eta_min) eta_min = cl->eta();
1708 if (cl->eta() > eta_max) eta_max = cl->eta();
1709
1710 }
1711
1712 t_edgeGapA = 4.9 - eta_max;
1713 t_edgeGapC = eta_min + 4.9;
1714 ANA_MSG_DEBUG("processGaps(): egA " << t_edgeGapA << " , egC " << t_edgeGapC);
1715
1716}
1717
1719{
1720 ANA_MSG_DEBUG("processMBTS: trying to process!");
1721 t_mbts_countA = 0;
1722 t_mbts_countC = 0;
1725 t_mbts_timeA = 0.;
1726 t_mbts_timeC = 0.;
1727 t_mbts_timeDiff = 0.;
1728
1729 if (m_mbtsInfo->size() > 0)
1730 {
1731 t_mbts_countA = m_mbtsInfo->at(0)->countA();
1732 t_mbts_countC = m_mbtsInfo->at(0)->countC();
1733 t_mbts_timeA = m_mbtsInfo->at(0)->timeA();
1734 t_mbts_timeC = m_mbtsInfo->at(0)->timeC();
1735 t_mbts_timeDiff = m_mbtsInfo->at(0)->timeDiff();
1736 }
1737 else
1738 {
1739 ANA_MSG_INFO("processMBTS: Warning: MBTS info empty!");
1740 }
1741
1742 for (int iside = 0; iside < 2; iside++)
1743 {
1744 for (int iin = 0; iin < 8; iin++)
1745 {
1746 t_mbts_in_e[iside][iin] = 0.;
1747 t_mbts_in_t[iside][iin] = 0.;
1748 t_T2mbts_in_e[iside][iin] = 0.;
1749 t_T2mbts_in_t[iside][iin] = 0.;
1750 }
1751 for (int iout = 0; iout < 4; iout++)
1752 {
1753 t_mbts_out_e[iside][iout] = 0.;
1754 t_mbts_out_t[iside][iout] = 0.;
1755 t_T2mbts_out_e[iside][iout] = 0.;
1756 t_T2mbts_out_t[iside][iout] = 0.;
1757 }
1758 }
1759
1760 ANA_MSG_DEBUG ("filling MBTS");
1761
1762 if (m_mbtsModules == 0)
1763 {
1764 ANA_MSG_INFO("processMBTS: no MBTS container?");
1765 return;
1766 }
1767
1768 for (const auto mbtsMod : *m_mbtsModules)
1769 {
1770 int iside = 1;
1771 if (mbtsMod->type() < 0) iside = 0.;
1772 float phibin = 0.;
1773 int iphibin = -1;
1774 if (mbtsMod->eta() > 3)
1775 {
1776 phibin = mbtsMod->phi() / (2 * TMath::Pi() / 8.) - 0.4;
1777 iphibin = static_cast<int>(phibin);
1778 if (iphibin < 0 || iphibin > 7)
1779 {
1780 ANA_MSG_INFO("processMBTS: MBTS has bad phi bin");
1781 continue;
1782 }
1783 t_mbts_in_e[iside][iphibin] = mbtsMod->e();
1784 t_mbts_in_t[iside][iphibin] = mbtsMod->time();
1785 }
1786 else
1787 {
1788 phibin = mbtsMod->phi() / (2 * TMath::Pi() / 4.) - 0.24;
1789 iphibin = static_cast<int>(phibin);
1790 if (iphibin < 0 || iphibin > 3)
1791 {
1792 ANA_MSG_INFO("processMBTS: MBTS has bad phi bin");
1793 continue;
1794 }
1795 t_mbts_out_e[iside][iphibin] = mbtsMod->e();
1796 t_mbts_out_t[iside][iphibin] = mbtsMod->time();
1797 }
1798 }
1799
1800 if (!m_trigT2MbtsBits) return;
1801
1802 for (const auto mbtsBits : *m_trigT2MbtsBits)
1803 {
1804 const std::vector<float>& energies = mbtsBits->triggerEnergies();
1805 const std::vector<float>& times = mbtsBits->triggerTimes();
1806 for (int imbts = 0; imbts < 32; imbts++)
1807 {
1808 int side = imbts / 16;
1809 int ring = (imbts - 16 * side) / 8;
1810 bool isInner = (ring == 0);
1811 int index = (imbts - 16 * side - ring * 8);
1812 if (!isInner)
1813 {
1814 if ((index % 2) != 0) continue; // skip odd out ring
1815 index /= 2;
1816 }
1817 int iside = (side == 0) ? 1 : 0; // code maps side 1 into first 16 bits and side -1 into second set
1818
1819 ANA_MSG_VERBOSE ("imbts=" << imbts << " isInner=" << isInner << " iside=" << iside << " index=" << index << " e=" << energies.at(imbts) << " t=" << times.at(imbts));
1820 if (iside < 2 and index < 8){ //indices in range?
1821 if (isInner)
1822 {
1823 t_T2mbts_in_e[iside][index] = energies.at(imbts);
1824 t_T2mbts_in_t[iside][index] = times.at(imbts);
1825 if (TMath::Abs(times.at(imbts)) < 12.0 && energies.at(imbts) > 40 / 222.)
1826 {
1827 if (iside == 0) t_T2mbts_countCin++;
1828 if (iside == 1) t_T2mbts_countAin++;
1829 }
1830 }
1831 else
1832 {
1833 t_T2mbts_out_e[iside][index] = energies.at(imbts);
1834 t_T2mbts_out_t[iside][index] = times.at(imbts);
1835 }
1836 } //indices check
1837 }
1838 }
1839
1840 return;
1841}
1842
1844{
1845 //t_nclus = 0;
1846
1847 t_cc_pt.clear();
1848 t_cc_eta.clear();
1849 t_cc_phi.clear();
1850 t_cc_e.clear();
1851 t_cc_raw_m.clear();
1852 t_cc_raw_eta.clear();
1853 t_cc_raw_phi.clear();
1854 t_cc_raw_e.clear();
1855 t_cc_raw_samp.clear();
1856 t_cc_layer.clear();
1857 t_cc_sig.clear();
1858
1859 t_nclus = m_caloClusters->size();
1860
1861 t_clusEt = 0;
1862 t_clusEtMax = -999;
1863 t_clusetaMax = 0;
1864 t_clusphiMax = 0;
1865
1866 for (const auto cluster : *m_caloClusters)
1867 {
1868 t_cc_pt.push_back(cluster->pt());
1869 t_cc_eta.push_back(cluster->eta());
1870 t_cc_phi.push_back(cluster->phi());
1871 t_cc_e.push_back(cluster->e());
1872 t_cc_raw_m.push_back(cluster->rawM());
1873 t_cc_raw_eta.push_back(cluster->rawEta());
1874 t_cc_raw_phi.push_back(cluster->rawPhi());
1875 t_cc_raw_e.push_back(cluster->rawE());
1876
1877 std::vector<float> energies;
1878
1879 for (size_t s = CaloSampling::PreSamplerB; s < CaloSampling::Unknown; s++ )
1880 {
1881 bool hasSample = cluster->hasSampling( (xAOD::CaloCluster::CaloSample) s );
1882 float e = 0;
1883 if (hasSample)
1884 {
1885 e = cluster->eSample( (xAOD::CaloCluster::CaloSample) s);
1886 }
1887 energies.push_back(e);
1888 }
1889 t_cc_raw_samp.push_back(energies);
1890
1891 float et = cluster->e() / TMath::CosH(cluster->eta());
1892 t_clusEt += et;
1893 if (et > t_clusEtMax)
1894 {
1895 t_clusEtMax = et;
1896 t_clusetaMax = cluster->eta();
1897 t_clusphiMax = cluster->phi();
1898 }
1899
1900 double cell_sig = 0;
1901 if (!cluster->retrieveMoment(xAOD::CaloCluster::CELL_SIGNIFICANCE, cell_sig)) {ANA_MSG_DEBUG("processClusters() : No CELL_SIGNIFICANCE!");}
1902 t_cc_sig.push_back(cell_sig);
1903 double cell_layer = 0;
1904 if (!cluster->retrieveMoment(xAOD::CaloCluster::CELL_SIG_SAMPLING, cell_layer)) {ANA_MSG_DEBUG("processClusters() : No CELL_SIG_SAMPLING!");}
1905 t_cc_layer.push_back(static_cast<int>(cell_layer));
1906 //t_nclus++;
1907 }
1908
1909 if ( (!enableClusters) || (t_ntrk >= trackLimit) ) // if disabled or if too many tracks
1910 {
1911 t_cc_pt.clear();
1912 t_cc_eta.clear();
1913 t_cc_phi.clear();
1914 t_cc_e.clear();
1915 t_cc_layer.clear();
1916 t_cc_sig.clear();
1917 }
1918 else
1919 {
1920 ANA_MSG_DEBUG("processClusters(): keeping clusters");
1921 }
1922 return;
1923}
1924
1926
1927 proton_pt.clear();
1928 proton_eta.clear();
1929 proton_phi.clear();
1930 proton_e.clear();
1931 proton_side.clear();
1932 proton_eLoss.clear();
1933 proton_t.clear();
1934
1935 proton_track_stationID.clear();
1936 proton_track_nClusters.clear();
1937 proton_track_xLocal.clear();
1938 proton_track_yLocal.clear();
1939 proton_track_zLocal.clear();
1940 proton_track_xSlope.clear();
1941 proton_track_ySlope.clear();
1942
1943 proton_track_stationID.resize(m_afpProtons->size(), std::vector<int>(2));
1944 proton_track_nClusters.resize(m_afpProtons->size(), std::vector<int>(2));
1945 proton_track_xLocal.resize(m_afpProtons->size(), std::vector<float>(2));
1946 proton_track_yLocal.resize(m_afpProtons->size(), std::vector<float>(2));
1947 proton_track_zLocal.resize(m_afpProtons->size(), std::vector<float>(2));
1948 proton_track_xSlope.resize(m_afpProtons->size(), std::vector<float>(2));
1949 proton_track_ySlope.resize(m_afpProtons->size(), std::vector<float>(2));
1950
1951 nProtons = 0;
1952
1953 for(const auto * proton: *m_afpProtons){
1954
1955 proton_pt.push_back(proton->pt());
1956 proton_eta.push_back(proton->eta());
1957 proton_phi.push_back(proton->phi());
1958 proton_e.push_back(proton->e());
1959 proton_side.push_back(proton->side());
1960
1961 proton_eLoss.push_back((6800.-proton->e())/6800.);
1962 p_scat.SetPtEtaPhiE(proton->pt(), proton->eta(), proton->phi(), proton->e());
1963 (signbit(proton->eta())) ? p_beam.SetPxPyPzE(0.0, 0.0, -6800.0, 6800.0) : p_beam.SetPxPyPzE(0.0, 0.0, 6800.0,\
1964 6800.0);
1965
1966 proton_t.push_back( (p_beam - p_scat)*(p_beam - p_scat));
1967
1968 for(int i=0; i< int(proton->nTracks()); i++){
1969
1970 proton_track_stationID.at(nProtons).at(i) = proton->track(i)->stationID();
1971 proton_track_nClusters.at(nProtons).at(i) = proton->track(i)->nClusters();
1972 proton_track_xLocal.at(nProtons).at(i) = proton->track(i)->xLocal();
1973 proton_track_yLocal.at(nProtons).at(i) = proton->track(i)->yLocal();
1974 proton_track_zLocal.at(nProtons).at(i) = proton->track(i)->zLocal();
1975 proton_track_xSlope.at(nProtons).at(i) = proton->track(i)->xSlope();
1976 proton_track_ySlope.at(nProtons).at(i) = proton->track(i)->ySlope();
1977
1978 }
1979
1980 nProtons++;
1981 }
1982
1983 return;
1984}
1985
1987{
1988 uint32_t passbits = 0;
1989
1990 if (!m_isMC)
1991 {
1992 if (useGRL)
1993 {
1994 if (!m_grl->passRunLB(*m_eventInfo)) {
1995 passbits += 1; // UPC GRL
1996 }
1997 }
1998
1999 /*
2000 if(!m_grl_mb->passRunLB(*m_eventInfo)){
2001 passbits += 4; // MB GRL
2002 }
2003 */
2004
2008 || (m_eventInfo->isEventFlagBitSet(xAOD::EventInfo::Core, 18) ) )
2009 {
2010 passbits += 2;
2011 } // end if event flags check
2012 } // end if the event is data
2013
2014 return passbits;
2015}
2016
2018{
2019 if (!enableTrigger) return;
2020
2021 m_outputTree = tree( "zdcTree" );
2022 ANA_MSG_INFO("setupTriggerHistos(): Setting up trigger histos and ntuple = " << m_outputTree);
2023
2024 std::vector<std::string> triggers;
2025 std::vector<std::string> rerunTriggers;
2026 bool zdc_triggers = true;
2027
2028 // ZDC triggers
2029 if (zdc_triggers)
2030 {
2031 if (zdcCalib) // lists for calibration data
2032 {
2033 if (lhcf2022)
2034 {
2035 triggers.push_back("HLT_noalg_ZDCPEB_L1LHCF");
2036 triggers.push_back("HLT_noalg_ZDCPEB_L1ZDC_OR");
2037 }
2038
2039 if (pbpb2023)
2040 {
2041 triggers.push_back("HLT_noalg_ZDCPEB_L1ZDC_OR");
2042 triggers.push_back("HLT_noalg_ZDCPEB_L1ZDC_OR_EMPTY");
2043 triggers.push_back("HLT_noalg_ZDCPEB_L1ZDC_OR_UNPAIRED_NONISO");
2044 triggers.push_back("HLT_noalg_ZDCPEB_L1ZDC_A_C");
2045 triggers.push_back("HLT_noalg_ZDCPEB_L1ZDC_A_C_EMPTY");
2046 triggers.push_back("HLT_noalg_ZDCPEB_L1ZDC_A_C_UNPAIRED_NONISO");
2047 triggers.push_back("HLT_noalg_ZDCPEB_L1ZDC_A");
2048 triggers.push_back("HLT_noalg_ZDCPEB_L1ZDC_A_EMPTY");
2049 triggers.push_back("HLT_noalg_ZDCPEB_L1ZDC_A_UNPAIRED_NONISO");
2050 triggers.push_back("HLT_noalg_ZDCPEB_L1ZDC_C");
2051 triggers.push_back("HLT_noalg_ZDCPEB_L1ZDC_C_EMPTY");
2052 triggers.push_back("HLT_noalg_ZDCPEB_L1ZDC_C_UNPAIRED_NONISO");
2053 }
2054 }
2055 else // lists for physics data
2056 {
2057 if (lhcf2022)
2058 {
2059 triggers.push_back("HLT_noalg_L1LHCF");
2060 }
2061 if (lhcf2022afp)
2062 {
2063 triggers.push_back("HLT_noalg_AFPPEB_L1AFP_A");
2064 triggers.push_back("HLT_noalg_AFPPEB_L1AFP_C");
2065 }
2066 if (lhcf2022zdc)
2067 {
2068 triggers.push_back("HLT_noalg_ZDCPEB_L1ZDC_OR");
2069 triggers.push_back("HLT_noalg_ZDCPEB_L1LHCF");
2070 triggers.push_back("HLT_noalg_L1ZDC_OR");
2071 triggers.push_back("HLT_noalg_L1ZDC_XOR_E2");
2072 triggers.push_back("HLT_noalg_L1ZDC_XOR_E1_E3");
2073 triggers.push_back("HLT_noalg_L1ZDC_A_AND_C");
2074 triggers.push_back("HLT_mb_sptrk_L1ZDC_OR");
2075 triggers.push_back("HLT_mb_sptrk_L1ZDC_XOR_E2");
2076 triggers.push_back("HLT_mb_sptrk_L1ZDC_XOR_E1_E3");
2077 triggers.push_back("HLT_mb_sptrk_L1ZDC_A_AND_C");
2078 triggers.push_back("HLT_mb_sp100_trk30_hmt_L1ZDC_XOR_E2");
2079 triggers.push_back("HLT_mb_sp100_trk30_hmt_L1ZDC_XOR_E1_E3");
2080 triggers.push_back("HLT_mb_sp100_trk30_hmt_L1ZDC_A_AND_C");
2081 }
2082 }
2083 }
2084
2085 //char name[50];
2086 ANA_MSG_INFO("Adding trigger branches!");
2087
2088 int ic = 0;
2089 for (auto &trig : triggers)
2090 {
2091 const Trig::ChainGroup* cg = m_trigDecisionTool->getChainGroup(trig);
2092 if (cg->getListOfTriggers().size())
2093 {
2094 ANA_MSG_INFO("setupTriggerHistos(): Trigger found = " << trig.c_str() << " bit " << ic);
2095 }
2096 else
2097 {
2098 ANA_MSG_INFO("setupTriggerHistos(): Trigger NOT found = " << trig.c_str() << " bit " << ic);
2099 }
2100 m_chainGroups.push_back(cg);
2101 // force all triggers to show up in tree
2102 TString bname(trig.c_str());
2103 m_outputTree->Branch(bname, &(t_decisions[ic]), bname + "/O");
2104 m_outputTree->Branch("ps_" + bname, &(t_prescales[ic]), "ps_" + bname + "/F");
2105 ic++;
2106 }
2107
2108 ANA_MSG_INFO( "triggers = " << triggers.size() << " chains = " << m_chainGroups.size() );
2109
2110 int irc = 0;
2111 ANA_MSG_INFO("Adding rerun trigger branches!");
2112 for (auto &trig : rerunTriggers)
2113 {
2114 const Trig::ChainGroup* cg = m_trigDecisionTool->getChainGroup(trig);
2115 m_rerunChainGroups.push_back(cg);
2116 if (cg->getListOfTriggers().size())
2117 {
2118 ANA_MSG_INFO("setupTriggerHistos(): Rerun trigger found = " << trig.c_str() << " bit " << irc);
2119 }
2120 else
2121 {
2122 ANA_MSG_INFO("setupTriggerHistos(): Rerun trigger NOT found = " << trig.c_str() << " bit " << irc);
2123 }
2124 // force all rerun triggers to show up in tree
2125 TString bname(trig.c_str());
2126 m_outputTree->Branch(bname, &(t_rerunDecisions[irc]), bname + "/O");
2127 irc++;
2128 }
2129
2130 // trigger matching flags for electrons and muons
2131
2132 m_setupTrigHist = true;
2133
2134 ANA_MSG_INFO("setupTriggerHistos(): Finished setting up trigger");
2135
2136}
2137
2138// from TrigMuonMatching
2139double ZdcNtuple::dR(const double eta1, const double phi1, const double eta2, const double phi2)
2140{
2141 double deta = std::abs(eta1 - eta2);
2142 double dphi = std::abs(phi1 - phi2) < TMath::Pi() ? std::abs(phi1 - phi2) : 2 * TMath::Pi() - std::abs(phi1 - phi2);
2143 return std::sqrt(deta * deta + dphi * dphi);
2144}
2145
2146
2147StatusCode ZdcNtuple :: finalize ()
2148{
2149 // This method is the mirror image of initialize(), meaning it gets
2150 // called after the last event has been processed on the worker node
2151 // and allows you to finish up any objects you created in
2152 // initialize() before they are written to disk. This is actually
2153 // fairly rare, since this happens separately for each worker node.
2154 // Most of the time you want to do your post-processing on the
2155 // submission node after all your histogram outputs have been
2156 // merged. This is different from histFinalize() in that it only
2157 // gets called on worker nodes that processed input events.
2158
2159
2160 return StatusCode::SUCCESS;
2161}
Scalar eta() const
pseudorapidity method
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_INFO(x)
Helper class to provide constant type-safe access to aux data.
#define ANA_MSG_INFO(xmsg)
Macro printing info messages.
#define ANA_MSG_ERROR(xmsg)
Macro printing error messages.
#define ANA_MSG_WARNING(xmsg)
Macro printing warning messages.
#define ANA_MSG_VERBOSE(xmsg)
Macro printing verbose messages.
#define ANA_MSG_DEBUG(xmsg)
Macro printing debug messages.
#define ANA_CHECK(EXP)
check whether the given expression was successful
Define enumerations for event-level ZDC data.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
bool msgLvl(const MSG::Level lvl) const
StatusCode book(const TH1 &hist, const std::string &tDir="", const std::string &stream="")
Simplify the booking and registering (into THistSvc) of histograms.
AnaAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
constructor with parameters
Helper class to provide constant type-safe access to aux data.
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
const_pointer_type ptr()
Dereference the pointer.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
std::vector< std::string > getListOfTriggers() const
std::vector< float > t_cc_raw_phi
Definition ZdcNtuple.h:396
const xAOD::VertexContainer * m_primaryVertices
Definition ZdcNtuple.h:121
float t_yCentroidPreGeomCorPreAvgSubtr[2]
Definition ZdcNtuple.h:271
float t_cosDeltaReactionPlaneAngle
Definition ZdcNtuple.h:279
bool reprocZdc
Definition ZdcNtuple.h:79
float t_mbts_timeDiff
Definition ZdcNtuple.h:343
std::vector< double > proton_t
Definition ZdcNtuple.h:414
float t_ZdcModuleFitT0[2][4]
Definition ZdcNtuple.h:218
std::vector< const Trig::ChainGroup * > m_rerunChainGroups
Definition ZdcNtuple.h:137
float t_yCentroid[2]
Definition ZdcNtuple.h:275
std::vector< float > t_cc_pt
Definition ZdcNtuple.h:388
TLorentzVector p_scat
Definition ZdcNtuple.h:424
const xAOD::MBTSModuleContainer * m_mbtsModules
Definition ZdcNtuple.h:119
float t_RpdChannelPileupStretchedExpFitParamErrs[2][16][3]
Definition ZdcNtuple.h:252
SG::ReadHandleKey< McEventCollection > m_mcEventCollectionName
Definition ZdcNtuple.h:110
short t_ZdcStatus[2]
Definition ZdcNtuple.h:194
std::vector< float > t_ZdcTruthParticlePy
Definition ZdcNtuple.h:209
float t_RpdChannelAmplitudeCalib[2][16]
Definition ZdcNtuple.h:256
uint32_t t_ntrk
Definition ZdcNtuple.h:359
float t_ZdcTruthEM[2]
Definition ZdcNtuple.h:201
float t_totalEt
Definition ZdcNtuple.h:317
unsigned int m_lastRunNumber
Definition ZdcNtuple.h:49
ZdcInjPulserAmpMap::Token m_injMapRunToken
Definition ZdcNtuple.h:50
float t_RPDSubtrAmpSum[2]
Definition ZdcNtuple.h:269
unsigned int t_RpdSideStatus[2]
Definition ZdcNtuple.h:262
float t_ZdcModuleChisqLGRefit[2][4]
Definition ZdcNtuple.h:239
bool enableOutputTree
Definition ZdcNtuple.h:56
float t_clusphiMax
Definition ZdcNtuple.h:403
float t_ZdcModuleT0SubLGRefit[2][4]
Definition ZdcNtuple.h:238
bool pbpb2023
Definition ZdcNtuple.h:85
bool flipDelay
Definition ZdcNtuple.h:78
unsigned short t_ZdcLucrodTriggerAmpLG[2][4]
Definition ZdcNtuple.h:229
bool zdcLaser
Definition ZdcNtuple.h:72
float t_RpdChannelAmplitude[2][16]
Definition ZdcNtuple.h:255
std::vector< uint8_t > t_trk_nPixHoles
Definition ZdcNtuple.h:376
float t_puvxz
Definition ZdcNtuple.h:289
std::vector< uint8_t > t_trk_nSctHoles
Definition ZdcNtuple.h:377
bool trackLimitReject
Definition ZdcNtuple.h:77
uint16_t t_mbts_countA
Definition ZdcNtuple.h:339
float t_fcalEtC
Definition ZdcNtuple.h:311
void processMCEventCollection()
bool lhcf2022afp
Definition ZdcNtuple.h:84
unsigned short t_ZdcLucrodTriggerSideAmp[2]
Definition ZdcNtuple.h:197
unsigned int t_RpdModuleTruthNphotons[2][16]
Definition ZdcNtuple.h:263
const xAOD::ForwardEventInfoContainer * m_mbtsInfo
Definition ZdcNtuple.h:118
bool enableCalo
Definition ZdcNtuple.h:61
bool doZdcCalib
Definition ZdcNtuple.h:91
std::vector< int > t_vx_trk_index
Definition ZdcNtuple.h:284
double dR(const double eta1, const double phi1, const double eta2, const double phi2)
float t_reactionPlaneAngle[2]
Definition ZdcNtuple.h:278
std::vector< std::vector< float > > proton_track_ySlope
Definition ZdcNtuple.h:420
void processZdcNtupleFromModules()
unsigned int t_ZdcModuleMask
Definition ZdcNtuple.h:195
std::vector< float > t_trk_vz
Definition ZdcNtuple.h:367
void processInDet()
std::vector< float > t_trk_pt
Definition ZdcNtuple.h:360
uint32_t t_eventNumber
Definition ZdcNtuple.h:149
float t_RpdChannelPileupExpFitParams[2][16][2]
Definition ZdcNtuple.h:249
bool lhcf2022zdc
Definition ZdcNtuple.h:83
float t_totalEt24
Definition ZdcNtuple.h:319
uint16_t t_raw32[2][4][2][2][32]
Definition ZdcNtuple.h:351
const xAOD::EventInfo * m_eventInfo
Definition ZdcNtuple.h:112
float t_RpdChannelMaxADCCalib[2][16]
Definition ZdcNtuple.h:258
std::vector< int > t_trk_index
Definition ZdcNtuple.h:371
bool enableID
Definition ZdcNtuple.h:60
float t_clusEtMax
Definition ZdcNtuple.h:401
std::vector< std::vector< float > > proton_track_xLocal
Definition ZdcNtuple.h:416
float t_T2mbts_in_e[2][8]
Definition ZdcNtuple.h:179
uint16_t t_raw7[2][4][2][2][7]
Definition ZdcNtuple.h:348
float t_vInj
Definition ZdcNtuple.h:152
void processClusters()
bool slimmed
Definition ZdcNtuple.h:53
std::vector< const Trig::ChainGroup * > m_chainGroups
Definition ZdcNtuple.h:136
std::vector< float > t_cc_raw_e
Definition ZdcNtuple.h:397
float t_mbts_in_t[2][8]
Definition ZdcNtuple.h:176
std::vector< int16_t > t_vtx_ntrk
Definition ZdcNtuple.h:304
float t_ZdcAmpErr[2]
Definition ZdcNtuple.h:188
float t_vxcov[6]
Definition ZdcNtuple.h:287
float t_RpdChannelMaxADC[2][16]
Definition ZdcNtuple.h:257
float t_ZdcModuleCalibTime[2][4]
Definition ZdcNtuple.h:222
int m_eventCounter
Definition ZdcNtuple.h:132
uint32_t acceptEvent()
float t_ZdcModulePresample[2][4]
Definition ZdcNtuple.h:226
float t_ZdcNLEnergy[2]
Definition ZdcNtuple.h:191
std::vector< float > t_vtx_sumpt2_all
Definition ZdcNtuple.h:303
const xAOD::HIEventShapeContainer * m_caloSums
Definition ZdcNtuple.h:116
std::vector< int16_t > t_vtx_ntrk_all
Definition ZdcNtuple.h:302
float t_xRowCentroid[2][4]
Definition ZdcNtuple.h:276
unsigned int t_RpdChannelMaxSample[2][16]
Definition ZdcNtuple.h:259
std::vector< float > t_cc_raw_eta
Definition ZdcNtuple.h:395
float t_actIntPerCrossing
Definition ZdcNtuple.h:159
uint64_t t_trigger
Definition ZdcNtuple.h:166
bool t_centroidDecorationsAvailable
Definition ZdcNtuple.h:265
std::vector< std::vector< int16_t > > t_vtx_trk_index
Definition ZdcNtuple.h:306
std::string grlFilename
Definition ZdcNtuple.h:55
std::vector< float > t_trk_eta
Definition ZdcNtuple.h:361
int t_puvxntrk
Definition ZdcNtuple.h:290
TLorentzVector p_beam
Definition ZdcNtuple.h:423
uint16_t t_raw15[2][4][2][2][15]
Definition ZdcNtuple.h:349
bool lhcf2022
Definition ZdcNtuple.h:82
std::vector< float > t_cc_eta
Definition ZdcNtuple.h:389
TH1 * h_TCSigCut
Definition ZdcNtuple.h:336
uint16_t t_T2mbts_countCin
Definition ZdcNtuple.h:346
float t_xCentroidPreAvgSubtr[2]
Definition ZdcNtuple.h:272
float t_ZdcTrigEff[2]
Definition ZdcNtuple.h:196
float t_ZdcModuleMinDeriv2nd[2][4]
Definition ZdcNtuple.h:225
std::vector< float > t_trk_vtxz
Definition ZdcNtuple.h:368
float t_RPDChannelSubtrAmp[2][16]
Definition ZdcNtuple.h:268
float t_ZdcNLEnergyErr[2]
Definition ZdcNtuple.h:192
uint32_t t_passBits
Definition ZdcNtuple.h:154
float t_ZdcModuleChisq[2][4]
Definition ZdcNtuple.h:219
std::vector< int8_t > t_vtx_type
Definition ZdcNtuple.h:298
float t_T2mbts_out_e[2][4]
Definition ZdcNtuple.h:180
const xAOD::CaloClusterContainer * m_caloClusters
Definition ZdcNtuple.h:122
std::vector< int > t_cc_layer
Definition ZdcNtuple.h:393
uint8_t t_rpdDecodingError
Definition ZdcNtuple.h:164
float t_ZdcModuleAmpError[2][4]
Definition ZdcNtuple.h:223
float t_ZdcModuleTime[2][4]
Definition ZdcNtuple.h:216
ToolHandle< InDet::IInDetTrackSelectionTool > m_selTool
Definition ZdcNtuple.h:103
PublicToolHandle< Trig::TrigDecisionTool > m_trigDecisionTool
Definition ZdcNtuple.h:100
int t_nstrong
Definition ZdcNtuple.h:292
std::vector< float > t_trk_theta
Definition ZdcNtuple.h:364
std::vector< uint8_t > t_trk_ninPixHits
Definition ZdcNtuple.h:382
uint16_t t_T2mbts_countAin
Definition ZdcNtuple.h:345
bool m_setupTrigHist
Definition ZdcNtuple.h:134
uint32_t t_tav[16]
Definition ZdcNtuple.h:184
std::string zdcConfig
Definition ZdcNtuple.h:92
std::vector< float > t_cc_e
Definition ZdcNtuple.h:391
bool zdcOnly
Definition ZdcNtuple.h:74
float t_mbts_timeC
Definition ZdcNtuple.h:342
float t_ZdcModuleAmpCorrLGRefit[2][4]
Definition ZdcNtuple.h:236
std::vector< float > t_cc_phi
Definition ZdcNtuple.h:390
uint32_t t_nclus
Definition ZdcNtuple.h:387
uint32_t t_tbp[16]
Definition ZdcNtuple.h:185
void processMBTS()
uint16_t t_rpdRaw[2][16][24]
Definition ZdcNtuple.h:354
std::vector< std::vector< int > > proton_track_nClusters
Definition ZdcNtuple.h:421
std::vector< int > proton_side
Definition ZdcNtuple.h:412
uint32_t t_timeStamp
Definition ZdcNtuple.h:156
float t_ZdcModuleTruthTotal[2][7]
Definition ZdcNtuple.h:241
float t_xCentroidPreGeomCorPreAvgSubtr[2]
Definition ZdcNtuple.h:270
float t_ZdcTruthInvis[2]
Definition ZdcNtuple.h:200
float t_ZdcModuleCalibAmp[2][4]
Definition ZdcNtuple.h:221
float t_ZdcModuleFitAmp[2][4]
Definition ZdcNtuple.h:217
float t_fcalEtA
Definition ZdcNtuple.h:310
float t_ZdcModuleAmpLGRefit[2][4]
Definition ZdcNtuple.h:235
float t_vx[3]
Definition ZdcNtuple.h:282
float t_ZdcModulePeakADCLG[2][4]
Definition ZdcNtuple.h:234
unsigned int t_ZdcModuleStatus[2][4]
Definition ZdcNtuple.h:220
float t_mbts_out_t[2][4]
Definition ZdcNtuple.h:177
float t_L1ET24
Definition ZdcNtuple.h:140
float t_ZdcModuleT0LGRefit[2][4]
Definition ZdcNtuple.h:237
void processGaps()
bool enableZDC
Definition ZdcNtuple.h:86
std::vector< uint8_t > t_trk_nPixDead
Definition ZdcNtuple.h:374
std::vector< int8_t > t_trk_charge
Definition ZdcNtuple.h:369
float t_ZdcModuleTruthNonEM[2][7]
Definition ZdcNtuple.h:244
int t_vxnminbias
Definition ZdcNtuple.h:294
float t_ZdcModuleAmp[2][4]
Definition ZdcNtuple.h:215
float t_fcalEtC_TT
Definition ZdcNtuple.h:313
uint32_t t_zdcEventInfoErrorWord
Definition ZdcNtuple.h:161
bool enableTrigger
Definition ZdcNtuple.h:58
float t_ZdcEnergy[2]
Definition ZdcNtuple.h:189
std::vector< std::vector< float > > t_cc_raw_samp
Definition ZdcNtuple.h:398
float t_RpdChannelPileupFrac[2][16]
Definition ZdcNtuple.h:261
bool enableRPDAmp
Definition ZdcNtuple.h:88
std::vector< float > t_ZdcTruthParticlePosy
Definition ZdcNtuple.h:205
std::vector< int16_t > t_trk_quality
Definition ZdcNtuple.h:370
bool enableTracks
Definition ZdcNtuple.h:63
std::vector< uint8_t > t_trk_nSctHits
Definition ZdcNtuple.h:373
uint16_t t_rpdRaw32[2][16][32]
Definition ZdcNtuple.h:355
float t_clusEt
Definition ZdcNtuple.h:400
std::vector< float > t_cc_raw_m
Definition ZdcNtuple.h:394
const xAOD::TrigT2MbtsBitsContainer * m_trigT2MbtsBits
Definition ZdcNtuple.h:120
std::vector< float > t_trk_d0
Definition ZdcNtuple.h:365
size_t nsamplesZdc
Definition ZdcNtuple.h:81
const xAOD::AFPProtonContainer * m_afpProtons
Definition ZdcNtuple.h:127
void writeTrack(const xAOD::TrackParticle *, const xAOD::Vertex *vertex, int)
std::vector< std::vector< float > > proton_track_zLocal
Definition ZdcNtuple.h:418
void processEventInfo()
float t_RpdChannelPileupExpFitParamErrs[2][16][2]
Definition ZdcNtuple.h:251
void processFCal()
std::vector< float > t_trk_z0
Definition ZdcNtuple.h:366
bool t_rerunDecisions[200]
Definition ZdcNtuple.h:172
float t_avgIntPerCrossing
Definition ZdcNtuple.h:158
std::vector< float > t_vtx_x
Definition ZdcNtuple.h:299
float t_ZdcTruthTotal[2]
Definition ZdcNtuple.h:199
const xAOD::TrackParticleContainer * m_trackParticles
Definition ZdcNtuple.h:123
float t_prescales[200]
Definition ZdcNtuple.h:170
bool processTriggerDecision()
float t_ZdcTime[2]
Definition ZdcNtuple.h:193
float t_T2mbts_in_t[2][8]
Definition ZdcNtuple.h:181
std::vector< float > t_vtx_y
Definition ZdcNtuple.h:300
uint32_t t_timeStampNSOffset
Definition ZdcNtuple.h:157
std::vector< float > t_vtx_z
Definition ZdcNtuple.h:301
std::vector< uint8_t > t_trk_nTrtHits
Definition ZdcNtuple.h:378
std::vector< double > proton_pt
Definition ZdcNtuple.h:408
int t_vxtype
Definition ZdcNtuple.h:285
std::vector< int > t_ZdcTruthParticlePid
Definition ZdcNtuple.h:212
SG::ReadHandleKey< xAOD::ZdcModuleContainer > m_zdcSumContainerName
Definition ZdcNtuple.h:108
unsigned short t_ZdcLucrodTriggerAmp[2][4]
Definition ZdcNtuple.h:228
void processVInjInfo()
float t_ZdcModuleBkgdMaxFraction[2][4]
Definition ZdcNtuple.h:224
asg::AnaToolHandle< IGoodRunsListSelectionTool > m_grl
Definition ZdcNtuple.h:101
unsigned int t_ZdcModuleTruthNphotons[2][7]
Definition ZdcNtuple.h:246
int nProtons
Definition ZdcNtuple.h:407
std::vector< std::vector< float > > proton_track_yLocal
Definition ZdcNtuple.h:417
std::vector< float > t_vtx_sumpt2
Definition ZdcNtuple.h:305
const xAOD::TrigDecision * m_trigDecision
Definition ZdcNtuple.h:115
std::vector< uint8_t > t_trk_nSctDead
Definition ZdcNtuple.h:375
float t_RpdChannelPileupStretchedExpFitMSE[2][16]
Definition ZdcNtuple.h:254
void processProtons()
std::vector< float > t_trk_pixeldEdx
Definition ZdcNtuple.h:384
float t_yCentroidPreAvgSubtr[2]
Definition ZdcNtuple.h:273
float t_xCentroid[2]
Definition ZdcNtuple.h:274
int t_pvindex
Definition ZdcNtuple.h:286
float t_puvxsumpt
Definition ZdcNtuple.h:291
std::vector< double > proton_eta
Definition ZdcNtuple.h:409
float t_RpdChannelBaseline[2][16]
Definition ZdcNtuple.h:248
std::vector< float > t_ZdcTruthParticlePx
Definition ZdcNtuple.h:208
std::vector< float > t_trk_phi
Definition ZdcNtuple.h:362
bool enableOutputSamples
Definition ZdcNtuple.h:57
float t_mbts_in_e[2][8]
Definition ZdcNtuple.h:174
std::vector< double > proton_eLoss
Definition ZdcNtuple.h:413
uint16_t t_raw24[2][4][2][2][24]
Definition ZdcNtuple.h:350
bool enableCentroid
Definition ZdcNtuple.h:89
float t_ZdcModulePreSampleAmp[2][4]
Definition ZdcNtuple.h:227
float t_mbts_timeA
Definition ZdcNtuple.h:341
uint16_t t_mbts_countC
Definition ZdcNtuple.h:340
unsigned int t_centroidStatus[2]
Definition ZdcNtuple.h:267
float t_clusetaMax
Definition ZdcNtuple.h:402
float t_ZdcTruthNonEM[2]
Definition ZdcNtuple.h:202
uint8_t t_bunchGroup
Definition ZdcNtuple.h:153
uint32_t t_runNumber
Definition ZdcNtuple.h:148
unsigned int zdcLowGainMode
Definition ZdcNtuple.h:75
float t_edgeGapC
Definition ZdcNtuple.h:324
int t_vxnlooseprimary
Definition ZdcNtuple.h:293
bool enableRPD
Definition ZdcNtuple.h:87
float t_ZdcAmp[2]
Definition ZdcNtuple.h:187
int t_vxngoodmuon
Definition ZdcNtuple.h:295
TTree * m_outputTree
Definition ZdcNtuple.h:147
bool zdcInj
Definition ZdcNtuple.h:73
size_t trackLimit
Definition ZdcNtuple.h:76
const xAOD::EnergySumRoI * m_lvl1EnergySumRoI
Definition ZdcNtuple.h:124
float t_RpdChannelPileupExpFitMSE[2][16]
Definition ZdcNtuple.h:253
std::vector< std::vector< int > > proton_track_stationID
Definition ZdcNtuple.h:415
SG::ReadHandleKey< xAOD::ZdcModuleContainer > m_zdcModuleContainerName
Definition ZdcNtuple.h:106
float t_totalEt24_TTsum
Definition ZdcNtuple.h:320
float t_ZdcTruthEscaped[2]
Definition ZdcNtuple.h:203
float t_ZdcModulePeakADCHG[2][4]
Definition ZdcNtuple.h:233
std::shared_ptr< ZdcInjPulserAmpMap > m_zdcInjPulserAmpMap
Definition ZdcNtuple.h:129
std::vector< float > t_ZdcTruthParticleEnergy
Definition ZdcNtuple.h:211
std::vector< double > proton_e
Definition ZdcNtuple.h:411
bool useGRL
Definition ZdcNtuple.h:54
float t_fcalEtA_TT
Definition ZdcNtuple.h:312
float t_vxsumpt2
Definition ZdcNtuple.h:288
uint32_t t_bcid
Definition ZdcNtuple.h:151
float t_ZdcEnergyErr[2]
Definition ZdcNtuple.h:190
float t_ZdcModuleTruthEM[2][7]
Definition ZdcNtuple.h:243
std::vector< float > t_ZdcTruthParticleTime
Definition ZdcNtuple.h:207
std::vector< uint8_t > t_trk_nPixHits
Definition ZdcNtuple.h:372
uint32_t t_extendedLevel1ID
Definition ZdcNtuple.h:155
unsigned short t_ZdcLucrodTriggerSideAmpLG[2]
Definition ZdcNtuple.h:198
unsigned int t_RpdChannelStatus[2][16]
Definition ZdcNtuple.h:260
float t_L1ET
Definition ZdcNtuple.h:139
uint16_t t_raw40[2][4][2][2][40]
Definition ZdcNtuple.h:352
std::string auxSuffix
Definition ZdcNtuple.h:80
bool writeOnlyTriggers
Definition ZdcNtuple.h:59
std::vector< float > t_ZdcTruthParticlePosz
Definition ZdcNtuple.h:206
char t_centroidEventValid
Definition ZdcNtuple.h:266
bool t_decisions[200]
Definition ZdcNtuple.h:171
bool enableClusters
Definition ZdcNtuple.h:62
asg::AnaToolHandle< ZDC::IZdcAnalysisTool > m_zdcAnalysisTool
Definition ZdcNtuple.h:102
float t_totalEt_TTsum
Definition ZdcNtuple.h:318
std::vector< float > t_ZdcTruthParticlePz
Definition ZdcNtuple.h:210
uint16_t t_rpdRaw40[2][16][40]
Definition ZdcNtuple.h:356
uint32_t t_trigger_TBP
Definition ZdcNtuple.h:167
std::vector< std::vector< float > > proton_track_xSlope
Definition ZdcNtuple.h:419
int t_vxntrk
Definition ZdcNtuple.h:283
bool m_isMC
Definition ZdcNtuple.h:133
void setupTriggerHistos()
std::vector< float > t_ZdcTruthParticlePosx
Definition ZdcNtuple.h:204
int trackQuality(const xAOD::TrackParticle *tp, const xAOD::Vertex *vertex)
float t_yColCentroid[2][4]
Definition ZdcNtuple.h:277
float t_ZdcModuleTruthInvis[2][7]
Definition ZdcNtuple.h:242
std::vector< uint8_t > t_trk_nexPixHits
Definition ZdcNtuple.h:383
float m_gapPtMin
Definition ZdcNtuple.h:325
float t_ZdcModuleMaxADCHG[2][4]
Definition ZdcNtuple.h:231
std::vector< float > t_cc_sig
Definition ZdcNtuple.h:392
std::vector< double > proton_phi
Definition ZdcNtuple.h:410
std::vector< uint8_t > t_trk_inPixHits
Definition ZdcNtuple.h:380
float t_T2mbts_out_t[2][4]
Definition ZdcNtuple.h:182
float t_fcalEt
Definition ZdcNtuple.h:309
uint8_t t_zdcEventInfoError
Definition ZdcNtuple.h:160
std::vector< int > t_ZdcTruthParticleStatus
Definition ZdcNtuple.h:213
float t_RpdChannelPileupStretchedExpFitParams[2][16][3]
Definition ZdcNtuple.h:250
float t_ZdcModuleMaxADCLG[2][4]
Definition ZdcNtuple.h:232
std::vector< uint8_t > t_trk_nTrtOutliers
Definition ZdcNtuple.h:379
uint32_t t_lumiBlock
Definition ZdcNtuple.h:150
float t_edgeGapA
Definition ZdcNtuple.h:323
bool zdcCalib
Definition ZdcNtuple.h:71
std::vector< float > t_trk_e
Definition ZdcNtuple.h:363
const xAOD::HIEventShapeContainer * m_eventShapes
Definition ZdcNtuple.h:117
std::vector< uint8_t > t_trk_exPixHits
Definition ZdcNtuple.h:381
float t_ZdcModuleMaxADC[2][4]
Definition ZdcNtuple.h:230
float t_ZdcModuleTruthEscaped[2][7]
Definition ZdcNtuple.h:245
uint8_t t_zdcDecodingError
Definition ZdcNtuple.h:163
float t_mbts_out_e[2][4]
Definition ZdcNtuple.h:175
@ CELL_SIGNIFICANCE
Cell significance = E/sig of the cell with the largest |E|/sig.
@ CELL_SIG_SAMPLING
CaloSample of the cell with the largest |E|/sig.
CaloSampling::CaloSample CaloSample
@ Tile
The Tile calorimeter.
@ Core
Core flags describing the event.
@ ForwardDet
The forward detectors.
@ LAr
The LAr calorimeter.
@ Error
The sub-detector issued an error.
float z() const
Returns the z position.
size_t nTrackParticles() const
Get the number of tracks associated with this vertex.
const TrackParticleLinks_t & trackParticleLinks() const
Get all the particles associated with the vertex.
float y() const
Returns the y position.
VxType::VertexType vertexType() const
The type of the vertex.
float x() const
Returns the x position.
This module defines the arguments passed from the BATCH driver to the BATCH worker.
Definition index.py:1
@ PileUp
Pile-up vertex.
@ PriVtx
Primary vertex.
ZdcModule_v1 ZdcModule
Definition ZdcModule.h:15
TrackParticle_v1 TrackParticle
Reference the current persistent version:
Vertex_v1 Vertex
Define the latest version of the vertex class.
@ pixeldEdx
the dE/dx estimate, calculated using the pixel clusters [?
Extra patterns decribing particle interation process.
TChain * tree