ATLAS Offline Software
Loading...
Searching...
No Matches
TRT_RDOAnalysis.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5
6#include "TRT_RDOAnalysis.h"
8
9#include "TTree.h"
10#include "TString.h"
11
12#include <cmath>
13
14TRT_RDOAnalysis::TRT_RDOAnalysis(const std::string& name, ISvcLocator *pSvcLocator)
15 : AthAlgorithm(name, pSvcLocator)
16 , m_inputKey("TRT_RDOs")
17 , m_inputTruthKey("TRT_SDO_Map")
18 , m_trtID(nullptr)
19 , m_rdoID(0)
20 , m_rdoWord(0)
22 , m_phiModule(0)
23 , m_layerWheel(0)
24 , m_strawLayer(0)
25 , m_straw(0)
26 , m_highLevel(0)
29 , m_trailEdge(0)
30 , m_firstBin(0)
31 , m_lastBin(0)
32 , m_sdoID(0)
33 , m_sdoWord(0)
38 , m_straw_sdo(0)
39 , m_aboveThresh(0)
40 , m_deadChan(0)
41 , m_RODdata(0)
42 , m_validStraw(0)
43 , m_hit(0)
44 , m_barcode(0)
45 , m_eventIndex(0)
46 , m_charge(0)
47 , m_barcode_vec(0)
49 , m_charge_vec(0)
50
51 , m_h_rdoID(0)
52 , m_h_rdoWord(0)
54 , m_h_phiModule(0)
57 , m_h_straw(0)
58 , m_h_ToT(0)
59 , m_h_ToT_HL(0)
61 , m_h_trailEdge(0)
62 , m_h_brlPhiMod(0)
63 , m_h_brlLayer(0)
65 , m_h_brlStraw(0)
66 , m_h_brlToT(0)
67 , m_h_brlToT_HL(0)
70 , m_h_ecPhiMod(0)
71 , m_h_ecWheel(0)
73 , m_h_ecStraw(0)
74 , m_h_ecToT(0)
75 , m_h_ecToT_HL(0)
78 , m_h_sdoID(0)
79 , m_h_sdoWord(0)
84 , m_h_straw_sdo(0)
85 , m_h_barcode(0)
87 , m_h_charge(0)
88
89 , m_tree(0)
90 , m_ntupleFileName("/ntuples/file1")
91 , m_ntupleDirName("/TRT_RDOAnalysis/")
92 , m_ntupleTreeName("TRT_RDOAna")
93 , m_path("/TRT_RDOAnalysis/")
94 , m_thistSvc("THistSvc", name)
95{
96 declareProperty("InputKey", m_inputKey);
97 declareProperty("InputTruthKey", m_inputTruthKey);
98 declareProperty("NtupleFileName", m_ntupleFileName);
99 declareProperty("NtupleDirectoryName", m_ntupleDirName);
100 declareProperty("NtupleTreeName", m_ntupleTreeName);
101 declareProperty("HistPath", m_path);
102}
103
105 ATH_MSG_DEBUG( "Initializing TRT_RDOAnalysis" );
106
107 // This will check that the properties were initialized
108 // properly by job configuration.
109 ATH_CHECK( m_inputKey.initialize() );
110 ATH_CHECK( m_inputTruthKey.initialize() );
111
112 // Grab TRT_ID helper
113 ATH_CHECK(detStore()->retrieve(m_trtID, "TRT_ID"));
114
115 // Grab Ntuple and histogramming service for tree
116 ATH_CHECK(m_thistSvc.retrieve());
117
118 // ntuple branches
119 m_tree = new TTree(TString(m_ntupleTreeName), "TRT_RDOAna");
120 std::string fullNtupleName = m_ntupleFileName + m_ntupleDirName + m_ntupleTreeName;
121 ATH_CHECK(m_thistSvc->regTree(fullNtupleName,m_tree));
122 if (m_tree) {
123 // TRT RDO
124 m_tree->Branch("rdoID", &m_rdoID);
125 m_tree->Branch("rdoWord", &m_rdoWord);
126 m_tree->Branch("barrelEndcap", &m_barrelEndcap);
127 m_tree->Branch("phiModule", &m_phiModule);
128 m_tree->Branch("layerWheel", &m_layerWheel);
129 m_tree->Branch("strawLayer", &m_strawLayer);
130 m_tree->Branch("straw", &m_straw);
131 m_tree->Branch("highLevel", &m_highLevel);
132 m_tree->Branch("timeOverThreshold", &m_timeOverThreshold);
133 m_tree->Branch("driftTimeBin", &m_driftTimeBin);
134 m_tree->Branch("trailEdge", &m_trailEdge);
135 m_tree->Branch("firstBin", &m_firstBin);
136 m_tree->Branch("lastBin", &m_lastBin);
137 // TRT SDO deposits
138 m_tree->Branch("sdoID", &m_sdoID);
139 m_tree->Branch("sdoWord", &m_sdoWord);
140 m_tree->Branch("barrelEndcap_sdo", &m_barrelEndcap_sdo);
141 m_tree->Branch("phiModule_sdo", &m_phiModule_sdo);
142 m_tree->Branch("layerWheel_sdo", &m_layerWheel_sdo);
143 m_tree->Branch("strawLayer_sdo", &m_strawLayer_sdo);
144 m_tree->Branch("straw_sdo", &m_straw_sdo);
145 m_tree->Branch("aboveThresh", &m_aboveThresh);
146 m_tree->Branch("deadChan", &m_deadChan);
147 m_tree->Branch("RODdata", &m_RODdata);
148 m_tree->Branch("validStraw", &m_validStraw);
149 m_tree->Branch("hit", &m_hit);
150 m_tree->Branch("barcode", &m_barcode);
151 m_tree->Branch("eventIndex", &m_eventIndex);
152 m_tree->Branch("charge", &m_charge);
153 m_tree->Branch("barcode_vec", &m_barcode_vec);
154 m_tree->Branch("eventIndex_vec", &m_eventIndex_vec);
155 m_tree->Branch("charge_vec", &m_charge_vec);
156 }
157 else {
158 ATH_MSG_ERROR("No tree found!");
159 }
160
161 // HISTOGRAMS
162 m_h_rdoID = new TH1F("h_rdoID", "rdoID", 100, 0, 2e18);
163 m_h_rdoID->StatOverflows();
164 ATH_CHECK(m_thistSvc->regHist(m_path + m_h_rdoID->GetName(), m_h_rdoID));
165
166 m_h_rdoWord = new TH1F("h_rdoWord", "rdoWord", 100, 0, 1.5e8);
167 m_h_rdoWord->StatOverflows();
168 ATH_CHECK(m_thistSvc->regHist(m_path + m_h_rdoWord->GetName(), m_h_rdoWord));
169
170 m_h_barrelEndcap = new TH1F("h_barrelEndcap", "Barrel or Endcap", 100, -3.5, 3.5);
171 m_h_barrelEndcap->StatOverflows();
173
174 m_h_phiModule = new TH1F("h_phiModule", "Phi module", 100, 0, 35);
175 m_h_phiModule->StatOverflows();
176 ATH_CHECK(m_thistSvc->regHist(m_path + m_h_phiModule->GetName(), m_h_phiModule));
177
178 m_h_layerWheel = new TH1F("h_layerWheel", "Barrel layer or Endcap wheel", 100, 0, 20);
179 m_h_layerWheel->StatOverflows();
181
182 m_h_strawLayer = new TH1F("h_strawLayer", "Straw layer", 100, 0, 35);
183 m_h_strawLayer->StatOverflows();
185
186 m_h_straw = new TH1F("h_straw", "Straw", 100, 0, 1000);
187 m_h_straw->StatOverflows();
188 ATH_CHECK(m_thistSvc->regHist(m_path + m_h_straw->GetName(), m_h_straw));
189
190 m_h_ToT = new TH1F("h_ToT", "Time over Threshold", 100, 0, 100);
191 m_h_ToT->StatOverflows();
192 ATH_CHECK(m_thistSvc->regHist(m_path + m_h_ToT->GetName(), m_h_ToT));
193
194 m_h_ToT_HL = new TH1F("h_ToT_HL", "Time over Threshold (highLevel)", 100, 0, 100);
195 m_h_ToT_HL->StatOverflows();
196 ATH_CHECK(m_thistSvc->regHist(m_path + m_h_ToT_HL->GetName(), m_h_ToT_HL));
197
198 m_h_driftTimeBin = new TH1F("h_driftTimeBin", "Drift Time Bin", 100, 0, 30);
199 m_h_driftTimeBin->StatOverflows();
201
202 m_h_trailEdge = new TH1F("h_trailEdge", "Trailing Edge", 100, 0, 30);
203 m_h_trailEdge->StatOverflows();
204 ATH_CHECK(m_thistSvc->regHist(m_path + m_h_trailEdge->GetName(), m_h_trailEdge));
205
206 m_h_brlPhiMod = new TH1F("h_brlPhiMod", "Barrel phi module", 100, 0, 35);
207 m_h_brlPhiMod->StatOverflows();
208 ATH_CHECK(m_thistSvc->regHist(m_path + m_h_brlPhiMod->GetName(), m_h_brlPhiMod));
209
210 m_h_brlLayer = new TH1F("h_brlLayer", "Barrel layer", 100, 0, 20);
211 m_h_brlLayer->StatOverflows();
212 ATH_CHECK(m_thistSvc->regHist(m_path + m_h_brlLayer->GetName(), m_h_brlLayer));
213
214 m_h_brlStrawLayer = new TH1F("h_brlStrawLayer", "Barrel straw layer", 100, 0, 35);
215 m_h_brlStrawLayer->StatOverflows();
217
218 m_h_brlStraw = new TH1F("h_brlStraw", "Barrel straw", 100, 0, 1000);
219 m_h_brlStraw->StatOverflows();
220 ATH_CHECK(m_thistSvc->regHist(m_path + m_h_brlStraw->GetName(), m_h_brlStraw));
221
222 m_h_brlToT = new TH1F("h_brlToT", "Barrel Time over Threshold", 100, 0, 100);
223 m_h_brlToT->StatOverflows();
224 ATH_CHECK(m_thistSvc->regHist(m_path + m_h_brlToT->GetName(), m_h_brlToT));
225
226 m_h_brlToT_HL = new TH1F("h_brlToT_HL", "Barrel Time over Threshold (highLevel)", 100, 0, 100);
227 m_h_brlToT_HL->StatOverflows();
228 ATH_CHECK(m_thistSvc->regHist(m_path + m_h_brlToT_HL->GetName(), m_h_brlToT_HL));
229
230 m_h_brlDriftTimeBin = new TH1F("h_brlDriftTimeBin", "Barrel Drift Time Bin", 100, 0, 30);
231 m_h_brlDriftTimeBin->StatOverflows();
233
234 m_h_brlTrailEdge = new TH1F("h_brlTrailEdge", "Barrel Trailing Edge", 100, 0, 30);
235 m_h_brlTrailEdge->StatOverflows();
237
238 m_h_ecPhiMod = new TH1F("h_ecPhiMod", "Endcap phi module", 100, 0, 35);
239 m_h_ecPhiMod->StatOverflows();
240 ATH_CHECK(m_thistSvc->regHist(m_path + m_h_ecPhiMod->GetName(), m_h_ecPhiMod));
241
242 m_h_ecWheel = new TH1F("h_ecWheel", "Endcap wheel", 100, 0, 20);
243 m_h_ecWheel->StatOverflows();
244 ATH_CHECK(m_thistSvc->regHist(m_path + m_h_ecWheel->GetName(), m_h_ecWheel));
245
246 m_h_ecStrawLayer = new TH1F("h_ecStrawLayer", "Endcap straw layer", 100, 0, 35);
247 m_h_ecStrawLayer->StatOverflows();
249
250 m_h_ecStraw = new TH1F("h_ecStraw", "Endcap straw", 100, 0, 1000);
251 m_h_ecStraw->StatOverflows();
252 ATH_CHECK(m_thistSvc->regHist(m_path + m_h_ecStraw->GetName(), m_h_ecStraw));
253
254 m_h_ecToT = new TH1F("h_ecToT", "Endcap Time over Threshold", 100, 0, 100);
255 m_h_ecToT->StatOverflows();
256 ATH_CHECK(m_thistSvc->regHist(m_path + m_h_ecToT->GetName(), m_h_ecToT));
257
258 m_h_ecToT_HL = new TH1F("h_ecToT_HL", "Endcap Time over Threshold (highLevel)", 100, 0, 100);
259 m_h_ecToT_HL->StatOverflows();
260 ATH_CHECK(m_thistSvc->regHist(m_path + m_h_ecToT_HL->GetName(), m_h_ecToT_HL));
261
262 m_h_ecDriftTimeBin = new TH1F("h_ecDriftTimeBin", "Endcap Drift Time Bin", 100, 0, 30);
263 m_h_ecDriftTimeBin->StatOverflows();
265
266 m_h_ecTrailEdge = new TH1F("h_ecTrailEdge", "Endcap Trailing Edge", 100, 0, 30);
267 m_h_ecTrailEdge->StatOverflows();
269
270 m_h_sdoID = new TH1F("h_sdoID", "sdoID", 100, 0, 2.5e18);
271 m_h_sdoID->StatOverflows();
272 ATH_CHECK(m_thistSvc->regHist(m_path + m_h_sdoID->GetName(), m_h_sdoID));
273
274 m_h_sdoWord = new TH1F("h_sdoWord", "sdoWord", 100, 0, 10);
275 m_h_sdoWord->StatOverflows();
276 ATH_CHECK(m_thistSvc->regHist(m_path + m_h_sdoWord->GetName(), m_h_sdoWord));
277
278 m_h_barrelEndcap_sdo = new TH1F("h_barrelEndcap_sdo", "Barrel or Endcap (sdo)", 100, -3.5, 3.5);
279 m_h_barrelEndcap_sdo->StatOverflows();
281
282 m_h_phiModule_sdo = new TH1F("h_phiModule_sdo", "Phi module (sdo)", 100, 0, 35);
283 m_h_phiModule_sdo->StatOverflows();
285
286 m_h_layerWheel_sdo = new TH1F("h_layerWheel_sdo", "Barrel layer or Endcap wheel (sdo)", 100, 0, 20);
287 m_h_layerWheel_sdo->StatOverflows();
289
290 m_h_strawLayer_sdo = new TH1F("h_strawLayer_sdo", "Straw layer (sdo)", 100, 0, 35);
291 m_h_strawLayer_sdo->StatOverflows();
293
294 m_h_straw_sdo = new TH1F("h_straw_sdo", "Straw (sdo)", 100, 0, 1000);
295 m_h_straw_sdo->StatOverflows();
296 ATH_CHECK(m_thistSvc->regHist(m_path + m_h_straw_sdo->GetName(), m_h_straw_sdo));
297
298 m_h_barcode = new TH1F("h_barcode", "Barcode (sdo)", 100, 0, 2.2e5);
299 m_h_barcode->StatOverflows();
300 ATH_CHECK(m_thistSvc->regHist(m_path + m_h_barcode->GetName(), m_h_barcode));
301
302 m_h_eventIndex = new TH1F("h_eventIndex", "Event index (sdo)", 100, 0, 10);
303 m_h_eventIndex->StatOverflows();
305
306 m_h_charge = new TH1F("h_charge", "Charge (sdo)", 100, 0, 500);
307 m_h_charge->StatOverflows();
308 ATH_CHECK(m_thistSvc->regHist(m_path + m_h_charge->GetName(), m_h_charge));
309
310 return StatusCode::SUCCESS;
311}
312
314 ATH_MSG_DEBUG( "In TRT_RDOAnalysis::execute()" );
315
316 m_rdoID->clear();
317 m_rdoWord->clear();
318 m_barrelEndcap->clear();
319 m_phiModule->clear();
320 m_layerWheel->clear();
321 m_strawLayer->clear();
322 m_straw->clear();
323 m_highLevel->clear();
324 m_timeOverThreshold->clear();
325 m_driftTimeBin->clear();
326 m_trailEdge->clear();
327 m_firstBin->clear();
328 m_lastBin->clear();
329 m_sdoID->clear();
330 m_sdoWord->clear();
331 m_barrelEndcap_sdo->clear();
332 m_phiModule_sdo->clear();
333 m_layerWheel_sdo->clear();
334 m_strawLayer_sdo->clear();
335 m_straw_sdo->clear();
336 m_aboveThresh->clear();
337 m_deadChan->clear();
338 m_RODdata->clear();
339 m_validStraw->clear();
340 m_hit->clear();
341 m_barcode->clear();
342 m_eventIndex->clear();
343 m_charge->clear();
344 m_barcode_vec->clear();
345 m_eventIndex_vec->clear();
346 m_charge_vec->clear();
347
348 // RawData
350 if(p_TRT_RDO_cont.isValid()) {
351 // loop over RDO container
352 TRT_RDO_Container::const_iterator rdoCont_itr(p_TRT_RDO_cont->begin());
353 const TRT_RDO_Container::const_iterator rdoCont_end(p_TRT_RDO_cont->end());
354
355 for ( ; rdoCont_itr != rdoCont_end; ++rdoCont_itr ) {
356 const TRT_RDO_Collection* p_TRT_RDO_coll(*rdoCont_itr);
357 TRT_RDO_Collection::const_iterator rdo_itr(p_TRT_RDO_coll->begin());
358 const TRT_RDO_Collection::const_iterator rdo_end(p_TRT_RDO_coll->end());
359
360 for ( ; rdo_itr != rdo_end; ++rdo_itr ) {
361 const Identifier rdoID((*rdo_itr)->identify());
362 const unsigned int rdoWord((*rdo_itr)->getWord());
363 const int trtBrlEc(m_trtID->barrel_ec(rdoID));
364 const int trtPhiMod(m_trtID->phi_module(rdoID));
365 const int trtLayerWheel(m_trtID->layer_or_wheel(rdoID));
366 const int trtStrawLayer(m_trtID->straw_layer(rdoID));
367 const int trtStraw(m_trtID->straw(rdoID));
368 const bool trtHL((*rdo_itr)->highLevel());
369 const double trtToT((*rdo_itr)->timeOverThreshold());
370 const int trtDriftTimeBin((*rdo_itr)->driftTimeBin());
371 const int trtTrailEdge = static_cast<const TRT_LoLumRawData*>(*rdo_itr)->trailingEdge();
372 const bool trtFirstBin = static_cast<const TRT_LoLumRawData*>(*rdo_itr)->firstBinHigh();
373 const bool trtLastBin = static_cast<const TRT_LoLumRawData*>(*rdo_itr)->lastBinHigh();
374
375 const unsigned long long rdoID_int = rdoID.get_compact();
376 m_rdoID->push_back(rdoID_int);
377 m_rdoWord->push_back(rdoWord);
378 m_barrelEndcap->push_back(trtBrlEc);
379 m_phiModule->push_back(trtPhiMod);
380 m_layerWheel->push_back(trtLayerWheel);
381 m_strawLayer->push_back(trtStrawLayer);
382 m_straw->push_back(trtStraw);
383 m_highLevel->push_back(trtHL);
384 m_timeOverThreshold->push_back(trtToT);
385 m_driftTimeBin->push_back(trtDriftTimeBin);
386 m_trailEdge->push_back(trtTrailEdge);
387 m_firstBin->push_back(trtFirstBin);
388 m_lastBin->push_back(trtLastBin);
389
390 m_h_rdoID->Fill(rdoID_int);
391 m_h_rdoWord->Fill(rdoWord);
392 m_h_barrelEndcap->Fill(trtBrlEc);
393 m_h_phiModule->Fill(trtPhiMod);
394 m_h_layerWheel->Fill(trtLayerWheel);
395 m_h_strawLayer->Fill(trtStrawLayer);
396 m_h_straw->Fill(trtStraw);
397 m_h_ToT->Fill(trtToT);
398 if (trtHL) {
399 m_h_ToT_HL->Fill(trtToT);
400 }
401 m_h_driftTimeBin->Fill(trtDriftTimeBin);
402 m_h_trailEdge->Fill(trtTrailEdge);
403
404 if (std::abs(trtBrlEc) == 1) {
405 m_h_brlPhiMod->Fill(trtPhiMod);
406 m_h_brlLayer->Fill(trtLayerWheel);
407 m_h_brlStrawLayer->Fill(trtStrawLayer);
408 m_h_brlStraw->Fill(trtStraw);
409 m_h_brlToT->Fill(trtToT);
410 if (trtHL) {
411 m_h_brlToT_HL->Fill(trtToT);
412 }
413 m_h_brlDriftTimeBin->Fill(trtDriftTimeBin);
414 m_h_brlTrailEdge->Fill(trtTrailEdge);
415 }
416 else if (std::abs(trtBrlEc) == 2) {
417 m_h_ecPhiMod->Fill(trtPhiMod);
418 m_h_ecWheel->Fill(trtLayerWheel);
419 m_h_ecStrawLayer->Fill(trtStrawLayer);
420 m_h_ecStraw->Fill(trtStraw);
421 m_h_ecToT->Fill(trtToT);
422 if (trtHL) {
423 m_h_ecToT_HL->Fill(trtToT);
424 }
425 m_h_ecDriftTimeBin->Fill(trtDriftTimeBin);
426 m_h_ecTrailEdge->Fill(trtTrailEdge);
427 }
428 }
429 }
430 }
431
432 // SimData
434 if(simDataMapTRT.isValid()) {
435 // loop over SDO container
436 InDetSimDataCollection::const_iterator sdo_itr(simDataMapTRT->begin());
437 const InDetSimDataCollection::const_iterator sdo_end(simDataMapTRT->end());
438
439 std::vector<int> barcode_vec;
440 std::vector<int> eventIndex_vec;
441 std::vector<float> charge_vec;
442 for ( ; sdo_itr != sdo_end; ++sdo_itr ) {
443 const Identifier sdoID((*sdo_itr).first);
444 const InDetSimData& sdo((*sdo_itr).second);
445
446 const unsigned long long sdoID_int = sdoID.get_compact();
447 const int sdoWord(sdo.word());
448 const int trtBrlEc_sdo(m_trtID->barrel_ec(sdoID));
449 const int trtPhiMod_sdo(m_trtID->phi_module(sdoID));
450 const int trtLayerWheel_sdo(m_trtID->layer_or_wheel(sdoID));
451 const int trtStrawLayer_sdo(m_trtID->straw_layer(sdoID));
452 const int trtStraw_sdo(m_trtID->straw(sdoID));
453 const bool aboveThresh(TRT_SimHelper::isAboveTR_Thresh(sdo));
454 const bool deadChan(TRT_SimHelper::isDeadChannel(sdo));
455 const bool rodData(TRT_SimHelper::isRodData(sdo));
456 const bool validStraw(TRT_SimHelper::isValidStraw(sdo));
457 const bool hit(TRT_SimHelper::HasHit(sdo));
458
459 m_sdoID->push_back(sdoID_int);
460 m_sdoWord->push_back(sdoWord);
461 m_barrelEndcap_sdo->push_back(trtBrlEc_sdo);
462 m_phiModule_sdo->push_back(trtPhiMod_sdo);
463 m_layerWheel_sdo->push_back(trtLayerWheel_sdo);
464 m_strawLayer_sdo->push_back(trtStrawLayer_sdo);
465 m_straw_sdo->push_back(trtStraw_sdo);
466 m_aboveThresh->push_back(aboveThresh);
467 m_deadChan->push_back(deadChan);
468 m_RODdata->push_back(rodData);
469 m_validStraw->push_back(validStraw);
470 m_hit->push_back(hit);
471
472 m_h_sdoID->Fill(sdoID_int);
473 m_h_sdoWord->Fill(sdoWord);
474 m_h_barrelEndcap_sdo->Fill(trtBrlEc_sdo);
475 m_h_phiModule_sdo->Fill(trtPhiMod_sdo);
476 m_h_layerWheel_sdo->Fill(trtLayerWheel_sdo);
477 m_h_strawLayer_sdo->Fill(trtStrawLayer_sdo);
478 m_h_straw_sdo->Fill(trtStraw_sdo);
479
480 // loop over deposits
481 // InDetSimData::Deposit typedef for std::pair<HepMcParticleLink, float>
482 const std::vector<InDetSimData::Deposit>& deposits = sdo.getdeposits();
483 std::vector<InDetSimData::Deposit>::const_iterator dep_itr(deposits.begin());
484 const std::vector<InDetSimData::Deposit>::const_iterator dep_end(deposits.end());
485
486 for ( ; dep_itr != dep_end; ++dep_itr ) {
487 const HepMcParticleLink& particleLink = (*dep_itr).first;
488 const int bar(HepMC::barcode(particleLink)); // FIXME barcode-based
489 const int eventIx(particleLink.eventIndex());
490 const float charge((*dep_itr).second);
491
492 m_barcode->push_back(bar);
493 m_eventIndex->push_back(eventIx);
494 m_charge->push_back(charge);
495
496 m_h_barcode->Fill(bar);
497 m_h_eventIndex->Fill(eventIx);
498 m_h_charge->Fill(charge);
499
500 barcode_vec.push_back(bar);
501 eventIndex_vec.push_back(eventIx);
502 charge_vec.push_back(charge);
503 }
504 m_barcode_vec->push_back(barcode_vec);
505 m_eventIndex_vec->push_back(eventIndex_vec);
506 m_charge_vec->push_back(charge_vec);
507 barcode_vec.clear();
508 eventIndex_vec.clear();
509 charge_vec.clear();
510 }
511 }
512
513 if (m_tree) {
514 m_tree->Fill();
515 }
516
517 return StatusCode::SUCCESS;
518}
519
521
522 return StatusCode::SUCCESS;
523
524}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_DEBUG(x)
double charge(const T &p)
Definition AtlasPID.h:997
Handle class for reading from StoreGate.
InDetRawDataCollection< TRT_RDORawData > TRT_RDO_Collection
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
const ServiceHandle< StoreGateSvc > & detStore() const
DataModel_detail::const_iterator< DataVector > const_iterator
Definition DataVector.h:838
const_iterator end() const noexcept
const_iterator begin() const noexcept
value_type get_compact() const
Get the compact id.
int word() const
const std::vector< Deposit > & getdeposits() const
virtual bool isValid() override final
Can the handle be successfully dereferenced?
bool firstBinHigh() const
bool lastBinHigh() const
int trailingEdge() const
std::vector< unsigned long long > * m_sdoID
std::vector< int > * m_strawLayer
std::vector< bool > * m_RODdata
virtual StatusCode finalize() override final
std::string m_ntupleFileName
std::string m_ntupleTreeName
std::vector< bool > * m_aboveThresh
std::vector< bool > * m_highLevel
std::vector< int > * m_phiModule_sdo
std::string m_ntupleDirName
std::vector< int > * m_sdoWord
const TRT_ID * m_trtID
std::vector< unsigned long long > * m_rdoID
SG::ReadHandleKey< InDetSimDataCollection > m_inputTruthKey
std::vector< std::vector< int > > * m_eventIndex_vec
SG::ReadHandleKey< TRT_RDO_Container > m_inputKey
std::vector< std::vector< float > > * m_charge_vec
std::vector< bool > * m_hit
std::vector< int > * m_driftTimeBin
std::vector< int > * m_barrelEndcap
std::vector< double > * m_timeOverThreshold
std::vector< int > * m_eventIndex
std::vector< int > * m_straw_sdo
std::vector< bool > * m_deadChan
std::vector< bool > * m_validStraw
std::vector< std::vector< int > > * m_barcode_vec
std::vector< int > * m_straw
std::vector< unsigned int > * m_rdoWord
std::vector< int > * m_barrelEndcap_sdo
std::vector< int > * m_barcode
std::vector< int > * m_phiModule
std::vector< int > * m_strawLayer_sdo
TRT_RDOAnalysis(const std::string &name, ISvcLocator *pSvcLocator)
std::vector< int > * m_layerWheel
virtual StatusCode execute() override final
ServiceHandle< ITHistSvc > m_thistSvc
std::vector< int > * m_layerWheel_sdo
std::vector< float > * m_charge
std::vector< bool > * m_firstBin
std::vector< int > * m_trailEdge
virtual StatusCode initialize() override final
std::vector< bool > * m_lastBin
static bool HasHit(const InDetSimData &sdo)
static bool isDeadChannel(const InDetSimData &sdo)
static bool isAboveTR_Thresh(const InDetSimData &sdo)
static bool isValidStraw(const InDetSimData &sdo)
static bool isRodData(const InDetSimData &sdo)
int barcode(const T *p)
Definition Barcode.h:16