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 #include "G4QHadronInelasticDataSet.hh"
00037 #include <iostream>
00038
00040
00042
00043
00045
00046
00048
00049 G4QHadronInelasticDataSet::G4QHadronInelasticDataSet(const G4String& input_name)
00050 : G4VCrossSectionDataSet(input_name)
00051 {
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00073
00074
00075 Description();
00076 }
00077
00078 void G4QHadronInelasticDataSet::Description() const
00079 {
00080 char* dirName = getenv("G4PhysListDocDir");
00081 if (dirName) {
00082 std::ofstream outFile;
00083 G4String outFileName = GetName() + ".html";
00084 G4String pathName = G4String(dirName) + "/" + outFileName;
00085
00086 outFile.open(pathName);
00087 outFile << "<html>\n";
00088 outFile << "<head>\n";
00089
00090 outFile << "<title>Description of CHIPSInelasticXS</title>\n";
00091 outFile << "</head>\n";
00092 outFile << "<body>\n";
00093
00094 outFile << "CHIPSInelasticXS provides hadron-nuclear inelastic cross\n"
00095 << "sections for all hadrons at all energies. These cross\n"
00096 << "sections represent parameterizations developed by M. Kossov.\n";
00097
00098 outFile << "</body>\n";
00099 outFile << "</html>\n";
00100 outFile.close();
00101 }
00102 }
00103
00104 G4bool G4QHadronInelasticDataSet::IsIsoApplicable(const G4DynamicParticle* Pt, G4int,G4int,
00105 const G4Element*, const G4Material*)
00106 {
00107 G4ParticleDefinition* particle = Pt->GetDefinition();
00108 if (particle == G4Neutron::Neutron() ) return true;
00109 else if (particle == G4Proton::Proton() ) return true;
00110 else if (particle == G4PionMinus::PionMinus() ) return true;
00111 else if (particle == G4PionPlus::PionPlus() ) return true;
00112 else if (particle == G4KaonPlus::KaonPlus() ) return true;
00113 else if (particle == G4KaonMinus::KaonMinus() ) return true;
00114 else if (particle == G4KaonZeroLong::KaonZeroLong() ) return true;
00115 else if (particle == G4KaonZeroShort::KaonZeroShort() ) return true;
00116 else if (particle == G4Lambda::Lambda() ) return true;
00117 else if (particle == G4SigmaPlus::SigmaPlus() ) return true;
00118 else if (particle == G4SigmaMinus::SigmaMinus() ) return true;
00119 else if (particle == G4SigmaZero::SigmaZero() ) return true;
00120 else if (particle == G4XiMinus::XiMinus() ) return true;
00121 else if (particle == G4XiZero::XiZero() ) return true;
00122 else if (particle == G4OmegaMinus::OmegaMinus() ) return true;
00123 else if (particle == G4AntiNeutron::AntiNeutron() ) return true;
00124 else if (particle == G4AntiProton::AntiProton() ) return true;
00125 else if (particle == G4AntiLambda::AntiLambda() ) return true;
00126 else if (particle == G4AntiSigmaPlus::AntiSigmaPlus() ) return true;
00127 else if (particle == G4AntiSigmaMinus::AntiSigmaMinus() ) return true;
00128 else if (particle == G4AntiSigmaZero::AntiSigmaZero() ) return true;
00129 else if (particle == G4AntiXiMinus::AntiXiMinus() ) return true;
00130 else if (particle == G4AntiXiZero::AntiXiZero() ) return true;
00131 else if (particle == G4AntiOmegaMinus::AntiOmegaMinus() ) return true;
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145 return false;
00146 }
00147
00148
00149
00150
00151
00152
00153
00154
00155
00156
00157
00158
00159
00160
00161
00162
00163
00164
00165
00166
00167
00168
00169
00170
00171
00172
00173
00174
00175
00176
00177
00178
00179
00180
00181
00182
00183
00184
00185
00186
00187
00188
00189
00190
00191
00192
00193
00194
00195
00196
00197
00198
00199
00200
00201
00202
00203
00204
00205
00206
00207
00208
00209
00210
00211
00212
00213
00214
00215
00216 G4double G4QHadronInelasticDataSet::GetIsoCrossSection(const G4DynamicParticle* Pt,G4int Z,
00217 G4int A, const G4Isotope*,
00218 const G4Element*, const G4Material*)
00219 {
00220 G4ParticleDefinition* particle = Pt->GetDefinition();
00221 G4double Momentum=Pt->GetTotalMomentum();
00222 G4VQCrossSection* CSmanager=0;
00223
00224 G4int pPDG=0;
00225 if(particle == G4Neutron::Neutron())
00226 {
00227 CSmanager=G4QNeutronNuclearCrossSection::GetPointer();
00228 pPDG=2112;
00229 }
00230 else if(particle == G4Proton::Proton())
00231 {
00232 CSmanager=G4QProtonNuclearCrossSection::GetPointer();
00233 pPDG=2212;
00234 }
00235 else if(particle == G4PionMinus::PionMinus())
00236 {
00237 CSmanager=G4QPionMinusNuclearCrossSection::GetPointer();
00238 pPDG=-211;
00239 }
00240 else if(particle == G4PionPlus::PionPlus())
00241 {
00242 CSmanager=G4QPionPlusNuclearCrossSection::GetPointer();
00243 pPDG=211;
00244 }
00245 else if(particle == G4KaonMinus::KaonMinus())
00246 {
00247 CSmanager=G4QKaonMinusNuclearCrossSection::GetPointer();
00248 pPDG=-321;
00249 }
00250 else if(particle == G4KaonPlus::KaonPlus())
00251 {
00252 CSmanager=G4QKaonPlusNuclearCrossSection::GetPointer();
00253 pPDG=321;
00254 }
00255 else if(particle == G4KaonZeroLong::KaonZeroLong() ||
00256 particle == G4KaonZeroShort::KaonZeroShort() ||
00257 particle == G4KaonZero::KaonZero() ||
00258 particle == G4AntiKaonZero::AntiKaonZero() )
00259 {
00260 CSmanager=G4QKaonZeroNuclearCrossSection::GetPointer();
00261 if(G4UniformRand() > 0.5) pPDG= 311;
00262 else pPDG=-311;
00263 }
00264 else if(particle == G4Lambda::Lambda())
00265 {
00266 CSmanager=G4QHyperonNuclearCrossSection::GetPointer();
00267 pPDG=3122;
00268 }
00269 else if(particle == G4SigmaPlus::SigmaPlus())
00270 {
00271 CSmanager=G4QHyperonPlusNuclearCrossSection::GetPointer();
00272 pPDG=3222;
00273 }
00274 else if(particle == G4SigmaMinus::SigmaMinus())
00275 {
00276 CSmanager=G4QHyperonNuclearCrossSection::GetPointer();
00277 pPDG=3112;
00278 }
00279 else if(particle == G4SigmaZero::SigmaZero())
00280 {
00281 CSmanager=G4QHyperonNuclearCrossSection::GetPointer();
00282 pPDG=3212;
00283 }
00284 else if(particle == G4XiMinus::XiMinus())
00285 {
00286 CSmanager=G4QHyperonNuclearCrossSection::GetPointer();
00287 pPDG=3312;
00288 }
00289 else if(particle == G4XiZero::XiZero())
00290 {
00291 CSmanager=G4QHyperonNuclearCrossSection::GetPointer();
00292 pPDG=3322;
00293 }
00294 else if(particle == G4OmegaMinus::OmegaMinus())
00295 {
00296 CSmanager=G4QHyperonNuclearCrossSection::GetPointer();
00297 pPDG=3334;
00298 }
00299 else if(particle == G4AntiNeutron::AntiNeutron())
00300 {
00301 CSmanager=G4QAntiBaryonNuclearCrossSection::GetPointer();
00302 pPDG=-2112;
00303 }
00304 else if(particle == G4AntiProton::AntiProton())
00305 {
00306 CSmanager=G4QAntiBaryonNuclearCrossSection::GetPointer();
00307 pPDG=-2212;
00308 }
00309 else if(particle == G4AntiLambda::AntiLambda())
00310 {
00311 CSmanager=G4QAntiBaryonNuclearCrossSection::GetPointer();
00312 pPDG=-3122;
00313 }
00314 else if(particle == G4AntiSigmaPlus::AntiSigmaPlus())
00315 {
00316 CSmanager=G4QAntiBaryonNuclearCrossSection::GetPointer();
00317 pPDG=-3222;
00318 }
00319 else if(particle == G4AntiSigmaMinus::AntiSigmaMinus())
00320 {
00321 CSmanager=G4QAntiBaryonPlusNuclearCrossSection::GetPointer();
00322 pPDG=-3112;
00323 }
00324 else if(particle == G4AntiSigmaZero::AntiSigmaZero())
00325 {
00326 CSmanager=G4QAntiBaryonNuclearCrossSection::GetPointer();
00327 pPDG=-3212;
00328 }
00329 else if(particle == G4AntiXiMinus::AntiXiMinus())
00330 {
00331 CSmanager=G4QAntiBaryonPlusNuclearCrossSection::GetPointer();
00332 pPDG=-3312;
00333 }
00334 else if(particle == G4AntiXiZero::AntiXiZero())
00335 {
00336 CSmanager=G4QAntiBaryonNuclearCrossSection::GetPointer();
00337 pPDG=-3322;
00338 }
00339 else if(particle == G4AntiOmegaMinus::AntiOmegaMinus())
00340 {
00341 CSmanager=G4QAntiBaryonPlusNuclearCrossSection::GetPointer();
00342 pPDG=-3334;
00343 }
00344
00345
00346
00347
00348
00349
00350
00351
00352
00353
00354
00355
00356
00357
00358
00359
00360
00361
00362
00363
00364
00365
00366
00367
00368
00369
00370
00371
00372
00373
00374
00375
00376
00377
00378
00379
00380
00381
00382
00383
00384
00385
00386
00387
00388
00389
00390
00391 else
00392 {
00393 G4cerr << "-ERROR-G4QHadronInelasticDataSet::GetIsoZACrossSection: PDG="
00394 << particle->GetPDGEncoding() << " isn't supported by CHIPS" << G4endl;
00395
00396
00397 return 0;
00398 }
00399 G4int N=A-Z;
00400 G4double CSI=CSmanager->GetCrossSection(true, Momentum, Z, N, pPDG);
00401 return CSI;
00402 }