]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Adding position correction to the dEdx (Marian)
authormarian <marian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 28 Aug 2008 21:18:34 +0000 (21:18 +0000)
committermarian <marian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 28 Aug 2008 21:18:34 +0000 (21:18 +0000)
TPC/AliTPCseed.cxx
TPC/AliTPCseed.h

index 113e918ccbc383649b0734734ad746ad8c728819..e5193bb405b999b05296aaffc052aad6a000c03c 100644 (file)
@@ -1034,7 +1034,7 @@ Bool_t AliTPCseed::GetSharedMapBit(int ibit)
 
 
 
-Float_t  AliTPCseed::CookdEdxNorm(Double_t low, Double_t up, Int_t type, Int_t i1, Int_t i2, AliTPCCalPad * gainMap){
+Float_t  AliTPCseed::CookdEdxNorm(Double_t low, Double_t up, Int_t type, Int_t i1, Int_t i2, AliTPCCalPad * gainMap, Bool_t posNorm){
  
   //
   // calculates dedx using the cluster
@@ -1046,6 +1046,7 @@ Float_t  AliTPCseed::CookdEdxNorm(Double_t low, Double_t up, Int_t type, Int_t i
   // normalization parametrization taken from AliTPCClusterParam
   //
   AliTPCClusterParam * parcl = AliTPCClusterParam::Instance();
+  if (!parcl) parcl = AliTPCcalibDB::Instance()->GetClusterParam();
   if (!parcl) return 0;
   Float_t amp[160];
   Int_t   indexes[160];
@@ -1088,7 +1089,16 @@ Float_t  AliTPCseed::CookdEdxNorm(Double_t low, Double_t up, Int_t type, Int_t i
       corr  = parcl->Qnorm(ipad,type,dr,ty,tz);
     }
     amp[ncl]=charge/corr;
-    
+    if (posNorm){
+      //
+      //
+      //
+      corr = parcl->QnormPos(ipad,type, cluster->GetPad(),cluster->GetTimeBin(), cluster->GetZ(),
+                            cluster->GetSigmaY2(),cluster->GetSigmaZ2(),cluster->GetMax(),cluster->GetQ());
+      amp[ncl]/=corr;
+    }
+
+
     amp[ncl] *= 2.0;     // put mean value to channel 50
     if (ipad==0) {
       amp[ncl] /= 0.65; // this we will take form OCDB
index 8762ba7f6d4f6b09f605524c40f2a22f6ef45191..78fdb330f9a5cdf2ecbbdaa41b3e17c726fc35f1 100644 (file)
@@ -137,7 +137,7 @@ class AliTPCseed : public AliTPCtrack {
      const TBits& GetClusterMap() const { return fClusterMap; };
      const TBits& GetSharedMap() const { return fSharedMap; };
 
-     Float_t  CookdEdxNorm(Double_t low=0.05, Double_t up=0.70, Int_t type=0, Int_t i1=0, Int_t i2=159, AliTPCCalPad * gainMap = 0);
+  Float_t  CookdEdxNorm(Double_t low=0.05, Double_t up=0.70, Int_t type=0, Int_t i1=0, Int_t i2=159, AliTPCCalPad * gainMap = 0, Bool_t posNorm=kFALSE);
 
  private:
      //     AliTPCseed & operator = (const AliTPCseed &)