![]() |
ATLAS Offline Software
|
#include <TRT_ToT_dEdx.h>
Public Types | |
| enum | EDataBaseType { kOldDB , kNewDB } |
| enum | EstCalc { kAlgStandard , kAlgReweight , kAlgReweightTrunkOne } |
| enum | EOccupancyCorrection { kRSOnly , kHitBased , kTrackBased , kGlobal } |
| enum | EGasType { kXenon , kArgon , kKrypton , kUnset } |
Public Member Functions | |
| TRT_ToT_dEdx (const std::string &, const std::string &, const IInterface *) | |
| AlgTool like constructor. | |
| virtual | ~TRT_ToT_dEdx () |
| Virtual destructor. | |
| virtual StatusCode | initialize () override |
| AlgTool initailize method. | |
| 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 useHThits=true) const override final |
| function to calculate number of used hits | |
| 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 | |
| void | setStatusCorrection (bool value) |
| bool | getStatusCorrection () const |
| void | setCorrectionType (EOccupancyCorrection value) |
| bool | getCorrectionType () const |
| void | setMinRtrack (float minRtrack) |
| float | getMinRtrack () const |
| void | setMaxRtrack (float maxRtrack) |
| float | getMaxRtrack () const |
| void | setStatusUseZeroRHitCut (bool value) |
| bool | getStatusUseZeroRHitCut () const |
| void | setGasTypeFordEdXCalculation (EGasType gasType) |
| int | getGasTypeFordEdXCalculation () const |
| void | setAlgorithm (EstCalc alg) |
| int | getAlgorithm () const |
| virtual double | dEdx (const Trk::Track *track, bool useHitsHT, std::optional< float > localOccupancy=std::nullopt) const |
| function to calculate sum ToT normalised to number of used hits | |
| virtual double | usedHits (const Trk::Track *track, bool useHitsHT=true) const |
| virtual double | getTest (const double dEdx_obs, const double pTrk, Trk::ParticleHypothesis hypothesis, Trk::ParticleHypothesis antihypothesis, int nUsedHits) const |
| ServiceHandle< StoreGateSvc > & | evtStore () |
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. | |
| const ServiceHandle< StoreGateSvc > & | detStore () const |
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. | |
| virtual StatusCode | sysInitialize () override |
| Perform system initialization for an algorithm. | |
| virtual StatusCode | sysStart () override |
| Handle START transition. | |
| virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. | |
| virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. | |
| Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T, V, H > &t) |
| void | updateVHKA (Gaudi::Details::PropertyBase &) |
| MsgStream & | msg () const |
| bool | msgLvl (const MSG::Level lvl) const |
Static Public Member Functions | |
| static double | calculateTrackLengthInStraw (const Trk::TrackStateOnSurface *trackState, const TRT_ID *identifier) |
| static const InterfaceID & | interfaceID () |
| AlgTool interface methods. | |
Protected Member Functions | |
| 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 latekAlgStandardr by the user. | |
| double | correctNormalization (const EventContext &ctx, double nVtx=-1) const |
| correct overall dEdx normalization on track level | |
| 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 | |
| double | getProb (const EventContext &ctx, EGasType gasType, const double dEdx_obs, const double pTrk, Trk::ParticleHypothesis hypothesis, int nUsedHits) const |
| 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 | |
| double | predictdEdx (const EventContext &ctx, EGasType gasType, const double pTrk, Trk::ParticleHypothesis hypothesis) 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] | |
| 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 | |
| EGasType | gasTypeInStraw (const EventContext &ctx, const Trk::TrackStateOnSurface *itr) const |
| return gas type for that hit | |
| EGasType | gasTypeInStraw (const EventContext &ctx, const InDet::TRT_DriftCircleOnTrack *driftcircle) const |
| void | renounceArray (SG::VarHandleKeyArray &handlesArray) |
| remove all handles from I/O resolution | |
| std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > | renounce (T &h) |
| void | extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps) |
| Add StoreName to extra input/output deps as needed. | |
Private Types | |
| typedef ServiceHandle< StoreGateSvc > | StoreGateSvc_t |
Private Member Functions | |
| 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 | fitFuncBarrel_corrRZ (const EventContext &ctx, EGasType gas, double driftRadius, double zPosition, int Layer, int StrawLayer) const |
| function to compute correction factor in barrel region | |
| 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 | fitFuncBarrelShort_corrRZ (const EventContext &ctx, EGasType gasType, double driftRadius, double zPosition, int StrawLayer) const |
| function called by fitFuncBarrel_corrRZ for short straws | |
| 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 | |
| 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 | hitOccupancyCorrection (const EventContext &ctx, const Trk::TrackStateOnSurface *itr) const |
| double | trackOccupancyCorrection (const EventContext &ctx, const Trk::Track *track, bool useHThits, std::optional< float > localOccupancy) const |
| Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKey> | |
Private Attributes | |
| SG::ReadDecorHandleKey< xAOD::EventInfo > | m_rdhkEvtInfo |
| const TRT_ID * | m_trtId {nullptr} |
| ToolHandle< ITRT_StrawStatusSummaryTool > | m_TRTStrawSummaryTool {this, "TRTStrawSummaryTool", "TRT_StrawStatusSummaryTool"} |
| ToolHandle< Trk::IPRD_AssociationTool > | m_assoTool {this, "AssociationTool","InDet::InDetPRD_AssociationToolGangedPixels","PRD_AssociationTool"} |
| ToolHandle< InDet::ITRT_LocalOccupancy > | m_localOccTool {this, "TRT_LocalOccupancyTool","", "Local occupancy tool"} |
| BooleanProperty | m_corrected |
| BooleanProperty | m_divideByL |
| IntegerProperty | m_useTrackPartWithGasType |
| IntegerProperty | m_toolScenario |
| IntegerProperty | m_correctionType {this, "TRT_dEdx_correctionType", kTrackBased, "Type of dEdx correction"} |
| BooleanProperty | m_isData {this, "TRT_dEdx_isData", true} |
| FloatProperty | m_trackConfig_maxRtrack {this, "TRT_dEdx_trackConfig_maxRtrack", 1.85, "maximum track radius"} |
| FloatProperty | m_trackConfig_minRtrack {this, "TRT_dEdx_trackConfig_minRtrack", 0.15, "maximum track radius"} |
| BooleanProperty | m_useZeroRHitCut |
| unsigned int | m_nTrunkateHits = 1 |
| SG::ReadCondHandleKey< TRTDedxcorrection > | m_ReadKey {this,"Dedxcorrection","Dedxcorrection","Dedx constants in-key"} |
| StoreGateSvc_t | m_evtStore |
| Pointer to StoreGate (event store by default) | |
| StoreGateSvc_t | m_detStore |
| Pointer to StoreGate (detector store by default) | |
| std::vector< SG::VarHandleKeyArray * > | m_vhka |
| bool | m_varHandleArraysDeclared |
Definition at line 48 of file TRT_ToT_dEdx.h.
|
privateinherited |
Definition at line 388 of file AthCommonDataStore.h.
| Enumerator | |
|---|---|
| kAlgStandard | |
| kAlgReweight | |
| kAlgReweightTrunkOne | |
Definition at line 55 of file TRT_ToT_dEdx.h.
| TRT_ToT_dEdx::TRT_ToT_dEdx | ( | const std::string & | t, |
| const std::string & | n, | ||
| const IInterface * | p ) |
AlgTool like constructor.
Definition at line 35 of file TRT_ToT_dEdx.cxx.
|
virtualdefault |
Virtual destructor.
|
static |
Definition at line 1185 of file TRT_ToT_dEdx.cxx.
|
protected |
correct overall dEdx normalization on track level
| number | of primary vertices per event |
Definition at line 684 of file TRT_ToT_dEdx.cxx.
|
protected |
main function to correct ToT values on hit level as a function of track radius and z-position
| track | on surface object |
| bool | variable to specify whether ToT or ToT/L correction |
| bool | variable to specify whether data or MC correction |
| bool | variable whether correction should actually be applied |
| bool | variable whether mimic ToT to other gas hits shoule be used |
Definition at line 708 of file TRT_ToT_dEdx.cxx.
|
inlineprivateinherited |
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
|
inlineinherited |
Definition at line 145 of file AthCommonDataStore.h.
|
finaloverridevirtual |
function to calculate sum ToT normalised to number of used hits
| Event | context ctx |
| track | pointer to track |
| useHitsHT | decide if HT hits should be used in the estimate |
Implements ITRT_ToT_dEdx.
Definition at line 133 of file TRT_ToT_dEdx.cxx.
|
inlinevirtual |
function to calculate sum ToT normalised to number of used hits
| track | pointer to track |
| useHitsHT | decide if HT hits should be used in the estimate |
Reimplemented from ITRT_ToT_dEdx.
Definition at line 45 of file ITRT_ToT_dEdx.h.
|
inlineinherited |
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition at line 95 of file AthCommonDataStore.h.
|
inlineinherited |
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition at line 85 of file AthCommonDataStore.h.
|
protectedinherited |
Add StoreName to extra input/output deps as needed.
use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given
|
private |
function to compute correction factor in barrel region
| driftradius | |
| z | position |
| layer | index |
| straw | layer index |
| bool | variable to specify whether data or MC correction |
Definition at line 779 of file TRT_ToT_dEdx.cxx.
|
private |
function to compute correction factor in barrel region
| driftradius | |
| z | position |
| layer | index |
| straw | layer index |
| desired | version of ToT definition |
| bool | variable to specify whether data or MC correction |
Definition at line 990 of file TRT_ToT_dEdx.cxx.
|
private |
function called by fitFuncBarrel_corrRZ for long straws
|z| /|z| - l \
T(r,z) = T0(r) + — exp|-------—| v(r) \ s(r) /
Definition at line 809 of file TRT_ToT_dEdx.cxx.
|
private |
function called by fitFuncBarrel_corrRZ for short straws
T(r,z) = T0(r)+ b(r)*|z|
Definition at line 839 of file TRT_ToT_dEdx.cxx.
|
private |
function to compute correction factor in endcap region
| driftradius | |
| radial | position |
| straw | layer index |
| sign | for positive or negative side |
| bool | variable to specify whether data or MC correction |
T(r,R) = T0(r)+ a(r)*R
Definition at line 793 of file TRT_ToT_dEdx.cxx.
|
private |
function to compute correction factor in endcap region
| driftradius | |
| radial | position |
| straw | layer index |
| sign | for positive or negative side |
| bool | variable to specify whether data or MC correction |
Definition at line 939 of file TRT_ToT_dEdx.cxx.
|
private |
function called by fitFuncBarrel_corrRZ and fitFuncEndcap_corrRZ
Definition at line 857 of file TRT_ToT_dEdx.cxx.
|
protected |
Definition at line 649 of file TRT_ToT_dEdx.cxx.
|
protected |
return gas type for that hit
| track | on surface object |
Definition at line 622 of file TRT_ToT_dEdx.cxx.
|
inline |
Definition at line 383 of file TRT_ToT_dEdx.h.
|
inline |
Definition at line 368 of file TRT_ToT_dEdx.h.
|
inline |
Definition at line 380 of file TRT_ToT_dEdx.h.
|
inline |
Definition at line 374 of file TRT_ToT_dEdx.h.
|
inline |
Definition at line 371 of file TRT_ToT_dEdx.h.
|
protected |
function to calculate likelihood from prediction and resolution
| observed | dEdx |
| track | parameter |
| particle | hypothesis |
| number | of used hits |
Definition at line 399 of file TRT_ToT_dEdx.cxx.
|
protected |
Definition at line 411 of file TRT_ToT_dEdx.cxx.
|
inline |
Definition at line 365 of file TRT_ToT_dEdx.h.
|
inline |
Definition at line 377 of file TRT_ToT_dEdx.h.
|
inlinevirtual |
Reimplemented from ITRT_ToT_dEdx.
Definition at line 81 of file ITRT_ToT_dEdx.h.
|
finaloverridevirtual |
function to calculate likelihood ratio test
| observed | dEdx |
| track | parameter |
| particle | hypothesis |
| antihypothesis | |
| number | of used hits |
Implements ITRT_ToT_dEdx.
Definition at line 467 of file TRT_ToT_dEdx.cxx.
|
private |
Definition at line 1059 of file TRT_ToT_dEdx.cxx.
|
overridevirtual |
AlgTool initailize method.
Definition at line 47 of file TRT_ToT_dEdx.cxx.
|
overridevirtualinherited |
Return this algorithm's input handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
|
inlinestaticinherited |
AlgTool interface methods.
Definition at line 30 of file ITRT_ToT_dEdx.h.
|
protected |
function to define what is a good hit to be used for dEdx calculation cuts on track level can be made latekAlgStandardr by the user.
Also returns the length in the straw.
| trackState | measurement on track |
| useHitsHT | decide if HT hits should be used in the estimate |
| length | length in straw |
Definition at line 78 of file TRT_ToT_dEdx.cxx.
|
protected |
function to extract most likely mass in bg [0,3]
| track | momentum |
| measured | dEdx |
Definition at line 570 of file TRT_ToT_dEdx.cxx.
|
inlineinherited |
Definition at line 24 of file AthCommonMsg.h.
|
inlineinherited |
Definition at line 30 of file AthCommonMsg.h.
|
overridevirtualinherited |
Return this algorithm's output handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
|
protected |
function to calculate expectation value for dEdx using BB fit
| track | momentum |
| hypothesis |
Definition at line 490 of file TRT_ToT_dEdx.cxx.
|
protected |
Definition at line 500 of file TRT_ToT_dEdx.cxx.
|
inlineprotectedinherited |
Definition at line 380 of file AthCommonDataStore.h.
|
inlineprotectedinherited |
remove all handles from I/O resolution
Definition at line 364 of file AthCommonDataStore.h.
|
inline |
Definition at line 382 of file TRT_ToT_dEdx.h.
|
inline |
Definition at line 367 of file TRT_ToT_dEdx.h.
|
inline |
Definition at line 379 of file TRT_ToT_dEdx.h.
|
inline |
Definition at line 373 of file TRT_ToT_dEdx.h.
|
inline |
Definition at line 370 of file TRT_ToT_dEdx.h.
|
inline |
Definition at line 364 of file TRT_ToT_dEdx.h.
|
inline |
Definition at line 376 of file TRT_ToT_dEdx.h.
|
overridevirtualinherited |
Perform system initialization for an algorithm.
We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.
Reimplemented in asg::AsgMetadataTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and DerivationFramework::CfAthAlgTool.
|
overridevirtualinherited |
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
|
private |
Definition at line 1149 of file TRT_ToT_dEdx.cxx.
|
inlineinherited |
Definition at line 308 of file AthCommonDataStore.h.
|
finaloverridevirtual |
function to calculate number of used hits
| track | pointer |
| useHitsHT | decide if HT hits should be used in the estimate |
Implements ITRT_ToT_dEdx.
Definition at line 320 of file TRT_ToT_dEdx.cxx.
|
inlinevirtual |
Reimplemented from ITRT_ToT_dEdx.
Definition at line 60 of file ITRT_ToT_dEdx.h.
|
private |
Definition at line 70 of file TRT_ToT_dEdx.h.
|
private |
Definition at line 75 of file TRT_ToT_dEdx.h.
|
private |
Definition at line 86 of file TRT_ToT_dEdx.h.
|
privateinherited |
Pointer to StoreGate (detector store by default)
Definition at line 393 of file AthCommonDataStore.h.
|
private |
Definition at line 77 of file TRT_ToT_dEdx.h.
|
privateinherited |
Pointer to StoreGate (event store by default)
Definition at line 390 of file AthCommonDataStore.h.
|
private |
Definition at line 99 of file TRT_ToT_dEdx.h.
|
private |
Definition at line 71 of file TRT_ToT_dEdx.h.
|
private |
Definition at line 110 of file TRT_ToT_dEdx.h.
|
private |
Definition at line 61 of file TRT_ToT_dEdx.h.
|
private |
Definition at line 256 of file TRT_ToT_dEdx.h.
|
private |
Definition at line 83 of file TRT_ToT_dEdx.h.
|
private |
Definition at line 102 of file TRT_ToT_dEdx.h.
|
private |
Definition at line 104 of file TRT_ToT_dEdx.h.
|
private |
Definition at line 65 of file TRT_ToT_dEdx.h.
|
private |
Definition at line 67 of file TRT_ToT_dEdx.h.
|
private |
Definition at line 80 of file TRT_ToT_dEdx.h.
|
private |
Definition at line 107 of file TRT_ToT_dEdx.h.
|
privateinherited |
Definition at line 399 of file AthCommonDataStore.h.
|
privateinherited |
Definition at line 398 of file AthCommonDataStore.h.