FairRoot/PandaRoot
Public Member Functions | Protected Member Functions | Protected Attributes | Private Types | Private Member Functions | Private Attributes | List of all members
PndFsmMvdPid Class Reference

#include <PndFsmMvdPid.h>

Inheritance diagram for PndFsmMvdPid:
PndFsmAbsDet

Public Member Functions

 PndFsmMvdPid ()
 
 PndFsmMvdPid (ArgList &par)
 
virtual ~PndFsmMvdPid ()
 
virtual PndFsmResponserespond (PndFsmTrack *t)
 
const std::string & detName ()
 
void setName (std::string &name)
 
Bool_t doesPid () const
 
void setStorePid (Bool_t doespid=kTRUE)
 

Protected Member Functions

virtual bool setParameter (std::string &name, std::string &value)
 
void parseParameterList (ArgList &par)
 

Protected Attributes

std::string _detName
 
double _efficiency
 
TRandom3 * _rand
 
TDatabasePDG * _fdbPDG
 
Bool_t _doesPid
 

Private Types

enum  { nPidType = 5 }
 
enum  PidType {
  electron, muon, pion, kaon,
  proton
}
 

Private Member Functions

bool detected (PndFsmTrack *t) const
 
void initParameters ()
 
void print (std::ostream &o)
 
bool setParameter (std::string &name, double value)
 
double MeanEnergyLoss (PidType particle)
 
double LandauGaus (double s_mpv, double width1, double width2)
 
double Likelihood (PidType particle)
 
double mpv (PidType particle)
 
double width1 (PidType particle)
 
double width2 (PidType particle)
 

Private Attributes

double _thtMin
 
double _thtMax
 
double _ptmin
 
double _dEdxResMulti
 
double _momentum
 
double _energyloss
 

Detailed Description

Definition at line 41 of file PndFsmMvdPid.h.

Member Enumeration Documentation

anonymous enum
private
Enumerator
nPidType 

Definition at line 78 of file PndFsmMvdPid.h.

enum PndFsmMvdPid::PidType
private
Enumerator
electron 
muon 
pion 
kaon 
proton 

Definition at line 79 of file PndFsmMvdPid.h.

Constructor & Destructor Documentation

PndFsmMvdPid::PndFsmMvdPid ( )

Default ctor.

Definition at line 34 of file PndFsmMvdPid.cxx.

References _thtMax, _thtMin, and initParameters().

35 {
37 
38  _thtMin=_thtMin*M_PI/180.0;
39  _thtMax=_thtMax*M_PI/180.0;
40  //print(std::cout);
41 }
void initParameters()
double _thtMin
Definition: PndFsmMvdPid.h:73
double _thtMax
Definition: PndFsmMvdPid.h:74
PndFsmMvdPid::PndFsmMvdPid ( ArgList par)

Definition at line 43 of file PndFsmMvdPid.cxx.

References _thtMax, _thtMin, initParameters(), and PndFsmAbsDet::parseParameterList().

44 {
46  //set default parameter values and parses a parameter list
47  //i.e. std::list<std::string> of the form
48  //"a=1" "b=2" "c=3"
50 
51  _thtMin=_thtMin*M_PI/180.0;
52  _thtMax=_thtMax*M_PI/180.0;
53  //print(std::cout);
54 }
Double_t par[3]
void parseParameterList(ArgList &par)
void initParameters()
double _thtMin
Definition: PndFsmMvdPid.h:73
double _thtMax
Definition: PndFsmMvdPid.h:74
PndFsmMvdPid::~PndFsmMvdPid ( )
virtual

Destructor

Definition at line 60 of file PndFsmMvdPid.cxx.

61 {
62 }

Member Function Documentation

bool PndFsmMvdPid::detected ( PndFsmTrack t) const
private

Definition at line 117 of file PndFsmMvdPid.cxx.

References PndFsmAbsDet::_efficiency, _ptmin, PndFsmAbsDet::_rand, _thtMin, PndFsmTrack::charge(), PndFsmTrack::p4(), and theta.

Referenced by respond().

118 {
119  double theta = t->p4().Theta();
120  double p_t=t->p4().Vect().Perp(TVector3(0.,0.,1.));
121  double charge=t->charge();
122 
123  return ( charge!=0.0 && theta>=_thtMin && theta<=_thtMax && p_t>_ptmin && _rand->Rndm()<=_efficiency);
124 }
double _efficiency
Definition: PndFsmAbsDet.h:93
double _ptmin
Definition: PndFsmMvdPid.h:75
double charge()
Definition: PndFsmTrack.h:75
TRandom3 * _rand
Definition: PndFsmAbsDet.h:94
TLorentzVector p4()
Definition: PndFsmTrack.h:72
double _thtMin
Definition: PndFsmMvdPid.h:73
const std::string& PndFsmAbsDet::detName ( )
inlineinherited
Bool_t PndFsmAbsDet::doesPid ( ) const
inlineinherited

Definition at line 76 of file PndFsmAbsDet.h.

References PndFsmAbsDet::_doesPid.

Referenced by PndFastSim::Register(), and PndFastSim::smearTrack().

76 {return _doesPid;};
Bool_t _doesPid
Definition: PndFsmAbsDet.h:96
void PndFsmMvdPid::initParameters ( )
privatevirtual

Reimplemented from PndFsmAbsDet.

Definition at line 139 of file PndFsmMvdPid.cxx.

References _dEdxResMulti, PndFsmAbsDet::_detName, PndFsmAbsDet::_efficiency, _ptmin, _thtMax, and _thtMin.

Referenced by PndFsmMvdPid().

140 {
141  _detName = "MvdPid";
142  _thtMin = 5.0;
143  _thtMax = 160.0;
144  _ptmin = 0.0;
145  _dEdxResMulti = 1.00; //normal energy loss resolution
146  _efficiency = 1.0;
147 }
double _efficiency
Definition: PndFsmAbsDet.h:93
double _ptmin
Definition: PndFsmMvdPid.h:75
std::string _detName
Definition: PndFsmAbsDet.h:92
double _dEdxResMulti
Definition: PndFsmMvdPid.h:76
double _thtMin
Definition: PndFsmMvdPid.h:73
double _thtMax
Definition: PndFsmMvdPid.h:74
double PndFsmMvdPid::LandauGaus ( double  s_mpv,
double  width1,
double  width2 
)
private

Definition at line 192 of file PndFsmMvdPid.cxx.

References CAMath::Abs(), c1, c2, f1, f2, h, i, and x.

Referenced by Likelihood().

192  {
193  // this is the adapted TF1::Integral function from
194  // ROOT 5.14. GOTOs have been removed and interval
195  // division has been modified to maximize performance
196 
197  if (widthone<=0)
198  return TMath::Gaus(s_mpv, 0, widthtwo, true);
199  else if (widthtwo<=0)
200  return TMath::Landau(s_mpv, 0, widthone, true);
201  else {
202  static double x[12] = { 0.96028985649753623, 0.79666647741362674,
203  0.52553240991632899, 0.18343464249564980,
204  0.98940093499164993, 0.94457502307323258,
205  0.86563120238783174, 0.75540440835500303,
206  0.61787624440264375, 0.45801677765722739,
207  0.28160355077925891, 0.09501250983763744};
208 
209  static double w[12] = { 0.10122853629037626, 0.22238103445337447,
210  0.31370664587788729, 0.36268378337836198,
211  0.02715245941175409, 0.06225352393864789,
212  0.09515851168249278, 0.12462897125553387,
213  0.14959598881657673, 0.16915651939500254,
214  0.18260341504492359, 0.18945061045506850};
215 
216  double h, bb, aa, c1, c2, u, s8, s16, f1, f2;
217  double xx;
218  bool redo=true;
219  int i;
220 
221  h = 0;
222  aa = -5.0*widthtwo;
223  bb = -2.5*widthtwo;
224 
225  do {
226  c1 = 0.5*(bb+aa);
227  c2 = 0.5*(bb-aa);
228 
229  s8 = 0;
230  for (i=0;i<4;i++) {
231  u = c2*x[i];
232  xx = c1+u;
233  f1 = TMath::Landau(s_mpv+xx, 0, widthone, true)*TMath::Gaus(xx, 0, widthtwo, true);
234  xx = c1-u;
235  f2 = TMath::Landau(s_mpv+xx, 0, widthone, true)*TMath::Gaus(xx, 0, widthtwo, true);
236  s8+= w[i]*(f1 + f2);
237  }
238  s16 = 0;
239  for (i=4;i<12;i++) {
240  u = c2*x[i];
241  xx = c1+u;
242  f1 = TMath::Landau(s_mpv+xx, 0, widthone, true)*TMath::Gaus(xx, 0, widthtwo, true);
243  xx = c1-u;
244  f2 = TMath::Landau(s_mpv+xx, 0, widthone, true)*TMath::Gaus(xx, 0, widthtwo, true);
245  s16+= w[i]*(f1 + f2);
246  }
247  s16 = c2*s16;
248  if (TMath::Abs(s16-c2*s8) <= 1e-12*(s16+1) ) {
249  aa =bb;
250  bb+=2*c2*1.5;
251  if (bb>=5*widthtwo) {
252  bb=5*widthtwo;
253  redo=false;
254  }
255  h += s16;
256  } else
257  bb = c1;
258  } while (redo);
259  return h;
260  }
261 }
Int_t i
Definition: run_full.C:25
TF1 * f1
Definition: reco_analys2.C:50
c2
Definition: plot_dirc.C:39
static T Abs(const T &x)
Definition: PndCAMath.h:39
c1
Definition: plot_dirc.C:35
Double_t x
TFile * f2
double PndFsmMvdPid::Likelihood ( PidType  particle)
private

Definition at line 263 of file PndFsmMvdPid.cxx.

References _dEdxResMulti, _energyloss, LandauGaus(), MeanEnergyLoss(), mpv(), width1(), and width2().

Referenced by respond().

263  {
264  return LandauGaus( _energyloss - MeanEnergyLoss(part) - mpv(part), width1(part), width2(part)*_dEdxResMulti );
265 }
double LandauGaus(double s_mpv, double width1, double width2)
double width1(PidType particle)
double width2(PidType particle)
double mpv(PidType particle)
double MeanEnergyLoss(PidType particle)
double _dEdxResMulti
Definition: PndFsmMvdPid.h:76
double _energyloss
Definition: PndFsmMvdPid.h:95
double PndFsmMvdPid::MeanEnergyLoss ( PidType  particle)
private

Definition at line 178 of file PndFsmMvdPid.cxx.

References _momentum, c, electron, log(), Mass, and nPidType.

Referenced by Likelihood(), and respond().

178  {
179  //Calculate the lower boundary of the energy loss distribution.
180 
181  //[GeV]
182  static float eb=0.14e-6;
183  //[m/s]
184  static float c=2.99792458e8;
185  //[GeV/c**2]
186  static float Mass[nPidType]={ 0.511e-3, 0.1058, 0.1396, 0.4937, 0.9383 };
187 
188  double sqrBeta=1/(1+pow(Mass[part]/_momentum,2));
189  return 4.9312e-05 * (log(2*Mass[electron]*c*c/eb*sqrBeta/(1-sqrBeta))-sqrBeta)/sqrBeta;
190 };
friend F32vec4 log(const F32vec4 &a)
Definition: P4_F32vec4.h:110
double _momentum
Definition: PndFsmMvdPid.h:94
double PndFsmMvdPid::mpv ( PidType  particle)
private

Definition at line 267 of file PndFsmMvdPid.cxx.

References _momentum, c1, electron, kaon, muon, pion, proton, x, and x0.

Referenced by Likelihood(), and respond().

267  {
268  double x=_momentum;
269  double x0=0;
270  double x1=0;
271  double c0=0;
272  double c1=0;
273  double d1=0;
274  double a3=0;
275  double a4=0;
276  double a5=0;
277 
278  switch(part) {
279  case proton:
280  x0 = 0.45;
281  x1 = 1.3;
282  c0 = 0.383451e-03;
283  c1 = -0.126986e-03;
284  d1 = -5.21351e-06;
285  a3 = -3.05821;
286  a4 = 24.6356;
287  a5 = -68.632;
288  break;
289  case kaon:
290  x0 = 0.25;
291  x1 = 1.05;
292  c0 = 0.326259e-03;
293  c1 = -7.68052e-05;
294  d1 = 1.51033e-05;
295  a3 = -19.6615;
296  a4 = 264.382;
297  a5 = -1238.09;
298  break;
299  case pion:
300  x0 = 0.1;
301  x1 = 1.0;
302  c0 = 0.274692e-03;
303  c1 = 3.2571e-05;
304  d1 = 9.16527e-06;
305  a5 = -6624.05;
306  break;
307  case muon:
308  x0 = 0.15;
309  x1 = 1.15;
310  a3 = 4.33244;
311  a4 = -107.686;
312  a5 = 699.522;
313  c0 = 0.248749e-03;
314  c1 = 6.57118e-05;
315  d1 = -4.09447e-06;
316  break;
317  case electron:
318  x1 = 1.20;
319  c0 = 2.93999e-03;
320  c1 = 1.76792e-05;
321  break;
322  }
323  if (x>=x1)
324  return c0+c1*(x1-x0)+d1*(x-x1);
325  if (x>=x0)
326  return c0+c1*(x-x0);
327  else
328  return c0+c1*(x-x0)+pow(x0-x,3)*(a3+(x0-x)*(a4+(x0-x)*a5));
329 }
Double_t x0
Definition: checkhelixhit.C:70
double _momentum
Definition: PndFsmMvdPid.h:94
c1
Definition: plot_dirc.C:35
Double_t x
void PndFsmAbsDet::parseParameterList ( ArgList par)
protectedinherited

Definition at line 119 of file PndFsmAbsDet.cxx.

References CStrTok::GetFirst(), CStrTok::GetNext(), name, and PndFsmAbsDet::setParameter().

Referenced by PndFsmAbsDet::PndFsmAbsDet(), PndFsmCmpDet::PndFsmCmpDet(), PndFsmCombiDet::PndFsmCombiDet(), PndFsmDetTemplate::PndFsmDetTemplate(), PndFsmDrcBarrel::PndFsmDrcBarrel(), PndFsmDrcDisc::PndFsmDrcDisc(), PndFsmEffTracker::PndFsmEffTracker(), PndFsmEmcBarrel::PndFsmEmcBarrel(), PndFsmEmcBwCap::PndFsmEmcBwCap(), PndFsmEmcFS::PndFsmEmcFS(), PndFsmEmcFwCap::PndFsmEmcFwCap(), PndFsmEmcPid::PndFsmEmcPid(), PndFsmIdealPid::PndFsmIdealPid(), PndFsmMdcFS::PndFsmMdcFS(), PndFsmMdcTS::PndFsmMdcTS(), PndFsmMdtPid::PndFsmMdtPid(), PndFsmMvd::PndFsmMvd(), PndFsmMvd2::PndFsmMvd2(), PndFsmMvdPid(), PndFsmRich::PndFsmRich(), PndFsmSimpleTracker::PndFsmSimpleTracker(), PndFsmSimpleVtx::PndFsmSimpleVtx(), PndFsmStt::PndFsmStt(), PndFsmSttPid::PndFsmSttPid(), and PndFsmTof::PndFsmTof().

120 {
121  // ArgList is a std::list<std::string> of the form ("a=1","b=2","c=3","d=4")
122 
123  // Default values for the parameters
124 
125  CStrTok tokenizer;
126  char csrc[200];
127 
128  if (par.size() != 0) {
129 
130  //cout <<"Parameters for detector <"<<_detName<<">"<<endl;
131  for(ArgList::const_iterator argIt=par.begin(); argIt!=par.end();argIt++) {
132 
133  const char *src=argIt->data();
134  strcpy(csrc,src);
135 
136  char* token = tokenizer.GetFirst(csrc,"=");
137  string name(token);
138  //cout <<"variable: -" << name << "- ";
139  token = tokenizer.GetNext("=");
140 
141  double value = atof(token);
142  string strvalue(token);
143 
144  //cout <<"value: -"<<value<<"- "<<endl;
145 
146  if (value!=0 || strvalue=="0" || strvalue=="0.0" || strvalue=="0.")
147  {
148  if (!setParameter(name,value))
149  cout <<" -W- (PndFsmAbsDet::parseParameterList) Unknown Parameter: <"<<name<< endl;
150  }
151  else
152  {
153  if (!setParameter(name,strvalue))
154  cout <<" -W- (PndFsmAbsDet::parseParameterList) Unknown Parameter: <"<<name<< endl;
155  }
156 
157  }
158  }
159 
160  /*
161  if (par.size() != 0) {
162 
163  //cout <<"Parameters for detector <"<<_detName<<">"<<endl;
164  for(ArgList::const_iterator argIt=par.begin(); argIt!=par.end();argIt++) {
165  typedef boost::tokenizer<boost::char_separator<char> > tokenizer;
166  boost::char_separator<char> sep("=");
167  tokenizer tokens(*argIt, sep);
168  tokenizer::iterator tok_iter = tokens.begin();
169  string name(*tok_iter);
170  ++tok_iter;
171  double value=atof((*tok_iter).c_str());
172 
173  //cout <<"<"<<name<<"> = "<<value<<endl;
174 
175  string name("efficiency");
176  double value=0.99;
177  if (!setParameter(name,value))
178  cout <<" -W- Unknown Parameter: <"<<name<<"> in PndFsmAbsDet::parseParameterList" << endl;
179  }
180  }
181  */
182  //print(std::cout);
183 
184 }
Double_t par[3]
char * GetFirst(char *lpsz, const char *lpcszDelimiters)
Definition: StrTok.cxx:29
TString name
Definition: StrTok.h:11
virtual bool setParameter(std::string &name, double value)
char * GetNext(const char *lpcszDelimiters)
Definition: StrTok.cxx:37
void PndFsmMvdPid::print ( std::ostream o)
privatevirtual

Reimplemented from PndFsmAbsDet.

Definition at line 128 of file PndFsmMvdPid.cxx.

References _dEdxResMulti, PndFsmAbsDet::_efficiency, _ptmin, _thtMax, _thtMin, and PndFsmAbsDet::detName().

129 {
130  o <<"Parameters for detector <"<<detName()<<">"<<endl;
131  o <<" _thtMin = "<<_thtMin<<endl;
132  o <<" _thtMax = "<<_thtMax<<endl;
133  o <<" _ptmin = "<<_ptmin<<endl;
134  o <<" _dEdxResMulti = "<<100*_dEdxResMulti<< "\%" << endl;
135  o <<" _efficiency = "<<_efficiency<<endl;
136 }
double _efficiency
Definition: PndFsmAbsDet.h:93
double _ptmin
Definition: PndFsmMvdPid.h:75
const std::string & detName()
Definition: PndFsmAbsDet.h:74
double _dEdxResMulti
Definition: PndFsmMvdPid.h:76
double _thtMin
Definition: PndFsmMvdPid.h:73
double _thtMax
Definition: PndFsmMvdPid.h:74
PndFsmResponse * PndFsmMvdPid::respond ( PndFsmTrack t)
virtual

Accessors to contained information

Implements PndFsmAbsDet.

Definition at line 69 of file PndFsmMvdPid.cxx.

References _dEdxResMulti, _energyloss, _momentum, PndFsmAbsDet::_rand, PndFsmTrack::charge(), detected(), electron, fabs(), kaon, Likelihood(), MeanEnergyLoss(), mpv(), muon, PndFsmTrack::p4(), PndFsmTrack::pdt(), pion, proton, PndFsmResponse::setDetected(), PndFsmResponse::setDetector(), PndFsmResponse::setLHElectron(), PndFsmResponse::setLHKaon(), PndFsmResponse::setLHMuon(), PndFsmResponse::setLHPion(), PndFsmResponse::setLHProton(), PndFsmResponse::setMvddEdx(), width1(), and width2().

70 {
71  PndFsmResponse *result=new PndFsmResponse();
72 
73  result->setDetector(this);
74  bool wasDetected=detected(t);
75  result->setDetected(wasDetected);
76 
77  if (wasDetected && fabs(t->charge())>1e-8)
78  {
79  //select particle
80  PidType part;
81  switch(abs(t->pdt())) {
82  case 2212:part=proton; break;
83  case 321: part=kaon; break;
84  case 211: part=pion; break;
85  case 13: part=muon; break;
86  case 11: part=electron; break;
87  }
88 
89  //build random energy loss
90  _momentum = t->p4().Vect().Mag();
91  _energyloss = MeanEnergyLoss(part) + mpv(part) + _rand->Landau(0, width1(part)) + _rand->Gaus(0, width2(part))*_dEdxResMulti;
92 
93  //store random energy loss
94  result->setMvddEdx(_energyloss/1e-3);
95 
96  //store energy loss
97  if (_momentum>=0 && _momentum<=2.5) {
99  result->setLHMuon(Likelihood(muon));
100  result->setLHPion(Likelihood(pion));
101  result->setLHKaon(Likelihood(kaon));
102  result->setLHProton(Likelihood(proton));
103  } else {
104  result->setLHElectron(0.2);
105  result->setLHMuon(0.2);
106  result->setLHPion(0.2);
107  result->setLHKaon(0.2);
108  result->setLHProton(0.2);
109  }
110  }
111 
112  return result;
113 }
void setLHElectron(double val)
void setLHProton(double val)
bool detected(PndFsmTrack *t) const
double width1(PidType particle)
void setLHMuon(double val)
double charge()
Definition: PndFsmTrack.h:75
double _momentum
Definition: PndFsmMvdPid.h:94
TRandom3 * _rand
Definition: PndFsmAbsDet.h:94
double width2(PidType particle)
double mpv(PidType particle)
double Likelihood(PidType particle)
TLorentzVector p4()
Definition: PndFsmTrack.h:72
void setDetector(PndFsmAbsDet *detector)
void setLHKaon(double val)
friend F32vec4 fabs(const F32vec4 &a)
Definition: P4_F32vec4.h:47
double MeanEnergyLoss(PidType particle)
double _dEdxResMulti
Definition: PndFsmMvdPid.h:76
void setDetected(bool isdet)
double _energyloss
Definition: PndFsmMvdPid.h:95
void setMvddEdx(double val, double err=0)
void setLHPion(double val)
void PndFsmAbsDet::setName ( std::string &  name)
inlineinherited

Definition at line 75 of file PndFsmAbsDet.h.

References PndFsmAbsDet::_detName, and name.

Referenced by PndFsmDetFactory::create().

75 {_detName = name;};
TString name
std::string _detName
Definition: PndFsmAbsDet.h:92
bool PndFsmMvdPid::setParameter ( std::string &  name,
double  value 
)
privatevirtual

Reimplemented from PndFsmAbsDet.

Definition at line 150 of file PndFsmMvdPid.cxx.

References _dEdxResMulti, PndFsmAbsDet::_efficiency, _ptmin, _thtMax, and _thtMin.

151 {
152  // *****************
153  // include here all parameters which should be settable via tcl
154  // *****************
155 
156  bool knownName=true;
157 
158  if (name == "thtMin")
159  _thtMin=value;
160  else
161  if (name == "thtMax")
162  _thtMax=value;
163  else
164  if (name == "ptmin")
165  _ptmin=value;
166  else
167  if (name == "dEdxResMulti")
168  _dEdxResMulti=value;
169  else
170  if (name == "efficiency")
171  _efficiency=value;
172  else
173  knownName=false;
174 
175  return knownName;
176 }
double _efficiency
Definition: PndFsmAbsDet.h:93
double _ptmin
Definition: PndFsmMvdPid.h:75
TString name
double _dEdxResMulti
Definition: PndFsmMvdPid.h:76
double _thtMin
Definition: PndFsmMvdPid.h:73
double _thtMax
Definition: PndFsmMvdPid.h:74
bool PndFsmAbsDet::setParameter ( std::string &  name,
std::string &  value 
)
protectedvirtualinherited

Reimplemented in PndFsmDrcBarrel, PndFsmDrcDisc, PndFsmCombiDet, and PndFsmCmpDet.

Definition at line 99 of file PndFsmAbsDet.cxx.

100 {
101  return false;
102 }
void PndFsmAbsDet::setStorePid ( Bool_t  doespid = kTRUE)
inlineinherited

Definition at line 77 of file PndFsmAbsDet.h.

References PndFsmAbsDet::_doesPid.

Referenced by PndFsmDetFactory::create().

77 {_doesPid=doespid;};
Bool_t _doesPid
Definition: PndFsmAbsDet.h:96
double PndFsmMvdPid::width1 ( PidType  particle)
private

Definition at line 331 of file PndFsmMvdPid.cxx.

References _momentum, electron, kaon, muon, pion, proton, and x.

Referenced by Likelihood(), and respond().

331  {
332  double x=_momentum;
333  switch(part) {
334  case proton:
335  if (x>=1.10)
336  return +3.81174e-04+x*(-2.25108e-04+x*+5.45154e-05);
337  else
338  return -5.28145e-05+x*(+8.29883e-04+x*-5.35972e-04);
339  break;
340  case kaon:
341  if (x>=1.05)
342  return +2.61134e-04+x*(-1.30818e-04+x*+3.44165e-05);
343  else
344  return +3.41858e-04+x*(-3.21115e-04+x*+1.37459e-04);
345  break;
346  case pion:
347  if (x>=1.00)
348  return +1.88718e-04+x*(-6.38948e-05+x*+1.78590e-05);
349  else
350  return +1.82872e-04+x*(-1.28373e-04+x*+8.01459e-05);
351  break;
352  case muon:
353  if (x>=1.20)
354  return +1.06142e-04+x*(+3.68777e-05+x*-1.00190e-05);
355  else
356  return +1.89374e-04+x*(-1.46441e-04+x*+9.10813e-05);
357  break;
358  case electron:
359  if (x>1.2) x=1.2;
360  // electrons are constant for momentum > 1.2GeV
361  return +1.27955e-04+x*(-3.15732e-06+x*+9.64736e-06);
362  break;
363  }
364  return 0;
365 }
double _momentum
Definition: PndFsmMvdPid.h:94
Double_t x
double PndFsmMvdPid::width2 ( PidType  particle)
private

Definition at line 367 of file PndFsmMvdPid.cxx.

References _momentum, electron, kaon, muon, pion, proton, and x.

Referenced by Likelihood(), and respond().

367  {
368  double x=_momentum;
369  switch(part) {
370  case proton:
371  if (x>=1.10)
372  return +6.41067e-04+x*(-3.82507e-04+x*+9.03732e-05);
373  else
374  return +6.40328e-04-3.21725e-04*x+3.17708e-05*pow(x,-3);
375  break;
376  case kaon:
377  if (x>=1.05)
378  return +2.22504e-04+x*(-6.40051e-06+x*+2.14434e-06);
379  else
380  return +3.86684e-04-1.61873e-04*x+7.76586e-06*pow(x,-3);
381  break;
382  case pion:
383  if (x>=1.00)
384  return +1.32999e-04+x*(+1.19714e-04+x*-3.53302e-05);
385  else
386  return +2.21603e-04-3.21357e-06*x+4.64793e-06*pow(x,-2);
387  break;
388  case muon:
389  if (x>=1.20)
390  return +7.84582e-05+x*(+1.88988e-04+x*-5.49637e-05);
391  else
392  return +1.67388e-04+5.67991e-05*x+3.42702e-06*pow(x,-2);
393  break;
394  case electron:
395  if (x>1.2) x=1.2;
396  // electrons are constant for momentum > 1.2GeV
397  return +4.08849e-04-3.56548e-05*x+1.84825e-08*pow(x,-3);
398  break;
399  }
400  return 0;
401 }
double _momentum
Definition: PndFsmMvdPid.h:94
Double_t x

Member Data Documentation

double PndFsmMvdPid::_dEdxResMulti
private

Definition at line 76 of file PndFsmMvdPid.h.

Referenced by initParameters(), Likelihood(), print(), respond(), and setParameter().

std::string PndFsmAbsDet::_detName
protectedinherited
Bool_t PndFsmAbsDet::_doesPid
protectedinherited
double PndFsmAbsDet::_efficiency
protectedinherited

Definition at line 93 of file PndFsmAbsDet.h.

Referenced by PndFsmDetTemplate::detected(), PndFsmSimpleTracker::detected(), PndFsmEmcFS::detected(), PndFsmStt::detected(), PndFsmEmcFwCap::detected(), PndFsmMvd2::detected(), PndFsmMdcTS::detected(), PndFsmSimpleVtx::detected(), PndFsmSttPid::detected(), PndFsmMvd::detected(), PndFsmTof::detected(), PndFsmEmcBwCap::detected(), PndFsmMdcFS::detected(), detected(), PndFsmRich::detected(), PndFsmEmcBarrel::detected(), PndFsmDrcDisc::detected(), PndFsmMdtPid::detected(), PndFsmDrcBarrel::detected(), PndFsmEmcPid::detected(), PndFsmEffTracker::detected(), PndFsmSimpleTracker::initParameters(), PndFsmSimpleVtx::initParameters(), PndFsmDetTemplate::initParameters(), initParameters(), PndFsmTof::initParameters(), PndFsmMdtPid::initParameters(), PndFsmEmcPid::initParameters(), PndFsmEmcFwCap::initParameters(), PndFsmRich::initParameters(), PndFsmMdcFS::initParameters(), PndFsmSttPid::initParameters(), PndFsmMdcTS::initParameters(), PndFsmEmcBwCap::initParameters(), PndFsmEmcFS::initParameters(), PndFsmMvd2::initParameters(), PndFsmEmcBarrel::initParameters(), PndFsmDrcDisc::initParameters(), PndFsmDrcBarrel::initParameters(), PndFsmStt::initParameters(), PndFsmMvd::initParameters(), PndFsmEffTracker::initParameters(), PndFsmSimpleTracker::print(), PndFsmSimpleVtx::print(), PndFsmDetTemplate::print(), print(), PndFsmTof::print(), PndFsmMdtPid::print(), PndFsmEmcPid::print(), PndFsmSttPid::print(), PndFsmMdcFS::print(), PndFsmMdcTS::print(), PndFsmEmcBwCap::print(), PndFsmMvd2::print(), PndFsmEmcFS::print(), PndFsmEmcFwCap::print(), PndFsmRich::print(), PndFsmEmcBarrel::print(), PndFsmDrcDisc::print(), PndFsmDrcBarrel::print(), PndFsmStt::print(), PndFsmMvd::print(), PndFsmEffTracker::print(), PndFsmSimpleTracker::setParameter(), PndFsmSimpleVtx::setParameter(), PndFsmDetTemplate::setParameter(), setParameter(), PndFsmMdtPid::setParameter(), PndFsmTof::setParameter(), PndFsmEmcPid::setParameter(), PndFsmMvd2::setParameter(), PndFsmEmcFS::setParameter(), PndFsmSttPid::setParameter(), PndFsmMdcTS::setParameter(), PndFsmEmcFwCap::setParameter(), PndFsmMdcFS::setParameter(), PndFsmRich::setParameter(), PndFsmEmcBwCap::setParameter(), PndFsmEmcBarrel::setParameter(), PndFsmDrcBarrel::setParameter(), PndFsmDrcDisc::setParameter(), PndFsmMvd::setParameter(), PndFsmStt::setParameter(), and PndFsmEffTracker::setParameter().

double PndFsmMvdPid::_energyloss
private

Definition at line 95 of file PndFsmMvdPid.h.

Referenced by Likelihood(), and respond().

TDatabasePDG* PndFsmAbsDet::_fdbPDG
protectedinherited
double PndFsmMvdPid::_momentum
private

Definition at line 94 of file PndFsmMvdPid.h.

Referenced by MeanEnergyLoss(), mpv(), respond(), width1(), and width2().

double PndFsmMvdPid::_ptmin
private

Definition at line 75 of file PndFsmMvdPid.h.

Referenced by detected(), initParameters(), print(), and setParameter().

TRandom3* PndFsmAbsDet::_rand
protectedinherited
double PndFsmMvdPid::_thtMax
private

Definition at line 74 of file PndFsmMvdPid.h.

Referenced by initParameters(), PndFsmMvdPid(), print(), and setParameter().

double PndFsmMvdPid::_thtMin
private

Definition at line 73 of file PndFsmMvdPid.h.

Referenced by detected(), initParameters(), PndFsmMvdPid(), print(), and setParameter().


The documentation for this class was generated from the following files: