ATLAS Offline Software
TrackParticleCnvAlg.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 // $Id: TrackParticleCnvAlg.cxx 298303 2013-12-05 08:41:30Z emoyse $
6 
7 // Gaudi/Athena include(s):
9 
10 // EDM include(s):
11 
14 
18 
19 // Local include(s):
20 #include "TrackParticleCnvAlg.h"
21 
22 namespace xAODMaker {
24  ISvcLocator* svcLoc)
25  : AthReentrantAlgorithm(name, svcLoc) {}
26 
29 {
30 
31  ATH_MSG_DEBUG("Initializing TrackParticleCnvAlg");
32  ATH_MSG_DEBUG("AODContainerName = " << m_aod.key());
33  ATH_MSG_DEBUG("xAODContainerName = " << m_xaodTrackParticlesout.key());
34  ATH_CHECK(m_particleCreator.retrieve());
35  if (m_addTruthLink)
36  ATH_CHECK(m_truthClassifier.retrieve());
37  else
38  m_truthClassifier.disable();
39  ATH_CHECK(m_TrackCollectionCnvTool.retrieve(DisableTool{ !m_convertTracks }));
41  DisableTool{ !m_convertAODTrackParticles }));
42  // to preserve the inisialised parameters of the ParticleCreatorTool:
43  ATH_MSG_DEBUG("Overriding particle creator tool settings.");
44  if (m_convertTracks)
45  ATH_CHECK(
46  m_TrackCollectionCnvTool->setParticleCreatorTool(&m_particleCreator));
48  ATH_CHECK(m_RecTrackParticleContainerCnvTool->setParticleCreatorTool(
50 
54  ATH_CHECK(m_tracks.initialize(m_convertTracks));
57  ATH_CHECK(
60 
61  // Retrieve monitoring tools if provided
62  ATH_CHECK(m_trackMonitoringTool.retrieve(DisableTool{ !m_doMonitoring }));
63  ATH_CHECK(m_monTool.retrieve(DisableTool{ !m_doMonitoring }));
64 
66 
67  // Return gracefully:
68  return StatusCode::SUCCESS;
69 }
70 
72 TrackParticleCnvAlg::execute(const EventContext& ctx) const
73 {
74 
75  const Rec::TrackParticleContainer* aod = nullptr;
76  const TrackCollection* tracks = nullptr;
77  const xAODTruthParticleLinkVector* truthLinks = nullptr;
78  const TrackParticleTruthCollection* aodTruth = nullptr;
79  const TrackTruthCollection* trackTruth = nullptr;
80  const ObservedTrackMap* tracksMap = nullptr;
81  const xAOD::Vertex* primaryVertex = nullptr;
82 
83  //timer object for total execution time
84  auto mnt_timer_Total = Monitored::Timer<std::chrono::milliseconds>("TIME_Total");
85 
86  // Retrieve the AOD particles:
89  if (!rh_aod.isValid()) {
90  ATH_MSG_ERROR(m_aod.key() << " not found");
91  return StatusCode::FAILURE;
92  } else {
93  aod = rh_aod.cptr();
94  ATH_MSG_VERBOSE("Got TrackParticleContainer with key " << m_aod.key()
95  << " found.");
96  }
97  }
98  // Retrieve the Tracks:
99  if (m_convertTracks) {
101  if (!rh_tracks.isValid()) {
102  ATH_MSG_ERROR(m_tracks.key() << " not found");
103  return StatusCode::SUCCESS;
104  } else {
105  tracks = rh_tracks.cptr();
106  ATH_MSG_VERBOSE("Got TrackCollection with key " << m_tracks.key()
107  << " found.");
108 
109  }
110  }
111  if (m_addTruthLink) {
114  if (!rh_aodTruth.isValid()) {
115  ATH_MSG_WARNING("No TrackParticleTruthCollection with key "
116  << m_aodTruth.key() << " found. Do nothing.");
117  return StatusCode::SUCCESS;
118  } else
119  aodTruth = rh_aodTruth.cptr();
120  }
121  if (m_convertTracks) {
123  if (!rh_trackTruth.isValid()) {
124  ATH_MSG_WARNING("No DetailedTrackTruthCollection with key "
125  << m_trackTruth.key() << " found. Do nothing.");
126  return StatusCode::SUCCESS;
127  } else
128  trackTruth = rh_trackTruth.cptr();
129  }
130 
131  SG::ReadHandle<xAODTruthParticleLinkVector> rh_truthParticleLinkVec(
133  if (!rh_truthParticleLinkVec.isValid()) {
134  ATH_MSG_WARNING("No xAODTruthParticleLinkVector with key "
135  << m_truthParticleLinkVec.key() << " found. Do nothing.");
136  return StatusCode::SUCCESS;
137  } else
138  truthLinks = rh_truthParticleLinkVec.cptr();
139  }
140 
141  if(!m_primaryVertexContainer.key().empty())
142  {
144  if (!vtx_container.isValid()) {
145  ATH_MSG_WARNING("No xAOD::VertexContainer with key "<< m_primaryVertexContainer.key() << " found. Do nothing.");
146  return StatusCode::SUCCESS;
147  }
148  const xAOD::Vertex* dummyVertex = nullptr;
149  for(auto vtx : *vtx_container) {
150  if(vtx->vertexType()==xAOD::VxType::PriVtx) {
151  primaryVertex = vtx;
152  break;
153  }
154  if(vtx->vertexType()==xAOD::VxType::NoVtx) {
155  // in case of no primary vertex
156  dummyVertex = vtx;
157  }
158  }
159  if(!primaryVertex)
160  {
161  if(dummyVertex)
162  {
163  ATH_MSG_INFO("No primary vertex found, will use dummy vertex at "
164  << dummyVertex->x() << "," << dummyVertex->y() << ","
165  << dummyVertex->z());
166  primaryVertex = dummyVertex;
167  }
168  else
169  {
170  ATH_MSG_WARNING("Neither primary nor dummy vertex found. Do Nothing.");
171  return StatusCode::SUCCESS;
172  }
173  }
174  }
175 
176  if (m_convertTracks) {
178  ATH_CHECK(
179  wh_xaodout.record(std::make_unique<xAOD::TrackParticleContainer>(),
180  std::make_unique<xAOD::TrackParticleAuxContainer>()));
181 
182  // Augment track particles with information from observer tool
185  if (!rh_tracksMap.isValid()) {
186  ATH_MSG_ERROR(m_tracksMap.key() << " not found");
187  return StatusCode::FAILURE;
188  }
189  else {
190  tracksMap = rh_tracksMap.cptr();
191  ATH_MSG_VERBOSE("Got ObservedTrackMap with key " << m_tracksMap.key()
192  << " found.");
193  }
194  convert((*tracks), trackTruth, m_TrackCollectionCnvTool, wh_xaodout,
195  truthLinks, primaryVertex, tracksMap);
196  } else {
197  convert((*tracks), trackTruth, m_TrackCollectionCnvTool, wh_xaodout,
198  truthLinks, primaryVertex);
199  }
200  // Monitor track parameters
201  if (m_doMonitoring)
202  m_trackMonitoringTool->monitor_tracks("Track", "Pass", *wh_xaodout);
203  }
205  SG::WriteHandle<xAOD::TrackParticleContainer> wh_xaodTrackParticlesout(
207  ATH_CHECK(wh_xaodTrackParticlesout.record(
208  std::make_unique<xAOD::TrackParticleContainer>(),
209  std::make_unique<xAOD::TrackParticleAuxContainer>()));
211  wh_xaodTrackParticlesout, truthLinks);
212  }
213 
214  //extra scope needed to trigger the monitoring
215  {auto monTime = Monitored::Group(m_monTool, mnt_timer_Total);}
216 
217  return StatusCode::SUCCESS;
218 }
219 
220 template<typename CONT>
222 
223 template<>
225 {
226 public:
228  const Trk::Track* operator()(xAOD::TrackParticle* track_particle,
229  unsigned int) const
230  {
231  return track_particle->track();
232  }
233 };
234 
235 template<>
237 {
238 public:
240  xAOD::TrackParticleContainer* cont_dest)
241  : m_contSrc(&cont_src)
242  {
243  if (cont_src.size() != cont_dest->size()) {
244  std::stringstream message;
245  message << __FILE__ << ":" << __LINE__
246  << " Expected one-to-one conversion from AOD to xAOD "
247  "TrackParticles but sizes differ: "
248  << cont_src.size() << " != " << cont_dest->size();
249  throw std::runtime_error(message.str());
250  }
251  }
252 
254  unsigned int idx) const
255  {
256  return m_contSrc->at(idx);
257  }
258 
259 private:
261 };
262 
263 template<typename CONT, typename TRUTHCONT, typename CONVTOOL>
264 int
266  const CONT& container,
267  const TRUTHCONT& truth,
268  CONVTOOL& conv_tool,
270  const xAODTruthParticleLinkVector* truthLinkVec,
271  const xAOD::Vertex* primaryVertex,
272  const ObservedTrackMap* obs_track_map /*=0*/) const
273 {
274  // Create the xAOD container and its auxiliary store:
275 
276  // convert the track containers separately with the converting tools that are
277  // also used by TrigHLTtoxAODTool
278  ATH_MSG_DEBUG("calling the converting tool for " << xaod.name());
279  // Augment track particles using track map if available
280  if (obs_track_map){
281  if (conv_tool->convertAndAugment(&container, xaod.ptr(), obs_track_map, primaryVertex).isFailure()) {
282  ATH_MSG_ERROR("Couldn't convert and augment aod to xaod ("
283  << xaod.name() << ") with the converting tool");
284  return -1;
285  }
286  }
287  else{
288  if (conv_tool->convert(&container, xaod.ptr(), primaryVertex).isFailure()) {
289  ATH_MSG_ERROR("Couldn't convert aod to xaod ("
290  << xaod.name() << ") with the converting tool");
291  return -1;
292  }
293  }
294  // Create the xAOD objects:
296  xAOD::TrackParticleContainer::iterator end_xaod = xaod->end();
297 
298  AssociationHelper<CONT> association_to_src(container, xaod.ptr());
299  unsigned int trackCounter(0);
300  // loop over AOD and converted xAOD for summary info and truth links
301  for (; itr_xaod != end_xaod; ++itr_xaod) {
302  // protect if something went wrong and there is no converted xaod equivalent
303 
304  if (!(*itr_xaod)) {
305  ATH_MSG_WARNING("Empty element in xAOD container!");
306  continue;
307  }
308 
309  xAOD::TrackParticle* particle = *itr_xaod;
310 
311  if (!particle) {
312  ATH_MSG_WARNING("Failed to get an xAOD::TrackParticle");
313  continue;
314  }
315 
316  trackCounter++;
317  if(msgLvl(MSG::DEBUG)){
318  int npix, nsct, ntrt, npixh, nscth, npixshim, npixsplit;
319  npix = nsct = ntrt = npixh = nscth = npixshim = npixsplit = -1;
320  const Trk::Track *tr = particle->track();
321  if (tr){
322  const Trk::TrackSummary* ts = tr->trackSummary();
323  if (ts) {
324  npix = ts->get(Trk::numberOfPixelHits);
325  nsct = ts->get(Trk::numberOfSCTHits);
326  ntrt = ts->get(Trk::numberOfTRTHits);
327  nscth = ts->get(Trk::numberOfSCTHoles);
328  npixh = ts->get(Trk::numberOfPixelHoles);
329  }
330  }
331  msg() << MSG::DEBUG << "REGTEST: " << std::setw(5) << trackCounter
332  << " pT: " << std::setw(10) << particle->pt()
333  << " eta: " << particle->eta()
334  << " phi: " << particle->phi()
335  << " d0: " << particle->d0()
336  << " z0: " << particle->z0()
337  << "\t" << npix << "/" << nsct << "/" << ntrt << "/holes/" << npixh << "/" << nscth
338  << endmsg;
339  }
340  //
341  // --------- statistics
342  //
343  if (m_addTruthLink) {
344  MCTruthPartClassifier::ParticleType type = MCTruthPartClassifier::Unknown;
347  float probability = -1.0;
349 
350  ElementLink<CONT> tpLink(
351  association_to_src(*itr_xaod, itr_xaod - xaod->begin()), container);
352  if (!tpLink.isValid()) {
353  ATH_MSG_WARNING("Failed to create ElementLink to Track/TrackParticle");
354  } else if(truth->empty()){
355  // This can happen if there is no HS track
356  ATH_MSG_DEBUG("No truth available");
357  } else {
358  auto result = truth->find(tpLink);
359  if (result == truth->end()) {
361  "Failed find truth associated with Track/TrackParticle");
362  } else {
363  // setTruthLink(link,result->second, type, origin);
364  ATH_MSG_VERBOSE("Found track Truth: uniqueID "
365  << HepMC::uniqueID(result->second.particleLink()) << " evt "
366  << result->second.particleLink().eventIndex());
367  probability = result->second.probability();
368  link = truthLinkVec->find(result->second.particleLink());
369  if (link.isValid()) {
370  ATH_MSG_DEBUG("Found matching xAOD Truth: uniqueID "
371  << HepMC::uniqueID(*link) << " pt " << (*link)->pt()
372  << " eta " << (*link)->eta() << " phi "
373  << (*link)->phi());
374  // if configured also get truth classification
375  if (result->second.particleLink().cptr() &&
376  !m_truthClassifier.empty()) {
377  auto truthClass = m_truthClassifier->particleHepMCTruthClassifier(
378  result->second.particleLink());
379  type = truthClass.first;
380  origin = truthClass.second;
381  ATH_MSG_VERBOSE("Got truth type " << static_cast<int>(type)
382  << " origin "
383  << static_cast<int>(origin));
384  }
385  } else {
386  if (HepMC::uniqueID(result->second.particleLink()) > 0) {
387  ATH_MSG_WARNING("No associated xAOD truth for valid truth link "
388  << result->second.particleLink());
389  }
390  }
391  }
392  }
393  //This is the Algorithm creating TrackParticles
394  //
395  static const SG::AuxElement::Accessor<
397  theLink("truthParticleLink");
398  static const SG::AuxElement::Accessor<float> theProbability(
399  "truthMatchProbability");
400  theLink(*particle) = link;
401  theProbability(*particle) = probability;
402  if (!m_truthClassifier.empty()) {
403  static const SG::AuxElement::Accessor<int> theType("truthType");
404  static const SG::AuxElement::Accessor<int> theOrigin("truthOrigin");
405  theType(*particle) = static_cast<int>(type);
406  theOrigin(*particle) = static_cast<int>(origin);
407  }
408  }
409  } // loop over aod tracks
410 
411  ATH_MSG_DEBUG("Converted [" << container.size() << " -> " << xaod->size()
412  << "] TrackParticles and stored in "
413  << xaod.name());
414  if (container.size() != xaod->size()) {
415  ATH_MSG_WARNING("number of items in the AOD container: "
416  << container.size()
417  << " is not equal to the number of items in its converted "
418  "xAOD equivalent: "
419  << xaod->size());
420  }
421 
422  return 1;
423 }
424 
429  const Rec::TrackParticle& tp)
430 {
431  // create the xAOD::TrackParticle, the pointer is added to the container in
432  // the function
433  xAOD::TrackParticle* xp = m_particleCreator->createParticle(tp, &xaod);
434  return xp;
435 } // createParticleAndTruth
436 
439  const TrackCollection& container,
440  const Trk::Track& tp,
441  const EventContext& ctx)
442 {
443  // create the xAOD::TrackParticle, the pointer is added to the container in
444  // the function
445  ElementLink<TrackCollection> trackLink(&tp, container,ctx);
446  return m_particleCreator->createParticle(trackLink, &xaod);
447 }
448 
449 } // namespace xAODMaker
Trk::numberOfPixelHits
@ numberOfPixelHits
number of pixel layers on track with absence of hits
Definition: Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h:57
xAOD::Vertex_v1::x
float x() const
Returns the x position.
Trk::ParticleSwitcher::particle
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
Definition: ParticleHypothesis.h:79
xAODMaker::TrackParticleCnvAlg::m_trackMonitoringTool
ToolHandle< ITrackParticleMonitoring > m_trackMonitoringTool
Definition: TrackParticleCnvAlg.h:106
TrigDefs::Group
Group
Properties of a chain group.
Definition: GroupProperties.h:13
get_generator_info.result
result
Definition: get_generator_info.py:21
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
SG::ReadHandle::cptr
const_pointer_type cptr()
Dereference the pointer.
Trk::Track
The ATLAS Track class.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
xAODMaker::TrackParticleCnvAlg::initialize
virtual StatusCode initialize()
Function initialising the algorithm.
Definition: TrackParticleCnvAlg.cxx:28
AthCUDAExamples::TrackParticleContainer
vecmem::edm::container< TrackParticleInterface, vecmem::edm::type::vector< float >, vecmem::edm::type::vector< float >, vecmem::edm::type::vector< float > > TrackParticleContainer
SoA, GPU friendly TrackParticleContainer.
Definition: Control/AthenaExamples/AthExCUDA/src/TrackParticleContainer.h:46
SG::Accessor
Helper class to provide type-safe access to aux data.
Definition: Control/AthContainers/AthContainers/Accessor.h:68
xAODMaker::TrackParticleCnvAlg::m_augmentObservedTracks
Gaudi::Property< bool > m_augmentObservedTracks
Definition: TrackParticleCnvAlg.h:112
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:67
SG::VarHandleBase::name
const std::string & name() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleBase.cxx:75
xAODMaker::AssociationHelper< TrackCollection >::operator()
const Trk::Track * operator()(xAOD::TrackParticle *track_particle, unsigned int) const
Definition: TrackParticleCnvAlg.cxx:228
EventPrimitivesHelpers.h
xAODTruthParticleLinkVector::find
ElementLink< xAOD::TruthParticleContainer > find(const HepMcParticleLink &hepMCLink) const
Definition: xAODTruthParticleLink.h:28
TrackParticleTruth.h
xAODMaker::TrackParticleCnvAlg::createParticle
xAOD::TrackParticle * createParticle(xAOD::TrackParticleContainer &xaod, const Rec::TrackParticleContainer &container, const Rec::TrackParticle &tp)
Definition: TrackParticleCnvAlg.cxx:426
ParticleTest.tp
tp
Definition: ParticleTest.py:25
AthCommonMsg< Gaudi::Algorithm >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition: AthCommonMsg.h:30
xAODMaker::TrackParticleCnvAlg::m_truthClassifier
ToolHandle< IMCTruthClassifier > m_truthClassifier
ToolHandle to truth classifier.
Definition: TrackParticleCnvAlg.h:75
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
xAODMaker
Definition: StoreGateSvc.h:70
xAODMaker::AssociationHelper< TrackCollection >::AssociationHelper
AssociationHelper(const TrackCollection &, xAOD::TrackParticleContainer *)
Definition: TrackParticleCnvAlg.cxx:227
xAODMaker::TrackParticleCnvAlg::m_convertAODTrackParticles
Gaudi::Property< bool > m_convertAODTrackParticles
toggle on converting AOD track particles to xAOD
Definition: TrackParticleCnvAlg.h:117
Trk::numberOfSCTHoles
@ numberOfSCTHoles
number of Holes in both sides of a SCT module
Definition: Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h:73
ReweightUtils.message
message
Definition: ReweightUtils.py:15
xAOD::VxType::NoVtx
@ NoVtx
Dummy vertex. TrackParticle was not used in vertex fit.
Definition: TrackingPrimitives.h:571
xAODMaker::TrackParticleCnvAlg::m_xaodTrackParticlesout
SG::WriteHandleKey< xAOD::TrackParticleContainer > m_xaodTrackParticlesout
Definition: TrackParticleCnvAlg.h:97
python.CaloAddPedShiftConfig.type
type
Definition: CaloAddPedShiftConfig.py:42
xAODMaker::AssociationHelper
Definition: TrackParticleCnvAlg.cxx:221
xAODMaker::TrackParticleCnvAlg::m_tracksMap
SG::ReadHandleKey< ObservedTrackMap > m_tracksMap
Definition: TrackParticleCnvAlg.h:113
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:74
xAODMaker::AssociationHelper< Rec::TrackParticleContainer >::operator()
const Rec::TrackParticle * operator()(xAOD::TrackParticle *, unsigned int idx) const
Definition: TrackParticleCnvAlg.cxx:253
ObservedTrackMap
std::map< int, std::tuple< Trk::Track *, double, xAOD::RejectionStep, xAOD::RejectionReason, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, float, float, int, std::vector< xAOD::RejectionStep >, std::vector< xAOD::RejectionReason > > > ObservedTrackMap
Definition: ObservedTrackMap.h:50
NonDefined
@ NonDefined
Definition: TruthClasses.h:52
TrackTruthCollection
Definition: TrackTruthCollection.h:21
xAODMaker::TrackParticleCnvAlg::m_aod
SG::ReadHandleKey< Rec::TrackParticleContainer > m_aod
Definition: TrackParticleCnvAlg.h:88
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
xAODMaker::TrackParticleCnvAlg::m_trackTruth
SG::ReadHandleKey< TrackTruthCollection > m_trackTruth
Definition: TrackParticleCnvAlg.h:102
TrackParticleTruthKey.h
EventPrimitivesToStringConverter.h
DataModel_detail::iterator
(Non-const) Iterator class for DataVector/DataList.
Definition: DVLIterator.h:184
Rec
Name: MuonSpContainer.h Package : offline/Reconstruction/MuonIdentification/muonEvent.
Definition: FakeTrackBuilder.h:10
xAODMaker::AssociationHelper< Rec::TrackParticleContainer >::m_contSrc
const Rec::TrackParticleContainer * m_contSrc
Definition: TrackParticleCnvAlg.cxx:260
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
Trk::numberOfSCTHits
@ numberOfSCTHits
number of SCT holes
Definition: Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h:71
SG::WriteHandle::ptr
pointer_type ptr()
Dereference the pointer.
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
ParticleOrigin
ParticleOrigin
Definition: TruthClasses.h:51
xAODMaker::TrackParticleCnvAlg::m_addTruthLink
Gaudi::Property< bool > m_addTruthLink
toggle on adding truth links
Definition: TrackParticleCnvAlg.h:68
TrackParticleCnvAlg.h
xAOD::VxType::PriVtx
@ PriVtx
Primary vertex.
Definition: TrackingPrimitives.h:572
HepMC::uniqueID
int uniqueID(const T &p)
Definition: MagicNumbers.h:116
xAODMaker::TrackParticleCnvAlg::m_aodTruth
SG::ReadHandleKey< TrackParticleTruthCollection > m_aodTruth
Definition: TrackParticleCnvAlg.h:101
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
xAOD::Vertex_v1::z
float z() const
Returns the z position.
xAODMaker::TrackParticleCnvAlg::execute
virtual StatusCode execute(const EventContext &ctx) const
Function executing the algorithm.
Definition: TrackParticleCnvAlg.cxx:72
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
DataVector< Trk::Track >
Monitored.h
Header file to be included by clients of the Monitored infrastructure.
xAODMaker::TrackParticleCnvAlg::m_TrackCollectionCnvTool
ToolHandle< xAODMaker::ITrackCollectionCnvTool > m_TrackCollectionCnvTool
Definition: TrackParticleCnvAlg.h:83
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
Trk::numberOfPixelHoles
@ numberOfPixelHoles
number of pixels which have a ganged ambiguity.
Definition: Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h:59
xAODMaker::AssociationHelper< Rec::TrackParticleContainer >::AssociationHelper
AssociationHelper(const Rec::TrackParticleContainer &cont_src, xAOD::TrackParticleContainer *cont_dest)
Definition: TrackParticleCnvAlg.cxx:239
xAODMaker::TrackParticleCnvAlg::m_doMonitoring
Gaudi::Property< bool > m_doMonitoring
Definition: TrackParticleCnvAlg.h:105
Trk::numberOfTRTHits
@ numberOfTRTHits
number of TRT outliers
Definition: Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h:79
xAODMaker::TrackParticleCnvAlg::convert
int convert(const CONT &, const TRUTHCONT &, CONVTOOL &tool, SG::WriteHandle< xAOD::TrackParticleContainer > &, const xAODTruthParticleLinkVector *, const xAOD::Vertex *primaryVertex=nullptr, const ObservedTrackMap *obs_track_map=0) const
Definition: TrackParticleCnvAlg.cxx:265
Trk::TrackSummary
A summary of the information contained by a track.
Definition: Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h:287
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
xAODMaker::TrackParticleCnvAlg::m_monTool
ToolHandle< GenericMonitoringTool > m_monTool
Definition: TrackParticleCnvAlg.h:109
xAODMaker::TrackParticleCnvAlg::m_RecTrackParticleContainerCnvTool
ToolHandle< xAODMaker::IRecTrackParticleContainerCnvTool > m_RecTrackParticleContainerCnvTool
Definition: TrackParticleCnvAlg.h:85
errorcheck.h
Helpers for checking error return status codes and reporting errors.
Rec::TrackParticleContainer
Definition: Reconstruction/Particle/Particle/TrackParticleContainer.h:33
xAODMaker::TrackParticleCnvAlg::m_truthParticleLinkVec
SG::ReadHandleKey< xAODTruthParticleLinkVector > m_truthParticleLinkVec
Definition: TrackParticleCnvAlg.h:100
xAODMaker::TrackParticleCnvAlg::m_convertTracks
Gaudi::Property< bool > m_convertTracks
toggle on converting tracks to xAOD
Definition: TrackParticleCnvAlg.h:120
Rec::TrackParticle
Definition: Reconstruction/Particle/Particle/TrackParticle.h:47
xAODMaker::TrackParticleCnvAlg::m_tracks
SG::ReadHandleKey< TrackCollection > m_tracks
Definition: TrackParticleCnvAlg.h:90
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:73
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
SG::WriteHandle::record
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
Trk::Track::trackSummary
const Trk::TrackSummary * trackSummary() const
Returns a pointer to the const Trk::TrackSummary owned by this const track (could be nullptr)
xAODTruthParticleLinkVector
Definition: xAODTruthParticleLink.h:26
TrackParticleTruthCollection
Definition: TrackParticleTruthCollection.h:18
DEBUG
#define DEBUG
Definition: page_access.h:11
xAOD::Vertex_v1::y
float y() const
Returns the y position.
AthCommonMsg< Gaudi::Algorithm >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
LArNewCalib_DelayDump_OFC_Cali.idx
idx
Definition: LArNewCalib_DelayDump_OFC_Cali.py:69
xAODMaker::TrackParticleCnvAlg::m_particleCreator
ToolHandle< Trk::ITrackParticleCreatorTool > m_particleCreator
The key for the input TrackParticleTruthCollection.
Definition: TrackParticleCnvAlg.h:73
xAODMaker::TrackParticleCnvAlg::m_primaryVertexContainer
SG::ReadHandleKey< xAOD::VertexContainer > m_primaryVertexContainer
Definition: TrackParticleCnvAlg.h:92
xAODMaker::TrackParticleCnvAlg::TrackParticleCnvAlg
TrackParticleCnvAlg(const std::string &name, ISvcLocator *svcLoc)
Regular algorithm constructor.
Definition: TrackParticleCnvAlg.cxx:23
xAODMaker::TrackParticleCnvAlg::m_xaodout
SG::WriteHandleKey< xAOD::TrackParticleContainer > m_xaodout
Definition: TrackParticleCnvAlg.h:94
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
xAOD::TrackParticle_v1::track
const Trk::Track * track() const
Returns a pointer (which can be NULL) to the Trk::Track which was used to make this TrackParticle.
Definition: TrackParticle_v1.cxx:806
python.CaloScaleNoiseConfig.ts
ts
Definition: CaloScaleNoiseConfig.py:87
ParticleType
ParticleType
Definition: TruthClasses.h:8
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
Monitored::Timer
A monitored timer.
Definition: MonitoredTimer.h:32
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.