class AliVVertex;
class TPolyMarker3D;
+const Double_t kC0max=100*100, // SigmaY<=100cm
+ kC2max=100*100, // SigmaZ<=100cm
+ kC5max=1*1, // SigmaSin<=1
+ kC9max=1*1, // SigmaTan<=1
+ kC14max=100*100; // Sigma1/Pt<=100 1/GeV
+
class AliExternalTrackParam: public AliVTrack {
public:
AliExternalTrackParam();
fX=x; fAlpha=alpha;
for (Int_t i = 0; i < 5; i++) fP[i] = param[i];
for (Int_t i = 0; i < 15; i++) fC[i] = covar[i];
+
+ CheckCovariance();
+
}
void Set(Double_t xyz[3],Double_t pxpypz[3],Double_t cv[21],Short_t sign);
// additional functions for AliVParticle
Double_t Px() const;
Double_t Py() const;
- Double_t Pz() const;
+ Double_t Pz() const { return Pt()*GetTgl(); }
Double_t Pt() const { return TMath::Abs(GetSignedPt()); }
Double_t P() const { return GetP(); }
Bool_t PxPyPz(Double_t p[3]) const { return GetPxPyPz(p); }
Double_t Xv() const;
Double_t Yv() const;
- Double_t Zv() const;
+ Double_t Zv() const {return GetZ();}
Bool_t XvYvZv(Double_t x[3]) const { return GetXYZ(x); }
Double_t OneOverPt() const { return 1./Pt(); }
void GetDZ(Double_t x,Double_t y,Double_t z,Double_t b,Float_t dz[2]) const;
Double_t GetD(Double_t xv, Double_t yv, Double_t b) const;
Double_t GetLinearD(Double_t xv, Double_t yv) const;
+
Bool_t CorrectForMeanMaterial(Double_t xOverX0, Double_t xTimesRho,
Double_t mass, Bool_t anglecorr=kFALSE,
Double_t (*f)(Double_t)=AliExternalTrackParam::BetheBlochSolid);
+ Bool_t CorrectForMeanMaterialdEdx(Double_t xOverX0, Double_t xTimesRho,
+ Double_t mass, Double_t dEdx, Bool_t anglecorr=kFALSE);
+
+ Bool_t CorrectForMeanMaterialZA(Double_t xOverX0, Double_t xTimesRho,
+ Double_t mass,
+ Double_t zOverA=0.49848,
+ Double_t density=2.33,
+ Double_t exEnergy=173e-9,
+ Double_t jp1=0.20,
+ Double_t jp2=3.00,
+ Bool_t anglecorr=kFALSE
+ );
+
//
// Bethe-Bloch formula parameterizations
//
Double_t
GetPredictedChi2(Double_t p[3],Double_t covyz[3],Double_t covxyz[3]) const;
+
+ Double_t GetPredictedChi2(const AliExternalTrackParam *t) const;
+
Bool_t
PropagateTo(Double_t p[3],Double_t covyz[3],Double_t covxyz[3],Double_t b);
Bool_t Rotate(Double_t alpha);
Bool_t PropagateTo(Double_t x, Double_t b);
Bool_t Propagate(Double_t alpha, Double_t x, Double_t b);
+ Bool_t PropagateBxByBz(Double_t alpha, Double_t x, Double_t b[3]);
void Propagate(Double_t len,Double_t x[3],Double_t p[3],Double_t bz) const;
Bool_t Intersect(Double_t pnt[3], Double_t norm[3], Double_t bz) const;
Double_t PropagateToDCA(AliExternalTrackParam *p, Double_t b);
Bool_t PropagateToDCA(const AliVVertex *vtx, Double_t b, Double_t maxd,
Double_t dz[2]=0, Double_t cov[3]=0);
+ Bool_t PropagateToDCABxByBz(const AliVVertex *vtx, Double_t b[3],
+ Double_t maxd, Double_t dz[2]=0, Double_t cov[3]=0);
void GetDirection(Double_t d[3]) const;
Bool_t GetPxPyPz(Double_t *p) const;
Bool_t GetDistance(AliExternalTrackParam *param2, Double_t x, Double_t dist[3], Double_t b);
Int_t GetIndex(Int_t i, Int_t j) const;
Int_t GetLabel() const {return -1;}
+ Int_t PdgCode() const {return 0;}
+
//
// visualization (M. Ivanov)
//
virtual Bool_t Translate(Double_t *vTrasl,Double_t *covV);
- protected:
+ void CheckCovariance();
+
+/* protected: */
+ private:
Double_t &Par(Int_t i) {return fP[i];}
Double_t &Cov(Int_t i) {return fC[i];}
//
// Reset the covarince matrix to "something big"
//
- fC[0]*= s2;
- fC[1] = 0.; fC[2]*= s2;
- fC[3] = 0.; fC[4] = 0.; fC[5]*= s2;
- fC[6] = 0.; fC[7] = 0.; fC[8] = 0.; fC[9]*= s2;
- fC[10]= 0.; fC[11]= 0.; fC[12]= 0.; fC[13]= 0.; fC[14]*=s2;
+
+ s2 = TMath::Abs(s2);
+ Double_t fC0=fC[0]*s2,
+ fC2=fC[2]*s2,
+ fC5=fC[5]*s2,
+ fC9=fC[9]*s2,
+ fC14=fC[14]*s2;
+
+ if (fC0>kC0max) fC0 = kC0max;
+ if (fC2>kC2max) fC2 = kC2max;
+ if (fC5>kC5max) fC5 = kC5max;
+ if (fC9>kC9max) fC9 = kC9max;
+ if (fC14>kC14max) fC14 = kC14max;
+
+
+ fC[0] = fC0;
+ fC[1] = 0.; fC[2] = fC2;
+ fC[3] = 0.; fC[4] = 0.; fC[5] = fC5;
+ fC[6] = 0.; fC[7] = 0.; fC[8] = 0.; fC[9] = fC9;
+ fC[10]= 0.; fC[11]= 0.; fC[12]= 0.; fC[13]= 0.; fC[14] = fC14;
}