ATLAS Offline Software
Loading...
Searching...
No Matches
Trk::PerigeeParametersNtupleTool Class Reference

Explain... More...

#include <PerigeeParametersNtupleTool.h>

Inheritance diagram for Trk::PerigeeParametersNtupleTool:
Collaboration diagram for Trk::PerigeeParametersNtupleTool:

Public Member Functions

 PerigeeParametersNtupleTool (const std::string &, const std::string &, const IInterface *)
 ~PerigeeParametersNtupleTool ()
StatusCode initialize ()
StatusCode finalize ()
virtual StatusCode addNtupleItems (TTree *tree)
 add branches to the tree Should be called once (per track collection and tree) dunring the initialisation phase by the calling algorithm (usually Trk::TrackValidationNtupleWriter)
virtual StatusCode fillTrackData (const Trk::Track &, const int iterationIndex, const unsigned int fitStatCode)
 fill ntuple data of a given track without writing the record.
virtual StatusCode fillTrackParticleData (const Trk::TrackParticleBase &)
 fill ntuple data of a given TrackParticle without writing the record.
virtual StatusCode fillTrackTruthData (const TrackParameters *&, const TrackTruth &, const int)
 fill data about the truth match (score, parameter-pulls etc)
virtual void resetVariables ()
 reset the variables after writing the record to disk ntuple
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Static Public Member Functions

static const InterfaceID & interfaceID ()
 Interface ID, declared here, and defined below.

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

StatusCode fillTrackPerigee (const Trk::Perigee *perigee)
 fill the perigee in ntuple
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

ToolHandle< Trk::IExtrapolatorm_extrapolator
 extrapolator, in case tracks do not have perigee
bool m_doTruth
 switch to turn truth on/off
float m_Rec_d0
 reconstructed track params: local d0 at perigee UNIT:mm
float m_Rec_z0
 reconstructed track params: local z0 at perigee UNIT:mm
float m_Rec_phi0
 reconstructed track params: angle phi at perigee UNIT:rad
float m_Rec_theta
 reconstructed track params: angle theta at perigee UNIT:rad
float m_Rec_eta
 reconstructed track params: pseudorapidity UNIT:1
float m_Rec_qOverP
 reconstructed track params: curvature q/p UNIT:1/MeV
float m_errord0
 error on local d0 at perigee UNIT:mm
float m_errorz0
 error on local z0 at perigee UNIT:mm
float m_errorphi0
 error on angle phi at perigee UNIT:rad
float m_errortheta0
 error on angle theta at perigee UNIT:rad
float m_errorqoverp
 error on curvature q/p UNIT:1/MeV
float m_mc_d0
 matched MC-truth track params: local d0 at perigee UNIT:mm
float m_mc_z0
 matched MC-truth track params: local z0 at perigee UNIT:mm
float m_mc_phi0
 matched MC-truth track params: angle phi at perigee UNIT:rad
float m_mc_theta
 matched MC-truth track params: angle theta at perigee UNIT:rad
float m_mc_qOverP
 matched MC-truth track params: curvature q/p at perigee UNIT:1/MeV
float m_mc_qOverPt
 matched MC-truth track params: projected curvature q/pT at perigee UNIT:1/MeV
float m_mc_eta
 matched MC-truth track params: pseudorapidity
float m_mc_diff_d0
 difference reconstructed minus true parameter: d0 UNIT:mm
float m_mc_diff_z0
 difference reconstructed minus true parameter: z0 UNIT:mm
float m_mc_diff_phi0
 difference reconstructed minus true parameter: angle phi UNIT:rad
float m_mc_diff_theta
 difference reconstructed minus true parameter: angle theta UNIT:rad
float m_mc_diff_qOverP
 difference reconstructed minus true parameter: q/p UNIT:1/MeV
float m_mc_pull_d0
 parameter-pull for d0 UNIT:1
float m_mc_pull_z0
 parameter-pull for z0 UNIT:1
float m_mc_pull_phi0
 parameter-pull for phi UNIT:1
float m_mc_pull_theta
 parameter-pull for theta UNIT:1
float m_mc_pull_qOverP
 parameter-pull for q/p UNIT:1
int m_mc_particleID
 PDG-ID for matched truth track.
int m_mc_uniqueID
 unique ID for matched truth track
int m_mc_truthTreeIndex
 entry index linking to 'Truth' tree in ntuple
float m_mc_energy
 energy of the truth particle UNIT:MeV
float m_mc_prob
 match probability for the truth particle (calculated by the job's configured TrackTruthSelector)
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default)
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Explain...

Definition at line 29 of file PerigeeParametersNtupleTool.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ PerigeeParametersNtupleTool()

Trk::PerigeeParametersNtupleTool::PerigeeParametersNtupleTool ( const std::string & t,
const std::string & n,
const IInterface * p )

Definition at line 29 of file PerigeeParametersNtupleTool.cxx.

33 :
34 AthAlgTool(t,n,p),
35 m_extrapolator(""), // ("Trk::Extrapolator/AtlasExtrapolator"),
36 m_doTruth(true),
37 m_Rec_d0{},
38 m_Rec_z0{},
39 m_Rec_phi0{},
40 m_Rec_theta{},
41 m_Rec_eta{},
42 m_Rec_qOverP{},
43
44 m_errord0{},
45 m_errorz0{},
46 m_errorphi0{},
49
50
51 m_mc_d0{},
52 m_mc_z0{},
53 m_mc_phi0{},
54 m_mc_theta{},
55 m_mc_qOverP{},
56 m_mc_qOverPt{},
57 m_mc_eta{},
58
59 m_mc_diff_d0{},
60 m_mc_diff_z0{},
64
65 m_mc_pull_d0{},
66 m_mc_pull_z0{},
70
74 m_mc_energy{},
75
76 m_mc_prob{}
77
78{
79 declareInterface<ITrackValidationNtupleTool>(this);
80 declareProperty("ExtrapolatorTool", m_extrapolator, "Extrapolator, eg for tracks without Perigee");
81 declareProperty("DoTruth", m_doTruth, "Toggle if to Write truth data");
82
83}
AthAlgTool()
Default constructor:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
float m_mc_prob
match probability for the truth particle (calculated by the job's configured TrackTruthSelector)
float m_Rec_eta
reconstructed track params: pseudorapidity UNIT:1
bool m_doTruth
switch to turn truth on/off
float m_mc_theta
matched MC-truth track params: angle theta at perigee UNIT:rad
float m_mc_qOverPt
matched MC-truth track params: projected curvature q/pT at perigee UNIT:1/MeV
int m_mc_particleID
PDG-ID for matched truth track.
float m_Rec_z0
reconstructed track params: local z0 at perigee UNIT:mm
int m_mc_truthTreeIndex
entry index linking to 'Truth' tree in ntuple
float m_mc_pull_qOverP
parameter-pull for q/p UNIT:1
float m_mc_pull_phi0
parameter-pull for phi UNIT:1
float m_mc_diff_qOverP
difference reconstructed minus true parameter: q/p UNIT:1/MeV
float m_mc_diff_theta
difference reconstructed minus true parameter: angle theta UNIT:rad
float m_Rec_theta
reconstructed track params: angle theta at perigee UNIT:rad
float m_mc_d0
matched MC-truth track params: local d0 at perigee UNIT:mm
float m_mc_energy
energy of the truth particle UNIT:MeV
float m_mc_eta
matched MC-truth track params: pseudorapidity
float m_mc_pull_z0
parameter-pull for z0 UNIT:1
float m_mc_diff_d0
difference reconstructed minus true parameter: d0 UNIT:mm
float m_mc_diff_z0
difference reconstructed minus true parameter: z0 UNIT:mm
float m_errord0
error on local d0 at perigee UNIT:mm
float m_mc_pull_theta
parameter-pull for theta UNIT:1
float m_Rec_phi0
reconstructed track params: angle phi at perigee UNIT:rad
ToolHandle< Trk::IExtrapolator > m_extrapolator
extrapolator, in case tracks do not have perigee
float m_errorphi0
error on angle phi at perigee UNIT:rad
int m_mc_uniqueID
unique ID for matched truth track
float m_mc_phi0
matched MC-truth track params: angle phi at perigee UNIT:rad
float m_Rec_d0
reconstructed track params: local d0 at perigee UNIT:mm
float m_mc_pull_d0
parameter-pull for d0 UNIT:1
float m_errorz0
error on local z0 at perigee UNIT:mm
float m_errorqoverp
error on curvature q/p UNIT:1/MeV
float m_mc_qOverP
matched MC-truth track params: curvature q/p at perigee UNIT:1/MeV
float m_mc_z0
matched MC-truth track params: local z0 at perigee UNIT:mm
float m_Rec_qOverP
reconstructed track params: curvature q/p UNIT:1/MeV
float m_mc_diff_phi0
difference reconstructed minus true parameter: angle phi UNIT:rad
float m_errortheta0
error on angle theta at perigee UNIT:rad

◆ ~PerigeeParametersNtupleTool()

Trk::PerigeeParametersNtupleTool::~PerigeeParametersNtupleTool ( )
default

Member Function Documentation

◆ addNtupleItems()

StatusCode Trk::PerigeeParametersNtupleTool::addNtupleItems ( TTree * tree)
virtual

add branches to the tree Should be called once (per track collection and tree) dunring the initialisation phase by the calling algorithm (usually Trk::TrackValidationNtupleWriter)

Implements Trk::ITrackValidationNtupleTool.

Definition at line 107 of file PerigeeParametersNtupleTool.cxx.

107 {
108 if (!tree) return StatusCode::FAILURE;
109 //-----------------
110 // add items *** Note: Documentation is in the header file, doxygen and wikis! ***
111 //
112 // reconstructed track parameters
113 tree->Branch("RecD0", &m_Rec_d0 );
114 tree->Branch("RecZ0", &m_Rec_z0 );
115 tree->Branch("RecPhi0", &m_Rec_phi0 );
116 tree->Branch("RecTheta", &m_Rec_theta );
117 tree->Branch("RecEta", &m_Rec_eta );
118 tree->Branch("RecQoverP", &m_Rec_qOverP );
119
120 // errors of reconstructed track parameters
121 tree->Branch("RecErrD0", &m_errord0 );
122 tree->Branch("RecErrZ0", &m_errorz0 );
123 tree->Branch("RecErrPhi0", &m_errorphi0 );
124 tree->Branch("RecErrTheta", &m_errortheta0 );
125 tree->Branch("RecErrQoverP", &m_errorqoverp );
126
127 // Truth entries
128 if ( m_doTruth ){
129 tree->Branch( "trk_Mc_d0", &m_mc_d0 );
130 tree->Branch( "trk_Mc_z0", &m_mc_z0 );
131 tree->Branch( "trk_Mc_phi0", &m_mc_phi0 );
132 tree->Branch( "trk_Mc_theta", &m_mc_theta );
133 tree->Branch( "trk_Mc_qOverP", &m_mc_qOverP );
134 tree->Branch( "trk_Mc_qOverPt", &m_mc_qOverPt );
135 tree->Branch( "trk_Mc_eta", &m_mc_eta );
136
137 tree->Branch( "trk_Mc_diff_d0", &m_mc_diff_d0 );
138 tree->Branch( "trk_Mc_diff_z0", &m_mc_diff_z0 );
139 tree->Branch( "trk_Mc_diff_phi0", &m_mc_diff_phi0 );
140 tree->Branch( "trk_Mc_diff_theta", &m_mc_diff_theta );
141 tree->Branch( "trk_Mc_diff_qOverP", &m_mc_diff_qOverP );
142
143 tree->Branch( "trk_Mc_pull_d0", &m_mc_pull_d0 );
144 tree->Branch( "trk_Mc_pull_z0", &m_mc_pull_z0 );
145 tree->Branch( "trk_Mc_pull_phi0", &m_mc_pull_phi0 );
146 tree->Branch( "trk_Mc_pull_theta", &m_mc_pull_theta );
147 tree->Branch( "trk_Mc_pull_qOverP", &m_mc_pull_qOverP );
148
149 tree->Branch( "trk_Mc_particleID", &m_mc_particleID );
150 tree->Branch( "trk_Mc_barcode", &m_mc_uniqueID ); // TODO update variable name to be consistent
151 tree->Branch( "trk_Mc_energy", &m_mc_energy );
152 tree->Branch( "trk_Mc_prob", &m_mc_prob );
153 tree->Branch( "trk_Mc_truthTreeIndex",&m_mc_truthTreeIndex );
154 }
155
156 // general track properties other than perigee are given through
157 // Trk::TrackInformationNtupleTool
158
159 ATH_MSG_VERBOSE ("added branches to ntuple");
160 return StatusCode::SUCCESS;
161}
#define ATH_MSG_VERBOSE(x)
TChain * tree

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ fillTrackData()

StatusCode Trk::PerigeeParametersNtupleTool::fillTrackData ( const Trk::Track & track,
const int iterationIndex,
const unsigned int fitStatCode )
virtual

fill ntuple data of a given track without writing the record.

fill track data into variables without actually writing the record

  • if this method is called twice without writing the ntuple inbetween the first data will be lost!

Implements Trk::ITrackValidationNtupleTool.

Definition at line 166 of file PerigeeParametersNtupleTool.cxx.

169 {
170 //const Trk::FitterStatusCode /*fitStatCode*/ ) const {
171
172 ATH_MSG_VERBOSE ("in fillTrackData(trk, indx)");
173 const EventContext& ctx = Gaudi::Hive::currentContext();
174 //----------------------------------------------
175 // fill track parameters in ntuple
176 const Trk::Perigee* perpars = track.perigeeParameters();
177 if (perpars != nullptr && fillTrackPerigee(perpars).isFailure()) {
178 msg(MSG::WARNING) << "Perigee parameters could not be written to ntuple" << endmsg;
179 }
180 if (perpars == nullptr) {
181 if ( // track.info().author() == Trk::Track::SiSPSeededTrackFinder &&
182 !m_extrapolator.empty() ) {
183 ATH_MSG_VERBOSE ("try extrapolate SiSPSeeded track to perigee");
184 const Trk::PerigeeSurface perSurf;
185 std::unique_ptr<const Trk::TrackParameters> tmp = m_extrapolator->extrapolateTrack(
186 ctx, track, perSurf, Trk::anyDirection, false, Trk::nonInteracting);
187 if (tmp && tmp->associatedSurface().type() == Trk::SurfaceType::Perigee) {
188 perpars = static_cast<const Trk::Perigee *> (tmp.release());
189 }
190 if (perpars != nullptr && fillTrackPerigee(perpars).isFailure()) {
191 msg(MSG::WARNING) << "Newly made perigee parameters could not be "
192 << "written to ntuple" << endmsg;
193 }
194 if (perpars != nullptr) delete perpars;
195 } else
196 msg(MSG::WARNING) << "No perigee parameters, but they are the main validation object!"
197 << endmsg;
198 }
199 return StatusCode::SUCCESS;
200}
#define endmsg
MsgStream & msg() const
StatusCode fillTrackPerigee(const Trk::Perigee *perigee)
fill the perigee in ntuple
@ anyDirection
ParametersT< TrackParametersDim, Charged, PerigeeSurface > Perigee

◆ fillTrackParticleData()

StatusCode Trk::PerigeeParametersNtupleTool::fillTrackParticleData ( const Trk::TrackParticleBase & particle)
virtual

fill ntuple data of a given TrackParticle without writing the record.

fill trackparticle data into variables without actually writing the record

  • if this method is called twice without writing the ntuple inbetween the first data will be lost!

Implements Trk::ITrackValidationNtupleTool.

Definition at line 205 of file PerigeeParametersNtupleTool.cxx.

207{
208
209 //----------------------------------------------
210 // fill track parameters in ntuple
211 const Trk::Perigee* perpars = particle.perigee();
212 if (perpars != nullptr && fillTrackPerigee(perpars).isFailure())
213 ATH_MSG_WARNING ("Perigee parameters could not be written to ntuple");
214 return StatusCode::SUCCESS;
215}
#define ATH_MSG_WARNING(x)
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses

◆ fillTrackPerigee()

StatusCode Trk::PerigeeParametersNtupleTool::fillTrackPerigee ( const Trk::Perigee * perigee)
private

fill the perigee in ntuple

Definition at line 276 of file PerigeeParametersNtupleTool.cxx.

276 {
277
278 ATH_MSG_VERBOSE ("in fillTrackPerigee");
279
280 // // get track parameters
281 // const Trk::Perigee *perigee = track->perigeeParameters();
282 if (!perigee) {
283 msg(MSG::WARNING) << "Something is wrong - track has no perigee at all!" << endmsg;
284 m_Rec_d0 = 0;
285 m_Rec_z0 = 0;
286 m_Rec_phi0 = 0;
287 m_Rec_theta = 0;
288 m_Rec_qOverP = 0;
289 return StatusCode::FAILURE;
290 }
291
292 ATH_MSG_VERBOSE("Fill Perigee Parameters now");
293 // track parameters
294 m_Rec_d0 = perigee->parameters()[Trk::d0];
295 m_Rec_z0 = perigee->parameters()[Trk::z0];
296 m_Rec_phi0 = perigee->parameters()[Trk::phi0];
297 m_Rec_theta = perigee->parameters()[Trk::theta];
298 m_Rec_eta = perigee->eta();
299 m_Rec_qOverP = perigee->parameters()[Trk::qOverP];
300 ATH_MSG_DEBUG ("Trackparameters: q/p=" << m_Rec_qOverP);
301
302 // get measured track parameters for errors
303 if (perigee->covariance()) {
304
305 // error of track parameters
306 m_errord0 = Amg::error(*perigee->covariance(),Trk::d0);
307 m_errorz0 = Amg::error(*perigee->covariance(),Trk::z0);
308 m_errorphi0 = Amg::error(*perigee->covariance(),Trk::phi0);
309 m_errortheta0 = Amg::error(*perigee->covariance(),Trk::theta);
310 m_errorqoverp = Amg::error(*perigee->covariance(),Trk::qOverP);
311
312
313 } // end if measPerigee
314
315 // TO-DO treat condition of no measured pars
316
317 ATH_MSG_DEBUG ("Trackparameters: d0=" << m_Rec_d0 << ", z0=" << m_Rec_z0 << ", phi0=" << m_Rec_phi0 << ", theta=" << m_Rec_theta);
318
319 return StatusCode::SUCCESS;
320}
#define ATH_MSG_DEBUG(x)
double eta() const
Access method for pseudorapidity - from momentum.
double error(const Amg::MatrixX &mat, int index)
return diagonal error of the matrix caller should ensure the matrix is symmetric and the index is in ...
@ phi0
Definition ParamDefs.h:65
@ theta
Definition ParamDefs.h:66
@ qOverP
perigee
Definition ParamDefs.h:67
@ d0
Definition ParamDefs.h:63
@ z0
Definition ParamDefs.h:64

◆ fillTrackTruthData()

StatusCode Trk::PerigeeParametersNtupleTool::fillTrackTruthData ( const TrackParameters *& truePerigee,
const TrackTruth & trackTruth,
const int indexInTruthTree )
virtual

fill data about the truth match (score, parameter-pulls etc)

Implements Trk::ITrackValidationNtupleTool.

Definition at line 224 of file PerigeeParametersNtupleTool.cxx.

225{
226
227 if ( !m_doTruth ) return StatusCode::SUCCESS;
228
229 ATH_MSG_VERBOSE ("Starting fillTrackTruthData()");
230
231 const HepMcParticleLink& particleLink = trackTruth.particleLink();
232
233 m_mc_uniqueID = HepMC::uniqueID(particleLink);
234 m_mc_prob=trackTruth.probability();
235 m_mc_truthTreeIndex = indexInTruthTree;
236
237 HepMC::ConstGenParticlePtr genParticle = particleLink.cptr();
238
239 if ( genParticle ){
240 m_mc_particleID = genParticle->pdg_id();
241 m_mc_energy = genParticle->momentum().e();
242 }
243
244 if (truePerigee == nullptr) return StatusCode::SUCCESS; // fake fakes don't have true perigee
245
246 m_mc_d0 = truePerigee->parameters()[Trk::d0];
247 m_mc_z0 = truePerigee->parameters()[Trk::z0];
248 m_mc_phi0 = truePerigee->parameters()[Trk::phi0];
249 m_mc_theta = truePerigee->parameters()[Trk::theta];
250 m_mc_qOverP = truePerigee->parameters()[Trk::qOverP];
251
252 if ( std::sin( m_mc_theta ) != 0. )
253 m_mc_qOverPt = m_mc_qOverP / std::sin( m_mc_theta );
254
255 m_mc_eta = truePerigee->eta();
256
262
268
269 return StatusCode::SUCCESS;
270
271}
float probability() const
Definition TrackTruth.h:28
const HepMcParticleLink & particleLink() const
Definition TrackTruth.h:26
int uniqueID(const T &p)
const GenParticle * ConstGenParticlePtr
Definition GenParticle.h:38

◆ finalize()

StatusCode Trk::PerigeeParametersNtupleTool::finalize ( )

Definition at line 101 of file PerigeeParametersNtupleTool.cxx.

101 {
102
103 ATH_MSG_DEBUG ("nothing specific finalized in " << name());
104 return StatusCode::SUCCESS;
105}

◆ initialize()

StatusCode Trk::PerigeeParametersNtupleTool::initialize ( )

Definition at line 92 of file PerigeeParametersNtupleTool.cxx.

92 {
93
94 ATH_MSG_DEBUG ("nothing specific initialized in " << name());
95 return StatusCode::SUCCESS;
96}

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ interfaceID()

const InterfaceID & Trk::ITrackValidationNtupleTool::interfaceID ( )
inlinestaticinherited

Interface ID, declared here, and defined below.

Definition at line 69 of file ITrackValidationNtupleTool.h.

69 {
71}
static const InterfaceID IID_ITrackValidationNtupleTool("ITrackValidationNtupleTool", 1, 0)

◆ msg()

MsgStream & AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ resetVariables()

void Trk::PerigeeParametersNtupleTool::resetVariables ( )
virtual

reset the variables after writing the record to disk ntuple

Implements Trk::ITrackValidationNtupleTool.

Definition at line 220 of file PerigeeParametersNtupleTool.cxx.

220 {
221 // reset the counters
222}

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in asg::AsgMetadataTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and DerivationFramework::CfAthAlgTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }
std::vector< SG::VarHandleKeyArray * > m_vhka

Member Data Documentation

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_doTruth

bool Trk::PerigeeParametersNtupleTool::m_doTruth
private

switch to turn truth on/off

Definition at line 70 of file PerigeeParametersNtupleTool.h.

◆ m_errord0

float Trk::PerigeeParametersNtupleTool::m_errord0
private

error on local d0 at perigee UNIT:mm

Definition at line 78 of file PerigeeParametersNtupleTool.h.

◆ m_errorphi0

float Trk::PerigeeParametersNtupleTool::m_errorphi0
private

error on angle phi at perigee UNIT:rad

Definition at line 80 of file PerigeeParametersNtupleTool.h.

◆ m_errorqoverp

float Trk::PerigeeParametersNtupleTool::m_errorqoverp
private

error on curvature q/p UNIT:1/MeV

Definition at line 82 of file PerigeeParametersNtupleTool.h.

◆ m_errortheta0

float Trk::PerigeeParametersNtupleTool::m_errortheta0
private

error on angle theta at perigee UNIT:rad

Definition at line 81 of file PerigeeParametersNtupleTool.h.

◆ m_errorz0

float Trk::PerigeeParametersNtupleTool::m_errorz0
private

error on local z0 at perigee UNIT:mm

Definition at line 79 of file PerigeeParametersNtupleTool.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extrapolator

ToolHandle<Trk::IExtrapolator> Trk::PerigeeParametersNtupleTool::m_extrapolator
private

extrapolator, in case tracks do not have perigee

Definition at line 69 of file PerigeeParametersNtupleTool.h.

◆ m_mc_d0

float Trk::PerigeeParametersNtupleTool::m_mc_d0
private

matched MC-truth track params: local d0 at perigee UNIT:mm

Definition at line 85 of file PerigeeParametersNtupleTool.h.

◆ m_mc_diff_d0

float Trk::PerigeeParametersNtupleTool::m_mc_diff_d0
private

difference reconstructed minus true parameter: d0 UNIT:mm

Definition at line 93 of file PerigeeParametersNtupleTool.h.

◆ m_mc_diff_phi0

float Trk::PerigeeParametersNtupleTool::m_mc_diff_phi0
private

difference reconstructed minus true parameter: angle phi UNIT:rad

Definition at line 95 of file PerigeeParametersNtupleTool.h.

◆ m_mc_diff_qOverP

float Trk::PerigeeParametersNtupleTool::m_mc_diff_qOverP
private

difference reconstructed minus true parameter: q/p UNIT:1/MeV

Definition at line 97 of file PerigeeParametersNtupleTool.h.

◆ m_mc_diff_theta

float Trk::PerigeeParametersNtupleTool::m_mc_diff_theta
private

difference reconstructed minus true parameter: angle theta UNIT:rad

Definition at line 96 of file PerigeeParametersNtupleTool.h.

◆ m_mc_diff_z0

float Trk::PerigeeParametersNtupleTool::m_mc_diff_z0
private

difference reconstructed minus true parameter: z0 UNIT:mm

Definition at line 94 of file PerigeeParametersNtupleTool.h.

◆ m_mc_energy

float Trk::PerigeeParametersNtupleTool::m_mc_energy
private

energy of the truth particle UNIT:MeV

Definition at line 108 of file PerigeeParametersNtupleTool.h.

◆ m_mc_eta

float Trk::PerigeeParametersNtupleTool::m_mc_eta
private

matched MC-truth track params: pseudorapidity

Definition at line 91 of file PerigeeParametersNtupleTool.h.

◆ m_mc_particleID

int Trk::PerigeeParametersNtupleTool::m_mc_particleID
private

PDG-ID for matched truth track.

Definition at line 105 of file PerigeeParametersNtupleTool.h.

◆ m_mc_phi0

float Trk::PerigeeParametersNtupleTool::m_mc_phi0
private

matched MC-truth track params: angle phi at perigee UNIT:rad

Definition at line 87 of file PerigeeParametersNtupleTool.h.

◆ m_mc_prob

float Trk::PerigeeParametersNtupleTool::m_mc_prob
private

match probability for the truth particle (calculated by the job's configured TrackTruthSelector)

Definition at line 110 of file PerigeeParametersNtupleTool.h.

◆ m_mc_pull_d0

float Trk::PerigeeParametersNtupleTool::m_mc_pull_d0
private

parameter-pull for d0 UNIT:1

Definition at line 99 of file PerigeeParametersNtupleTool.h.

◆ m_mc_pull_phi0

float Trk::PerigeeParametersNtupleTool::m_mc_pull_phi0
private

parameter-pull for phi UNIT:1

Definition at line 101 of file PerigeeParametersNtupleTool.h.

◆ m_mc_pull_qOverP

float Trk::PerigeeParametersNtupleTool::m_mc_pull_qOverP
private

parameter-pull for q/p UNIT:1

Definition at line 103 of file PerigeeParametersNtupleTool.h.

◆ m_mc_pull_theta

float Trk::PerigeeParametersNtupleTool::m_mc_pull_theta
private

parameter-pull for theta UNIT:1

Definition at line 102 of file PerigeeParametersNtupleTool.h.

◆ m_mc_pull_z0

float Trk::PerigeeParametersNtupleTool::m_mc_pull_z0
private

parameter-pull for z0 UNIT:1

Definition at line 100 of file PerigeeParametersNtupleTool.h.

◆ m_mc_qOverP

float Trk::PerigeeParametersNtupleTool::m_mc_qOverP
private

matched MC-truth track params: curvature q/p at perigee UNIT:1/MeV

Definition at line 89 of file PerigeeParametersNtupleTool.h.

◆ m_mc_qOverPt

float Trk::PerigeeParametersNtupleTool::m_mc_qOverPt
private

matched MC-truth track params: projected curvature q/pT at perigee UNIT:1/MeV

Definition at line 90 of file PerigeeParametersNtupleTool.h.

◆ m_mc_theta

float Trk::PerigeeParametersNtupleTool::m_mc_theta
private

matched MC-truth track params: angle theta at perigee UNIT:rad

Definition at line 88 of file PerigeeParametersNtupleTool.h.

◆ m_mc_truthTreeIndex

int Trk::PerigeeParametersNtupleTool::m_mc_truthTreeIndex
private

entry index linking to 'Truth' tree in ntuple

Definition at line 107 of file PerigeeParametersNtupleTool.h.

◆ m_mc_uniqueID

int Trk::PerigeeParametersNtupleTool::m_mc_uniqueID
private

unique ID for matched truth track

Definition at line 106 of file PerigeeParametersNtupleTool.h.

◆ m_mc_z0

float Trk::PerigeeParametersNtupleTool::m_mc_z0
private

matched MC-truth track params: local z0 at perigee UNIT:mm

Definition at line 86 of file PerigeeParametersNtupleTool.h.

◆ m_Rec_d0

float Trk::PerigeeParametersNtupleTool::m_Rec_d0
private

reconstructed track params: local d0 at perigee UNIT:mm

Definition at line 71 of file PerigeeParametersNtupleTool.h.

◆ m_Rec_eta

float Trk::PerigeeParametersNtupleTool::m_Rec_eta
private

reconstructed track params: pseudorapidity UNIT:1

Definition at line 75 of file PerigeeParametersNtupleTool.h.

◆ m_Rec_phi0

float Trk::PerigeeParametersNtupleTool::m_Rec_phi0
private

reconstructed track params: angle phi at perigee UNIT:rad

Definition at line 73 of file PerigeeParametersNtupleTool.h.

◆ m_Rec_qOverP

float Trk::PerigeeParametersNtupleTool::m_Rec_qOverP
private

reconstructed track params: curvature q/p UNIT:1/MeV

Definition at line 76 of file PerigeeParametersNtupleTool.h.

◆ m_Rec_theta

float Trk::PerigeeParametersNtupleTool::m_Rec_theta
private

reconstructed track params: angle theta at perigee UNIT:rad

Definition at line 74 of file PerigeeParametersNtupleTool.h.

◆ m_Rec_z0

float Trk::PerigeeParametersNtupleTool::m_Rec_z0
private

reconstructed track params: local z0 at perigee UNIT:mm

Definition at line 72 of file PerigeeParametersNtupleTool.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files: