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

#include <G4ChipsPionMinusInelasticXS.hh>

Inheritance diagram for G4ChipsPionMinusInelasticXS:
Collaboration diagram for G4ChipsPionMinusInelasticXS:

Public Member Functions

 G4ChipsPionMinusInelasticXS ()
 
 ~G4ChipsPionMinusInelasticXS ()
 
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 G4IsotopeSelectIsotope (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 G4StringGetName () 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 47 of file G4ChipsPionMinusInelasticXS.hh.

Constructor & Destructor Documentation

G4ChipsPionMinusInelasticXS::G4ChipsPionMinusInelasticXS ( )

Definition at line 55 of file G4ChipsPionMinusInelasticXS.cc.

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

Definition at line 70 of file G4ChipsPionMinusInelasticXS.cc.

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

Member Function Documentation

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

Reimplemented from G4VCrossSectionDataSet.

Definition at line 81 of file G4ChipsPionMinusInelasticXS.cc.

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

Definition at line 55 of file G4ChipsPionMinusInelasticXS.hh.

55 {return "ChipsPionMinusInelasticXS";}

Here is the caller graph for this function:

G4double G4ChipsPionMinusInelasticXS::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 109 of file G4ChipsPionMinusInelasticXS.cc.

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

102 {
103  G4double pMom=Pt->GetTotalMomentum();
104  G4int tgN = A - tgZ;
105 
106  return GetChipsCrossSection(pMom, tgZ, tgN, -211);
107 }
int G4int
Definition: G4Types.hh:78
G4double GetTotalMomentum() const
double A(double temperature)
virtual G4double GetChipsCrossSection(G4double momentum, G4int Z, G4int N, G4int pdg)
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:

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

Reimplemented from G4VCrossSectionDataSet.

Definition at line 89 of file G4ChipsPionMinusInelasticXS.cc.

92 {
93  return true;
94 }

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