22 return StatusCode::SUCCESS;
26 auto ctx = getContext() ;
30 if (not inputTracks) {
32 return StatusCode::FAILURE;
38 for (
const auto* trk : *inputTracks )
41 xAOD::ParametersCovMatrix_t trkcov = trk->definingParametersCovMatrix();
42 auto trkcovvec = trk->definingParametersCovMatrixVec();
43 if (trk->pt() == 0.)
continue;
45 <<
" curv=" << 1./trk->pt()
46 <<
" phi=" << trk->phi()
47 <<
" eta=" << trk->eta()
60 if (not smearedTracks) {
62 return StatusCode::FAILURE;
68 for (
const auto* trk : *smearedTracks )
71 xAOD::ParametersCovMatrix_t trkcov = trk->definingParametersCovMatrix();
72 auto trkcovvec = trk->definingParametersCovMatrixVec();
73 if (trk->pt() == 0.)
continue;
75 <<
" curv=" << 1./trk->pt()
76 <<
" phi=" << trk->phi()
77 <<
" eta=" << trk->eta()
93 return StatusCode::FAILURE;
101 for (
const auto* part : *inputTruth )
103 if (part->pt() == 0.)
continue;
105 <<
" curv=" << 1./part->pt()
106 <<
" phi=" << part->phi()
107 <<
" eta=" << part->eta()
108 <<
" d0=" << d0Acc(*part)
109 <<
" z0=" << z0Acc(*part)
110 <<
" pT=" << part->pt()
111 <<
" PDGID=" << part->pdgId()
112 <<
" status=" << part->status()
114 if (part->parent(0))
ATH_MSG_DEBUG (
" parent pdgId=" << part->parent(0)->pdgId());
121 if (not smearedTruth) {
123 return StatusCode::FAILURE;
127 for (
const auto* part : *smearedTruth )
129 if (part->pt() == 0.)
continue;
131 <<
" curv=" << 1./ptAcc(*part)
132 <<
" phi=" << part->phi()
133 <<
" eta=" << part->eta()
134 <<
" d0=" << d0Acc(*part)
135 <<
" z0=" << z0Acc(*part)
136 <<
" pT=" << ptAcc(*part)
137 <<
" PDGID=" << part->pdgId()
138 <<
" status=" << part->status()
140 if (part->parent(0))
ATH_MSG_DEBUG (
" parent pdgId=" << part->parent(0)->pdgId());
143 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
Helper class to provide constant type-safe access to aux data.
AthHistogramAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
size_type size() const noexcept
Returns the number of elements in the collection.
EFTrackingSmearMonAlg(const std::string &name, ISvcLocator *pSvcLocator)
virtual StatusCode execute() override
virtual StatusCode initialize() override
SG::ReadHandleKey< xAOD::TruthParticleContainer > m_smearedTruthParticleKey
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_smearedTrackParticleKey
SG::ReadHandleKey< xAOD::TruthParticleContainer > m_inputTruthParticleKey
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_inputTrackParticleKey
Helper class to provide constant type-safe access to aux data.
const_pointer_type cptr()
Dereference the pointer.
TrackParticleContainer_v1 TrackParticleContainer
Definition of the current "TrackParticle container version".
TruthParticleContainer_v1 TruthParticleContainer
Declare the latest version of the truth particle container.