2 #include "StarChairDefs.h"
3 #include "St_db_Maker/St_db_Maker.h"
4 #include "StDetectorDbMaker/StiHitErrorCalculator.h"
8 static const Double_t tenMicrons = 1e-3;
9 static const Double_t min2Err = tenMicrons*tenMicrons;
10 static const Double_t max2Err = 1.;
11 static const Double_t scale = 1.;
14 Double_t dz = (200.-TMath::Abs(_z+100))/100.;
16 Double_t dz = (200.-TMath::Abs(_z))/100.;
20 Int_t sec = TMath::Nint(_eta*TMath::RadToDeg()/30);
21 Double_t Phi = _eta - TMath::DegToRad()*30*sec;
25 Double_t cosCA = TMath::Cos(Phi);
26 Double_t sinCA = TMath::Sin(Phi);
27 if (TMath::Abs(cosCA)<0.01) cosCA=0.01;
28 Double_t tanCA = sinCA/cosCA;
29 ecross=scale*fudgeCactor*fudgeCactor*(Coeff[0]+Coeff[1]*dz/(cosCA*cosCA) +Coeff[2]*tanCA*tanCA);
30 if (ecross< min2Err) ecross = min2Err;
31 if (ecross> max2Err) ecross = max2Err;
32 Double_t tanDip=_tanl;
33 Double_t cosDipInv2=1+tanDip*tanDip;
34 edip=scale*fudgeCactor*fudgeCactor*(Coeff[3]+Coeff[4]*dz*cosDipInv2+Coeff[5]*tanDip*tanDip);
35 if (edip< min2Err) edip = min2Err;
36 if (edip> max2Err) edip = max2Err;
43 #include "StiTrackingParameters.h"
45 #include "StiDefaultTrackingParameters.h"
47 #include "StiLocalTrackSeedFinderParameters.h"
49 #include "StiKalmanTrackFitterParameters.h"
51 #include "StiKalmanTrackFinderParameters.h"
53 #include "StiTpcHitErrorMDF4.h"
55 void StiTpcHitErrorMDF4::convert(Double_t _z, Double_t _eta, Double_t _tanl, Double_t AdcL) {
56 fxx[0] = 1. - TMath::Abs(_z)/207.707;
57 Double_t y = TMath::Tan(_eta);
63 void StiTpcHitErrorMDF4::calculateError(Double_t _z, Double_t _eta, Double_t _tanl,
64 Double_t &ecross, Double_t &edip,
65 Double_t fudgeFactor, Double_t AdcL,
66 Double_t *dZ, Double_t *dX) {
67 static const Double_t tenMicrons = 1e-3;
68 static const Double_t min2Err = tenMicrons*tenMicrons;
69 static const Double_t max2Err = 1.;
70 static const Double_t scale = 1.;
71 convert(_z, _eta, _tanl, AdcL);
72 Double_t dPadSigmaSQ = Eval( 0, fxx);
73 Double_t dTimeSigmaSQ = Eval( 2, fxx);
74 ecross = scale*padPitch() *padPitch() *dPadSigmaSQ * fudgeFactor;
75 edip = scale*timePitch()*timePitch()*dTimeSigmaSQ * fudgeFactor;
77 if (ecross< min2Err) {ecross = min2Err; fail++;}
78 if (ecross> max2Err) {ecross = max2Err; fail++;}
79 if (edip< min2Err) {edip = min2Err; fail++;}
80 if (edip> max2Err) {edip = max2Err; fail++;}
84 Double_t dTime = Eval( 3, fxx);
85 *dZ = - timePitch()*dTime * TMath::Sign(1., _z);
91 Double_t dPad = Eval( 1, fxx);
92 *dX = - padPitch()*dPad;
virtual void calculateError(Double_t _z, Double_t _eta, Double_t _tanl, Double_t &ecross, Double_t &edip, Double_t fudgeFactor=1) const
coeff[6] = 0:intrinsicY 1: driftY 2: crossY 3:intrinsicZ 4: driftZ 5: crossZ