ATLAS Offline Software
TruthHitSummaryAlg.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include "TruthHitSummaryAlg.h"
6 
11 
12 namespace Muon {
13  using namespace MuonStationIndex;
14  // Initialize method:
16  ATH_CHECK(m_muonTruth.initialize());
17  ATH_CHECK(m_PRD_TruthNames.initialize());
18  ATH_CHECK(m_idHelperSvc.retrieve());
19 
20  ATH_CHECK(m_nprecLayersKey.initialize());
21  ATH_CHECK(m_nphiLayersKey.initialize());
22  ATH_CHECK(m_ntrigEtaLayersKey.initialize());
23  ATH_CHECK(m_innerSmallHitsKey.initialize());
24  ATH_CHECK(m_innerLargeHitsKey.initialize());
25  ATH_CHECK(m_middleSmallHitsKey.initialize());
26  ATH_CHECK(m_middleLargeHitsKey.initialize());
27  ATH_CHECK(m_outerSmallHitsKey.initialize());
28  ATH_CHECK(m_outerLargeHitsKey.initialize());
29  ATH_CHECK(m_extendedSmallHitsKey.initialize());
30  ATH_CHECK(m_extendedLargeHitsKey.initialize());
31  ATH_CHECK(m_phiLayer1HitsKey.initialize());
32  ATH_CHECK(m_phiLayer2HitsKey.initialize());
33  ATH_CHECK(m_phiLayer3HitsKey.initialize());
34  ATH_CHECK(m_phiLayer4HitsKey.initialize());
35  ATH_CHECK(m_etaLayer1HitsKey.initialize());
36  ATH_CHECK(m_etaLayer2HitsKey.initialize());
37  ATH_CHECK(m_etaLayer3HitsKey.initialize());
38  ATH_CHECK(m_etaLayer4HitsKey.initialize());
39  ATH_CHECK(m_truthMdtHitsKey.initialize(m_idHelperSvc->hasMDT()));
40  ATH_CHECK(m_truthTgcHitsKey.initialize(m_idHelperSvc->hasTGC()));
41  ATH_CHECK(m_truthRpcHitsKey.initialize(m_idHelperSvc->hasRPC()));
42  ATH_CHECK(m_truthCscHitsKey.initialize(m_idHelperSvc->hasCSC()));
43  ATH_CHECK(m_truthStgcHitsKey.initialize(m_idHelperSvc->hasSTGC()));
44  ATH_CHECK(m_truthMMHitsKey.initialize(m_idHelperSvc->hasMM()));
45 
46  return StatusCode::SUCCESS;
47  }
48 
49  // Execute method:
50  StatusCode TruthHitSummaryAlg::execute(const EventContext& ctx) const {
51  // skip if no input data found
52  SG::ReadHandle muonTruthContainer(m_muonTruth, ctx);
53  ATH_CHECK(muonTruthContainer.isPresent());
54 
55  summaryDecors myDecors{this, ctx};
56 
57  // loop over truth coll (muon only)
58  for (const xAOD::TruthParticle* truthParticle : *muonTruthContainer) {
59  ChamberIdMap ids{};
60  ATH_CHECK(addHitCounts(ctx, *truthParticle, ids, myDecors));
61  ATH_CHECK(addHitIDVectors(*truthParticle, ids, myDecors));
62  }
63  return StatusCode::SUCCESS;
64  }
65 
67  const xAOD::TruthParticle& truthParticle,
68  ChamberIdMap& ids, summaryDecors& myDecors) const {
69 
70  std::vector<unsigned int> nprecHitsPerChamberLayer;
71  std::vector<unsigned int> nphiHitsPerChamberLayer;
72  std::vector<unsigned int> ntrigEtaHitsPerChamberLayer;
73 
74  ntrigEtaHitsPerChamberLayer.resize(toInt(PhiIndex::PhiIndexMax));
75  nprecHitsPerChamberLayer.resize(toInt(ChIndex::ChIndexMax));
76  nphiHitsPerChamberLayer.resize(toInt(PhiIndex::PhiIndexMax));
77 
78  ATH_MSG_DEBUG("addHitCounts: unique ID " << HepMC::uniqueID(truthParticle));
79  auto truthParticleHistory = HepMC::simulation_history(&truthParticle, -1); // Returns a list of unique IDs
80  // loop over detector technologies
81  for (SG::ReadHandle<PRD_MultiTruthCollection>& col : m_PRD_TruthNames.makeHandles(ctx)) {
82  ATH_CHECK(col.isPresent());
83 
84  // loop over trajectories
85  for (const std::pair<Identifier, HepMcParticleLink> trajectory : *col) {
86  // check if gen particle same as input
87  if (std::ranges::find(truthParticleHistory, HepMC::uniqueID(trajectory.second)) == truthParticleHistory.end()) {
88  continue;
89  }
90  const Identifier& id = trajectory.first;
91  bool measPhi = m_idHelperSvc->measuresPhi(id);
92  bool isTgc = m_idHelperSvc->isTgc(id);
93  ChIndex chIndex = !isTgc ? m_idHelperSvc->chamberIndex(id) : ChIndex::ChUnknown;
94 
95  // add identifier to map
96  if (m_idHelperSvc->isTgc(id)) { // TGCS should be added to both EIL and EIS
97  PhiIndex index = m_idHelperSvc->phiIndex(id);
98  if (index == PhiIndex::T4) {
99  ids[ChIndex::EIS].push_back(id);
100  ids[ChIndex::EIL].push_back(id);
101  } else {
102  ids[ChIndex::EMS].push_back(id);
103  ids[ChIndex::EML].push_back(id);
104  }
105  } else {
106  ids[m_idHelperSvc->chamberIndex(id)].push_back(id);
107  }
108  if (m_idHelperSvc->issTgc(id)) {
109  if (measPhi) {
110  PhiIndex index = m_idHelperSvc->phiIndex(id);
111  ++nphiHitsPerChamberLayer.at(toInt(index));
112  } else {
113  ++nprecHitsPerChamberLayer.at(toInt(chIndex));
114  }
115  } else if (m_idHelperSvc->isMM(id)) {
116  ++nprecHitsPerChamberLayer.at(toInt(chIndex));
117  } else if (m_idHelperSvc->isTrigger(id)) {
118  PhiIndex index = m_idHelperSvc->phiIndex(id);
119  if (index != PhiIndex::PhiUnknown) {
120  if (measPhi)
121  ++nphiHitsPerChamberLayer.at(toInt(index));
122  else
123  ++ntrigEtaHitsPerChamberLayer.at(toInt(index));
124  }
125  } else {
126  if (measPhi) {
127  PhiIndex index = m_idHelperSvc->phiIndex(id);
128  ++nphiHitsPerChamberLayer.at(toInt(index));
129  } else {
130  ++nprecHitsPerChamberLayer.at(toInt(chIndex));
131  }
132  }
133  }
134  }
135 
136  uint8_t innerSmallHits = nprecHitsPerChamberLayer[toInt(ChIndex::BIS)] +
137  nprecHitsPerChamberLayer[toInt(ChIndex::EIS)] +
138  nprecHitsPerChamberLayer[toInt(ChIndex::CSS)];
139 
140  uint8_t innerLargeHits = nprecHitsPerChamberLayer[toInt(ChIndex::BIL)] +
141  nprecHitsPerChamberLayer[toInt(ChIndex::EIL)] +
142  nprecHitsPerChamberLayer[toInt(ChIndex::CSL)];
143 
144  uint8_t middleSmallHits = nprecHitsPerChamberLayer[toInt(ChIndex::BMS)] +
145  nprecHitsPerChamberLayer[toInt(ChIndex::EMS)];
146 
147  uint8_t middleLargeHits = nprecHitsPerChamberLayer[toInt(ChIndex::BML)] +
148  nprecHitsPerChamberLayer[toInt(ChIndex::EML)];
149 
150  uint8_t outerSmallHits = nprecHitsPerChamberLayer[toInt(ChIndex::BOS)] +
151  nprecHitsPerChamberLayer[toInt(ChIndex::EOS)];
152 
153  uint8_t outerLargeHits = nprecHitsPerChamberLayer[toInt(ChIndex::BML)] +
154  nprecHitsPerChamberLayer[toInt(ChIndex::EOL)];
155 
156  uint8_t extendedSmallHits = nprecHitsPerChamberLayer[toInt(ChIndex::EES)] +
157  nprecHitsPerChamberLayer[toInt(ChIndex::BEE)];
158 
159  uint8_t extendedLargeHits = nprecHitsPerChamberLayer[toInt(ChIndex::EEL)];
160 
161  uint8_t phiLayer1Hits = nphiHitsPerChamberLayer[toInt(PhiIndex::BM1)] +
162  nphiHitsPerChamberLayer[toInt(PhiIndex::T4)] +
163  nphiHitsPerChamberLayer[toInt(PhiIndex::CSC)] +
164  nphiHitsPerChamberLayer[toInt(PhiIndex::STGC1)] +
165  nphiHitsPerChamberLayer[toInt(PhiIndex::STGC2)];
166 
167  uint8_t phiLayer2Hits = nphiHitsPerChamberLayer[toInt(PhiIndex::BM2)] +
168  nphiHitsPerChamberLayer[toInt(PhiIndex::T1)];
169 
170  uint8_t phiLayer3Hits = nphiHitsPerChamberLayer[toInt(PhiIndex::BO1)] +
171  nphiHitsPerChamberLayer[toInt(PhiIndex::T2)];
172 
173  uint8_t phiLayer4Hits = nphiHitsPerChamberLayer[toInt(PhiIndex::BO2)] +
174  nphiHitsPerChamberLayer[toInt(PhiIndex::T3)];
175 
176  uint8_t etaLayer1Hits = ntrigEtaHitsPerChamberLayer[toInt(PhiIndex::BM1)] +
177  ntrigEtaHitsPerChamberLayer[toInt(PhiIndex::T4)]+
178  ntrigEtaHitsPerChamberLayer[toInt(PhiIndex::CSC)] +
179  ntrigEtaHitsPerChamberLayer[toInt(PhiIndex::STGC1)] +
180  ntrigEtaHitsPerChamberLayer[toInt(PhiIndex::STGC2)];
181 
182  uint8_t etaLayer2Hits = ntrigEtaHitsPerChamberLayer[toInt(PhiIndex::BM2)] +
183  ntrigEtaHitsPerChamberLayer[toInt(PhiIndex::T1)];
184 
185  uint8_t etaLayer3Hits = ntrigEtaHitsPerChamberLayer[toInt(PhiIndex::BO1)] +
186  ntrigEtaHitsPerChamberLayer[toInt(PhiIndex::T2)];
187 
188  uint8_t etaLayer4Hits = ntrigEtaHitsPerChamberLayer[toInt(PhiIndex::BO2)] +
189  ntrigEtaHitsPerChamberLayer[toInt(PhiIndex::T3)];
190 
191  uint8_t nprecLayers = 0;
192  nprecLayers += (nprecHitsPerChamberLayer[toInt(ChIndex::BIS)] + nprecHitsPerChamberLayer[toInt(ChIndex::BIL)] > 3);
193  nprecLayers += (nprecHitsPerChamberLayer[toInt(ChIndex::BMS)] + nprecHitsPerChamberLayer[toInt(ChIndex::BML)] > 2);
194  nprecLayers += (nprecHitsPerChamberLayer[toInt(ChIndex::BOS)] + nprecHitsPerChamberLayer[toInt(ChIndex::BOL)] > 2);
195  nprecLayers += (nprecHitsPerChamberLayer[toInt(ChIndex::EIS)] + nprecHitsPerChamberLayer[toInt(ChIndex::EIL)] > 3);
196  nprecLayers += (nprecHitsPerChamberLayer[toInt(ChIndex::EMS)] + nprecHitsPerChamberLayer[toInt(ChIndex::EML)] > 2);
197  nprecLayers += (nprecHitsPerChamberLayer[toInt(ChIndex::EOS)] + nprecHitsPerChamberLayer[toInt(ChIndex::EOL)] > 2);
198  nprecLayers += (nprecHitsPerChamberLayer[toInt(ChIndex::EES)] + nprecHitsPerChamberLayer[toInt(ChIndex::EEL)] > 3);
199  nprecLayers += (nprecHitsPerChamberLayer[toInt(ChIndex::CSS)] + nprecHitsPerChamberLayer[toInt(ChIndex::CSL)] > 2);
200  nprecLayers += (nprecHitsPerChamberLayer[toInt(ChIndex::BEE)] > 3);
201 
202  uint8_t nphiLayers = 0;
203  nphiLayers += (nphiHitsPerChamberLayer[toInt(PhiIndex::BM1)] > 0);
204  nphiLayers += (nphiHitsPerChamberLayer[toInt(PhiIndex::BM2)] > 0);
205  nphiLayers += (nphiHitsPerChamberLayer[toInt(PhiIndex::BO1)] > 0);
206  nphiLayers += (nphiHitsPerChamberLayer[toInt(PhiIndex::BO2)] > 0);
207  nphiLayers += (nphiHitsPerChamberLayer[toInt(PhiIndex::T1)] > 0);
208  nphiLayers += (nphiHitsPerChamberLayer[toInt(PhiIndex::T2)] > 0);
209  nphiLayers += (nphiHitsPerChamberLayer[toInt(PhiIndex::T3)] > 0);
210  nphiLayers += (nphiHitsPerChamberLayer[toInt(PhiIndex::T4)] > 0);
211  nphiLayers += (nphiHitsPerChamberLayer[toInt(PhiIndex::CSC)] > 2);
212  nphiLayers += (nphiHitsPerChamberLayer[toInt(PhiIndex::STGC1)] + nphiHitsPerChamberLayer[toInt(PhiIndex::STGC2)] > 3);
213 
214  uint8_t ntrigEtaLayers = 0;
215  ntrigEtaLayers += (ntrigEtaHitsPerChamberLayer[toInt(PhiIndex::BM1)] > 0);
216  ntrigEtaLayers += (ntrigEtaHitsPerChamberLayer[toInt(PhiIndex::BM2)] > 0);
217  ntrigEtaLayers += (ntrigEtaHitsPerChamberLayer[toInt(PhiIndex::BO1)] > 0);
218  ntrigEtaLayers += (ntrigEtaHitsPerChamberLayer[toInt(PhiIndex::BO2)] > 0);
219  ntrigEtaLayers += (ntrigEtaHitsPerChamberLayer[toInt(PhiIndex::T1)] > 0);
220  ntrigEtaLayers += (ntrigEtaHitsPerChamberLayer[toInt(PhiIndex::T2)] > 0);
221  ntrigEtaLayers += (ntrigEtaHitsPerChamberLayer[toInt(PhiIndex::T3)] > 0);
222  ntrigEtaLayers += (ntrigEtaHitsPerChamberLayer[toInt(PhiIndex::T4)] > 0);
223  ntrigEtaLayers += (ntrigEtaHitsPerChamberLayer[toInt(PhiIndex::CSC)] > 2);
224  ntrigEtaLayers += (ntrigEtaHitsPerChamberLayer[toInt(PhiIndex::STGC1)] + ntrigEtaHitsPerChamberLayer[toInt(PhiIndex::STGC2)] > 3);
225  // copy hit counts onto TruthParticle
226  (*myDecors.nprecLayersDecor)(truthParticle) = nprecLayers;
227  (*myDecors.nphiLayersDecor)(truthParticle) = nphiLayers;
228  (*myDecors.ntrigEtaLayersDecor)(truthParticle) = ntrigEtaLayers;
229  (*myDecors.innerSmallHitsDecor)(truthParticle) = innerSmallHits;
230  (*myDecors.innerLargeHitsDecor)(truthParticle) = innerLargeHits;
231  (*myDecors.middleSmallHitsDecor)(truthParticle) = middleSmallHits;
232  (*myDecors.middleLargeHitsDecor)(truthParticle) = middleLargeHits;
233  (*myDecors.outerSmallHitsDecor)(truthParticle) = outerSmallHits;
234  (*myDecors.outerLargeHitsDecor)(truthParticle) = outerLargeHits;
235  (*myDecors.extendedSmallHitsDecor)(truthParticle) = extendedSmallHits;
236  (*myDecors.extendedLargeHitsDecor)(truthParticle) = extendedLargeHits;
237 
238  (*myDecors.phiLayer1HitsDecor)(truthParticle) = phiLayer1Hits;
239  (*myDecors.phiLayer2HitsDecor)(truthParticle) = phiLayer2Hits;
240  (*myDecors.phiLayer3HitsDecor)(truthParticle) = phiLayer3Hits;
241  (*myDecors.phiLayer4HitsDecor)(truthParticle) = phiLayer4Hits;
242 
243  (*myDecors.etaLayer1HitsDecor)(truthParticle) = etaLayer1Hits;
244  (*myDecors.etaLayer2HitsDecor)(truthParticle) = etaLayer2Hits;
245  (*myDecors.etaLayer3HitsDecor)(truthParticle) = etaLayer3Hits;
246  (*myDecors.etaLayer4HitsDecor)(truthParticle) = etaLayer4Hits;
247 
248 
249  if (msgLvl(MSG::DEBUG)) {
250  ATH_MSG_DEBUG("Precision layers " << static_cast<int>(nprecLayers) << " phi layers " << static_cast<int>(nphiLayers)
251  << " triggerEta layers " << static_cast<int>(ntrigEtaLayers));
252 
253  if (nprecLayers > 0) {
254  msg(MSG::VERBOSE) << " Precision chambers ";
255 
256  for (int index = 0; index < static_cast<int>(nprecHitsPerChamberLayer.size()); ++index) {
257  if (nprecHitsPerChamberLayer[index] > 0)
258  msg(MSG::VERBOSE) << " " << chName(static_cast<ChIndex>(index))
259  << " hits " << nprecHitsPerChamberLayer[index];
260  }
261  }
262  if (nphiLayers > 0) {
263  msg(MSG::VERBOSE) << endmsg << " Phi chambers ";
264  for (int index = 0; index < static_cast<int>(nphiHitsPerChamberLayer.size()); ++index) {
265  if (nphiHitsPerChamberLayer[index] > 0)
266  msg(MSG::VERBOSE) << " " << phiName(static_cast<PhiIndex>(index))
267  << " hits " << nphiHitsPerChamberLayer[index];
268  }
269  }
270 
271  if (ntrigEtaLayers > 0) {
272  msg(MSG::VERBOSE) << endmsg << " Trigger Eta ";
273  for (int index = 0; index < static_cast<int>(ntrigEtaHitsPerChamberLayer.size()); ++index) {
274  if (ntrigEtaHitsPerChamberLayer[index] > 0)
275  msg(MSG::VERBOSE) << " " << phiName(static_cast<PhiIndex>(index))
276  << " hits " << ntrigEtaHitsPerChamberLayer[index];
277  }
278  }
279  msg(MSG::VERBOSE) << endmsg;
280  }
281  return StatusCode::SUCCESS;
282  }
283 
285  const ChamberIdMap& ids,
286  summaryDecors& myDecors) const {
287  std::vector<unsigned long long> mdtTruthHits{};
288  std::vector<unsigned long long> tgcTruthHits{};
289  std::vector<unsigned long long> rpcTruthHits{};
290  std::vector<unsigned long long> stgcTruthHits{};
291  std::vector<unsigned long long> cscTruthHits{};
292  std::vector<unsigned long long> mmTruthHits{};
293 
294  // loop over chamber layers
295  int nEI = 0, nEM = 0;
296  for (const auto& lay : ids) {
297  // loop over hits
298  if (lay.first == ChIndex::EIS || lay.first == ChIndex::EIL) nEI++;
299  if (lay.first == ChIndex::EMS || lay.first == ChIndex::EML) nEM++;
300  for (const Identifier& id : lay.second) {
301  if (m_idHelperSvc->isMdt(id))
302  mdtTruthHits.push_back(id.get_compact());
303  else if (m_idHelperSvc->isCsc(id))
304  cscTruthHits.push_back(id.get_compact());
305  else if (m_idHelperSvc->isTgc(id)) {
306  if ((lay.first == ChIndex::EIS || lay.first == ChIndex::EIL) && nEI > 1)
307  continue; // otherwise we double-count
308  if ((lay.first == ChIndex::EMS || lay.first == ChIndex::EML) && nEM > 1)
309  continue; // otherwise we double-count
310  tgcTruthHits.push_back(id.get_compact());
311  } else if (m_idHelperSvc->issTgc(id))
312  stgcTruthHits.push_back(id.get_compact());
313  else if (m_idHelperSvc->isRpc(id))
314  rpcTruthHits.push_back(id.get_compact());
315  else if (m_idHelperSvc->isMM(id))
316  mmTruthHits.push_back(id.get_compact());
317  }
318  }
319  auto attatchHits = [&truthParticle](const WriteDecor_llvec& dec,
320  std::vector<unsigned long long>& hits) {
321  if (dec) {
322  (*dec)(truthParticle) = std::move(hits);
323  }
324  };
325  attatchHits(myDecors.truthMdtHitsDecor, mdtTruthHits);
326  attatchHits(myDecors.truthTgcHitsDecor, tgcTruthHits);
327  attatchHits(myDecors.truthRpcHitsDecor, rpcTruthHits);
328  attatchHits(myDecors.truthCscHitsDecor, cscTruthHits);
329  attatchHits(myDecors.truthStgcHitsDecor, stgcTruthHits);
330  attatchHits(myDecors.truthMMHitsDecor, mmTruthHits);
331  ATH_MSG_VERBOSE("Added " << mdtTruthHits.size() << " mdt truth hits, " << cscTruthHits.size() << " csc truth hits, "
332  << rpcTruthHits.size() << " rpc truth hits, and " << tgcTruthHits.size() << " tgc truth hits");
333  return StatusCode::SUCCESS;
334  }
335 } // namespace Muon
Muon::TruthHitSummaryAlg::ChamberIdMap
std::map< Muon::MuonStationIndex::ChIndex, std::vector< Identifier > > ChamberIdMap
This map contains all the hits corresponding to truth muons classified by chamber layer that recorded...
Definition: TruthHitSummaryAlg.h:43
Muon::MuonStationIndex::PhiIndex::T4
@ T4
xAOD::phiLayer1Hits
@ phiLayer1Hits
number of phi hits in the first trigger layer (BML1 ot T4)
Definition: TrackingPrimitives.h:349
Muon::TruthHitSummaryAlg::summaryDecors::truthRpcHitsDecor
WriteDecor_llvec truthRpcHitsDecor
Definition: TruthHitSummaryAlg.h:88
Muon::TruthHitSummaryAlg::summaryDecors::extendedLargeHitsDecor
WriteDecor_uint8_t extendedLargeHitsDecor
Definition: TruthHitSummaryAlg.h:76
Muon::MuonStationIndex::PhiIndex::STGC1
@ STGC1
xAOD::etaLayer1Hits
@ etaLayer1Hits
number of eta hits in the first trigger layer (BML1 ot T4)
Definition: TrackingPrimitives.h:354
Muon::TruthHitSummaryAlg::summaryDecors::innerSmallHitsDecor
WriteDecor_uint8_t innerSmallHitsDecor
Definition: TruthHitSummaryAlg.h:69
TRTCalib_Extractor.hits
hits
Definition: TRTCalib_Extractor.py:35
xAOD::phiLayer3Hits
@ phiLayer3Hits
number of phi hits in the third trigger layer (BOL1 ot T2)
Definition: TrackingPrimitives.h:351
xAOD::phiLayer4Hits
@ phiLayer4Hits
number of phi hits in the fourth trigger layer (T3)
Definition: TrackingPrimitives.h:352
xAOD::uint8_t
uint8_t
Definition: Muon_v1.cxx:558
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
Muon::TruthHitSummaryAlg::summaryDecors::middleLargeHitsDecor
WriteDecor_uint8_t middleLargeHitsDecor
Definition: TruthHitSummaryAlg.h:72
AthMsgStreamMacros.h
Muon::MuonStationIndex::PhiIndex::BO1
@ BO1
Muon::MuonStationIndex::ChIndex::EEL
@ EEL
Muon::TruthHitSummaryAlg::summaryDecors::etaLayer4HitsDecor
WriteDecor_uint8_t etaLayer4HitsDecor
Definition: TruthHitSummaryAlg.h:84
Muon::MuonStationIndex::ChIndex::EML
@ EML
Muon::TruthHitSummaryAlg::addHitIDVectors
StatusCode addHitIDVectors(const xAOD::TruthParticle &truthParticle, const ChamberIdMap &ids, summaryDecors &myDecors) const
This function collapses the information given by the ChamberIdMap, which contains all hits from a tru...
Definition: TruthHitSummaryAlg.cxx:284
Muon::MuonStationIndex::ChIndex::EOS
@ EOS
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:67
index
Definition: index.py:1
Muon::MuonStationIndex::ChIndex::BIL
@ BIL
Muon::TruthHitSummaryAlg::summaryDecors::extendedSmallHitsDecor
WriteDecor_uint8_t extendedSmallHitsDecor
Definition: TruthHitSummaryAlg.h:75
Muon::MuonStationIndex::PhiIndex::BM1
@ BM1
TruthHitSummaryAlg.h
Muon::MuonStationIndex::PhiIndex::STGC2
@ STGC2
Muon::TruthHitSummaryAlg::summaryDecors::etaLayer1HitsDecor
WriteDecor_uint8_t etaLayer1HitsDecor
Definition: TruthHitSummaryAlg.h:81
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
Muon::MuonStationIndex::ChIndex::EIS
@ EIS
Muon
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
Definition: TrackSystemController.h:45
Muon::MuonStationIndex::ChIndex::ChIndexMax
@ ChIndexMax
Muon::TruthHitSummaryAlg::summaryDecors::phiLayer4HitsDecor
WriteDecor_uint8_t phiLayer4HitsDecor
Definition: TruthHitSummaryAlg.h:80
Muon::MuonStationIndex::ChIndex::CSL
@ CSL
xAOD::innerLargeHits
@ innerLargeHits
number of precision hits in the inner large layer
Definition: TrackingPrimitives.h:332
Muon::TruthHitSummaryAlg::summaryDecors::nprecLayersDecor
WriteDecor_uint8_t nprecLayersDecor
Definition: TruthHitSummaryAlg.h:66
Muon::TruthHitSummaryAlg::summaryDecors::truthTgcHitsDecor
WriteDecor_llvec truthTgcHitsDecor
Definition: TruthHitSummaryAlg.h:87
Muon::MuonStationIndex::PhiIndex::T1
@ T1
xAOD::etaLayer3Hits
@ etaLayer3Hits
number of eta hits in the third trigger layer (BOL1 ot T2)
Definition: TrackingPrimitives.h:356
xAOD::middleLargeHits
@ middleLargeHits
number of precision hits in the middle large layer
Definition: TrackingPrimitives.h:334
Muon::TruthHitSummaryAlg::summaryDecors::etaLayer3HitsDecor
WriteDecor_uint8_t etaLayer3HitsDecor
Definition: TruthHitSummaryAlg.h:83
Muon::MuonStationIndex::PhiIndex::PhiUnknown
@ PhiUnknown
Muon::TruthHitSummaryAlg::summaryDecors::phiLayer1HitsDecor
WriteDecor_uint8_t phiLayer1HitsDecor
Definition: TruthHitSummaryAlg.h:77
Muon::MuonStationIndex::ChIndex::EIL
@ EIL
xAOD::phiLayer2Hits
@ phiLayer2Hits
number of phi hits in the second trigger layer (BML2 ot T1)
Definition: TrackingPrimitives.h:350
xAOD::etaLayer2Hits
@ etaLayer2Hits
number of eta hits in the second trigger layer (BML2 ot T1)
Definition: TrackingPrimitives.h:355
IMCTruthClassifier.h
Muon::MuonStationIndex::ChIndex::BIS
@ BIS
Muon::MuonStationIndex::PhiIndex::CSC
@ CSC
xAOD::extendedLargeHits
@ extendedLargeHits
number of precision hits in the extended large layer
Definition: TrackingPrimitives.h:338
Muon::TruthHitSummaryAlg::summaryDecors::truthMMHitsDecor
WriteDecor_llvec truthMMHitsDecor
Definition: TruthHitSummaryAlg.h:91
Muon::MuonStationIndex::chIndex
ChIndex chIndex(const std::string &index)
convert ChIndex name string to enum
Definition: MuonStationIndex.cxx:11
Muon::TruthHitSummaryAlg::summaryDecors::phiLayer3HitsDecor
WriteDecor_uint8_t phiLayer3HitsDecor
Definition: TruthHitSummaryAlg.h:79
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
Muon::MuonStationIndex::chName
const std::string & chName(ChIndex index)
convert ChIndex into a string
Definition: MuonStationIndex.cxx:119
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
Muon::TruthHitSummaryAlg::summaryDecors::ntrigEtaLayersDecor
WriteDecor_uint8_t ntrigEtaLayersDecor
Definition: TruthHitSummaryAlg.h:68
xAOD::TruthParticle_v1
Class describing a truth particle in the MC record.
Definition: TruthParticle_v1.h:37
HepMC::uniqueID
int uniqueID(const T &p)
Definition: MagicNumbers.h:116
Muon::MuonStationIndex::ChIndex::BML
@ BML
Muon::MuonStationIndex::ChIndex::CSS
@ CSS
HepMC::simulation_history
std::deque< int > simulation_history(const T &p, const int direction)
Function to calculate all the descendants(direction=1)/ancestors(direction=-1) of the particle.
Definition: MagicNumbers.h:192
Muon::MuonStationIndex::ChIndex::BOS
@ BOS
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
Muon::MuonStationIndex::ChIndex::EES
@ EES
Muon::TruthHitSummaryAlg::summaryDecors::truthMdtHitsDecor
WriteDecor_llvec truthMdtHitsDecor
Definition: TruthHitSummaryAlg.h:86
Muon::TruthHitSummaryAlg::addHitCounts
StatusCode addHitCounts(const EventContext &ctx, const xAOD::TruthParticle &truthParticle, ChamberIdMap &ids, summaryDecors &myDecors) const
This is the actual function that decorates truth muons with hit counts.
Definition: TruthHitSummaryAlg.cxx:66
Muon::TruthHitSummaryAlg::summaryDecors::innerLargeHitsDecor
WriteDecor_uint8_t innerLargeHitsDecor
Definition: TruthHitSummaryAlg.h:70
Muon::MuonStationIndex::ChIndex::BEE
@ BEE
Muon::MuonStationIndex::ChIndex::BMS
@ BMS
Muon::MuonStationIndex::PhiIndex::BO2
@ BO2
xAOD::middleSmallHits
@ middleSmallHits
number of precision hits in the middle small layer
Definition: TrackingPrimitives.h:333
Muon::TruthHitSummaryAlg::summaryDecors::outerLargeHitsDecor
WriteDecor_uint8_t outerLargeHitsDecor
Definition: TruthHitSummaryAlg.h:74
python.subdetectors.mmg.ids
ids
Definition: mmg.py:8
xAOD::outerSmallHits
@ outerSmallHits
number of precision hits in the outer small layer
Definition: TrackingPrimitives.h:335
Muon::MuonStationIndex::PhiIndex
PhiIndex
enum to classify the different phi layers in the muon spectrometer
Definition: MuonStationIndex.h:31
Muon::TruthHitSummaryAlg::summaryDecors::etaLayer2HitsDecor
WriteDecor_uint8_t etaLayer2HitsDecor
Definition: TruthHitSummaryAlg.h:82
Muon::TruthHitSummaryAlg::WriteDecor_llvec
std::unique_ptr< SG::WriteDecorHandle< xAOD::TruthParticleContainer, llvec > > WriteDecor_llvec
Definition: TruthHitSummaryAlg.h:54
xAOD::outerLargeHits
@ outerLargeHits
number of precision hits in the outer large layer
Definition: TrackingPrimitives.h:336
DeMoScan.index
string index
Definition: DeMoScan.py:362
TrackingVolume.h
Muon::MuonStationIndex::PhiIndex::T3
@ T3
Muon::MuonStationIndex::PhiIndex::T2
@ T2
Muon::MuonStationIndex::PhiIndex::BM2
@ BM2
DEBUG
#define DEBUG
Definition: page_access.h:11
Muon::TruthHitSummaryAlg::summaryDecors::phiLayer2HitsDecor
WriteDecor_uint8_t phiLayer2HitsDecor
Definition: TruthHitSummaryAlg.h:78
Muon::MuonStationIndex::ChIndex::EOL
@ EOL
TrackingGeometry.h
SG::VarHandleBase::isPresent
bool isPresent() const
Is the referenced object present in SG?
Definition: StoreGate/src/VarHandleBase.cxx:400
Muon::TruthHitSummaryAlg::summaryDecors::outerSmallHitsDecor
WriteDecor_uint8_t outerSmallHitsDecor
Definition: TruthHitSummaryAlg.h:73
Muon::MuonStationIndex::PhiIndex::PhiIndexMax
@ PhiIndexMax
Muon::MuonStationIndex::ChIndex
ChIndex
enum to classify the different chamber layers in the muon spectrometer
Definition: MuonStationIndex.h:15
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:13
xAOD::extendedSmallHits
@ extendedSmallHits
number of precision hits in the extended small layer
Definition: TrackingPrimitives.h:337
Muon::MuonStationIndex::ChIndex::ChUnknown
@ ChUnknown
Muon::MuonStationIndex::ChIndex::EMS
@ EMS
xAOD::innerSmallHits
@ innerSmallHits
number of precision hits in the inner small layer
Definition: TrackingPrimitives.h:331
Muon::MuonStationIndex::phiName
const std::string & phiName(PhiIndex index)
convert PhiIndex into a string
Definition: MuonStationIndex.cxx:87
Muon::TruthHitSummaryAlg::summaryDecors
Definition: TruthHitSummaryAlg.h:56
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7
Muon::TruthHitSummaryAlg::summaryDecors::middleSmallHitsDecor
WriteDecor_uint8_t middleSmallHitsDecor
Definition: TruthHitSummaryAlg.h:71
Muon::TruthHitSummaryAlg::summaryDecors::truthStgcHitsDecor
WriteDecor_llvec truthStgcHitsDecor
Definition: TruthHitSummaryAlg.h:90
Muon::TruthHitSummaryAlg::summaryDecors::truthCscHitsDecor
WriteDecor_llvec truthCscHitsDecor
Definition: TruthHitSummaryAlg.h:89
xAOD::etaLayer4Hits
@ etaLayer4Hits
number of eta hits in the fourth trigger layer (T3)
Definition: TrackingPrimitives.h:357
Muon::MuonStationIndex::toInt
constexpr int toInt(const EnumType enumVal)
Definition: MuonStationIndex.h:61
Muon::TruthHitSummaryAlg::summaryDecors::nphiLayersDecor
WriteDecor_uint8_t nphiLayersDecor
Definition: TruthHitSummaryAlg.h:67
Muon::TruthHitSummaryAlg::execute
virtual StatusCode execute(const EventContext &ctx) const override
Definition: TruthHitSummaryAlg.cxx:50
Muon::TruthHitSummaryAlg::initialize
virtual StatusCode initialize() override
Definition: TruthHitSummaryAlg.cxx:15
Muon::MuonStationIndex::ChIndex::BOL
@ BOL
Identifier
Definition: IdentifierFieldParser.cxx:14