40 theParticleDefinition(NULL),
42 hasInitialStateParton(false),
49 theParentResonanceDef(nullptr),
50 theParentResonanceID(0),
64 hasInitialStateParton =
false;
65 theParticleDefinition = aParticleDefinition;
69 (aParticleDefinition->
GetPDGEncoding()<0) ? timeOfFlight=-1.0 : timeOfFlight=1.0;
72 theParentResonanceDef =
nullptr;
73 theParentResonanceID = 0;
81 theParticleDefinition = right.theParticleDefinition;
82 positionInNucleus = right.positionInNucleus;
83 formationTime = right.formationTime;
84 hasInitialStateParton = right.hasInitialStateParton;
85 momentum = right.momentum;
87 totalEnergy = right.totalEnergy;
88 kineticEnergy = right.kineticEnergy;
89 timeOfFlight = right.timeOfFlight;
91 theCreatorModel = right.theCreatorModel;
92 theParentResonanceDef = right.theParentResonanceDef;
93 theParentResonanceID = right.theParentResonanceID;
94 NewlyAdded = right.NewlyAdded;
95 MayBeKilled = right.MayBeKilled;
101 if(
this != &right ) {
102 theParticleDefinition = right.theParticleDefinition;
103 positionInNucleus = right.positionInNucleus;
104 formationTime = right.formationTime;
105 hasInitialStateParton = right.hasInitialStateParton;
106 momentum = right.momentum;
108 totalEnergy = right.totalEnergy;
109 kineticEnergy = right.kineticEnergy;
110 timeOfFlight = right.timeOfFlight;
112 theCreatorModel = right.theCreatorModel;
113 theParentResonanceDef = right.theParentResonanceDef;
114 theParentResonanceID = right.theParentResonanceID;
115 NewlyAdded = right.NewlyAdded;
116 MayBeKilled = right.MayBeKilled;
127 hasInitialStateParton =
false;
134 theCreatorModel = -1;
135 theParentResonanceDef =
nullptr;
136 theParentResonanceID = 0;
148 hasInitialStateParton =
false;
155 theCreatorModel = -1;
156 theParentResonanceDef =
nullptr;
157 theParentResonanceID = 0;
171 SetMomentum( aMomentum * (std::sqrt(aKineticEnergy*aKineticEnergy +
172 2*aKineticEnergy*
GetMass())/pp) );
178 theParticleDefinition = aParticleDefinition;
183 timeOfFlight=-1.0 : timeOfFlight=1.0;
214 theCreatorModel = -1;
215 theParentResonanceDef =
nullptr;
216 theParentResonanceID = 0;
220 hasInitialStateParton =
false;
230 G4double a = ( (p1x*p2x+p1y*p2y+p1z*p2z)/(p2.totalEnergy+p2.mass) -
231 p1.totalEnergy ) / p2.mass;
235 G4double p = std::sqrt(x*x+y*y+z*z);
237 SetTotalEnergy( std::sqrt( (p1.mass+p)*(p1.mass+p) - 2.*p1.mass*p ) );
249 G4double a = std::sqrt( ( px*px + py*py + pz*pz ) * ( tx*tx + ty*ty + tz*tz ) );
253 a = ( tx*px + ty*py + tz*pz ) / a;
254 if( std::abs(a) > 1.0 ) { a<0.0 ? a=-1.0 : a=1.0; }
255 return std::acos( a );
262 G4double totEnergy = p1.totalEnergy + p2.totalEnergy;
263 G4double x = p1.momentum.
x() + p2.momentum.
x();
264 G4double y = p1.momentum.
y() + p2.momentum.
y();
265 G4double z = p1.momentum.
z() + p2.momentum.
z();
266 G4double newMass = totEnergy*totEnergy - ( x*x + y*y + z*z );
268 newMass = -1. * std::sqrt( -newMass );
270 newMass = std::sqrt( newMass );
284 G4double totEnergy = p1.totalEnergy - p2.totalEnergy;
285 G4double x = p1.momentum.
x() - p2.momentum.
x();
286 G4double y = p1.momentum.
y() - p2.momentum.
y();
287 G4double z = p1.momentum.
z() - p2.momentum.
z();
288 G4double newMass = totEnergy*totEnergy - ( x*x + y*y + z*z );
290 newMass = -1. * std::sqrt( -newMass );
292 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