ATLAS Offline Software
TRT_ElectronPidToolRun2.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 // TRT_ElectronPidToolRun2.h, (c) ATLAS Detector software
8 
9 #ifndef INDETTRT_ELECTRONPIDTOOLRUN2_H
10 #define INDETTRT_ELECTRONPIDTOOLRUN2_H
11 
12 #include "AthenaBaseComps/AthAlgTool.h" // Exchange IN
13 
14 #include "GaudiKernel/ITHistSvc.h"
15 #include "GaudiKernel/ToolHandle.h"
17 
23 
25 
27 
28 
29 #include <vector>
30 #include <string>
31 
32 class AtlasDetectorID;
33 class Identifier;
34 class TRT_ID;
35 namespace InDetDD{ class TRT_DetectorManager; }
36 
37 namespace InDet{
38  class ITRT_LocalOccupancy;
39 }
40 
41 class ITRT_StrawSummaryTool;
42 
43 class ITRT_ToT_dEdx;
44 
45 namespace Trk {
46  class Track;
47 }
48 
49 namespace InDet
50 {
51 
86  class TRT_ElectronPidToolRun2;
87 
89  {
91  //Athena specific, called externally:
92  public:
93  TRT_ElectronPidToolRun2(const std::string&,const std::string&,const IInterface*);
94 
97 
99  virtual StatusCode initialize() override;
100 
102  virtual StatusCode finalize() override;
103 
105  virtual std::vector<float> electronProbability(
106  const EventContext& ctx,
107  const Trk::Track& track) const override final;
108 
110  static std::vector<float> electronProbability_old(const Trk::Track& track);
111 
112  virtual double probHT(const double pTrk,
113  const Trk::ParticleHypothesis hypothesis,
114  const int HitPart,
115  const int Layer,
116  const int Strawlayer) const override final;
117 
118  virtual double probHTRun2(const EventContext& ctx,
119  float pTrk,
120  Trk::ParticleHypothesis hypothesis,
121  int TrtPart,
122  int GasType,
123  int StrawLayer,
124  float ZR,
125  float rTrkWire,
126  float Occupancy) const override final;
127 
128  private:
129 
130  //Check valid TRT straw:
131  bool CheckGeometry(int BEC, int Layer, int Strawlayer) const;
132 
133  double inline sqr(double a) {return a*a;}
134 
135  const TRT_ID* m_trtId; // TRT ID helper (identifying barrel/wheels and global position)
136  unsigned int m_minTRThits; // Minimum number of TRT hits to give PID.
137  float m_ptMinNN; // Minimum track pt to calculate NN response for PID
138  bool m_calculateNN; // Decide whether to use NN PID
139 
140  ToolHandle<ITRT_ToT_dEdx> m_TRTdEdxTool{ this,
141  "TRT_ToT_dEdx_Tool",
142  {},
143  "TRT ToT dEdx Tool"};
144  ToolHandle<InDet::ITRT_LocalOccupancy> m_LocalOccTool{
145  this,
146  "TRT_LocalOccupancyTool",
147  {},
148  "TRT Local occupancy tool"
149  };
150  ToolHandle<ITRT_StrawStatusSummaryTool> m_TRTStrawSummaryTool{
151  this,
152  "TRTStrawSummaryTool",
153  "InDetTRTStrawStatusSummaryTool",
154  "TRT straw summary tool"
155  };
156 
158  "HTcalculator",
159  "HTcalculator",
160  "HTcalculator in-key" };
161 
163  "TRTPIDNN",
164  "TRTPIDNN",
165  "TRTPIDNN in-key" };
166  };
167 } // end of namespace
168 
169 #endif
InDet::TRT_ElectronPidToolRun2::m_HTReadKey
SG::ReadCondHandleKey< HTcalculator > m_HTReadKey
Definition: TRT_ElectronPidToolRun2.h:157
InDet::TRT_ElectronPidToolRun2::~TRT_ElectronPidToolRun2
virtual ~TRT_ElectronPidToolRun2()
default destructor
LArNewCalib_Delay_OFC_Cali.BEC
BEC
Definition: LArNewCalib_Delay_OFC_Cali.py:115
ITRT_ElectronPidTool.h
InDet::TRT_ElectronPidToolRun2::m_TRTdEdxTool
ToolHandle< ITRT_ToT_dEdx > m_TRTdEdxTool
Definition: TRT_ElectronPidToolRun2.h:140
Trk::Track
The ATLAS Track class.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
TRTPIDNN.h
ITRT_LocalOccupancy
InDet
DUMMY Primary Vertex Finder.
Definition: VP1ErrorUtils.h:36
Trk::ITRT_ElectronPidTool
abstract interface for identification of electrons based on information from the inner detector track...
Definition: ITRT_ElectronPidTool.h:33
HTcalculator.h
ITRT_ElectronToTTool.h
InDet::TRT_ElectronPidToolRun2::finalize
virtual StatusCode finalize() override
standard Athena-Algorithm method
Definition: TRT_ElectronPidToolRun2.cxx:122
InDet::TRT_ElectronPidToolRun2::m_ptMinNN
float m_ptMinNN
Definition: TRT_ElectronPidToolRun2.h:137
InDet::TRT_ElectronPidToolRun2::m_trtId
const TRT_ID * m_trtId
Definition: TRT_ElectronPidToolRun2.h:135
ITRT_LocalOccupancy.h
ITRT_ElectronToTTool
Definition: ITRT_ElectronToTTool.h:17
python.RingerConstants.Layer
Layer
Definition: RingerConstants.py:42
Trk::ParticleHypothesis
ParticleHypothesis
Definition: ParticleHypothesis.h:25
InDet::TRT_ElectronPidToolRun2::sqr
double sqr(double a)
Definition: TRT_ElectronPidToolRun2.h:133
ITRT_StrawStatusSummaryTool.h
abstract interface to TRT straw status constants
InDet::TRT_ElectronPidToolRun2::initialize
virtual StatusCode initialize() override
standard Athena-Algorithm method
Definition: TRT_ElectronPidToolRun2.cxx:94
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
InDet::TRT_ElectronPidToolRun2::m_TRTPIDNNReadKey
SG::ReadCondHandleKey< InDet::TRTPIDNN > m_TRTPIDNNReadKey
Definition: TRT_ElectronPidToolRun2.h:162
AthAlgTool.h
InDet::TRT_ElectronPidToolRun2::m_minTRThits
unsigned int m_minTRThits
Definition: TRT_ElectronPidToolRun2.h:136
InDet::TRT_ElectronPidToolRun2::TRT_ElectronPidToolRun2
TRT_ElectronPidToolRun2(const std::string &, const std::string &, const IInterface *)
Definition: TRT_ElectronPidToolRun2.cxx:67
InDet::TRT_ElectronPidToolRun2::m_TRTStrawSummaryTool
ToolHandle< ITRT_StrawStatusSummaryTool > m_TRTStrawSummaryTool
Definition: TRT_ElectronPidToolRun2.h:150
InDet::TRT_ElectronPidToolRun2
Definition: TRT_ElectronPidToolRun2.h:89
ParticleHypothesis.h
InDet::TRT_ElectronPidToolRun2::electronProbability
virtual std::vector< float > electronProbability(const EventContext &ctx, const Trk::Track &track) const override final
Electron probabilities to be returned.
Definition: TRT_ElectronPidToolRun2.cxx:144
ReadCondHandleKey.h
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
InDet::TRT_ElectronPidToolRun2::probHTRun2
virtual double probHTRun2(const EventContext &ctx, float pTrk, Trk::ParticleHypothesis hypothesis, int TrtPart, int GasType, int StrawLayer, float ZR, float rTrkWire, float Occupancy) const override final
Definition: TRT_ElectronPidToolRun2.cxx:622
InDet::TRT_ElectronPidToolRun2::electronProbability_old
static std::vector< float > electronProbability_old(const Trk::Track &track)
Electron probabilities to be returned.
Definition: TRT_ElectronPidToolRun2.cxx:129
InDet::TRT_ElectronPidToolRun2::m_LocalOccTool
ToolHandle< InDet::ITRT_LocalOccupancy > m_LocalOccTool
Definition: TRT_ElectronPidToolRun2.h:144
ITRT_ToT_dEdx
Definition: ITRT_ToT_dEdx.h:21
SG::ReadCondHandleKey< HTcalculator >
TRT_ID
Definition: TRT_ID.h:84
a
TList * a
Definition: liststreamerinfos.cxx:10
InDetDD
Message Stream Member.
Definition: FakeTrackBuilder.h:8
InDet::TRT_ElectronPidToolRun2::CheckGeometry
bool CheckGeometry(int BEC, int Layer, int Strawlayer) const
Definition: TRT_ElectronPidToolRun2.cxx:559
Track
Definition: TriggerChamberClusterOnTrackCreator.h:21
InDet::TRT_ElectronPidToolRun2::probHT
virtual double probHT(const double pTrk, const Trk::ParticleHypothesis hypothesis, const int HitPart, const int Layer, const int Strawlayer) const override final
return high threshold probability
Definition: TRT_ElectronPidToolRun2.cxx:606
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
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
InDet::TRT_ElectronPidToolRun2::m_calculateNN
bool m_calculateNN
Definition: TRT_ElectronPidToolRun2.h:138