G4ChipsKaonPlusInelasticXS Class Reference

#include <G4ChipsKaonPlusInelasticXS.hh>

Inheritance diagram for G4ChipsKaonPlusInelasticXS:

G4VCrossSectionDataSet

Public Member Functions

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


Constructor & Destructor Documentation

G4ChipsKaonPlusInelasticXS::G4ChipsKaonPlusInelasticXS (  ) 

Definition at line 55 of file G4ChipsKaonPlusInelasticXS.cc.

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

G4ChipsKaonPlusInelasticXS::~G4ChipsKaonPlusInelasticXS (  ) 

Definition at line 70 of file G4ChipsKaonPlusInelasticXS.cc.

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


Member Function Documentation

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

Definition at line 57 of file G4ChipsKaonPlusInelasticXS.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().

00057 {return "ChipsKaonPlusInelasticXS";}

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

Definition at line 105 of file G4ChipsKaonPlusInelasticXS.cc.

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

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

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

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

00098 {
00099   G4double pMom=Pt->GetTotalMomentum();
00100   G4int tgN = A - tgZ;
00101   
00102   return GetChipsCrossSection(pMom, tgZ, tgN, 321);
00103 }

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

Reimplemented from G4VCrossSectionDataSet.

Definition at line 82 of file G4ChipsKaonPlusInelasticXS.cc.

References G4DynamicParticle::GetDefinition(), and G4KaonPlus::KaonPlus().

00085 {
00086   G4ParticleDefinition* particle = Pt->GetDefinition();
00087   if (particle ==       G4KaonPlus::KaonPlus()      ) return true;
00088   return false;
00089 }


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