00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042 #include "G4CHIPSElasticXS.hh"
00043 #include "G4HadronicException.hh"
00044 #include "G4DynamicParticle.hh"
00045 #include "G4ParticleDefinition.hh"
00046 #include "G4Element.hh"
00047 #include "G4Proton.hh"
00048 #include "G4Neutron.hh"
00049 #include "G4VQCrossSection.hh"
00050 #include "G4QProtonElasticCrossSection.hh"
00051 #include "G4QNeutronElasticCrossSection.hh"
00052
00053 #include "G4QAntiBaryonElasticCrossSection.hh"
00054 #include "G4QPionMinusElasticCrossSection.hh"
00055 #include "G4QPionPlusElasticCrossSection.hh"
00056 #include "G4QKaonMinusElasticCrossSection.hh"
00057 #include "G4QKaonPlusElasticCrossSection.hh"
00058
00059 G4CHIPSElasticXS::G4CHIPSElasticXS()
00060 : G4VCrossSectionDataSet("CHIPSElasticXS"),
00061 theProton(G4Proton::Proton()),
00062 theNeutron(G4Neutron::Neutron()),
00063 thEnergy(19*CLHEP::MeV),
00064 isInitialized(false)
00065 {
00066
00067 pCManager = G4QProtonElasticCrossSection::GetPointer();
00068 nCManager = G4QNeutronElasticCrossSection::GetPointer();
00069
00070 PBARxsManager = G4QAntiBaryonElasticCrossSection::GetPointer();
00071 PIPxsManager = G4QPionPlusElasticCrossSection::GetPointer();
00072 PIMxsManager = G4QPionMinusElasticCrossSection::GetPointer();
00073 KPxsManager = G4QKaonPlusElasticCrossSection::GetPointer();
00074 KMxsManager = G4QKaonMinusElasticCrossSection::GetPointer();
00075
00076 theParticle = 0;
00077 }
00078
00079 G4CHIPSElasticXS::~G4CHIPSElasticXS()
00080 {}
00081
00082
00083 void G4CHIPSElasticXS::Description() const
00084 {
00085 char* dirName = getenv("G4PhysListDocDir");
00086 if (dirName) {
00087 std::ofstream outFile;
00088 G4String outFileName = GetName() + ".html";
00089 G4String pathName = G4String(dirName) + "/" + outFileName;
00090
00091 outFile.open(pathName);
00092 outFile << "<html>\n";
00093 outFile << "<head>\n";
00094
00095 outFile << "<title>Description of CHIPS Elastic Cross Section</title>\n";
00096 outFile << "</head>\n";
00097 outFile << "<body>\n";
00098
00099 outFile << "G4CHIPSElasticXS provides hadron-nuclear elastic scattering\n"
00100 << "cross sections for protons and neutrons with incident energies\n"
00101 << "between 19 MeV and X GeV. These cross sections represent\n"
00102 << "parameterizations developed by M. Kossov. (more detail)\n";
00103
00104 outFile << "</body>\n";
00105 outFile << "</html>\n";
00106 outFile.close();
00107 }
00108 }
00109
00110 G4bool
00111 G4CHIPSElasticXS::IsIsoApplicable(const G4DynamicParticle* dyn,
00112 G4int Z, G4int ,
00113 const G4Element*, const G4Material*)
00114 {
00115 return (Z <= 2 && dyn->GetKineticEnergy() > thEnergy);
00116 }
00117
00118 G4double
00119 G4CHIPSElasticXS::GetIsoCrossSection(const G4DynamicParticle* dyn,
00120 G4int Z, G4int A,
00121 const G4Isotope*, const G4Element*,
00122 const G4Material*)
00123 {
00124 G4int N = A - Z;
00125 if(Z == 1) {
00126 if(N > 1) { N = 1; }
00127 } else if(Z == 2) { N = 2; }
00128
00129 G4double momentum = dyn->GetTotalMomentum();
00130 G4int uPDGcode = dyn->GetPDGcode();
00131 G4VQCrossSection* CHIPSmanager = 0;
00132 G4double cross = 0.0;
00133
00134 switch(uPDGcode) {
00135 case 2212:
00136 CHIPSmanager=pCManager;
00137 break;
00138 case 2112:
00139 CHIPSmanager=nCManager;
00140 break;
00141 case -2212:
00142 CHIPSmanager=PBARxsManager;
00143 break;
00144 case -2112:
00145 CHIPSmanager=PBARxsManager;
00146 break;
00147 case 211:
00148 CHIPSmanager=PIPxsManager;
00149 break;
00150 case -211:
00151 CHIPSmanager=PIMxsManager;
00152 break;
00153 case 321:
00154 CHIPSmanager=KPxsManager;
00155 break;
00156 case -321:
00157 CHIPSmanager=KMxsManager;
00158 break;
00159 case 130:
00160 break;
00161 case 310:
00162 break;
00163 case 311:
00164 break;
00165 case -311:
00166 break;
00167 default:
00168 throw G4HadronicException(__FILE__, __LINE__,
00169 "G4CHIPSElasticXS: not applicable for a particle");
00170 return cross;
00171 }
00172 if(CHIPSmanager) {
00173 cross = CHIPSmanager->GetCrossSection(false,momentum,Z,N,uPDGcode);
00174 } else {
00175 cross = 0.5*(KPxsManager->GetCrossSection(false,momentum,Z,N,uPDGcode) +
00176 KMxsManager->GetCrossSection(false,momentum,Z,N,uPDGcode));
00177 }
00178 return cross;
00179 }