1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
16 //-----------------------------------------------------------------//
18 // Implementation of the TOF PID class //
19 // Origin: Iouri Belikov, CERN, Jouri.Belikov@cern.ch //
21 //-----------------------------------------------------------------//
26 #include "AliTOFPIDResponse.h"
28 ClassImp(AliTOFPIDResponse)
30 //_________________________________________________________________________
31 AliTOFPIDResponse::AliTOFPIDResponse():
33 fPmax(0), // zero at 0.5 GeV/c for pp
40 //_________________________________________________________________________
41 AliTOFPIDResponse::AliTOFPIDResponse(Double_t *param):
43 fPmax(0), // zero at 0.5 GeV/c for pp
47 // The main constructor
51 //fPmax=TMath::Exp(-0.5*3*3)/fSigma; // ~3 sigma at 0.5 GeV/c for PbPb
57 //_________________________________________________________________________
59 AliTOFPIDResponse::GetMismatchProbability(Double_t p, Double_t mass) const {
61 // Returns the probability of mismatching
62 // assuming 1/(p*beta)^2 scaling
64 const Double_t km=0.5; // "reference" momentum (GeV/c)
66 Double_t ref2=km*km*km*km/(km*km + mass*mass);// "reference" (p*beta)^2
67 Double_t p2beta2=p*p*p*p/(p*p + mass*mass);
69 return fPmax*ref2/p2beta2;
71 //_________________________________________________________________________
72 Double_t AliTOFPIDResponse::GetExpectedSigma(Float_t mom, Float_t time, Float_t mass) const {
74 // Return the expected sigma of the PID signal for the specified
76 // If the operation is not possible, return a negative value.
79 Double_t dpp=0.018*mass/mom; //mean relative pt resolution;
82 Double_t sigma = dpp*time/(1.+ mom*mom/(mass*mass));
84 Int_t index = GetMomBin(mom);
86 Double_t t0res = fT0resolution[index];
88 return TMath::Sqrt(sigma*sigma + 50.0*50.0/mom/mom + fSigma*fSigma + t0res*t0res);
91 //_________________________________________________________________________
92 Int_t AliTOFPIDResponse::GetMomBin(Float_t p) const{
94 while(p > fPCutMin[i] && i < fNmomBins) i++;
99 //_________________________________________________________________________
100 void AliTOFPIDResponse::SetMomBoundary(){