]>
Commit | Line | Data |
---|---|---|
10d100d4 | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
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 | **************************************************************************/ | |
15 | ||
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 | //----------------------------------------------------------------- | |
24 | ||
25 | #include "AliTPCPIDResponse.h" | |
26 | #include "AliExternalTrackParam.h" | |
27 | ||
28 | ClassImp(AliTPCPIDResponse) | |
29 | ||
30 | //_________________________________________________________________________ | |
31 | AliTPCPIDResponse::AliTPCPIDResponse(): | |
32 | fMIP(50.), | |
33 | fRes0(0.07), | |
34 | fResN2(0.), | |
53da3401 | 35 | fKp1(0.0283086), |
36 | fKp2(2.63394e+01), | |
37 | fKp3(5.04114e-11), | |
38 | fKp4(2.12543), | |
39 | fKp5(4.88663) | |
10d100d4 | 40 | { |
41 | // | |
42 | // The default constructor | |
43 | // | |
44 | } | |
45 | ||
46 | //_________________________________________________________________________ | |
47 | AliTPCPIDResponse::AliTPCPIDResponse(Double_t *param): | |
48 | fMIP(param[0]), | |
49 | fRes0(param[1]), | |
50 | fResN2(param[2]), | |
53da3401 | 51 | fKp1(0.0283086), |
52 | fKp2(2.63394e+01), | |
53 | fKp3(5.04114e-11), | |
54 | fKp4(2.12543), | |
55 | fKp5(4.88663) | |
10d100d4 | 56 | { |
57 | // | |
58 | // The main constructor | |
59 | // | |
60 | } | |
61 | ||
62 | Double_t AliTPCPIDResponse::Bethe(Double_t betaGamma) const { | |
63 | // | |
64 | // This is the Bethe-Bloch function normalised to 1 at the minimum | |
65 | // WARNING | |
66 | // Simulated and reconstructed Bethe-Bloch differs | |
67 | // Simulated curve is the dNprim/dx | |
68 | // Reconstructed is proportianal dNtot/dx | |
69 | // Temporary fix for production - Simple linear correction function | |
70 | // Future 2 Bethe Bloch formulas needed | |
71 | // 1. for simulation | |
72 | // 2. for reconstructed PID | |
73 | // | |
d999f2e6 | 74 | // const Float_t kmeanCorrection =0.1; |
10d100d4 | 75 | Double_t bb= |
76 | AliExternalTrackParam::BetheBlochAleph(betaGamma,fKp1,fKp2,fKp3,fKp4,fKp5); | |
77 | return bb*fMIP; | |
78 | } | |
79 | ||
80 | //_________________________________________________________________________ | |
81 | void AliTPCPIDResponse::SetBetheBlochParameters(Double_t kp1, | |
82 | Double_t kp2, | |
83 | Double_t kp3, | |
84 | Double_t kp4, | |
85 | Double_t kp5) { | |
86 | // | |
87 | // Set the parameters of the ALEPH Bethe-Bloch formula | |
88 | // | |
89 | fKp1=kp1; | |
90 | fKp2=kp2; | |
91 | fKp3=kp3; | |
92 | fKp4=kp4; | |
93 | fKp5=kp5; | |
94 | } | |
95 | //_________________________________________________________________________ | |
96 | void AliTPCPIDResponse::SetSigma(Float_t res0, Float_t resN2) { | |
97 | // | |
98 | // Set the relative resolution sigma_rel = res0 * sqrt(1+resN2/npoint) | |
99 | // | |
100 | fRes0 = res0; | |
101 | fResN2 = resN2; | |
102 | } | |
103 | ||
104 | //_________________________________________________________________________ | |
105 | Double_t AliTPCPIDResponse::GetExpectedSignal(const Float_t mom, | |
106 | AliPID::EParticleType n) const { | |
107 | // | |
108 | // Calculates the expected PID signal as the function of | |
109 | // the information stored in the track, for the specified particle type | |
110 | // | |
111 | // At the moment, these signals are just the results of calling the | |
112 | // Bethe-Bloch formula. | |
113 | // This can be improved. By taking into account the number of | |
114 | // assigned clusters and/or the track dip angle, for example. | |
115 | // | |
116 | ||
117 | Double_t mass=AliPID::ParticleMass(n); | |
118 | return Bethe(mom/mass); | |
119 | } | |
120 | ||
121 | //_________________________________________________________________________ | |
122 | Double_t AliTPCPIDResponse::GetExpectedSigma(const Float_t mom, | |
123 | const Int_t nPoints, | |
124 | AliPID::EParticleType n) const { | |
125 | // | |
126 | // Calculates the expected sigma of the PID signal as the function of | |
127 | // the information stored in the track, for the specified particle type | |
128 | // | |
129 | // | |
130 | ||
131 | if (nPoints != 0) | |
132 | return GetExpectedSignal(mom,n)*fRes0*sqrt(1. + fResN2/nPoints); | |
133 | else | |
134 | return GetExpectedSignal(mom,n)*fRes0; | |
135 | } |