Geant4 10.7.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 (const 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
 
const G4ParticleDefinitionGetDefinition () const
 
void SetDefinition (const G4ParticleDefinition *aParticleDefinition)
 
void SetDefinitionAndUpdateE (const 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 SetCreatorModel (const G4int mod)
 
G4int GetCreatorModel () 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 53 of file G4ReactionProduct.hh.

Constructor & Destructor Documentation

◆ G4ReactionProduct() [1/3]

G4ReactionProduct::G4ReactionProduct ( )

Definition at line 39 of file G4ReactionProduct.cc.

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

◆ G4ReactionProduct() [2/3]

G4ReactionProduct::G4ReactionProduct ( const G4ParticleDefinition aParticleDefinition)

Definition at line 56 of file G4ReactionProduct.cc.

58 {
59 SetMomentum( 0.0, 0.0, 0.0 );
60 SetPositionInNucleus( 0.0, 0.0, 0.0 );
61 formationTime = 0.0;
62 hasInitialStateParton = false;
63 theParticleDefinition = aParticleDefinition;
64 mass = aParticleDefinition->GetPDGMass();
65 totalEnergy = mass;
66 kineticEnergy = 0.0;
67 (aParticleDefinition->GetPDGEncoding()<0) ? timeOfFlight=-1.0 : timeOfFlight=1.0;
68 side = 0;
69 theCreatorModel = -1;
70 NewlyAdded = false;
71 MayBeKilled = true;
72 }

◆ ~G4ReactionProduct()

G4ReactionProduct::~G4ReactionProduct ( )
inline

Definition at line 77 of file G4ReactionProduct.hh.

77{}

◆ G4ReactionProduct() [3/3]

G4ReactionProduct::G4ReactionProduct ( const G4ReactionProduct right)

Definition at line 74 of file G4ReactionProduct.cc.

76 {
77 theParticleDefinition = right.theParticleDefinition;
78 positionInNucleus = right.positionInNucleus;
79 formationTime = right.formationTime;
80 hasInitialStateParton = right.hasInitialStateParton;
81 momentum = right.momentum;
82 mass = right.mass;
83 totalEnergy = right.totalEnergy;
84 kineticEnergy = right.kineticEnergy;
85 timeOfFlight = right.timeOfFlight;
86 side = right.side;
87 theCreatorModel = right.theCreatorModel;
88 NewlyAdded = right.NewlyAdded;
89 MayBeKilled = right.MayBeKilled;
90 }

Member Function Documentation

◆ Angle()

G4double G4ReactionProduct::Angle ( const G4ReactionProduct p) const

Definition at line 228 of file G4ReactionProduct.cc.

230 {
231 G4ThreeVector tM = momentum;
232 G4ThreeVector pM = p.momentum;
233 G4double tx = tM.x(); G4double ty = tM.y(); G4double tz = tM.z();
234 G4double px = pM.x(); G4double py = pM.y(); G4double pz = pM.z();
235 G4double a = std::sqrt( ( px*px + py*py + pz*pz ) * ( tx*tx + ty*ty + tz*tz ) );
236 if( a == 0.0 ) {
237 return 0.0;
238 } else {
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 );
242 }
243 }
double G4double
Definition: G4Types.hh:83
double z() const
double x() const
double y() const

◆ GetCreatorModel()

G4int G4ReactionProduct::GetCreatorModel ( ) const
inline

Definition at line 168 of file G4ReactionProduct.hh.

169 { return theCreatorModel; }

◆ GetDefinition()

◆ GetFormationTime()

G4double G4ReactionProduct::GetFormationTime ( ) const
inline

Definition at line 208 of file G4ReactionProduct.hh.

208{ return formationTime; }

◆ GetKineticEnergy()

G4double G4ReactionProduct::GetKineticEnergy ( ) const
inline

Definition at line 138 of file G4ReactionProduct.hh.

139 { return kineticEnergy; }

Referenced by G4RPGReaction::AddBlackTrackParticles(), G4NRESP71M03::ApplyMechanismABE(), G4LENDElastic::ApplyYourself(), G4LENDModel::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(), G4ParticleHPCaptureFS::ApplyYourself(), G4ParticleHPElasticFS::ApplyYourself(), G4ParticleHPFissionFS::ApplyYourself(), G4ParticleHPFissionBaseFS::ApplyYourself(), G4ParticleHPFSFissionFS::ApplyYourself(), G4ParticleHPInelasticBaseFS::BaseApply(), G4RPGInelastic::CalculateMomenta(), G4ParticleHPInelasticCompFS::CompositeApply(), G4ParticleHPCaptureData::GetCrossSection(), G4ParticleHPElasticData::GetCrossSection(), G4ParticleHPFissionData::GetCrossSection(), G4ParticleHPInelasticData::GetCrossSection(), G4ParticleHPFSFissionFS::GetPhotons(), G4ParticleHPThermalBoost::GetThermalEnergy(), G4RPGReaction::NuclearReaction(), G4RPGFragmentation::ReactionStage(), G4RPGTwoBody::ReactionStage(), G4RPGTwoCluster::ReactionStage(), G4RPGReaction::Rotate(), G4ParticleHPProduct::Sample(), G4ParticleHPAngular::SampleAndUpdate(), SetDefinitionAndUpdateE(), and G4RPGInelastic::SetUpChange().

◆ GetMass()

◆ GetMayBeKilled()

G4bool G4ReactionProduct::GetMayBeKilled ( ) const
inline

Definition at line 180 of file G4ReactionProduct.hh.

181 { return MayBeKilled; }

◆ GetMomentum()

G4ThreeVector G4ReactionProduct::GetMomentum ( ) const
inline

Definition at line 123 of file G4ReactionProduct.hh.

124 { return momentum; }

Referenced by G4LENDElastic::ApplyYourself(), G4LENDModel::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(), G4ParticleHPCaptureFS::ApplyYourself(), G4ParticleHPElasticFS::ApplyYourself(), G4ParticleHPFissionFS::ApplyYourself(), G4ParticleHPInelasticBaseFS::BaseApply(), G4QGSParticipants::BuildInteractions(), G4RPGInelastic::CalculateMomenta(), G4ParticleHPInelasticCompFS::CompositeApply(), G4RPGReaction::Defs1(), G4NRESP71M03::DKINMA(), G4VSplitableHadron::G4VSplitableHadron(), G4Nucleus::GetBiasedThermalNucleus(), G4ParticleHPCaptureData::GetCrossSection(), G4ParticleHPElasticData::GetCrossSection(), G4ParticleHPFissionData::GetCrossSection(), G4ParticleHPInelasticData::GetCrossSection(), G4FTFParticipants::GetList(), G4ParticleHPThermalBoost::GetThermalEnergy(), G4FTFModel::Init(), G4FissionProductYieldDist::MakeG4DynamicParticle(), G4RPGReaction::MomentumCheck(), G4RPGReaction::NuclearReaction(), ReactionProduct4Mom::operator()(), G4GeneratorPrecompoundInterface::PropagateNuclNucl(), G4RPGFragmentation::ReactionStage(), G4RPGTwoBody::ReactionStage(), G4RPGTwoCluster::ReactionStage(), G4RPGReaction::Rotate(), G4ParticleHPEnAngCorrelation::Sample(), G4ParticleHPAngular::SampleAndUpdate(), G4QGSParticipants::SelectInteractions(), SetDefinitionAndUpdateE(), and G4RPGInelastic::SetUpChange().

◆ GetNewlyAdded()

G4bool G4ReactionProduct::GetNewlyAdded ( ) const
inline

Definition at line 174 of file G4ReactionProduct.hh.

175 { return NewlyAdded; }

◆ GetPositionInNucleus()

G4ThreeVector G4ReactionProduct::GetPositionInNucleus ( ) const
inline

Definition at line 201 of file G4ReactionProduct.hh.

201{ return positionInNucleus; }

◆ GetSide()

G4int G4ReactionProduct::GetSide ( ) const
inline

Definition at line 162 of file G4ReactionProduct.hh.

163 { return side; }

Referenced by G4RPGFragmentation::ReactionStage(), and G4RPGTwoCluster::ReactionStage().

◆ GetTOF()

G4double G4ReactionProduct::GetTOF ( ) const
inline

Definition at line 156 of file G4ReactionProduct.hh.

157 { return timeOfFlight; }

Referenced by G4MuMinusCapturePrecompound::ApplyYourself().

◆ GetTotalEnergy()

◆ GetTotalMomentum()

◆ GetXPositionInNucleus()

G4double G4ReactionProduct::GetXPositionInNucleus ( ) const
inline

Definition at line 202 of file G4ReactionProduct.hh.

202{ return positionInNucleus.x(); }

◆ GetYPositionInNucleus()

G4double G4ReactionProduct::GetYPositionInNucleus ( ) const
inline

Definition at line 203 of file G4ReactionProduct.hh.

203{ return positionInNucleus.y(); }

◆ GetZPositionInNucleus()

G4double G4ReactionProduct::GetZPositionInNucleus ( ) const
inline

Definition at line 204 of file G4ReactionProduct.hh.

204{ return positionInNucleus.z(); }

◆ HasInitialStateParton() [1/2]

G4bool G4ReactionProduct::HasInitialStateParton ( ) const
inline

Definition at line 212 of file G4ReactionProduct.hh.

212{ return hasInitialStateParton; }

◆ HasInitialStateParton() [2/2]

void G4ReactionProduct::HasInitialStateParton ( G4bool  aFlag)
inline

Definition at line 210 of file G4ReactionProduct.hh.

210{ hasInitialStateParton = aFlag; }

◆ Lorentz()

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

Definition at line 209 of file G4ReactionProduct.cc.

211 {
212 G4ThreeVector p1M = p1.momentum;
213 G4ThreeVector p2M = p2.momentum;
214 G4double p1x = p1M.x(); G4double p1y = p1M.y(); G4double p1z = p1M.z();
215 G4double p2x = p2M.x(); G4double p2y = p2M.y(); G4double p2z = p2M.z();
216 G4double a = ( (p1x*p2x+p1y*p2y+p1z*p2z)/(p2.totalEnergy+p2.mass) -
217 p1.totalEnergy ) / p2.mass;
218 G4double x = p1x+a*p2x;
219 G4double y = p1y+a*p2y;
220 G4double z = p1z+a*p2z;
221 G4double p = std::sqrt(x*x+y*y+z*z);
222 SetMass( p1.mass );
223 SetTotalEnergy( std::sqrt( (p1.mass+p)*(p1.mass+p) - 2.*p1.mass*p ) );
224 //SetTotalEnergy( std::sqrt( p1.mass*p1.mass + x*x + y*y + z*z ) );
225 SetMomentum( x, y, z );
226 }
void SetTotalEnergy(const G4double en)
void SetMass(const G4double mas)

Referenced by G4LENDElastic::ApplyYourself(), G4LENDModel::ApplyYourself(), G4FissionLibrary::ApplyYourself(), G4ParticleHPCaptureFS::ApplyYourself(), G4ParticleHPElasticFS::ApplyYourself(), G4ParticleHPFissionFS::ApplyYourself(), G4ParticleHPFissionBaseFS::ApplyYourself(), G4ParticleHPFSFissionFS::ApplyYourself(), G4ParticleHPInelasticBaseFS::BaseApply(), G4ParticleHPInelasticCompFS::CompositeApply(), G4NRESP71M03::DKINMA(), G4ParticleHPCaptureData::GetCrossSection(), G4ParticleHPElasticData::GetCrossSection(), G4ParticleHPFissionData::GetCrossSection(), G4ParticleHPInelasticData::GetCrossSection(), G4ParticleHPFSFissionFS::GetPhotons(), G4ParticleHPThermalBoost::GetThermalEnergy(), G4RPGReaction::NuclearReaction(), G4RPGFragmentation::ReactionStage(), G4RPGTwoBody::ReactionStage(), G4RPGTwoCluster::ReactionStage(), G4ParticleHPEnAngCorrelation::Sample(), G4ParticleHPNBodyPhaseSpace::Sample(), and G4ParticleHPAngular::SampleAndUpdate().

◆ operator delete()

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

Definition at line 91 of file G4ReactionProduct.hh.

91 {
92 aRPAllocator()->FreeSingle((G4ReactionProduct*)aReactionProduct);
93 }
G4DLLIMPORT G4Allocator< G4ReactionProduct > *& aRPAllocator()

◆ operator new()

void * G4ReactionProduct::operator new ( size_t  )
inline

Definition at line 82 of file G4ReactionProduct.hh.

82 {
84 return (void *)aRPAllocator()->MallocSingle();
85 }

◆ operator!=()

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

Definition at line 104 of file G4ReactionProduct.hh.

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

◆ operator=() [1/3]

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

Definition at line 113 of file G4ReactionProduct.cc.

115 {
116 theParticleDefinition = right.GetDefinition();
117 SetPositionInNucleus( 0.0, 0.0, 0.0 );
118 formationTime = 0.0;
119 hasInitialStateParton = false;
120 momentum = right.GetMomentum();
121 mass = right.GetDefinition()->GetPDGMass();
122 totalEnergy = right.GetTotalEnergy();
123 kineticEnergy = right.GetKineticEnergy();
124 (right.GetDefinition()->GetPDGEncoding()<0) ? timeOfFlight=-1.0 : timeOfFlight=1.0;
125 side = 0;
126 theCreatorModel = -1;
127 NewlyAdded = false;
128 MayBeKilled = true;
129 return *this;
130 }
G4ParticleDefinition * GetDefinition() const
G4double GetKineticEnergy() const
G4double GetTotalEnergy() const
G4ThreeVector GetMomentum() const

◆ operator=() [2/3]

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

Definition at line 132 of file G4ReactionProduct.cc.

134 {
135 theParticleDefinition = right.GetDefinition();
136 SetPositionInNucleus( 0.0, 0.0, 0.0 );
137 formationTime = 0.0;
138 hasInitialStateParton = false;
139 momentum = right.Get4Momentum().vect();
140 mass = right.GetDefinition()->GetPDGMass();
141 totalEnergy = right.Get4Momentum().e();
142 kineticEnergy = right.GetKineticEnergy();
143 (right.GetDefinition()->GetPDGEncoding()<0) ? timeOfFlight=-1.0 : timeOfFlight=1.0;
144 side = 0;
145 theCreatorModel = -1;
146 NewlyAdded = false;
147 MayBeKilled = true;
148 return *this;
149 }
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 92 of file G4ReactionProduct.cc.

94 {
95 if( this != &right ) {
96 theParticleDefinition = right.theParticleDefinition;
97 positionInNucleus = right.positionInNucleus;
98 formationTime = right.formationTime;
99 hasInitialStateParton = right.hasInitialStateParton;
100 momentum = right.momentum;
101 mass = right.mass;
102 totalEnergy = right.totalEnergy;
103 kineticEnergy = right.kineticEnergy;
104 timeOfFlight = right.timeOfFlight;
105 side = right.side;
106 theCreatorModel = right.theCreatorModel;
107 NewlyAdded = right.NewlyAdded;
108 MayBeKilled = right.MayBeKilled;
109 }
110 return *this;
111 }

◆ operator==()

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

Definition at line 101 of file G4ReactionProduct.hh.

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

◆ SetCreatorModel()

void G4ReactionProduct::SetCreatorModel ( const G4int  mod)
inline

Definition at line 165 of file G4ReactionProduct.hh.

166 { theCreatorModel = mod; }

Referenced by G4ExcitationHandler::BreakItUp().

◆ SetDefinition()

◆ SetDefinitionAndUpdateE()

void G4ReactionProduct::SetDefinitionAndUpdateE ( const G4ParticleDefinition aParticleDefinition)

Definition at line 151 of file G4ReactionProduct.cc.

153 { G4double aKineticEnergy = GetKineticEnergy();
155 G4ThreeVector aMomentum = GetMomentum();
156 SetDefinition( aParticleDefinition );
157 SetKineticEnergy( aKineticEnergy );
158 if( pp > DBL_MIN )
159 SetMomentum( aMomentum * (std::sqrt(aKineticEnergy*aKineticEnergy +
160 2*aKineticEnergy*GetMass())/pp) );
161 }
double mag() const
G4double GetKineticEnergy() const
G4ThreeVector GetMomentum() const
void SetDefinition(const G4ParticleDefinition *aParticleDefinition)
void SetKineticEnergy(const G4double en)
G4double GetMass() const
#define DBL_MIN
Definition: templates.hh:54

Referenced by G4ParticleHPCaptureFS::ApplyYourself(), G4RPGFragmentation::ReactionStage(), G4RPGPionSuppression::ReactionStage(), G4RPGStrangeProduction::ReactionStage(), and G4RPGInelastic::SetUpChange().

◆ SetFormationTime()

void G4ReactionProduct::SetFormationTime ( G4double  aTime)
inline

Definition at line 206 of file G4ReactionProduct.hh.

206{ formationTime = aTime; }

Referenced by G4ExcitationHandler::BreakItUp().

◆ SetKineticEnergy()

void G4ReactionProduct::SetKineticEnergy ( const G4double  en)
inline

Definition at line 132 of file G4ReactionProduct.hh.

133 {
134 kineticEnergy = en;
135 totalEnergy = kineticEnergy + mass;
136 }

Referenced by G4LENDElastic::ApplyYourself(), G4LENDModel::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(), G4ParticleHPCaptureFS::ApplyYourself(), G4ParticleHPElasticFS::ApplyYourself(), G4ParticleHPFissionFS::ApplyYourself(), G4ParticleHPFissionBaseFS::ApplyYourself(), G4ParticleHPFSFissionFS::ApplyYourself(), G4ParticleHPInelasticBaseFS::BaseApply(), G4RPGInelastic::CalculateMomenta(), G4ParticleHPInelasticCompFS::CompositeApply(), G4ParticleHPCaptureData::GetCrossSection(), G4ParticleHPElasticData::GetCrossSection(), G4ParticleHPFissionData::GetCrossSection(), G4ParticleHPInelasticData::GetCrossSection(), G4ParticleHPThermalBoost::GetThermalEnergy(), G4Nucleus::GetThermalNucleus(), G4RPGReaction::NuclearReaction(), G4RPGFragmentation::ReactionStage(), G4RPGTwoBody::ReactionStage(), G4RPGTwoCluster::ReactionStage(), G4RPGReaction::Rotate(), G4ParticleHPDiscreteTwoBody::Sample(), G4ParticleHPIsotropic::Sample(), G4ParticleHPLabAngularEnergy::Sample(), G4ParticleHPNBodyPhaseSpace::Sample(), G4ParticleHPContAngularPar::Sample(), G4ParticleHPAngular::SampleAndUpdate(), and SetDefinitionAndUpdateE().

◆ SetMass()

◆ SetMayBeKilled()

void G4ReactionProduct::SetMayBeKilled ( const G4bool  f)
inline

Definition at line 177 of file G4ReactionProduct.hh.

178 { MayBeKilled = f; }

Referenced by G4RPGStrangeProduction::ReactionStage().

◆ SetMomentum() [1/4]

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

Definition at line 182 of file G4ReactionProduct.cc.

184 {
185 momentum.setX( x );
186 momentum.setY( y );
187 }
void setY(double)
void setX(double)

◆ SetMomentum() [2/4]

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

Definition at line 174 of file G4ReactionProduct.cc.

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

Referenced by G4LENDElastic::ApplyYourself(), G4LENDModel::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(), G4ParticleHPCaptureFS::ApplyYourself(), G4ParticleHPElasticFS::ApplyYourself(), G4ParticleHPFissionFS::ApplyYourself(), G4ParticleHPInelasticBaseFS::BaseApply(), G4ExcitationHandler::BreakItUp(), G4RPGInelastic::CalculateMomenta(), G4ParticleHPInelasticCompFS::CompositeApply(), G4RPGReaction::Defs1(), G4NRESP71M03::DKINMA(), G4FissionProductYieldDist::G4GetFission(), G4ReactionProduct(), G4CRCoalescence::GenerateDeuterons(), G4ParticleHPCaptureData::GetCrossSection(), G4ParticleHPElasticData::GetCrossSection(), G4ParticleHPFissionData::GetCrossSection(), G4ParticleHPInelasticData::GetCrossSection(), G4ParticleHPDeExGammas::GetDecayGammas(), G4ParticleHPPhotonDist::GetPhotons(), G4ParticleHPThermalBoost::GetThermalEnergy(), G4Nucleus::GetThermalNucleus(), Lorentz(), G4RPGReaction::MomentumCheck(), G4RPGReaction::NuclearReaction(), G4DecayStrongResonances::Propagate(), G4GeneratorPrecompoundInterface::Propagate(), G4GeneratorPrecompoundInterface::PropagateNuclNucl(), G4RPGFragmentation::ReactionStage(), G4RPGTwoBody::ReactionStage(), G4RPGTwoCluster::ReactionStage(), G4RPGReaction::Rotate(), G4ParticleHPEnAngCorrelation::Sample(), G4ParticleHPDiscreteTwoBody::Sample(), G4ParticleHPIsotropic::Sample(), G4ParticleHPLabAngularEnergy::Sample(), G4ParticleHPNBodyPhaseSpace::Sample(), G4ParticleHPContAngularPar::Sample(), G4ParticleHPAngular::SampleAndUpdate(), SetDefinitionAndUpdateE(), and SetZero().

◆ SetMomentum() [3/4]

void G4ReactionProduct::SetMomentum ( const G4double  z)

Definition at line 189 of file G4ReactionProduct.cc.

190 {
191 momentum.setZ( z );
192 }

◆ SetMomentum() [4/4]

void G4ReactionProduct::SetMomentum ( const G4ThreeVector mom)
inline

Definition at line 120 of file G4ReactionProduct.hh.

121 { momentum = mom; }

◆ SetNewlyAdded()

void G4ReactionProduct::SetNewlyAdded ( const G4bool  f)
inline

Definition at line 171 of file G4ReactionProduct.hh.

172 { NewlyAdded = f; }

Referenced by G4RPGFragmentation::ReactionStage(), and G4RPGTwoCluster::ReactionStage().

◆ SetPositionInNucleus() [1/2]

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

Definition at line 189 of file G4ReactionProduct.hh.

190 {
191 positionInNucleus.setX(x);
192 positionInNucleus.setY(y);
193 positionInNucleus.setZ(z);
194 }

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

◆ SetPositionInNucleus() [2/2]

void G4ReactionProduct::SetPositionInNucleus ( G4ThreeVector aPosition)
inline

Definition at line 196 of file G4ReactionProduct.hh.

197 {
198 positionInNucleus = aPosition;
199 }

◆ SetSide()

◆ SetTOF()

void G4ReactionProduct::SetTOF ( const G4double  t)
inline

Definition at line 153 of file G4ReactionProduct.hh.

154 { timeOfFlight = t; }

Referenced by G4RPGFragmentation::ReactionStage(), G4RPGTwoBody::ReactionStage(), and G4RPGTwoCluster::ReactionStage().

◆ SetTotalEnergy()

◆ SetZero()

void G4ReactionProduct::SetZero ( )

Definition at line 194 of file G4ReactionProduct.cc.

195 {
196 SetMomentum( 0.0, 0.0, 0.0 );
197 totalEnergy = 0.0;
198 kineticEnergy = 0.0;
199 mass = 0.0;
200 timeOfFlight = 0.0;
201 side = 0;
202 theCreatorModel = -1;
203 NewlyAdded = false;
204 SetPositionInNucleus( 0.0, 0.0, 0.0 );
205 formationTime = 0.0;
206 hasInitialStateParton = false;
207 }

Referenced by G4RPGFragmentation::ReactionStage().

Friends And Related Function Documentation

◆ operator*

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

Definition at line 61 of file G4ReactionProduct.hh.

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

◆ operator+

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

Definition at line 245 of file G4ReactionProduct.cc.

247 {
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 );
253 if( newMass < 0.0 )
254 newMass = -1. * std::sqrt( -newMass );
255 else
256 newMass = std::sqrt( newMass );
257 G4ReactionProduct result;
258 result.SetMass( newMass );
259 result.SetMomentum( x, y, z );
260 result.SetTotalEnergy( totEnergy );
261 result.SetPositionInNucleus( 0.0, 0.0, 0.0 );
262 result.SetFormationTime(0.0);
263 result.HasInitialStateParton(false);
264 return result;
265 }
void HasInitialStateParton(G4bool aFlag)
void SetFormationTime(G4double aTime)

◆ operator-

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

Definition at line 267 of file G4ReactionProduct.cc.

269 {
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 );
275 if( newMass < 0.0 )
276 newMass = -1. * std::sqrt( -newMass );
277 else
278 newMass = std::sqrt( newMass );
279 G4ReactionProduct result;
280 result.SetMass( newMass );
281 result.SetMomentum( x, y, z );
282 result.SetTotalEnergy( totEnergy );
283 result.SetPositionInNucleus( 0.0, 0.0, 0.0 );
284 result.SetFormationTime(0.0);
285 result.HasInitialStateParton(false);
286 return result;
287 }

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