G4ChipsKaonMinusInelasticXS Class Reference

#include <G4ChipsKaonMinusInelasticXS.hh>

Inheritance diagram for G4ChipsKaonMinusInelasticXS:

G4VCrossSectionDataSet

Public Member Functions

 G4ChipsKaonMinusInelasticXS ()
 ~G4ChipsKaonMinusInelasticXS ()
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)

Static Public Member Functions

static const char * Default_Name ()

Detailed Description

Definition at line 47 of file G4ChipsKaonMinusInelasticXS.hh.


Constructor & Destructor Documentation

G4ChipsKaonMinusInelasticXS::G4ChipsKaonMinusInelasticXS (  ) 

Definition at line 53 of file G4ChipsKaonMinusInelasticXS.cc.

00053                                                         :G4VCrossSectionDataSet(Default_Name())
00054 {
00055   lastLEN=0; // Pointer to lastArray of LowEn CS
00056   lastHEN=0; // Pointer to lastArray of HighEn CS
00057   lastN=0;   // The last N of calculated nucleus
00058   lastZ=0;   // The last Z of calculated nucleus
00059   lastP=0.;  // Last used in CrossSection Momentum
00060   lastTH=0.; // Last threshold momentum
00061   lastCS=0.; // Last value of the Cross Section
00062   lastI=0;   // The last position in the DAMDB
00063   LEN = new std::vector<G4double*>;
00064   HEN = new std::vector<G4double*>;
00065 }

G4ChipsKaonMinusInelasticXS::~G4ChipsKaonMinusInelasticXS (  ) 

Definition at line 67 of file G4ChipsKaonMinusInelasticXS.cc.

00068 {  
00069   G4int lens=LEN->size();
00070   for(G4int i=0; i<lens; ++i) delete[] (*LEN)[i];
00071   delete LEN;
00072  
00073   G4int hens=HEN->size();
00074   for(G4int i=0; i<hens; ++i) delete[] (*HEN)[i];
00075   delete HEN; 
00076 }


Member Function Documentation

static const char* G4ChipsKaonMinusInelasticXS::Default_Name (  )  [inline, static]

Definition at line 56 of file G4ChipsKaonMinusInelasticXS.hh.

Referenced by G4QGSPPiKBuilder::Build(), G4QGSBinaryPiKBuilder::Build(), G4FTFBinaryKaonBuilder::Build(), HadronPhysicsShielding::ConstructProcess(), HadronPhysicsQGSP_FTFP_BERT_95::ConstructProcess(), HadronPhysicsFTFP_BERT_TRV::ConstructProcess(), HadronPhysicsFTFP_BERT_HP::ConstructProcess(), HadronPhysicsFTFP_BERT::ConstructProcess(), G4HadronInelasticQBBC::ConstructProcess(), G4ChipsComponentXS::G4ChipsComponentXS(), and G4ChipsKaonZeroInelasticXS::G4ChipsKaonZeroInelasticXS().

00056 {return "ChipsKaonMinusInelasticXS";}

G4double G4ChipsKaonMinusInelasticXS::GetChipsCrossSection ( G4double  momentum,
G4int  Z,
G4int  N,
G4int  pdg 
) [virtual]

Definition at line 101 of file G4ChipsKaonMinusInelasticXS.cc.

Referenced by G4ChipsKaonZeroInelasticXS::GetChipsCrossSection(), and GetIsoCrossSection().

00102 {
00103   static G4int j;                      // A#0f Z/N-records already tested in AMDB
00104   static std::vector <G4int>    colN;  // Vector of N for calculated nuclei (isotops)
00105   static std::vector <G4int>    colZ;  // Vector of Z for calculated nuclei (isotops)
00106   static std::vector <G4double> colP;  // Vector of last momenta for the reaction
00107   static std::vector <G4double> colTH; // Vector of energy thresholds for the reaction
00108   static std::vector <G4double> colCS; // Vector of last cross sections for the reaction
00109   // ***---*** End of the mandatory Static Definitions of the Associative Memory ***---***
00110 
00111   G4bool in=false;                     // By default the isotope must be found in the AMDB
00112   if(tgN!=lastN || tgZ!=lastZ)         // The nucleus was not the last used isotope
00113   {
00114     in = false;                        // By default the isotope haven't be found in AMDB  
00115     lastP   = 0.;                      // New momentum history (nothing to compare with)
00116     lastN   = tgN;                     // The last N of the calculated nucleus
00117     lastZ   = tgZ;                     // The last Z of the calculated nucleus
00118     lastI   = colN.size();             // Size of the Associative Memory DB in the heap
00119     j  = 0;                            // A#0f records found in DB for this projectile
00120     if(lastI) for(G4int i=0; i<lastI; i++) // AMDB exists, try to find the (Z,N) isotope
00121     {
00122       if(colN[i]==tgN && colZ[i]==tgZ) // Try the record "i" in the AMDB
00123       {
00124         lastI=i;                       // Remember the index for future fast/last use
00125         lastTH =colTH[i];              // The last THreshold (A-dependent)
00126         if(pMom<=lastTH)
00127         {
00128           return 0.;                   // Energy is below the Threshold value
00129         }
00130         lastP  =colP [i];              // Last Momentum  (A-dependent)
00131         lastCS =colCS[i];              // Last CrossSect (A-dependent)
00132         in = true;                     // This is the case when the isotop is found in DB
00133         // Momentum pMom is in IU ! @@ Units
00134         lastCS=CalculateCrossSection(-1,j,-321,lastZ,lastN,pMom); // read & update
00135         if(lastCS<=0. && pMom>lastTH)  // Correct the threshold (@@ No intermediate Zeros)
00136         {
00137           lastCS=0.;
00138           lastTH=pMom;
00139         }
00140         break;                         // Go out of the LOOP
00141       }
00142       j++;                             // Increment a#0f records found in DB
00143     }
00144     if(!in)                            // This isotope has not been calculated previously
00145     {
00147       lastCS=CalculateCrossSection(0,j,-321,lastZ,lastN,pMom); //calculate & create
00148       //if(lastCS>0.)                   // It means that the AMBD was initialized
00149       //{
00150 
00151       //        lastTH = ThresholdEnergy(tgZ, tgN); // The Threshold Energy which is now the last
00152 
00153       lastTH = 0; // WP - to be checked!!!
00154         colN.push_back(tgN);
00155         colZ.push_back(tgZ);
00156         colP.push_back(pMom);
00157         colTH.push_back(lastTH);
00158         colCS.push_back(lastCS);
00159       //} // M.K. Presence of H1 with high threshold breaks the syncronization
00160       return lastCS*millibarn;
00161     } // End of creation of the new set of parameters
00162     else
00163     {
00164       colP[lastI]=pMom;
00165       colCS[lastI]=lastCS;
00166     }
00167   } // End of parameters udate
00168   else if(pMom<=lastTH)
00169   {
00170     return 0.;                         // Momentum is below the Threshold Value -> CS=0
00171   }
00172   else                                 // It is the last used -> use the current tables
00173   {
00174     lastCS=CalculateCrossSection(1,j,-321,lastZ,lastN,pMom); // Only read and UpdateDB
00175     lastP=pMom;
00176   }
00177   return lastCS*millibarn;
00178 }

G4double G4ChipsKaonMinusInelasticXS::GetIsoCrossSection ( const G4DynamicParticle ,
G4int  tgZ,
G4int  A,
const G4Isotope iso = 0,
const G4Element elm = 0,
const G4Material mat = 0 
) [virtual]

Reimplemented from G4VCrossSectionDataSet.

Definition at line 90 of file G4ChipsKaonMinusInelasticXS.cc.

References GetChipsCrossSection(), and G4DynamicParticle::GetTotalMomentum().

00094 {
00095   G4double pMom=Pt->GetTotalMomentum();
00096   G4int tgN = A - tgZ;
00097   
00098   return GetChipsCrossSection(pMom, tgZ, tgN, -321);
00099 }

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

Reimplemented from G4VCrossSectionDataSet.

Definition at line 78 of file G4ChipsKaonMinusInelasticXS.cc.

References G4DynamicParticle::GetDefinition(), and G4KaonMinus::KaonMinus().

00081 {
00082   G4ParticleDefinition* particle = Pt->GetDefinition();
00083   if (particle ==       G4KaonMinus::KaonMinus()      ) return true;
00084   return false;
00085 }


The documentation for this class was generated from the following files:
Generated on Mon May 27 17:51:37 2013 for Geant4 by  doxygen 1.4.7