Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4RPGPionSuppression Class Reference

#include <G4RPGPionSuppression.hh>

Inheritance diagram for G4RPGPionSuppression:
Collaboration 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 48 of file G4RPGPionSuppression.hh.

Constructor & Destructor Documentation

G4RPGPionSuppression::G4RPGPionSuppression ( )

Definition at line 37 of file G4RPGPionSuppression.cc.

38  : G4RPGReaction() {}

Member Function Documentation

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 42 of file G4RPGPionSuppression.cc.

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

Here is the call graph for this function:


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