method to tune TOF tail added to TOF reponse (F. Noferini)
authorzampolli <chiara.zampolli@cern.ch>
Thu, 23 Oct 2014 15:01:11 +0000 (17:01 +0200)
committerzampolli <chiara.zampolli@cern.ch>
Thu, 23 Oct 2014 15:01:11 +0000 (17:01 +0200)
STEER/STEERBase/AliTOFPIDResponse.cxx
STEER/STEERBase/AliTOFPIDResponse.h

index da46aa7..4ce8f17 100644 (file)
@@ -106,6 +106,21 @@ void AliTOFPIDResponse::SetTOFtail(Float_t tail){
     fTOFtailResponse->SetParameter(3,tail);
   }
 }
+void AliTOFPIDResponse::SetTOFtailAllPara(Float_t mean,Float_t tail){
+  if(!fTOFtailResponse){
+    fTOFtailResponse = new TF1("fTOFtail","[0]*TMath::Exp(-(x-[1])*(x-[1])/2/[2]/[2])* (x < [1]+[3]*[2]) + (x > [1]+[3]*[2])*[0]*TMath::Exp(-(x-[1]-[3]*[2]*0.5)*[3]/[2] * 0.0111)*0.018",-1000,1000);
+    fTOFtailResponse->SetParameter(0,1);
+    fTOFtailResponse->SetParameter(1,mean);
+    fTOFtailResponse->SetParameter(2,1);
+    fTOFtailResponse->SetParameter(3,tail);
+    fTOFtailResponse->SetNpx(10000);
+  }
+  else{
+    fTOFtailResponse->SetParameter(1,mean);
+    fTOFtailResponse->SetParameter(3,tail);
+  }  
+}
+
 //_________________________________________________________________________
 Double_t 
 AliTOFPIDResponse::GetMismatchProbability(Double_t time,Double_t eta) const {
index c4b0dcd..4c2a4b2 100644 (file)
@@ -69,6 +69,7 @@ public:
 
   Float_t GetTOFtail() {if(fTOFtailResponse) return fTOFtailResponse->GetParameter(3);else return -1;};
   void    SetTOFtail(Float_t tail);
+  void    SetTOFtailAllPara(Float_t mean,Float_t tail);
 
  private:
   Double_t fSigma;        // intrinsic TOF resolution