34 #define INCLXX_IN_GEANT4_MODE 1
51 : particle1(p1), particle2(p2)
63 G4double q2=(y-1.157776E6)*(y-6.4E5)/y/4.0;
64 G4double q3=std::pow(std::sqrt(q2), 3.);
65 const G4double f3max=q3/(q3+5.832E6);
72 INCL_WARN(
"DeltaProductionChannel::sampleDeltaMass loop was stopped because maximum number of tries was reached. Minimum delta mass "
85 q2=(y-1.157776E6)*(y-6.4E5)/y/4.0;
86 q3=std::pow(std::sqrt(q2), 3.);
120 if (pnorm <= 0.0) pnorm=0.000001;
124 if (rndm < 0.5) index=1;
127 if (rndm < 0.5) index2=1;
134 b=(5.287/(1.+std::exp((1.3-x)/0.05)))*1.e-6;
136 b=(4.65+0.706*(x-1.4))*1.e-6;
140 G4double ctet=1.0+std::log(1.-rndm*(1.-std::exp(-2.*xkh)))/xkh;
141 if(std::abs(ctet) > 1.0) ctet =
Math::sign(ctet);
142 G4double stet = std::sqrt(1.-ctet*ctet);
150 G4double xx = particle1Momentum.perp2();
151 const G4double particle1MomentumZ = particle1Momentum.getZ();
152 G4double zz = std::pow(particle1MomentumZ, 2);
154 if (xx >= zz*1.e-8) {
170 xp1 = (ex[0]*cfi*stet+ey[0]*sfi*stet+ez[0]*ctet)*pnorm;
171 xp2 = (ex[1]*cfi*stet+ey[1]*sfi*stet+ez[1]*ctet)*pnorm;
172 xp3 = (ex[2]*cfi*stet+ey[2]*sfi*stet+ez[2]*ctet)*pnorm;
179 G4double e3 = std::sqrt(xp1*xp1+xp2*xp2+xp3*xp3
void setMass(G4double mass)
Set the mass of the particle in MeV/c^2.
G4ThreadLocal G4double minDeltaMassRndm
const G4INCL::ThreeVector & getMomentum() const
Get the momentum vector.
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.
G4double sampleDeltaMass(G4double ecm)
void setEnergy(G4double energy)
Set the energy of the particle in MeV.
Final state of an interaction.
void fillFinalState(FinalState *fs)
const G4double effectiveDeltaWidth
G4ThreadLocal G4double minDeltaMass
DeltaProductionChannel(Particle *, Particle *)
G4int getIsospin(const ParticleType t)
Get the isospin of a particle.
const G4double effectiveNucleonMass2
G4INCL::ParticleType getType() const
Get the particle type.
virtual ~DeltaProductionChannel()
void setType(ParticleType t)
G4double shoot()
Generate flat distribution of random numbers.
G4double momentumInLab(Particle const *const p1, Particle const *const p2)
gives the momentum in the lab frame of two particles.
G4double mag() const
Get the length of the vector.
const G4double effectiveDeltaMass
G4double totalEnergyInCM(Particle const *const p1, Particle const *const p2)
static const G4int maxTries
G4int sign(const T t)
A simple sign function that allows us to port fortran code to c++ more easily.
const G4double effectiveNucleonMass
void addModifiedParticle(Particle *p)
void setHelicity(G4double h)
virtual void setMomentum(const G4INCL::ThreeVector &momentum)
Set the momentum vector.