102 TParticlePDG* part =
_fdbPDG->GetParticle(t->
pdt());
103 double mass = (part) ? part->Mass() : t->
p4().M();
104 double theta = t->
p4().Theta();
105 double p=t->
p4().Vect().Mag();
109 if ( p==0 || ctht==0 ) {result->
setDetected(
false);
return result;}
111 double lambda1 = 280e-9;
112 double lambda2 = 330e-9;
114 double alpha=7.2974e-3;
128 if (nPhot==0) {result->
setDetected(
false);
return result;}
130 nPhot =
_rand->Poisson(nPhot);
139 if (nPhot>100) nPhot=100;
145 double m_e =
_fdbPDG->GetParticle(11)->Mass();
146 double m_mu =
_fdbPDG->GetParticle(13)->Mass();
147 double m_pi =
_fdbPDG->GetParticle(211)->Mass();
148 double m_K =
_fdbPDG->GetParticle(321)->Mass();
149 double m_p =
_fdbPDG->GetParticle(2212)->Mass();
157 if (measp<0) measp=0;
165 double measThetaC =
_rand->Gaus(thtC,sig);
166 if (measThetaC<0) measThetaC=0;
184 return (1.0/(
sqrt(2.0*M_PI)*s))*
185 exp(-(x-x0)*(x-x0)/(2.0*s*s));
192 if (p==0)
return 0.0;
204 int lundId=abs(t->
pdt());
205 TParticlePDG* part =
_fdbPDG->GetParticle(lundId);
206 double mass = (part) ? part->Mass() : t->
p4().M();
210 if (t->
p4().Z()==0)
return false;
212 double angleX =
fabs(atan(t->
p4().X()/t->
p4().Z()));
213 double angleY =
fabs(atan(t->
p4().Y()/t->
p4().Z()));
214 double p=t->
p4().Vect().Mag();
216 bool correctPidType=
false;
218 if (lundId==11 || lundId==13 || lundId==211 || lundId==321 || lundId==2212) correctPidType=
true;
220 return ( p>p_cerenkov_min && angleX<=
_angleXMax && angleY<=_angleYMax && correctPidType && _rand->Rndm()<=
_efficiency);
227 o <<
"Parameters for detector <"<<
detName()<<
">"<<endl;
231 o <<
" _pmin = "<<
_pmin<<endl;
232 o <<
" _dthtc = "<<
_dthtc<<endl;
235 o <<
" _Bfield = "<<
_Bfield<<endl;
237 o <<
" _dRich = "<<
_dRich<<endl;
238 o <<
" _dp = "<<
_dp<<endl;
269 if (name ==
"angleXMax")
272 if (name ==
"angleYMax")
275 if (name ==
"radiationLength")
284 if (name ==
"nPhotMin")
287 if (name ==
"nRefrac")
290 if (name ==
"Bfield")
293 if (name ==
"effNPhotons")
302 if (name ==
"efficiency")
void print(std::ostream &o)
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)
basic_ostream< char, char_traits< char > > ostream
void setDetector(PndFsmAbsDet *detector)
virtual PndFsmResponse * respond(PndFsmTrack *t)
const std::string & detName()
void setLHKaon(double val)
friend F32vec4 fabs(const F32vec4 &a)
bool setParameter(std::string &name, double value)
void setRichThtc(double val, double err=0)
double compThetaC(double p, double m)
void setDetected(bool isdet)
double gauss(double x, double x0, double s)
bool detected(PndFsmTrack *t) const
void setLHPion(double val)