37 theParticleDefinition(NULL),
39 hasInitialStateParton(false),
59 hasInitialStateParton =
false;
60 theParticleDefinition = aParticleDefinition;
64 (aParticleDefinition->
GetPDGEncoding()<0) ? timeOfFlight=-1.0 : timeOfFlight=1.0;
74 theParticleDefinition = right.theParticleDefinition;
75 positionInNucleus = right.positionInNucleus;
76 formationTime = right.formationTime;
77 hasInitialStateParton = right.hasInitialStateParton;
78 momentum = right.momentum;
80 totalEnergy = right.totalEnergy;
81 kineticEnergy = right.kineticEnergy;
82 timeOfFlight = right.timeOfFlight;
84 theCreatorModel = right.theCreatorModel;
85 NewlyAdded = right.NewlyAdded;
86 MayBeKilled = right.MayBeKilled;
92 if(
this != &right ) {
93 theParticleDefinition = right.theParticleDefinition;
94 positionInNucleus = right.positionInNucleus;
95 formationTime = right.formationTime;
96 hasInitialStateParton = right.hasInitialStateParton;
97 momentum = right.momentum;
99 totalEnergy = right.totalEnergy;
100 kineticEnergy = right.kineticEnergy;
101 timeOfFlight = right.timeOfFlight;
103 theCreatorModel = right.theCreatorModel;
104 NewlyAdded = right.NewlyAdded;
105 MayBeKilled = right.MayBeKilled;
116 hasInitialStateParton =
false;
123 theCreatorModel = -1;
135 hasInitialStateParton =
false;
142 theCreatorModel = -1;
156 SetMomentum( aMomentum * (std::sqrt(aKineticEnergy*aKineticEnergy +
157 2*aKineticEnergy*
GetMass())/pp) );
163 theParticleDefinition = aParticleDefinition;
168 timeOfFlight=-1.0 : timeOfFlight=1.0;
199 theCreatorModel = -1;
203 hasInitialStateParton =
false;
213 G4double a = ( (p1x*p2x+p1y*p2y+p1z*p2z)/(p2.totalEnergy+p2.mass) -
214 p1.totalEnergy ) / p2.mass;
232 G4double a = std::sqrt( ( px*px + py*py + pz*pz ) * ( tx*tx + ty*ty + tz*tz ) );
236 a = ( tx*px + ty*py + tz*pz ) / a;
237 if( std::fabs(a) > 1.0 ) { a<0.0 ? a=-1.0 : a=1.0; }
238 return std::acos( a );
245 G4double totEnergy = p1.totalEnergy + p2.totalEnergy;
246 G4double x = p1.momentum.
x() + p2.momentum.
x();
247 G4double y = p1.momentum.
y() + p2.momentum.
y();
248 G4double z = p1.momentum.
z() + p2.momentum.
z();
249 G4double newMass = totEnergy*totEnergy - ( x*x + y*y + z*z );
251 newMass = -1. * std::sqrt( -newMass );
253 newMass = std::sqrt( newMass );
267 G4double totEnergy = p1.totalEnergy - p2.totalEnergy;
268 G4double x = p1.momentum.
x() - p2.momentum.
x();
269 G4double y = p1.momentum.
y() - p2.momentum.
y();
270 G4double z = p1.momentum.
z() - p2.momentum.
z();
271 G4double newMass = totEnergy*totEnergy - ( x*x + y*y + z*z );
273 newMass = -1. * std::sqrt( -newMass );
275 newMass = std::sqrt( newMass );
G4double G4ParticleHPJENDLHEData::G4double result
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)
G4int GetPDGEncoding() const
G4ParticleDefinition * GetDefinition() const
void SetDefinition(const 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)
G4DLLIMPORT G4ThreadLocal G4Allocator< G4ReactionProduct > * aRPAllocator
void SetDefinitionAndUpdateE(const G4ParticleDefinition *aParticleDefinition)
const G4LorentzVector & Get4Momentum() const
G4double GetKineticEnergy() const
G4double GetPDGMass() const
G4ThreeVector GetMomentum() const
void SetFormationTime(G4double aTime)
G4ThreeVector GetMomentum() const