Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4ReactionProduct Class Reference

#include <G4ReactionProduct.hh>

Public Member Functions

 G4ReactionProduct ()
 
 G4ReactionProduct (G4ParticleDefinition *aParticleDefinition)
 
 ~G4ReactionProduct ()
 
 G4ReactionProduct (const G4ReactionProduct &right)
 
void * operator new (size_t)
 
void operator delete (void *aReactionProduct)
 
G4ReactionProductoperator= (const G4ReactionProduct &right)
 
G4ReactionProductoperator= (const G4DynamicParticle &right)
 
G4ReactionProductoperator= (const G4HadProjectile &right)
 
G4bool operator== (const G4ReactionProduct &right) const
 
G4bool operator!= (const G4ReactionProduct &right) const
 
G4ParticleDefinitionGetDefinition () const
 
void SetDefinition (G4ParticleDefinition *aParticleDefinition)
 
void SetDefinitionAndUpdateE (G4ParticleDefinition *aParticleDefinition)
 
void SetMomentum (const G4double x, const G4double y, const G4double z)
 
void SetMomentum (const G4double x, const G4double y)
 
void SetMomentum (const G4double z)
 
void SetMomentum (const G4ThreeVector &mom)
 
G4ThreeVector GetMomentum () const
 
G4double GetTotalMomentum () const
 
G4double GetTotalEnergy () const
 
void SetKineticEnergy (const G4double en)
 
G4double GetKineticEnergy () const
 
void SetTotalEnergy (const G4double en)
 
void SetMass (const G4double mas)
 
G4double GetMass () const
 
void SetTOF (const G4double t)
 
G4double GetTOF () const
 
void SetSide (const G4int sid)
 
G4int GetSide () const
 
void SetNewlyAdded (const G4bool f)
 
G4bool GetNewlyAdded () const
 
void SetMayBeKilled (const G4bool f)
 
G4bool GetMayBeKilled () const
 
void SetZero ()
 
void Lorentz (const G4ReactionProduct &p1, const G4ReactionProduct &p2)
 
G4double Angle (const G4ReactionProduct &p) const
 
void SetPositionInNucleus (G4double x, G4double y, G4double z)
 
void SetPositionInNucleus (G4ThreeVector &aPosition)
 
G4ThreeVector GetPositionInNucleus () const
 
G4double GetXPositionInNucleus () const
 
G4double GetYPositionInNucleus () const
 
G4double GetZPositionInNucleus () const
 
void SetFormationTime (G4double aTime)
 
G4double GetFormationTime () const
 
void HasInitialStateParton (G4bool aFlag)
 
G4bool HasInitialStateParton () const
 

Friends

G4ReactionProduct operator+ (const G4ReactionProduct &p1, const G4ReactionProduct &p2)
 
G4ReactionProduct operator- (const G4ReactionProduct &p1, const G4ReactionProduct &p2)
 
G4ReactionProduct operator* (const G4double aDouble, const G4ReactionProduct &p2)
 

Detailed Description

Definition at line 51 of file G4ReactionProduct.hh.

Constructor & Destructor Documentation

◆ G4ReactionProduct() [1/3]

G4ReactionProduct::G4ReactionProduct ( )

Definition at line 36 of file G4ReactionProduct.cc.

36 :
37 theParticleDefinition(NULL),
38 formationTime(0.0),
39 hasInitialStateParton(false),
40 mass(0.0),
41 totalEnergy(0.0),
42 kineticEnergy(0.0),
43 timeOfFlight(0.0),
44 side(0),
45 NewlyAdded(false),
46 MayBeKilled(true)
47 {
48 SetMomentum( 0.0, 0.0, 0.0 );
49 SetPositionInNucleus( 0.0, 0.0, 0.0 );
50 }
void SetMomentum(const G4double x, const G4double y, const G4double z)
void SetPositionInNucleus(G4double x, G4double y, G4double z)

◆ G4ReactionProduct() [2/3]

G4ReactionProduct::G4ReactionProduct ( G4ParticleDefinition aParticleDefinition)

Definition at line 52 of file G4ReactionProduct.cc.

54 {
55 SetMomentum( 0.0, 0.0, 0.0 );
56 SetPositionInNucleus( 0.0, 0.0, 0.0 );
57 formationTime = 0.0;
58 hasInitialStateParton = false;
59 theParticleDefinition = aParticleDefinition;
60 mass = aParticleDefinition->GetPDGMass();
61 totalEnergy = mass;
62 kineticEnergy = 0.0;
63 (aParticleDefinition->GetPDGEncoding()<0) ? timeOfFlight=-1.0 : timeOfFlight=1.0;
64 side = 0;
65 NewlyAdded = false;
66 MayBeKilled = true;
67 }

◆ ~G4ReactionProduct()

G4ReactionProduct::~G4ReactionProduct ( )
inline

Definition at line 75 of file G4ReactionProduct.hh.

75{}

◆ G4ReactionProduct() [3/3]

G4ReactionProduct::G4ReactionProduct ( const G4ReactionProduct right)

Definition at line 69 of file G4ReactionProduct.cc.

71 {
72 theParticleDefinition = right.theParticleDefinition;
73 positionInNucleus = right.positionInNucleus;
74 formationTime = right.formationTime;
75 hasInitialStateParton = right.hasInitialStateParton;
76 momentum = right.momentum;
77 mass = right.mass;
78 totalEnergy = right.totalEnergy;
79 kineticEnergy = right.kineticEnergy;
80 timeOfFlight = right.timeOfFlight;
81 side = right.side;
82 NewlyAdded = right.NewlyAdded;
83 MayBeKilled = right.MayBeKilled;
84 }

Member Function Documentation

◆ Angle()

G4double G4ReactionProduct::Angle ( const G4ReactionProduct p) const

Definition at line 219 of file G4ReactionProduct.cc.

221 {
222 G4ThreeVector tM = momentum;
223 G4ThreeVector pM = p.momentum;
224 G4double tx = tM.x(); G4double ty = tM.y(); G4double tz = tM.z();
225 G4double px = pM.x(); G4double py = pM.y(); G4double pz = pM.z();
226 G4double a = std::sqrt( ( px*px + py*py + pz*pz ) * ( tx*tx + ty*ty + tz*tz ) );
227 if( a == 0.0 ) {
228 return 0.0;
229 } else {
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 );
233 }
234 }
double G4double
Definition: G4Types.hh:64
double z() const
double x() const
double y() const

◆ GetDefinition()

◆ GetFormationTime()

G4double G4ReactionProduct::GetFormationTime ( ) const
inline

Definition at line 199 of file G4ReactionProduct.hh.

199{ return formationTime; }

◆ GetKineticEnergy()

G4double G4ReactionProduct::GetKineticEnergy ( ) const
inline

Definition at line 135 of file G4ReactionProduct.hh.

136 { return kineticEnergy; }

Referenced by G4RPGReaction::AddBlackTrackParticles(), G4LENDElastic::ApplyYourself(), G4LENDModel::ApplyYourself(), G4LEAntiKaonZeroInelastic::ApplyYourself(), G4LEAntiNeutronInelastic::ApplyYourself(), G4LEAntiOmegaMinusInelastic::ApplyYourself(), G4LEAntiProtonInelastic::ApplyYourself(), G4LEAntiSigmaMinusInelastic::ApplyYourself(), G4LEAntiSigmaPlusInelastic::ApplyYourself(), G4LEAntiXiMinusInelastic::ApplyYourself(), G4LEAntiXiZeroInelastic::ApplyYourself(), G4LEKaonMinusInelastic::ApplyYourself(), G4LEKaonPlusInelastic::ApplyYourself(), G4LEKaonZeroInelastic::ApplyYourself(), G4LELambdaInelastic::ApplyYourself(), G4LENeutronInelastic::ApplyYourself(), G4LEOmegaMinusInelastic::ApplyYourself(), G4LEPionMinusInelastic::ApplyYourself(), G4LEPionPlusInelastic::ApplyYourself(), G4LEProtonInelastic::ApplyYourself(), G4LESigmaPlusInelastic::ApplyYourself(), G4LEXiMinusInelastic::ApplyYourself(), G4LEXiZeroInelastic::ApplyYourself(), G4RPGAntiKZeroInelastic::ApplyYourself(), G4RPGAntiNeutronInelastic::ApplyYourself(), G4RPGAntiOmegaMinusInelastic::ApplyYourself(), G4RPGAntiProtonInelastic::ApplyYourself(), G4RPGAntiSigmaMinusInelastic::ApplyYourself(), G4RPGAntiSigmaPlusInelastic::ApplyYourself(), G4RPGAntiXiMinusInelastic::ApplyYourself(), G4RPGAntiXiZeroInelastic::ApplyYourself(), G4RPGKMinusInelastic::ApplyYourself(), G4RPGKPlusInelastic::ApplyYourself(), G4RPGKZeroInelastic::ApplyYourself(), G4RPGLambdaInelastic::ApplyYourself(), G4RPGNeutronInelastic::ApplyYourself(), G4RPGOmegaMinusInelastic::ApplyYourself(), G4RPGPiMinusInelastic::ApplyYourself(), G4RPGPiPlusInelastic::ApplyYourself(), G4RPGProtonInelastic::ApplyYourself(), G4RPGSigmaPlusInelastic::ApplyYourself(), G4RPGXiMinusInelastic::ApplyYourself(), G4RPGXiZeroInelastic::ApplyYourself(), G4MuMinusCapturePrecompound::ApplyYourself(), G4FissionLibrary::ApplyYourself(), G4NeutronHPCaptureFS::ApplyYourself(), G4NeutronHPElasticFS::ApplyYourself(), G4NeutronHPFissionFS::ApplyYourself(), G4NeutronHPFissionBaseFS::ApplyYourself(), G4NeutronHPFSFissionFS::ApplyYourself(), G4NeutronHPInelasticBaseFS::BaseApply(), G4RPGInelastic::CalculateMomenta(), G4InelasticInteraction::CalculateMomenta(), G4NeutronHPInelasticCompFS::CompositeApply(), G4ReactionDynamics::GenerateXandPt(), G4NeutronHPCaptureData::GetCrossSection(), G4NeutronHPElasticData::GetCrossSection(), G4NeutronHPFissionData::GetCrossSection(), G4NeutronHPInelasticData::GetCrossSection(), G4NeutronHPorLCaptureData::GetCrossSection(), G4NeutronHPorLEInelasticData::GetCrossSection(), G4NeutronHPorLElasticData::GetCrossSection(), G4NeutronHPorLFissionData::GetCrossSection(), G4NeutronHPFSFissionFS::GetPhotons(), G4NeutronHPThermalBoost::GetThermalEnergy(), G4RPGReaction::NuclearReaction(), G4ReactionDynamics::NuclearReaction(), G4RPGFragmentation::ReactionStage(), G4RPGTwoBody::ReactionStage(), G4RPGTwoCluster::ReactionStage(), G4RPGReaction::Rotate(), G4NeutronHPEnAngCorrelation::Sample(), G4NeutronHPAngular::SampleAndUpdate(), G4QGSParticipants::SelectInteractions(), SetDefinitionAndUpdateE(), G4RPGInelastic::SetUpChange(), G4InelasticInteraction::SetUpChange(), G4ReactionDynamics::TwoBody(), and G4ReactionDynamics::TwoCluster().

◆ GetMass()

G4double G4ReactionProduct::GetMass ( ) const
inline

Definition at line 147 of file G4ReactionProduct.hh.

148 { return mass; }

Referenced by G4LENDElastic::ApplyYourself(), G4LENDModel::ApplyYourself(), G4NeutronHPElasticFS::ApplyYourself(), G4NeutronHPInelasticBaseFS::BaseApply(), G4RPGInelastic::CalculateMomenta(), G4InelasticInteraction::CalculateMomenta(), G4NeutronHPInelasticCompFS::CompositeApply(), G4ReactionDynamics::GenerateXandPt(), G4Nucleus::GetBiasedThermalNucleus(), G4NeutronHPCaptureData::GetCrossSection(), G4NeutronHPElasticData::GetCrossSection(), G4NeutronHPFissionData::GetCrossSection(), G4NeutronHPInelasticData::GetCrossSection(), G4NeutronHPorLCaptureData::GetCrossSection(), G4NeutronHPorLEInelasticData::GetCrossSection(), G4NeutronHPorLElasticData::GetCrossSection(), G4NeutronHPorLFissionData::GetCrossSection(), G4Nucleus::GetThermalNucleus(), G4InelasticInteraction::MarkLeadingStrangeParticle(), G4RPGInelastic::MarkLeadingStrangeParticle(), G4RPGReaction::MomentumCheck(), G4RPGReaction::NuclearReaction(), G4ReactionDynamics::NuclearReaction(), G4ReactionDynamics::ProduceStrangeParticlePairs(), G4RPGFragmentation::ReactionStage(), G4RPGPionSuppression::ReactionStage(), G4RPGStrangeProduction::ReactionStage(), G4RPGTwoBody::ReactionStage(), G4RPGTwoCluster::ReactionStage(), G4NeutronHPContEnergyAngular::Sample(), G4NeutronHPDiscreteTwoBody::Sample(), G4NeutronHPNBodyPhaseSpace::Sample(), G4NeutronHPContAngularPar::Sample(), G4NeutronHPAngular::SampleAndUpdate(), G4QGSParticipants::SelectInteractions(), SetDefinitionAndUpdateE(), G4RPGInelastic::SetUpChange(), G4InelasticInteraction::SetUpChange(), G4ReactionDynamics::SuppressChargedPions(), G4ReactionDynamics::TwoBody(), and G4ReactionDynamics::TwoCluster().

◆ GetMayBeKilled()

G4bool G4ReactionProduct::GetMayBeKilled ( ) const
inline

Definition at line 171 of file G4ReactionProduct.hh.

172 { return MayBeKilled; }

◆ GetMomentum()

G4ThreeVector G4ReactionProduct::GetMomentum ( ) const
inline

Definition at line 120 of file G4ReactionProduct.hh.

121 { return momentum; }

Referenced by G4LENDElastic::ApplyYourself(), G4LENDModel::ApplyYourself(), G4LEAntiKaonZeroInelastic::ApplyYourself(), G4LEAntiLambdaInelastic::ApplyYourself(), G4LEAntiNeutronInelastic::ApplyYourself(), G4LEAntiOmegaMinusInelastic::ApplyYourself(), G4LEAntiProtonInelastic::ApplyYourself(), G4LEAntiSigmaMinusInelastic::ApplyYourself(), G4LEAntiSigmaPlusInelastic::ApplyYourself(), G4LEAntiXiMinusInelastic::ApplyYourself(), G4LEAntiXiZeroInelastic::ApplyYourself(), G4LEKaonMinusInelastic::ApplyYourself(), G4LEKaonPlusInelastic::ApplyYourself(), G4LEKaonZeroInelastic::ApplyYourself(), G4LELambdaInelastic::ApplyYourself(), G4LENeutronInelastic::ApplyYourself(), G4LEOmegaMinusInelastic::ApplyYourself(), G4LEPionMinusInelastic::ApplyYourself(), G4LEPionPlusInelastic::ApplyYourself(), G4LEProtonInelastic::ApplyYourself(), G4LESigmaMinusInelastic::ApplyYourself(), G4LESigmaPlusInelastic::ApplyYourself(), G4LEXiMinusInelastic::ApplyYourself(), G4LEXiZeroInelastic::ApplyYourself(), G4RPGAntiKZeroInelastic::ApplyYourself(), G4RPGAntiLambdaInelastic::ApplyYourself(), G4RPGAntiNeutronInelastic::ApplyYourself(), G4RPGAntiOmegaMinusInelastic::ApplyYourself(), G4RPGAntiProtonInelastic::ApplyYourself(), G4RPGAntiSigmaMinusInelastic::ApplyYourself(), G4RPGAntiSigmaPlusInelastic::ApplyYourself(), G4RPGAntiXiMinusInelastic::ApplyYourself(), G4RPGAntiXiZeroInelastic::ApplyYourself(), G4RPGKMinusInelastic::ApplyYourself(), G4RPGKPlusInelastic::ApplyYourself(), G4RPGKZeroInelastic::ApplyYourself(), G4RPGLambdaInelastic::ApplyYourself(), G4RPGNeutronInelastic::ApplyYourself(), G4RPGOmegaMinusInelastic::ApplyYourself(), G4RPGPiMinusInelastic::ApplyYourself(), G4RPGPiPlusInelastic::ApplyYourself(), G4RPGProtonInelastic::ApplyYourself(), G4RPGSigmaMinusInelastic::ApplyYourself(), G4RPGSigmaPlusInelastic::ApplyYourself(), G4RPGXiMinusInelastic::ApplyYourself(), G4RPGXiZeroInelastic::ApplyYourself(), G4MuMinusCapturePrecompound::ApplyYourself(), G4ParaFissionModel::ApplyYourself(), G4LowEIonFragmentation::ApplyYourself(), G4FissionLibrary::ApplyYourself(), G4NeutronHPCaptureFS::ApplyYourself(), G4NeutronHPElasticFS::ApplyYourself(), G4NeutronHPFissionFS::ApplyYourself(), G4MuonMinusCaptureAtRest::AtRestDoIt(), G4NeutronHPInelasticBaseFS::BaseApply(), G4RPGInelastic::CalculateMomenta(), G4InelasticInteraction::CalculateMomenta(), G4NeutronHPInelasticCompFS::CompositeApply(), G4RPGReaction::Defs1(), G4VSplitableHadron::G4VSplitableHadron(), G4ReactionDynamics::GenerateXandPt(), G4Nucleus::GetBiasedThermalNucleus(), G4NeutronHPCaptureData::GetCrossSection(), G4NeutronHPElasticData::GetCrossSection(), G4NeutronHPFissionData::GetCrossSection(), G4NeutronHPInelasticData::GetCrossSection(), G4NeutronHPorLCaptureData::GetCrossSection(), G4NeutronHPorLEInelasticData::GetCrossSection(), G4NeutronHPorLElasticData::GetCrossSection(), G4NeutronHPorLFissionData::GetCrossSection(), G4NeutronHPThermalBoost::GetThermalEnergy(), G4FTFModel::Init(), G4RPGReaction::MomentumCheck(), G4RPGReaction::NuclearReaction(), G4ReactionDynamics::NuclearReaction(), ReactionProduct4Mom::operator()(), G4RPGFragmentation::ReactionStage(), G4RPGTwoBody::ReactionStage(), G4RPGTwoCluster::ReactionStage(), G4RPGReaction::Rotate(), G4NeutronHPEnAngCorrelation::Sample(), G4NeutronHPAngular::SampleAndUpdate(), G4QGSParticipants::SelectInteractions(), SetDefinitionAndUpdateE(), G4RPGInelastic::SetUpChange(), G4InelasticInteraction::SetUpChange(), G4ReactionDynamics::TwoBody(), and G4ReactionDynamics::TwoCluster().

◆ GetNewlyAdded()

G4bool G4ReactionProduct::GetNewlyAdded ( ) const
inline

Definition at line 165 of file G4ReactionProduct.hh.

166 { return NewlyAdded; }

◆ GetPositionInNucleus()

G4ThreeVector G4ReactionProduct::GetPositionInNucleus ( ) const
inline

Definition at line 192 of file G4ReactionProduct.hh.

192{return positionInNucleus; }

◆ GetSide()

G4int G4ReactionProduct::GetSide ( ) const
inline

◆ GetTOF()

G4double G4ReactionProduct::GetTOF ( ) const
inline

Definition at line 153 of file G4ReactionProduct.hh.

154 { return timeOfFlight; }

Referenced by G4MuMinusCapturePrecompound::ApplyYourself(), and G4MuonMinusCaptureAtRest::AtRestDoIt().

◆ GetTotalEnergy()

◆ GetTotalMomentum()

G4double G4ReactionProduct::GetTotalMomentum ( ) const
inline

Definition at line 123 of file G4ReactionProduct.hh.

124 { return std::sqrt(std::abs(kineticEnergy*(totalEnergy+mass))); }

Referenced by G4LENDElastic::ApplyYourself(), G4LENDModel::ApplyYourself(), G4LEAntiLambdaInelastic::ApplyYourself(), G4LEAntiNeutronInelastic::ApplyYourself(), G4LEAntiOmegaMinusInelastic::ApplyYourself(), G4LEAntiSigmaMinusInelastic::ApplyYourself(), G4LEAntiSigmaPlusInelastic::ApplyYourself(), G4LEAntiXiMinusInelastic::ApplyYourself(), G4LEAntiXiZeroInelastic::ApplyYourself(), G4RPGAntiLambdaInelastic::ApplyYourself(), G4RPGAntiNeutronInelastic::ApplyYourself(), G4RPGAntiOmegaMinusInelastic::ApplyYourself(), G4RPGAntiSigmaMinusInelastic::ApplyYourself(), G4RPGAntiSigmaPlusInelastic::ApplyYourself(), G4RPGAntiXiMinusInelastic::ApplyYourself(), G4RPGAntiXiZeroInelastic::ApplyYourself(), G4FissionLibrary::ApplyYourself(), G4NeutronHPElasticFS::ApplyYourself(), G4RPGInelastic::CalculateMomenta(), G4InelasticInteraction::CalculateMomenta(), G4NeutronHPInelasticCompFS::CompositeApply(), G4ReactionDynamics::GenerateXandPt(), G4NeutronHPDeExGammas::GetDecayGammas(), G4NeutronHPPhotonDist::GetPhotons(), G4FTFModel::GetStrings(), G4RPGReaction::MomentumCheck(), G4RPGReaction::NuclearReaction(), G4ReactionDynamics::NuclearReaction(), G4RPGFragmentation::ReactionStage(), G4RPGPionSuppression::ReactionStage(), G4RPGTwoBody::ReactionStage(), G4RPGTwoCluster::ReactionStage(), G4RPGReaction::Rotate(), G4NeutronHPDiscreteTwoBody::Sample(), G4NeutronHPIsotropic::Sample(), G4NeutronHPLabAngularEnergy::Sample(), G4NeutronHPNBodyPhaseSpace::Sample(), G4NeutronHPContAngularPar::Sample(), G4NeutronHPAngular::SampleAndUpdate(), G4ReactionDynamics::SuppressChargedPions(), G4ReactionDynamics::TwoBody(), and G4ReactionDynamics::TwoCluster().

◆ GetXPositionInNucleus()

G4double G4ReactionProduct::GetXPositionInNucleus ( ) const
inline

Definition at line 193 of file G4ReactionProduct.hh.

193{ return positionInNucleus.x(); }

◆ GetYPositionInNucleus()

G4double G4ReactionProduct::GetYPositionInNucleus ( ) const
inline

Definition at line 194 of file G4ReactionProduct.hh.

194{ return positionInNucleus.y(); }

◆ GetZPositionInNucleus()

G4double G4ReactionProduct::GetZPositionInNucleus ( ) const
inline

Definition at line 195 of file G4ReactionProduct.hh.

195{ return positionInNucleus.z(); }

◆ HasInitialStateParton() [1/2]

G4bool G4ReactionProduct::HasInitialStateParton ( ) const
inline

Definition at line 203 of file G4ReactionProduct.hh.

203{ return hasInitialStateParton; }

◆ HasInitialStateParton() [2/2]

void G4ReactionProduct::HasInitialStateParton ( G4bool  aFlag)
inline

Definition at line 201 of file G4ReactionProduct.hh.

201{ hasInitialStateParton = aFlag; }

◆ Lorentz()

void G4ReactionProduct::Lorentz ( const G4ReactionProduct p1,
const G4ReactionProduct p2 
)

Definition at line 200 of file G4ReactionProduct.cc.

202 {
203 G4ThreeVector p1M = p1.momentum;
204 G4ThreeVector p2M = p2.momentum;
205 G4double p1x = p1M.x(); G4double p1y = p1M.y(); G4double p1z = p1M.z();
206 G4double p2x = p2M.x(); G4double p2y = p2M.y(); G4double p2z = p2M.z();
207 G4double a = ( (p1x*p2x+p1y*p2y+p1z*p2z)/(p2.totalEnergy+p2.mass) -
208 p1.totalEnergy ) / p2.mass;
209 G4double x = p1x+a*p2x;
210 G4double y = p1y+a*p2y;
211 G4double z = p1z+a*p2z;
212 G4double p = std::sqrt(x*x+y*y+z*z);
213 SetMass( p1.mass );
214 SetTotalEnergy( std::sqrt( (p1.mass+p)*(p1.mass+p) - 2.*p1.mass*p ) );
215 //SetTotalEnergy( std::sqrt( p1.mass*p1.mass + x*x + y*y + z*z ) );
216 SetMomentum( x, y, z );
217 }
void SetTotalEnergy(const G4double en)
void SetMass(const G4double mas)

Referenced by G4LENDElastic::ApplyYourself(), G4LENDModel::ApplyYourself(), G4FissionLibrary::ApplyYourself(), G4NeutronHPCaptureFS::ApplyYourself(), G4NeutronHPElasticFS::ApplyYourself(), G4NeutronHPFissionFS::ApplyYourself(), G4NeutronHPFissionBaseFS::ApplyYourself(), G4NeutronHPFSFissionFS::ApplyYourself(), G4NeutronHPInelasticBaseFS::BaseApply(), G4NeutronHPInelasticCompFS::CompositeApply(), G4ReactionDynamics::GenerateXandPt(), G4NeutronHPCaptureData::GetCrossSection(), G4NeutronHPElasticData::GetCrossSection(), G4NeutronHPFissionData::GetCrossSection(), G4NeutronHPInelasticData::GetCrossSection(), G4NeutronHPorLCaptureData::GetCrossSection(), G4NeutronHPorLEInelasticData::GetCrossSection(), G4NeutronHPorLElasticData::GetCrossSection(), G4NeutronHPorLFissionData::GetCrossSection(), G4NeutronHPFSFissionFS::GetPhotons(), G4NeutronHPThermalBoost::GetThermalEnergy(), G4RPGReaction::NuclearReaction(), G4ReactionDynamics::NuclearReaction(), G4RPGFragmentation::ReactionStage(), G4RPGTwoBody::ReactionStage(), G4RPGTwoCluster::ReactionStage(), G4NeutronHPEnAngCorrelation::Sample(), G4NeutronHPNBodyPhaseSpace::Sample(), G4NeutronHPAngular::SampleAndUpdate(), G4ReactionDynamics::TwoBody(), and G4ReactionDynamics::TwoCluster().

◆ operator delete()

void G4ReactionProduct::operator delete ( void *  aReactionProduct)
inline

Definition at line 88 of file G4ReactionProduct.hh.

88 {
89 aRPAllocator.FreeSingle((G4ReactionProduct*)aReactionProduct);
90 }
G4DLLIMPORT G4Allocator< G4ReactionProduct > aRPAllocator

◆ operator new()

void * G4ReactionProduct::operator new ( size_t  )
inline

Definition at line 80 of file G4ReactionProduct.hh.

80 {
81 return (void *)aRPAllocator.MallocSingle();
82 }

◆ operator!=()

G4bool G4ReactionProduct::operator!= ( const G4ReactionProduct right) const
inline

Definition at line 101 of file G4ReactionProduct.hh.

102 { return ( this != (G4ReactionProduct*) &right ); }

◆ operator=() [1/3]

G4ReactionProduct & G4ReactionProduct::operator= ( const G4DynamicParticle right)

Definition at line 106 of file G4ReactionProduct.cc.

108 {
109 theParticleDefinition = right.GetDefinition();
110 SetPositionInNucleus( 0.0, 0.0, 0.0 );
111 formationTime = 0.0;
112 hasInitialStateParton = false;
113 momentum = right.GetMomentum();
114 mass = right.GetDefinition()->GetPDGMass();
115 totalEnergy = right.GetTotalEnergy();
116 kineticEnergy = right.GetKineticEnergy();
117 (right.GetDefinition()->GetPDGEncoding()<0) ? timeOfFlight=-1.0 : timeOfFlight=1.0;
118 side = 0;
119 NewlyAdded = false;
120 MayBeKilled = true;
121 return *this;
122 }
G4ParticleDefinition * GetDefinition() const
G4double GetKineticEnergy() const
G4double GetTotalEnergy() const
G4ThreeVector GetMomentum() const

◆ operator=() [2/3]

G4ReactionProduct & G4ReactionProduct::operator= ( const G4HadProjectile right)

Definition at line 124 of file G4ReactionProduct.cc.

126 {
127 theParticleDefinition = const_cast<G4ParticleDefinition *>(right.GetDefinition());
128 SetPositionInNucleus( 0.0, 0.0, 0.0 );
129 formationTime = 0.0;
130 hasInitialStateParton = false;
131 momentum = right.Get4Momentum().vect();
132 mass = right.GetDefinition()->GetPDGMass();
133 totalEnergy = right.Get4Momentum().e();
134 kineticEnergy = right.GetKineticEnergy();
135 (right.GetDefinition()->GetPDGEncoding()<0) ? timeOfFlight=-1.0 : timeOfFlight=1.0;
136 side = 0;
137 NewlyAdded = false;
138 MayBeKilled = true;
139 return *this;
140 }
Hep3Vector vect() const
const G4ParticleDefinition * GetDefinition() const
G4double GetKineticEnergy() const
const G4LorentzVector & Get4Momentum() const

◆ operator=() [3/3]

G4ReactionProduct & G4ReactionProduct::operator= ( const G4ReactionProduct right)

Definition at line 86 of file G4ReactionProduct.cc.

88 {
89 if( this != &right ) {
90 theParticleDefinition = right.theParticleDefinition;
91 positionInNucleus = right.positionInNucleus;
92 formationTime = right.formationTime;
93 hasInitialStateParton = right.hasInitialStateParton;
94 momentum = right.momentum;
95 mass = right.mass;
96 totalEnergy = right.totalEnergy;
97 kineticEnergy = right.kineticEnergy;
98 timeOfFlight = right.timeOfFlight;
99 side = right.side;
100 NewlyAdded = right.NewlyAdded;
101 MayBeKilled = right.MayBeKilled;
102 }
103 return *this;
104 }

◆ operator==()

G4bool G4ReactionProduct::operator== ( const G4ReactionProduct right) const
inline

Definition at line 98 of file G4ReactionProduct.hh.

99 { return ( this == (G4ReactionProduct*) &right ); }

◆ SetDefinition()

◆ SetDefinitionAndUpdateE()

void G4ReactionProduct::SetDefinitionAndUpdateE ( G4ParticleDefinition aParticleDefinition)

Definition at line 142 of file G4ReactionProduct.cc.

144 {
145 G4double aKineticEnergy = GetKineticEnergy();
147 G4ThreeVector aMomentum = GetMomentum();
148 SetDefinition( aParticleDefinition );
149 SetKineticEnergy( aKineticEnergy );
150 if( pp > DBL_MIN )
151 SetMomentum( aMomentum * (std::sqrt(aKineticEnergy*aKineticEnergy +
152 2*aKineticEnergy*GetMass())/pp) );
153 }
double mag() const
G4double GetKineticEnergy() const
G4ThreeVector GetMomentum() const
void SetKineticEnergy(const G4double en)
void SetDefinition(G4ParticleDefinition *aParticleDefinition)
G4double GetMass() const
#define DBL_MIN
Definition: templates.hh:75

Referenced by G4ReactionDynamics::GenerateXandPt(), G4ReactionDynamics::ProduceStrangeParticlePairs(), G4RPGFragmentation::ReactionStage(), G4RPGPionSuppression::ReactionStage(), G4RPGStrangeProduction::ReactionStage(), G4RPGInelastic::SetUpChange(), and G4ReactionDynamics::SuppressChargedPions().

◆ SetFormationTime()

void G4ReactionProduct::SetFormationTime ( G4double  aTime)
inline

Definition at line 197 of file G4ReactionProduct.hh.

197{ formationTime = aTime; }

Referenced by G4ExcitationHandler::BreakItUp().

◆ SetKineticEnergy()

void G4ReactionProduct::SetKineticEnergy ( const G4double  en)
inline

Definition at line 129 of file G4ReactionProduct.hh.

130 {
131 kineticEnergy = en;
132 totalEnergy = kineticEnergy + mass;
133 }

Referenced by G4LENDElastic::ApplyYourself(), G4LENDModel::ApplyYourself(), G4LEAntiKaonZeroInelastic::ApplyYourself(), G4LEAntiLambdaInelastic::ApplyYourself(), G4LEAntiNeutronInelastic::ApplyYourself(), G4LEAntiOmegaMinusInelastic::ApplyYourself(), G4LEAntiProtonInelastic::ApplyYourself(), G4LEAntiSigmaMinusInelastic::ApplyYourself(), G4LEAntiSigmaPlusInelastic::ApplyYourself(), G4LEAntiXiMinusInelastic::ApplyYourself(), G4LEAntiXiZeroInelastic::ApplyYourself(), G4LEKaonMinusInelastic::ApplyYourself(), G4LEKaonPlusInelastic::ApplyYourself(), G4LEKaonZeroInelastic::ApplyYourself(), G4LELambdaInelastic::ApplyYourself(), G4LENeutronInelastic::ApplyYourself(), G4LEOmegaMinusInelastic::ApplyYourself(), G4LEPionMinusInelastic::ApplyYourself(), G4LEPionPlusInelastic::ApplyYourself(), G4LEProtonInelastic::ApplyYourself(), G4LESigmaMinusInelastic::ApplyYourself(), G4LESigmaPlusInelastic::ApplyYourself(), G4LEXiMinusInelastic::ApplyYourself(), G4LEXiZeroInelastic::ApplyYourself(), G4RPGAntiKZeroInelastic::ApplyYourself(), G4RPGAntiLambdaInelastic::ApplyYourself(), G4RPGAntiNeutronInelastic::ApplyYourself(), G4RPGAntiOmegaMinusInelastic::ApplyYourself(), G4RPGAntiProtonInelastic::ApplyYourself(), G4RPGAntiSigmaMinusInelastic::ApplyYourself(), G4RPGAntiSigmaPlusInelastic::ApplyYourself(), G4RPGAntiXiMinusInelastic::ApplyYourself(), G4RPGAntiXiZeroInelastic::ApplyYourself(), G4RPGKMinusInelastic::ApplyYourself(), G4RPGKPlusInelastic::ApplyYourself(), G4RPGKZeroInelastic::ApplyYourself(), G4RPGLambdaInelastic::ApplyYourself(), G4RPGNeutronInelastic::ApplyYourself(), G4RPGOmegaMinusInelastic::ApplyYourself(), G4RPGPiMinusInelastic::ApplyYourself(), G4RPGPiPlusInelastic::ApplyYourself(), G4RPGProtonInelastic::ApplyYourself(), G4RPGSigmaMinusInelastic::ApplyYourself(), G4RPGSigmaPlusInelastic::ApplyYourself(), G4RPGXiMinusInelastic::ApplyYourself(), G4RPGXiZeroInelastic::ApplyYourself(), G4FissionLibrary::ApplyYourself(), G4NeutronHPCaptureFS::ApplyYourself(), G4NeutronHPElasticFS::ApplyYourself(), G4NeutronHPFissionFS::ApplyYourself(), G4NeutronHPFissionBaseFS::ApplyYourself(), G4NeutronHPFSFissionFS::ApplyYourself(), G4NeutronHPInelasticBaseFS::BaseApply(), G4RPGInelastic::CalculateMomenta(), G4InelasticInteraction::CalculateMomenta(), G4NeutronHPInelasticCompFS::CompositeApply(), G4ReactionDynamics::GenerateXandPt(), G4NeutronHPCaptureData::GetCrossSection(), G4NeutronHPElasticData::GetCrossSection(), G4NeutronHPFissionData::GetCrossSection(), G4NeutronHPInelasticData::GetCrossSection(), G4NeutronHPorLCaptureData::GetCrossSection(), G4NeutronHPorLEInelasticData::GetCrossSection(), G4NeutronHPorLElasticData::GetCrossSection(), G4NeutronHPorLFissionData::GetCrossSection(), G4NeutronHPThermalBoost::GetThermalEnergy(), G4Nucleus::GetThermalNucleus(), G4RPGReaction::NuclearReaction(), G4ReactionDynamics::NuclearReaction(), G4RPGFragmentation::ReactionStage(), G4RPGTwoBody::ReactionStage(), G4RPGTwoCluster::ReactionStage(), G4RPGReaction::Rotate(), G4NeutronHPDiscreteTwoBody::Sample(), G4NeutronHPIsotropic::Sample(), G4NeutronHPLabAngularEnergy::Sample(), G4NeutronHPNBodyPhaseSpace::Sample(), G4NeutronHPContAngularPar::Sample(), G4NeutronHPAngular::SampleAndUpdate(), SetDefinitionAndUpdateE(), G4ReactionDynamics::TwoBody(), and G4ReactionDynamics::TwoCluster().

◆ SetMass()

◆ SetMayBeKilled()

void G4ReactionProduct::SetMayBeKilled ( const G4bool  f)
inline

Definition at line 168 of file G4ReactionProduct.hh.

169 { MayBeKilled = f; }

Referenced by G4ReactionDynamics::ProduceStrangeParticlePairs(), and G4RPGStrangeProduction::ReactionStage().

◆ SetMomentum() [1/4]

void G4ReactionProduct::SetMomentum ( const G4double  x,
const G4double  y 
)

Definition at line 174 of file G4ReactionProduct.cc.

176 {
177 momentum.setX( x );
178 momentum.setY( y );
179 }
void setY(double)
void setX(double)

◆ SetMomentum() [2/4]

void G4ReactionProduct::SetMomentum ( const G4double  x,
const G4double  y,
const G4double  z 
)

Definition at line 166 of file G4ReactionProduct.cc.

168 {
169 momentum.setX( x );
170 momentum.setY( y );
171 momentum.setZ( z );
172 }
void setZ(double)

Referenced by G4LENDElastic::ApplyYourself(), G4LENDModel::ApplyYourself(), G4LEAntiKaonZeroInelastic::ApplyYourself(), G4LEAntiLambdaInelastic::ApplyYourself(), G4LEAntiNeutronInelastic::ApplyYourself(), G4LEAntiOmegaMinusInelastic::ApplyYourself(), G4LEAntiProtonInelastic::ApplyYourself(), G4LEAntiSigmaMinusInelastic::ApplyYourself(), G4LEAntiSigmaPlusInelastic::ApplyYourself(), G4LEAntiXiMinusInelastic::ApplyYourself(), G4LEAntiXiZeroInelastic::ApplyYourself(), G4LEKaonMinusInelastic::ApplyYourself(), G4LEKaonPlusInelastic::ApplyYourself(), G4LEKaonZeroInelastic::ApplyYourself(), G4LELambdaInelastic::ApplyYourself(), G4LENeutronInelastic::ApplyYourself(), G4LEOmegaMinusInelastic::ApplyYourself(), G4LEPionMinusInelastic::ApplyYourself(), G4LEPionPlusInelastic::ApplyYourself(), G4LEProtonInelastic::ApplyYourself(), G4LESigmaMinusInelastic::ApplyYourself(), G4LESigmaPlusInelastic::ApplyYourself(), G4LEXiMinusInelastic::ApplyYourself(), G4LEXiZeroInelastic::ApplyYourself(), G4RPGAntiKZeroInelastic::ApplyYourself(), G4RPGAntiLambdaInelastic::ApplyYourself(), G4RPGAntiNeutronInelastic::ApplyYourself(), G4RPGAntiOmegaMinusInelastic::ApplyYourself(), G4RPGAntiProtonInelastic::ApplyYourself(), G4RPGAntiSigmaMinusInelastic::ApplyYourself(), G4RPGAntiSigmaPlusInelastic::ApplyYourself(), G4RPGAntiXiMinusInelastic::ApplyYourself(), G4RPGAntiXiZeroInelastic::ApplyYourself(), G4RPGKMinusInelastic::ApplyYourself(), G4RPGKPlusInelastic::ApplyYourself(), G4RPGKZeroInelastic::ApplyYourself(), G4RPGLambdaInelastic::ApplyYourself(), G4RPGNeutronInelastic::ApplyYourself(), G4RPGOmegaMinusInelastic::ApplyYourself(), G4RPGPiMinusInelastic::ApplyYourself(), G4RPGPiPlusInelastic::ApplyYourself(), G4RPGProtonInelastic::ApplyYourself(), G4RPGSigmaMinusInelastic::ApplyYourself(), G4RPGSigmaPlusInelastic::ApplyYourself(), G4RPGXiMinusInelastic::ApplyYourself(), G4RPGXiZeroInelastic::ApplyYourself(), G4FissionLibrary::ApplyYourself(), G4NeutronHPCaptureFS::ApplyYourself(), G4NeutronHPElasticFS::ApplyYourself(), G4NeutronHPFissionFS::ApplyYourself(), G4NeutronHPInelasticBaseFS::BaseApply(), G4ExcitationHandler::BreakItUp(), G4RPGInelastic::CalculateMomenta(), G4InelasticInteraction::CalculateMomenta(), G4NeutronHPInelasticCompFS::CompositeApply(), G4RPGReaction::Defs1(), G4ReactionProduct(), G4ReactionDynamics::GenerateXandPt(), G4NeutronHPCaptureData::GetCrossSection(), G4NeutronHPElasticData::GetCrossSection(), G4NeutronHPFissionData::GetCrossSection(), G4NeutronHPInelasticData::GetCrossSection(), G4NeutronHPorLCaptureData::GetCrossSection(), G4NeutronHPorLEInelasticData::GetCrossSection(), G4NeutronHPorLElasticData::GetCrossSection(), G4NeutronHPorLFissionData::GetCrossSection(), G4NeutronHPDeExGammas::GetDecayGammas(), G4NeutronHPPhotonDist::GetPhotons(), G4NeutronHPThermalBoost::GetThermalEnergy(), G4Nucleus::GetThermalNucleus(), Lorentz(), G4RPGReaction::MomentumCheck(), G4RPGReaction::NuclearReaction(), G4ReactionDynamics::NuclearReaction(), G4DecayStrongResonances::Propagate(), G4GeneratorPrecompoundInterface::Propagate(), G4QStringChipsParticleLevelInterface::Propagate(), G4StringChipsInterface::Propagate(), G4StringChipsParticleLevelInterface::Propagate(), G4RPGFragmentation::ReactionStage(), G4RPGTwoBody::ReactionStage(), G4RPGTwoCluster::ReactionStage(), G4RPGReaction::Rotate(), G4NeutronHPEnAngCorrelation::Sample(), G4NeutronHPDiscreteTwoBody::Sample(), G4NeutronHPIsotropic::Sample(), G4NeutronHPLabAngularEnergy::Sample(), G4NeutronHPNBodyPhaseSpace::Sample(), G4NeutronHPContAngularPar::Sample(), G4NeutronHPAngular::SampleAndUpdate(), SetDefinitionAndUpdateE(), SetZero(), G4ReactionDynamics::TwoBody(), and G4ReactionDynamics::TwoCluster().

◆ SetMomentum() [3/4]

void G4ReactionProduct::SetMomentum ( const G4double  z)

Definition at line 181 of file G4ReactionProduct.cc.

182 {
183 momentum.setZ( z );
184 }

◆ SetMomentum() [4/4]

void G4ReactionProduct::SetMomentum ( const G4ThreeVector mom)
inline

Definition at line 117 of file G4ReactionProduct.hh.

118 { momentum = mom; }

◆ SetNewlyAdded()

void G4ReactionProduct::SetNewlyAdded ( const G4bool  f)
inline

◆ SetPositionInNucleus() [1/2]

void G4ReactionProduct::SetPositionInNucleus ( G4double  x,
G4double  y,
G4double  z 
)
inline

Definition at line 180 of file G4ReactionProduct.hh.

181 {
182 positionInNucleus.setX(x);
183 positionInNucleus.setY(y);
184 positionInNucleus.setZ(z);
185 }

Referenced by G4ReactionProduct(), operator=(), and SetZero().

◆ SetPositionInNucleus() [2/2]

void G4ReactionProduct::SetPositionInNucleus ( G4ThreeVector aPosition)
inline

Definition at line 187 of file G4ReactionProduct.hh.

188 {
189 positionInNucleus = aPosition;
190 }

◆ SetSide()

void G4ReactionProduct::SetSide ( const G4int  sid)
inline

Definition at line 156 of file G4ReactionProduct.hh.

157 { side = sid; }

Referenced by G4LEAntiKaonZeroInelastic::ApplyYourself(), G4LEAntiLambdaInelastic::ApplyYourself(), G4LEAntiNeutronInelastic::ApplyYourself(), G4LEAntiOmegaMinusInelastic::ApplyYourself(), G4LEAntiProtonInelastic::ApplyYourself(), G4LEAntiSigmaMinusInelastic::ApplyYourself(), G4LEAntiSigmaPlusInelastic::ApplyYourself(), G4LEAntiXiMinusInelastic::ApplyYourself(), G4LEAntiXiZeroInelastic::ApplyYourself(), G4LEKaonMinusInelastic::ApplyYourself(), G4LEKaonPlusInelastic::ApplyYourself(), G4LEKaonZeroInelastic::ApplyYourself(), G4LELambdaInelastic::ApplyYourself(), G4LENeutronInelastic::ApplyYourself(), G4LEOmegaMinusInelastic::ApplyYourself(), G4LEPionMinusInelastic::ApplyYourself(), G4LEPionPlusInelastic::ApplyYourself(), G4LEProtonInelastic::ApplyYourself(), G4LESigmaMinusInelastic::ApplyYourself(), G4LESigmaPlusInelastic::ApplyYourself(), G4LEXiMinusInelastic::ApplyYourself(), G4LEXiZeroInelastic::ApplyYourself(), G4RPGAntiKZeroInelastic::ApplyYourself(), G4RPGAntiLambdaInelastic::ApplyYourself(), G4RPGAntiNeutronInelastic::ApplyYourself(), G4RPGAntiOmegaMinusInelastic::ApplyYourself(), G4RPGAntiProtonInelastic::ApplyYourself(), G4RPGAntiSigmaMinusInelastic::ApplyYourself(), G4RPGAntiSigmaPlusInelastic::ApplyYourself(), G4RPGAntiXiMinusInelastic::ApplyYourself(), G4RPGAntiXiZeroInelastic::ApplyYourself(), G4RPGKMinusInelastic::ApplyYourself(), G4RPGKPlusInelastic::ApplyYourself(), G4RPGKZeroInelastic::ApplyYourself(), G4RPGLambdaInelastic::ApplyYourself(), G4RPGNeutronInelastic::ApplyYourself(), G4RPGOmegaMinusInelastic::ApplyYourself(), G4RPGPiMinusInelastic::ApplyYourself(), G4RPGPiPlusInelastic::ApplyYourself(), G4RPGProtonInelastic::ApplyYourself(), G4RPGSigmaMinusInelastic::ApplyYourself(), G4RPGSigmaPlusInelastic::ApplyYourself(), G4RPGXiMinusInelastic::ApplyYourself(), G4RPGXiZeroInelastic::ApplyYourself(), G4ReactionDynamics::GenerateXandPt(), G4ReactionDynamics::ProduceStrangeParticlePairs(), G4RPGFragmentation::ReactionStage(), G4RPGStrangeProduction::ReactionStage(), G4RPGTwoCluster::ReactionStage(), G4RPGInelastic::SetUpPions(), G4InelasticInteraction::SetUpPions(), and G4ReactionDynamics::TwoCluster().

◆ SetTOF()

◆ SetTotalEnergy()

◆ SetZero()

void G4ReactionProduct::SetZero ( )

Definition at line 186 of file G4ReactionProduct.cc.

187 {
188 SetMomentum( 0.0, 0.0, 0.0 );
189 totalEnergy = 0.0;
190 kineticEnergy = 0.0;
191 mass = 0.0;
192 timeOfFlight = 0.0;
193 side = 0;
194 NewlyAdded = false;
195 SetPositionInNucleus( 0.0, 0.0, 0.0 );
196 formationTime = 0.0;
197 hasInitialStateParton = false;
198 }

Referenced by G4ReactionDynamics::GenerateXandPt(), and G4RPGFragmentation::ReactionStage().

Friends And Related Function Documentation

◆ operator*

G4ReactionProduct operator* ( const G4double  aDouble,
const G4ReactionProduct p2 
)
friend

Definition at line 59 of file G4ReactionProduct.hh.

61 {
62 G4ReactionProduct result;
63 result.SetMomentum(aDouble*p2.GetMomentum());
64 result.SetMass(p2.GetMass());
65 result.SetTotalEnergy(std::sqrt(result.GetMass()*result.GetMass()+
66 result.GetMomentum()*result.GetMomentum()));
67 return result;
68 }

◆ operator+

G4ReactionProduct operator+ ( const G4ReactionProduct p1,
const G4ReactionProduct p2 
)
friend

Definition at line 236 of file G4ReactionProduct.cc.

238 {
239 G4double totEnergy = p1.totalEnergy + p2.totalEnergy;
240 G4double x = p1.momentum.x() + p2.momentum.x();
241 G4double y = p1.momentum.y() + p2.momentum.y();
242 G4double z = p1.momentum.z() + p2.momentum.z();
243 G4double newMass = totEnergy*totEnergy - ( x*x + y*y + z*z );
244 if( newMass < 0.0 )
245 newMass = -1. * std::sqrt( -newMass );
246 else
247 newMass = std::sqrt( newMass );
248 G4ReactionProduct result;
249 result.SetMass( newMass );
250 result.SetMomentum( x, y, z );
251 result.SetTotalEnergy( totEnergy );
252 result.SetPositionInNucleus( 0.0, 0.0, 0.0 );
253 result.SetFormationTime(0.0);
254 result.HasInitialStateParton(false);
255 return result;
256 }
void HasInitialStateParton(G4bool aFlag)
void SetFormationTime(G4double aTime)

◆ operator-

G4ReactionProduct operator- ( const G4ReactionProduct p1,
const G4ReactionProduct p2 
)
friend

Definition at line 258 of file G4ReactionProduct.cc.

260 {
261 G4double totEnergy = p1.totalEnergy - p2.totalEnergy;
262 G4double x = p1.momentum.x() - p2.momentum.x();
263 G4double y = p1.momentum.y() - p2.momentum.y();
264 G4double z = p1.momentum.z() - p2.momentum.z();
265 G4double newMass = totEnergy*totEnergy - ( x*x + y*y + z*z );
266 if( newMass < 0.0 )
267 newMass = -1. * std::sqrt( -newMass );
268 else
269 newMass = std::sqrt( newMass );
270 G4ReactionProduct result;
271 result.SetMass( newMass );
272 result.SetMomentum( x, y, z );
273 result.SetTotalEnergy( totEnergy );
274 result.SetPositionInNucleus( 0.0, 0.0, 0.0 );
275 result.SetFormationTime(0.0);
276 result.HasInitialStateParton(false);
277 return result;
278 }

The documentation for this class was generated from the following files: