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 #include "G4CHIPSElastic.hh"
00042 #include "G4VQCrossSection.hh"
00043 #include "G4ParticleDefinition.hh"
00044 #include "G4QProtonElasticCrossSection.hh"
00045 #include "G4QNeutronElasticCrossSection.hh"
00046
00047 #include "G4QAntiBaryonElasticCrossSection.hh"
00048 #include "G4QPionPlusElasticCrossSection.hh"
00049 #include "G4QPionMinusElasticCrossSection.hh"
00050 #include "G4QKaonPlusElasticCrossSection.hh"
00051 #include "G4QKaonMinusElasticCrossSection.hh"
00052 #include <iostream>
00053
00054
00055 G4VQCrossSection* G4CHIPSElastic::pxsManager = 0;
00056 G4VQCrossSection* G4CHIPSElastic::nxsManager = 0;
00057
00058 G4VQCrossSection* G4CHIPSElastic::PBARxsManager = 0;
00059 G4VQCrossSection* G4CHIPSElastic::PIPxsManager = 0;
00060 G4VQCrossSection* G4CHIPSElastic::PIMxsManager = 0;
00061 G4VQCrossSection* G4CHIPSElastic::KPxsManager = 0;
00062 G4VQCrossSection* G4CHIPSElastic::KMxsManager = 0;
00063
00064 G4CHIPSElastic::G4CHIPSElastic() : G4HadronElastic("hElasticCHIPS")
00065 {
00066 if(!pxsManager)
00067 {
00068 pxsManager = G4QProtonElasticCrossSection::GetPointer();
00069 nxsManager = G4QNeutronElasticCrossSection::GetPointer();
00070
00071 PBARxsManager = G4QAntiBaryonElasticCrossSection::GetPointer();
00072 PIPxsManager = G4QPionPlusElasticCrossSection::GetPointer();
00073 PIMxsManager = G4QPionMinusElasticCrossSection::GetPointer();
00074 KPxsManager = G4QKaonPlusElasticCrossSection::GetPointer();
00075 KMxsManager = G4QKaonMinusElasticCrossSection::GetPointer();
00076 }
00077
00078 }
00079
00080 G4CHIPSElastic::~G4CHIPSElastic()
00081 {}
00082
00083 void G4CHIPSElastic::Description() const
00084 {
00085 char* dirName = getenv("G4PhysListDocDir");
00086 if (dirName) {
00087 std::ofstream outFile;
00088 G4String outFileName = GetModelName() + ".html";
00089 G4String pathName = G4String(dirName) + "/" + outFileName;
00090 outFile.open(pathName);
00091 outFile << "<html>\n";
00092 outFile << "<head>\n";
00093
00094 outFile << "<title>Description of G4CHIPSElastic</title>\n";
00095 outFile << "</head>\n";
00096 outFile << "<body>\n";
00097
00098 outFile << "The G4CHIPSElastic model performs hadron-nucleus elastic\n"
00099 << "scattering using the parameterized elastic cross sections\n"
00100 << "of M. Kossov\n";
00101
00102 outFile << "</body>\n";
00103 outFile << "</html>\n";
00104 outFile.close();
00105 }
00106 }
00107
00108
00109 G4double
00110 G4CHIPSElastic::SampleInvariantT(const G4ParticleDefinition* p,
00111 G4double plab, G4int Z, G4int A)
00112 {
00113 G4int N = A - Z;
00114 if(Z == 1 && N == 2) { N = 1; }
00115 else if(Z == 2 && N == 1) { N = 2; }
00116 G4int projPDG = p->GetPDGEncoding();
00117 G4double cs = 0.;
00118 if (projPDG==2212) { cs = pxsManager->GetCrossSection(false,plab,Z,N,projPDG); }
00119 else if(projPDG==2112) { cs = nxsManager->GetCrossSection(false,plab,Z,N,projPDG); }
00120 else if(projPDG==-2212){ cs = PBARxsManager->GetCrossSection(false,plab,Z,N,projPDG); }
00121 else if(projPDG== 211) { cs = PIPxsManager->GetCrossSection(false,plab,Z,N,projPDG); }
00122 else if(projPDG==-211) { cs = PIMxsManager->GetCrossSection(false,plab,Z,N,projPDG); }
00123 else if(projPDG== 321) { cs = KPxsManager->GetCrossSection(false,plab,Z,N,projPDG); }
00124 else if(projPDG==-321) { cs = KMxsManager->GetCrossSection(false,plab,Z,N,projPDG); }
00125
00126 G4double t = 0.0;
00127 if(cs > 0.0)
00128 {
00129 if (projPDG== 2212) { t = pxsManager->GetExchangeT(Z,N,projPDG); }
00130 else if(projPDG== 2112) { t = nxsManager->GetExchangeT(Z,N,projPDG); }
00131 else if(projPDG==-2212) { t = PBARxsManager->GetExchangeT(Z,N,projPDG); }
00132 else if(projPDG== 211) { t = PIPxsManager->GetExchangeT(Z,N,projPDG); }
00133 else if(projPDG== -211) { t = PIMxsManager->GetExchangeT(Z,N,projPDG); }
00134 else if(projPDG== 321) { t = KPxsManager->GetExchangeT(Z,N,projPDG); }
00135 else if(projPDG== -321) { t = KMxsManager->GetExchangeT(Z,N,projPDG); }
00136 }
00137 else { t = G4HadronElastic::SampleInvariantT(p, plab, Z, A); }
00138 return t;
00139 }
00140