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

#include <PndFsmMvd2.h>

Inheritance diagram for PndFsmMvd2:
PndFsmAbsDet

Public Member Functions

 PndFsmMvd2 ()
 
 PndFsmMvd2 (ArgList &par)
 
virtual ~PndFsmMvd2 ()
 
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
 
double dp (PndFsmTrack *t) const
 
double dphi (PndFsmTrack *t) const
 
double dtheta (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 _radiationLength
 
double _pmin
 
double _vtxRes
 
double _pRes
 
double _dEdxResMulti
 
double _phiRes
 
double _thetaRes
 
double _momentum
 
double _energyloss
 

Detailed Description

Definition at line 41 of file PndFsmMvd2.h.

Member Enumeration Documentation

anonymous enum
private
Enumerator
nPidType 

Definition at line 91 of file PndFsmMvd2.h.

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

Definition at line 92 of file PndFsmMvd2.h.

Constructor & Destructor Documentation

PndFsmMvd2::PndFsmMvd2 ( )

Default ctor.

Definition at line 58 of file PndFsmMvd2.cxx.

References _thtMax, _thtMin, and initParameters().

59 {
61 
62  _thtMin=_thtMin*M_PI/180.0;
63  _thtMax=_thtMax*M_PI/180.0;
64  //print(std::cout);
65 }
double _thtMax
Definition: PndFsmMvd2.h:81
void initParameters()
Definition: PndFsmMvd2.cxx:197
double _thtMin
Definition: PndFsmMvd2.h:80
PndFsmMvd2::PndFsmMvd2 ( ArgList par)

Definition at line 67 of file PndFsmMvd2.cxx.

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

68 {
70  //set default parameter values and parses a parameter list
71  //i.e. std::list<std::string> of the form
72  //"a=1" "b=2" "c=3"
74 
75  _thtMin=_thtMin*M_PI/180.0;
76  _thtMax=_thtMax*M_PI/180.0;
77  //print(std::cout);
78 }
double _thtMax
Definition: PndFsmMvd2.h:81
void initParameters()
Definition: PndFsmMvd2.cxx:197
Double_t par[3]
void parseParameterList(ArgList &par)
double _thtMin
Definition: PndFsmMvd2.h:80
PndFsmMvd2::~PndFsmMvd2 ( )
virtual

Destructor

Definition at line 84 of file PndFsmMvd2.cxx.

85 {
86 }

Member Function Documentation

bool PndFsmMvd2::detected ( PndFsmTrack t) const
private

Definition at line 146 of file PndFsmMvd2.cxx.

References PndFsmAbsDet::_efficiency, _pmin, PndFsmAbsDet::_rand, _thtMin, PndFsmTrack::charge(), PndFsmTrack::hitMapResponse(), PndFsmTrack::hitMapValid(), FsmDetEnum::Mvd, p, PndFsmTrack::p4(), and theta.

Referenced by respond().

147 {
148  if (t->hitMapValid()) {
149  return t->hitMapResponse(FsmDetEnum::Mvd);
150  } else {
151  double theta = t->p4().Theta();
152  double p=t->p4().Vect().Mag();
153  double charge=t->charge();
154  return ( charge!=0.0 && theta>=_thtMin && theta<=_thtMax && p>_pmin && _rand->Uniform()<=_efficiency);
155  }
156 }
double _efficiency
Definition: PndFsmAbsDet.h:93
bool hitMapResponse(unsigned int)
Definition: PndFsmTrack.h:86
double charge()
Definition: PndFsmTrack.h:75
double _thtMin
Definition: PndFsmMvd2.h:80
TRandom3 * _rand
Definition: PndFsmAbsDet.h:94
Double_t p
Definition: anasim.C:58
TLorentzVector p4()
Definition: PndFsmTrack.h:72
double _pmin
Definition: PndFsmMvd2.h:83
bool hitMapValid()
Definition: PndFsmTrack.h:85
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
double PndFsmMvd2::dp ( PndFsmTrack t) const
private

Definition at line 159 of file PndFsmMvd2.cxx.

References _pRes, p, and PndFsmTrack::p4().

Referenced by respond().

160 {
161  double p=t->p4().Vect().Mag();
162  double Dp=_pRes*p; //10% smearing
163  return ( Dp ); //to be refined
164 }
Double_t p
Definition: anasim.C:58
TLorentzVector p4()
Definition: PndFsmTrack.h:72
double _pRes
Definition: PndFsmMvd2.h:85
double PndFsmMvd2::dphi ( PndFsmTrack t) const
private

Definition at line 167 of file PndFsmMvd2.cxx.

References _phiRes.

Referenced by respond().

168 {
169  double Dphi=_phiRes*M_PI/180.0;
170  return Dphi; //to be refined
171 }
double _phiRes
Definition: PndFsmMvd2.h:87
double PndFsmMvd2::dtheta ( PndFsmTrack t) const
private

Definition at line 174 of file PndFsmMvd2.cxx.

References _thetaRes.

Referenced by respond().

175 {
176  double dt=_thetaRes*M_PI/180.0;
177  return dt; //to be refined
178 }
double _thetaRes
Definition: PndFsmMvd2.h:88
void PndFsmMvd2::initParameters ( )
privatevirtual

Reimplemented from PndFsmAbsDet.

Definition at line 197 of file PndFsmMvd2.cxx.

References _dEdxResMulti, PndFsmAbsDet::_detName, PndFsmAbsDet::_efficiency, _phiRes, _pmin, _pRes, _radiationLength, _thetaRes, _thtMax, _thtMin, _vtxRes, FsmDetEnum::Mvd2, and FsmDetName::name().

Referenced by PndFsmMvd2().

198 {
200  _thtMin = 5.0;
201  _thtMax = 160.0;
202  _radiationLength = 0.0;
203  _pmin = 0.0;
204  _vtxRes = 100e-4; //vtx res = 100 um
205  _pRes =0.1;//10% smearing
206  _dEdxResMulti =1.00; //normal energy loss resolution
207  _phiRes =0.01; //0.01 degree smearing
208  _thetaRes =0.01; //0.01 degree smearing
209  _efficiency =1.0;
210 }
double _thtMax
Definition: PndFsmMvd2.h:81
double _efficiency
Definition: PndFsmAbsDet.h:93
double _thetaRes
Definition: PndFsmMvd2.h:88
double _dEdxResMulti
Definition: PndFsmMvd2.h:86
double _thtMin
Definition: PndFsmMvd2.h:80
static const std::string & name(unsigned int t)
Definition: FsmDetTypes.h:26
double _phiRes
Definition: PndFsmMvd2.h:87
double _pmin
Definition: PndFsmMvd2.h:83
double _vtxRes
Definition: PndFsmMvd2.h:84
double _radiationLength
Definition: PndFsmMvd2.h:82
std::string _detName
Definition: PndFsmAbsDet.h:92
double _pRes
Definition: PndFsmMvd2.h:85
double PndFsmMvd2::LandauGaus ( double  s_mpv,
double  width1,
double  width2 
)
private

Definition at line 270 of file PndFsmMvd2.cxx.

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

Referenced by Likelihood().

270  {
271  // this is the adapted TF1::Integral function from
272  // ROOT 5.14. GOTOs have been removed and interval
273  // division has been modified to maximize performance
274 
275  if (widthone<=0)
276  return TMath::Gaus(s_mpv, 0, widthtwo, true);
277  else if (widthtwo<=0)
278  return TMath::Landau(s_mpv, 0, widthone, true);
279  else {
280  static double x[12] = { 0.96028985649753623, 0.79666647741362674,
281  0.52553240991632899, 0.18343464249564980,
282  0.98940093499164993, 0.94457502307323258,
283  0.86563120238783174, 0.75540440835500303,
284  0.61787624440264375, 0.45801677765722739,
285  0.28160355077925891, 0.09501250983763744};
286 
287  static double w[12] = { 0.10122853629037626, 0.22238103445337447,
288  0.31370664587788729, 0.36268378337836198,
289  0.02715245941175409, 0.06225352393864789,
290  0.09515851168249278, 0.12462897125553387,
291  0.14959598881657673, 0.16915651939500254,
292  0.18260341504492359, 0.18945061045506850};
293 
294  double h, bb, aa, c1, c2, u, s8, s16, f1, f2;
295  double xx;
296  bool redo=true;
297  int i;
298 
299  h = 0;
300  aa = -5.0*widthtwo;
301  bb = -2.5*widthtwo;
302 
303  do {
304  c1 = 0.5*(bb+aa);
305  c2 = 0.5*(bb-aa);
306 
307  s8 = 0;
308  for (i=0;i<4;i++) {
309  u = c2*x[i];
310  xx = c1+u;
311  f1 = TMath::Landau(s_mpv+xx, 0, widthone, true)*TMath::Gaus(xx, 0, widthtwo, true);
312  xx = c1-u;
313  f2 = TMath::Landau(s_mpv+xx, 0, widthone, true)*TMath::Gaus(xx, 0, widthtwo, true);
314  s8+= w[i]*(f1 + f2);
315  }
316  s16 = 0;
317  for (i=4;i<12;i++) {
318  u = c2*x[i];
319  xx = c1+u;
320  f1 = TMath::Landau(s_mpv+xx, 0, widthone, true)*TMath::Gaus(xx, 0, widthtwo, true);
321  xx = c1-u;
322  f2 = TMath::Landau(s_mpv+xx, 0, widthone, true)*TMath::Gaus(xx, 0, widthtwo, true);
323  s16+= w[i]*(f1 + f2);
324  }
325  s16 = c2*s16;
326  if (TMath::Abs(s16-c2*s8) <= 1e-12*(s16+1) ) {
327  aa =bb;
328  bb+=2*c2*1.5;
329  if (bb>=5*widthtwo) {
330  bb=5*widthtwo;
331  redo=false;
332  }
333  h += s16;
334  } else
335  bb = c1;
336  } while (redo);
337  return h;
338  }
339 }
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 PndFsmMvd2::Likelihood ( PidType  particle)
private

Definition at line 341 of file PndFsmMvd2.cxx.

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

Referenced by respond().

341  {
342  return LandauGaus( _energyloss - MeanEnergyLoss(part) - mpv(part), width1(part), width2(part)*_dEdxResMulti );
343 }
double MeanEnergyLoss(PidType particle)
Definition: PndFsmMvd2.cxx:256
double width1(PidType particle)
Definition: PndFsmMvd2.cxx:409
double width2(PidType particle)
Definition: PndFsmMvd2.cxx:445
double _dEdxResMulti
Definition: PndFsmMvd2.h:86
double _energyloss
Definition: PndFsmMvd2.h:108
double LandauGaus(double s_mpv, double width1, double width2)
Definition: PndFsmMvd2.cxx:270
double mpv(PidType particle)
Definition: PndFsmMvd2.cxx:345
double PndFsmMvd2::MeanEnergyLoss ( PidType  particle)
private

Definition at line 256 of file PndFsmMvd2.cxx.

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

Referenced by Likelihood(), and respond().

256  {
257  //Calculate the lower boundary of the energy loss distribution.
258 
259  //[GeV]
260  static float eb=0.14e-6;
261  //[m/s]
262  static float c=2.99792458e8;
263  //[GeV/c**2]
264  static float Mass[nPidType]={ 0.511e-3, 0.1058, 0.1396, 0.4937, 0.9383 };
265 
266  double sqrBeta=1/(1+pow(Mass[part]/_momentum,2));
267  return 4.9312e-05 * (log(2*Mass[electron]*c*c/eb*sqrBeta/(1-sqrBeta))-sqrBeta)/sqrBeta;
268 };
double _momentum
Definition: PndFsmMvd2.h:107
friend F32vec4 log(const F32vec4 &a)
Definition: P4_F32vec4.h:110
double PndFsmMvd2::mpv ( PidType  particle)
private

Definition at line 345 of file PndFsmMvd2.cxx.

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

Referenced by Likelihood(), and respond().

345  {
346  double x=_momentum;
347  double x0=0;
348  double x1=0;
349  double c0=0;
350  double c1=0;
351  double d1=0;
352  double a3=0;
353  double a4=0;
354  double a5=0;
355 
356  switch(part) {
357  case proton:
358  x0 = 0.45;
359  x1 = 1.3;
360  c0 = 0.383451e-03;
361  c1 = -0.126986e-03;
362  d1 = -5.21351e-06;
363  a3 = -3.05821;
364  a4 = 24.6356;
365  a5 = -68.632;
366  break;
367  case kaon:
368  x0 = 0.25;
369  x1 = 1.05;
370  c0 = 0.326259e-03;
371  c1 = -7.68052e-05;
372  d1 = 1.51033e-05;
373  a3 = -19.6615;
374  a4 = 264.382;
375  a5 = -1238.09;
376  break;
377  case pion:
378  x0 = 0.1;
379  x1 = 1.0;
380  c0 = 0.274692e-03;
381  c1 = 3.2571e-05;
382  d1 = 9.16527e-06;
383  a5 = -6624.05;
384  break;
385  case muon:
386  x0 = 0.15;
387  x1 = 1.15;
388  a3 = 4.33244;
389  a4 = -107.686;
390  a5 = 699.522;
391  c0 = 0.248749e-03;
392  c1 = 6.57118e-05;
393  d1 = -4.09447e-06;
394  break;
395  case electron:
396  x1 = 1.20;
397  c0 = 2.93999e-03;
398  c1 = 1.76792e-05;
399  break;
400  }
401  if (x>=x1)
402  return c0+c1*(x1-x0)+d1*(x-x1);
403  if (x>=x0)
404  return c0+c1*(x-x0);
405  else
406  return c0+c1*(x-x0)+pow(x0-x,3)*(a3+(x0-x)*(a4+(x0-x)*a5));
407 }
double _momentum
Definition: PndFsmMvd2.h:107
Double_t x0
Definition: checkhelixhit.C:70
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(), PndFsmMvdPid::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 PndFsmMvd2::print ( std::ostream o)
privatevirtual

Reimplemented from PndFsmAbsDet.

Definition at line 181 of file PndFsmMvd2.cxx.

References _dEdxResMulti, PndFsmAbsDet::_efficiency, _phiRes, _pmin, _pRes, _radiationLength, _thetaRes, _thtMax, _thtMin, _vtxRes, and PndFsmAbsDet::detName().

182 {
183  o <<"Parameters for detector <"<<detName()<<">"<<endl;
184  o <<" _thtMin = "<<_thtMin<<endl;
185  o <<" _thtMax = "<<_thtMax<<endl;
186  o <<" _radiationLength = "<<_radiationLength<<endl;
187  o <<" _pmin = "<<_pmin<<endl;
188  o <<" _pRes = "<<100*_pRes<< "\%" << endl;
189  o <<" _dEdxResMulti = "<<100*_dEdxResMulti<< "\%" << endl;
190  o <<" _vtxRes = "<<_vtxRes*1e5<<"um "<<endl;
191  o <<" _phiRes = "<<_phiRes << " degree" << endl;
192  o <<" _thetaRes = "<<_thetaRes <<" degree" << endl;
193  o <<" _efficiency = "<<_efficiency<<endl;
194 }
double _thtMax
Definition: PndFsmMvd2.h:81
double _efficiency
Definition: PndFsmAbsDet.h:93
double _thetaRes
Definition: PndFsmMvd2.h:88
double _dEdxResMulti
Definition: PndFsmMvd2.h:86
double _thtMin
Definition: PndFsmMvd2.h:80
double _phiRes
Definition: PndFsmMvd2.h:87
const std::string & detName()
Definition: PndFsmAbsDet.h:74
double _pmin
Definition: PndFsmMvd2.h:83
double _vtxRes
Definition: PndFsmMvd2.h:84
double _radiationLength
Definition: PndFsmMvd2.h:82
double _pRes
Definition: PndFsmMvd2.h:85
PndFsmResponse * PndFsmMvd2::respond ( PndFsmTrack t)
virtual

Accessors to contained information

Implements PndFsmAbsDet.

Definition at line 93 of file PndFsmMvd2.cxx.

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

94 {
95  PndFsmResponse *result=new PndFsmResponse();
96 
97  result->setDetector(this);
98  bool wasDetected=detected(t);
99  result->setDetected(wasDetected);
100 
101  if (wasDetected && fabs(t->charge())>1e-8)
102  {
103  //select particle
104  PidType part;
105  switch(abs(t->pdt())) {
106  case 2212:part=proton; break;
107  case 321: part=kaon; break;
108  case 211: part=pion; break;
109  case 13: part=muon; break;
110  case 11: part=electron; break;
111  }
112 
113  //build random energy loss
114  _momentum = t->p4().Vect().Mag();
115  _energyloss = MeanEnergyLoss(part) + mpv(part) + _rand->Landau(0, width1(part)) + _rand->Gaus(0, width2(part))*_dEdxResMulti;
116 
117  //store random energy loss
118  result->setMvddEdx(_energyloss/1e-3);
119 
120  //store energy loss
121  if (_momentum>=0 && _momentum<=2.5) {
123  result->setLHMuon(Likelihood(muon));
124  result->setLHPion(Likelihood(pion));
125  result->setLHKaon(Likelihood(kaon));
126  result->setLHProton(Likelihood(proton));
127  } else {
128  result->setLHElectron(1);
129  result->setLHMuon(1);
130  result->setLHPion(1);
131  result->setLHKaon(1);
132  result->setLHProton(1);
133  }
134 
135  result->setdV(_vtxRes, _vtxRes, _vtxRes);
136  result->setdp(dp(t));
137  result->setdphi(dphi(t));
138  result->setdtheta(dtheta(t));
139  }
140 
141  return result;
142 }
double dtheta(PndFsmTrack *t) const
Definition: PndFsmMvd2.cxx:174
double _momentum
Definition: PndFsmMvd2.h:107
void setdV(TVector3 v)
void setdphi(double val)
void setLHElectron(double val)
double MeanEnergyLoss(PidType particle)
Definition: PndFsmMvd2.cxx:256
double width1(PidType particle)
Definition: PndFsmMvd2.cxx:409
double width2(PidType particle)
Definition: PndFsmMvd2.cxx:445
void setLHProton(double val)
void setLHMuon(double val)
double charge()
Definition: PndFsmTrack.h:75
double _dEdxResMulti
Definition: PndFsmMvd2.h:86
TRandom3 * _rand
Definition: PndFsmAbsDet.h:94
double dp(PndFsmTrack *t) const
Definition: PndFsmMvd2.cxx:159
double dphi(PndFsmTrack *t) const
Definition: PndFsmMvd2.cxx:167
double _energyloss
Definition: PndFsmMvd2.h:108
TLorentzVector p4()
Definition: PndFsmTrack.h:72
void setDetector(PndFsmAbsDet *detector)
void setdp(double val)
double _vtxRes
Definition: PndFsmMvd2.h:84
void setLHKaon(double val)
friend F32vec4 fabs(const F32vec4 &a)
Definition: P4_F32vec4.h:47
bool detected(PndFsmTrack *t) const
Definition: PndFsmMvd2.cxx:146
void setDetected(bool isdet)
void setdtheta(double val)
double Likelihood(PidType particle)
Definition: PndFsmMvd2.cxx:341
void setMvddEdx(double val, double err=0)
double mpv(PidType particle)
Definition: PndFsmMvd2.cxx:345
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 PndFsmMvd2::setParameter ( std::string &  name,
double  value 
)
privatevirtual

Reimplemented from PndFsmAbsDet.

Definition at line 213 of file PndFsmMvd2.cxx.

References _dEdxResMulti, PndFsmAbsDet::_efficiency, _phiRes, _pmin, _pRes, _radiationLength, _thetaRes, _thtMax, _thtMin, and _vtxRes.

214 {
215  // *****************
216  // include here all parameters which should be settable via tcl
217  // *****************
218 
219  bool knownName=true;
220 
221  if (name == "thtMin")
222  _thtMin=value;
223  else
224  if (name == "thtMax")
225  _thtMax=value;
226  else
227  if (name == "radiationLength")
228  _radiationLength=value;
229  else
230  if (name == "pmin")
231  _pmin=value;
232  else
233  if (name == "vtxRes")
234  _vtxRes=value;
235  else
236  if (name == "pRes")
237  _pRes=value;
238  else
239  if (name == "dEdxResMulti")
240  _dEdxResMulti=value;
241  else
242  if (name == "thetaRes")
243  _thetaRes=value;
244  else
245  if (name == "phiRes")
246  _phiRes=value;
247  else
248  if (name == "efficiency")
249  _efficiency=value;
250  else
251  knownName=false;
252 
253  return knownName;
254 }
double _thtMax
Definition: PndFsmMvd2.h:81
double _efficiency
Definition: PndFsmAbsDet.h:93
double _thetaRes
Definition: PndFsmMvd2.h:88
double _dEdxResMulti
Definition: PndFsmMvd2.h:86
double _thtMin
Definition: PndFsmMvd2.h:80
double _phiRes
Definition: PndFsmMvd2.h:87
double _pmin
Definition: PndFsmMvd2.h:83
double _vtxRes
Definition: PndFsmMvd2.h:84
double _radiationLength
Definition: PndFsmMvd2.h:82
TString name
double _pRes
Definition: PndFsmMvd2.h:85
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 PndFsmMvd2::width1 ( PidType  particle)
private

Definition at line 409 of file PndFsmMvd2.cxx.

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

Referenced by Likelihood(), and respond().

409  {
410  double x=_momentum;
411  switch(part) {
412  case proton:
413  if (x>=1.10)
414  return +3.81174e-04+x*(-2.25108e-04+x*+5.45154e-05);
415  else
416  return -5.28145e-05+x*(+8.29883e-04+x*-5.35972e-04);
417  break;
418  case kaon:
419  if (x>=1.05)
420  return +2.61134e-04+x*(-1.30818e-04+x*+3.44165e-05);
421  else
422  return +3.41858e-04+x*(-3.21115e-04+x*+1.37459e-04);
423  break;
424  case pion:
425  if (x>=1.00)
426  return +1.88718e-04+x*(-6.38948e-05+x*+1.78590e-05);
427  else
428  return +1.82872e-04+x*(-1.28373e-04+x*+8.01459e-05);
429  break;
430  case muon:
431  if (x>=1.20)
432  return +1.06142e-04+x*(+3.68777e-05+x*-1.00190e-05);
433  else
434  return +1.89374e-04+x*(-1.46441e-04+x*+9.10813e-05);
435  break;
436  case electron:
437  if (x>1.2) x=1.2;
438  // electrons are constant for momentum > 1.2GeV
439  return +1.27955e-04+x*(-3.15732e-06+x*+9.64736e-06);
440  break;
441  }
442  return 0;
443 }
double _momentum
Definition: PndFsmMvd2.h:107
Double_t x
double PndFsmMvd2::width2 ( PidType  particle)
private

Definition at line 445 of file PndFsmMvd2.cxx.

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

Referenced by Likelihood(), and respond().

445  {
446  double x=_momentum;
447  switch(part) {
448  case proton:
449  if (x>=1.10)
450  return +6.41067e-04+x*(-3.82507e-04+x*+9.03732e-05);
451  else
452  return +6.40328e-04-3.21725e-04*x+3.17708e-05*pow(x,-3);
453  break;
454  case kaon:
455  if (x>=1.05)
456  return +2.22504e-04+x*(-6.40051e-06+x*+2.14434e-06);
457  else
458  return +3.86684e-04-1.61873e-04*x+7.76586e-06*pow(x,-3);
459  break;
460  case pion:
461  if (x>=1.00)
462  return +1.32999e-04+x*(+1.19714e-04+x*-3.53302e-05);
463  else
464  return +2.21603e-04-3.21357e-06*x+4.64793e-06*pow(x,-2);
465  break;
466  case muon:
467  if (x>=1.20)
468  return +7.84582e-05+x*(+1.88988e-04+x*-5.49637e-05);
469  else
470  return +1.67388e-04+5.67991e-05*x+3.42702e-06*pow(x,-2);
471  break;
472  case electron:
473  if (x>1.2) x=1.2;
474  // electrons are constant for momentum > 1.2GeV
475  return +4.08849e-04-3.56548e-05*x+1.84825e-08*pow(x,-3);
476  break;
477  }
478  return 0;
479 }
double _momentum
Definition: PndFsmMvd2.h:107
Double_t x

Member Data Documentation

double PndFsmMvd2::_dEdxResMulti
private

Definition at line 86 of file PndFsmMvd2.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(), PndFsmSttPid::detected(), PndFsmEmcFS::detected(), detected(), PndFsmMvd::detected(), PndFsmMdcFS::detected(), PndFsmStt::detected(), PndFsmEmcFwCap::detected(), PndFsmMdcTS::detected(), PndFsmSimpleVtx::detected(), PndFsmTof::detected(), PndFsmEmcBwCap::detected(), PndFsmMvdPid::detected(), PndFsmRich::detected(), PndFsmEmcBarrel::detected(), PndFsmDrcDisc::detected(), PndFsmMdtPid::detected(), PndFsmDrcBarrel::detected(), PndFsmEmcPid::detected(), PndFsmEffTracker::detected(), PndFsmSimpleTracker::initParameters(), PndFsmSimpleVtx::initParameters(), PndFsmDetTemplate::initParameters(), PndFsmMvdPid::initParameters(), PndFsmTof::initParameters(), PndFsmMdtPid::initParameters(), PndFsmEmcPid::initParameters(), PndFsmEmcBwCap::initParameters(), PndFsmEmcFS::initParameters(), initParameters(), PndFsmEmcFwCap::initParameters(), PndFsmRich::initParameters(), PndFsmMdcFS::initParameters(), PndFsmSttPid::initParameters(), PndFsmMdcTS::initParameters(), PndFsmEmcBarrel::initParameters(), PndFsmDrcDisc::initParameters(), PndFsmDrcBarrel::initParameters(), PndFsmStt::initParameters(), PndFsmMvd::initParameters(), PndFsmEffTracker::initParameters(), PndFsmSimpleTracker::print(), PndFsmSimpleVtx::print(), PndFsmDetTemplate::print(), PndFsmMvdPid::print(), PndFsmTof::print(), PndFsmMdtPid::print(), PndFsmEmcPid::print(), PndFsmMdcFS::print(), PndFsmEmcFS::print(), PndFsmMdcTS::print(), PndFsmEmcBwCap::print(), print(), PndFsmSttPid::print(), PndFsmEmcFwCap::print(), PndFsmRich::print(), PndFsmDrcDisc::print(), PndFsmEmcBarrel::print(), PndFsmDrcBarrel::print(), PndFsmStt::print(), PndFsmMvd::print(), PndFsmEffTracker::print(), PndFsmSimpleTracker::setParameter(), PndFsmMvdPid::setParameter(), PndFsmDetTemplate::setParameter(), PndFsmSimpleVtx::setParameter(), PndFsmMdtPid::setParameter(), PndFsmTof::setParameter(), PndFsmEmcPid::setParameter(), PndFsmRich::setParameter(), PndFsmMdcFS::setParameter(), PndFsmEmcFS::setParameter(), PndFsmEmcBwCap::setParameter(), setParameter(), PndFsmMdcTS::setParameter(), PndFsmSttPid::setParameter(), PndFsmEmcFwCap::setParameter(), PndFsmEmcBarrel::setParameter(), PndFsmDrcDisc::setParameter(), PndFsmDrcBarrel::setParameter(), PndFsmStt::setParameter(), PndFsmMvd::setParameter(), and PndFsmEffTracker::setParameter().

double PndFsmMvd2::_energyloss
private

Definition at line 108 of file PndFsmMvd2.h.

Referenced by Likelihood(), and respond().

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

Definition at line 107 of file PndFsmMvd2.h.

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

double PndFsmMvd2::_phiRes
private

Definition at line 87 of file PndFsmMvd2.h.

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

double PndFsmMvd2::_pmin
private

Definition at line 83 of file PndFsmMvd2.h.

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

double PndFsmMvd2::_pRes
private

Definition at line 85 of file PndFsmMvd2.h.

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

double PndFsmMvd2::_radiationLength
private

Definition at line 82 of file PndFsmMvd2.h.

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

TRandom3* PndFsmAbsDet::_rand
protectedinherited
double PndFsmMvd2::_thetaRes
private

Definition at line 88 of file PndFsmMvd2.h.

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

double PndFsmMvd2::_thtMax
private

Definition at line 81 of file PndFsmMvd2.h.

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

double PndFsmMvd2::_thtMin
private

Definition at line 80 of file PndFsmMvd2.h.

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

double PndFsmMvd2::_vtxRes
private

Definition at line 84 of file PndFsmMvd2.h.

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


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