]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STEER/AliITSPidParams.h
Fixes for Coverity warnings
[u/mrichter/AliRoot.git] / STEER / AliITSPidParams.h
CommitLineData
b536a002 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 */
5
6/* $Id: $ */
7
8///////////////////////////////////////////////////////////////////
9// //
10// Class to store parameters of ITS response funcions //
11// Origin: F.Prino, Torino, prino@to.infn.it //
12// //
13///////////////////////////////////////////////////////////////////
14
15#include <TFormula.h>
16#include <TNamed.h>
17
18class AliITSPidParams : public TNamed {
19
20 public:
21 AliITSPidParams();
22 AliITSPidParams(Char_t * name);
23 ~AliITSPidParams();
24
8abeb05b 25 void InitMC();
b536a002 26 Double_t GetLandauGausNormPdgCode(Double_t dedx, Int_t pdgCode, Double_t mom, Int_t lay) const;
27 Double_t GetLandauGausNorm(Double_t dedx, Int_t partType, Double_t mom, Int_t lay) const;
28
29 // pion setters
09e17991 30 void SetSDDPionMPV(const TFormula* form){
b536a002 31 if(fSDDPionMPV) delete fSDDPionMPV;
32 fSDDPionMPV=new TFormula(*form);
33 }
09e17991 34 void SetSDDPionLandauWidth(const TFormula* form){
b536a002 35 if(fSDDPionLandauWidth) delete fSDDPionLandauWidth;
36 fSDDPionLandauWidth=new TFormula(*form);
37 }
09e17991 38 void SetSDDPionGaussWidth(const TFormula* form){
b536a002 39 if(fSDDPionGaussWidth) delete fSDDPionGaussWidth;
40 fSDDPionGaussWidth=new TFormula(*form);
41 }
09e17991 42 void SetSSDPionMPV(const TFormula* form){
b536a002 43 if(fSSDPionMPV) delete fSSDPionMPV;
44 fSSDPionMPV=new TFormula(*form);
45 }
09e17991 46 void SetSSDPionLandauWidth(const TFormula* form){
b536a002 47 if(fSSDPionLandauWidth) delete fSSDPionLandauWidth;
48 fSSDPionLandauWidth=new TFormula(*form);
49 }
09e17991 50 void SetSSDPionGaussWidth(const TFormula* form){
b536a002 51 if(fSSDPionGaussWidth) delete fSSDPionGaussWidth;
52 fSSDPionGaussWidth=new TFormula(*form);
53 }
54
55 // kaon setters
09e17991 56 void SetSDDKaonMPV(const TFormula* form){
b536a002 57 if(fSDDKaonMPV) delete fSDDKaonMPV;
58 fSDDKaonMPV=new TFormula(*form);
59 }
09e17991 60 void SetSDDKaonLandauWidth(const TFormula* form){
b536a002 61 if(fSDDKaonLandauWidth) delete fSDDKaonLandauWidth;
62 fSDDKaonLandauWidth=new TFormula(*form);
63 }
09e17991 64 void SetSDDKaonGaussWidth(const TFormula* form){
b536a002 65 if(fSDDKaonGaussWidth) delete fSDDKaonGaussWidth;
66 fSDDKaonGaussWidth=new TFormula(*form);
67 }
09e17991 68 void SetSSDKaonMPV(const TFormula* form){
b536a002 69 if(fSSDKaonMPV) delete fSSDKaonMPV;
70 fSSDKaonMPV=new TFormula(*form);
71 }
09e17991 72 void SetSSDKaonLandauWidth(const TFormula* form){
b536a002 73 if(fSSDKaonLandauWidth) delete fSSDKaonLandauWidth;
74 fSSDKaonLandauWidth=new TFormula(*form);
75 }
09e17991 76 void SetSSDKaonGaussWidth(const TFormula* form){
b536a002 77 if(fSSDKaonGaussWidth) delete fSSDKaonGaussWidth;
78 fSSDKaonGaussWidth=new TFormula(*form);
79 }
80
81
82 // proton setters
09e17991 83 void SetSDDProtMPV(const TFormula* form){
b536a002 84 if(fSDDProtMPV) delete fSDDProtMPV;
85 fSDDProtMPV=new TFormula(*form);
86 }
09e17991 87 void SetSDDProtLandauWidth(const TFormula* form){
b536a002 88 if(fSDDProtLandauWidth) delete fSDDProtLandauWidth;
89 fSDDProtLandauWidth=new TFormula(*form);
90 }
09e17991 91 void SetSDDProtGaussWidth(const TFormula* form){
b536a002 92 if(fSDDProtGaussWidth) delete fSDDProtGaussWidth;
93 fSDDProtGaussWidth=new TFormula(*form);
94 }
09e17991 95 void SetSSDProtMPV(const TFormula* form){
b536a002 96 if(fSSDProtMPV) delete fSSDProtMPV;
97 fSSDProtMPV=new TFormula(*form);
98 }
09e17991 99 void SetSSDProtLandauWidth(const TFormula* form){
b536a002 100 if(fSSDProtLandauWidth) delete fSSDProtLandauWidth;
101 fSSDProtLandauWidth=new TFormula(*form);
102 }
09e17991 103 void SetSSDProtGaussWidth(const TFormula* form){
b536a002 104 if(fSSDProtGaussWidth) delete fSSDProtGaussWidth;
105 fSSDProtGaussWidth=new TFormula(*form);
106 }
107
108
109 // pion getters
110 Double_t GetSDDPionMPV(Double_t mom) const {
111 return fSDDPionMPV->Eval(mom);
112 }
113 Double_t GetSDDPionLandauWidth(Double_t mom) const {
114 return fSDDPionLandauWidth->Eval(mom);
115 }
116 Double_t GetSDDPionGaussWidth(Double_t mom) const {
117 return fSDDPionGaussWidth->Eval(mom);
118 }
119 Double_t GetSSDPionMPV(Double_t mom) const {
120 return fSSDPionMPV->Eval(mom);
121 }
122 Double_t GetSSDPionLandauWidth(Double_t mom) const {
123 return fSSDPionLandauWidth->Eval(mom);
124 }
125 Double_t GetSSDPionGaussWidth(Double_t mom) const {
126 return fSSDPionGaussWidth->Eval(mom);
127 }
128
129 // kaon getters
130 Double_t GetSDDKaonMPV(Double_t mom) const {
131 return fSDDKaonMPV->Eval(mom);
132 }
133 Double_t GetSDDKaonLandauWidth(Double_t mom) const {
134 return fSDDKaonLandauWidth->Eval(mom);
135 }
136 Double_t GetSDDKaonGaussWidth(Double_t mom) const {
137 return fSDDKaonGaussWidth->Eval(mom);
138 }
139 Double_t GetSSDKaonMPV(Double_t mom) const {
140 return fSSDKaonMPV->Eval(mom);
141 }
142 Double_t GetSSDKaonLandauWidth(Double_t mom) const {
143 return fSSDKaonLandauWidth->Eval(mom);
144 }
145 Double_t GetSSDKaonGaussWidth(Double_t mom) const {
146 return fSSDKaonGaussWidth->Eval(mom);
147 }
148
149 // proton getters
150 Double_t GetSDDProtMPV(Double_t mom) const {
151 return fSDDProtMPV->Eval(mom);
152 }
153 Double_t GetSDDProtLandauWidth(Double_t mom) const {
154 return fSDDProtLandauWidth->Eval(mom);
155 }
156 Double_t GetSDDProtGaussWidth(Double_t mom) const {
157 return fSDDProtGaussWidth->Eval(mom);
158 }
159 Double_t GetSSDProtMPV(Double_t mom) const {
160 return fSSDProtMPV->Eval(mom);
161 }
162 Double_t GetSSDProtLandauWidth(Double_t mom) const {
163 return fSSDProtLandauWidth->Eval(mom);
164 }
165 Double_t GetSSDProtGaussWidth(Double_t mom) const {
166 return fSSDProtGaussWidth->Eval(mom);
167 }
168
169 private:
170
171 AliITSPidParams(const AliITSPidParams& rec);
172 AliITSPidParams& operator=(const AliITSPidParams &source);
173
174 TFormula* fSDDPionMPV; // pion dE/dx MPV vs. p in SDD
175 TFormula* fSDDPionLandauWidth; // pion dE/dx Landau width vs. p in SDD
176 TFormula* fSDDPionGaussWidth; // pion dE/dx Gaussian width vs. p in SDD
177
178 TFormula* fSSDPionMPV; // pion dE/dx MPV vs. p in SSD
179 TFormula* fSSDPionLandauWidth; // pion dE/dx Landau width vs. p in SSD
180 TFormula* fSSDPionGaussWidth; // pion dE/dx Gaussian width vs. p in SSD
181
182 TFormula* fSDDKaonMPV; // kaon dE/dx MPV vs. p in SDD
183 TFormula* fSDDKaonLandauWidth; // kaon dE/dx Landau width vs. p in SDD
184 TFormula* fSDDKaonGaussWidth; // kaon dE/dx Gaussian width vs. p in SDD
185
186 TFormula* fSSDKaonMPV; // kaon dE/dx MPV vs. p in SSD
187 TFormula* fSSDKaonLandauWidth; // kaon dE/dx Landau width vs. p in SSD
188 TFormula* fSSDKaonGaussWidth; // kaon dE/dx Gaussian width vs. p in SSD
189
190 TFormula* fSDDProtMPV; // kaon dE/dx MPV vs. p in SDD
191 TFormula* fSDDProtLandauWidth; // kaon dE/dx Landau width vs. p in SDD
192 TFormula* fSDDProtGaussWidth; // kaon dE/dx Gaussian width vs. p in SDD
193
194 TFormula* fSSDProtMPV; // kaon dE/dx MPV vs. p in SSD
195 TFormula* fSSDProtLandauWidth; // kaon dE/dx Landau width vs. p in SSD
196 TFormula* fSSDProtGaussWidth; // kaon dE/dx Gaussian width vs. p in SSD
197
198 ClassDef(AliITSPidParams,1);
199};
200#endif