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

#include <G4ChipsProtonInelasticXS.hh>

Inheritance diagram for G4ChipsProtonInelasticXS:
Collaboration diagram for G4ChipsProtonInelasticXS:

Public Member Functions

 G4ChipsProtonInelasticXS ()
 
 ~G4ChipsProtonInelasticXS ()
 
virtual void CrossSectionDescription (std::ostream &) const
 
virtual G4bool IsIsoApplicable (const G4DynamicParticle *Pt, G4int Z, G4int A, const G4Element *elm, const G4Material *mat)
 
virtual G4double GetIsoCrossSection (const G4DynamicParticle *, G4int tgZ, G4int A, const G4Isotope *iso=0, const G4Element *elm=0, const G4Material *mat=0)
 
virtual G4double GetChipsCrossSection (G4double momentum, G4int Z, G4int N, G4int pdg)
 
- Public Member Functions inherited from G4VCrossSectionDataSet
 G4VCrossSectionDataSet (const G4String &nam="")
 
virtual ~G4VCrossSectionDataSet ()
 
virtual G4bool IsElementApplicable (const G4DynamicParticle *, G4int Z, 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 G4Isotope * SelectIsotope (const G4Element *, G4double kinEnergy)
 
virtual void BuildPhysicsTable (const G4ParticleDefinition &)
 
virtual void DumpPhysicsTable (const G4ParticleDefinition &)
 
virtual G4int GetVerboseLevel () const
 
virtual void SetVerboseLevel (G4int value)
 
G4double GetMinKinEnergy () const
 
void SetMinKinEnergy (G4double value)
 
G4double GetMaxKinEnergy () const
 
void SetMaxKinEnergy (G4double value)
 
const G4String & GetName () const
 

Static Public Member Functions

static const char * Default_Name ()
 

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 44 of file G4ChipsProtonInelasticXS.hh.

Constructor & Destructor Documentation

G4ChipsProtonInelasticXS::G4ChipsProtonInelasticXS ( )

Definition at line 57 of file G4ChipsProtonInelasticXS.cc.

58 {
59  // Initialization of the
60  lastLEN=0; // Pointer to the lastArray of LowEn CS
61  lastHEN=0; // Pointer to the lastArray of HighEn CS
62  lastN=0; // The last N of calculated nucleus
63  lastZ=0; // The last Z of calculated nucleus
64  lastP=0.; // Last used in cross section Momentum
65  lastTH=0.; // Last threshold momentum
66  lastCS=0.; // Last value of the Cross Section
67  lastI=0; // The last position in the DAMDB
68 
69  LEN = new std::vector<G4double*>;
70  HEN = new std::vector<G4double*>;
71 }
G4VCrossSectionDataSet(const G4String &nam="")
Definition: inflate.h:41
static const char * Default_Name()
G4ChipsProtonInelasticXS::~G4ChipsProtonInelasticXS ( )

Definition at line 73 of file G4ChipsProtonInelasticXS.cc.

74 {
75  G4int lens=LEN->size();
76  for(G4int i=0; i<lens; ++i) delete[] (*LEN)[i];
77  delete LEN;
78  G4int hens=HEN->size();
79  for(G4int i=0; i<hens; ++i) delete[] (*HEN)[i];
80  delete HEN;
81 }
int G4int
Definition: G4Types.hh:78
Definition: inflate.h:41

Member Function Documentation

void G4ChipsProtonInelasticXS::CrossSectionDescription ( std::ostream &  outFile) const
virtual

Reimplemented from G4VCrossSectionDataSet.

Definition at line 84 of file G4ChipsProtonInelasticXS.cc.

85 {
86  outFile << "G4ChipsProtonInelasticXS provides the inelastic cross\n"
87  << "section for proton nucleus scattering as a function of incident\n"
88  << "momentum. The cross section is calculated using M. Kossov's\n"
89  << "CHIPS parameterization of cross section data.\n";
90 }
static const char* G4ChipsProtonInelasticXS::Default_Name ( )
inlinestatic

Definition at line 53 of file G4ChipsProtonInelasticXS.hh.

53 {return "ChipsProtonInelasticXS";}

Here is the caller graph for this function:

G4double G4ChipsProtonInelasticXS::GetChipsCrossSection ( G4double  momentum,
G4int  Z,
G4int  N,
G4int  pdg 
)
virtual

!The slave functions must provide cross-sections in millibarns (mb) !! (not in IU)

Definition at line 113 of file G4ChipsProtonInelasticXS.cc.

114 {
115 
116  G4bool in=false; // By default the isotope must be found in the AMDB
117  if(tgN!=lastN || tgZ!=lastZ) // The nucleus was not the last used isotope
118  {
119  in = false; // By default the isotope haven't been found in AMDB
120  lastP = 0.; // New momentum history (nothing to compare with)
121  lastN = tgN; // The last N of the calculated nucleus
122  lastZ = tgZ; // The last Z of the calculated nucleus
123  lastI = colN.size(); // Size of the Associative Memory DB in the heap
124  j = 0; // A#0f records found in DB for this projectile
125  if(lastI) for(G4int i=0; i<lastI; i++) // AMDB exists, try to find the (Z,N) isotope
126  {
127  if(colN[i]==tgN && colZ[i]==tgZ) // Try the record "i" in the AMDB
128  {
129  lastI=i; // Remember the index for future fast/last use
130  lastTH =colTH[i]; // The last THreshold (A-dependent)
131  if(pMom<=lastTH)
132  {
133  return 0.; // Energy is below the Threshold value
134  }
135  lastP =colP [i]; // Last Momentum (A-dependent)
136  lastCS =colCS[i]; // Last CrossSect (A-dependent)
137  in = true; // This is the case when the isotop is found in DB
138  // Momentum pMom is in IU ! @@ Units
139  lastCS=CalculateCrossSection(-1,j,2212,lastZ,lastN,pMom); // read & update
140  if(lastCS<=0. && pMom>lastTH) // Correct the threshold (@@ No intermediate Zeros)
141  {
142  lastCS=0.;
143  lastTH=pMom;
144  }
145  break; // Go out of the LOOP
146  }
147  j++; // Increment a#0f records found in DB
148  }
149  if(!in) // This isotope has not been calculated previously
150  {
152  lastCS=CalculateCrossSection(0,j,2212,lastZ,lastN,pMom); //calculate & create
153  //if(lastCS>0.) // It means that the AMBD was initialized
154  //{
155 
156  lastTH = 0; //ThresholdEnergy(tgZ, tgN); // The Threshold Energy which is now the last
157  colN.push_back(tgN);
158  colZ.push_back(tgZ);
159  colP.push_back(pMom);
160  colTH.push_back(lastTH);
161  colCS.push_back(lastCS);
162  //} // M.K. Presence of H1 with high threshold breaks the syncronization
163  return lastCS*millibarn;
164  } // End of creation of the new set of parameters
165  else
166  {
167  colP[lastI]=pMom;
168  colCS[lastI]=lastCS;
169  }
170  } // End of parameters udate
171  else if(pMom<=lastTH)
172  {
173  return 0.; // Momentum is below the Threshold Value -> CS=0
174  }
175  else // It is the last used -> use the current tables
176  {
177  lastCS=CalculateCrossSection(1,j,2212,lastZ,lastN,pMom); // Only read and UpdateDB
178  lastP=pMom;
179  }
180  return lastCS*millibarn;
181 }
int G4int
Definition: G4Types.hh:78
bool G4bool
Definition: G4Types.hh:79
static constexpr double millibarn
Definition: G4SIunits.hh:106

Here is the caller graph for this function:

G4double G4ChipsProtonInelasticXS::GetIsoCrossSection ( const G4DynamicParticle *  Pt,
G4int  tgZ,
G4int  A,
const G4Isotope *  iso = 0,
const G4Element *  elm = 0,
const G4Material *  mat = 0 
)
virtual

Reimplemented from G4VCrossSectionDataSet.

Definition at line 102 of file G4ChipsProtonInelasticXS.cc.

106 {
107  G4double pMom=Pt->GetTotalMomentum();
108  G4int tgN = A - tgZ;
109 
110  return GetChipsCrossSection(pMom, tgZ, tgN, 2212);
111 }
virtual G4double GetChipsCrossSection(G4double momentum, G4int Z, G4int N, G4int pdg)
int G4int
Definition: G4Types.hh:78
G4double GetTotalMomentum() const
double A(double temperature)
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:

G4bool G4ChipsProtonInelasticXS::IsIsoApplicable ( const G4DynamicParticle *  Pt,
G4int  Z,
G4int  A,
const G4Element *  elm,
const G4Material *  mat 
)
virtual

Reimplemented from G4VCrossSectionDataSet.

Definition at line 92 of file G4ChipsProtonInelasticXS.cc.

95 {
96  return true;
97 }

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