40 theParticleDefinition(NULL),
42 hasInitialStateParton(false),
62 hasInitialStateParton =
false;
63 theParticleDefinition = aParticleDefinition;
67 (aParticleDefinition->
GetPDGEncoding()<0) ? timeOfFlight=-1.0 : timeOfFlight=1.0;
77 theParticleDefinition = right.theParticleDefinition;
78 positionInNucleus = right.positionInNucleus;
79 formationTime = right.formationTime;
80 hasInitialStateParton = right.hasInitialStateParton;
81 momentum = right.momentum;
83 totalEnergy = right.totalEnergy;
84 kineticEnergy = right.kineticEnergy;
85 timeOfFlight = right.timeOfFlight;
87 theCreatorModel = right.theCreatorModel;
88 NewlyAdded = right.NewlyAdded;
89 MayBeKilled = right.MayBeKilled;
95 if(
this != &right ) {
96 theParticleDefinition = right.theParticleDefinition;
97 positionInNucleus = right.positionInNucleus;
98 formationTime = right.formationTime;
99 hasInitialStateParton = right.hasInitialStateParton;
100 momentum = right.momentum;
102 totalEnergy = right.totalEnergy;
103 kineticEnergy = right.kineticEnergy;
104 timeOfFlight = right.timeOfFlight;
106 theCreatorModel = right.theCreatorModel;
107 NewlyAdded = right.NewlyAdded;
108 MayBeKilled = right.MayBeKilled;
119 hasInitialStateParton =
false;
126 theCreatorModel = -1;
138 hasInitialStateParton =
false;
145 theCreatorModel = -1;
159 SetMomentum( aMomentum * (std::sqrt(aKineticEnergy*aKineticEnergy +
160 2*aKineticEnergy*
GetMass())/pp) );
166 theParticleDefinition = aParticleDefinition;
171 timeOfFlight=-1.0 : timeOfFlight=1.0;
202 theCreatorModel = -1;
206 hasInitialStateParton =
false;
216 G4double a = ( (p1x*p2x+p1y*p2y+p1z*p2z)/(p2.totalEnergy+p2.mass) -
217 p1.totalEnergy ) / p2.mass;
221 G4double p = std::sqrt(x*x+y*y+z*z);
223 SetTotalEnergy( std::sqrt( (p1.mass+p)*(p1.mass+p) - 2.*p1.mass*p ) );
235 G4double a = std::sqrt( ( px*px + py*py + pz*pz ) * ( tx*tx + ty*ty + tz*tz ) );
239 a = ( tx*px + ty*py + tz*pz ) / a;
240 if( std::abs(a) > 1.0 ) { a<0.0 ? a=-1.0 : a=1.0; }
241 return std::acos( a );
248 G4double totEnergy = p1.totalEnergy + p2.totalEnergy;
249 G4double x = p1.momentum.
x() + p2.momentum.
x();
250 G4double y = p1.momentum.
y() + p2.momentum.
y();
251 G4double z = p1.momentum.
z() + p2.momentum.
z();
252 G4double newMass = totEnergy*totEnergy - ( x*x + y*y + z*z );
254 newMass = -1. * std::sqrt( -newMass );
256 newMass = std::sqrt( newMass );
270 G4double totEnergy = p1.totalEnergy - p2.totalEnergy;
271 G4double x = p1.momentum.
x() - p2.momentum.
x();
272 G4double y = p1.momentum.
y() - p2.momentum.
y();
273 G4double z = p1.momentum.
z() - p2.momentum.
z();
274 G4double newMass = totEnergy*totEnergy - ( x*x + y*y + z*z );
276 newMass = -1. * std::sqrt( -newMass );
278 newMass = std::sqrt( newMass );
G4Allocator< G4ReactionProduct > *& aRPAllocator()
G4ReactionProduct operator+(const G4ReactionProduct &p1, const G4ReactionProduct &p2)
G4ReactionProduct operator-(const G4ReactionProduct &p1, const G4ReactionProduct &p2)
G4ParticleDefinition * GetDefinition() const
G4double GetKineticEnergy() const
G4double GetTotalEnergy() const
G4ThreeVector GetMomentum() const
const G4ParticleDefinition * GetDefinition() const
G4double GetKineticEnergy() const
const G4LorentzVector & Get4Momentum() const
G4double GetPDGMass() const
G4int GetPDGEncoding() const
void SetMomentum(const G4double x, const G4double y, const G4double z)
void SetTotalEnergy(const G4double en)
G4double GetKineticEnergy() const
void HasInitialStateParton(G4bool aFlag)
G4ThreeVector GetMomentum() const
G4ReactionProduct & operator=(const G4ReactionProduct &right)
void SetPositionInNucleus(G4double x, G4double y, G4double z)
void Lorentz(const G4ReactionProduct &p1, const G4ReactionProduct &p2)
void SetDefinitionAndUpdateE(const G4ParticleDefinition *aParticleDefinition)
void SetDefinition(const G4ParticleDefinition *aParticleDefinition)
void SetKineticEnergy(const G4double en)
G4double Angle(const G4ReactionProduct &p) const
void SetFormationTime(G4double aTime)
void SetMass(const G4double mas)
#define G4ThreadLocalStatic