1 #ifndef ALIITSPIDPARAMS_H
2 #define ALIITSPIDPARAMS_H
3 /* Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
8 ///////////////////////////////////////////////////////////////////
10 // Class to store parameters of ITS response functions //
11 // Origin: F.Prino, Torino, prino@to.infn.it //
13 ///////////////////////////////////////////////////////////////////
19 class AliITSPidParams : public TNamed {
22 AliITSPidParams(Bool_t isMC = kFALSE);
23 AliITSPidParams(Char_t * name, Bool_t isMC = kFALSE);
28 Double_t GetLandauGausNormPdgCode(Double_t dedx, Int_t pdgCode, Double_t mom, Int_t lay) const;
29 Double_t GetLandauGausNorm(Double_t dedx, Int_t partType, Double_t mom, Int_t lay) const;
32 void SetSDDElecMPVparams(const Double_t* params){
33 for(Int_t ipar=0; ipar<5; ipar++) fSDDElecMPVBetheParams[ipar]=params[ipar];
35 void SetSSDElecMPVparams(const Double_t* params){
36 for(Int_t ipar=0; ipar<5; ipar++) fSSDElecMPVBetheParams[ipar]=params[ipar];
38 void SetSDDElecLandauWidth(const TFormula* form){
39 if(fSDDElecLandauWidth) delete fSDDElecLandauWidth;
40 fSDDElecLandauWidth=new TFormula(*form);
42 void SetSDDElecGaussWidth(const TFormula* form){
43 if(fSDDElecGaussWidth) delete fSDDElecGaussWidth;
44 fSDDElecGaussWidth=new TFormula(*form);
46 void SetSSDElecLandauWidth(const TFormula* form){
47 if(fSSDElecLandauWidth) delete fSSDElecLandauWidth;
48 fSSDElecLandauWidth=new TFormula(*form);
50 void SetSSDElecGaussWidth(const TFormula* form){
51 if(fSSDElecGaussWidth) delete fSSDElecGaussWidth;
52 fSSDElecGaussWidth=new TFormula(*form);
56 void SetSDDHadronMPVparams(const Double_t* params){
57 for(Int_t ipar=0; ipar<5; ipar++) fSDDHadronMPVBetheParams[ipar]=params[ipar];
59 void SetSSDHadronMPVparams(const Double_t* params){
60 for(Int_t ipar=0; ipar<5; ipar++) fSSDHadronMPVBetheParams[ipar]=params[ipar];
64 void SetSDDPionLandauWidth(const TFormula* form){
65 if(fSDDPionLandauWidth) delete fSDDPionLandauWidth;
66 fSDDPionLandauWidth=new TFormula(*form);
68 void SetSDDPionGaussWidth(const TFormula* form){
69 if(fSDDPionGaussWidth) delete fSDDPionGaussWidth;
70 fSDDPionGaussWidth=new TFormula(*form);
72 void SetSSDPionLandauWidth(const TFormula* form){
73 if(fSSDPionLandauWidth) delete fSSDPionLandauWidth;
74 fSSDPionLandauWidth=new TFormula(*form);
76 void SetSSDPionGaussWidth(const TFormula* form){
77 if(fSSDPionGaussWidth) delete fSSDPionGaussWidth;
78 fSSDPionGaussWidth=new TFormula(*form);
82 void SetSDDKaonLandauWidth(const TFormula* form){
83 if(fSDDKaonLandauWidth) delete fSDDKaonLandauWidth;
84 fSDDKaonLandauWidth=new TFormula(*form);
86 void SetSDDKaonGaussWidth(const TFormula* form){
87 if(fSDDKaonGaussWidth) delete fSDDKaonGaussWidth;
88 fSDDKaonGaussWidth=new TFormula(*form);
90 void SetSSDKaonLandauWidth(const TFormula* form){
91 if(fSSDKaonLandauWidth) delete fSSDKaonLandauWidth;
92 fSSDKaonLandauWidth=new TFormula(*form);
94 void SetSSDKaonGaussWidth(const TFormula* form){
95 if(fSSDKaonGaussWidth) delete fSSDKaonGaussWidth;
96 fSSDKaonGaussWidth=new TFormula(*form);
100 void SetSDDProtLandauWidth(const TFormula* form){
101 if(fSDDProtLandauWidth) delete fSDDProtLandauWidth;
102 fSDDProtLandauWidth=new TFormula(*form);
104 void SetSDDProtGaussWidth(const TFormula* form){
105 if(fSDDProtGaussWidth) delete fSDDProtGaussWidth;
106 fSDDProtGaussWidth=new TFormula(*form);
108 void SetSSDProtLandauWidth(const TFormula* form){
109 if(fSSDProtLandauWidth) delete fSSDProtLandauWidth;
110 fSSDProtLandauWidth=new TFormula(*form);
112 void SetSSDProtGaussWidth(const TFormula* form){
113 if(fSSDProtGaussWidth) delete fSSDProtGaussWidth;
114 fSSDProtGaussWidth=new TFormula(*form);
118 Double_t GetSDDElecMPV(Double_t mom) const {
119 Double_t mass = AliPID::ParticleMass(AliPID::kElectron);
120 return BetheBloch(mom,mass,fSDDElecMPVBetheParams);
122 Double_t GetSDDElecLandauWidth(Double_t mom) const {
123 return fSDDElecLandauWidth->Eval(mom);
125 Double_t GetSDDElecGaussWidth(Double_t mom) const {
126 return fSDDElecGaussWidth->Eval(mom);
128 Double_t GetSSDElecMPV(Double_t mom) const {
129 Double_t mass = AliPID::ParticleMass(AliPID::kElectron);
130 return BetheBloch(mom,mass,fSSDElecMPVBetheParams);
132 Double_t GetSSDElecLandauWidth(Double_t mom) const {
133 return fSSDElecLandauWidth->Eval(mom);
135 Double_t GetSSDElecGaussWidth(Double_t mom) const {
136 return fSSDElecGaussWidth->Eval(mom);
140 Double_t GetSDDPionMPV(Double_t mom) const {
141 Double_t mass = AliPID::ParticleMass(AliPID::kPion);
142 return BetheBloch(mom,mass,fSDDHadronMPVBetheParams);
144 Double_t GetSDDPionLandauWidth(Double_t mom) const {
145 return fSDDPionLandauWidth->Eval(mom);
147 Double_t GetSDDPionGaussWidth(Double_t mom) const {
148 return fSDDPionGaussWidth->Eval(mom);
150 Double_t GetSSDPionMPV(Double_t mom) const {
151 Double_t mass = AliPID::ParticleMass(AliPID::kPion);
152 return BetheBloch(mom,mass,fSSDHadronMPVBetheParams);
154 Double_t GetSSDPionLandauWidth(Double_t mom) const {
155 return fSSDPionLandauWidth->Eval(mom);
157 Double_t GetSSDPionGaussWidth(Double_t mom) const {
158 return fSSDPionGaussWidth->Eval(mom);
162 Double_t GetSDDKaonMPV(Double_t mom) const {
163 Double_t mass = AliPID::ParticleMass(AliPID::kKaon);
164 return BetheBloch(mom,mass,fSDDHadronMPVBetheParams);
166 Double_t GetSDDKaonLandauWidth(Double_t mom) const {
168 mom = (mom > xmin) ? mom : xmin;
169 return fSDDKaonLandauWidth->Eval(mom);
171 Double_t GetSDDKaonGaussWidth(Double_t mom) const {
173 mom = (mom > xmin) ? mom : xmin;
174 return fSDDKaonGaussWidth->Eval(mom);
176 Double_t GetSSDKaonMPV(Double_t mom) const {
177 Double_t mass = AliPID::ParticleMass(AliPID::kKaon);
178 return BetheBloch(mom,mass,fSSDHadronMPVBetheParams);
180 Double_t GetSSDKaonLandauWidth(Double_t mom) const {
182 mom = (mom > xmin) ? mom : xmin;
183 return fSSDKaonLandauWidth->Eval(mom);
185 Double_t GetSSDKaonGaussWidth(Double_t mom) const {
187 mom = (mom > xmin) ? mom : xmin;
188 return fSSDKaonGaussWidth->Eval(mom);
192 Double_t GetSDDProtMPV(Double_t mom) const {
193 Double_t mass = AliPID::ParticleMass(AliPID::kProton);
194 return BetheBloch(mom,mass,fSDDHadronMPVBetheParams);
196 Double_t GetSDDProtLandauWidth(Double_t mom) const {
198 mom = (mom > xmin) ? mom : xmin;
199 return fSDDProtLandauWidth->Eval(mom);
201 Double_t GetSDDProtGaussWidth(Double_t mom) const {
203 mom = (mom > xmin) ? mom : xmin;
204 return fSDDProtGaussWidth->Eval(mom);
206 Double_t GetSSDProtMPV(Double_t mom) const {
207 Double_t mass = AliPID::ParticleMass(AliPID::kProton);
208 return BetheBloch(mom,mass,fSSDHadronMPVBetheParams);
210 Double_t GetSSDProtLandauWidth(Double_t mom) const {
212 mom = (mom > xmin) ? mom : xmin;
213 return fSSDProtLandauWidth->Eval(mom);
215 Double_t GetSSDProtGaussWidth(Double_t mom) const {
217 mom = (mom > xmin) ? mom : xmin;
218 return fSSDProtGaussWidth->Eval(mom);
223 AliITSPidParams(const AliITSPidParams& rec);
224 AliITSPidParams& operator=(const AliITSPidParams &source);
226 Double_t BetheBloch(Double_t mom, Double_t mass, const Double_t* p) const;
227 Double_t ExtrapolateWidth(Double_t mom, Double_t x1, Double_t y1, Double_t x2, Double_t y2) const;
229 // Electron parameterizations
230 Double_t fSDDElecMPVBetheParams[5]; // Electron bethe block parameters in SDD
231 Double_t fSSDElecMPVBetheParams[5]; // Electron bethe block parameters in SSD
233 TFormula* fSDDElecLandauWidth; // Electron dE/dx Landau width vs. p in SDD
234 TFormula* fSDDElecGaussWidth; // Electron dE/dx Gaussian width vs. p in SDD
236 TFormula* fSSDElecLandauWidth; // Electron dE/dx Landau width vs. p in SSD
237 TFormula* fSSDElecGaussWidth; // Electron dE/dx Gaussian width vs. p in SSD
239 // Hadron parameterizations
240 Double_t fSDDHadronMPVBetheParams[5]; // hadrons bethe block parameters in SDD
241 Double_t fSSDHadronMPVBetheParams[5]; // hadrons bethe block parameters in SSD
243 TFormula* fSDDPionLandauWidth; // pion dE/dx Landau width vs. p in SDD
244 TFormula* fSDDPionGaussWidth; // pion dE/dx Gaussian width vs. p in SDD
246 TFormula* fSSDPionLandauWidth; // pion dE/dx Landau width vs. p in SSD
247 TFormula* fSSDPionGaussWidth; // pion dE/dx Gaussian width vs. p in SSD
249 TFormula* fSDDKaonLandauWidth; // kaon dE/dx Landau width vs. p in SDD
250 TFormula* fSDDKaonGaussWidth; // kaon dE/dx Gaussian width vs. p in SDD
252 TFormula* fSSDKaonLandauWidth; // kaon dE/dx Landau width vs. p in SSD
253 TFormula* fSSDKaonGaussWidth; // kaon dE/dx Gaussian width vs. p in SSD
255 TFormula* fSDDProtLandauWidth; // Proton dE/dx Landau width vs. p in SDD
256 TFormula* fSDDProtGaussWidth; // Proton dE/dx Gaussian width vs. p in SDD
258 TFormula* fSSDProtLandauWidth; // Proton dE/dx Landau width vs. p in SSD
259 TFormula* fSSDProtGaussWidth; // Proton dE/dx Gaussian width vs. p in SSD
263 ClassDef(AliITSPidParams,2);