ATLAS Offline Software
TRT_ElectronPidToolRun2.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 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{nullptr}; // TRT ID helper (identifying barrel/wheels and global position)
136  UnsignedIntegerProperty m_minTRThits{this, "MinimumTRThitsForIDpid", 5,
137  "Minimum number of TRT hits to give PID"};
138  FloatProperty m_ptMinNN{this, "MinimumTrackPtForNNPid", 2000.,
139  "Minimum track pt to calculate NN response for PID"};
140  BooleanProperty m_calculateNN{this, "CalculateNNPid", true,
141  "Decide whether to use NN PID"};
142 
143  ToolHandle<ITRT_ToT_dEdx> m_TRTdEdxTool{ this,
144  "TRT_ToT_dEdx_Tool",
145  {},
146  "TRT ToT dEdx Tool"};
147  ToolHandle<InDet::ITRT_LocalOccupancy> m_LocalOccTool{
148  this,
149  "TRT_LocalOccupancyTool",
150  {},
151  "TRT Local occupancy tool"
152  };
153  ToolHandle<ITRT_StrawStatusSummaryTool> m_TRTStrawSummaryTool{
154  this,
155  "TRTStrawSummaryTool",
156  "InDetTRTStrawStatusSummaryTool",
157  "TRT straw summary tool"
158  };
159 
161  "HTcalculator",
162  "HTcalculator",
163  "HTcalculator in-key" };
164 
166  "TRTPIDNN",
167  "TRTPIDNN",
168  "TRTPIDNN in-key" };
169  };
170 } // end of namespace
171 
172 #endif
InDet::TRT_ElectronPidToolRun2::m_HTReadKey
SG::ReadCondHandleKey< HTcalculator > m_HTReadKey
Definition: TRT_ElectronPidToolRun2.h:160
InDet::TRT_ElectronPidToolRun2::~TRT_ElectronPidToolRun2
virtual ~TRT_ElectronPidToolRun2()
default destructor
LArNewCalib_Delay_OFC_Cali.BEC
BEC
Definition: LArNewCalib_Delay_OFC_Cali.py:118
ITRT_ElectronPidTool.h
InDet::TRT_ElectronPidToolRun2::m_TRTdEdxTool
ToolHandle< ITRT_ToT_dEdx > m_TRTdEdxTool
Definition: TRT_ElectronPidToolRun2.h:143
Trk::Track
The ATLAS Track class.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
TRTPIDNN.h
ITRT_LocalOccupancy
InDet
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
InDet::TRT_ElectronPidToolRun2::m_minTRThits
UnsignedIntegerProperty m_minTRThits
Definition: TRT_ElectronPidToolRun2.h:136
ITRT_ElectronToTTool.h
InDet::TRT_ElectronPidToolRun2::finalize
virtual StatusCode finalize() override
standard Athena-Algorithm method
Definition: TRT_ElectronPidToolRun2.cxx:115
InDet::TRT_ElectronPidToolRun2::m_calculateNN
BooleanProperty m_calculateNN
Definition: TRT_ElectronPidToolRun2.h:140
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:87
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:165
AthAlgTool.h
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:153
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:137
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:615
InDet::TRT_ElectronPidToolRun2::electronProbability_old
static std::vector< float > electronProbability_old(const Trk::Track &track)
Electron probabilities to be returned.
Definition: TRT_ElectronPidToolRun2.cxx:122
InDet::TRT_ElectronPidToolRun2::m_LocalOccTool
ToolHandle< InDet::ITRT_LocalOccupancy > m_LocalOccTool
Definition: TRT_ElectronPidToolRun2.h:147
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:552
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:599
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
Identifier
Definition: IdentifierFieldParser.cxx:14
InDet::TRT_ElectronPidToolRun2::m_ptMinNN
FloatProperty m_ptMinNN
Definition: TRT_ElectronPidToolRun2.h:138