ATLAS Offline Software
FillAlignTRTHits.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_CALIBTOOLS__FILLALIGNTRTHITS_H
6 #define TRT_CALIBTOOLS__FILLALIGNTRTHITS_H
7 /********************************************************************
8 
9 NAME: FillAlignTRTHits
10 PACKAGE: TRT_AlignTOOLS
11 
12 AUTHORS: Jorgen Beck Hansen
13 CREATED: December 2005
14 
15 PURPOSE: Tool to fill Hit info into the TRT::Hit messenger class
16 
17 ********************************************************************/
18 
19 // INCLUDES:
20 
21 #include <string>
28 #include "GaudiKernel/ToolHandle.h"
29 #include "GaudiKernel/ServiceHandle.h"
31 #include <TNtuple.h>
32 #include <TFile.h>
34 
35 // Gaudi includes
36 #include "Gaudi/Property.h"
37 
38 
39 class AtlasDetectorID;
40 class TRT_ID;
41 
42 namespace Trk {
43  class IPropagator;
44  class RIO_OnTrack;
45  class Track;
46  class TrackStateOnSurface;
47  class ITruthToTrack;
48  class IResidualPullCalculator;
49  }
50 
51 class FillAlignTRTHits : virtual public IFillAlignTrkInfo, public AthAlgTool {
52 public:
53 
54  FillAlignTRTHits(const std::string& type, const std::string& name, const IInterface* parent);
55 
56  virtual ~FillAlignTRTHits() {}
57 
58  virtual StatusCode initialize();
59  virtual StatusCode finalize();
60 
61  //virtual bool fill(const Trk::Track* aTrack, TRT::TrackInfo* output) const;
62  virtual bool fill(const Trk::Track* aTrack, TRT::TrackInfo* output, const xAOD::EventInfo& eventInfo,
63  const xAOD::VertexContainer& vertices);
64 
65 private:
67  const TRT_ID* m_TRTID;
68 
69  ToolHandle< ITRT_DriftFunctionTool > m_driftFunctionTool {this, "TRTDriftFunctionTool", "TRT_DriftFunctionTool", "Drift function tool name"};
70  ToolHandle<Trk::IUpdator> m_updatorHandle {this, "UpdatorTool" , "Trk::KalmanUpdator/TrkKalmanUpdator", "Measurement updator to calculate unbiased track states"};
71  ToolHandle<ITRT_CalDbTool> m_trtcaldbTool {this, "TRTCalDbTool", "CalDbTool", "Access to the folder of the calibration constants"};
72  ServiceHandle<ITRT_StrawNeighbourSvc> m_neighbourSvc {this, "NeighbourSvc", "NeighbourSvc", ""};
73  ToolHandle<ITRT_StrawStatusSummaryTool> m_TRTStrawSummaryTool {this, "TRTStrawSummaryTool", "InDetTRTStrawStatusSummaryTool", ""};
74 
76 
77  Gaudi::Property<std::string> m_ntupleName {this, "NtupleName" , "basic.root", "Changes the name of the ntuple Output"};
78 
79  float m_maxDistance ;
83  unsigned int m_numOfHitsTotal ;
84  unsigned int m_numOfHitsAccepted ;
85  unsigned int m_numOfProcessedTracks ;
87 
88  TFile* m_f;
89  TNtuple* m_ntuple;
90 };
91 
92 #endif // TRT_CALIBTOOLS__FILLALIGNTRTHITS_H
FillAlignTRTHits::m_ntuple
TNtuple * m_ntuple
Definition: FillAlignTRTHits.h:89
FillAlignTRTHits::m_f
TFile * m_f
Definition: FillAlignTRTHits.h:88
FillAlignTRTHits::m_DoMCCosmicTimeShift
float m_DoMCCosmicTimeShift
Definition: FillAlignTRTHits.h:86
FillAlignTRTHits
Definition: FillAlignTRTHits.h:51
Trk::Track
The ATLAS Track class.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
FillAlignTRTHits::m_numOfProcessedTracks
unsigned int m_numOfProcessedTracks
Definition: FillAlignTRTHits.h:85
FillAlignTRTHits::m_numOfHitsAccepted
unsigned int m_numOfHitsAccepted
Definition: FillAlignTRTHits.h:84
FillAlignTRTHits::m_updator
Trk::IUpdator * m_updator
updator for unbiased states
Definition: FillAlignTRTHits.h:75
FillAlignTRTHits::m_DetID
const AtlasDetectorID * m_DetID
Definition: FillAlignTRTHits.h:66
FillAlignTRTHits::m_trtcaldbTool
ToolHandle< ITRT_CalDbTool > m_trtcaldbTool
Definition: FillAlignTRTHits.h:71
ITRT_DriftCircleTool.h
FillAlignTRTHits::m_neighbourSvc
ServiceHandle< ITRT_StrawNeighbourSvc > m_neighbourSvc
Definition: FillAlignTRTHits.h:72
FillAlignTRTHits::fill
virtual bool fill(const Trk::Track *aTrack, TRT::TrackInfo *output, const xAOD::EventInfo &eventInfo, const xAOD::VertexContainer &vertices)
Definition: FillAlignTRTHits.cxx:137
TRT::TrackInfo
Definition: InnerDetector/InDetCalibEvent/TRT_CalibData/TRT_CalibData/TrackInfo.h:83
FillAlignTRTHits::FillAlignTRTHits
FillAlignTRTHits(const std::string &type, const std::string &name, const IInterface *parent)
Definition: FillAlignTRTHits.cxx:40
FillAlignTRTHits::m_driftFunctionTool
ToolHandle< ITRT_DriftFunctionTool > m_driftFunctionTool
Definition: FillAlignTRTHits.h:69
IUpdator.h
FillAlignTRTHits::m_TRTID
const TRT_ID * m_TRTID
Definition: FillAlignTRTHits.h:67
FillAlignTRTHits::m_maxTrackChisquarePerDof
float m_maxTrackChisquarePerDof
Definition: FillAlignTRTHits.h:82
ITRT_StrawStatusSummaryTool.h
abstract interface to TRT straw status constants
FillAlignTRTHits::finalize
virtual StatusCode finalize()
Definition: FillAlignTRTHits.cxx:127
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
FillAlignTRTHits::m_TRTStrawSummaryTool
ToolHandle< ITRT_StrawStatusSummaryTool > m_TRTStrawSummaryTool
Definition: FillAlignTRTHits.h:73
AthAlgTool.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ITRT_CalDbTool.h
abstract interface to TRT calibration constants
IFillAlignTrkInfo
Definition: IFillAlignTrkInfo.h:35
FillAlignTRTHits::initialize
virtual StatusCode initialize()
Definition: FillAlignTRTHits.cxx:68
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
merge.output
output
Definition: merge.py:17
FillAlignTRTHits::m_numOfHitsTotal
unsigned int m_numOfHitsTotal
Definition: FillAlignTRTHits.h:83
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
ITRT_DriftFunctionTool.h
FillAlignTRTHits::m_maxDistance
float m_maxDistance
Definition: FillAlignTRTHits.h:79
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
Trk::IUpdator
Set of interfaces for methods operating on track states, mainly for Kalman filtering.
Definition: IUpdator.h:64
Trk::MeasurementBaseType::RIO_OnTrack
@ RIO_OnTrack
Definition: MeasurementBase.h:49
xAOD::EventInfo_v1
Class describing the basic event information.
Definition: EventInfo_v1.h:43
ITRT_StrawNeighbourSvc.h
Abstract interface to information on straws electronic grouping.
FillAlignTRTHits::m_ntupleName
Gaudi::Property< std::string > m_ntupleName
Definition: FillAlignTRTHits.h:77
TRT_ID
Definition: TRT_ID.h:84
FillAlignTRTHits::m_maxTimeResidual
float m_maxTimeResidual
Definition: FillAlignTRTHits.h:80
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
Track
Definition: TriggerChamberClusterOnTrackCreator.h:21
FillAlignTRTHits::m_minTimebinsOverThreshold
int m_minTimebinsOverThreshold
Definition: FillAlignTRTHits.h:81
FillAlignTRTHits::m_updatorHandle
ToolHandle< Trk::IUpdator > m_updatorHandle
Definition: FillAlignTRTHits.h:70
FillAlignTRTHits::~FillAlignTRTHits
virtual ~FillAlignTRTHits()
Definition: FillAlignTRTHits.h:56
AthAlgTool
Definition: AthAlgTool.h:26
IFillAlignTrkInfo.h
AtlasDetectorID
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
Definition: AtlasDetectorID.h:57
ServiceHandle< ITRT_StrawNeighbourSvc >