ATLAS Offline Software
TrackRetriever.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef JIVEXML_TRACKRETRIEVER_H
6 #define JIVEXML_TRACKRETRIEVER_H
7 
8 #include "GaudiKernel/ToolHandle.h"
10 #include "JiveXML/IDataRetriever.h"
12 #include "GaudiKernel/ToolHandle.h"
17 
18 //Forward declarations
19 class AtlasDetectorID;
20 
21 namespace JiveXML{
22 
63  class TrackRetriever : virtual public IDataRetriever,
64  public AthAlgTool {
65 
66  public:
67 
69  TrackRetriever(const std::string& type,const std::string& name,const IInterface* parent);
70 
71  virtual StatusCode retrieve(ToolHandle<IFormatTool> &FormatTool);
73  const DataMap getData(const TrackCollection* trackCollection, const std::string &collectionName);
75  const std::vector<std::string> getKeys();
77  virtual std::string dataTypeName() const { return m_typeName; };
78 
81 
82  private:
84  const std::string m_typeName = "Track";
85 
86  Gaudi::Property<std::string> m_priorityKey {this,"PriorityTrackCollection","CombinedInDetTracks", "First track collections to retrieve, shown as default in Atlantis"};
87  Gaudi::Property<std::vector<std::string>> m_otherKeys {this, "OtherTrackCollections", {}, "Track collections to retrieve, all if empty"};
88  Gaudi::Property<bool> m_doWriteHLT {this, "DoWriteHLT", false, "Write out other collections that have HLT in the name"};
89  Gaudi::Property<bool> m_doWriteAllCollections {this, "DoWriteAllCollections", false, "Write out all Track collections"};
90  Gaudi::Property<std::string> m_TrackTruthCollection {this, "TrackTruthColName", "TrackTruthCollection", "Track collection from which to retrieve the truth associations for the priority track collection"};
91  Gaudi::Property<bool> m_doWriteResiduals {this,"DoWriteResiduals", true,"Whether to write TrackResiduals"};
92  Gaudi::Property<bool> m_doHitsSorting {this, "DoHitsSorting", false, "Whether to perform hits TrackStateOnSurfaces (TSoS) sorting"};
93  Gaudi::Property<bool> m_doHitsDetails {this, "DoHitsDetails", true, "Whether to write hits TrackStateOnSurfaces (TSoS) details"};
94 
95  ToolHandle<Trk::IResidualPullCalculator> m_residualPullCalculator {this, "ResidualPullCalculator","Trk::ResidualPullCalculator/ResidualPullCalculator", "ToolHandle to ResidualPullCaclulator" };
96  ToolHandle< Trk::ITrackSummaryTool > m_trackSumTool{this, "TrackSummaryTool", "Trk::TrackSummaryTool/InDetTrackSummaryTool", "Track Summary Tool for number of Pix/SCT/TRT hits"};
97 
100 
101  };
102 
103 }
104 #endif
JiveXML::TrackRetriever::getKeys
const std::vector< std::string > getKeys()
Gets the StoreGate keys for the desired containers.
Definition: TrackRetriever.cxx:626
ITrackSummaryTool.h
JiveXML::TrackRetriever::m_priorityKey
Gaudi::Property< std::string > m_priorityKey
Definition: TrackRetriever.h:86
JiveXML::TrackRetriever::initialize
StatusCode initialize()
Default AthAlgTool methods.
Definition: TrackRetriever.cxx:343
JiveXML::TrackRetriever::m_TrackTruthCollection
Gaudi::Property< std::string > m_TrackTruthCollection
Definition: TrackRetriever.h:90
JiveXML::TrackRetriever::m_doWriteResiduals
Gaudi::Property< bool > m_doWriteResiduals
Definition: TrackRetriever.h:91
JiveXML::TrackRetriever::m_doHitsDetails
Gaudi::Property< bool > m_doHitsDetails
Definition: TrackRetriever.h:93
JiveXML::TrackRetriever::m_otherKeys
Gaudi::Property< std::vector< std::string > > m_otherKeys
Definition: TrackRetriever.h:87
JiveXML::TrackRetriever::m_typeName
const std::string m_typeName
The data type that is generated by this retriever.
Definition: TrackRetriever.h:84
JiveXML::TrackRetriever::retrieve
virtual StatusCode retrieve(ToolHandle< IFormatTool > &FormatTool)
For each track collection retrieve all data.
Definition: TrackRetriever.cxx:365
JiveXML::DataMap
std::map< std::string, DataVect > DataMap
Definition: DataType.h:59
JiveXML::TrackRetriever::m_residualPullCalculator
ToolHandle< Trk::IResidualPullCalculator > m_residualPullCalculator
Definition: TrackRetriever.h:95
python.CaloAddPedShiftConfig.type
type
Definition: CaloAddPedShiftConfig.py:42
JiveXML::TrackRetriever::m_doWriteAllCollections
Gaudi::Property< bool > m_doWriteAllCollections
Definition: TrackRetriever.h:89
TrackTruthCollection.h
JiveXML::TrackRetriever::getData
const DataMap getData(const TrackCollection *trackCollection, const std::string &collectionName)
Puts the variables into a DataMap.
Definition: TrackRetriever.cxx:393
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
TrackCollection.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
JiveXML::IDataRetriever
Interface for all DataRetriever classes, that extract event data from StoreGate and pass them on to a...
Definition: IDataRetriever.h:25
JiveXML::TrackRetriever::m_idHelper
const AtlasDetectorID * m_idHelper
Used to find out the corresponding sub-det from ROT->identify().
Definition: TrackRetriever.h:99
JiveXML::TrackRetriever::m_doWriteHLT
Gaudi::Property< bool > m_doWriteHLT
Definition: TrackRetriever.h:88
DataVector< Trk::Track >
JiveXML
This header is shared inbetween the C-style server thread and the C++ Athena ServerSvc.
Definition: BadLArRetriever.cxx:22
ReadCondHandleKey.h
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
JiveXML::TrackRetriever
Retrieves all Trk::TrackCollection objects.
Definition: TrackRetriever.h:64
JiveXML::TrackRetriever::TrackRetriever
TrackRetriever(const std::string &type, const std::string &name, const IInterface *parent)
Standard Constructor.
Definition: TrackRetriever.cxx:335
JiveXML::TrackRetriever::m_doHitsSorting
Gaudi::Property< bool > m_doHitsSorting
Definition: TrackRetriever.h:92
IResidualPullCalculator.h
JiveXML::TrackRetriever::m_trackSumTool
ToolHandle< Trk::ITrackSummaryTool > m_trackSumTool
Definition: TrackRetriever.h:96
AthAlgTool
Definition: AthAlgTool.h:26
AtlasDetectorID
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
Definition: AtlasDetectorID.h:57
JiveXML::TrackRetriever::dataTypeName
virtual std::string dataTypeName() const
Return the name of the data type that is generated by this retriever.
Definition: TrackRetriever.h:77
IDataRetriever.h