37 theParticleDefinition(NULL),
39 hasInitialStateParton(false),
58 hasInitialStateParton =
false;
59 theParticleDefinition = aParticleDefinition;
63 (aParticleDefinition->
GetPDGEncoding()<0) ? timeOfFlight=-1.0 : timeOfFlight=1.0;
72 theParticleDefinition = right.theParticleDefinition;
73 positionInNucleus = right.positionInNucleus;
74 formationTime = right.formationTime;
75 hasInitialStateParton = right.hasInitialStateParton;
76 momentum = right.momentum;
78 totalEnergy = right.totalEnergy;
79 kineticEnergy = right.kineticEnergy;
80 timeOfFlight = right.timeOfFlight;
82 NewlyAdded = right.NewlyAdded;
83 MayBeKilled = right.MayBeKilled;
89 if(
this != &right ) {
90 theParticleDefinition = right.theParticleDefinition;
91 positionInNucleus = right.positionInNucleus;
92 formationTime = right.formationTime;
93 hasInitialStateParton = right.hasInitialStateParton;
94 momentum = right.momentum;
96 totalEnergy = right.totalEnergy;
97 kineticEnergy = right.kineticEnergy;
98 timeOfFlight = right.timeOfFlight;
100 NewlyAdded = right.NewlyAdded;
101 MayBeKilled = right.MayBeKilled;
112 hasInitialStateParton =
false;
130 hasInitialStateParton =
false;
151 SetMomentum( aMomentum * (std::sqrt(aKineticEnergy*aKineticEnergy +
152 2*aKineticEnergy*
GetMass())/pp) );
158 theParticleDefinition = aParticleDefinition;
163 timeOfFlight=-1.0 : timeOfFlight=1.0;
197 hasInitialStateParton =
false;
207 G4double a = ( (p1x*p2x+p1y*p2y+p1z*p2z)/(p2.totalEnergy+p2.mass) -
208 p1.totalEnergy ) / p2.mass;
226 G4double a = std::sqrt( ( px*px + py*py + pz*pz ) * ( tx*tx + ty*ty + tz*tz ) );
230 a = ( tx*px + ty*py + tz*pz ) / a;
231 if( std::fabs(a) > 1.0 ) { a<0.0 ? a=-1.0 : a=1.0; }
232 return std::acos( a );
239 G4double totEnergy = p1.totalEnergy + p2.totalEnergy;
243 G4double newMass = totEnergy*totEnergy - ( x*x + y*y + z*
z );
245 newMass = -1. * std::sqrt( -newMass );
247 newMass = std::sqrt( newMass );
261 G4double totEnergy = p1.totalEnergy - p2.totalEnergy;
265 G4double newMass = totEnergy*totEnergy - ( x*x + y*y + z*
z );
267 newMass = -1. * std::sqrt( -newMass );
269 newMass = std::sqrt( newMass );
void SetPositionInNucleus(G4double x, G4double y, G4double z)
void HasInitialStateParton(G4bool aFlag)
void Lorentz(const G4ReactionProduct &p1, const G4ReactionProduct &p2)
G4double GetKineticEnergy() const
G4double GetTotalEnergy() const
void SetKineticEnergy(const G4double en)
void SetMomentum(const G4double x, const G4double y, const G4double z)
BasicVector3D< float > operator-(const BasicVector3D< float > &v)
BasicVector3D< float > operator+(const BasicVector3D< float > &v)
G4double G4NeutronHPJENDLHEData::G4double result
G4int GetPDGEncoding() const
G4ParticleDefinition * GetDefinition() const
void SetDefinitionAndUpdateE(G4ParticleDefinition *aParticleDefinition)
G4double Angle(const G4ReactionProduct &p) const
G4ReactionProduct & operator=(const G4ReactionProduct &right)
void SetMass(const G4double mas)
const G4ParticleDefinition * GetDefinition() const
G4double GetKineticEnergy() const
void SetTotalEnergy(const G4double en)
const G4LorentzVector & Get4Momentum() const
G4double GetKineticEnergy() const
G4double GetPDGMass() const
G4DLLIMPORT G4ThreadLocal G4Allocator< G4ReactionProduct > * aRPAllocator_G4MT_TLS_
void SetDefinition(G4ParticleDefinition *aParticleDefinition)
G4ThreeVector GetMomentum() const
void SetFormationTime(G4double aTime)
G4ThreeVector GetMomentum() const