Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Friends
G4ReactionProduct Class Reference

#include <G4ReactionProduct.hh>

Public Member Functions

 G4ReactionProduct ()
 
 G4ReactionProduct (G4ParticleDefinition *aParticleDefinition)
 
 ~G4ReactionProduct ()
 
 G4ReactionProduct (const G4ReactionProduct &right)
 
voidoperator 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 53 of file G4ReactionProduct.hh.

Constructor & Destructor Documentation

G4ReactionProduct::G4ReactionProduct ( )

Definition at line 36 of file G4ReactionProduct.cc.

References SetMomentum(), and SetPositionInNucleus().

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 SetPositionInNucleus(G4double x, G4double y, G4double z)
void SetMomentum(const G4double x, const G4double y, const G4double z)
G4ReactionProduct::G4ReactionProduct ( G4ParticleDefinition aParticleDefinition)

Definition at line 52 of file G4ReactionProduct.cc.

References G4ParticleDefinition::GetPDGEncoding(), G4ParticleDefinition::GetPDGMass(), SetMomentum(), and SetPositionInNucleus().

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  }
void SetPositionInNucleus(G4double x, G4double y, G4double z)
void SetMomentum(const G4double x, const G4double y, const G4double z)
G4double GetPDGMass() const
G4ReactionProduct::~G4ReactionProduct ( )
inline

Definition at line 77 of file G4ReactionProduct.hh.

77 {}
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

G4double G4ReactionProduct::Angle ( const G4ReactionProduct p) const

Definition at line 218 of file G4ReactionProduct.cc.

References test::a, CLHEP::Hep3Vector::x(), CLHEP::Hep3Vector::y(), and CLHEP::Hep3Vector::z().

220  {
221  G4ThreeVector tM = momentum;
222  G4ThreeVector pM = p.momentum;
223  G4double tx = tM.x(); G4double ty = tM.y(); G4double tz = tM.z();
224  G4double px = pM.x(); G4double py = pM.y(); G4double pz = pM.z();
225  G4double a = std::sqrt( ( px*px + py*py + pz*pz ) * ( tx*tx + ty*ty + tz*tz ) );
226  if( a == 0.0 ) {
227  return 0.0;
228  } else {
229  a = ( tx*px + ty*py + tz*pz ) / a;
230  if( std::fabs(a) > 1.0 ) { a<0.0 ? a=-1.0 : a=1.0; }
231  return std::acos( a );
232  }
233  }
double x() const
double z() const
double y() const
double G4double
Definition: G4Types.hh:76
G4ParticleDefinition* G4ReactionProduct::GetDefinition ( ) const
inline
G4double G4ReactionProduct::GetFormationTime ( ) const
inline

Definition at line 202 of file G4ReactionProduct.hh.

202 { return formationTime; }
G4double G4ReactionProduct::GetKineticEnergy ( ) const
inline

Definition at line 138 of file G4ReactionProduct.hh.

Referenced by G4RPGReaction::AddBlackTrackParticles(), G4NeutronHPFissionFS::ApplyYourself(), G4NeutronHPFSFissionFS::ApplyYourself(), G4RPGKMinusInelastic::ApplyYourself(), G4RPGProtonInelastic::ApplyYourself(), G4RPGNeutronInelastic::ApplyYourself(), G4RPGSigmaPlusInelastic::ApplyYourself(), G4RPGXiMinusInelastic::ApplyYourself(), G4RPGAntiProtonInelastic::ApplyYourself(), G4RPGAntiSigmaPlusInelastic::ApplyYourself(), G4RPGAntiXiMinusInelastic::ApplyYourself(), G4RPGOmegaMinusInelastic::ApplyYourself(), G4RPGAntiNeutronInelastic::ApplyYourself(), G4RPGAntiOmegaMinusInelastic::ApplyYourself(), G4RPGAntiSigmaMinusInelastic::ApplyYourself(), G4RPGAntiXiZeroInelastic::ApplyYourself(), G4NeutronHPFissionBaseFS::ApplyYourself(), G4RPGKPlusInelastic::ApplyYourself(), G4RPGKZeroInelastic::ApplyYourself(), G4RPGLambdaInelastic::ApplyYourself(), G4NeutronHPCaptureFS::ApplyYourself(), G4RPGXiZeroInelastic::ApplyYourself(), G4LENDModel::ApplyYourself(), G4RPGAntiKZeroInelastic::ApplyYourself(), G4NeutronHPElasticFS::ApplyYourself(), G4LENDElastic::ApplyYourself(), G4MuMinusCapturePrecompound::ApplyYourself(), G4FissionLibrary::ApplyYourself(), G4NeutronHPInelasticBaseFS::BaseApply(), G4RPGInelastic::CalculateMomenta(), G4NeutronHPInelasticCompFS::CompositeApply(), G4ReactionDynamics::GenerateXandPt(), G4NeutronHPFissionData::GetCrossSection(), G4NeutronHPInelasticData::GetCrossSection(), G4NeutronHPCaptureData::GetCrossSection(), G4NeutronHPElasticData::GetCrossSection(), G4NeutronHPFSFissionFS::GetPhotons(), G4NeutronHPThermalBoost::GetThermalEnergy(), G4RPGReaction::NuclearReaction(), G4ReactionDynamics::NuclearReaction(), G4RPGTwoCluster::ReactionStage(), G4RPGTwoBody::ReactionStage(), G4RPGFragmentation::ReactionStage(), G4RPGReaction::Rotate(), G4NeutronHPEnAngCorrelation::Sample(), G4NeutronHPAngular::SampleAndUpdate(), G4QGSParticipants::SelectInteractions(), SetDefinitionAndUpdateE(), G4RPGInelastic::SetUpChange(), G4ReactionDynamics::TwoBody(), and G4ReactionDynamics::TwoCluster().

139  { return kineticEnergy; }
G4double G4ReactionProduct::GetMass ( ) const
inline
G4bool G4ReactionProduct::GetMayBeKilled ( ) const
inline

Definition at line 174 of file G4ReactionProduct.hh.

175  { return MayBeKilled; }
G4ThreeVector G4ReactionProduct::GetMomentum ( void  ) const
inline

Definition at line 123 of file G4ReactionProduct.hh.

Referenced by G4NeutronHPFissionFS::ApplyYourself(), G4RPGKMinusInelastic::ApplyYourself(), G4RPGNeutronInelastic::ApplyYourself(), G4RPGProtonInelastic::ApplyYourself(), G4RPGAntiProtonInelastic::ApplyYourself(), G4RPGAntiSigmaPlusInelastic::ApplyYourself(), G4RPGAntiLambdaInelastic::ApplyYourself(), G4RPGSigmaPlusInelastic::ApplyYourself(), G4RPGXiMinusInelastic::ApplyYourself(), G4RPGAntiNeutronInelastic::ApplyYourself(), G4RPGAntiOmegaMinusInelastic::ApplyYourself(), G4RPGAntiSigmaMinusInelastic::ApplyYourself(), G4RPGAntiXiMinusInelastic::ApplyYourself(), G4RPGOmegaMinusInelastic::ApplyYourself(), G4NeutronHPCaptureFS::ApplyYourself(), G4RPGAntiXiZeroInelastic::ApplyYourself(), G4RPGKZeroInelastic::ApplyYourself(), G4RPGKPlusInelastic::ApplyYourself(), G4RPGLambdaInelastic::ApplyYourself(), G4ParaFissionModel::ApplyYourself(), G4RPGSigmaMinusInelastic::ApplyYourself(), G4RPGXiZeroInelastic::ApplyYourself(), G4LENDModel::ApplyYourself(), G4RPGAntiKZeroInelastic::ApplyYourself(), G4NeutronHPElasticFS::ApplyYourself(), G4LowEIonFragmentation::ApplyYourself(), G4LENDElastic::ApplyYourself(), G4MuMinusCapturePrecompound::ApplyYourself(), G4FissionLibrary::ApplyYourself(), G4MuonMinusCaptureAtRest::AtRestDoIt(), G4NeutronHPInelasticBaseFS::BaseApply(), G4RPGInelastic::CalculateMomenta(), G4NeutronHPInelasticCompFS::CompositeApply(), G4RPGReaction::Defs1(), G4VSplitableHadron::G4VSplitableHadron(), G4ReactionDynamics::GenerateXandPt(), G4Nucleus::GetBiasedThermalNucleus(), G4NeutronHPFissionData::GetCrossSection(), G4NeutronHPInelasticData::GetCrossSection(), G4NeutronHPCaptureData::GetCrossSection(), G4NeutronHPElasticData::GetCrossSection(), G4FTFParticipants::GetList(), G4NeutronHPThermalBoost::GetThermalEnergy(), G4FTFModel::Init(), G4FissionProductYieldDist::MakeG4DynamicParticle(), G4RPGReaction::MomentumCheck(), G4RPGReaction::NuclearReaction(), G4ReactionDynamics::NuclearReaction(), ReactionProduct4Mom::operator()(), G4RPGTwoCluster::ReactionStage(), G4RPGTwoBody::ReactionStage(), G4RPGFragmentation::ReactionStage(), G4RPGReaction::Rotate(), G4NeutronHPEnAngCorrelation::Sample(), G4NeutronHPAngular::SampleAndUpdate(), G4QGSParticipants::SelectInteractions(), SetDefinitionAndUpdateE(), G4RPGInelastic::SetUpChange(), G4ReactionDynamics::TwoBody(), and G4ReactionDynamics::TwoCluster().

124  { return momentum; }
G4bool G4ReactionProduct::GetNewlyAdded ( ) const
inline

Definition at line 168 of file G4ReactionProduct.hh.

169  { return NewlyAdded; }
G4ThreeVector G4ReactionProduct::GetPositionInNucleus ( ) const
inline

Definition at line 195 of file G4ReactionProduct.hh.

195 { return positionInNucleus; }
G4int G4ReactionProduct::GetSide ( ) const
inline
G4double G4ReactionProduct::GetTOF ( ) const
inline

Definition at line 156 of file G4ReactionProduct.hh.

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

157  { return timeOfFlight; }
G4double G4ReactionProduct::GetTotalEnergy ( void  ) const
inline
G4double G4ReactionProduct::GetTotalMomentum ( ) const
inline
G4double G4ReactionProduct::GetXPositionInNucleus ( ) const
inline

Definition at line 196 of file G4ReactionProduct.hh.

References CLHEP::Hep3Vector::x().

196 { return positionInNucleus.x(); }
double x() const
G4double G4ReactionProduct::GetYPositionInNucleus ( ) const
inline

Definition at line 197 of file G4ReactionProduct.hh.

References CLHEP::Hep3Vector::y().

197 { return positionInNucleus.y(); }
double y() const
G4double G4ReactionProduct::GetZPositionInNucleus ( ) const
inline

Definition at line 198 of file G4ReactionProduct.hh.

References CLHEP::Hep3Vector::z().

198 { return positionInNucleus.z(); }
double z() const
void G4ReactionProduct::HasInitialStateParton ( G4bool  aFlag)
inline

Definition at line 204 of file G4ReactionProduct.hh.

Referenced by operator+(), and operator-().

204 { hasInitialStateParton = aFlag; }
G4bool G4ReactionProduct::HasInitialStateParton ( ) const
inline

Definition at line 206 of file G4ReactionProduct.hh.

206 { return hasInitialStateParton; }
void G4ReactionProduct::Lorentz ( const G4ReactionProduct p1,
const G4ReactionProduct p2 
)

Definition at line 199 of file G4ReactionProduct.cc.

References test::a, SetMass(), SetMomentum(), SetTotalEnergy(), test::x, CLHEP::Hep3Vector::x(), CLHEP::Hep3Vector::y(), z, and CLHEP::Hep3Vector::z().

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

201  {
202  G4ThreeVector p1M = p1.momentum;
203  G4ThreeVector p2M = p2.momentum;
204  G4double p1x = p1M.x(); G4double p1y = p1M.y(); G4double p1z = p1M.z();
205  G4double p2x = p2M.x(); G4double p2y = p2M.y(); G4double p2z = p2M.z();
206  G4double a = ( (p1x*p2x+p1y*p2y+p1z*p2z)/(p2.totalEnergy+p2.mass) -
207  p1.totalEnergy ) / p2.mass;
208  G4double x = p1x+a*p2x;
209  G4double y = p1y+a*p2y;
210  G4double z = p1z+a*p2z;
211  G4double p = std::sqrt(x*x+y*y+z*z);
212  SetMass( p1.mass );
213  SetTotalEnergy( std::sqrt( (p1.mass+p)*(p1.mass+p) - 2.*p1.mass*p ) );
214  //SetTotalEnergy( std::sqrt( p1.mass*p1.mass + x*x + y*y + z*z ) );
215  SetMomentum( x, y, z );
216  }
double x() const
G4double z
Definition: TRTMaterials.hh:39
void SetMomentum(const G4double x, const G4double y, const G4double z)
const char * p
Definition: xmltok.h:285
double z() const
void SetMass(const G4double mas)
void SetTotalEnergy(const G4double en)
double y() const
double G4double
Definition: G4Types.hh:76
void G4ReactionProduct::operator delete ( void aReactionProduct)
inline

Definition at line 91 of file G4ReactionProduct.hh.

References aRPAllocator.

91  {
92  aRPAllocator->FreeSingle((G4ReactionProduct*)aReactionProduct);
93  }
G4DLLIMPORT G4ThreadLocal G4Allocator< G4ReactionProduct > * aRPAllocator
void* G4ReactionProduct::operator new ( size_t  )
inline

Definition at line 82 of file G4ReactionProduct.hh.

References aRPAllocator.

82  {
84  return (void *)aRPAllocator->MallocSingle();
85  }
G4DLLIMPORT G4ThreadLocal G4Allocator< G4ReactionProduct > * aRPAllocator
G4bool G4ReactionProduct::operator!= ( const G4ReactionProduct right) const
inline

Definition at line 104 of file G4ReactionProduct.hh.

105  { return ( this != (G4ReactionProduct*) &right ); }
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  }
G4ReactionProduct & G4ReactionProduct::operator= ( const G4DynamicParticle right)

Definition at line 106 of file G4ReactionProduct.cc.

References G4DynamicParticle::GetDefinition(), G4DynamicParticle::GetKineticEnergy(), G4DynamicParticle::GetMomentum(), G4ParticleDefinition::GetPDGEncoding(), G4ParticleDefinition::GetPDGMass(), G4DynamicParticle::GetTotalEnergy(), and SetPositionInNucleus().

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  }
void SetPositionInNucleus(G4double x, G4double y, G4double z)
G4double GetKineticEnergy() const
G4double GetTotalEnergy() const
G4ParticleDefinition * GetDefinition() const
G4double GetPDGMass() const
G4ThreeVector GetMomentum() const
G4ReactionProduct & G4ReactionProduct::operator= ( const G4HadProjectile right)

Definition at line 124 of file G4ReactionProduct.cc.

References CLHEP::HepLorentzVector::e(), G4HadProjectile::Get4Momentum(), G4HadProjectile::GetDefinition(), G4HadProjectile::GetKineticEnergy(), G4ParticleDefinition::GetPDGEncoding(), G4ParticleDefinition::GetPDGMass(), SetPositionInNucleus(), and CLHEP::HepLorentzVector::vect().

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  }
void SetPositionInNucleus(G4double x, G4double y, G4double z)
Hep3Vector vect() const
const G4ParticleDefinition * GetDefinition() const
G4double GetKineticEnergy() const
const G4LorentzVector & Get4Momentum() const
G4double GetPDGMass() const
G4bool G4ReactionProduct::operator== ( const G4ReactionProduct right) const
inline

Definition at line 101 of file G4ReactionProduct.hh.

102  { return ( this == (G4ReactionProduct*) &right ); }
void G4ReactionProduct::SetDefinition ( G4ParticleDefinition aParticleDefinition)

Definition at line 154 of file G4ReactionProduct.cc.

References G4ParticleDefinition::GetPDGEncoding(), and G4ParticleDefinition::GetPDGMass().

Referenced by G4RPGReaction::AddBlackTrackParticles(), G4NeutronHPFSFissionFS::ApplyYourself(), G4NeutronHPCaptureFS::ApplyYourself(), G4NeutronHPFissionBaseFS::ApplyYourself(), G4FissionLibrary::ApplyYourself(), G4NeutronHPInelasticBaseFS::BaseApply(), G4NeutronHPInelasticCompFS::CompositeApply(), G4ReactionDynamics::GenerateXandPt(), G4NeutronHPPhotonDist::GetPhotons(), G4RPGReaction::NuclearReaction(), G4ReactionDynamics::NuclearReaction(), G4ReactionDynamics::ProduceStrangeParticlePairs(), G4DecayStrongResonances::Propagate(), G4RPGStrangeProduction::ReactionStage(), G4RPGTwoCluster::ReactionStage(), G4RPGFragmentation::ReactionStage(), G4NeutronHPIsotropic::Sample(), G4NeutronHPContAngularPar::Sample(), G4NeutronHPNBodyPhaseSpace::Sample(), G4NeutronHPLabAngularEnergy::Sample(), G4NeutronHPDiscreteTwoBody::Sample(), SetDefinitionAndUpdateE(), G4RPGInelastic::SetUpPions(), and G4ReactionDynamics::TwoCluster().

156  {
157  theParticleDefinition = aParticleDefinition;
158  mass = aParticleDefinition->GetPDGMass();
159  totalEnergy = mass;
160  kineticEnergy = 0.0;
161  (aParticleDefinition->GetPDGEncoding()<0) ?
162  timeOfFlight=-1.0 : timeOfFlight=1.0;
163  }
G4double GetPDGMass() const
void G4ReactionProduct::SetDefinitionAndUpdateE ( G4ParticleDefinition aParticleDefinition)

Definition at line 142 of file G4ReactionProduct.cc.

References DBL_MIN, GetKineticEnergy(), GetMass(), GetMomentum(), CLHEP::Hep3Vector::mag(), G4InuclParticleNames::pp, SetDefinition(), SetKineticEnergy(), and SetMomentum().

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

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

Definition at line 200 of file G4ReactionProduct.hh.

Referenced by G4ExcitationHandler::BreakItUp(), operator+(), and operator-().

200 { formationTime = aTime; }
void G4ReactionProduct::SetKineticEnergy ( const G4double  en)
inline

Definition at line 132 of file G4ReactionProduct.hh.

Referenced by G4NeutronHPFissionFS::ApplyYourself(), G4NeutronHPFSFissionFS::ApplyYourself(), G4RPGKMinusInelastic::ApplyYourself(), G4RPGNeutronInelastic::ApplyYourself(), G4RPGProtonInelastic::ApplyYourself(), G4RPGSigmaPlusInelastic::ApplyYourself(), G4RPGAntiLambdaInelastic::ApplyYourself(), G4RPGXiMinusInelastic::ApplyYourself(), G4RPGAntiProtonInelastic::ApplyYourself(), G4RPGAntiSigmaPlusInelastic::ApplyYourself(), G4RPGOmegaMinusInelastic::ApplyYourself(), G4RPGAntiNeutronInelastic::ApplyYourself(), G4RPGAntiOmegaMinusInelastic::ApplyYourself(), G4RPGAntiSigmaMinusInelastic::ApplyYourself(), G4RPGAntiXiMinusInelastic::ApplyYourself(), G4RPGAntiXiZeroInelastic::ApplyYourself(), G4RPGKZeroInelastic::ApplyYourself(), G4RPGKPlusInelastic::ApplyYourself(), G4RPGLambdaInelastic::ApplyYourself(), G4NeutronHPCaptureFS::ApplyYourself(), G4NeutronHPFissionBaseFS::ApplyYourself(), G4RPGSigmaMinusInelastic::ApplyYourself(), G4RPGXiZeroInelastic::ApplyYourself(), G4LENDModel::ApplyYourself(), G4RPGAntiKZeroInelastic::ApplyYourself(), G4NeutronHPElasticFS::ApplyYourself(), G4LENDElastic::ApplyYourself(), G4FissionLibrary::ApplyYourself(), G4NeutronHPInelasticBaseFS::BaseApply(), G4RPGInelastic::CalculateMomenta(), G4NeutronHPInelasticCompFS::CompositeApply(), G4ReactionDynamics::GenerateXandPt(), G4NeutronHPThermalBoost::GetThermalEnergy(), G4Nucleus::GetThermalNucleus(), G4RPGReaction::NuclearReaction(), G4ReactionDynamics::NuclearReaction(), G4RPGTwoCluster::ReactionStage(), G4RPGTwoBody::ReactionStage(), G4RPGFragmentation::ReactionStage(), G4RPGReaction::Rotate(), G4NeutronHPIsotropic::Sample(), G4NeutronHPContAngularPar::Sample(), G4NeutronHPNBodyPhaseSpace::Sample(), G4NeutronHPLabAngularEnergy::Sample(), G4NeutronHPDiscreteTwoBody::Sample(), G4NeutronHPAngular::SampleAndUpdate(), SetDefinitionAndUpdateE(), G4ReactionDynamics::TwoBody(), and G4ReactionDynamics::TwoCluster().

133  {
134  kineticEnergy = en;
135  totalEnergy = kineticEnergy + mass;
136  }
void G4ReactionProduct::SetMass ( const G4double  mas)
inline
void G4ReactionProduct::SetMayBeKilled ( const G4bool  f)
inline

Definition at line 171 of file G4ReactionProduct.hh.

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

172  { MayBeKilled = f; }
void G4ReactionProduct::SetMomentum ( const G4double  x,
const G4double  y,
const G4double  z 
)

Definition at line 165 of file G4ReactionProduct.cc.

References CLHEP::Hep3Vector::setX(), CLHEP::Hep3Vector::setY(), and CLHEP::Hep3Vector::setZ().

Referenced by G4NeutronHPFissionFS::ApplyYourself(), G4RPGKMinusInelastic::ApplyYourself(), G4RPGNeutronInelastic::ApplyYourself(), G4RPGProtonInelastic::ApplyYourself(), G4RPGAntiLambdaInelastic::ApplyYourself(), G4RPGXiMinusInelastic::ApplyYourself(), G4RPGAntiProtonInelastic::ApplyYourself(), G4RPGAntiSigmaPlusInelastic::ApplyYourself(), G4RPGSigmaPlusInelastic::ApplyYourself(), G4RPGAntiNeutronInelastic::ApplyYourself(), G4RPGAntiOmegaMinusInelastic::ApplyYourself(), G4RPGAntiSigmaMinusInelastic::ApplyYourself(), G4RPGAntiXiMinusInelastic::ApplyYourself(), G4RPGOmegaMinusInelastic::ApplyYourself(), G4NeutronHPCaptureFS::ApplyYourself(), G4RPGAntiXiZeroInelastic::ApplyYourself(), G4RPGLambdaInelastic::ApplyYourself(), G4RPGKPlusInelastic::ApplyYourself(), G4RPGKZeroInelastic::ApplyYourself(), G4RPGSigmaMinusInelastic::ApplyYourself(), G4RPGXiZeroInelastic::ApplyYourself(), G4LENDModel::ApplyYourself(), G4RPGAntiKZeroInelastic::ApplyYourself(), G4NeutronHPElasticFS::ApplyYourself(), G4LENDElastic::ApplyYourself(), G4FissionLibrary::ApplyYourself(), G4NeutronHPInelasticBaseFS::BaseApply(), G4ExcitationHandler::BreakItUp(), G4RPGInelastic::CalculateMomenta(), G4NeutronHPInelasticCompFS::CompositeApply(), G4RPGReaction::Defs1(), G4FissionProductYieldDist::G4GetFission(), G4ReactionProduct(), G4ReactionDynamics::GenerateXandPt(), G4NeutronHPFissionData::GetCrossSection(), G4NeutronHPCaptureData::GetCrossSection(), G4NeutronHPInelasticData::GetCrossSection(), G4NeutronHPElasticData::GetCrossSection(), G4NeutronHPDeExGammas::GetDecayGammas(), G4NeutronHPPhotonDist::GetPhotons(), G4NeutronHPThermalBoost::GetThermalEnergy(), G4Nucleus::GetThermalNucleus(), Lorentz(), G4RPGReaction::MomentumCheck(), G4RPGReaction::NuclearReaction(), G4ReactionDynamics::NuclearReaction(), operator+(), operator-(), G4DecayStrongResonances::Propagate(), G4GeneratorPrecompoundInterface::Propagate(), G4GeneratorPrecompoundInterface::PropagateNuclNucl(), G4RPGTwoBody::ReactionStage(), G4RPGTwoCluster::ReactionStage(), G4RPGFragmentation::ReactionStage(), G4RPGReaction::Rotate(), G4NeutronHPIsotropic::Sample(), G4NeutronHPContAngularPar::Sample(), G4NeutronHPNBodyPhaseSpace::Sample(), G4NeutronHPEnAngCorrelation::Sample(), G4NeutronHPLabAngularEnergy::Sample(), G4NeutronHPDiscreteTwoBody::Sample(), G4NeutronHPAngular::SampleAndUpdate(), SetDefinitionAndUpdateE(), SetZero(), G4ReactionDynamics::TwoBody(), and G4ReactionDynamics::TwoCluster().

167  {
168  momentum.setX( x );
169  momentum.setY( y );
170  momentum.setZ( z );
171  }
G4double z
Definition: TRTMaterials.hh:39
void setY(double)
void setZ(double)
void setX(double)
void G4ReactionProduct::SetMomentum ( const G4double  x,
const G4double  y 
)

Definition at line 173 of file G4ReactionProduct.cc.

References CLHEP::Hep3Vector::setX(), and CLHEP::Hep3Vector::setY().

175  {
176  momentum.setX( x );
177  momentum.setY( y );
178  }
void setY(double)
void setX(double)
void G4ReactionProduct::SetMomentum ( const G4double  z)

Definition at line 180 of file G4ReactionProduct.cc.

References CLHEP::Hep3Vector::setZ().

181  {
182  momentum.setZ( z );
183  }
G4double z
Definition: TRTMaterials.hh:39
void setZ(double)
void G4ReactionProduct::SetMomentum ( const G4ThreeVector mom)
inline

Definition at line 120 of file G4ReactionProduct.hh.

121  { momentum = mom; }
void G4ReactionProduct::SetNewlyAdded ( const G4bool  f)
inline
void G4ReactionProduct::SetPositionInNucleus ( G4double  x,
G4double  y,
G4double  z 
)
inline

Definition at line 183 of file G4ReactionProduct.hh.

References CLHEP::Hep3Vector::setX(), CLHEP::Hep3Vector::setY(), and CLHEP::Hep3Vector::setZ().

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

184  {
185  positionInNucleus.setX(x);
186  positionInNucleus.setY(y);
187  positionInNucleus.setZ(z);
188  }
G4double z
Definition: TRTMaterials.hh:39
void setY(double)
void setZ(double)
void setX(double)
void G4ReactionProduct::SetPositionInNucleus ( G4ThreeVector aPosition)
inline

Definition at line 190 of file G4ReactionProduct.hh.

191  {
192  positionInNucleus = aPosition;
193  }
void G4ReactionProduct::SetSide ( const G4int  sid)
inline
void G4ReactionProduct::SetTOF ( const G4double  t)
inline
void G4ReactionProduct::SetTotalEnergy ( const G4double  en)
inline
void G4ReactionProduct::SetZero ( )

Definition at line 185 of file G4ReactionProduct.cc.

References SetMomentum(), and SetPositionInNucleus().

Referenced by G4ReactionDynamics::GenerateXandPt().

186  {
187  SetMomentum( 0.0, 0.0, 0.0 );
188  totalEnergy = 0.0;
189  kineticEnergy = 0.0;
190  mass = 0.0;
191  timeOfFlight = 0.0;
192  side = 0;
193  NewlyAdded = false;
194  SetPositionInNucleus( 0.0, 0.0, 0.0 );
195  formationTime = 0.0;
196  hasInitialStateParton = false;
197  }
void SetPositionInNucleus(G4double x, G4double y, G4double z)
void SetMomentum(const G4double x, const G4double y, const G4double z)

Friends And Related Function Documentation

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  }
void SetMomentum(const G4double x, const G4double y, const G4double z)
void SetMass(const G4double mas)
void SetTotalEnergy(const G4double en)
G4ThreeVector GetMomentum() const
G4double GetMass() const
G4ReactionProduct operator+ ( const G4ReactionProduct p1,
const G4ReactionProduct p2 
)
friend

Definition at line 235 of file G4ReactionProduct.cc.

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

Definition at line 257 of file G4ReactionProduct.cc.

259  {
260  G4double totEnergy = p1.totalEnergy - p2.totalEnergy;
261  G4double x = p1.momentum.x() - p2.momentum.x();
262  G4double y = p1.momentum.y() - p2.momentum.y();
263  G4double z = p1.momentum.z() - p2.momentum.z();
264  G4double newMass = totEnergy*totEnergy - ( x*x + y*y + z*z );
265  if( newMass < 0.0 )
266  newMass = -1. * std::sqrt( -newMass );
267  else
268  newMass = std::sqrt( newMass );
269  G4ReactionProduct result;
270  result.SetMass( newMass );
271  result.SetMomentum( x, y, z );
272  result.SetTotalEnergy( totEnergy );
273  result.SetPositionInNucleus( 0.0, 0.0, 0.0 );
274  result.SetFormationTime(0.0);
275  result.HasInitialStateParton(false);
276  return result;
277  }
void SetPositionInNucleus(G4double x, G4double y, G4double z)
void HasInitialStateParton(G4bool aFlag)
double x() const
G4double z
Definition: TRTMaterials.hh:39
void SetMomentum(const G4double x, const G4double y, const G4double z)
double z() const
void SetMass(const G4double mas)
void SetTotalEnergy(const G4double en)
double y() const
void SetFormationTime(G4double aTime)
double G4double
Definition: G4Types.hh:76

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