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
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00062
00063 #include <iomanip>
00064
00065 #include "G4GeneralSpaceNNCrossSection.hh"
00066 #include "G4SystemOfUnits.hh"
00067 #include "G4ProtonInelasticCrossSection.hh"
00068 #include "G4IonProtonCrossSection.hh"
00069 #include "G4TripathiLightCrossSection.hh"
00070 #include "G4TripathiCrossSection.hh"
00071 #include "G4IonsShenCrossSection.hh"
00072 #include "G4DynamicParticle.hh"
00073 #include "G4Element.hh"
00074 #include "G4ParticleDefinition.hh"
00075 #include "G4HadTmpUtil.hh"
00076 #include "G4Proton.hh"
00077
00078 G4GeneralSpaceNNCrossSection::G4GeneralSpaceNNCrossSection ()
00079 : G4VCrossSectionDataSet("General Space NN")
00080 {
00081 protonInelastic = new G4ProtonInelasticCrossSection();
00082 ionProton = new G4IonProtonCrossSection();
00083 TripathiGeneral = new G4TripathiCrossSection();
00084 TripathiLight = new G4TripathiLightCrossSection();
00085 Shen = new G4IonsShenCrossSection();
00086 theProton = G4Proton::Proton();
00087 }
00088
00089 G4GeneralSpaceNNCrossSection::~G4GeneralSpaceNNCrossSection ()
00090 {
00091 delete protonInelastic;
00092 delete ionProton;
00093 delete TripathiGeneral;
00094 delete TripathiLight;
00095 delete Shen;
00096 }
00097
00099
00100
00101 G4bool G4GeneralSpaceNNCrossSection::IsElementApplicable
00102 (const G4DynamicParticle* theProjectile, G4int, const G4Material*)
00103 {
00104 return (1 <= theProjectile->GetDefinition()->GetBaryonNumber());
00105 }
00106
00108
00109
00110 G4double G4GeneralSpaceNNCrossSection::GetElementCrossSection
00111 (const G4DynamicParticle* theProjectile, G4int ZT, const G4Material* mat)
00112 {
00113 G4double result = 0.0;
00114 G4int ZP = G4lrint(theProjectile->GetDefinition()->GetPDGCharge()/eplus);
00115
00116 if (verboseLevel >= 2)
00117 {
00118 G4int AP = theProjectile->GetDefinition()->GetBaryonNumber();
00119 G4cout <<"In G4GeneralSpaceNNCrossSection::GetCrossSection" <<G4endl;
00120 G4cout <<"Projectile A = " <<std::setw(8) <<AP
00121 <<" Z = " <<std::setw(8) <<ZP
00122 <<" Energy = " <<theProjectile->GetKineticEnergy()/AP
00123 <<" MeV/nuc" <<G4endl;
00124 G4cout <<"Target Z = " <<std::setw(8) <<ZT
00125 <<G4endl;
00126 }
00127 if (theProjectile->GetDefinition()==theProton)
00128 {
00129 if (ZT>5)
00130 {
00131 result = protonInelastic->
00132 GetElementCrossSection(theProjectile, ZT, mat);
00133 if (verboseLevel >= 2)
00134 G4cout <<"Selecting G4ProtonInelasticCrossSection" <<G4endl;
00135 }
00136 else
00137 {
00138 result = TripathiLight->
00139 GetElementCrossSection(theProjectile, ZT, mat);
00140 if (verboseLevel >= 2)
00141 G4cout <<"Selecting G4TripathiLightCrossSection" <<G4endl;
00142 }
00143 }
00144 else if (ZT==1)
00145 {
00146 if (ZP>5)
00147 {
00148 result = ionProton->
00149 GetElementCrossSection(theProjectile, ZT, mat);
00150 if (verboseLevel >= 2)
00151 G4cout <<"Selecting G4IonProtonCrossSection" <<G4endl;
00152 }
00153 else
00154 {
00155 result = TripathiLight->
00156 GetElementCrossSection(theProjectile, ZT, mat);
00157 if (verboseLevel >= 2)
00158 G4cout <<"Selecting G4TripathiLightCrossSection" <<G4endl;
00159 }
00160 }
00161 else
00162 {
00163 if (TripathiLight->IsElementApplicable(theProjectile, ZT, mat))
00164 {
00165 result = TripathiLight->
00166 GetElementCrossSection(theProjectile, ZT, mat);
00167 if (verboseLevel >= 2)
00168 G4cout <<"Selecting G4TripathiLightCrossSection" <<G4endl;
00169 }
00170 else if (TripathiGeneral->IsElementApplicable(theProjectile, ZT, mat))
00171 {
00172 result = TripathiGeneral->
00173 GetElementCrossSection(theProjectile, ZT, mat);
00174 if (verboseLevel >= 2)
00175 G4cout <<"Selecting G4TripathiCrossSection" <<G4endl;
00176 }
00177 else if (Shen->IsElementApplicable(theProjectile, ZT, mat))
00178 {
00179 result = Shen->
00180 GetElementCrossSection(theProjectile, ZT, mat);
00181 if (verboseLevel >= 2)
00182 G4cout <<"Selecting G4IonsShenCrossSection" <<G4endl;
00183 }
00184 }
00185 if (verboseLevel >= 2)
00186 {
00187 G4cout <<"Cross-section = " <<result/millibarn <<" mbarn" <<G4endl;
00188 G4cout <<G4endl;
00189 }
00190
00191 return result;
00192 }
00193