ATLAS Offline Software
Loading...
Searching...
No Matches
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
32class AtlasDetectorID;
33class Identifier;
34class TRT_ID;
35namespace InDetDD{ class TRT_DetectorManager; }
36
37namespace InDet{
39}
40
41class ITRT_StrawSummaryTool;
42
43class ITRT_ToT_dEdx;
44
45namespace Trk {
46 class Track;
47}
48
49namespace InDet
50{
51
85
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
abstract interface to TRT straw status constants
static Double_t a
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
The Detector Manager for all TRT Detector elements, it acts as the interface to the detector elements...
TRT_ElectronPidToolRun2 is a tool for identification of electrons based on information mainly from th...
virtual std::vector< float > electronProbability(const EventContext &ctx, const Trk::Track &track) const override final
Electron probabilities to be returned.
ToolHandle< ITRT_ToT_dEdx > m_TRTdEdxTool
static std::vector< float > electronProbability_old(const Trk::Track &track)
Electron probabilities to be returned.
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
ToolHandle< ITRT_StrawStatusSummaryTool > m_TRTStrawSummaryTool
virtual StatusCode initialize() override
standard Athena-Algorithm method
bool CheckGeometry(int BEC, int Layer, int Strawlayer) const
TRT_ElectronPidToolRun2(const std::string &, const std::string &, const IInterface *)
ToolHandle< InDet::ITRT_LocalOccupancy > m_LocalOccTool
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
virtual StatusCode finalize() override
standard Athena-Algorithm method
virtual ~TRT_ElectronPidToolRun2()
default destructor
SG::ReadCondHandleKey< InDet::TRTPIDNN > m_TRTPIDNNReadKey
SG::ReadCondHandleKey< HTcalculator > m_HTReadKey
This is an Identifier helper class for the TRT subdetector.
Definition TRT_ID.h:82
abstract interface for identification of electrons based on information from the inner detector track...
Message Stream Member.
Primary Vertex Finder.
Ensure that the ATLAS eigen extensions are properly loaded.
ParticleHypothesis
Enumeration for Particle hypothesis respecting the interaction with material.