178 const float* flux = 0;
182 if (pdgcode== 12)
return flux[0];
183 if (pdgcode==-12)
return flux[1];
184 if (pdgcode== 14)
return flux[2];
185 if (pdgcode==-14)
return flux[3];
186 if (pdgcode== 16)
return flux[4];
187 if (pdgcode==-16)
return flux[5];
194 double numu,
double numubar,
195 double nutau,
double nutaubar)
205 double numu,
double numubar,
206 double nutau,
double nutaubar)
215 double numu,
double numubar,
216 double nutau,
double nutaubar)
234 const double pimass=.13957;
235 const double mumass=0.105658389;
236 const double kmass=0.49368;
237 const double k0mass=0.49767;
254 std::cerr<<
"dont know ptype "<<
fptype<<
"can not compute new decay weight"<<
std::endl;
261 double gamma = Eplab/mass;
262 double beta = sqrt((gamma*gamma-1)/(gamma*gamma));
266 double rnx=1.*(x-
fvx);
267 double rny=1.*(y-
fvy);
268 double rnz=1.*(z-
fvz);
269 double rn=sqrt(rnx*rnx+rny*rny+rnz*rnz);
274 double costhetan = rndotp/(rn*
p);
290 MN=1./(gamma*(1-beta*costhetan));
300 const double kRDET = 100.;
301 double san = (1.0-cos(atan( kRDET / rn )))/2.0;
310 double betav[3]={0.};
313 double P_nun[3]={0.};
314 double P_dcm_nun[4]={0.};
315 double P_pcm_mp[4]={0.};
317 betav[0] =
fpdpx/Eplab;
318 betav[1] =
fpdpy/Eplab;
319 betav[2] = fpdpz/Eplab;
321 P_nun[0] = rnx*newE/rn;
322 P_nun[1] = rny*newE/rn;
323 P_nun[2] = rnz*newE/rn;
325 partialn =gamma*(betav[0]*P_nun[0]+betav[1]*P_nun[1]+betav[2]*P_nun[2]);
326 partialn = newE - partialn /(gamma+1.);
328 P_dcm_nun[0] = P_nun[0] - betav[0]*gamma*partialn;
329 P_dcm_nun[1] = P_nun[1] - betav[1]*gamma*partialn;
330 P_dcm_nun[2] = P_nun[2] - betav[2]*gamma*partialn;
331 P_dcm_nun[3] = sqrt(
pow(P_dcm_nun[0],2)
333 +
pow(P_dcm_nun[2],2));
341 partial = gamma*(betav[0]*
fmuparpx +
343 partial =
fmupare-partial/(gamma+1.);
344 P_pcm_mp[0] =
fmuparpx - betav[0]*gamma*partial;
345 P_pcm_mp[1] =
fmuparpy - betav[1]*gamma*partial;
346 P_pcm_mp[2] =
fmuparpz - betav[2]*gamma*partial;
347 P_pcm_mp[3] = sqrt(
pow(P_pcm_mp[0],2)+
353 if(P_dcm_nun[3]!=0&&P_pcm_mp[3]!=0){
354 costhn = ( P_dcm_nun[0]*P_pcm_mp[0]+
355 P_dcm_nun[1]*P_pcm_mp[1]+
356 P_dcm_nun[2]*P_pcm_mp[2])/(P_dcm_nun[3]*P_pcm_mp[3]);
370 double xnu = 2.*fnecm/mass;
371 wt_ration = ( (3.-2.*xnu) - (1.-2.*xnu)*costhn ) / (3.-2.*xnu);
double beta(double KE, const simb::MCParticle *part)
double Flux(int pdgcode, int which=0) const
double fgen2vtx
distance from ray origin to event vtx
Flux for negative horn focus.
double fgenx
origin of ray from flux generator
float fFluxNeg[6]
Fluxes as aboce, for negative horn focus.
A bogus flux assumed by the generator.
double fdk2gen
distance from decay to ray origin
object containing MC flux information
Flux for positive horn focus.
void SetFluxNeg(double nue, double nuebar, double numu, double numubar, double nutau, double nutaubar)
double gamma(double KE, const simb::MCParticle *part)
Base utilities and modules for event generation and detector simulation.
Q_EXPORT QTSManip setw(int w)
void SetFluxGen(double nue, double nuebar, double numu, double numubar, double nutau, double nutaubar)
float fFluxGen[6]
Fluxes as above, assumed by generator.
void SetFluxPos(double nue, double nuebar, double numu, double numubar, double nutau, double nutaubar)
friend std::ostream & operator<<(std::ostream &output, const simb::MCFlux &mcflux)
float fFluxPos[6]
e,ebar,mu,mubar,tau,taubar flux, +horn focus
void ReDecay(double &newE, double &newW, double x, double y, double z)
QTextStream & endl(QTextStream &s)