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

#include <G4CHIPSElasticXS.hh>

+ Inheritance diagram for G4CHIPSElasticXS:

Public Member Functions

 G4CHIPSElasticXS ()
 
virtual ~G4CHIPSElasticXS ()
 
virtual G4bool IsIsoApplicable (const G4DynamicParticle *, G4int, G4int, const G4Element *, const G4Material *)
 
virtual G4double GetIsoCrossSection (const G4DynamicParticle *, G4int, G4int, const G4Isotope *, const G4Element *, const G4Material *)
 
virtual void Description () const
 
- 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 59 of file G4CHIPSElasticXS.hh.

Constructor & Destructor Documentation

◆ G4CHIPSElasticXS()

G4CHIPSElasticXS::G4CHIPSElasticXS ( )

Definition at line 59 of file G4CHIPSElasticXS.cc.

60 : G4VCrossSectionDataSet("CHIPSElasticXS"),
61 theProton(G4Proton::Proton()),
62 theNeutron(G4Neutron::Neutron()),
63 thEnergy(19*CLHEP::MeV),
64 isInitialized(false)
65{
66 // verboseLevel = 0;
69
70 PBARxsManager = G4QAntiBaryonElasticCrossSection::GetPointer(); // Uzhi
71 PIPxsManager = G4QPionPlusElasticCrossSection::GetPointer(); // Uzhi
72 PIMxsManager = G4QPionMinusElasticCrossSection::GetPointer(); // Uzhi
73 KPxsManager = G4QKaonPlusElasticCrossSection::GetPointer(); // Uzhi
74 KMxsManager = G4QKaonMinusElasticCrossSection::GetPointer(); // Uzhi
75 //Description();
76 theParticle = 0;
77}
static G4Neutron * Neutron()
Definition: G4Neutron.cc:104
static G4Proton * Proton()
Definition: G4Proton.cc:93
static G4VQCrossSection * GetPointer()

◆ ~G4CHIPSElasticXS()

G4CHIPSElasticXS::~G4CHIPSElasticXS ( )
virtual

Definition at line 79 of file G4CHIPSElasticXS.cc.

80{}

Member Function Documentation

◆ Description()

void G4CHIPSElasticXS::Description ( ) const
virtual

Definition at line 83 of file G4CHIPSElasticXS.cc.

84{
85 char* dirName = getenv("G4PhysListDocDir");
86 if (dirName) {
87 std::ofstream outFile;
88 G4String outFileName = GetName() + ".html";
89 G4String pathName = G4String(dirName) + "/" + outFileName;
90
91 outFile.open(pathName);
92 outFile << "<html>\n";
93 outFile << "<head>\n";
94
95 outFile << "<title>Description of CHIPS Elastic Cross Section</title>\n";
96 outFile << "</head>\n";
97 outFile << "<body>\n";
98
99 outFile << "G4CHIPSElasticXS provides hadron-nuclear elastic scattering\n"
100 << "cross sections for protons and neutrons with incident energies\n"
101 << "between 19 MeV and X GeV. These cross sections represent\n"
102 << "parameterizations developed by M. Kossov. (more detail)\n";
103
104 outFile << "</body>\n";
105 outFile << "</html>\n";
106 outFile.close();
107 }
108}
const G4String & GetName() const

◆ GetIsoCrossSection()

G4double G4CHIPSElasticXS::GetIsoCrossSection ( const G4DynamicParticle dyn,
G4int  Z,
G4int  A,
const G4Isotope ,
const G4Element ,
const G4Material  
)
virtual

Reimplemented from G4VCrossSectionDataSet.

Definition at line 119 of file G4CHIPSElasticXS.cc.

123{
124 G4int N = A - Z;
125 if(Z == 1) {
126 if(N > 1) { N = 1; }
127 } else if(Z == 2) { N = 2; }
128
129 G4double momentum = dyn->GetTotalMomentum();
130 G4int uPDGcode = dyn->GetPDGcode();
131 G4VQCrossSection* CHIPSmanager = 0;
132 G4double cross = 0.0;
133
134 switch(uPDGcode) {
135 case 2212:
136 CHIPSmanager=pCManager;
137 break;
138 case 2112:
139 CHIPSmanager=nCManager;
140 break;
141 case -2212:
142 CHIPSmanager=PBARxsManager;
143 break;
144 case -2112:
145 CHIPSmanager=PBARxsManager;
146 break;
147 case 211:
148 CHIPSmanager=PIPxsManager;
149 break;
150 case -211:
151 CHIPSmanager=PIMxsManager;
152 break;
153 case 321:
154 CHIPSmanager=KPxsManager;
155 break;
156 case -321:
157 CHIPSmanager=KMxsManager;
158 break;
159 case 130:
160 break;
161 case 310:
162 break;
163 case 311:
164 break;
165 case -311:
166 break;
167 default:
168 throw G4HadronicException(__FILE__, __LINE__,
169 "G4CHIPSElasticXS: not applicable for a particle");
170 return cross;
171 }
172 if(CHIPSmanager) {
173 cross = CHIPSmanager->GetCrossSection(false,momentum,Z,N,uPDGcode);
174 } else {
175 cross = 0.5*(KPxsManager->GetCrossSection(false,momentum,Z,N,uPDGcode) +
176 KMxsManager->GetCrossSection(false,momentum,Z,N,uPDGcode));
177 }
178 return cross;
179}
double G4double
Definition: G4Types.hh:64
int G4int
Definition: G4Types.hh:66
G4double GetTotalMomentum() const
G4int GetPDGcode() const
virtual G4double GetCrossSection(G4bool, G4double, G4int, G4int, G4int pPDG=0)

◆ IsIsoApplicable()

G4bool G4CHIPSElasticXS::IsIsoApplicable ( const G4DynamicParticle dyn,
G4int  Z,
G4int  ,
const G4Element ,
const G4Material  
)
virtual

Reimplemented from G4VCrossSectionDataSet.

Definition at line 111 of file G4CHIPSElasticXS.cc.

114{
115 return (Z <= 2 && dyn->GetKineticEnergy() > thEnergy);
116}

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