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;
150 SetMomentum( aMomentum * (std::sqrt(aKineticEnergy*aKineticEnergy +
151 2*aKineticEnergy*
GetMass())/pp) );
157 theParticleDefinition = aParticleDefinition;
162 timeOfFlight=-1.0 : timeOfFlight=1.0;
196 hasInitialStateParton =
false;
206 G4double a = ( (p1x*p2x+p1y*p2y+p1z*p2z)/(p2.totalEnergy+p2.mass) -
207 p1.totalEnergy ) / p2.mass;
225 G4double a = std::sqrt( ( px*px + py*py + pz*pz ) * ( tx*tx + ty*ty + tz*tz ) );
229 a = ( tx*px + ty*py + tz*pz ) / a;
230 if( std::fabs(a) > 1.0 ) { a<0.0 ? a=-1.0 : a=1.0; }
231 return std::acos( a );
238 G4double totEnergy = p1.totalEnergy + p2.totalEnergy;
240 G4double y = p1.momentum.
y() + p2.momentum.
y();
242 G4double newMass = totEnergy*totEnergy - ( x*x + y*y + z*
z );
244 newMass = -1. * std::sqrt( -newMass );
246 newMass = std::sqrt( newMass );
260 G4double totEnergy = p1.totalEnergy - p2.totalEnergy;
262 G4double y = p1.momentum.
y() - p2.momentum.
y();
264 G4double newMass = totEnergy*totEnergy - ( x*x + y*y + z*
z );
266 newMass = -1. * std::sqrt( -newMass );
268 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)
G4ThreadLocal G4Allocator< G4ReactionProduct > * aRPAllocator
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
void SetDefinition(G4ParticleDefinition *aParticleDefinition)
G4ThreeVector GetMomentum() const
void SetFormationTime(G4double aTime)
G4ThreeVector GetMomentum() const