33 #define INCLXX_IN_GEANT4_MODE 1
48 : particle1(p1), particle2(p2)
55 const G4int maxTries = 100000;
68 G4double q2=(y-1.157776E6)*(y-6.4E5)/y/4.0;
69 G4double q3=std::pow(std::sqrt(q2), 3.);
72 q2=(y-1.157776E6)*(y-6.4E5)/y/4.0;
73 q3=std::pow(std::sqrt(q2), 3.);
76 if (rndm > f3/f3max && (nTries < maxTries))
goto deltaProd101;
77 if(nTries >= maxTries) {
78 INCL_WARN(
"DeltaProductionChannel::sampleDeltaMass loop was stopped because maximum number of tries was reached. Delta mass " << x <<
" MeV with CM energy " << ecm <<
" MeV may be unphysical." << std::endl);
104 G4double xmdel = sampleDeltaMass(ecm);
107 if (pnorm <= 0.0) pnorm=0.000001;
111 if (rndm < 0.5) index=1;
114 if (rndm < 0.5) index2=1;
121 b=(5.287/(1.+std::exp((1.3-x)/0.05)))*1.e-6;
123 b=(4.65+0.706*(x-1.4))*1.e-6;
127 G4double ctet=1.0+std::log(1.-rndm*(1.-std::exp(-2.*xkh)))/xkh;
128 if(std::abs(ctet) > 1.0) ctet =
Math::sign(ctet);
129 G4double stet = std::sqrt(1.-ctet*ctet);
140 if (xx >= zz*1.e-8) {
156 xp1 = (ex[0]*cfi*stet+ey[0]*sfi*stet+ez[0]*ctet)*pnorm;
157 xp2 = (ex[1]*cfi*stet+ey[1]*sfi*stet+ez[1]*ctet)*pnorm;
158 xp3 = (ex[2]*cfi*stet+ey[2]*sfi*stet+ez[2]*ctet)*pnorm;
165 G4double e3 = std::sqrt(xp1*xp1+xp2*xp2+xp3*xp3
void setMass(G4double mass)
const G4INCL::ThreeVector & getMomentum() const
G4bool isDelta() const
Is it a Delta?
G4double momentumInCM(Particle const *const p1, Particle const *const p2)
gives the momentum in the CM frame of two particles.
void setEnergy(G4double energy)
double precision function rndm(RDUMMY)
DeltaProductionChannel(Particle *, Particle *)
G4int getIsospin(const ParticleType t)
Get the isospin of a particle.
FinalState * getFinalState()
const G4double effectiveNucleonMass2
G4INCL::ParticleType getType() const
virtual ~DeltaProductionChannel()
void setType(ParticleType t)
G4double momentumInLab(Particle const *const p1, Particle const *const p2)
gives the momentum in the lab frame of two particles.
G4ThreadLocal G4double effectiveDeltaDecayThreshold
G4double totalEnergyInCM(Particle const *const p1, Particle const *const p2)
const G4double effectiveNucleonMass
void addModifiedParticle(Particle *p)
void setHelicity(G4double h)
virtual void setMomentum(const G4INCL::ThreeVector &momentum)