ATLAS Offline Software
DirectTrackNtupleWriterTool.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 // DirectTrackNtupleWriterTool.h
7 // Header file for DirectTrackNtupleWriterTool
9 // (c) ATLAS Detector software
11 // Sebastian.Fleischmann@cern.ch
13 
14 #ifndef TRK_DIRECTTRACKVALIDATIONNTUPLETOOL_H
15 #define TRK_DIRECTTRACKVALIDATIONNTUPLETOOL_H
16 
17 
19 #include "GaudiKernel/ToolHandle.h"
21 
22 class TTree;
23 
24 namespace Trk {
25 
26 class IExtrapolator;
27 class ITrackValidationNtupleTool;
28 class Track;
29 
30 
31 
50 public:
51 
52  // standard AlgToolmethods
53  DirectTrackNtupleWriterTool(const std::string&,const std::string&,const IInterface*);
55 
56  // standard Athena methods
59 
61  virtual StatusCode writeTrackData (
62  const Trk::Track&,
63  const int iterationIndex,
64  const unsigned int fitStatCode );
65 
68 
69 
70 private:
72  StatusCode writeRecord(TTree* tree);
73 
74  ToolHandleArray<Trk::ITrackValidationNtupleTool> m_ValidationNtupleTools;
75  ToolHandle<Trk::IExtrapolator> m_extrapolatorHandle;
76  std::string m_ntupleFileName;
77  std::string m_ntupleDirName;
78  std::string m_ntupleTreeName;
79  TTree* m_nt;
80  bool m_doTruth;
81 };
82 
83 
84 } // end of namespace
85 
86 #endif // TRK_DIRECTTRACKVALIDATIONNTUPLETOOL_H
87 
Trk::DirectTrackNtupleWriterTool::writeTrackData
virtual StatusCode writeTrackData(const Trk::Track &, const int iterationIndex, const unsigned int fitStatCode)
fill AND write ntuple data of a given track
Definition: DirectTrackNtupleWriterTool.cxx:100
Trk::DirectTrackNtupleWriterTool::writeTrackParticleData
virtual StatusCode writeTrackParticleData(const Trk::TrackParticleBase &)
fill AND write ntuple data of a given track particle
Definition: DirectTrackNtupleWriterTool.cxx:125
Trk::Track
The ATLAS Track class.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
tree
TChain * tree
Definition: tile_monitor.h:30
IDirectTrackNtupleWriter.h
Trk::DirectTrackNtupleWriterTool::m_ntupleFileName
std::string m_ntupleFileName
jobOption: Ntuple file name
Definition: DirectTrackNtupleWriterTool.h:76
Trk::TrackParticleBase
Definition: TrackParticleBase.h:41
Trk::DirectTrackNtupleWriterTool::m_nt
TTree * m_nt
Pointer to the NTuple tree.
Definition: DirectTrackNtupleWriterTool.h:79
Trk::DirectTrackNtupleWriterTool::initialize
StatusCode initialize()
Definition: DirectTrackNtupleWriterTool.cxx:55
Trk::DirectTrackNtupleWriterTool::m_doTruth
bool m_doTruth
switch to turn truth on/off
Definition: DirectTrackNtupleWriterTool.h:80
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Trk::DirectTrackNtupleWriterTool::finalize
StatusCode finalize()
finalize
Definition: DirectTrackNtupleWriterTool.cxx:91
Trk::DirectTrackNtupleWriterTool::~DirectTrackNtupleWriterTool
~DirectTrackNtupleWriterTool()
Trk::DirectTrackNtupleWriterTool::m_ntupleTreeName
std::string m_ntupleTreeName
jobOption: Ntuple tree name
Definition: DirectTrackNtupleWriterTool.h:78
Trk::DirectTrackNtupleWriterTool::DirectTrackNtupleWriterTool
DirectTrackNtupleWriterTool(const std::string &, const std::string &, const IInterface *)
Definition: DirectTrackNtupleWriterTool.cxx:25
Trk::IDirectTrackNtupleWriter
Interface to set up and write a TrkValidation ntuple so that it can be called for validation action '...
Definition: IDirectTrackNtupleWriter.h:46
Track
Definition: TriggerChamberClusterOnTrackCreator.h:21
Trk::DirectTrackNtupleWriterTool::m_extrapolatorHandle
ToolHandle< Trk::IExtrapolator > m_extrapolatorHandle
extrapolator, in case tracks do not have Perigee
Definition: DirectTrackNtupleWriterTool.h:75
Trk::DirectTrackNtupleWriterTool::m_ValidationNtupleTools
ToolHandleArray< Trk::ITrackValidationNtupleTool > m_ValidationNtupleTools
set of tools for writting Trk::Track into the Ntuple
Definition: DirectTrackNtupleWriterTool.h:74
Trk::DirectTrackNtupleWriterTool::m_ntupleDirName
std::string m_ntupleDirName
jobOption: Ntuple directory name
Definition: DirectTrackNtupleWriterTool.h:77
AthAlgTool
Definition: AthAlgTool.h:26
Trk::DirectTrackNtupleWriterTool
This validation tool writes basic information about Trk::Track into an ntuple; it is also the steerin...
Definition: DirectTrackNtupleWriterTool.h:49
Trk::DirectTrackNtupleWriterTool::writeRecord
StatusCode writeRecord(TTree *tree)
write the filled data into the ntuple
Definition: DirectTrackNtupleWriterTool.cxx:147