#include "AliESDtrack.h"
#include "AliITStrackV2.h"
+const Int_t AliITStrackV2::fgkWARN = 5;
+
ClassImp(AliITStrackV2)
-const Int_t kWARN=5;
//____________________________________________________________________________
AliITStrackV2::AliITStrackV2() : AliKalmanTrack(),
Double_t sP2=GetParameter()[2];
if (TMath::Abs(sP2) >= kAlmost1){
- if (n>kWARN) Warning("Invariant","fP2=%f\n",sP2);
+ if (n>fgkWARN) Warning("Invariant","fP2=%f\n",sP2);
return kFALSE;
}
Double_t sC00=GetCovariance()[0];
if (sC00<=0 || sC00>9.) {
- if (n>kWARN) Warning("Invariant","fC00=%f\n",sC00);
+ if (n>fgkWARN) Warning("Invariant","fC00=%f\n",sC00);
return kFALSE;
}
Double_t sC11=GetCovariance()[2];
if (sC11<=0 || sC11>9.) {
- if (n>kWARN) Warning("Invariant","fC11=%f\n",sC11);
+ if (n>fgkWARN) Warning("Invariant","fC11=%f\n",sC11);
return kFALSE;
}
Double_t sC22=GetCovariance()[5];
if (sC22<=0 || sC22>1.) {
- if (n>kWARN) Warning("Invariant","fC22=%f\n",sC22);
+ if (n>fgkWARN) Warning("Invariant","fC22=%f\n",sC22);
return kFALSE;
}
Double_t sC33=GetCovariance()[9];
if (sC33<=0 || sC33>1.) {
- if (n>kWARN) Warning("Invariant","fC33=%f\n",sC33);
+ if (n>fgkWARN) Warning("Invariant","fC33=%f\n",sC33);
return kFALSE;
}
Double_t sC44=GetCovariance()[14];
if (sC44<=0 /*|| sC44>6e-5*/) {
- if (n>kWARN) Warning("Invariant","fC44=%f\n",sC44);
+ if (n>fgkWARN) Warning("Invariant","fC44=%f\n",sC44);
return kFALSE;
}
return AliTracker::GetBz(r);
}
+//____________________________________________________________________________
+Bool_t AliITStrackV2::
+GetPhiZat(Double_t rk, Double_t &phik, Double_t &zk) const {
+ //------------------------------------------------------------------
+ // This function returns the global cylindrical (phik,zk) of the track
+ // position estimated at the radius rk.
+ // The track curvature is neglected.
+ //------------------------------------------------------------------
+ Double_t d=GetD(0.,0.);
+ if (TMath::Abs(d) > rk) return kFALSE;
+
+ Double_t r=TMath::Sqrt(GetX()*GetX() + GetY()*GetY());
+ Double_t phi=GetAlpha()+TMath::ASin(GetSnp());
+
+ phik=phi+TMath::ASin(d/rk)-TMath::ASin(d/r);
+ zk=GetZ()+GetTgl()*(TMath::Sqrt(rk*rk-d*d) - TMath::Sqrt(r*r-d*d));
+
+ return kTRUE;
+}
+
}
Bool_t GetGlobalXYZat(Double_t r,Double_t &x,Double_t &y,Double_t &z) const;
+ Bool_t GetPhiZat(Double_t r,Double_t &phi,Double_t &z) const;
Int_t Compare(const TObject *o) const;
Int_t GetClusterIndex(Int_t i) const {return fIndex[i];}
protected:
Double_t GetBz() const ;
Double_t fdEdx; // dE/dx
+
+ static const Int_t fgkWARN; //! used for debugging purposes
Float_t fdEdxSample[4]; // array of dE/dx samples b.b.
Int_t fIndex[2*kMaxLayer]; // indices of associated clusters
private:
AliITStrackV2 &operator=(const AliITStrackV2 &tr);
- ClassDef(AliITStrackV2,6) //ITS reconstructed track
+ ClassDef(AliITStrackV2,7) //ITS reconstructed track
};
inline
continue;
}
}
- //
- //find intersection with layer
- Double_t x,y,z;
- if (!currenttrack1.GetGlobalXYZat(r,x,y,z)) {
- continue;
- }
- Double_t phi=TMath::ATan2(y,x);
+
+ Double_t phi,z;
+ if (!currenttrack1.GetPhiZat(r,phi,z)) continue;
+
Int_t idet=layer.FindDetectorIndex(phi,z);
if (idet<0) {
continue;
}
//
- Double_t x,y,z;
- if (!t->GetGlobalXYZat(r,x,y,z)) {
- return kFALSE;
- }
- Double_t phi=TMath::ATan2(y,x);
+ Double_t phi,z;
+ if (!t->GetPhiZat(r,phi,z)) return kFALSE;
+
Int_t idet=layer.FindDetectorIndex(phi,z);
if (idet<0) {
return kFALSE;
}
+
const AliITSdetector &det=layer.GetDetector(idet);
phi=det.GetPhi();
if (!t->Propagate(phi,det.GetR())) {
t->GetGlobalXYZat(t->GetX(),oldX,oldY,oldZ);
}
//
+ Double_t phi,z;
+ if (!t->GetPhiZat(r,phi,z)) return kFALSE;
- Double_t x,y,z;
- if (!t->GetGlobalXYZat(r,x,y,z)) {
- return kFALSE;
- }
- Double_t phi=TMath::ATan2(y,x);
Int_t idet=layer.FindDetectorIndex(phi,z);
if (idet<0) {
return kFALSE;
Double_t GetR() const {return fR;}
Int_t FindClusterIndex(Float_t z) const;
AliITSRecPoint *GetCluster(Int_t i) const {return i<fN? fClusters[i]:0;}
- Float_t *GetWeight(Int_t i) {return i<fN ?&fClusterWeight[i]:0;}
+ Float_t *GetWeight(Int_t i) {return i<fN ?&fClusterWeight[i]:0;}
AliITSdetector &GetDetector(Int_t n) const { return fDetectors[n]; }
Int_t FindDetectorIndex(Double_t phi, Double_t z) const;
Double_t GetThickness(Double_t y, Double_t z, Double_t &x0) const;
}
//find intersection
- Double_t x,y,z;
- if (!fTrackToFollow.GetGlobalXYZat(r,x,y,z)) {
+ Double_t phi,z;
+ if (!fTrackToFollow.GetPhiZat(r,phi,z)) {
//Warning("FollowProlongation","failed to estimate track !\n");
return;
}
- Double_t phi=TMath::ATan2(y,x);
Int_t idet=layer.FindDetectorIndex(phi,z);
if (idet<0) {
}
//
- Double_t x,y,z;
- if (!t->GetGlobalXYZat(r,x,y,z)) {
+ Double_t phi,z;
+ if (!t->GetPhiZat(r,phi,z)) {
return kFALSE;
}
- Double_t phi=TMath::ATan2(y,x);
+
Int_t idet=layer.FindDetectorIndex(phi,z);
if (idet<0) {
return kFALSE;