ATLAS Offline Software
MuonTruthAssociationAlg.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
11 #include "TrkTrack/Track.h"
16 #include "xAODTruth/TruthVertex.h"
18 using namespace xAOD::P4Helpers;
19 namespace {
20  constexpr unsigned int dummy_unsigned = 999;
21  constexpr int com_bit = (1<<xAOD::Muon::Author::Commissioning);
22  void increment_unsigned(unsigned& val) {
23  if (val == dummy_unsigned)
24  val = 1;
25  else
26  ++val;
27  }
28  const SG::ConstAccessor<int> acc_origin("truthOrigin");
29  const SG::ConstAccessor<int> acc_type("truthType");
30  const SG::ConstAccessor<ElementLink<xAOD::TruthParticleContainer> > acc_link("truthParticleLink");
31  //
32  const SG::Decorator<int> dec_origin("truthOrigin");
33  const SG::Decorator<int> dec_type ("truthType");
34  const SG::Decorator<ElementLink<xAOD::TruthParticleContainer> > dec_link("truthParticleLink");
35 
36 } // namespace
37 // Constructor with parameters:
38 MuonTruthAssociationAlg::MuonTruthAssociationAlg(const std::string& name, ISvcLocator* pSvcLocator) :
39  AthReentrantAlgorithm(name, pSvcLocator) {}
40 
41 // Initialize method:
43  ATH_CHECK(m_idHelperSvc.retrieve());
45  ATH_CHECK(m_recoMuKey.initialize());
46 
47  if (m_recoLink.empty()){
48  m_muonTruthRecoLink = "" ;
49  } else {
51  }
52 
53  ATH_CHECK(m_muonTruthRecoLink.initialize(!m_recoLink.empty()));
54  ATH_CHECK(m_muonTruthParticleLink.initialize());
56  ATH_CHECK(m_muonTruthParticleType.initialize());
60  for (const std::string& trk_coll : m_assocTrkContainers.value()){
61  m_trkTruthKeys.emplace_back(trk_coll + ".truthParticleLink");
62  }
63  ATH_CHECK(m_trkTruthKeys.initialize());
64  return StatusCode::SUCCESS;
65 }
66 
67 // Execute method:
68 StatusCode MuonTruthAssociationAlg::execute(const EventContext& ctx) const {
70  if (!muonTruthContainer.isValid()) {
71  ATH_MSG_WARNING("truth particle container not valid");
72  return StatusCode::FAILURE;
73  }
74  std::unique_ptr<SG::WriteDecorHandle<xAOD::TruthParticleContainer, ElementLink<xAOD::MuonContainer>>> muonTruthParticleRecoLink{};
75  if (!m_muonTruthRecoLink.empty()) {
76  muonTruthParticleRecoLink = std::make_unique<SG::WriteDecorHandle<xAOD::TruthParticleContainer, ElementLink<xAOD::MuonContainer>>>(m_muonTruthRecoLink, ctx);
77  }
78 
80  ctx);
81  if (!muonTruthParticleLink.isValid()) {
82  ATH_MSG_WARNING("muon particle container not valid");
83  return StatusCode::FAILURE;
84  }
88  ctx);
91 
92  // add link to reco muons and viceversa
93  bool saw_staco = false;
94  bool decor_staco = false;
95 
96  // loop over muons
97  for (const xAOD::Muon* muon : *muonTruthParticleLink) {
98  // use primary track particle to get the truth link (except for the case of STACO, where we must use the ID track particle, as the
99  // combined is not truth-matched)
100  ATH_MSG_DEBUG("muon with pT " << muon->pt() << " MeV, eta: " << muon->eta() << ", phi " << muon->phi() << " and author "
101  << muon->author());
102  const xAOD::TrackParticle* tp = nullptr;
103  if (m_associateWithInDetTP || muon->author() == xAOD::Muon::STACO || muon->author() == xAOD::Muon::MuGirl) {
104  tp = muon->trackParticle(xAOD::Muon::InnerDetectorTrackParticle);
105  } else {
106  tp = muon->primaryTrackParticle();
107  }
108 
109  bool foundTruth{false}, setOrigin{false};
110  if (tp) {
111  // Associate reco with truth muon. Loop over reconstructed muons, get track particle for each one.
112  // Each track particle should carry a link to the corresponding truth particle. Then compare this truth particle link with the
113  // given truth muon particle
114  if (acc_origin.isAvailable(*tp) && acc_origin(*tp) != 0) {
115  muonTruthParticleOrigin(*muon) = acc_origin(*tp);
116  muonTruthParticleType(*muon) = acc_type(*tp);
117  setOrigin = true;
118  }
119 
121  if (acc_link.isAvailable(*tp)) {
122  truthLink = acc_link(*tp);
123  } else {
124  ATH_MSG_DEBUG("Could not find any truth link associated with track having pt:"<<tp->pt()<<" MeV, eta: "<<tp->eta()<<", phi: "<<tp->phi()<<", charge: "<<tp->charge()<<". d0:"<<tp->d0()<<", z0: "<<tp->z0());
125  }
126 
127  if (truthLink.isValid()) {
128  ATH_MSG_VERBOSE(" Got valid truth link for muon author " << muon->author() << " uniqueID " << HepMC::uniqueID(*truthLink));
129  // loop over truth particles
130  for (const xAOD::TruthParticle* truthParticle : *muonTruthContainer) {
131  if (!MC::isStable(truthParticle)) continue;
132  ATH_MSG_DEBUG("Got truth muon with uniqueID " << HepMC::uniqueID(truthParticle) << " pt " << truthParticle->pt());
133  if ( !HepMC::is_sim_descendant(*truthLink, truthParticle)) {
134  ATH_MSG_VERBOSE("UniqueID truth link: " << HepMC::uniqueID(*truthLink)
135  << " is not decendant of " << HepMC::uniqueID(truthParticle));
136  continue;
137  }
138  ATH_MSG_VERBOSE("Truth muon uniqueID matches -> creating link with truth particle " << HepMC::uniqueID(*truthLink));
139  foundTruth = true;
141  ElementLink<xAOD::TruthParticleContainer> muonTruthLink{*muonTruthContainer,
142  truthParticle->index(),
143  ctx};
144  muonTruthLink.toPersistent();
145  muonTruthParticleLink(*muon) = muonTruthLink;
146  if (!setOrigin) {
147  muonTruthParticleOrigin(*muon) = acc_origin(*tp);
148  muonTruthParticleType(*muon) = acc_type(*tp);
149  setOrigin = true;
150  }
152  if (muonTruthParticleRecoLink && muonTruthParticleRecoLink->operator()(*truthParticle).isValid()){
153  const xAOD::Muon* decor_muon = *muonTruthParticleRecoLink->operator()(*truthParticle);
154  ATH_MSG_VERBOSE("Truth particle is already decorated with reco muon "<<decor_muon->pt()*1.e-3
155  <<" eta: "<<decor_muon->eta()<<" phi: "<<decor_muon->phi()<<" charge: "<<
156  decor_muon->charge()<<" author: "<<decor_muon->author()<<" all authors: "<<
157  decor_muon->allAuthors());
158 
159  // Check first if the exiting muon has a better author
160  if (MuonCombined::authorRank(decor_muon->author()) < MuonCombined::authorRank(muon->author())){
161  ATH_MSG_DEBUG("Author of the decorated muon is better than the one of the new candidate");
162  continue;
163  }
165  const int com_score = (muon->allAuthors() & com_bit) - (decor_muon->allAuthors() &com_bit);
166  if (com_score > 0){
167  ATH_MSG_DEBUG("Found two muons reconstructed by an equivalent author. But this one is from the commissioning chain");
168  continue;
169  }
171  if (deltaR2(muon,truthParticle) >= deltaR2(muon, decor_muon)) continue;
172  }
173 
174 
175  ElementLink<xAOD::MuonContainer> muonLink{muon, *muonTruthParticleLink, ctx};
176 
177 
179  std::vector<unsigned int> nprecHitsPerChamberLayer(Muon::MuonStationIndex::ChIndexMax, dummy_unsigned);
180  std::vector<unsigned int> nphiHitsPerChamberLayer(Muon::MuonStationIndex::PhiIndexMax, dummy_unsigned);
181  std::vector<unsigned int> ntrigEtaHitsPerChamberLayer(Muon::MuonStationIndex::PhiIndexMax, dummy_unsigned);
182 
183  constexpr int author_sel = (1<<xAOD::Muon::MuidCo) | (1<<xAOD::Muon::MuidSA) | (1<<xAOD::Muon::MuGirl);
184  count_chamber_layers(muon->allAuthors() & author_sel
185  ? truthParticle
186  : nullptr,
187  tp->track(), nprecHitsPerChamberLayer, nphiHitsPerChamberLayer, ntrigEtaHitsPerChamberLayer);
189  muonTruthParticleNPrecMatched(*muon) = nprecHitsPerChamberLayer;
190  muonTruthParticleNPhiMatched(*muon) = nphiHitsPerChamberLayer;
191  muonTruthParticleNTrigEtaMatched(*muon) = ntrigEtaHitsPerChamberLayer;
192 
193  if (muonTruthParticleRecoLink) (*muonTruthParticleRecoLink)(*truthParticle) = muonLink;
194  break;
195  }
196  } else {
197  ATH_MSG_DEBUG("Invalid truth link");
198  }
199  } else {
200  ATH_MSG_WARNING("Could not find the appropiate track particle for muon with pT: " << muon->pt() * 1.e-3 << " GeV, eta: "
201  << muon->eta() << ", phi: " << muon->phi()
202  << " author: " << muon->author());
203  }
204 
205  if (!setOrigin) {
206  muonTruthParticleOrigin(*muon) = 0;
207  muonTruthParticleType(*muon) = 0;
208  }
209  if (!foundTruth) {
210  muonTruthParticleLink(*muon) = ElementLink<xAOD::TruthParticleContainer>();
211  // add these empty vectors
212  muonTruthParticleNPrecMatched(*muon) = std::vector<unsigned int>{};
213  muonTruthParticleNPhiMatched(*muon) = std::vector<unsigned int>{};
214  muonTruthParticleNTrigEtaMatched(*muon) = std::vector<unsigned int>{};
215  }
218  if (muon->author() == xAOD::Muon::STACO) {
219  const xAOD::TrackParticle* cmb_trk = muon->trackParticle(xAOD::Muon::CombinedTrackParticle);
220  if (!cmb_trk){
221  ATH_MSG_WARNING("Even a STACO muon should have a combined track");
222  continue;
223  } else {
224  if (!saw_staco) {
225  saw_staco = true;
226  decor_staco = !dec_origin.isAvailable (*cmb_trk);
227  }
228  if (decor_staco) {
229  dec_origin(*cmb_trk) = acc_origin(*muon);
230  dec_type(*cmb_trk) = acc_type(*muon);
231  dec_link(*cmb_trk) = acc_link(*muon);
232  }
233  }
234  }
235  }
237  if (muonTruthParticleRecoLink && !muonTruthParticleRecoLink->isAvailable()) {
238  for (const xAOD::TruthParticle* truthParticle : **muonTruthParticleRecoLink) {
239  ATH_MSG_DEBUG("no reco muon link set, add an empty one");
240  (*muonTruthParticleRecoLink)(*truthParticle) = ElementLink<xAOD::MuonContainer>();
241  }
242  }
243 
244  return StatusCode::SUCCESS;
245 }
246 
248  std::vector<unsigned int>& nprecHitsPerChamberLayer,
249  std::vector<unsigned int>& nphiHitsPerChamberLayer,
250  std::vector<unsigned int>& ntrigEtaHitsPerChamberLayer) const {
251  static const SG::ConstAccessor<std::vector<unsigned long long> > truthMdtHitsAcc ("truthMdtHits");
252  if (!truthParticle || !truthMdtHitsAcc.isAvailable(*truthParticle)) {
253  ATH_MSG_DEBUG("muon has no truth hits vector in the truth association alg");
254  nprecHitsPerChamberLayer.clear();
255  nphiHitsPerChamberLayer.clear();
256  ntrigEtaHitsPerChamberLayer.clear();
257  return;
258  }
259  const std::vector<unsigned long long>& mdtTruth = truthMdtHitsAcc(*truthParticle);
260  std::vector<unsigned long long> cscTruth;
262  truthCscHitsAcc("truthCscHits");
264  truthRpcHitsAcc("truthRpcHits");
266  truthTgcHitsAcc("truthTgcHits");
267  if (m_idHelperSvc->hasCSC()) cscTruth = truthCscHitsAcc(*truthParticle);
268  const std::vector<unsigned long long>& rpcTruth = truthRpcHitsAcc(*truthParticle);
269  const std::vector<unsigned long long>& tgcTruth = truthTgcHitsAcc(*truthParticle);
270 
271  for (const Trk::TrackStateOnSurface* tsit : *ptrk->trackStateOnSurfaces()) {
272  if (!tsit || !tsit->trackParameters() || !tsit->measurementOnTrack()) continue;
273  const Trk::MeasurementBase* meas = tsit->measurementOnTrack();
274  Identifier id;
275  const Trk::RIO_OnTrack* rot = dynamic_cast<const Trk::RIO_OnTrack*>(meas);
276  if (rot)
277  id = rot->identify();
278  else {
279  const Muon::CompetingMuonClustersOnTrack* crot = dynamic_cast<const Muon::CompetingMuonClustersOnTrack*>(meas);
280  if (crot && !crot->containedROTs().empty() && crot->containedROTs().front()) id = crot->containedROTs().front()->identify();
281  }
282  if (!m_idHelperSvc->isMuon(id)) continue;
283 
284  bool measPhi = m_idHelperSvc->measuresPhi(id);
285  bool isTgc = m_idHelperSvc->isTgc(id);
287  if (m_idHelperSvc->isMdt(id)) {
288  for (unsigned int i = 0; i < mdtTruth.size(); ++i) {
289  if (id == mdtTruth[i]) {
290  if (chIndex >= 0) {
291  increment_unsigned(nprecHitsPerChamberLayer.at(chIndex));
292  }
293  break;
294  }
295  }
296  } else if (m_idHelperSvc->hasCSC() && m_idHelperSvc->isCsc(id)) {
297  for (unsigned int i = 0; i < cscTruth.size(); ++i) {
298  if (id != cscTruth[i]) continue;
299  if (measPhi) {
301  if (index >= 0) {
302  increment_unsigned(nphiHitsPerChamberLayer.at(index));
303  }
304  } else {
305  if (chIndex >= 0) {
306  increment_unsigned(nprecHitsPerChamberLayer.at(chIndex));
307  }
308  }
309  break;
310  }
311  } else if (m_idHelperSvc->isRpc(id)) {
312  for (unsigned int i = 0; i < rpcTruth.size(); ++i) {
313  if (id != rpcTruth[i]) { continue; }
314  int index = m_idHelperSvc->phiIndex(id);
315  if (index >= 0) {
316  if (measPhi) {
317  increment_unsigned(nphiHitsPerChamberLayer.at(index));
318  } else {
319  increment_unsigned(ntrigEtaHitsPerChamberLayer.at(index));
320  }
321  }
322  break;
323  }
324  } else if (m_idHelperSvc->isTgc(id)) {
325  for (unsigned int i = 0; i < tgcTruth.size(); ++i) {
326  if (id != tgcTruth[i]) { continue; }
327  int index = m_idHelperSvc->phiIndex(id);
328  if (index >= 0) {
329  if (measPhi) {
330  increment_unsigned(nphiHitsPerChamberLayer.at(index));
331  } else {
332  increment_unsigned(ntrigEtaHitsPerChamberLayer.at(index));
333  }
334  }
335  break;
336  }
337  }
338  } // end loop over TSOS
339  ATH_MSG_DEBUG("finished loop over TSOS");
340 
341  // now, have to check if there are non-zero truth hits in indices without reco hits
342  clear_dummys(mdtTruth, nprecHitsPerChamberLayer);
343  clear_dummys(cscTruth, nprecHitsPerChamberLayer);
344 
345  clear_dummys(cscTruth, nphiHitsPerChamberLayer);
346  clear_dummys(rpcTruth, nphiHitsPerChamberLayer);
347  clear_dummys(tgcTruth, nphiHitsPerChamberLayer);
348 
349  clear_dummys(rpcTruth, ntrigEtaHitsPerChamberLayer);
350  clear_dummys(tgcTruth, ntrigEtaHitsPerChamberLayer);
351 }
352 void MuonTruthAssociationAlg::clear_dummys(const std::vector<unsigned long long>& identifiers, std::vector<unsigned int>& vec) const {
355  if (identifiers.empty()) { return; }
356  for (unsigned int i = 0; i < vec.size(); ++i) {
357  if (vec[i] != dummy_unsigned) continue;
358  for (unsigned j = 0; j < identifiers.size(); ++j) {
360  if ((m_idHelperSvc->measuresPhi(id) && m_idHelperSvc->phiIndex(id) == (Muon::MuonStationIndex::PhiIndex)i) ||
361  (!m_idHelperSvc->measuresPhi(id) && m_idHelperSvc->chamberIndex(id) == (Muon::MuonStationIndex::ChIndex)i)) {
362  vec[i] = 0;
363  break;
364  }
365  }
366  }
367 }
xAOD::muon
@ muon
Definition: TrackingPrimitives.h:195
MuonTruthAssociationAlg::m_muonTruthRecoLink
SG::WriteDecorHandleKey< xAOD::TruthParticleContainer > m_muonTruthRecoLink
Definition: MuonTruthAssociationAlg.h:34
xAOD::Muon_v1::allAuthors
uint16_t allAuthors() const
Get all the authors of this Muon.
xAOD::name
name
Definition: TriggerMenuJson_v1.cxx:29
MuonTruthAssociationAlg::m_recoMuKey
SG::ReadHandleKey< xAOD::MuonContainer > m_recoMuKey
Definition: MuonTruthAssociationAlg.h:30
xAOD::MuGirl
@ MuGirl
MuGirl.
Definition: TrackingPrimitives.h:141
MeasurementBase.h
Trk::Track
The ATLAS Track class.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
index
Definition: index.py:1
xAODP4Helpers.h
Trk::Track::trackStateOnSurfaces
const Trk::TrackStates * trackStateOnSurfaces() const
return a pointer to a const DataVector of const TrackStateOnSurfaces.
xAOD::Muon_v1::phi
virtual double phi() const
The azimuthal angle ( ) of the particle.
xAOD::Muon_v1::eta
virtual double eta() const
The pseudorapidity ( ) of the particle.
CompetingMuonClustersOnTrack.h
ParticleTest.tp
tp
Definition: ParticleTest.py:25
Trk::RIO_OnTrack
Definition: RIO_OnTrack.h:70
vec
std::vector< size_t > vec
Definition: CombinationsGeneratorTest.cxx:12
xAOD::Muon_v1::author
Author author() const
SG::ConstAccessor< int >
MuonTruthAssociationAlg::m_muonTruthParticleNPrecMatched
SG::WriteDecorHandleKey< xAOD::MuonContainer > m_muonTruthParticleNPrecMatched
Definition: MuonTruthAssociationAlg.h:46
Muon::MuonStationIndex::PhiIndexMax
@ PhiIndexMax
Definition: MuonStationIndex.h:34
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
Muon::CompetingMuonClustersOnTrack
Definition: CompetingMuonClustersOnTrack.h:54
xAOD::P4Helpers::deltaR2
double deltaR2(double rapidity1, double phi1, double rapidity2, double phi2)
from bare rapidity,phi
Definition: xAODP4Helpers.h:111
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition: Event/xAOD/xAODBase/xAODBase/IParticle.h:41
Muon::MuonStationIndex::PhiIndex
PhiIndex
enum to classify the different phi layers in the muon spectrometer
Definition: MuonStationIndex.h:31
xAOD::Muon_v1
Class describing a Muon.
Definition: Muon_v1.h:38
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
MuonCombined::authorRank
int authorRank(const xAOD::Muon::Author &a)
Definition: TagBase.h:23
Track.h
xAOD::Muon_v1::charge
float charge() const
MuonTruthAssociationAlg::count_chamber_layers
void count_chamber_layers(const xAOD::IParticle *truth_particle, const Trk::Track *ptrk, std::vector< unsigned int > &nprecHitsPerChamberLayer, std::vector< unsigned int > &nphiHitsPerChamberLayer, std::vector< unsigned int > &ntrigEtaHitsPerChamberLayer) const
Definition: MuonTruthAssociationAlg.cxx:247
MuonTruthAssociationAlg::m_trkTruthKeys
SG::ReadDecorHandleKeyArray< xAOD::TrackParticleContainer > m_trkTruthKeys
Definition: MuonTruthAssociationAlg.h:58
MuonTruthAssociationAlg::m_muonTruthParticleOrigin
SG::WriteDecorHandleKey< xAOD::MuonContainer > m_muonTruthParticleOrigin
Definition: MuonTruthAssociationAlg.h:43
SG::Decorator< int >
MuonTruthAssociationAlg::m_associateWithInDetTP
Gaudi::Property< bool > m_associateWithInDetTP
Definition: MuonTruthAssociationAlg.h:67
lumiFormat.i
int i
Definition: lumiFormat.py:85
MuonTruthAssociationAlg::initialize
StatusCode initialize() override
Definition: MuonTruthAssociationAlg.cxx:42
MuonTruthAssociationAlg::m_muonTruthParticleType
SG::WriteDecorHandleKey< xAOD::MuonContainer > m_muonTruthParticleType
Definition: MuonTruthAssociationAlg.h:40
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
xAOD::TruthParticle_v1
Class describing a truth particle in the MC record.
Definition: TruthParticle_v1.h:37
SG::WriteDecorHandle
Handle class for adding a decoration to an object.
Definition: StoreGate/StoreGate/WriteDecorHandle.h:100
WriteDecorHandle.h
Handle class for adding a decoration to an object.
HepMC::uniqueID
int uniqueID(const T &p)
Definition: MagicNumbers.h:109
xAOD::Muon_v1::pt
virtual double pt() const
The transverse momentum ( ) of the particle.
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
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
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
MuonTruthAssociationAlg::m_muonTruthParticleNPhiMatched
SG::WriteDecorHandleKey< xAOD::MuonContainer > m_muonTruthParticleNPhiMatched
Definition: MuonTruthAssociationAlg.h:50
Muon::MuonStationIndex::ChUnknown
@ ChUnknown
Definition: MuonStationIndex.h:16
TruthVertex.h
Trk::MeasurementBase
Definition: MeasurementBase.h:58
Trk::TrackStateOnSurface
represents the track state (measurement, material, fit parameters and quality) at a surface.
Definition: TrackStateOnSurface.h:71
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:220
RIO_OnTrack.h
MuonParameters::MuidSA
@ MuidSA
Definition: MuonParamDefs.h:59
Muon::CompetingMuonClustersOnTrack::containedROTs
const std::vector< const MuonClusterOnTrack * > & containedROTs() const
returns the vector of SCT_ClusterOnTrack objects .
Definition: CompetingMuonClustersOnTrack.h:184
Muon::MuonStationIndex::ChIndexMax
@ ChIndexMax
Definition: MuonStationIndex.h:19
MuonParameters::MuidCo
@ MuidCo
Definition: MuonParamDefs.h:60
MuonTruthAssociationAlg::m_muonTruthParticleNTrigEtaMatched
SG::WriteDecorHandleKey< xAOD::MuonContainer > m_muonTruthParticleNTrigEtaMatched
Definition: MuonTruthAssociationAlg.h:53
MuonTruthAssociationAlg::m_recoLink
Gaudi::Property< std::string > m_recoLink
Definition: MuonTruthAssociationAlg.h:66
MC::isStable
bool isStable(const T &p)
Identify if the particle is stable, i.e. has not decayed.
Definition: HepMCHelpers.h:45
InDetSimDataHelpers::identifiers
std::vector< Identifier > identifiers(const InDetSimDataCollection &coll)
Definition: InDetSimDataDict.h:15
MuonTruthAssociationAlg::MuonTruthAssociationAlg
MuonTruthAssociationAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition: MuonTruthAssociationAlg.cxx:38
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
xAOD::P4Helpers
Definition: xAODP4Helpers.h:36
Pythia8_RapidityOrderMPI.val
val
Definition: Pythia8_RapidityOrderMPI.py:14
TagBase.h
Trk::RIO_OnTrack::identify
Identifier identify() const
return the identifier -extends MeasurementBase
Definition: RIO_OnTrack.h:152
MuonTruthAssociationAlg::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: MuonTruthAssociationAlg.h:69
Muon::MuonStationIndex::ChIndex
ChIndex
enum to classify the different chamber layers in the muon spectrometer
Definition: MuonStationIndex.h:15
MuonTruthAssociationAlg::clear_dummys
void clear_dummys(const std::vector< unsigned long long > &identifiers, std::vector< unsigned int > &vec) const
Definition: MuonTruthAssociationAlg.cxx:352
SG::ConstAccessor::isAvailable
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
MuonTruthAssociationAlg::execute
StatusCode execute(const EventContext &ctx) const override
Definition: MuonTruthAssociationAlg.cxx:68
xAOD::STACO
@ STACO
Tracks produced by STACO.
Definition: TrackingPrimitives.h:99
HepMC::is_sim_descendant
bool is_sim_descendant(const T1 &p1, const T2 &p2)
Method to check if the first particle is a descendant of the second in the simulation,...
Definition: MagicNumbers.h:360
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
ConstAccessor.h
Helper class to provide constant type-safe access to aux data.
MuonTruthAssociationAlg.h
MuonTruthAssociationAlg::m_truthMuKey
SG::ReadHandleKey< xAOD::TruthParticleContainer > m_truthMuKey
Definition: MuonTruthAssociationAlg.h:26
TrackStateOnSurface.h
HepMCHelpers.h
MuonTruthAssociationAlg::m_assocTrkContainers
Gaudi::Property< std::vector< std::string > > m_assocTrkContainers
Definition: MuonTruthAssociationAlg.h:61
MuonTruthAssociationAlg::m_muonTruthParticleLink
SG::WriteDecorHandleKey< xAOD::MuonContainer > m_muonTruthParticleLink
Definition: MuonTruthAssociationAlg.h:37
Identifier
Definition: IdentifierFieldParser.cxx:14