]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Modifications in order to reconstruct cosmic rays (Y. Belikov)
authormasera <masera@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 5 Apr 2007 09:09:23 +0000 (09:09 +0000)
committermasera <masera@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 5 Apr 2007 09:09:23 +0000 (09:09 +0000)
ITS/AliITStrackV2.cxx
ITS/AliITStrackV2.h
ITS/AliITStrackerMI.cxx
ITS/AliITStrackerMI.h
ITS/AliITStrackerV2.cxx

index 3985365808d8b2bc2efd6efe98f440fa07048437..15048d232f9c473dbaa943cd095bba8cc565bf0d 100644 (file)
 #include "AliESDtrack.h"
 #include "AliITStrackV2.h"
 
+const Int_t AliITStrackV2::fgkWARN = 5;
+
 ClassImp(AliITStrackV2)
 
-const Int_t kWARN=5;
 
 //____________________________________________________________________________
 AliITStrackV2::AliITStrackV2() : AliKalmanTrack(),
@@ -194,32 +195,32 @@ Bool_t AliITStrackV2::Invariant() const {
 
   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;
   }
 
@@ -337,3 +338,23 @@ Double_t AliITStrackV2::GetBz() const {
   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;
+}
+
index 113d437a3562344278a307cfe354b79309132813..bf7c174105f9415ce6416d2ac8b393f853a96e51 100644 (file)
@@ -56,6 +56,7 @@ public:
   }
 
   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];}
@@ -67,6 +68,8 @@ public:
 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 
@@ -75,7 +78,7 @@ protected:
 
 private:
   AliITStrackV2 &operator=(const AliITStrackV2 &tr);
-  ClassDef(AliITStrackV2,6)  //ITS reconstructed track
+  ClassDef(AliITStrackV2,7)  //ITS reconstructed track
 };
 
 inline
index 63588b4c878ed0f43c6abc891544500bf840ba96..da661c3984d94ee6e0a8f6589d0cca507222d495 100644 (file)
@@ -743,13 +743,10 @@ void AliITStrackerMI::FollowProlongationTree(AliITStrackMI * otrack, Int_t esdin
          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;
@@ -1697,15 +1694,14 @@ Bool_t AliITStrackerMI::RefitAt(Double_t xx,AliITStrackMI *t,
      }
      //
 
-     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())) {
@@ -1845,12 +1841,9 @@ AliITStrackerMI::RefitAt(Double_t xx,AliITStrackMI *t,const Int_t *clindex) {
         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;
index 7c6ea58f542c4a20752a8c9f752ae12c3e6bee2f..1778c9881264b71dca0eda935b22049da2058fa8 100644 (file)
@@ -94,7 +94,7 @@ public:
     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;
index d1b4c1309a23edcd21a082f0f84f84e46cdc0b16..0597776f4516f629007abe15e679c00e2565d4b4 100644 (file)
@@ -481,12 +481,11 @@ void AliITStrackerV2::FollowProlongation() {
     }
 
     //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) {
@@ -1025,11 +1024,11 @@ Bool_t AliITStrackerV2::RefitAt(Double_t xx,AliITStrackV2 *t,
      }
      //
 
-     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;