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 //-----------------------------------------------------------------
17 // Implementation of the TPC PID class
18 // Very naive one... Should be made better by the detector experts...
19 // Origin: Iouri Belikov, CERN, Jouri.Belikov@cern.ch
20 // With many additions and modifications suggested by
21 // Alexander Kalweit, GSI, alexander.philipp.kalweit@cern.ch
22 // Dariusz Miskowiec, GSI, D.Miskowiec@gsi.de
23 //-----------------------------------------------------------------
26 #include <TObjArray.h>
29 #include "AliExternalTrackParam.h"
31 #include "AliTPCPIDResponse.h"
33 ClassImp(AliTPCPIDResponse)
35 //_________________________________________________________________________
36 AliTPCPIDResponse::AliTPCPIDResponse():
46 fResponseFunctions(AliPID::kUnknown+1)
49 // The default constructor
53 //_________________________________________________________________________
54 AliTPCPIDResponse::AliTPCPIDResponse(const Double_t *param):
64 fResponseFunctions(AliPID::kUnknown+1)
67 // The main constructor
71 //_________________________________________________________________________
72 Double_t AliTPCPIDResponse::Bethe(Double_t betaGamma) const {
74 // This is the Bethe-Bloch function normalised to 1 at the minimum
76 // Simulated and reconstructed Bethe-Bloch differs
77 // Simulated curve is the dNprim/dx
78 // Reconstructed is proportianal dNtot/dx
79 // Temporary fix for production - Simple linear correction function
80 // Future 2 Bethe Bloch formulas needed
82 // 2. for reconstructed PID
85 // const Float_t kmeanCorrection =0.1;
87 AliExternalTrackParam::BetheBlochAleph(betaGamma,fKp1,fKp2,fKp3,fKp4,fKp5);
91 //_________________________________________________________________________
92 void AliTPCPIDResponse::SetBetheBlochParameters(Double_t kp1,
98 // Set the parameters of the ALEPH Bethe-Bloch formula
106 //_________________________________________________________________________
107 void AliTPCPIDResponse::SetSigma(Float_t res0, Float_t resN2) {
109 // Set the relative resolution sigma_rel = res0 * sqrt(1+resN2/npoint)
115 //_________________________________________________________________________
116 Double_t AliTPCPIDResponse::GetExpectedSignal(const Float_t mom,
117 AliPID::EParticleType n) const {
119 // Calculates the expected PID signal as the function of
120 // the information stored in the track, for the specified particle type
122 // At the moment, these signals are just the results of calling the
123 // Bethe-Bloch formula.
124 // This can be improved. By taking into account the number of
125 // assigned clusters and/or the track dip angle, for example.
128 Double_t mass=AliPID::ParticleMass(n);
129 if (!fUseDatabase||fResponseFunctions.GetEntriesFast()>AliPID::kUnknown) return Bethe(mom/mass);
131 TSpline3 * responseFunction = (TSpline3 *) fResponseFunctions.UncheckedAt(n);
132 if (!responseFunction) return Bethe(mom/mass);
133 return fMIP*responseFunction->Eval(mom/mass);
137 //_________________________________________________________________________
138 Double_t AliTPCPIDResponse::GetExpectedSigma(const Float_t mom,
140 AliPID::EParticleType n) const {
142 // Calculates the expected sigma of the PID signal as the function of
143 // the information stored in the track, for the specified particle type
148 return GetExpectedSignal(mom,n)*fRes0*sqrt(1. + fResN2/nPoints);
150 return GetExpectedSignal(mom,n)*fRes0;