ATLAS Offline Software
ITkPixelRDOAnalysis.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 
6 #include "ITkPixelRDOAnalysis.h"
7 #include "StoreGate/ReadHandle.h"
10 
11 #include "TTree.h"
12 #include "TString.h"
13 
14 #include <algorithm>
15 #include <math.h>
16 #include <functional>
17 #include <iostream>
18 
19 namespace ITk
20 {
21 
22 PixelRDOAnalysis::PixelRDOAnalysis(const std::string& name, ISvcLocator *pSvcLocator)
23  : AthAlgorithm(name, pSvcLocator)
24 {
25 }
26 
28  ATH_MSG_DEBUG( "Initializing ITkPixelRDOAnalysis" );
29 
30  // This will check that the properties were initialized
31  // properly by job configuration.
32  ATH_CHECK( m_inputKey.initialize() );
35 
36  // Grab PixelID helper
39 
40  // Grab Ntuple and histogramming service for tree
41  ATH_CHECK(m_thistSvc.retrieve());
42 
43  m_tree = new TTree(m_ntupleName.value().c_str(), "ITkPixelRDOAnalysis");
44  ATH_CHECK(m_thistSvc->regTree(m_ntuplePath.value() + m_ntupleName.value(), m_tree));
45  if (m_tree) {
46  // PIXEL RDO
47  m_tree->Branch("rdoID", &m_rdoID);
48  m_tree->Branch("rdoWord", &m_rdoWord);
49  m_tree->Branch("barrelEndcap", &m_barrelEndcap);
50  m_tree->Branch("layerDisk", &m_layerDisk);
51  m_tree->Branch("phiModule", &m_phiModule);
52  m_tree->Branch("etaModule", &m_etaModule);
53  m_tree->Branch("phiIndex", &m_phiIndex);
54  m_tree->Branch("etaIndex", &m_etaIndex);
55  m_tree->Branch("isInnermost", &m_isInnermost);
56  m_tree->Branch("isNextToInnermost", &m_isNextToInnermost);
57  m_tree->Branch("ToT", &m_ToT); // time over threshold value (0-255)
58  m_tree->Branch("BCID", &m_BCID); // beam crossing ID
59  m_tree->Branch("LVL1A", &m_LVL1A); // Level1 accept (0-15)
60  m_tree->Branch("LVL1ID", &m_LVL1ID); // ATLAS LVL1 (0-255)
61  // Global coordinates
62  if (m_doPosition) {
63  m_tree->Branch("globalX", &m_globalX);
64  m_tree->Branch("globalY", &m_globalY);
65  m_tree->Branch("globalZ", &m_globalZ);
66  m_tree->Branch("localX", &m_localX);
67  m_tree->Branch("localY", &m_localY);
68  m_tree->Branch("localZ", &m_localZ);
69  }
70 
71  // PIXEL SDO DEPOSITS
72  m_tree->Branch("sdoID", &m_sdoID);
73  m_tree->Branch("sdoWord", &m_sdoWord);
74  m_tree->Branch("barrelEndcap_sdo", &m_barrelEndcap_sdo);
75  m_tree->Branch("layerDisk_sdo", &m_layerDisk_sdo);
76  m_tree->Branch("phiModule_sdo", &m_phiModule_sdo);
77  m_tree->Branch("etaModule_sdo", &m_etaModule_sdo);
78  m_tree->Branch("phiIndex_sdo", &m_phiIndex_sdo);
79  m_tree->Branch("etaIndex_sdo", &m_etaIndex_sdo);
80  m_tree->Branch("noise", &m_noise);
81  m_tree->Branch("belowThresh", &m_belowThresh);
82  m_tree->Branch("disabled", &m_disabled);
83  m_tree->Branch("badTOT", &m_badTOT);
84  m_tree->Branch("barcode", &m_barcode);
85  m_tree->Branch("eventIndex", &m_eventIndex);
86  m_tree->Branch("charge", &m_charge);
87  m_tree->Branch("barcode_vec", &m_barcode_vec);
88  m_tree->Branch("eventIndex_vec", &m_eventIndex_vec);
89  m_tree->Branch("charge_vec", &m_charge_vec);
90  }
91  else {
92  ATH_MSG_ERROR("No tree found!");
93  }
94 
95  // HISTOGRAMS
96 
98  m_h_rdoID = new TH1F("h_rdoID", "rdoID", 100, 0, 10e17);
99  m_h_rdoWord = new TH1F("h_rdoWord", "rdoWord", 100, 0, 350);
100  m_h_barrelEndcap = new TH1F("h_barrelEndcap", "Barrel or Endcap", 100, -5, 5);
101  m_h_layerDisk = new TH1F("h_layerDisk", "Barrel layer or Endcap disk", 100, 0, 10);
102  m_h_phiModule = new TH1F("h_phiModule", "Phi module", 100, 0, 100);
103  m_h_etaModule = new TH1F("h_etaModule", "Eta module", 100, -50, 50);
104  m_h_phiIndex = new TH1F("h_phiIndex", "Phi index", 820, 0, 820);
105  m_h_etaIndex = new TH1F("h_etaIndex", "Eta index", 820, 0, 820);
106  m_h_ToT = new TH1F("h_ToT", "ToT", 100, 0, 100);
107  m_h_BCID = new TH1F("h_BCID", "BCID", 100, -1.5, 1.5);
108  m_h_LVL1A = new TH1F("h_LVL1A", "LVL1A", 100, -1.5, 1.5);
109  m_h_LVL1ID = new TH1F("h_LVL1ID", "LVL1ID", 100, -1.5, 1.5);
110 
112  m_h_brlLayer = new TH1F("h_brlLayer", "Barrel layer", 100, 0, 10);
113  m_h_brlPhiMod = new TH1F("h_brlPhiMod", "Barrel phi module", 100, 0, 100);
114  m_h_brlEtaMod = new TH1F("h_brlEtaMod", "Barrel eta module", 100, -50, 50);
115  m_h_brlPhiIndex = new TH1F("h_brlPhiIndex", "Barrel phi index", 820, 0, 820);
116  m_h_brlEtaIndex = new TH1F("h_brlEtaIndex", "Barrel eta index", 820, 0, 820);
117  m_h_brlToT = new TH1F("h_brlToT", "Barrel ToT", 100, 0, 100);
118  m_h_brlBCID = new TH1F("h_brlBCID", "Barrel BCID", 100, -1.5, 1.5);
119  m_h_brlLVL1A = new TH1F("h_brlLVL1A", "Barrel LVL1A", 100, -1.5, 1.5);
120  m_h_brlLVL1ID = new TH1F("h_brlLVL1ID", "Barrel LVL1ID", 100, -1.5, 1.5);
121 
122  // ec histograms
123  m_h_ecDisk = new TH1F("h_ecDisk", "Endcap disk", 100, 0, 10);
124  m_h_ecPhiMod = new TH1F("h_ecPhiMod", "Endcap phi module", 100, 0, 100);
125  m_h_ecEtaMod = new TH1F("h_ecEtaMod", "Endcap eta module", 100, -50, 50);
126  m_h_ecPhiIndex = new TH1F("h_ecPhiIndex", "Endcap phi index", 820, 0, 820);
127  m_h_ecEtaIndex = new TH1F("h_ecEtaIndex", "Endcap eta index", 820, 0, 820);
128  m_h_ecToT = new TH1F("h_ecToT", "EndcapToT", 100, 0, 100);
129  m_h_ecBCID = new TH1F("h_ecBCID", "Endcap BCID", 100, -1.5, 1.5);
130  m_h_ecLVL1A = new TH1F("h_ecLVL1A", "Endcap LVL1A", 100, -1.5, 1.5);
131  m_h_ecLVL1ID = new TH1F("h_ecLVL1ID", "Endcap LVL1ID", 100, -1.5, 1.5);
132 
133 
135  m_h_sdoID = new TH1F("h_sdoID", "sdoID", 100, 0, 10e17);
136  m_h_sdoWord = new TH1F("h_sdoWord", "sdoWord", 100, 0, 350);
137  m_h_barrelEndcap_sdo = new TH1F("h_barrelEndcap_sdo", "Barrel or Endcap (SDO)", 100, -5, 5);
138  m_h_layerDisk_sdo = new TH1F("h_layerDisk_sdo", "Barrel layer or Endcap disk (SDO)", 100, 0, 10);
139  m_h_phiModule_sdo = new TH1F("h_phiModule_sdo", "Phi module (SDO)", 100, 0, 100);
140  m_h_etaModule_sdo = new TH1F("h_etaModule_sdo", "Eta module (SDO)", 100, -50, 50);
141  m_h_phiIndex_sdo = new TH1F("h_phiIndex_sdo", "Phi index (SDO)", 820, 0, 820);
142  m_h_etaIndex_sdo = new TH1F("h_etaIndex_sdo", "Eta index (SDO)", 820, 0, 820);
143  m_h_barcode = new TH1F("h_barcode", "Barcode (SDO)", 100, 0, 2.2e5);
144  m_h_eventIndex = new TH1F("h_eventIndex", "Event Index (SDO)", 100, 0, 2);
145  m_h_charge = new TH1F("h_charge", "Charge (SDO)", 100, 0, 1e7);
146 
147 
148  m_h_belowThresh_brl = new TH1F("h_belowThresh_brl", "Below threshold pixels - Barrel; # below threshold pixels; layer", 8, -0.5, 7.5);
149  m_h_disabled_brl = new TH1F("h_disabled_brl", "Disabled pixels - Barrel; # disabled pixels; layer", 8, -0.5, 7.5);
150 
151  m_h_belowThresh_ec = new TH1F("h_belowThresh_ec", "Below threshold pixels - Endcap; # below threshold pixels; layer", 8, -0.5, 7.5);
152  m_h_disabled_ec = new TH1F("h_disabled_ec", "Disabled pixels - Endcap; # disabled pixels; layer", 8, -0.5, 7.5);
153 
154 
155  m_h_rdoID->StatOverflows();
156  ATH_CHECK(m_thistSvc->regHist(m_histPath + m_h_rdoID->GetName(), m_h_rdoID));
157 
158  m_h_rdoWord->StatOverflows();
159  ATH_CHECK(m_thistSvc->regHist(m_histPath + m_h_rdoWord->GetName(), m_h_rdoWord));
160 
161  m_h_barrelEndcap->StatOverflows();
163 
164  m_h_layerDisk->StatOverflows();
165  ATH_CHECK(m_thistSvc->regHist(m_histPath + m_h_layerDisk->GetName(), m_h_layerDisk));
166 
167  m_h_phiModule->StatOverflows();
168  ATH_CHECK(m_thistSvc->regHist(m_histPath + m_h_phiModule->GetName(), m_h_phiModule));
169 
170  m_h_etaModule->StatOverflows();
171  ATH_CHECK(m_thistSvc->regHist(m_histPath + m_h_etaModule->GetName(), m_h_etaModule));
172 
173  m_h_phiIndex->StatOverflows();
174  ATH_CHECK(m_thistSvc->regHist(m_histPath + m_h_phiIndex->GetName(), m_h_phiIndex));
175 
176  m_h_etaIndex->StatOverflows();
177  ATH_CHECK(m_thistSvc->regHist(m_histPath + m_h_etaIndex->GetName(), m_h_etaIndex));
178 
179  m_h_ToT->StatOverflows();
180  ATH_CHECK(m_thistSvc->regHist(m_histPath + m_h_ToT->GetName(), m_h_ToT));
181 
182  m_h_BCID->StatOverflows();
183  ATH_CHECK(m_thistSvc->regHist(m_histPath + m_h_BCID->GetName(), m_h_BCID));
184 
185  m_h_LVL1A->StatOverflows();
186  ATH_CHECK(m_thistSvc->regHist(m_histPath + m_h_LVL1A->GetName(), m_h_LVL1A));
187 
188  m_h_LVL1ID->StatOverflows();
189  ATH_CHECK(m_thistSvc->regHist(m_histPath + m_h_LVL1ID->GetName(), m_h_LVL1ID));
190 
191  m_h_brlLayer->StatOverflows();
192  ATH_CHECK(m_thistSvc->regHist(m_histPath + m_h_brlLayer->GetName(), m_h_brlLayer));
193 
194  m_h_brlPhiMod->StatOverflows();
195  ATH_CHECK(m_thistSvc->regHist(m_histPath + m_h_brlPhiMod->GetName(), m_h_brlPhiMod));
196 
197  m_h_brlEtaMod->StatOverflows();
198  ATH_CHECK(m_thistSvc->regHist(m_histPath + m_h_brlEtaMod->GetName(), m_h_brlEtaMod));
199 
200  m_h_brlPhiIndex->StatOverflows();
202 
203  m_h_brlEtaIndex->StatOverflows();
205 
206  m_h_brlToT->StatOverflows();
207  ATH_CHECK(m_thistSvc->regHist(m_histPath + m_h_brlToT->GetName(), m_h_brlToT));
208 
209  m_h_brlBCID->StatOverflows();
210  ATH_CHECK(m_thistSvc->regHist(m_histPath + m_h_brlBCID->GetName(), m_h_brlBCID));
211 
212  m_h_brlLVL1A->StatOverflows();
213  ATH_CHECK(m_thistSvc->regHist(m_histPath + m_h_brlLVL1A->GetName(), m_h_brlLVL1A));
214 
215  m_h_brlLVL1ID->StatOverflows();
216  ATH_CHECK(m_thistSvc->regHist(m_histPath + m_h_brlLVL1ID->GetName(), m_h_brlLVL1ID));
217 
218  m_h_ecDisk->StatOverflows();
219  ATH_CHECK(m_thistSvc->regHist(m_histPath + m_h_ecDisk->GetName(), m_h_ecDisk));
220 
221  m_h_ecPhiMod->StatOverflows();
222  ATH_CHECK(m_thistSvc->regHist(m_histPath + m_h_ecPhiMod->GetName(), m_h_ecPhiMod));
223 
224  m_h_ecEtaMod->StatOverflows();
225  ATH_CHECK(m_thistSvc->regHist(m_histPath + m_h_ecEtaMod->GetName(), m_h_ecEtaMod));
226 
227  m_h_ecPhiIndex->StatOverflows();
229 
230  m_h_ecEtaIndex->StatOverflows();
232 
233  m_h_ecToT->StatOverflows();
234  ATH_CHECK(m_thistSvc->regHist(m_histPath + m_h_ecToT->GetName(), m_h_ecToT));
235 
236  m_h_ecBCID->StatOverflows();
237  ATH_CHECK(m_thistSvc->regHist(m_histPath + m_h_ecBCID->GetName(), m_h_ecBCID));
238 
239  m_h_ecLVL1A->StatOverflows();
240  ATH_CHECK(m_thistSvc->regHist(m_histPath + m_h_ecLVL1A->GetName(), m_h_ecLVL1A));
241 
242  m_h_ecLVL1ID->StatOverflows();
243  ATH_CHECK(m_thistSvc->regHist(m_histPath + m_h_ecLVL1ID->GetName(), m_h_ecLVL1ID));
244 
245  m_h_sdoID->StatOverflows();
246  ATH_CHECK(m_thistSvc->regHist(m_histPath + m_h_sdoID->GetName(), m_h_sdoID));
247 
248  m_h_sdoWord->StatOverflows();
249  ATH_CHECK(m_thistSvc->regHist(m_histPath + m_h_sdoWord->GetName(), m_h_sdoWord));
250 
251  m_h_barrelEndcap_sdo->StatOverflows();
253 
254  m_h_layerDisk_sdo->StatOverflows();
256 
257  m_h_phiModule_sdo->StatOverflows();
259 
260  m_h_etaModule_sdo->StatOverflows();
262 
263  m_h_phiIndex_sdo->StatOverflows();
265 
266  m_h_etaIndex_sdo->StatOverflows();
268 
269  m_h_barcode->StatOverflows();
270  ATH_CHECK(m_thistSvc->regHist(m_histPath + m_h_barcode->GetName(), m_h_barcode));
271 
272  m_h_eventIndex->StatOverflows();
274 
275  m_h_charge->StatOverflows();
276  ATH_CHECK(m_thistSvc->regHist(m_histPath + m_h_charge->GetName(), m_h_charge));
277 
278  m_h_belowThresh_brl->StatOverflows();
280 
281  m_h_belowThresh_ec->StatOverflows();
283 
284  m_h_disabled_brl->StatOverflows();
286 
287  m_h_disabled_ec->StatOverflows();
289 
290  for (unsigned int layer=0; layer<33; layer++) {
291  m_h_brlflatPhiIndex_perLayer.emplace_back(new TH1F(("h_brlflatPhiIndex_perLayer"+std::to_string(layer)).c_str(), ("Phi index - Barrel Flat - Layer "+std::to_string(layer)).c_str(), 820, 0, 820));
292  m_h_brlflatPhiIndex_perLayer.back()->StatOverflows();
294 
295  m_h_brlflatEtaIndex_perLayer.emplace_back(new TH1F(("h_brlflatEtaIndex_perLayer"+std::to_string(layer)).c_str(), ("Eta index - Barrel Flat - Layer "+std::to_string(layer)).c_str(), 820, 0, 820));
296  m_h_brlflatEtaIndex_perLayer.back()->StatOverflows();
298 
299  m_h_brlinclPhiIndex_perLayer.emplace_back(new TH1F(("h_brlinclPhiIndex_perLayer"+std::to_string(layer)).c_str(), ("Phi index - Barrel Inclined - Layer "+std::to_string(layer)).c_str(), 820, 0, 820));
300  m_h_brlinclPhiIndex_perLayer.back()->StatOverflows();
302 
303  m_h_brlinclEtaIndex_perLayer.emplace_back(new TH1F(("h_brlinclEtaIndex_perLayer"+std::to_string(layer)).c_str(), ("Eta index - Barrel Inclined - Layer "+std::to_string(layer)).c_str(), 820, 0, 820));
304  m_h_brlinclEtaIndex_perLayer.back()->StatOverflows();
306 
307  m_h_ecPhiIndex_perLayer.emplace_back(new TH1F(("h_ecPhiIndex_perLayer"+std::to_string(layer)).c_str(), ("Phi index - Endcap - Layer "+std::to_string(layer)).c_str(), 820, 0, 820));
308  m_h_ecPhiIndex_perLayer.back()->StatOverflows();
309  ATH_CHECK(m_thistSvc->regHist(m_histPath + m_h_ecPhiIndex_perLayer.back()->GetName(), m_h_ecPhiIndex_perLayer.back()));
310 
311  m_h_ecEtaIndex_perLayer.emplace_back(new TH1F(("h_ecEtaIndex_perLayer"+std::to_string(layer)).c_str(), ("Eta index - Endcap - Layer "+std::to_string(layer)).c_str(), 820, 0, 820));
312  m_h_ecEtaIndex_perLayer.back()->StatOverflows();
313  ATH_CHECK(m_thistSvc->regHist(m_histPath + m_h_ecEtaIndex_perLayer.back()->GetName(), m_h_ecEtaIndex_perLayer.back()));
314  }
315 
316  m_h_phiIndexInnermost = new TH1F("h_PhiIndexInnermost", "Phi index - Innermost Layer ", 820, 0, 820);
317  m_h_phiIndexInnermost->StatOverflows();
319 
320  m_h_etaIndexInnermost = new TH1F("h_EtaIndexInnermost", "Eta index - Innermost Layer ", 820, 0, 820);
321  m_h_etaIndexInnermost->StatOverflows();
323 
324  m_h_phiIndexNextToInnermost = new TH1F("h_PhiIndexNextToInnermost", "Phi index - Next To Innermost Layer ", 820, 0, 820);
325  m_h_phiIndexNextToInnermost->StatOverflows();
327 
328  m_h_etaIndexNextToInnermost = new TH1F("h_EtaIndexNextToInnermost", "Eta index - Next To Innermost Layer ", 820, 0, 820);
329  m_h_etaIndexNextToInnermost->StatOverflows();
331 
332  m_h_globalXY = new TH2F("h_globalXY","h_globalXY; x [mm]; y [mm]",700,-350.,350,700,-350.,350);
333  ATH_CHECK(m_thistSvc->regHist(m_histPath + m_h_globalXY->GetName(), m_h_globalXY));
334  m_h_globalZR = new TH2F("h_globalZR","h_globalZR; z [mm]; r [mm]",6800,-3400.,3400,350,0.,350);
335  ATH_CHECK(m_thistSvc->regHist(m_histPath + m_h_globalZR->GetName(), m_h_globalZR));
336  m_h_globalX = new TH1F("h_globalX","h_globalX; x [mm]",700,-350.,350.);
337  ATH_CHECK(m_thistSvc->regHist(m_histPath + m_h_globalX->GetName(), m_h_globalX));
338  m_h_globalY = new TH1F("h_globalY","h_globalY; y [mm]",700,-350.,350.);
339  ATH_CHECK(m_thistSvc->regHist(m_histPath + m_h_globalY->GetName(), m_h_globalY));
340  m_h_globalZ = new TH1F("h_globalZ","h_globalZ; z [mm]",6800,-3400.,3400.);
341  ATH_CHECK(m_thistSvc->regHist(m_histPath + m_h_globalZ->GetName(), m_h_globalZ));
342 
343  // Special shared ITk histograms
344  std::string xy_name = "h_ITk_xy";
345  auto xy = std::make_unique<TH2D>(xy_name.c_str(), xy_name.c_str(), 2200, -1100, 1100, 2200, -1100, 1100);
346  xy->StatOverflows();
347  ATH_CHECK(m_thistSvc->regShared(m_sharedHistPath + xy_name, std::move(xy), m_h_globalXY_shared));
348 
349  std::string zr_name = "h_ITk_zr";
350  auto zr = std::make_unique<TH2D>(zr_name.c_str(), zr_name.c_str(), 6800, -3400, 3400, 1100, 0, 1100);
351  zr->StatOverflows();
352  ATH_CHECK(m_thistSvc->regShared(m_sharedHistPath + zr_name, std::move(zr), m_h_globalZR_shared));
353 
354  m_h_truthMatchedRDOs = new TH1F("h_TruthMatchedPixelRDOs", "h_TruthMatchedPixelRDOs", 4, 1, 5);
355  TString truthMatchBinLables[4] = { "All RDOs", "Truth Matched", "HS Matched", "Unmatched" };
356  for(unsigned int ibin = 1; ibin < 5; ibin++) {
357  m_h_truthMatchedRDOs->GetXaxis()->SetBinLabel(ibin, truthMatchBinLables[ibin-1]);
358  }
360  return StatusCode::SUCCESS;
361 }
362 
364  ATH_MSG_DEBUG(" In ITkPixelRDOAnalysis::execute()" );
365 
366  m_rdoID->clear();
367  m_rdoWord->clear();
368  m_barrelEndcap->clear();
369  m_layerDisk->clear();
370  m_phiModule->clear();
371  m_etaModule->clear();
372  m_phiIndex->clear();
373  m_etaIndex->clear();
374  m_isInnermost->clear();
375  m_isNextToInnermost->clear();
376  m_ToT->clear();
377  m_BCID->clear();
378  m_LVL1A->clear();
379  m_LVL1ID->clear();
380  m_sdoID->clear();
381  m_sdoWord->clear();
382  m_barrelEndcap_sdo->clear();
383  m_layerDisk_sdo->clear();
384  m_phiModule_sdo->clear();
385  m_etaModule_sdo->clear();
386  m_phiIndex_sdo->clear();
387  m_etaIndex_sdo->clear();
388  m_noise->clear();
389  m_belowThresh->clear();
390  m_disabled->clear();
391  m_badTOT->clear();
392  m_barcode->clear();
393  m_eventIndex->clear();
394  m_charge->clear();
395  m_barcode_vec->clear();
396  m_eventIndex_vec->clear();
397  m_charge_vec->clear();
398  if (m_doPosition) {
399  m_globalX->clear();
400  m_globalY->clear();
401  m_globalZ->clear();
402  m_localX->clear();
403  m_localY->clear();
404  m_localZ->clear();
405  }
406  // Raw Data
408  //Adding SimMap and McEvent here for added truthMatching checks
411  bool doTruthMatching = true;
412  const HepMC::GenEvent* hardScatterEvent(nullptr);
413 
414  if (mcEventCollection->size()==0){
415  ATH_MSG_WARNING("Failed to retrieve a nonzero sized truth event collection, disabling truthMatching");
416  doTruthMatching = false;
417  }
418  if(doTruthMatching) hardScatterEvent = mcEventCollection->at(0);
419 
420  if(p_pixelRDO_cont.isValid()) {
421  // loop over RDO container
422  PixelRDO_Container::const_iterator rdoCont_itr(p_pixelRDO_cont->begin());
423  const PixelRDO_Container::const_iterator rdoCont_end(p_pixelRDO_cont->end());
424  for ( ; rdoCont_itr != rdoCont_end; ++rdoCont_itr ) {
425  const PixelRDO_Collection* p_pixelRDO_coll(*rdoCont_itr);
426  PixelRDO_Collection::const_iterator rdo_itr(p_pixelRDO_coll->begin());
427  const PixelRDO_Collection::const_iterator rdo_end(p_pixelRDO_coll->end());
428 
429  const Identifier rdoIDColl(p_pixelRDO_coll->identify());
430  const int pixBrlEc(m_pixelID->barrel_ec(rdoIDColl));
431  const int pixLayerDisk(m_pixelID->layer_disk(rdoIDColl));
432  const int pixPhiMod(m_pixelID->phi_module(rdoIDColl));
433  const int pixEtaMod(m_pixelID->eta_module(rdoIDColl));
434  const int pixIsInnermost(0);
435  const int pixIsNextToInnermost(0);
436  //These are not yet implemented! Need to
437  //const int pixIsInnermost(m_pixelID->is_innermost(rdoIDColl));
438  //const int pixIsNextToInnermost(m_pixelID->is_nexttoinnermost(rdoIDColl));
439 
441 
442  for ( ; rdo_itr != rdo_end; ++rdo_itr ) {
443  if(doTruthMatching){
445  bool findMatch = false;
446  if(simDataMapPixel.isValid()){
447  InDetSimDataCollection::const_iterator iter = (*simDataMapPixel).find((*rdo_itr)->identify());
448 
449  if ( iter != (*simDataMapPixel).end() ) {
450  const InDetSimData& sdo = iter->second;
451  const std::vector< InDetSimData::Deposit >& deposits = sdo.getdeposits();
452  std::vector< InDetSimData::Deposit >::const_iterator nextdeposit = deposits.begin();
453  std::vector< InDetSimData::Deposit >::const_iterator lastdeposit = deposits.end();
454  for( ; nextdeposit!=lastdeposit; ++nextdeposit) {
455  const HepMcParticleLink& particleLink = nextdeposit->first;
456  if(particleLink.isValid() && !findMatch){
457  HepMC::ConstGenParticlePtr genPart(particleLink.cptr());
458  if(genPart->parent_event() == hardScatterEvent) m_h_truthMatchedRDOs->Fill(3.5);
460  findMatch = true;
461  }
462  }
463  }
464  }
465  if(!findMatch) m_h_truthMatchedRDOs->Fill(4.5);
466  }
467  const Identifier rdoID((*rdo_itr)->identify());
468  const unsigned int rdoWord((*rdo_itr)->getWord());
469  const int pixPhiIx(m_pixelID->phi_index(rdoID));
470  const int pixEtaIx(m_pixelID->eta_index(rdoID));
471  const int pixToT((*rdo_itr)->getToT());
472  const int pixBCID((*rdo_itr)->getBCID());
473  const int pixLVL1A((*rdo_itr)->getLVL1A());
474  const int pixLVL1ID((*rdo_itr)->getLVL1ID());
475 
476  //NB This is the position without lorentz correction
477  //(ATLSWUPGR-103)
478  //NB rationlization as here should probably also be done in master
479  //https://gitlab.cern.ch/atlas/athena/-/merge_requests/33398
480  InDetDD::SiLocalPosition localPos = detEl->rawLocalPositionOfCell(rdoID);
481  Amg::Vector3D globalPos = detEl->globalPosition(localPos);
482  if (m_doPosition) {
483  m_globalX->push_back(globalPos[Amg::x]);
484  m_globalY->push_back(globalPos[Amg::y]);
485  m_globalZ->push_back(globalPos[Amg::z]);
486 
487  m_localX->push_back(localPos.xPhi());
488  m_localY->push_back(localPos.xEta());
489  m_localZ->push_back(localPos.xDepth());
490  }
491  float pixelRadius = sqrt(globalPos[Amg::x]*globalPos[Amg::x]+globalPos[Amg::y]*globalPos[Amg::y]);
492  m_h_globalXY->Fill(globalPos[Amg::x],globalPos[Amg::y]);
493  m_h_globalXY_shared->Fill(globalPos[Amg::x],globalPos[Amg::y]);
494  m_h_globalZR->Fill(globalPos[Amg::z],pixelRadius);
495  m_h_globalZR_shared->Fill(globalPos[Amg::z],pixelRadius);
496  m_h_globalX->Fill(globalPos[Amg::x]);
497  m_h_globalY->Fill(globalPos[Amg::y]);
498  m_h_globalZ->Fill(globalPos[Amg::z]);
499  const unsigned long long rdoID_int = rdoID.get_compact();
500  m_rdoID->push_back(rdoID_int);
501  m_rdoWord->push_back(rdoWord);
502  m_barrelEndcap->push_back(pixBrlEc);
503  m_layerDisk->push_back(pixLayerDisk);
504  m_phiModule->push_back(pixPhiMod);
505  m_etaModule->push_back(pixEtaMod);
506  m_isInnermost->push_back(pixIsInnermost);
507  m_isNextToInnermost->push_back(pixIsNextToInnermost);
508  m_phiIndex->push_back(pixPhiIx);
509  m_etaIndex->push_back(pixEtaIx);
510  m_ToT->push_back(pixToT);
511  m_BCID->push_back(pixBCID);
512  m_LVL1A->push_back(pixLVL1A);
513  m_LVL1ID->push_back(pixLVL1ID);
514 
515  m_h_rdoID->Fill(rdoID_int);
516  m_h_rdoWord->Fill(rdoWord);
517  m_h_barrelEndcap->Fill(pixBrlEc);
518  m_h_layerDisk->Fill(pixLayerDisk);
519  m_h_phiModule->Fill(pixPhiMod);
520  m_h_etaModule->Fill(pixEtaMod);
521  m_h_phiIndex->Fill(pixPhiIx);
522  m_h_etaIndex->Fill(pixEtaIx);
523  m_h_ToT->Fill(pixToT);
524  m_h_BCID->Fill(pixBCID);
525  m_h_LVL1A->Fill(pixLVL1A);
526  m_h_LVL1ID->Fill(pixLVL1ID);
527 
528  if (pixIsInnermost) {
529  m_h_phiIndexInnermost->Fill(pixPhiIx);
530  m_h_etaIndexInnermost->Fill(pixEtaIx);
531  } else if (pixIsNextToInnermost) {
534  }
535 
536  //isInclined not yet implemented
537  //if (detEl->isBarrel() || detEl->isInclined()) {
538  if (detEl->isBarrel()){
539  m_h_brlLayer->Fill(pixLayerDisk);
540  m_h_brlPhiMod->Fill(pixPhiMod);
541  m_h_brlEtaMod->Fill(pixEtaMod);
542  m_h_brlPhiIndex->Fill(pixPhiIx);
543  m_h_brlEtaIndex->Fill(pixEtaIx);
544  m_h_brlToT->Fill(pixToT);
545  m_h_brlBCID->Fill(pixBCID);
546  m_h_brlLVL1A->Fill(pixLVL1A);
547  m_h_brlLVL1ID->Fill(pixLVL1ID);
548 
549  //if (detEl->isInclined()) {
550  // m_h_brlinclPhiIndex_perLayer[pixLayerDisk]->Fill(pixPhiIx);
551  // m_h_brlinclEtaIndex_perLayer[pixLayerDisk]->Fill(pixEtaIx);
552  //} else {
553  m_h_brlflatPhiIndex_perLayer[pixLayerDisk]->Fill(pixPhiIx);
554  m_h_brlflatEtaIndex_perLayer[pixLayerDisk]->Fill(pixEtaIx);
555  //}
556 
557  }
558  else if (detEl->isEndcap()) {
559  m_h_ecDisk->Fill(pixLayerDisk);
560  m_h_ecPhiMod->Fill(pixPhiMod);
561  m_h_ecEtaMod->Fill(pixEtaMod);
562  m_h_ecPhiIndex->Fill(pixPhiIx);
563  m_h_ecEtaIndex->Fill(pixEtaIx);
564  m_h_ecToT->Fill(pixToT);
565  m_h_ecBCID->Fill(pixBCID);
566  m_h_ecLVL1A->Fill(pixLVL1A);
567  m_h_ecLVL1ID->Fill(pixLVL1ID);
568 
569  m_h_ecPhiIndex_perLayer[pixLayerDisk]->Fill(pixPhiIx);
570  m_h_ecEtaIndex_perLayer[pixLayerDisk]->Fill(pixEtaIx);
571 
572  }
573  }
574  }
575  }
576 
577  // Sim Data
578  if(simDataMapPixel.isValid()) {
579  // loop over SDO container
580  InDetSimDataCollection::const_iterator sdo_itr(simDataMapPixel->begin());
581  const InDetSimDataCollection::const_iterator sdo_end(simDataMapPixel->end());
582 
583  std::vector<int> barcode_vec;
584  std::vector<int> eventIndex_vec;
585  std::vector<float> charge_vec;
586  for ( ; sdo_itr != sdo_end; ++sdo_itr ) {
587  const Identifier sdoID((*sdo_itr).first);
588  const InDetSimData& sdo((*sdo_itr).second);
589  const unsigned long long sdoID_int = sdoID.get_compact();
590  const int sdoWord(sdo.word());
591  const int pixBrlEc_sdo(m_pixelID->barrel_ec(sdoID));
592  const int pixLayerDisk_sdo(m_pixelID->layer_disk(sdoID));
593  const int pixPhiMod_sdo(m_pixelID->phi_module(sdoID));
594  const int pixEtaMod_sdo(m_pixelID->eta_module(sdoID));
595  const int pixPhiIx_sdo(m_pixelID->phi_index(sdoID));
596  const int pixEtaIx_sdo(m_pixelID->eta_index(sdoID));
597  const bool noise(PixelSimHelper::isNoise(sdo));
598  const bool belowThresh(PixelSimHelper::isBelowThreshold(sdo));
599  const bool disabled(PixelSimHelper::isDisabled(sdo));
600  const bool badTOT(PixelSimHelper::hasBadTOT(sdo));
601 
602  m_sdoID->push_back(sdoID_int);
603  m_sdoWord->push_back(sdoWord);
604  m_barrelEndcap_sdo->push_back(pixBrlEc_sdo);
605  m_layerDisk_sdo->push_back(pixLayerDisk_sdo);
606  m_phiModule_sdo->push_back(pixPhiMod_sdo);
607  m_etaModule_sdo->push_back(pixEtaMod_sdo);
608  m_phiIndex_sdo->push_back(pixPhiIx_sdo);
609  m_etaIndex_sdo->push_back(pixEtaIx_sdo);
610  m_noise->push_back(noise);
611 
612  m_belowThresh->push_back(belowThresh);
613  if (belowThresh) {
614  if (pixBrlEc_sdo==0)
615  m_h_belowThresh_brl->Fill(pixLayerDisk_sdo);
616  else if (abs(pixBrlEc_sdo)==2)
617  m_h_belowThresh_ec->Fill(pixLayerDisk_sdo);
618  }
619 
620  m_disabled->push_back(disabled);
621  if (disabled) {
622  if (pixBrlEc_sdo==0)
623  m_h_disabled_brl->Fill(pixLayerDisk_sdo);
624  else if (abs(pixBrlEc_sdo)==2)
625  m_h_disabled_ec->Fill(pixLayerDisk_sdo);
626  }
627 
628  m_badTOT->push_back(badTOT);
629 
630  m_h_sdoID->Fill(sdoID_int);
631  m_h_sdoWord->Fill(sdoWord);
632  m_h_barrelEndcap_sdo->Fill(pixBrlEc_sdo);
633  m_h_layerDisk_sdo->Fill(pixLayerDisk_sdo);
634  m_h_phiModule_sdo->Fill(pixPhiMod_sdo);
635  m_h_etaModule_sdo->Fill(pixEtaMod_sdo);
636  m_h_phiIndex_sdo->Fill(pixPhiIx_sdo);
637  m_h_etaIndex_sdo->Fill(pixEtaIx_sdo);
638 
639  // loop over deposits
640  const std::vector<InDetSimData::Deposit>& deposits = sdo.getdeposits();
641  std::vector<InDetSimData::Deposit>::const_iterator dep_itr(deposits.begin());
642  const std::vector<InDetSimData::Deposit>::const_iterator dep_end(deposits.end());
643  for ( ; dep_itr != dep_end; ++dep_itr ) {
644  const HepMcParticleLink& particleLink = (*dep_itr).first;
645  const int bar(HepMC::barcode(particleLink)); // FIXME barcode-based
646  const int eventIx(particleLink.eventIndex());
647  const int charge((*dep_itr).second);
648 
649  m_barcode->push_back(bar);
650  m_eventIndex->push_back(eventIx);
651  m_charge->push_back(charge);
652 
653  m_h_barcode->Fill(bar);
654  m_h_eventIndex->Fill(eventIx);
656 
657  barcode_vec.push_back(bar);
658  eventIndex_vec.push_back(eventIx);
659  charge_vec.push_back(charge);
660  }
661  m_barcode_vec->push_back(barcode_vec);
662  m_eventIndex_vec->push_back(eventIndex_vec);
663  m_charge_vec->push_back(charge_vec);
664  barcode_vec.clear();
665  eventIndex_vec.clear();
666  charge_vec.clear();
667  }
668  }
669 
670  if (m_tree) {
671  m_tree->Fill();
672  }
673 
674  return StatusCode::SUCCESS;
675 }
676 
677 } // namespace ITk
ITk::PixelRDOAnalysis::m_h_ecEtaIndex_perLayer
std::vector< TH1 * > m_h_ecEtaIndex_perLayer
Definition: ITkPixelRDOAnalysis.h:174
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
ITk::PixelRDOAnalysis::m_globalZ
std::vector< double > * m_globalZ
Definition: ITkPixelRDOAnalysis.h:87
ITk::PixelRDOAnalysis::m_pixelManager
const InDetDD::PixelDetectorManager * m_pixelManager
Definition: ITkPixelRDOAnalysis.h:53
ITk::PixelRDOAnalysis::m_BCID
std::vector< int > * m_BCID
Definition: ITkPixelRDOAnalysis.h:81
TH2::Fill
int Fill(double, double)
Definition: rootspy.cxx:382
ITk::PixelRDOAnalysis::m_h_belowThresh_ec
TH1 * m_h_belowThresh_ec
Definition: ITkPixelRDOAnalysis.h:162
ITk::PixelRDOAnalysis::m_detectorName
Gaudi::Property< std::string > m_detectorName
Definition: ITkPixelRDOAnalysis.h:55
InDetDD::SiDetectorElement::isEndcap
bool isEndcap() const
ITk::PixelRDOAnalysis::m_etaIndex_sdo
std::vector< int > * m_etaIndex_sdo
Definition: ITkPixelRDOAnalysis.h:101
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
ITk::PixelRDOAnalysis::m_localX
std::vector< double > * m_localX
Definition: ITkPixelRDOAnalysis.h:88
PixelID::phi_index
int phi_index(const Identifier &id) const
Definition: PixelID.h:658
ITk::PixelRDOAnalysis::m_rdoWord
std::vector< unsigned int > * m_rdoWord
Definition: ITkPixelRDOAnalysis.h:69
ITk::PixelRDOAnalysis::m_h_ecEtaIndex
TH1 * m_h_ecEtaIndex
Definition: ITkPixelRDOAnalysis.h:143
ITk::PixelRDOAnalysis::m_h_eventIndex
TH1 * m_h_eventIndex
Definition: ITkPixelRDOAnalysis.h:158
ITk::PixelRDOAnalysis::m_h_phiIndexNextToInnermost
TH1 * m_h_phiIndexNextToInnermost
Definition: ITkPixelRDOAnalysis.h:179
InDetSimData::getdeposits
const std::vector< Deposit > & getdeposits() const
Definition: InDetSimData.h:74
ITk::PixelRDOAnalysis::m_h_layerDisk
TH1 * m_h_layerDisk
Definition: ITkPixelRDOAnalysis.h:119
PixelID::barrel_ec
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
Definition: PixelID.h:619
ITk::PixelRDOAnalysis::m_h_brlEtaMod
TH1 * m_h_brlEtaMod
Definition: ITkPixelRDOAnalysis.h:131
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
ITk::PixelRDOAnalysis::m_disabled
std::vector< bool > * m_disabled
Definition: ITkPixelRDOAnalysis.h:105
ITk::PixelRDOAnalysis::m_h_globalX
TH1 * m_h_globalX
Definition: ITkPixelRDOAnalysis.h:186
ITk::PixelRDOAnalysis::m_h_globalZR
TH2 * m_h_globalZR
Definition: ITkPixelRDOAnalysis.h:183
ITk::PixelRDOAnalysis::m_h_brlinclEtaIndex_perLayer
std::vector< TH1 * > m_h_brlinclEtaIndex_perLayer
Definition: ITkPixelRDOAnalysis.h:168
ITk::PixelRDOAnalysis::m_sdoID
std::vector< unsigned long long > * m_sdoID
Definition: ITkPixelRDOAnalysis.h:93
ITk::PixelRDOAnalysis::m_eventIndex
std::vector< int > * m_eventIndex
Definition: ITkPixelRDOAnalysis.h:109
ITk::PixelRDOAnalysis::m_belowThresh
std::vector< bool > * m_belowThresh
Definition: ITkPixelRDOAnalysis.h:104
ITk::PixelRDOAnalysis::m_barrelEndcap_sdo
std::vector< int > * m_barrelEndcap_sdo
Definition: ITkPixelRDOAnalysis.h:96
ITk::PixelRDOAnalysis::m_etaModule
std::vector< int > * m_etaModule
Definition: ITkPixelRDOAnalysis.h:74
InDetRawDataCollection::identify
virtual Identifier identify() const override final
Amg::y
@ y
Definition: GeoPrimitives.h:35
ITk::PixelRDOAnalysis::m_h_ecPhiIndex
TH1 * m_h_ecPhiIndex
Definition: ITkPixelRDOAnalysis.h:142
ITk::PixelRDOAnalysis::m_h_brlLayer
TH1 * m_h_brlLayer
Definition: ITkPixelRDOAnalysis.h:129
ITk::PixelRDOAnalysis::m_globalX
std::vector< double > * m_globalX
Definition: ITkPixelRDOAnalysis.h:85
ITk::PixelRDOAnalysis::m_h_layerDisk_sdo
TH1 * m_h_layerDisk_sdo
Definition: ITkPixelRDOAnalysis.h:152
ITk::PixelRDOAnalysis::m_pixelID
const PixelID * m_pixelID
Definition: ITkPixelRDOAnalysis.h:52
PixelSimHelper::isNoise
static bool isNoise(const InDetSimData &sdo)
Definition: PixelSimHelper.h:109
ITk::PixelRDOAnalysis::m_phiIndex_sdo
std::vector< int > * m_phiIndex_sdo
Definition: ITkPixelRDOAnalysis.h:100
ITk::PixelRDOAnalysis::m_phiModule_sdo
std::vector< int > * m_phiModule_sdo
Definition: ITkPixelRDOAnalysis.h:98
ITk::PixelRDOAnalysis::m_h_phiIndexInnermost
TH1 * m_h_phiIndexInnermost
Definition: ITkPixelRDOAnalysis.h:176
ITk::PixelRDOAnalysis::m_sdoWord
std::vector< int > * m_sdoWord
Definition: ITkPixelRDOAnalysis.h:94
ITk::PixelRDOAnalysis::m_etaIndex
std::vector< int > * m_etaIndex
Definition: ITkPixelRDOAnalysis.h:76
ITkPixelRDOAnalysis.h
ITk::PixelRDOAnalysis::m_h_brlToT
TH1 * m_h_brlToT
Definition: ITkPixelRDOAnalysis.h:134
python.TrigEgammaMonitorHelper.TH2F
def TH2F(name, title, nxbins, bins_par2, bins_par3, bins_par4, bins_par5=None, bins_par6=None, path='', **kwargs)
Definition: TrigEgammaMonitorHelper.py:45
ITk::PixelRDOAnalysis::m_h_charge
TH1 * m_h_charge
Definition: ITkPixelRDOAnalysis.h:159
ITk::PixelRDOAnalysis::m_h_ecLVL1ID
TH1 * m_h_ecLVL1ID
Definition: ITkPixelRDOAnalysis.h:147
ITk::PixelRDOAnalysis::m_barcode_vec
std::vector< std::vector< int > > * m_barcode_vec
Definition: ITkPixelRDOAnalysis.h:111
ITk::PixelRDOAnalysis::m_h_ecLVL1A
TH1 * m_h_ecLVL1A
Definition: ITkPixelRDOAnalysis.h:146
ITk::PixelRDOAnalysis::m_h_barcode
TH1 * m_h_barcode
Definition: ITkPixelRDOAnalysis.h:157
ITk::PixelRDOAnalysis::m_h_disabled_brl
TH1 * m_h_disabled_brl
Definition: ITkPixelRDOAnalysis.h:164
ITk::PixelRDOAnalysis::m_ntupleName
Gaudi::Property< std::string > m_ntupleName
Definition: ITkPixelRDOAnalysis.h:62
ITk::PixelRDOAnalysis::m_isNextToInnermost
std::vector< int > * m_isNextToInnermost
Definition: ITkPixelRDOAnalysis.h:78
ITk::PixelRDOAnalysis::m_sharedHistPath
Gaudi::Property< std::string > m_sharedHistPath
Definition: ITkPixelRDOAnalysis.h:60
AthCommonDataStore< AthCommonMsg< Algorithm > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
ITk::PixelRDOAnalysis::m_localY
std::vector< double > * m_localY
Definition: ITkPixelRDOAnalysis.h:89
PixelSimHelper::hasBadTOT
static bool hasBadTOT(const InDetSimData &sdo)
Definition: PixelSimHelper.h:124
ITk::PixelRDOAnalysis::m_h_truthMatchedRDOs
TH1 * m_h_truthMatchedRDOs
Definition: ITkPixelRDOAnalysis.h:190
InDetDD::SiLocalPosition
Definition: SiLocalPosition.h:31
InDetDD::SiLocalPosition::xPhi
double xPhi() const
position along phi direction:
Definition: SiLocalPosition.h:123
ITk::PixelRDOAnalysis::m_h_brlflatEtaIndex_perLayer
std::vector< TH1 * > m_h_brlflatEtaIndex_perLayer
Definition: ITkPixelRDOAnalysis.h:171
ITk::PixelRDOAnalysis::m_h_belowThresh_brl
TH1 * m_h_belowThresh_brl
Definition: ITkPixelRDOAnalysis.h:161
ITk::PixelRDOAnalysis::m_h_ecPhiMod
TH1 * m_h_ecPhiMod
Definition: ITkPixelRDOAnalysis.h:140
ITk::PixelRDOAnalysis::m_h_disabled_ec
TH1 * m_h_disabled_ec
Definition: ITkPixelRDOAnalysis.h:165
Amg::z
@ z
Definition: GeoPrimitives.h:36
ITk::PixelRDOAnalysis::m_pixelIDName
Gaudi::Property< std::string > m_pixelIDName
Definition: ITkPixelRDOAnalysis.h:57
ITk::PixelRDOAnalysis::m_noise
std::vector< bool > * m_noise
Definition: ITkPixelRDOAnalysis.h:103
ITk::PixelRDOAnalysis::m_h_brlinclPhiIndex_perLayer
std::vector< TH1 * > m_h_brlinclPhiIndex_perLayer
Definition: ITkPixelRDOAnalysis.h:167
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
ITk::PixelRDOAnalysis::m_eventIndex_vec
std::vector< std::vector< int > > * m_eventIndex_vec
Definition: ITkPixelRDOAnalysis.h:112
ITk::PixelRDOAnalysis::m_h_globalXY
TH2 * m_h_globalXY
Definition: ITkPixelRDOAnalysis.h:182
ITk::PixelRDOAnalysis::m_globalY
std::vector< double > * m_globalY
Definition: ITkPixelRDOAnalysis.h:86
ITk::PixelRDOAnalysis::m_barrelEndcap
std::vector< int > * m_barrelEndcap
Definition: ITkPixelRDOAnalysis.h:71
ITk::PixelRDOAnalysis::m_h_etaIndex_sdo
TH1 * m_h_etaIndex_sdo
Definition: ITkPixelRDOAnalysis.h:156
InDetDD::SiLocalPosition::xEta
double xEta() const
position along eta direction:
Definition: SiLocalPosition.h:118
ITk::PixelRDOAnalysis::m_thistSvc
ServiceHandle< ITHistSvc > m_thistSvc
Definition: ITkPixelRDOAnalysis.h:65
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
ITk::PixelRDOAnalysis::m_h_brlPhiIndex
TH1 * m_h_brlPhiIndex
Definition: ITkPixelRDOAnalysis.h:132
HepMC::barcode
int barcode(const T *p)
Definition: Barcode.h:16
Amg::x
@ x
Definition: GeoPrimitives.h:34
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
ITk::PixelRDOAnalysis::m_h_globalZR_shared
LockedHandle< TH2 > m_h_globalZR_shared
Definition: ITkPixelRDOAnalysis.h:185
InDetSimData
Definition: InDetSimData.h:42
ITk::PixelRDOAnalysis::m_h_globalY
TH1 * m_h_globalY
Definition: ITkPixelRDOAnalysis.h:187
InDetRawDataCollection
Definition: InDetRawDataCollection.h:31
ITk::PixelRDOAnalysis::m_h_phiModule_sdo
TH1 * m_h_phiModule_sdo
Definition: ITkPixelRDOAnalysis.h:153
ITk::PixelRDOAnalysis::m_inputTruthKey
SG::ReadHandleKey< InDetSimDataCollection > m_inputTruthKey
Definition: ITkPixelRDOAnalysis.h:50
PixelSimHelper::isBelowThreshold
static bool isBelowThreshold(const InDetSimData &sdo)
Definition: PixelSimHelper.h:114
ITk::PixelRDOAnalysis::m_h_rdoID
TH1 * m_h_rdoID
Definition: ITkPixelRDOAnalysis.h:116
PixelID::eta_index
int eta_index(const Identifier &id) const
Definition: PixelID.h:664
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
IdentifiableContainerMT::end
const_iterator end() const
return const_iterator for end of container
Definition: IdentifiableContainerMT.h:242
ITk::PixelRDOAnalysis::m_LVL1A
std::vector< int > * m_LVL1A
Definition: ITkPixelRDOAnalysis.h:82
ITk::PixelRDOAnalysis::m_LVL1ID
std::vector< int > * m_LVL1ID
Definition: ITkPixelRDOAnalysis.h:83
ITk::PixelRDOAnalysis::m_h_barrelEndcap_sdo
TH1 * m_h_barrelEndcap_sdo
Definition: ITkPixelRDOAnalysis.h:151
SCT_Monitoring::disabled
@ disabled
Definition: SCT_MonitoringNumbers.h:60
IdentifiableContainerMT::const_iterator
Definition: IdentifiableContainerMT.h:82
ITk::PixelRDOAnalysis::m_h_phiIndex_sdo
TH1 * m_h_phiIndex_sdo
Definition: ITkPixelRDOAnalysis.h:155
IdentifiableContainerMT::begin
const_iterator begin() const
return const_iterator for first entry
Definition: IdentifiableContainerMT.h:236
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
ITk::PixelRDOAnalysis::m_h_brlBCID
TH1 * m_h_brlBCID
Definition: ITkPixelRDOAnalysis.h:135
ITk::PixelRDOAnalysis::m_ToT
std::vector< int > * m_ToT
Definition: ITkPixelRDOAnalysis.h:80
ITk::PixelRDOAnalysis::m_inputMcEventCollectionKey
SG::ReadHandleKey< McEventCollection > m_inputMcEventCollectionKey
Definition: ITkPixelRDOAnalysis.h:51
TH1::Fill
int Fill(double)
Definition: rootspy.cxx:285
SiLocalPosition.h
AthAlgorithm
Definition: AthAlgorithm.h:47
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
ITk::PixelRDOAnalysis::m_h_ecBCID
TH1 * m_h_ecBCID
Definition: ITkPixelRDOAnalysis.h:145
ITk::PixelRDOAnalysis::m_charge
std::vector< int > * m_charge
Definition: ITkPixelRDOAnalysis.h:110
ITk::PixelRDOAnalysis::m_layerDisk_sdo
std::vector< int > * m_layerDisk_sdo
Definition: ITkPixelRDOAnalysis.h:97
PixelID::layer_disk
int layer_disk(const Identifier &id) const
Definition: PixelID.h:626
python.SystemOfUnits.bar
int bar
Definition: SystemOfUnits.py:188
ITk::PixelRDOAnalysis::m_h_globalZ
TH1 * m_h_globalZ
Definition: ITkPixelRDOAnalysis.h:188
InDetDD::SiLocalPosition::xDepth
double xDepth() const
position along depth direction:
Definition: SiLocalPosition.h:128
HepMC::ConstGenParticlePtr
const GenParticle * ConstGenParticlePtr
Definition: GenParticle.h:38
PixelID::eta_module
int eta_module(const Identifier &id) const
Definition: PixelID.h:651
ITk::PixelRDOAnalysis::initialize
virtual StatusCode initialize() override final
Definition: ITkPixelRDOAnalysis.cxx:27
ITk::PixelRDOAnalysis::m_h_globalXY_shared
LockedHandle< TH2 > m_h_globalXY_shared
Definition: ITkPixelRDOAnalysis.h:184
ITk
Definition: ITkPixelOfflineCalibCondAlg.cxx:14
ITk::PixelRDOAnalysis::m_rdoID
std::vector< unsigned long long > * m_rdoID
Definition: ITkPixelRDOAnalysis.h:68
ITk::PixelRDOAnalysis::m_h_BCID
TH1 * m_h_BCID
Definition: ITkPixelRDOAnalysis.h:125
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
ITk::PixelRDOAnalysis::m_tree
TTree * m_tree
Definition: ITkPixelRDOAnalysis.h:192
ITk::PixelRDOAnalysis::m_charge_vec
std::vector< std::vector< float > > * m_charge_vec
Definition: ITkPixelRDOAnalysis.h:113
charge
double charge(const T &p)
Definition: AtlasPID.h:494
ITk::PixelRDOAnalysis::m_isInnermost
std::vector< int > * m_isInnermost
Definition: ITkPixelRDOAnalysis.h:77
InDetDD::SiDetectorElement
Definition: SiDetectorElement.h:109
InDetDD::SiDetectorElement::isBarrel
bool isBarrel() const
ITk::PixelRDOAnalysis::m_h_barrelEndcap
TH1 * m_h_barrelEndcap
Definition: ITkPixelRDOAnalysis.h:118
ITk::PixelRDOAnalysis::m_phiModule
std::vector< int > * m_phiModule
Definition: ITkPixelRDOAnalysis.h:73
ITk::PixelRDOAnalysis::m_inputKey
SG::ReadHandleKey< PixelRDO_Container > m_inputKey
Definition: ITkPixelRDOAnalysis.h:49
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
ITk::PixelRDOAnalysis::m_h_brlPhiMod
TH1 * m_h_brlPhiMod
Definition: ITkPixelRDOAnalysis.h:130
SiDetectorElement.h
ITk::PixelRDOAnalysis::m_h_LVL1A
TH1 * m_h_LVL1A
Definition: ITkPixelRDOAnalysis.h:126
ITk::PixelRDOAnalysis::m_h_etaModule
TH1 * m_h_etaModule
Definition: ITkPixelRDOAnalysis.h:121
ITk::PixelRDOAnalysis::m_h_brlflatPhiIndex_perLayer
std::vector< TH1 * > m_h_brlflatPhiIndex_perLayer
Definition: ITkPixelRDOAnalysis.h:170
ITk::PixelRDOAnalysis::m_h_LVL1ID
TH1 * m_h_LVL1ID
Definition: ITkPixelRDOAnalysis.h:127
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
ITk::PixelRDOAnalysis::m_h_rdoWord
TH1 * m_h_rdoWord
Definition: ITkPixelRDOAnalysis.h:117
ITk::PixelRDOAnalysis::m_barcode
std::vector< int > * m_barcode
Definition: ITkPixelRDOAnalysis.h:108
ITk::PixelRDOAnalysis::m_h_phiModule
TH1 * m_h_phiModule
Definition: ITkPixelRDOAnalysis.h:120
InDetSimData::word
int word() const
Definition: InDetSimData.h:69
InDetDD::SolidStateDetectorElementBase::rawLocalPositionOfCell
Amg::Vector2D rawLocalPositionOfCell(const SiCellId &cellId) const
Returns position (center) of cell.
Definition: SolidStateDetectorElementBase.cxx:230
Identifier::get_compact
value_type get_compact(void) const
Get the compact id.
ITk::PixelRDOAnalysis::m_h_ecEtaMod
TH1 * m_h_ecEtaMod
Definition: ITkPixelRDOAnalysis.h:141
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
InDetDD::SolidStateDetectorElementBase::globalPosition
HepGeom::Point3D< double > globalPosition(const HepGeom::Point3D< double > &localPos) const
transform a reconstruction local position into a global position (inline):
ITk::PixelRDOAnalysis::m_h_ecToT
TH1 * m_h_ecToT
Definition: ITkPixelRDOAnalysis.h:144
ITk::PixelRDOAnalysis::m_h_phiIndex
TH1 * m_h_phiIndex
Definition: ITkPixelRDOAnalysis.h:122
ITk::PixelRDOAnalysis::m_h_etaIndex
TH1 * m_h_etaIndex
Definition: ITkPixelRDOAnalysis.h:123
ITk::PixelRDOAnalysis::m_phiIndex
std::vector< int > * m_phiIndex
Definition: ITkPixelRDOAnalysis.h:75
ITk::PixelRDOAnalysis::m_etaModule_sdo
std::vector< int > * m_etaModule_sdo
Definition: ITkPixelRDOAnalysis.h:99
ITk::PixelRDOAnalysis::m_h_sdoWord
TH1 * m_h_sdoWord
Definition: ITkPixelRDOAnalysis.h:150
PixelSimHelper::isDisabled
static bool isDisabled(const InDetSimData &sdo)
Definition: PixelSimHelper.h:119
ITk::PixelRDOAnalysis::m_h_ecDisk
TH1 * m_h_ecDisk
Definition: ITkPixelRDOAnalysis.h:139
ITk::PixelRDOAnalysis::PixelRDOAnalysis
PixelRDOAnalysis(const std::string &name, ISvcLocator *pSvcLocator)
Definition: ITkPixelRDOAnalysis.cxx:22
ITk::PixelRDOAnalysis::m_h_ToT
TH1 * m_h_ToT
Definition: ITkPixelRDOAnalysis.h:124
python.TrigEgammaMonitorHelper.TH1F
def TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)
Definition: TrigEgammaMonitorHelper.py:24
ITk::PixelRDOAnalysis::m_h_etaIndexInnermost
TH1 * m_h_etaIndexInnermost
Definition: ITkPixelRDOAnalysis.h:177
ITk::PixelRDOAnalysis::m_h_ecPhiIndex_perLayer
std::vector< TH1 * > m_h_ecPhiIndex_perLayer
Definition: ITkPixelRDOAnalysis.h:173
DataVector::at
const T * at(size_type n) const
Access an element, as an rvalue.
ReadHandle.h
Handle class for reading from StoreGate.
ITk::PixelRDOAnalysis::m_h_etaModule_sdo
TH1 * m_h_etaModule_sdo
Definition: ITkPixelRDOAnalysis.h:154
PixelID::phi_module
int phi_module(const Identifier &id) const
Definition: PixelID.h:644
ITk::PixelRDOAnalysis::m_h_sdoID
TH1 * m_h_sdoID
Definition: ITkPixelRDOAnalysis.h:149
ITk::PixelRDOAnalysis::m_h_brlEtaIndex
TH1 * m_h_brlEtaIndex
Definition: ITkPixelRDOAnalysis.h:133
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
ITk::PixelRDOAnalysis::m_layerDisk
std::vector< int > * m_layerDisk
Definition: ITkPixelRDOAnalysis.h:72
ITk::PixelRDOAnalysis::m_h_brlLVL1ID
TH1 * m_h_brlLVL1ID
Definition: ITkPixelRDOAnalysis.h:137
ITk::PixelRDOAnalysis::m_histPath
Gaudi::Property< std::string > m_histPath
Definition: ITkPixelRDOAnalysis.h:59
ITk::PixelRDOAnalysis::m_badTOT
std::vector< bool > * m_badTOT
Definition: ITkPixelRDOAnalysis.h:106
ITk::PixelRDOAnalysis::execute
virtual StatusCode execute() override final
Definition: ITkPixelRDOAnalysis.cxx:363
ITk::PixelRDOAnalysis::m_h_etaIndexNextToInnermost
TH1 * m_h_etaIndexNextToInnermost
Definition: ITkPixelRDOAnalysis.h:180
ITk::PixelRDOAnalysis::m_localZ
std::vector< double > * m_localZ
Definition: ITkPixelRDOAnalysis.h:90
WriteCellNoiseToCool.noise
noise
Definition: WriteCellNoiseToCool.py:380
ITk::PixelRDOAnalysis::m_ntuplePath
Gaudi::Property< std::string > m_ntuplePath
Definition: ITkPixelRDOAnalysis.h:61
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
ITk::PixelRDOAnalysis::m_doPosition
Gaudi::Property< bool > m_doPosition
Definition: ITkPixelRDOAnalysis.h:63
InDetDD::PixelDetectorManager::getDetectorElement
virtual SiDetectorElement * getDetectorElement(const Identifier &id) const override
access to individual elements : via Identifier
Definition: PixelDetectorManager.cxx:80
ITk::PixelRDOAnalysis::m_h_brlLVL1A
TH1 * m_h_brlLVL1A
Definition: ITkPixelRDOAnalysis.h:136