113 TParticlePDG* part =
_fdbPDG->GetParticle(t->
pdt());
114 double mass = (part) ? part->Mass() : t->
p4().M();
115 double theta = t->
p4().Theta();
116 double p=t->
p4().Vect().Mag();
117 double stht=
sin(theta);
124 else if (pid==13) npid=1;
125 else if (pid==211) npid=2;
126 else if (pid==321) npid=3;
127 else if (pid==2212) npid=4;
129 double thtdeg=theta/M_PI*180.;
131 if ( p==0 || p_t==0 || stht==0 ) {result->
setDetected(
false);
return result;}
133 double lambda1 = 280e-9;
134 double lambda2 = 330e-9;
136 double alpha=7.2974e-3;
146 double tpsi=tan(psi);
148 if ( tpsi==0 ) {result->
setDetected(
false);
return result;}
150 double l =
_dSlab*
sqrt( 1/(stht*stht) + 1/(tpsi*tpsi) );
153 double trapped =
_trap;
156 trapped = npid<0 ? 0.0 :
trapfrac[npid]->GetBinContent(
trapfrac[npid]->FindBin(p<6.0?p:6.0,thtdeg));
159 double nPhot = 2*M_PI*alpha*l*(1./lambda1 - 1./lambda2)*(1 - (mass*mass+p*p)/(p*p*
_nRefrac*
_nRefrac));
162 nPhot =
_rand->Poisson(nPhot);
174 if (nPhot>100) nPhot=100;
181 double m_e =
_fdbPDG->GetParticle(11)->Mass();
182 double m_mu =
_fdbPDG->GetParticle(13)->Mass();
183 double m_pi =
_fdbPDG->GetParticle(211)->Mass();
184 double m_K =
_fdbPDG->GetParticle(321)->Mass();
185 double m_p =
_fdbPDG->GetParticle(2212)->Mass();
193 if (measp<0) measp=0;
201 double measThetaC =
_rand->Gaus(thtC,sig);
202 if (measThetaC<0) measThetaC=0;
220 return (1.0/(
sqrt(2.0*M_PI)*s))*
221 exp(-(x-x0)*(x-x0)/(2.0*s*s));
228 if (p==0)
return 0.0;
242 int lundId = abs(t->
pdt());
243 TParticlePDG* part =
_fdbPDG->GetParticle(lundId);
244 double mass = (part) ? part->Mass() : t->
p4().M();
245 double theta = t->
p4().Theta();
246 double p = t->
p4().Vect().Mag();
247 double p_t = t->
p4().Vect().Pt();
248 double charge=t->
charge();
251 if (
fabs(charge)<0.001)
return false;
254 double rho = 3.3356 * p_t /
_Bfield;
258 if (!(lundId==11 || lundId==13 || lundId==211 || lundId==321 || lundId==2212))
return false;
262 if (p<p_cerenkov_min)
return false;
265 double z=2*rho*asin(
_rBarrel/(2*rho))/tan(theta);
267 if (polar<_thtMin || polar>
_thtMax)
return false;
278 o <<
"Parameters for detector <"<<
detName()<<
">"<<endl;
279 o <<
" _thtMin = "<<
_thtMin<<endl;
280 o <<
" _thtMax = "<<
_thtMax<<endl;
282 o <<
" _pmin = "<<
_pmin<<endl;
283 o <<
" _dthtc = "<<
_dthtc<<endl;
286 o <<
" _Bfield = "<<
_Bfield<<endl;
289 o <<
" _dSlab = "<<
_dSlab<<endl;
290 o <<
" _dp = "<<
_dp<<endl;
291 o <<
" _trap = "<<
_trap<<endl;
314 _parFileName =
"$VMCWORKDIR/fastsim/trapfrac_barrel.root";
326 if (name ==
"parFileName")
343 if (name ==
"thtMin")
346 if (name ==
"thtMax")
349 if (name ==
"radiationLength")
358 if (name ==
"nPhotMin")
361 if (name ==
"nRefrac")
364 if (name ==
"Bfield")
367 if (name ==
"effNPhotons")
370 if (name ==
"rBarrel")
382 if (name ==
"efficiency")
395 for (
int i=0;
i<5;
i++)
402 cout <<
" -W- (PndFsmDrcBarrel::readParameters) - file "<<
_parFileName.c_str()
403 <<
" doesn't exist. Using constant trapping fraction _trap="<<
_trap<<endl;
friend F32vec4 acos(const F32vec4 &a)
void setDrcBarrelThtc(double val, double err=0)
void setLHElectron(double val)
friend F32vec4 exp(const F32vec4 &a)
void setLHProton(double val)
std::list< std::string > ArgList
virtual ~PndFsmDrcBarrel()
friend F32vec4 sqrt(const F32vec4 &a)
Double_t val[nBoxes][nFEBox]
void setLHMuon(double val)
friend F32vec4 sin(const F32vec4 &a)
bool hitMapResponse(unsigned int)
bool detected(PndFsmTrack *t) const
void parseParameterList(ArgList &par)
double compThetaC(double p, double m)
basic_ostream< char, char_traits< char > > ostream
void setDetector(PndFsmAbsDet *detector)
const std::string & detName()
bool setParameter(std::string &name, double value)
void setLHKaon(double val)
friend F32vec4 fabs(const F32vec4 &a)
virtual PndFsmResponse * respond(PndFsmTrack *t)
friend F32vec4 atan2(const F32vec4 &y, const F32vec4 &x)
void setDetected(bool isdet)
double gauss(double x, double x0, double s)
void setLHPion(double val)
void print(std::ostream &o)