Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4ChipsKaonPlusInelasticXS Class Reference

#include <G4ChipsKaonPlusInelasticXS.hh>

Inheritance diagram for G4ChipsKaonPlusInelasticXS:
Collaboration diagram for G4ChipsKaonPlusInelasticXS:

Public Member Functions

 G4ChipsKaonPlusInelasticXS ()
 
 ~G4ChipsKaonPlusInelasticXS ()
 
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 G4ChipsKaonPlusInelasticXS.hh.

Constructor & Destructor Documentation

G4ChipsKaonPlusInelasticXS::G4ChipsKaonPlusInelasticXS ( )

Definition at line 75 of file G4ChipsKaonPlusInelasticXS.cc.

76 {
77  G4AutoLock l(&initM);
78  prM = G4Proton::Proton()->GetPDGMass(); // Proton mass in MeV
79  piM = G4PionPlus::PionPlus()->GetPDGMass()+.1; // Pion mass in MeV+Safety (WP)??
80  pM = G4KaonPlus::KaonPlus()->GetPDGMass(); // Projectile mass in MeV
81  tpM = pM+pM; // Doubled projectile mass (MeV)
82  l.unlock();
83  // Initialization of the
84  lastLEN=0; // Pointer to the lastArray of LowEn CS
85  lastHEN=0; // Pointer to the lastArray of HighEn CS
86  lastN=0; // The last N of calculated nucleus
87  lastZ=0; // The last Z of calculated nucleus
88  lastP=0.; // Last used in cross section Momentum
89  lastTH=0.; // Last threshold momentum
90  lastCS=0.; // Last value of the Cross Section
91  lastI=0; // The last position in the DAMDB
92  LEN = new std::vector<G4double*>;
93  HEN = new std::vector<G4double*>;
94 }
G4VCrossSectionDataSet(const G4String &nam="")
Definition: inflate.h:41
static G4Proton * Proton()
Definition: G4Proton.cc:93
static G4PionPlus * PionPlus()
Definition: G4PionPlus.cc:98
G4double GetPDGMass() const
static G4KaonPlus * KaonPlus()
Definition: G4KaonPlus.cc:113

Here is the call graph for this function:

G4ChipsKaonPlusInelasticXS::~G4ChipsKaonPlusInelasticXS ( )

Definition at line 96 of file G4ChipsKaonPlusInelasticXS.cc.

97 {
98  G4int lens=LEN->size();
99  for(G4int i=0; i<lens; ++i) delete[] (*LEN)[i];
100  delete LEN;
101 
102  G4int hens=HEN->size();
103  for(G4int i=0; i<hens; ++i) delete[] (*HEN)[i];
104  delete HEN;
105 }
int G4int
Definition: G4Types.hh:78
Definition: inflate.h:41

Member Function Documentation

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

Reimplemented from G4VCrossSectionDataSet.

Definition at line 108 of file G4ChipsKaonPlusInelasticXS.cc.

109 {
110  outFile << "G4ChipsKaonPlusInelasticXS provides the inelastic cross\n"
111  << "section for K+ nucleus scattering as a function of incident\n"
112  << "momentum. The cross section is calculated using M. Kossov's\n"
113  << "CHIPS parameterization of cross section data.\n";
114 }
static const char* G4ChipsKaonPlusInelasticXS::Default_Name ( )
inlinestatic

Definition at line 56 of file G4ChipsKaonPlusInelasticXS.hh.

56 {return "ChipsKaonPlusInelasticXS";}

Here is the caller graph for this function:

G4double G4ChipsKaonPlusInelasticXS::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 137 of file G4ChipsKaonPlusInelasticXS.cc.

138 {
139 
140  G4bool in=false; // By default the isotope must be found in the AMDB
141  if(tgN!=lastN || tgZ!=lastZ) // The nucleus was not the last used isotope
142  {
143  in = false; // By default the isotope haven't be found in AMDB
144  lastP = 0.; // New momentum history (nothing to compare with)
145  lastN = tgN; // The last N of the calculated nucleus
146  lastZ = tgZ; // The last Z of the calculated nucleus
147  lastI = colN.size(); // Size of the Associative Memory DB in the heap
148  j = 0; // A#0f records found in DB for this projectile
149 
150  if(lastI) for(G4int i=0; i<lastI; i++) // AMDB exists, try to find the (Z,N) isotope
151  {
152  if(colN[i]==tgN && colZ[i]==tgZ) // Try the record "i" in the AMDB
153  {
154  lastI=i; // Remember the index for future fast/last use
155  lastTH =colTH[i]; // The last THreshold (A-dependent)
156 
157  if(pMom<=lastTH)
158  {
159  return 0.; // Energy is below the Threshold value
160  }
161  lastP =colP [i]; // Last Momentum (A-dependent)
162  lastCS =colCS[i]; // Last CrossSect (A-dependent)
163  in = true; // This is the case when the isotop is found in DB
164  // Momentum pMom is in IU ! @@ Units
165  lastCS=CalculateCrossSection(-1,j,321,lastZ,lastN,pMom); // read & update
166 
167  if(lastCS<=0. && pMom>lastTH) // Correct the threshold (@@ No intermediate Zeros)
168  {
169  lastCS=0.;
170  lastTH=pMom;
171  }
172  break; // Go out of the LOOP
173  }
174  j++; // Increment a#0f records found in DB
175  }
176  if(!in) // This isotope has not been calculated previously
177  {
179  lastCS=CalculateCrossSection(0,j,321,lastZ,lastN,pMom); //calculate & create
180 
181  //if(lastCS>0.) // It means that the AMBD was initialized
182  //{
183 
184  lastTH = 0; //ThresholdEnergy(tgZ, tgN); // The Threshold Energy which is now the last
185  colN.push_back(tgN);
186  colZ.push_back(tgZ);
187  colP.push_back(pMom);
188  colTH.push_back(lastTH);
189  colCS.push_back(lastCS);
190  //} // M.K. Presence of H1 with high threshold breaks the syncronization
191  return lastCS*millibarn;
192  } // End of creation of the new set of parameters
193  else
194  {
195  colP[lastI]=pMom;
196  colCS[lastI]=lastCS;
197  }
198  } // End of parameters udate
199  else if(pMom<=lastTH)
200  {
201  return 0.; // Momentum is below the Threshold Value -> CS=0
202  }
203  else // It is the last used -> use the current tables
204  {
205  lastCS=CalculateCrossSection(1,j,321,lastZ,lastN,pMom); // Only read and UpdateDB
206  lastP=pMom;
207  }
208  return lastCS*millibarn;
209 }
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 G4ChipsKaonPlusInelasticXS::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 126 of file G4ChipsKaonPlusInelasticXS.cc.

130 {
131  G4double pMom=Pt->GetTotalMomentum();
132  G4int tgN = A - tgZ;
133 
134  return GetChipsCrossSection(pMom, tgZ, tgN, 321);
135 }
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 G4ChipsKaonPlusInelasticXS::IsIsoApplicable ( const G4DynamicParticle Pt,
G4int  Z,
G4int  A,
const G4Element elm,
const G4Material mat 
)
virtual

Reimplemented from G4VCrossSectionDataSet.

Definition at line 116 of file G4ChipsKaonPlusInelasticXS.cc.

119 {
120  return true;
121 }

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