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

#include <G4GeneralSpaceNNCrossSection.hh>

+ Inheritance diagram for G4GeneralSpaceNNCrossSection:

Public Member Functions

 G4GeneralSpaceNNCrossSection ()
 
 ~G4GeneralSpaceNNCrossSection ()
 
virtual G4bool IsElementApplicable (const G4DynamicParticle *theProjectile, G4int Z, const G4Material *)
 
virtual G4double GetElementCrossSection (const G4DynamicParticle *theProjectile, G4int Z, const G4Material *)
 
- Public Member Functions inherited from G4VCrossSectionDataSet
 G4VCrossSectionDataSet (const G4String &nam="")
 
virtual ~G4VCrossSectionDataSet ()
 
virtual G4bool IsElementApplicable (const G4DynamicParticle *, G4int Z, const G4Material *mat=0)
 
virtual G4bool IsIsoApplicable (const G4DynamicParticle *, G4int Z, G4int A, const G4Element *elm=0, const G4Material *mat=0)
 
G4double GetCrossSection (const G4DynamicParticle *, const G4Element *, const G4Material *mat=0)
 
G4double ComputeCrossSection (const G4DynamicParticle *, const G4Element *, const G4Material *mat=0)
 
virtual G4double GetElementCrossSection (const G4DynamicParticle *, G4int Z, const G4Material *mat=0)
 
virtual G4double GetIsoCrossSection (const G4DynamicParticle *, G4int Z, G4int A, const G4Isotope *iso=0, const G4Element *elm=0, const G4Material *mat=0)
 
virtual G4IsotopeSelectIsotope (const G4Element *, G4double kinEnergy)
 
virtual void BuildPhysicsTable (const G4ParticleDefinition &)
 
virtual void DumpPhysicsTable (const G4ParticleDefinition &)
 
virtual void CrossSectionDescription (std::ostream &) const
 
void SetVerboseLevel (G4int value)
 
G4double GetMinKinEnergy () const
 
void SetMinKinEnergy (G4double value)
 
G4double GetMaxKinEnergy () const
 
void SetMaxKinEnergy (G4double value)
 
const G4StringGetName () const
 

Additional Inherited Members

- Protected Member Functions inherited from G4VCrossSectionDataSet
void SetName (const G4String &)
 
- Protected Attributes inherited from G4VCrossSectionDataSet
G4int verboseLevel
 

Detailed Description

Definition at line 87 of file G4GeneralSpaceNNCrossSection.hh.

Constructor & Destructor Documentation

◆ G4GeneralSpaceNNCrossSection()

G4GeneralSpaceNNCrossSection::G4GeneralSpaceNNCrossSection ( )

◆ ~G4GeneralSpaceNNCrossSection()

G4GeneralSpaceNNCrossSection::~G4GeneralSpaceNNCrossSection ( )

Definition at line 89 of file G4GeneralSpaceNNCrossSection.cc.

90{
91 delete protonInelastic;
92 delete ionProton;
93 delete TripathiGeneral;
94 delete TripathiLight;
95 delete Shen;
96}

Member Function Documentation

◆ GetElementCrossSection()

G4double G4GeneralSpaceNNCrossSection::GetElementCrossSection ( const G4DynamicParticle theProjectile,
G4int  Z,
const G4Material mat 
)
virtual

Reimplemented from G4VCrossSectionDataSet.

Definition at line 110 of file G4GeneralSpaceNNCrossSection.cc.

112{
113 G4double result = 0.0;
114 G4int ZP = G4lrint(theProjectile->GetDefinition()->GetPDGCharge()/eplus);
115
116 if (verboseLevel >= 2)
117 {
118 G4int AP = theProjectile->GetDefinition()->GetBaryonNumber();
119 G4cout <<"In G4GeneralSpaceNNCrossSection::GetCrossSection" <<G4endl;
120 G4cout <<"Projectile A = " <<std::setw(8) <<AP
121 <<" Z = " <<std::setw(8) <<ZP
122 <<" Energy = " <<theProjectile->GetKineticEnergy()/AP
123 <<" MeV/nuc" <<G4endl;
124 G4cout <<"Target Z = " <<std::setw(8) <<ZT
125 <<G4endl;
126 }
127 if (theProjectile->GetDefinition()==theProton)
128 {
129 if (ZT>5)
130 {
131 result = protonInelastic->
132 GetElementCrossSection(theProjectile, ZT, mat);
133 if (verboseLevel >= 2)
134 G4cout <<"Selecting G4ProtonInelasticCrossSection" <<G4endl;
135 }
136 else
137 {
138 result = TripathiLight->
139 GetElementCrossSection(theProjectile, ZT, mat);
140 if (verboseLevel >= 2)
141 G4cout <<"Selecting G4TripathiLightCrossSection" <<G4endl;
142 }
143 }
144 else if (ZT==1)
145 {
146 if (ZP>5)
147 {
148 result = ionProton->
149 GetElementCrossSection(theProjectile, ZT, mat);
150 if (verboseLevel >= 2)
151 G4cout <<"Selecting G4IonProtonCrossSection" <<G4endl;
152 }
153 else
154 {
155 result = TripathiLight->
156 GetElementCrossSection(theProjectile, ZT, mat);
157 if (verboseLevel >= 2)
158 G4cout <<"Selecting G4TripathiLightCrossSection" <<G4endl;
159 }
160 }
161 else
162 {
163 if (TripathiLight->IsElementApplicable(theProjectile, ZT, mat))
164 {
165 result = TripathiLight->
166 GetElementCrossSection(theProjectile, ZT, mat);
167 if (verboseLevel >= 2)
168 G4cout <<"Selecting G4TripathiLightCrossSection" <<G4endl;
169 }
170 else if (TripathiGeneral->IsElementApplicable(theProjectile, ZT, mat))
171 {
172 result = TripathiGeneral->
173 GetElementCrossSection(theProjectile, ZT, mat);
174 if (verboseLevel >= 2)
175 G4cout <<"Selecting G4TripathiCrossSection" <<G4endl;
176 }
177 else if (Shen->IsElementApplicable(theProjectile, ZT, mat))
178 {
179 result = Shen->
180 GetElementCrossSection(theProjectile, ZT, mat);
181 if (verboseLevel >= 2)
182 G4cout <<"Selecting G4IonsShenCrossSection" <<G4endl;
183 }
184 }
185 if (verboseLevel >= 2)
186 {
187 G4cout <<"Cross-section = " <<result/millibarn <<" mbarn" <<G4endl;
188 G4cout <<G4endl;
189 }
190
191 return result;
192}
double G4double
Definition: G4Types.hh:64
int G4int
Definition: G4Types.hh:66
#define G4endl
Definition: G4ios.hh:52
G4DLLIMPORT std::ostream G4cout
G4ParticleDefinition * GetDefinition() const
G4double GetKineticEnergy() const
virtual G4double GetElementCrossSection(const G4DynamicParticle *theProjectile, G4int Z, const G4Material *)
virtual G4bool IsElementApplicable(const G4DynamicParticle *aDP, G4int Z, const G4Material *)
G4double GetPDGCharge() const
virtual G4bool IsElementApplicable(const G4DynamicParticle *aPart, G4int Z, const G4Material *)
virtual G4bool IsElementApplicable(const G4DynamicParticle *theProjectile, G4int Z, const G4Material *)
int G4lrint(double ad)
Definition: templates.hh:163

Referenced by GetElementCrossSection().

◆ IsElementApplicable()

G4bool G4GeneralSpaceNNCrossSection::IsElementApplicable ( const G4DynamicParticle theProjectile,
G4int  Z,
const G4Material  
)
virtual

Reimplemented from G4VCrossSectionDataSet.

Definition at line 101 of file G4GeneralSpaceNNCrossSection.cc.

103{
104 return (1 <= theProjectile->GetDefinition()->GetBaryonNumber());
105}

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