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

#include <G4RPGPionSuppression.hh>

+ Inheritance diagram for G4RPGPionSuppression:

Public Member Functions

 G4RPGPionSuppression ()
 
G4bool ReactionStage (const G4HadProjectile *, G4ReactionProduct &, G4bool &, const G4DynamicParticle *, G4ReactionProduct &, G4bool &, const G4Nucleus &, G4ReactionProduct &, G4FastVector< G4ReactionProduct, 256 > &, G4int &, G4bool, G4ReactionProduct &)
 
- Public Member Functions inherited from G4RPGReaction
 G4RPGReaction ()
 
virtual ~G4RPGReaction ()
 
G4bool ReactionStage (const G4HadProjectile *, G4ReactionProduct &, G4bool &, const G4DynamicParticle *, G4ReactionProduct &, G4bool &, const G4Nucleus &, G4ReactionProduct &, G4FastVector< G4ReactionProduct, 256 > &, G4int &, G4bool, G4ReactionProduct &)
 
void AddBlackTrackParticles (const G4double, const G4int, const G4double, const G4int, const G4ReactionProduct &, G4int, G4int, const G4Nucleus &, G4FastVector< G4ReactionProduct, 256 > &, G4int &)
 
G4double GenerateNBodyEvent (const G4double totalEnergy, const G4bool constantCrossSection, G4FastVector< G4ReactionProduct, 256 > &vec, G4int &vecLen)
 
G4double GenerateNBodyEventT (const G4double totalEnergy, const G4bool constantCrossSection, std::vector< G4ReactionProduct * > &list)
 
void NuclearReaction (G4FastVector< G4ReactionProduct, 4 > &vec, G4int &vecLen, const G4HadProjectile *originalIncident, const G4Nucleus &aNucleus, const G4double theAtomicMass, const G4double *massVec)
 

Additional Inherited Members

- Protected Member Functions inherited from G4RPGReaction
void Rotate (const G4double numberofFinalStateNucleons, const G4ThreeVector &temp, const G4ReactionProduct &modifiedOriginal, const G4HadProjectile *originalIncident, const G4Nucleus &targetNucleus, G4ReactionProduct &currentParticle, G4ReactionProduct &targetParticle, G4FastVector< G4ReactionProduct, 256 > &vec, G4int &vecLen)
 
void Defs1 (const G4ReactionProduct &modifiedOriginal, G4ReactionProduct &currentParticle, G4ReactionProduct &targetParticle, G4FastVector< G4ReactionProduct, 256 > &vec, G4int &vecLen)
 
std::pair< G4int, G4intGetFinalStateNucleons (const G4DynamicParticle *originalTarget, const G4FastVector< G4ReactionProduct, 256 > &vec, const G4int &vecLen)
 
void MomentumCheck (const G4ReactionProduct &modifiedOriginal, G4ReactionProduct &currentParticle, G4ReactionProduct &targetParticle, G4FastVector< G4ReactionProduct, 256 > &vec, G4int &vecLen)
 
G4double normal ()
 
G4ThreeVector Isotropic (const G4double &)
 

Detailed Description

Definition at line 47 of file G4RPGPionSuppression.hh.

Constructor & Destructor Documentation

◆ G4RPGPionSuppression()

G4RPGPionSuppression::G4RPGPionSuppression ( )

Definition at line 36 of file G4RPGPionSuppression.cc.

37 : G4RPGReaction() {}

Member Function Documentation

◆ ReactionStage()

G4bool G4RPGPionSuppression::ReactionStage ( const G4HadProjectile ,
G4ReactionProduct modifiedOriginal,
G4bool incidentHasChanged,
const G4DynamicParticle ,
G4ReactionProduct targetParticle,
G4bool targetHasChanged,
const G4Nucleus targetNucleus,
G4ReactionProduct currentParticle,
G4FastVector< G4ReactionProduct, 256 > &  vec,
G4int vecLen,
G4bool  ,
G4ReactionProduct  
)

Definition at line 40 of file G4RPGPionSuppression.cc.

53{
54 // This code was originally in the fortran code TWOCLU
55 //
56 // Suppress charged pions, for various reasons
57 //
58 G4double mOriginal = modifiedOriginal.GetMass()/GeV;
59 G4double etOriginal = modifiedOriginal.GetTotalEnergy()/GeV;
60 G4double targetMass = targetParticle.GetDefinition()->GetPDGMass()/GeV;
61 G4double cmEnergy = std::sqrt( mOriginal*mOriginal + targetMass*targetMass +
62 2.0*targetMass*etOriginal );
63 G4double eAvailable = cmEnergy - mOriginal - targetMass;
64 for (G4int i = 0; i < vecLen; i++) eAvailable -= vec[i]->GetMass()/GeV;
65
66 const G4double atomicWeight = targetNucleus.GetA_asInt();
67 const G4double atomicNumber = targetNucleus.GetZ_asInt();
68 const G4double pOriginal = modifiedOriginal.GetTotalMomentum()/GeV;
69
75 G4double piMass = aPiPlus->GetPDGMass()/GeV;
76 G4double nucleonMass = aNeutron->GetPDGMass()/GeV;
77
78 const G4bool antiTest =
79 modifiedOriginal.GetDefinition() != G4AntiProton::AntiProton() &&
80 modifiedOriginal.GetDefinition() != G4AntiNeutron::AntiNeutron() &&
81 modifiedOriginal.GetDefinition() != G4AntiLambda::AntiLambda() &&
82 modifiedOriginal.GetDefinition() != G4AntiSigmaPlus::AntiSigmaPlus() &&
83 modifiedOriginal.GetDefinition() != G4AntiSigmaMinus::AntiSigmaMinus() &&
84 modifiedOriginal.GetDefinition() != G4AntiXiZero::AntiXiZero() &&
85 modifiedOriginal.GetDefinition() != G4AntiXiMinus::AntiXiMinus() &&
86 modifiedOriginal.GetDefinition() != G4AntiOmegaMinus::AntiOmegaMinus();
87
88 if( antiTest && (
89 currentParticle.GetDefinition() == aPiPlus ||
90 currentParticle.GetDefinition() == aPiZero ||
91 currentParticle.GetDefinition() == aPiMinus ) &&
92 ( G4UniformRand() <= (10.0-pOriginal)/6.0 ) &&
93 ( G4UniformRand() <= atomicWeight/300.0 ) )
94 {
95 if (eAvailable > nucleonMass - piMass) {
96 if( G4UniformRand() > atomicNumber/atomicWeight )
97 currentParticle.SetDefinitionAndUpdateE( aNeutron );
98 else
99 currentParticle.SetDefinitionAndUpdateE( aProton );
100 incidentHasChanged = true;
101 }
102 }
103
104 if( antiTest && (
105 targetParticle.GetDefinition() == aPiPlus ||
106 targetParticle.GetDefinition() == aPiZero ||
107 targetParticle.GetDefinition() == aPiMinus ) &&
108 ( G4UniformRand() <= (10.0-pOriginal)/6.0 ) &&
109 ( G4UniformRand() <= atomicWeight/300.0 ) )
110 {
111 if (eAvailable > nucleonMass - piMass) {
112 if( G4UniformRand() > atomicNumber/atomicWeight )
113 targetParticle.SetDefinitionAndUpdateE( aNeutron );
114 else
115 targetParticle.SetDefinitionAndUpdateE( aProton );
116 targetHasChanged = true;
117 }
118 }
119
120 for( G4int i=0; i<vecLen; ++i )
121 {
122 if( antiTest && (
123 vec[i]->GetDefinition() == aPiPlus ||
124 vec[i]->GetDefinition() == aPiZero ||
125 vec[i]->GetDefinition() == aPiMinus ) &&
126 ( G4UniformRand() <= (10.0-pOriginal)/6.0 ) &&
127 ( G4UniformRand() <= atomicWeight/300.0 ) )
128 {
129 if (eAvailable > nucleonMass - piMass) {
130 if( G4UniformRand() > atomicNumber/atomicWeight )
131 vec[i]->SetDefinitionAndUpdateE( aNeutron );
132 else
133 vec[i]->SetDefinitionAndUpdateE( aProton );
134 }
135 }
136 }
137
138 return true;
139}
double G4double
Definition: G4Types.hh:83
bool G4bool
Definition: G4Types.hh:86
int G4int
Definition: G4Types.hh:85
#define G4UniformRand()
Definition: Randomize.hh:52
static G4AntiLambda * AntiLambda()
static G4AntiNeutron * AntiNeutron()
static G4AntiOmegaMinus * AntiOmegaMinus()
static G4AntiProton * AntiProton()
Definition: G4AntiProton.cc:92
static G4AntiSigmaMinus * AntiSigmaMinus()
static G4AntiSigmaPlus * AntiSigmaPlus()
static G4AntiXiMinus * AntiXiMinus()
static G4AntiXiZero * AntiXiZero()
static G4Neutron * Neutron()
Definition: G4Neutron.cc:103
G4int GetA_asInt() const
Definition: G4Nucleus.hh:109
G4int GetZ_asInt() const
Definition: G4Nucleus.hh:115
static G4PionMinus * PionMinus()
Definition: G4PionMinus.cc:97
static G4PionPlus * PionPlus()
Definition: G4PionPlus.cc:97
static G4PionZero * PionZero()
Definition: G4PionZero.cc:107
static G4Proton * Proton()
Definition: G4Proton.cc:92
G4double GetTotalMomentum() const
const G4ParticleDefinition * GetDefinition() const
G4double GetTotalEnergy() const
void SetDefinitionAndUpdateE(const G4ParticleDefinition *aParticleDefinition)
G4double GetMass() const

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