8#include "GaudiKernel/MsgStream.h"
9#include "GaudiKernel/IToolSvc.h"
16#include "GaudiKernel/IChronoStatSvc.h"
29 inRange(
const double val,
const double lo,
const double hi){
30 return (val>lo) and (val<hi);
37 declareInterface<ITRT_ToT_dEdx>(
this);
50 MsgStream log(msgSvc(), name());
57 return StatusCode::FAILURE;
69 ATH_MSG_ERROR(
"Property TRT_dEdx_useTrackPartWithGasType has an invalid "
71 return StatusCode::FAILURE;
74 return StatusCode::SUCCESS;
104 if(trkP==
nullptr)
return false;
106 double Trt_Rtrack = std::abs(trkP->parameters()[
Trk::locR]);
120 if (TrtHl==1)
return false;
136 std::optional<float> localOccupancy)
const
144 REPORT_MESSAGE(MSG::FATAL) <<
"EventInfo decoration not available!";
150 double mu = eventInfoDecor(0);
152 nVtx = 1.3129 + 0.716194*mu + (-0.00475074)*mu*mu;
155 nVtx = 1.0897 + 0.748287*mu + (-0.00421788)*mu*mu;
169 size_t vtos_size = vtsos->
size();
170 double correctionFactor = 1.;
173 std::vector<double> vecToT;
174 vecToT.reserve(vtos_size);
177 for ( ; itr!=itre ; ++itr) {
183 ToT_correct*=correctionFactor;
185 vecToT.push_back(ToT_correct);
189 sort(vecToT.begin(), vecToT.end());
190 size_t nhits = vecToT.size();
197 if (nhits<1)
return 0.0;
199 ToTsum = std::accumulate(vecToT.begin(), vecToT.end(), 0);
205 ToTsum*=correctionFactor;
210 std::vector<double> vecToT_Xe;
211 vecToT_Xe.reserve(vtos_size/2);
212 std::vector<double> vecToT_Ar;
213 vecToT_Ar.reserve(vtos_size/2);
214 std::vector<double> vecToT_Kr;
218 "dEdX_Estimator():: Using m_toolScenario="
219 <<
m_toolScenario <<
" scenario m_useTrackPartWithGasType is set to"
221 <<
", but kUnset is requiered. Check you tool configuration.");
224 for ( ; itr!=itre ; ++itr) {
232 ToT_correct*=correctionFactor;
234 vecToT_Xe.push_back(ToT_correct);
235 }
else if (gasType==
kArgon) {
236 vecToT_Ar.push_back(ToT_correct);
238 vecToT_Kr.push_back(ToT_correct);
240 ATH_MSG_ERROR(
"dEdX_Estimator():: During scenario kAlgReweight variable gasTypeInStraw got value kUnset.");
245 sort(vecToT_Xe.begin(), vecToT_Xe.end());
246 sort(vecToT_Ar.begin(), vecToT_Ar.end());
247 sort(vecToT_Kr.begin(), vecToT_Kr.end());
249 size_t nhitsXe = vecToT_Xe.size();
250 size_t nhitsAr = vecToT_Ar.size();
251 size_t nhitsKr = vecToT_Kr.size();
261 if (nhitsXe>0 && vecToT_Xe.at(nhitsXe-1)>maxToT) {
263 maxToT = vecToT_Xe.at(nhitsXe-1);
265 if(nhitsAr>0 && vecToT_Ar.at(nhitsAr-1)>maxToT){
267 maxToT = vecToT_Ar.at(nhitsAr-1);
269 if (nhitsKr>0 && vecToT_Kr.at(nhitsKr-1)>maxToT) {
275 }
else if (trunkGas==
kArgon) {
283 size_t nhits = nhitsXe + nhitsAr + nhitsKr;
284 if(nhits<1)
return 0.0;
289 for (
size_t i = 0; i < nhitsXe;i++) {
290 ToTsumXe+=vecToT_Xe[i];
292 for (
size_t i = 0; i < nhitsAr;i++) {
293 ToTsumAr+=vecToT_Ar[i];
295 for (
size_t i = 0; i < nhitsKr;i++) {
296 ToTsumKr+=vecToT_Kr[i];
299 ToTsumXe = (nhitsXe>0) ? ToTsumXe/nhitsXe : 0;
300 ToTsumAr = (nhitsAr>0) ? ToTsumAr/nhitsAr : 0;
301 ToTsumKr = (nhitsKr>0) ? ToTsumKr/nhitsKr : 0;
302 double ToTsum = ToTsumXe*nhitsXe + ToTsumAr*nhitsAr + ToTsumKr*nhitsKr;
310 ToTsum *= correctionFactor;
322 bool useHitsHT)
const
341 for ( ; itr!=itre ; ++itr) {
357 "usedHits_Estimator():: Using m_toolScenario="
358 <<
m_toolScenario <<
" scenario m_useTrackPartWithGasType is set to "
360 <<
", but kUnset is required. Check you tool configuration.");
363 for ( ; itr!=itre ; ++itr) {
369 }
else if (gasType==
kArgon) {
374 ATH_MSG_ERROR(
"usedHits_Estimator():: During scenario kAlgReweight variable gasTypeInStraw got value kUnset.");
385 if(nhitsXe>0 || nhitsAr>0 || nhitsKr>0)
390 nhits = nhitsXe + nhitsAr + nhitsKr;
401 const double dEdx_obs,
407 return getProb(ctx,gasType, dEdx_obs, pTrk, hypothesis, nUsedHits);
413 const double dEdx_obs,
422 if (dEdxCorrection==
nullptr) {
423 ATH_MSG_ERROR(
" getProb: Could not find any dEdxCorrection in CondStore. Return zero.");
428 ATH_MSG_DEBUG(
"getProb():: gasTypeInStraw set kUnset that is not allowed! Use gasTypeInStraw(*itr) to get gas type info for that hit first!");
429 ATH_MSG_DEBUG(
"getProb():: Now gasTypeInStraw sets to kXenon.");
433 double dEdx_pred =
predictdEdx(ctx,gasType, pTrk, hypothesis);
434 if (dEdx_pred==0)
return 0.0;
438 double correct = 1+factor*(0.045*log10(pTrk)+0.885-1);
439 dEdx_pred= dEdx_pred/correct;
444 dEdxCorrection->
resolution[gasType][1] * (nUsedHits + 0.5) +
445 dEdxCorrection->
resolution[gasType][2] * (nUsedHits + 0.5) *
447 dEdxCorrection->
resolution[gasType][3] * (nUsedHits + 0.5) *
448 (nUsedHits + 0.5) * (nUsedHits + 0.5);
456 (nUsedHits + 0.5) * (nUsedHits + 0.5);
459 double prob = std::exp( -0.5 * ( ( ( dEdx_obs - dEdx_pred ) / (Resolution*dEdx_pred) ) *
460 ( ( dEdx_obs - dEdx_pred ) / (Resolution*dEdx_pred) ) )) ;
468 const double dEdx_obs,
477 if ( dEdx_obs<=0. || pTrk<=0. || nUsedHits<=0 )
return 0.5;
479 double Pone =
getProb(ctx,gasType, dEdx_obs,pTrk,hypothesis,nUsedHits);
480 double Ptwo =
getProb(ctx,gasType, dEdx_obs,pTrk,antihypothesis,nUsedHits);
481 if ((Pone+Ptwo) != 0) {
483 return Pone/(Pone+Ptwo);
505 ATH_MSG_DEBUG(
"predictdEdx(): gasTypeInStraw = " << gasType <<
"");
509 if (dEdxCorrection ==
nullptr) {
510 ATH_MSG_ERROR(
" predictdEdx: Could not find any dEdxCorrection in "
511 "CondStore. Return zero.");
517 "predictdEdx():: gasTypeInStraw set kUnset that is not allowed! Use "
518 "gasTypeInStraw(*itr) to get gas type info for that hit first!");
519 ATH_MSG_DEBUG(
"predictdEdx():: Now gasTypeInStraw sets to kXenon.");
525 double betaGamma = pTrk/
mass;
534 1. / (std::pow(betaGamma,
539 std::pow(std::sqrt((betaGamma * betaGamma) /
540 (1. + (betaGamma * betaGamma))),
543 std::pow(std::sqrt((betaGamma * betaGamma) /
544 (1. + (betaGamma * betaGamma))),
552 1. / (std::pow(betaGamma, dEdxCorrection->
paraDedxP5[gasType])) <=
557 std::sqrt((betaGamma * betaGamma) / (1. + (betaGamma * betaGamma))),
561 std::sqrt((betaGamma * betaGamma) / (1. + (betaGamma * betaGamma))),
564 1. / (std::pow(betaGamma, dEdxCorrection->
paraDedxP5[gasType]))));
581 if(dEdxCorrection==
nullptr)
583 ATH_MSG_ERROR(
" mass: Could not find any dEdxCorrection in CondStore. Return zero.");
589 ATH_MSG_WARNING(
"mass():: gasTypeInStraw set kUnset that is not allowed! Use gasTypeInStraw(*itr) to get gas type info for that hit first!");
597 static const double bg_min = 0.001;
598 static const double bg_max = 3;
600 static const std::string blumRolandiFunction =
601 "( [0]/sqrt( (x*x/([5]*[5]))/(1.+(x*x/([5]*[5]))) )^[3] ) * ([1] - sqrt( "
602 "(x*x/([5]*[5]))/(1.+(x*x/([5]*[5]))) )^[3] - log([2]+1./((x/[5])^[4]) ) )";
604 TF1 blumRolandi(
"BR", blumRolandiFunction.c_str(), 0.7, 100000);
606 blumRolandi.SetParameters(dEdxCorrection->
paraDedxP1[gasType],
613 double betaGamma = blumRolandi.GetX(
dEdx, bg_min, bg_max);
617 return pTrk/betaGamma;
650 const EventContext& ctx,
660 if ( stat==2 || stat==3 ) { GasType =
kXenon; }
661 else if ( stat==1 || stat==4 ) { GasType =
kArgon; }
662 else if ( stat==5 ) { GasType =
kKrypton; }
663 else if ( stat==6 ) { GasType =
kArgon; }
664 else if ( stat==7 ) { GasType =
kKrypton;
670 <<
", must be 'Good(2)||Xenon(3)' or 'Dead(1)||Argon(4)' or "
671 "'Krypton(5)' or 'EmulatedArgon(6)' or 'EmulatedKr(7)'!");
672 throw std::exception();
688 if(dEdxCorrection==
nullptr) {
689 ATH_MSG_ERROR(
" correctNormalization: Could not find any dEdxCorrection in CondStore. Return zero.");
695 if (nVtx<=0) nVtx=dEdxCorrection->
normNzero[gasType];
704 return (slope*dEdxCorrection->
normNzero[gasType]+offset)/(slope*nVtx+offset+shift);
739 int hitPart =
m_trtId->barrel_ec(DCId);
740 int StrawLayer =
m_trtId->straw_layer(DCId);
741 int Layer =
m_trtId->layer_or_wheel(DCId);
742 double hitRtrack = std::abs(trkP->parameters()[
Trk::locR]);
745 ATH_MSG_ERROR(
"correctToT_corrRZ(const Trk::TrackStateOnSurface *itr):: Gas type in straw is kUnset! Return ToT = 0");
756 double hitPosR = std::sqrt(trackx*trackx+tracky*tracky);
773 if (std::isinf(valToT))
return 0.;
784 int StrawLayer)
const
786 if (Layer == 0 && StrawLayer < 9) {
796 double radialPosition,
805 return T0+
a*radialPosition;
814 int StrawLayer)
const
821 double z = std::abs(zPosition);
823 if(zPosition<0)
sign=-1;
831 const double expArg=(
z-l)/s;
832 if (not
inRange(expArg, -600.0,600.0)){
833 return expArg>0 ? std::numeric_limits<double>::infinity():0.;
835 return T0+(
z/v)*std::exp(expArg);
843 int StrawLayer)
const
848 double z = std::abs(zPosition);
850 if(zPosition<0)
sign=-1;
868 if(dEdxCorrection==
nullptr)
870 ATH_MSG_ERROR(
" fitFuncPol_corrRZ: Could not find any dEdxCorrection in CondStore. Return zero.");
880 double r = driftRadius;
884 a = dEdxCorrection->
paraLongCorrRZ[gasType][(6*parameter+0)*30*3+Layer*30+Strawlayer+offset];
885 b = dEdxCorrection->
paraLongCorrRZ[gasType][(6*parameter+1)*30*3+Layer*30+Strawlayer+offset];
886 c = dEdxCorrection->
paraLongCorrRZ[gasType][(6*parameter+2)*30*3+Layer*30+Strawlayer+offset];
887 d = dEdxCorrection->
paraLongCorrRZ[gasType][(6*parameter+3)*30*3+Layer*30+Strawlayer+offset];
888 e = dEdxCorrection->
paraLongCorrRZ[gasType][(6*parameter+4)*30*3+Layer*30+Strawlayer+offset];
889 f = dEdxCorrection->
paraLongCorrRZ[gasType][(6*parameter+5)*30*3+Layer*30+Strawlayer+offset];
892 if(
sign > 0) offset+=108;
893 a = dEdxCorrection->
paraShortCorrRZ[gasType][(6*parameter+0)*9+Layer+offset];
894 b = dEdxCorrection->
paraShortCorrRZ[gasType][(6*parameter+1)*9+Layer+offset];
895 c = dEdxCorrection->
paraShortCorrRZ[gasType][(6*parameter+2)*9+Layer+offset];
896 d = dEdxCorrection->
paraShortCorrRZ[gasType][(6*parameter+3)*9+Layer+offset];
897 e = dEdxCorrection->
paraShortCorrRZ[gasType][(6*parameter+4)*9+Layer+offset];
898 f = dEdxCorrection->
paraShortCorrRZ[gasType][(6*parameter+5)*9+Layer+offset];
900 if(
sign >0) Layer+=14;
901 a = dEdxCorrection->
paraEndCorrRZ[gasType][(6*parameter+0)*28+Layer];
902 b = dEdxCorrection->
paraEndCorrRZ[gasType][(6*parameter+1)*28+Layer];
903 c = dEdxCorrection->
paraEndCorrRZ[gasType][(6*parameter+2)*28+Layer];
904 d = dEdxCorrection->
paraEndCorrRZ[gasType][(6*parameter+3)*28+Layer];
905 e = dEdxCorrection->
paraEndCorrRZ[gasType][(6*parameter+4)*28+Layer];
906 f = dEdxCorrection->
paraEndCorrRZ[gasType][(6*parameter+5)*28+Layer];
910 if(
sign > 0) offset=1620;
911 a = dEdxCorrection->
paraLongCorrRZMC[gasType][(6*parameter+0)*30*3+Layer*30+Strawlayer+offset];
912 b = dEdxCorrection->
paraLongCorrRZMC[gasType][(6*parameter+1)*30*3+Layer*30+Strawlayer+offset];
913 c = dEdxCorrection->
paraLongCorrRZMC[gasType][(6*parameter+2)*30*3+Layer*30+Strawlayer+offset];
914 d = dEdxCorrection->
paraLongCorrRZMC[gasType][(6*parameter+3)*30*3+Layer*30+Strawlayer+offset];
915 e = dEdxCorrection->
paraLongCorrRZMC[gasType][(6*parameter+4)*30*3+Layer*30+Strawlayer+offset];
916 f = dEdxCorrection->
paraLongCorrRZMC[gasType][(6*parameter+5)*30*3+Layer*30+Strawlayer+offset];
918 if(
sign > 0) offset+=108;
926 if(
sign >0) Layer+=14;
928 b = dEdxCorrection->
paraEndCorrRZMC[gasType][(6*parameter+1)*28+Layer];
929 c = dEdxCorrection->
paraEndCorrRZMC[gasType][(6*parameter+2)*28+Layer];
930 d = dEdxCorrection->
paraEndCorrRZMC[gasType][(6*parameter+3)*28+Layer];
931 e = dEdxCorrection->
paraEndCorrRZMC[gasType][(6*parameter+4)*28+Layer];
932 f = dEdxCorrection->
paraEndCorrRZMC[gasType][(6*parameter+5)*28+Layer];
942 double radialPosition,
952 if(dEdxCorrection==
nullptr) {
953 ATH_MSG_ERROR(
" fitFuncEndcap_corrRZL: Could not find any dEdxCorrection in CondStore. Return zero.");
957 double r = std::abs(driftRadius);
958 double a,b,c,d,e,f,g,
h,i;
959 if(
sign >0) Layer+=14;
983 double slope = g+
h*
r+i*
r*
r;
986 return T0+T1+slope*radialPosition;
995 int Strawlayer)
const
1002 if(dEdxCorrection==
nullptr) {
1003 ATH_MSG_ERROR(
" fitFuncBarrel_corrRZL: Could not find any dEdxCorrection in CondStore. Return zero.");
1007 double a,b,c,d,e,f,g;
1008 if (Layer==0 && Strawlayer<9) {
1045 double z = std::abs(zPosition);
1046 double r = std::abs(driftRadius);
1049 double T1 = std::exp(-c*
r*
r)+d*
r;
1050 double slope = e*
r+f*
r*
r+g*
r*
r*
r;
1053 if (zPosition>0)
result = T0pos+T1+slope*
z;
1095 int layer =
m_trtId->layer_or_wheel(DCId);
1096 int phimodule =
m_trtId->phi_module(DCId);
1097 int HitPart =
m_trtId->barrel_ec(DCId);
1098 double Trt_HitTheta = trkP->parameters()[
Trk::theta];
1099 double trackEta = -log(tan(Trt_HitTheta/2.0));
1101 double localOccupancy =
m_localOccTool->LocalOccupancy(ctx, trackEta, phimodule);
1105 double p0=0., p1=0., p2=0., p0_flat=0.;
1110 int nBarrelLayers = 3, nEndcapLayers = 14;
1112 int nParametersPerLayer = 3;
1114 int nHTConfigurations = 2;
1116 int nSharedConfigurations = 2;
1118 layer * nParametersPerLayer +
1119 isHT * ((abs(HitPart) - 1) * (nEndcapLayers - nBarrelLayers) *
1120 nParametersPerLayer +
1121 nBarrelLayers * nParametersPerLayer) +
1122 isShared * ((abs(HitPart) - 1) * (nEndcapLayers - nBarrelLayers) *
1123 nParametersPerLayer * nHTConfigurations +
1124 nBarrelLayers * nParametersPerLayer * nHTConfigurations) +
1125 (abs(HitPart) - 1) * nParametersPerLayer * nBarrelLayers *
1126 nHTConfigurations * nSharedConfigurations;
1128 int num_flat = layer * 3 +
1129 isHT * ((abs(HitPart) - 1) * (nEndcapLayers - nBarrelLayers) *
1130 nParametersPerLayer +
1131 nBarrelLayers * nParametersPerLayer) +
1132 (abs(HitPart) - 1) * nParametersPerLayer * nBarrelLayers *
1133 nHTConfigurations * nSharedConfigurations;
1138 p0_flat = dEdxCorrection->
hitOccPar[num_flat];
1143 valToT = p0_flat/(p0+p1*localOccupancy+p2*localOccupancy*localOccupancy);
1145 return ToTmip*valToT;
1152 std::optional<float> localOccupancy)
const
1159 double trackOcc = localOccupancy != std::nullopt
1165 double trackEta = -log(tan(
theta/2.0));
1168 int index = int(25*(trackEta+2.));
1209 if(trkP==
nullptr)
return 0.;
1211 double Trt_Rtrack = std::abs(trkP->parameters()[
Trk::locR]);
1212 double Trt_HitTheta = trkP->parameters()[
Trk::theta];
1213 double Trt_HitPhi = trkP->parameters()[
Trk::phi];
1215 int HitPart = std::abs(identifier->barrel_ec(DCId));
1217 double strawphi = element->
center(DCId).phi();
1220 if (Trt_Rtrack >= 2.0) {
1226 length = 2*std::sqrt(4-Trt_Rtrack*Trt_Rtrack)*1./std::abs(std::sin(Trt_HitTheta));
1227 }
else if (HitPart == 2) {
1228 length = 2*std::sqrt(4-Trt_Rtrack*Trt_Rtrack)*1./std::sqrt(1-std::sin(Trt_HitTheta)*std::sin(Trt_HitTheta)*std::cos(Trt_HitPhi-strawphi)*std::cos(Trt_HitPhi-strawphi));
1231 throw std::runtime_error(
"Unknown barrel/endcap identifier: " + std::to_string(HitPart) +
". Must be 1(Barrel) or 2(Endcap)");
Scalar theta() const
theta method
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
#define REPORT_MESSAGE(LVL)
Report a message.
defines an "iterator" over instances of a given type in StoreGateSvc
bool inRange(const double *boundaries, const double value, const double tolerance=0.02)
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.
Handle class for reading a decoration on an object.
Handle class for reading from StoreGate.
This is an Identifier helper class for the TRT subdetector.
constexpr int pow(int base, int exp) noexcept
const ServiceHandle< StoreGateSvc > & detStore() const
Header file for AthHistogramAlgorithm.
DataModel_detail::const_iterator< DataVector > const_iterator
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
size_type size() const noexcept
Returns the number of elements in the collection.
Virtual base class of TRT readout elements.
virtual const Amg::Vector3D & center() const override final
Element Surface: center of a straw layer.
Represents 'corrected' measurements from the TRT (for example, corrected for wire sag).
bool highLevel() const
returns true if the high level threshold was passed
virtual const InDetDD::TRT_BaseElement * detectorElement() const override final
returns the detector element, assoicated with the PRD of this class
virtual const TRT_DriftCircle * prepRawData() const override final
returns the PrepRawData - is a TRT_DriftCircle in this scope
virtual const Amg::Vector3D & globalPosition() const override final
return the global position of this RIO_OnTrack
double timeOverThreshold() const
returns Time over threshold in ns
Handle class for reading a decoration on an object.
bool isPresent() const
Is the referenced container present in SG?
This is an Identifier helper class for the TRT subdetector.
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
virtual StatusCode initialize() override
AlgTool initailize method.
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
BooleanProperty m_corrected
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
EGasType gasTypeInStraw(const EventContext &ctx, const Trk::TrackStateOnSurface *itr) const
return gas type for that hit
IntegerProperty m_correctionType
TRT_ToT_dEdx(const std::string &, const std::string &, const IInterface *)
AlgTool like constructor.
IntegerProperty m_useTrackPartWithGasType
SG::ReadCondHandleKey< TRTDedxcorrection > m_ReadKey
BooleanProperty m_useZeroRHitCut
double trackOccupancyCorrection(const EventContext &ctx, const Trk::Track *track, bool useHThits, std::optional< float > localOccupancy) const
double fitFuncBarrelShort_corrRZ(const EventContext &ctx, EGasType gasType, double driftRadius, double zPosition, int StrawLayer) const
function called by fitFuncBarrel_corrRZ for short straws
virtual ~TRT_ToT_dEdx()
Virtual destructor.
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]
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
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...
virtual double usedHits(const EventContext &ctx, const Trk::Track *track, bool useHThits=true) const override final
function to calculate number of used hits
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
unsigned int m_nTrunkateHits
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
ToolHandle< Trk::IPRD_AssociationTool > m_assoTool
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
FloatProperty m_trackConfig_maxRtrack
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 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
ToolHandle< ITRT_StrawStatusSummaryTool > m_TRTStrawSummaryTool
SG::ReadDecorHandleKey< xAOD::EventInfo > m_rdhkEvtInfo
FloatProperty m_trackConfig_minRtrack
double hitOccupancyCorrection(const EventContext &ctx, const Trk::TrackStateOnSurface *itr) const
static double calculateTrackLengthInStraw(const Trk::TrackStateOnSurface *trackState, const TRT_ID *identifier)
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 fitFuncBarrelLong_corrRZ(const EventContext &ctx, EGasType gasType, double driftRadius, double zPosition, int Layer, int StrawLayer) const
function called by fitFuncBarrel_corrRZ for long straws
BooleanProperty m_divideByL
IntegerProperty m_toolScenario
double correctNormalization(const EventContext &ctx, double nVtx=-1) const
correct overall dEdx normalization on track level
ToolHandle< InDet::ITRT_LocalOccupancy > m_localOccTool
This class is the pure abstract base class for all fittable tracking measurements.
const LocalParameters & localParameters() const
Interface method to get the LocalParameters.
virtual bool type(MeasurementBaseType::Type type) const =0
Interface method checking the type.
const Amg::MatrixX & localCovariance() const
Interface method to get the localError.
Class to handle RIO On Tracks ROT) for InDet and Muons, it inherits from the common MeasurementBase.
virtual const Trk::PrepRawData * prepRawData() const =0
returns the PrepRawData (also known as RIO) object to which this RIO_OnTrack is associated.
Identifier identify() const
return the identifier -extends MeasurementBase
virtual bool rioType(RIO_OnTrackType::Type type) const =0
Method checking the Rio On Track type.
represents the track state (measurement, material, fit parameters and quality) at a surface.
const MeasurementBase * measurementOnTrack() const
returns MeasurementBase const overload
const TrackParameters * trackParameters() const
return ptr to trackparameters const overload
bool type(const TrackStateOnSurfaceType type) const
Use this method to find out if the TSoS is of a certain type: i.e.
@ Outlier
This TSoS contains an outlier, that is, it contains a MeasurementBase/RIO_OnTrack which was not used ...
double timeOverThreshold(unsigned int m_word)
constexpr double mass[PARTICLEHYPOTHESES]
the array of masses
DataVector< const Trk::TrackStateOnSurface > TrackStates
ParticleHypothesis
Enumeration for Particle hypothesis respecting the interaction with material.
ParametersBase< TrackParametersDim, Charged > TrackParameters
double normOffsetData[nGasTypes]
double hitOccPar[nParametersHitBaseddEdx]
double paraShortCorrRZDivideByLengthMC[nGasTypes][nParametersShortStrawsRZDivideByLength]
double paraEndCorrRZMC[nGasTypes][nParametersEndcapRZ]
double paraDivideByLengthDedxP4[nGasTypes]
double trackOccPar0NoHt[nParametersTrackBaseddEdx]
double resolution[nGasTypes][nParametersResolution]
double paraDedxP5[nGasTypes]
double paraDedxP4[nGasTypes]
double paraShortCorrRZMC[nGasTypes][nParametersShortStrawsRZ]
double paraLongCorrRZDivideByLengthMC[nGasTypes][nParametersLongStrawsRZDivideByLength]
double trackOccPar2[nParametersTrackBaseddEdx]
double normSlopeTot[nGasTypes]
double paraDedxP3[nGasTypes]
double paraDivideByLengthDedxP1[nGasTypes]
double paraDedxP2[nGasTypes]
double trackOccPar1NoHt[nParametersTrackBaseddEdx]
double paraLongCorrRZ[nGasTypes][nParametersLongStrawsRZ]
double normSlopeTotDivideByLength[nGasTypes]
double paraEndCorrRZDivideByLengthDATA[nGasTypes][nParametersEndcapRZDivideByLength]
double paraDivideByLengthDedxP2[nGasTypes]
double paraShortCorrRZ[nGasTypes][nParametersShortStrawsRZ]
double trackOccPar2NoHt[nParametersTrackBaseddEdx]
double paraShortCorrRZDivideByLengthDATA[nGasTypes][nParametersShortStrawsRZDivideByLength]
double paraLongCorrRZDivideByLengthDATA[nGasTypes][nParametersLongStrawsRZDivideByLength]
double normOffsetTot[nGasTypes]
double paraEndCorrRZDivideByLengthMC[nGasTypes][nParametersEndcapRZDivideByLength]
double trackOccPar0[nParametersTrackBaseddEdx]
double trackOccPar1[nParametersTrackBaseddEdx]
double paraLongCorrRZMC[nGasTypes][nParametersLongStrawsRZ]
double paraDivideByLengthDedxP3[nGasTypes]
double paraDedxP1[nGasTypes]
double paraDivideByLengthDedxP5[nGasTypes]
double paraEndCorrRZ[nGasTypes][nParametersEndcapRZ]
double normOffsetTotDivideByLength[nGasTypes]
double resolutionElectron[nGasTypes][nParametersResolution]