ATLAS Offline Software
Loading...
Searching...
No Matches
TrackValidationNtupleWriter.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
6// TrackValidationNtupleWriter.h, (c) ATLAS Detector software
8
9#ifndef TRK_TRACKVALIDATIONNTUPLEWRITER_H
10#define TRK_TRACKVALIDATIONNTUPLEWRITER_H
11
12// Gaudi includes
14#include "GaudiKernel/ToolHandle.h"
15
19
20class TrackTruth;
21class TTree;
22
24
25namespace Trk {
26
27class Track;
28class ITruthToTrack; // Produces perigee track parameters from generated parameters
39class Vertex;
40
47
49 public:
51 TrackValidationNtupleWriter(const std::string& name, ISvcLocator* pSvcLocator);
54
56 StatusCode initialize();
58 StatusCode execute();
60 StatusCode finalize();
61
62
63protected:
66 //const Trk::TrackParameters* associateTruthToTrack( const Track*, const TrackCollection*, const TrackTruth*& );
67 StatusCode writeTrackData(unsigned int trackColIndex,
68 std::vector<Trk::ValidationTrackTruthData>& truthData,
69 const Trk::Vertex* primaryVertex = NULL);
70
72 StatusCode writeTrackParticleData(unsigned int trackParticleColIndex);
73
74 ToolHandleArray<Trk::ITrackValidationNtupleTool> m_ValidationNtupleTools;
75 ToolHandle<Trk::IValidationNtupleTool> m_ValTrkParticleNtupleTool;
76 ToolHandle<Trk::ITruthNtupleTool> m_truthNtupleTool;
77 ToolHandle<Trk::IJetTruthNtupleTool> m_jetTruthNtupleTool;
78 ToolHandleArray<Trk::ITrackTruthClassifier> m_trackTruthClassifierHandles;
79 std::vector<const Trk::ITrackTruthClassifier*> m_trackTruthClassifiers;
80 ToolHandleArray<Trk::IEventPropertyNtupleTool> m_eventPropertyNtupleHandles;
81 std::vector<Trk::IEventPropertyNtupleTool*> m_eventPropertyNtupleTools;
82
83 std::vector<std::string> m_inputTrackCollection;
84 std::vector<std::string> m_inputTrackParticleCollection;
85 std::vector<std::string> m_trackTruthCollectionName;
88 std::string m_ntupleFileName;
89 std::string m_ntupleDirName;
90
91 ToolHandle<Trk::ITruthToTrack> m_truthToTrack;
92 ToolHandle<Trk::ITrackSelectorTool> m_trackSelector;
93 ToolHandle<Trk::IGenParticleSelector> m_genPartSelector;
94 ToolHandle<Trk::IGenParticleJetFinder> m_genJetFinder;
96 bool m_doTruth;
98
100 std::vector<unsigned int> m_nTrackTreeRecords;
101 std::vector<TTree*> m_trees;
103};
104
105} // close of namespace
106
107#endif // TRK_TRACKVALIDATIONNTUPLEWRITER_H
108
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
MC particle associated with a reco track + the quality of match.
Definition TrackTruth.h:14
provides the interface for validation tools which write special information about the whole event int...
provides the interface for determining truth jets (inside Tracking validation framework)
provides the interface for tools to select generated particles
provides the interface for validation tools which write special information about truth particles int...
The abstract interface base class for track selector tools.
provides the interface for tools which classify gen particles
provides the interface for validation tools which write special information about generated tracks in...
provides the interface for validation tools which write special information about truth particles int...
ITruthToTrack is an interface to create Trk::TrackParameters from a HepMC::GenParticle.
provides the interface for validation tools which write special information about generated tracks in...
std::vector< std::string > m_inputTrackCollection
name of the TrackCollection
bool m_useExternalEventLinkTree
if TVNW should make event tree itself or assume CBNT does
StatusCode writeTrackParticleData(unsigned int trackParticleColIndex)
method to write track particle data to Ntuple.
std::string m_ntupleDirName
jobOption: Ntuple directory name
StatusCode initialize()
standard Athena-Algorithm method
std::vector< unsigned int > m_nTrackTreeRecords
ToolHandle< Trk::IGenParticleSelector > m_genPartSelector
Tool handle to the Trk::IGenParticleSelector.
StatusCode finalize()
standard Athena-Algorithm method
std::vector< TTree * > m_trees
Pointer to the NTuple trees (one for each input track collection)
ToolHandleArray< Trk::ITrackValidationNtupleTool > m_ValidationNtupleTools
set of tools for writing Trk::Track into the Ntuple
std::string m_inputPrimaryVertexCollection
SG key of the input primary vertex collection (used by the track selector)
StatusCode execute()
standard Athena-Algorithm method
TTree * m_eventLinkTree
pointer to event-wise ntuple trees (one for all input track collections + truth)
bool m_doTruth
Switch to turn on / off truth.
StatusCode writeTrackData(unsigned int trackColIndex, std::vector< Trk::ValidationTrackTruthData > &truthData, const Trk::Vertex *primaryVertex=NULL)
< following methods and atributes are used in derived class TrigTrackValidationNtupleWriter Private m...
ToolHandleArray< Trk::ITrackTruthClassifier > m_trackTruthClassifierHandles
jobO: list of truth classifiers
ToolHandle< Trk::ITrackSelectorTool > m_trackSelector
Tool handle to the Trk::ITrackSelectorTool.
ToolHandle< Trk::IValidationNtupleTool > m_ValTrkParticleNtupleTool
Tool for writting Rec::TrackParticle into the Ntuple – OBSOLETE.
std::string m_McEventCollectionName
name of the McEventCollection
std::vector< const Trk::ITrackTruthClassifier * > m_trackTruthClassifiers
the truth classifiers
ToolHandle< Trk::ITruthNtupleTool > m_truthNtupleTool
ToolHandle< Trk::IJetTruthNtupleTool > m_jetTruthNtupleTool
std::vector< Trk::IEventPropertyNtupleTool * > m_eventPropertyNtupleTools
list of event property tools
ToolHandleArray< Trk::IEventPropertyNtupleTool > m_eventPropertyNtupleHandles
jobO: list of event property tools
ToolHandle< Trk::ITruthToTrack > m_truthToTrack
Tool handle to the Trk::TruthToTrack tool.
std::string m_ntupleFileName
jobOption: Ntuple file name
std::vector< std::string > m_trackTruthCollectionName
name of the TrackTruthCollection
~TrackValidationNtupleWriter()
Default Destructor.
HepMC::GenParticlePtr m_visibleParticleWithoutTruth
Switch to turn on/pff recording track particle trees into Ntuple.
std::vector< std::string > m_inputTrackParticleCollection
name of the TrackParticleCollection
ToolHandle< Trk::IGenParticleJetFinder > m_genJetFinder
Tool to find jets.
TrackValidationNtupleWriter(const std::string &name, ISvcLocator *pSvcLocator)
Standard Athena-Algorithm Constructor.
This class is a simplest representation of a vertex candidate.
GenParticle * GenParticlePtr
Definition GenParticle.h:37
Ensure that the ATLAS eigen extensions are properly loaded.