]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliTOFPIDResponse.cxx
Changes in QA to be able to process separately different triggers (Ruben)
[u/mrichter/AliRoot.git] / STEER / AliTOFPIDResponse.cxx
index f92d7efdf48290cb30017e1760faeff15d8c692d..f22e60eb690fbca21bd57139e272496960fb236b 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,11 +95,15 @@ 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);
 
 }
 //_________________________________________________________________________
 Int_t AliTOFPIDResponse::GetMomBin(Float_t p) const{
+  //
+  // Returns the momentum bin index
+  //
+
   Int_t i=0;
   while(p > fPCutMin[i] && i < fNmomBins) i++;
   if(i > 0) i--;
@@ -98,6 +112,10 @@ Int_t AliTOFPIDResponse::GetMomBin(Float_t p) const{
 }
 //_________________________________________________________________________
 void AliTOFPIDResponse::SetMomBoundary(){
+  //
+  // Set boundaries for momentum bins
+  //
+
   fPCutMin[0] = 0.3;
   fPCutMin[1] = 0.5;
   fPCutMin[2] = 0.6;
@@ -110,3 +128,33 @@ void AliTOFPIDResponse::SetMomBoundary(){
   fPCutMin[9] = 2;
   fPCutMin[10] = 3;  
 }
+//_________________________________________________________________________
+Float_t AliTOFPIDResponse::GetStartTime(Float_t mom) const {
+  //
+  // Returns event_time value as estimated by TOF combinatorial algorithm
+  //
+
+  Int_t ibin = GetMomBin(mom);
+  return GetT0bin(ibin);
+
+}
+//_________________________________________________________________________
+Float_t AliTOFPIDResponse::GetStartTimeRes(Float_t mom) const {
+  //
+  // Returns event_time resolution as estimated by TOF combinatorial algorithm
+  //
+
+  Int_t ibin = GetMomBin(mom);
+  return GetT0binRes(ibin);
+
+}
+//_________________________________________________________________________
+Int_t AliTOFPIDResponse::GetStartTimeMask(Float_t mom) const {
+  //
+  // Returns event_time mask
+  //
+
+  Int_t ibin = GetMomBin(mom);
+  return GetT0binMask(ibin);
+
+}