|
ATLAS Offline Software
|
Go to the documentation of this file.
8 #include "GaudiKernel/AlgTool.h"
9 #include "GaudiKernel/ToolHandle.h"
11 #include "GaudiKernel/IToolSvc.h"
62 ,
"averageInteractionsPerCrossingKey"
63 ,
"EventInfo.averageInteractionsPerCrossing"
64 ,
"Decoration for Average Interaction Per Crossing"};
68 {
this,
"TRTStrawSummaryTool",
"TRT_StrawStatusSummaryTool"};
70 ToolHandle< Trk::IPRD_AssociationTool >
m_assoTool{
this,
"AssociationTool",
"InDet::InDetPRD_AssociationToolGangedPixels",
"PRD_AssociationTool"};
71 ToolHandle< InDet::ITRT_LocalOccupancy >
m_localOccTool{
this,
"TRT_LocalOccupancyTool",
"",
"Local occupancy tool"};
76 "If true - make correction using rs-distributions"};
78 "If true - divide ToT to the L of track in straw"};
81 {
this,
"TRT_dEdx_useTrackPartWithGasType",
kUnset,
82 "If kUnset - use any gas for dEdX calculation"};
85 "Algorithm type for dEdX estimator calculation"};
87 {
this,
"TRT_dEdx_correctionType",
kTrackBased,
"Type of dEdx correction"};
99 BooleanProperty
m_isData{
this,
"TRT_dEdx_isData",
true};
103 {
this,
"TRT_dEdx_trackConfig_maxRtrack", 1.85,
"maximum track radius"};
105 {
this,
"TRT_dEdx_trackConfig_minRtrack", 0.15,
"maximum track radius"};
108 "skip tracks with where RHit=0"};
115 TRT_ToT_dEdx(
const std::string&,
const std::string&,
const IInterface*);
131 virtual double dEdx(
const EventContext& ctx,
134 std::optional<float> localOccupancy = std::nullopt)
const override final;
142 virtual double usedHits(
const EventContext& ctx,
144 bool useHThits =
true)
const override final;
155 const double dEdx_obs,
159 int nUsedHits)
const override final;
171 const Trk::TrackStateOnSurface* trackState,
191 const Trk::TrackStateOnSurface* itr,
192 const double dEdx_obs,
195 int nUsedHits)
const;
198 const double dEdx_obs,
201 int nUsedHits)
const;
210 const Trk::TrackStateOnSurface* itr,
226 const Trk::TrackStateOnSurface* itr,
240 const Trk::TrackStateOnSurface* itr,
251 const EventContext& ctx,
287 int StrawLayer)
const;
297 int StrawLayer)
const;
306 int StrawLayer)
const;
332 double radialPosition,
351 int StrawLayer)
const;
359 std::optional<float> localOccupancy)
const;
390 #endif // TRT_TOT_DEDX_H
Property holding a SG store/key/clid from which a ReadHandle is made.
ToolHandle< ITRT_StrawStatusSummaryTool > m_TRTStrawSummaryTool
virtual double usedHits(const EventContext &ctx, const Trk::Track *track, bool useHThits=true) const override final
function to calculate number of used hits
void setMinRtrack(float minRtrack)
bool isGoodHit(const EventContext &ctx, const Trk::TrackStateOnSurface *trackState, bool useHitsHT, double &length) const
function to define what is a good hit to be used for dEdx calculation cuts on track level can be made...
void setStatusCorrection(bool value)
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
double getProb(const EventContext &ctx, const Trk::TrackStateOnSurface *itr, const double dEdx_obs, const double pTrk, Trk::ParticleHypothesis hypothesis, int nUsedHits) const
function to calculate likelihood from prediction and resolution
virtual ~TRT_ToT_dEdx()
Virtual destructor.
double fitFuncBarrelShort_corrRZ(const EventContext &ctx, EGasType gasType, double driftRadius, double zPosition, int StrawLayer) const
function called by fitFuncBarrel_corrRZ for short straws
virtual double getTest(const EventContext &ctx, const double dEdx_obs, const double pTrk, Trk::ParticleHypothesis hypothesis, Trk::ParticleHypothesis antihypothesis, int nUsedHits) const override final
function to calculate likelihood ratio test
virtual double dEdx(const EventContext &ctx, const Trk::Track *track, bool useHThits, std::optional< float > localOccupancy=std::nullopt) const override final
function to calculate sum ToT normalised to number of used hits
virtual double usedHits(const EventContext &ctx, const Trk::Track *track, bool useHitsHT=true) const =0
function to calculate number of used hits
virtual double dEdx(const EventContext &ctx, const Trk::Track *track, bool useHitsHT, std::optional< float > localOccupancy=std::nullopt) const =0
function to calculate sum ToT normalised to number of used hits
double trackOccupancyCorrection(const EventContext &ctx, const Trk::Track *track, bool useHThits, std::optional< float > localOccupancy) const
bool getCorrectionType() const
bool const RAWDATA *ch2 const
bool getStatusCorrection() const
double fitFuncBarrelLong_corrRZ(const EventContext &ctx, EGasType gasType, double driftRadius, double zPosition, int Layer, int StrawLayer) const
function called by fitFuncBarrel_corrRZ for long straws
double correctToT_corrRZ(const EventContext &ctx, const Trk::TrackStateOnSurface *itr, double length) const
main function to correct ToT values on hit level as a function of track radius and z-position
double fitFuncBarrel_corrRZL(const EventContext &ctx, EGasType gasType, double driftRadius, double zPosition, int Layer, int StrawLayer) const
function to compute correction factor in barrel region
double fitFuncBarrel_corrRZ(const EventContext &ctx, EGasType gas, double driftRadius, double zPosition, int Layer, int StrawLayer) const
function to compute correction factor in barrel region
ToolHandle< Trk::IPRD_AssociationTool > m_assoTool
float getMinRtrack() const
::StatusCode StatusCode
StatusCode definition for legacy code.
virtual StatusCode initialize() override
AlgTool initailize method.
virtual double getTest(const EventContext &ctx, const double dEdx_obs, const double pTrk, Trk::ParticleHypothesis hypothesis, Trk::ParticleHypothesis antihypothesis, int nUsedHits) const =0
function to calculate likelihood ratio test
float getMaxRtrack() const
double mass(const EventContext &ctx, const Trk::TrackStateOnSurface *itr, const double pTrk, double dEdx) const
function to extract most likely mass in bg [0,3]
BooleanProperty m_useZeroRHitCut
SG::ReadDecorHandleKey< xAOD::EventInfo > m_rdhkEvtInfo
constexpr std::enable_if_t< is_bitmask_v< E >, E & > set(E &lhs, E rhs)
Convenience function to set bits in a class enum bitmask.
SG::ReadCondHandleKey< TRTDedxcorrection > m_ReadKey
Ensure that the ATLAS eigen extensions are properly loaded.
void setAlgorithm(EstCalc alg)
double fitFuncEndcap_corrRZ(const EventContext &ctx, EGasType gas, double driftRadius, double rPosition, int Layer, int sign) const
function to compute correction factor in endcap region
double predictdEdx(const EventContext &ctx, const Trk::TrackStateOnSurface *itr, const double pTrk, Trk::ParticleHypothesis hypothesis) const
function to calculate expectation value for dEdx using BB fit
represents the track state (measurement, material, fit parameters and quality) at a surface.
void setStatusUseZeroRHitCut(bool value)
double correctNormalization(const EventContext &ctx, double nVtx=-1) const
correct overall dEdx normalization on track level
void setMaxRtrack(float maxRtrack)
static double calculateTrackLengthInStraw(const Trk::TrackStateOnSurface *trackState, const TRT_ID *identifier)
bool getStatusUseZeroRHitCut() const
IntegerProperty m_correctionType
ToolHandle< InDet::ITRT_LocalOccupancy > m_localOccTool
double fitFuncPol_corrRZ(const EventContext &ctx, EGasType gasType, int parameter, double driftRadius, int Layer, int Strawlayer, int sign, int set) const
function called by fitFuncBarrel_corrRZ and fitFuncEndcap_corrRZ
double fitFuncEndcap_corrRZL(const EventContext &ctx, EGasType gasType, double driftRadius, double radialPosition, int Layer, int sign) const
function to compute correction factor in endcap region
void setGasTypeFordEdXCalculation(EGasType gasType)
double hitOccupancyCorrection(const EventContext &ctx, const Trk::TrackStateOnSurface *itr) const
IntegerProperty m_useTrackPartWithGasType
void setCorrectionType(EOccupancyCorrection value)
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
BooleanProperty m_corrected
IntegerProperty m_toolScenario
TRT_ToT_dEdx(const std::string &, const std::string &, const IInterface *)
AlgTool like constructor.
int getGasTypeFordEdXCalculation() const
EGasType gasTypeInStraw(const EventContext &ctx, const Trk::TrackStateOnSurface *itr) const
return gas type for that hit
BooleanProperty m_divideByL
FloatProperty m_trackConfig_minRtrack
unsigned int m_nTrunkateHits
FloatProperty m_trackConfig_maxRtrack