111 TParticlePDG* part =
_fdbPDG->GetParticle(t->
pdt());
112 double mass = (part) ? part->Mass() : t->
p4().M();
113 double theta = t->
p4().Theta();
114 double p=t->
p4().Vect().Mag();
122 else if (pid==13) npid=1;
123 else if (pid==211) npid=2;
124 else if (pid==321) npid=3;
125 else if (pid==2212) npid=4;
127 double thtdeg=theta/M_PI*180.;
129 if ( p==0 || ctht==0 ) {result->
setDetected(
false);
return result;}
131 double lambda1 = 280e-9;
132 double lambda2 = 330e-9;
134 double alpha=7.2974e-3;
146 double trapped =
_trap;
149 trapped = npid<0 ? 0.0 :
trapfrac[npid]->GetBinContent(
trapfrac[npid]->FindBin(p<6.0?p:6.0,thtdeg));
152 double nPhot = 2*M_PI*alpha*l*(1./lambda1 - 1./lambda2)*(1 - (mass*mass+p*p)/(p*p*
_nRefrac*
_nRefrac));
155 nPhot =
_rand->Poisson(nPhot);
167 if (nPhot>100) nPhot=100;
173 double m_e =
_fdbPDG->GetParticle(11)->Mass();
174 double m_mu =
_fdbPDG->GetParticle(13)->Mass();
175 double m_pi =
_fdbPDG->GetParticle(211)->Mass();
176 double m_K =
_fdbPDG->GetParticle(321)->Mass();
177 double m_p =
_fdbPDG->GetParticle(2212)->Mass();
185 if (measp<0) measp=0;
193 double measThetaC =
_rand->Gaus(thtC,sig);
194 if (measThetaC<0) measThetaC=0;
212 return (1.0/(
sqrt(2.0*M_PI)*s))*
213 exp(-(x-x0)*(x-x0)/(2.0*s*s));
220 if (p==0)
return 0.0;
232 int lundId=abs(t->
pdt());
233 TParticlePDG* part =
_fdbPDG->GetParticle(lundId);
234 double mass = (part) ? part->Mass() : t->
p4().M();
236 double theta = t->
p4().Theta();
237 double p=t->
p4().Vect().Mag();
239 bool correctPidType=(lundId==11 || lundId==13 || lundId==211 || lundId==321 || lundId==2212);
241 return ( p>p_cerenkov_min && theta>=
_thtMin && theta<=_thtMax && correctPidType && _rand->Uniform()<=
_efficiency);
248 o <<
"Parameters for detector <"<<
detName()<<
">"<<endl;
249 o <<
" _thtMin = "<<
_thtMin<<endl;
250 o <<
" _thtMax = "<<
_thtMax<<endl;
252 o <<
" _pmin = "<<
_pmin<<endl;
253 o <<
" _dthtc = "<<
_dthtc<<endl;
256 o <<
" _Bfield = "<<
_Bfield<<endl;
258 o <<
" _dDisc = "<<
_dDisc<<endl;
259 o <<
" _dp = "<<
_dp<<endl;
260 o <<
" _trap = "<<
_trap<<endl;
282 _parFileName =
"$VMCWORKDIR/fastsim/trapfrac_disc.root";
294 if (name ==
"parFileName")
311 if (name ==
"thtMin")
314 if (name ==
"thtMax")
317 if (name ==
"radiationLength")
326 if (name ==
"nPhotMin")
329 if (name ==
"nRefrac")
332 if (name ==
"Bfield")
335 if (name ==
"effNPhotons")
347 if (name ==
"efficiency")
359 for (
int i=0;
i<5;
i++)
366 cout <<
" -W- (PndFsmDrcDisc::readParameters) - file "<<
_parFileName.c_str()
367 <<
" doesn't exist. Using constant trapping fraction _trap="<<
_trap<<endl;
friend F32vec4 acos(const F32vec4 &a)
friend F32vec4 cos(const F32vec4 &a)
void setLHElectron(double val)
friend F32vec4 exp(const F32vec4 &a)
void setLHProton(double val)
std::list< std::string > ArgList
friend F32vec4 sqrt(const F32vec4 &a)
Double_t val[nBoxes][nFEBox]
void setLHMuon(double val)
bool hitMapResponse(unsigned int)
TString ctht(TString pts, TString exts="px py pz")
void parseParameterList(ArgList &par)
bool detected(PndFsmTrack *t) const
basic_ostream< char, char_traits< char > > ostream
void setDetector(PndFsmAbsDet *detector)
void setDrcDiscThtc(double val, double err=0)
const std::string & detName()
void setLHKaon(double val)
friend F32vec4 fabs(const F32vec4 &a)
virtual PndFsmResponse * respond(PndFsmTrack *t)
double gauss(double x, double x0, double s)
void print(std::ostream &o)
bool setParameter(std::string &name, double value)
void setDetected(bool isdet)
double compThetaC(double p, double m)
void setLHPion(double val)