]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
store pt in the tracklet instead of momentum
authorabercuci <abercuci@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 31 Mar 2009 15:07:04 +0000 (15:07 +0000)
committerabercuci <abercuci@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 31 Mar 2009 15:07:04 +0000 (15:07 +0000)
TRD/AliTRDseedV1.cxx
TRD/AliTRDseedV1.h
TRD/qaRec/AliTRDresolution.cxx

index 05c4ab88c8508e591a005eeb2fe048d6460fadd2..c201fe68aa58f8661d966143281b5dcb759451e7 100644 (file)
@@ -77,7 +77,7 @@ AliTRDseedV1::AliTRDseedV1(Int_t det)
   ,fClusterIdx(0)
   ,fN(0)
   ,fDet(det)
-  ,fMom(0.)
+  ,fPt(0.)
   ,fdX(0.)
   ,fX0(0.)
   ,fX(0.)
@@ -123,7 +123,7 @@ AliTRDseedV1::AliTRDseedV1(const AliTRDseedV1 &ref)
   ,fClusterIdx(0)
   ,fN(0)
   ,fDet(-1)
-  ,fMom(0.)
+  ,fPt(0.)
   ,fdX(0.)
   ,fX0(0.)
   ,fX(0.)
@@ -200,7 +200,7 @@ void AliTRDseedV1::Copy(TObject &ref) const
   target.fClusterIdx    = 0;
   target.fN             = fN;
   target.fDet           = fDet;
-  target.fMom           = fMom;
+  target.fPt            = fPt;
   target.fdX            = fdX;
   target.fX0            = fX0;
   target.fX             = fX;
@@ -263,7 +263,7 @@ void AliTRDseedV1::Reset()
   fClusterIdx=0;
   fN=0;
   fDet=-1;
-  fMom=0.;
+  fPt=0.;
   fdX=0.;fX0=0.; fX=0.; fY=0.; fZ=0.;
   fS2Y=0.; fS2Z=0.;
   fC=0.; fChi2 = 0.;
@@ -293,7 +293,7 @@ void AliTRDseedV1::UpDate(const AliTRDtrackV1 *trk)
 
   Double_t fSnp = trk->GetSnp();
   Double_t fTgl = trk->GetTgl();
-  fMom = trk->GetP();
+  fPt = trk->Pt();
   fYref[1] = fSnp/(1. - fSnp*fSnp);
   fZref[1] = fTgl;
   SetCovRef(trk->GetCovariance());
@@ -459,10 +459,10 @@ void AliTRDseedV1::GetClusterXY(const AliTRDcluster *c, Double_t &x, Double_t &y
 
   // drift velocity correction TODO to be moved to the clusterizer
   const Float_t cx[] = {
-    0.0000e+00, 6.0869e-02, -7.0366e-02, -1.4700e-01, -1.6228e-01, -1.3282e-01,
-    -8.7548e-02, -5.3547e-02, -3.2318e-02, -1.7403e-02, -9.6158e-03, -2.7985e-03,
-    -1.1035e-03, -5.1325e-04, 3.9906e-04, 7.6908e-04, 2.5395e-04, -1.7090e-04,
-    -1.8659e-03, -9.8477e-04, -2.2940e-03, -1.3164e-02, -6.6807e-02, -1.5843e-01,
+    1.6402e-01, 7.2917e-02, -6.7848e-02, -1.4529e-01, -1.6279e-01, -1.3116e-01,
+    -8.2712e-02, -4.9453e-02, -2.9501e-02, -1.4543e-02, -6.1749e-03, 3.9221e-04,
+    1.9711e-03, 2.7388e-03, 2.9070e-03, 3.4183e-03, 2.8014e-03, 1.9351e-03,
+    4.9252e-04, 4.5742e-04, 1.2263e-04, -1.2219e-02, -6.9658e-02, -1.6681e-01,
     0.0000e+00,   };
 
   // PRF correction TODO to be replaced by the gaussian 
@@ -555,7 +555,7 @@ Bool_t AliTRDseedV1::CookPID()
   
   // Sets the a priori probabilities
   for(int ispec=0; ispec<AliPID::kSPECIES; ispec++) {
-    fProb[ispec] = pd->GetProbability(ispec, fMom, &fdEdx[0], length, GetPlane());     
+    fProb[ispec] = pd->GetProbability(ispec, GetMomentum(), &fdEdx[0], length, GetPlane());    
   }
 
   return kTRUE;
@@ -1247,8 +1247,8 @@ Bool_t AliTRDseedV1::Fit(Bool_t tilt, Int_t errors)
     // uncalibrated cluster correction 
     // TODO remove
     Double_t x, y; 
-    GetClusterXY(c, x, y);
-    //x = c->GetX(); y = c->GetY();
+    //GetClusterXY(c, x, y);
+    x = c->GetX(); y = c->GetY();
     xc[n]   = fX0 - x;
     yc[n]   = y;
     zc[n]   = c->GetZ();
@@ -1696,7 +1696,7 @@ Bool_t AliTRDseedV1::IsEqual(const TObject *o) const
   //  if ( fChi2Z != inTracklet->GetChi2Z() ) return kFALSE;
 
   if ( fDet != inTracklet->fDet ) return kFALSE;
-  if ( fMom != inTracklet->fMom ) return kFALSE;
+  if ( fPt != inTracklet->fPt ) return kFALSE;
   if ( fdX != inTracklet->fdX ) return kFALSE;
   
   for (Int_t iCluster = 0; iCluster < kNclusters; iCluster++){
index bdf43e0477c3f6613959acb272c9f779cd81b6b8..a863653d41a0a3177a10610d0202aa3a2d765bbf 100644 (file)
@@ -112,7 +112,7 @@ public:
   AliTRDcluster*  GetClusters(Int_t i) const               { return i<0 || i>=kNclusters ? 0x0 : fClusters[i];}
   Int_t     GetIndexes(Int_t i) const{ return i<0 || i>=kNclusters ? -1 : fIndexes[i];}
   Int_t     GetLabels(Int_t i) const { return fLabels[i];}  
-  Double_t  GetMomentum() const      { return fMom;}
+  Float_t   GetMomentum() const      { return fPt*TMath::Sqrt(1.+fZref[1]*fZref[1]);}
   Int_t     GetN() const             { return (Int_t)fN&0x1f;}
   Int_t     GetN2() const            { return GetN();}
   Int_t     GetNUsed() const         { return Int_t((fN>>5)&0x1f);}
@@ -123,6 +123,7 @@ public:
   Int_t     GetPlane() const         { return AliTRDgeometry::GetLayer(fDet);    }
 
   Float_t*  GetProbability(Bool_t force=kFALSE);
+  Float_t   GetPt() const            { return fPt; }
   inline Double_t  GetPID(Int_t is=-1) const;
   Float_t   GetS2Y() const           { return fS2Y;}
   Float_t   GetS2Z() const           { return fS2Z;}
@@ -157,7 +158,7 @@ public:
   void      SetLabels(Int_t *lbls)   { memcpy(fLabels, lbls, 3*sizeof(Int_t)); }
   void      SetKink(Bool_t k)        { SetBit(kKink, k);}
   void      SetStandAlone(Bool_t st) { SetBit(kStandAlone, st); }
-  void      SetMomentum(Double_t mom){ fMom = mom;}
+  void      SetPt(Double_t pt)       { fPt = pt;}
   void      SetOwner();
   void      SetPadPlane(AliTRDpadPlane *p);
   void      SetPadLength(Float_t l)  { fPad[0] = l;}
@@ -200,7 +201,7 @@ private:
   Float_t          fZref[2];                //  Reference z
   Float_t          fYfit[2];                //  Y fit position +derivation
   Float_t          fZfit[2];                //  Z fit position
-  Float_t          fMom;                    //  Momentum estimate @ tracklet [GeV/c]
+  Float_t          fPt;                     //  Momentum estimate @ tracklet [GeV/c]
   Float_t          fdX;                     // length of time bin
   Float_t          fX0;                     // anode wire position
   Float_t          fX;                      // radial position of the tracklet
index 2b67311bef293622f72b8ce9db6c903cd7218d7a..bef9c8254cd03b667437e011a2618212d1c7b4e4 100644 (file)
@@ -380,7 +380,7 @@ TH1* AliTRDresolution::PlotMC(const AliTRDtrackV1 *track)
     z  = fTracklet->GetZref(0) - dx*fTracklet->GetZref(1);
     dz = zt - z;
     dzdx = fTracklet->GetTgl();
-    pt = fTracklet->GetMomentum()/(1.+dzdx*dzdx);
+    pt = fTracklet->GetPt();
     fTracklet->GetCovRef(covR);
 
     ((TH2I*)fContainer->At(kMCtrackY))->Fill(dydx0, dy);
@@ -461,8 +461,8 @@ TH1* AliTRDresolution::PlotMC(const AliTRDtrackV1 *track)
     fTracklet->ResetClusterIter(kFALSE);
     while((c = fTracklet->PrevCluster())){
       Float_t  q = TMath::Abs(c->GetQ());
-      AliTRDseedV1::GetClusterXY(c,x,y);
-      //x = c->GetX(); y = c->GetY();
+      //AliTRDseedV1::GetClusterXY(c,x,y);
+      x = c->GetX(); y = c->GetY();
       z = c->GetZ();
       dx = x0 - x; 
       yt = y0 - dx*dydx0;