ATLAS Offline Software
TRTCalibrationMgr.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TRT_CALIBALGS_TRTCALIBRATIONMGR_H
6 #define TRT_CALIBALGS_TRTCALIBRATIONMGR_H
7 
9 #include <string>
10 #include <vector>
12 #include "GaudiKernel/ToolHandle.h"
13 #include "GaudiKernel/ServiceHandle.h"
15 #include "StoreGate/DataHandle.h"
19 #include "TrkTrack/Track.h"
29 
30 
31 class IAccumulator;
32 
33 
56 // TRTCalibrator is called by TRTCalibrationMgr and is not thread-safe.
57 // But the job calling TRTCalibrator reconstructs only one event, in order to get access to Athena tools. This job never run multi-threaded.
59 {
60 
61 public:
62  TRTCalibrationMgr(const std::string &name, ISvcLocator *pSvcLocator);
63  ~TRTCalibrationMgr(void);
64 
67 
68  virtual StatusCode initialize(void) override;
69  virtual StatusCode execute(void) override;
70  virtual StatusCode finalize(void) override;
71  StatusCode streamOutCalibObjects();
72 
73 private:
74 
75  // Tools for the algorithm
76  ToolHandleArray<IFillAlignTrkInfo> m_TrackInfoTools {this, "AlignTrkTools", {}, ""};
77  PublicToolHandleArray<ITRTCalibrator> m_TRTCalibTools {this, "TRTCalibrator", {}, ""};
78  ToolHandleArray<IFitTool> m_FitTools {this, "FitTools", {}, ""};
79  ToolHandle<Trk::ITrackFitter> m_trackFitter {this, "TrackFitter", "Trk::GlobalChi2Fitter/InDetTrackFitter", ""};
80  ToolHandle<Trk::ITrackSelectorTool> m_trackSelector {this, "TrackSelectorTool", "InDet::InDetTrackSelectorTool/InDetTrackSelectorTool", "Tool for the selection of tracks"};
81  ToolHandle<IAthenaOutputStreamTool> m_streamer {this, "StreamTool", "AthenaOutputStreamTool/CondStream1", "OutputStreamTool"};
82 
83  // Gaudi properties
84  Gaudi::Property<bool> m_dorefit {this, "DoRefit" , true , "Does a Re-Fit"};
85  Gaudi::Property<bool> m_docalibrate {this, "DoCalibrate" , false, "Does the calibration"};
86  Gaudi::Property<bool> m_writeConstants{this, "WriteConstants", false, "Write out the calibration constants"};
87 
88  Gaudi::Property<unsigned int> m_max_ntrk {this, "Max_ntrk", 100000, ""};
89 
90  Gaudi::Property<std::string> m_par_rtcontainerkey {this, "Par_rtcontainer", "/TRT/Calib/RT", ""};
91  Gaudi::Property<std::string> m_par_t0containerkey {this, "par_t0container", "/TRT/Calib/T0", ""};
92 
93 
94  int m_ntrk = 0;
95 
96  // ReadHandleKeys
97  SG::ReadHandleKey<xAOD::VertexContainer> m_verticesKey {this, "VerticesKey" , "PrimaryVertices" , "RHK for primary vertices" };
98  SG::ReadHandleKey<xAOD::EventInfo> m_EventInfoKey {this, "EventInfoKey" , "EventInfo" , "RHK for xAOD::EventInfo" };
99  SG::ReadHandleKey<TrackCollection> m_TrkCollection {this, "TrkCollectionKey", "CombinedInDetTracks", "RHKs for track collections"};
100 };
101 
102 #endif // TRT_CALIBALGS_TRTCALIBRATIONMGR_H
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
python.tests.PyTestsLib.finalize
def finalize(self)
_info( "content of StoreGate..." ) self.sg.dump()
Definition: PyTestsLib.py:50
ATLAS_NOT_THREAD_SAFE
#define ATLAS_NOT_THREAD_SAFE
getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats
Definition: checker_macros.h:212
initialize
void initialize()
Definition: run_EoverP.cxx:894
TRTCalibrationMgr::StrawT0Container
TRTCond::StrawT0MultChanContainer StrawT0Container
Definition: TRTCalibrationMgr.h:66
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
DataHandle.h
Track.h
LArG4FSStartPointFilterLegacy.execute
execute
Definition: LArG4FSStartPointFilterLegacy.py:20
IAthenaOutputStreamTool.h
Interface to an output stream tool.
AthAlgorithm.h
TrackInfo.h
IFitTool.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
TrackCollection.h
AthAlgorithm
Definition: AthAlgorithm.h:47
TRTCalibrationMgr::RtRelationContainer
TRTCond::RtRelationMultChanContainer RtRelationContainer
Definition: TRTCalibrationMgr.h:65
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
IAccumulator
Definition: IAccumulator.h:37
EventInfo.h
VertexContainer.h
RtRelationMultChanContainer.h
Class for storing/accessing trt rtrelations with channels 1;95;0c.
ITRTCalibrator.h
IFillAlignTrkInfo.h
ITrackSelectorTool.h
checker_macros.h
Define macros for attributes used to control the static checker.
TRTCond::StrawT0MultChanContainer
Definition: StrawT0MultChanContainer.h:31
ITrackFitter.h
StrawT0MultChanContainer.h
TRTCalibrationMgr
Definition: TRTCalibrationMgr.h:59
TRTCond::RtRelationMultChanContainer
Definition: RtRelationMultChanContainer.h:29