Changes for #80876: Change in AliTOFPIDResponse
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 13 Apr 2011 15:16:45 +0000 (15:16 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 13 Apr 2011 15:16:45 +0000 (15:16 +0000)
STEER/AliTOFPIDResponse.cxx
STEER/AliTOFPIDResponse.h

index fefc2ad..f22e60e 100644 (file)
@@ -33,6 +33,11 @@ AliTOFPIDResponse::AliTOFPIDResponse():
   fPmax(0),         // zero at 0.5 GeV/c for pp
   fTime0(0)
 {
+  fPar[0] = 0.;
+  fPar[1] = 0.;
+  fPar[2] = 0.018;
+  fPar[3] = 50.0;
+
   // Reset T0 info
   ResetT0info();
   SetMomBoundary();
@@ -50,6 +55,11 @@ AliTOFPIDResponse::AliTOFPIDResponse(Double_t *param):
 
   //fPmax=TMath::Exp(-0.5*3*3)/fSigma; // ~3 sigma at 0.5 GeV/c for PbPb 
 
+  fPar[0] = 0.;
+  fPar[1] = 0.;
+  fPar[2] = 0.018;
+  fPar[3] = 50.0;
+
   // Reset T0 info
   ResetT0info();
   SetMomBoundary();
@@ -76,7 +86,7 @@ Double_t AliTOFPIDResponse::GetExpectedSigma(Float_t mom, Float_t time, Float_t
   // If the operation is not possible, return a negative value.
   //
 
-  Double_t dpp=0.018*mass/mom;      //mean relative pt resolution;
+  Double_t dpp=fPar[0] + fPar[1]*mom + fPar[2]*mass/mom;      //mean relative pt resolution;
 
  
   Double_t sigma = dpp*time/(1.+ mom*mom/(mass*mass));
@@ -85,7 +95,7 @@ Double_t AliTOFPIDResponse::GetExpectedSigma(Float_t mom, Float_t time, Float_t
 
   Double_t t0res = fT0resolution[index];
 
-  return TMath::Sqrt(sigma*sigma + 50.0*50.0/mom/mom + fSigma*fSigma + t0res*t0res);
+  return TMath::Sqrt(sigma*sigma + fPar[3]*fPar[3]/mom/mom + fSigma*fSigma + t0res*t0res);
 
 }
 //_________________________________________________________________________
index 0fe65e4..014f13b 100644 (file)
@@ -51,6 +51,10 @@ public:
   Float_t  GetStartTimeRes(Float_t mom) const;
   Int_t    GetStartTimeMask(Float_t mom) const;
 
+  // Tracking resolution for expected times
+  void SetTrackParameter(Int_t ip,Float_t value){if(ip>=0 && ip < 4) fPar[ip] = value;};
+  Float_t GetTrackParameter(Int_t ip){if(ip>=0 && ip < 4) return fPar[ip]; else return -1.0;};
+
  private:
   Double_t fSigma;        // intrinsic TOF resolution
 
@@ -65,8 +69,9 @@ public:
   Float_t fT0resolution[fNmomBins]; // t0 (best, T0, T0-TOF, ...) resolution as a function of p 
   Float_t fPCutMin[fNmomBins+1]; // min values for p bins
   Int_t fMaskT0[fNmomBins]; // mask withthe T0 used (0x1=T0-TOF,0x2=T0A,0x3=TOC) for p bins
+  Float_t fPar[4]; // parameter for expected times resolution
 
-  ClassDef(AliTOFPIDResponse,3)   // TOF PID class
+  ClassDef(AliTOFPIDResponse,4)   // TOF PID class
 };
 
 #endif