#include <G4ChipsHyperonInelasticXS.hh>
Inheritance diagram for G4ChipsHyperonInelasticXS:
Public Member Functions | |
G4ChipsHyperonInelasticXS () | |
~G4ChipsHyperonInelasticXS () | |
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 () |
Definition at line 49 of file G4ChipsHyperonInelasticXS.hh.
G4ChipsHyperonInelasticXS::G4ChipsHyperonInelasticXS | ( | ) |
Definition at line 53 of file G4ChipsHyperonInelasticXS.cc.
00053 :G4VCrossSectionDataSet(Default_Name()) 00054 { 00055 // Initialization of the 00056 lastLEN=0; // Pointer to the lastArray of LowEn CS 00057 lastHEN=0; // Pointer to the lastArray of HighEn CS 00058 lastN=0; // The last N of calculated nucleus 00059 lastZ=0; // The last Z of calculated nucleus 00060 lastP=0.; // Last used in cross section Momentum 00061 lastTH=0.; // Last threshold momentum 00062 lastCS=0.; // Last value of the Cross Section 00063 lastI=0; // The last position in the DAMDB 00064 LEN = new std::vector<G4double*>; 00065 HEN = new std::vector<G4double*>; 00066 }
G4ChipsHyperonInelasticXS::~G4ChipsHyperonInelasticXS | ( | ) |
static const char* G4ChipsHyperonInelasticXS::Default_Name | ( | ) | [inline, static] |
Definition at line 58 of file G4ChipsHyperonInelasticXS.hh.
Referenced by G4MiscBuilder::Build(), HadronPhysicsQGSP_FTFP_BERT_95::ConstructProcess(), G4HadronInelasticQBBC::ConstructProcess(), G4ChipsComponentXS::G4ChipsComponentXS(), and G4HyperonFTFPBuilder::G4HyperonFTFPBuilder().
G4double G4ChipsHyperonInelasticXS::GetChipsCrossSection | ( | G4double | momentum, | |
G4int | Z, | |||
G4int | N, | |||
G4int | pdg | |||
) | [virtual] |
Definition at line 129 of file G4ChipsHyperonInelasticXS.cc.
Referenced by GetIsoCrossSection().
00130 { 00131 static G4int j; // A#0f Z/N-records already tested in AMDB 00132 static std::vector <G4int> colN; // Vector of N for calculated nuclei (isotops) 00133 static std::vector <G4int> colZ; // Vector of Z for calculated nuclei (isotops) 00134 static std::vector <G4double> colP; // Vector of last momenta for the reaction 00135 static std::vector <G4double> colTH; // Vector of energy thresholds for the reaction 00136 static std::vector <G4double> colCS; // Vector of last cross sections for the reaction 00137 // ***---*** End of the mandatory Static Definitions of the Associative Memory ***---*** 00138 00139 G4bool in=false; // By default the isotope must be found in the AMDB 00140 if(tgN!=lastN || tgZ!=lastZ) // The nucleus was not the last used isotope 00141 { 00142 in = false; // By default the isotope haven't be found in AMDB 00143 lastP = 0.; // New momentum history (nothing to compare with) 00144 lastN = tgN; // The last N of the calculated nucleus 00145 lastZ = tgZ; // The last Z of the calculated nucleus 00146 lastI = colN.size(); // Size of the Associative Memory DB in the heap 00147 j = 0; // A#0f records found in DB for this projectile 00148 00149 if(lastI) for(G4int i=0; i<lastI; i++) // AMDB exists, try to find the (Z,N) isotope 00150 { 00151 if(colN[i]==tgN && colZ[i]==tgZ) // Try the record "i" in the AMDB 00152 { 00153 lastI=i; // Remember the index for future fast/last use 00154 lastTH =colTH[i]; // The last THreshold (A-dependent) 00155 00156 if(pMom<=lastTH) 00157 { 00158 return 0.; // Energy is below the Threshold value 00159 } 00160 lastP =colP [i]; // Last Momentum (A-dependent) 00161 lastCS =colCS[i]; // Last CrossSect (A-dependent) 00162 in = true; // This is the case when the isotop is found in DB 00163 // Momentum pMom is in IU ! @@ Units 00164 lastCS=CalculateCrossSection(-1,j,PDG,lastZ,lastN,pMom); // read & update 00165 00166 if(lastCS<=0. && pMom>lastTH) // Correct the threshold (@@ No intermediate Zeros) 00167 { 00168 lastCS=0.; 00169 lastTH=pMom; 00170 } 00171 break; // Go out of the LOOP 00172 } 00173 j++; // Increment a#0f records found in DB 00174 } 00175 if(!in) // This isotope has not been calculated previously 00176 { 00178 lastCS=CalculateCrossSection(0,j,PDG,lastZ,lastN,pMom); //calculate & create 00179 //if(lastCS>0.) // It means that the AMBD was initialized 00180 //{ 00181 00182 lastTH = 0; //ThresholdEnergy(tgZ, tgN); // The Threshold Energy which is now the last 00183 colN.push_back(tgN); 00184 colZ.push_back(tgZ); 00185 colP.push_back(pMom); 00186 colTH.push_back(lastTH); 00187 colCS.push_back(lastCS); 00188 //} // M.K. Presence of H1 with high threshold breaks the syncronization 00189 return lastCS*millibarn; 00190 } // End of creation of the new set of parameters 00191 else 00192 { 00193 colP[lastI]=pMom; 00194 colCS[lastI]=lastCS; 00195 } 00196 } // End of parameters udate 00197 else if(pMom<=lastTH) 00198 { 00199 return 0.; // Momentum is below the Threshold Value -> CS=0 00200 } 00201 else // It is the last used -> use the current tables 00202 { 00203 lastCS=CalculateCrossSection(1,j,PDG,lastZ,lastN,pMom); // Only read and UpdateDB 00204 lastP=pMom; 00205 } 00206 return lastCS*millibarn; 00207 }
G4double G4ChipsHyperonInelasticXS::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 117 of file G4ChipsHyperonInelasticXS.cc.
References GetChipsCrossSection(), G4DynamicParticle::GetDefinition(), G4ParticleDefinition::GetPDGEncoding(), and G4DynamicParticle::GetTotalMomentum().
00121 { 00122 G4double pMom=Pt->GetTotalMomentum(); 00123 G4int tgN = A - tgZ; 00124 G4int pdg = Pt->GetDefinition()->GetPDGEncoding(); 00125 00126 return GetChipsCrossSection(pMom, tgZ, tgN, pdg); 00127 }
G4bool G4ChipsHyperonInelasticXS::IsIsoApplicable | ( | const G4DynamicParticle * | Pt, | |
G4int | Z, | |||
G4int | A, | |||
const G4Element * | elm, | |||
const G4Material * | mat | |||
) | [virtual] |
Reimplemented from G4VCrossSectionDataSet.
Definition at line 79 of file G4ChipsHyperonInelasticXS.cc.
References G4DynamicParticle::GetDefinition(), G4Lambda::Lambda(), G4OmegaMinus::OmegaMinus(), G4SigmaMinus::SigmaMinus(), G4SigmaPlus::SigmaPlus(), G4SigmaZero::SigmaZero(), G4XiMinus::XiMinus(), and G4XiZero::XiZero().
00082 { 00083 G4ParticleDefinition* particle = Pt->GetDefinition(); 00084 if (particle == G4Lambda::Lambda()) 00085 { 00086 return true; 00087 } 00088 else if(particle == G4SigmaPlus::SigmaPlus()) 00089 { 00090 return true; 00091 } 00092 else if(particle == G4SigmaMinus::SigmaMinus()) 00093 { 00094 return true; 00095 } 00096 else if(particle == G4SigmaZero::SigmaZero()) 00097 { 00098 return true; 00099 } 00100 else if(particle == G4XiMinus::XiMinus()) 00101 { 00102 return true; 00103 } 00104 else if(particle == G4XiZero::XiZero()) 00105 { 00106 return true; 00107 } 00108 else if(particle == G4OmegaMinus::OmegaMinus()) 00109 { 00110 return true; 00111 } 00112 return false; 00113 }