ATLAS Offline Software
TrackInformationNtupleTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // BasicValidationNtupleTool.h
7 // Header file for BasicValidationNtupleTool
9 // (c) ATLAS Detector software
11 // Sebastian.Fleischmann -at- cern.ch, Wolfgang.Liebig -at- cern.ch
13 #ifndef TRK_TRACKINFONTUPLETOOL_H
14 #define TRK_TRACKINFONTUPLETOOL_H
15 
20 
21 namespace Trk {
22 
23 class TrackInfo;
24 
38 public:
39 
40  // standard AlgToolmethods
41  TrackInformationNtupleTool(const std::string&,const std::string&,const IInterface*);
43 
44  // standard Athena methods
47 
51  virtual StatusCode addNtupleItems ( TTree* tree );
52 
55  virtual StatusCode fillTrackData (
56  const Trk::Track&,
57  const int iterationIndex,
58  const unsigned int fitStatCode );
59 
63 
66  const TrackTruth&,
67  const int);
68 
70  virtual void resetVariables( );
71 
72 private:
73 
74  // attempts to assign a clear seed based on the hierarchy of pattern algs
75  int getSeed(const Trk::TrackInfo& info) const;
76 
78  unsigned int m_lastEventNumber;
79 
80  // --- ntuple variables, doxygen comments are also basis for wiki texts ---
83  int m_TrackID;
90  int m_ndof;
91  int m_nHits;
92 
93  SG::ReadHandleKey<xAOD::EventInfo> m_evt {this, "EvtInfo", "EventInfo", "EventInfo name"};
94 };
95 
96 
97 } // end of namespace
98 
100  const TrackTruth&,
101  const int )
102 {return StatusCode::SUCCESS;}
103 
104 
105 #endif // TRK_TRACKINFONTUPLETOOL_H
grepfile.info
info
Definition: grepfile.py:38
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
Trk::TrackInformationNtupleTool::initialize
StatusCode initialize()
Definition: TrackInformationNtupleTool.cxx:55
Trk::TrackInformationNtupleTool::m_fitStatusCode
int m_fitStatusCode
return status code of the track fitter (for fit debugging)
Definition: TrackInformationNtupleTool.h:85
Trk::TrackInfo
Contains information about the 'fitter' of this track.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/TrackInfo.h:32
Trk::TrackInformationNtupleTool::fillTrackParticleData
virtual StatusCode fillTrackParticleData(const Trk::TrackParticleBase &)
fill ntuple data of a given TrackParticle without writing the record.
Definition: TrackInformationNtupleTool.cxx:170
Trk::Track
The ATLAS Track class.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
Trk::TrackInformationNtupleTool::addNtupleItems
virtual StatusCode addNtupleItems(TTree *tree)
add branches to the tree Should be called once (per track collection and tree) dunring the initialisa...
Definition: TrackInformationNtupleTool.cxx:70
tree
TChain * tree
Definition: tile_monitor.h:30
Trk::TrackInformationNtupleTool::TrackInformationNtupleTool
TrackInformationNtupleTool(const std::string &, const std::string &, const IInterface *)
Definition: TrackInformationNtupleTool.cxx:25
Trk::TrackInformationNtupleTool::fillTrackTruthData
virtual StatusCode fillTrackTruthData(const TrackParameters *&, const TrackTruth &, const int)
fill data about the truth match (score, parameter-pulls etc)
Definition: TrackInformationNtupleTool.h:99
Trk::TrackInformationNtupleTool::finalize
StatusCode finalize()
Definition: TrackInformationNtupleTool.cxx:64
SG::ReadHandleKey< xAOD::EventInfo >
Trk::ITrackValidationNtupleTool
Definition: ITrackValidationNtupleTool.h:38
Trk::TrackInformationNtupleTool::m_nHits
int m_nHits
number of measurements on the track (including outliers)
Definition: TrackInformationNtupleTool.h:91
Trk::TrackParticleBase
Definition: TrackParticleBase.h:41
Trk::TrackInformationNtupleTool::m_trackSeedAuthor
int m_trackSeedAuthor
author (main seed finder) of the current track.
Definition: TrackInformationNtupleTool.h:87
Trk::TrackInformationNtupleTool::resetVariables
virtual void resetVariables()
reset the variables after writing the record to disk ntuple
Definition: TrackInformationNtupleTool.cxx:226
Trk::TrackInformationNtupleTool::m_iterIndex
int m_iterIndex
iteration index of the track (for DAF & internal call, EDM tracks always 0)
Definition: TrackInformationNtupleTool.h:84
Trk::TrackInformationNtupleTool::m_runNumber
int m_runNumber
run number the track belongs to
Definition: TrackInformationNtupleTool.h:81
Trk::TrackInformationNtupleTool::m_TrackID
int m_TrackID
number of the track within the current event
Definition: TrackInformationNtupleTool.h:83
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
Trk::TrackInformationNtupleTool
Definition: TrackInformationNtupleTool.h:37
Trk::ParametersBase
Definition: ParametersBase.h:55
Trk::TrackInformationNtupleTool::m_ndof
int m_ndof
number of degrees of freedom of track fit
Definition: TrackInformationNtupleTool.h:90
Trk::TrackInformationNtupleTool::fillTrackData
virtual StatusCode fillTrackData(const Trk::Track &, const int iterationIndex, const unsigned int fitStatCode)
fill ntuple data of a given track without writing the record.
Definition: TrackInformationNtupleTool.cxx:95
Trk::TrackInformationNtupleTool::m_particleHypothesis
int m_particleHypothesis
particle hypothesis with which track was fitted
Definition: TrackInformationNtupleTool.h:88
Trk::TrackInformationNtupleTool::m_lastEventNumber
unsigned int m_lastEventNumber
Definition: TrackInformationNtupleTool.h:78
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
ITrackValidationNtupleTool.h
Trk::TrackInformationNtupleTool::~TrackInformationNtupleTool
~TrackInformationNtupleTool()
Trk::TrackInformationNtupleTool::getSeed
int getSeed(const Trk::TrackInfo &info) const
Definition: TrackInformationNtupleTool.cxx:232
EventInfo.h
Trk::TrackInformationNtupleTool::m_TrackIDcounter
int m_TrackIDcounter
Definition: TrackInformationNtupleTool.h:77
TrackTruth
MC particle associated with a reco track + the quality of match.
Definition: TrackTruth.h:14
Trk::TrackInformationNtupleTool::m_evt
SG::ReadHandleKey< xAOD::EventInfo > m_evt
Definition: TrackInformationNtupleTool.h:93
Trk::TrackInformationNtupleTool::m_eventNumber
int m_eventNumber
event number the track belongs to
Definition: TrackInformationNtupleTool.h:82
AthAlgTool
Definition: AthAlgTool.h:26
Trk::TrackInformationNtupleTool::m_trackFitAuthor
int m_trackFitAuthor
author (fitter) of the current track
Definition: TrackInformationNtupleTool.h:86
Trk::TrackInformationNtupleTool::m_Rec_chi2overNdof
float m_Rec_chi2overNdof
chi2 / n.d.o.f of reconstructed track
Definition: TrackInformationNtupleTool.h:89