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 "G4ChipsKaonZeroInelasticXS.hh"
00042 #include "G4DynamicParticle.hh"
00043 #include "G4ParticleDefinition.hh"
00044 #include "G4KaonZero.hh"
00045 #include "G4KaonZeroLong.hh"
00046 #include "G4KaonZeroShort.hh"
00047 #include "G4AntiKaonZero.hh"
00048
00049
00050 #include "G4CrossSectionFactory.hh"
00051
00052 G4_DECLARE_XS_FACTORY(G4ChipsKaonZeroInelasticXS);
00053
00054
00055 G4double* G4ChipsKaonZeroInelasticXS::lastLEN=0;
00056 G4double* G4ChipsKaonZeroInelasticXS::lastHEN=0;
00057 G4int G4ChipsKaonZeroInelasticXS::lastN=0;
00058 G4int G4ChipsKaonZeroInelasticXS::lastZ=0;
00059 G4double G4ChipsKaonZeroInelasticXS::lastP=0.;
00060 G4double G4ChipsKaonZeroInelasticXS::lastTH=0.;
00061 G4double G4ChipsKaonZeroInelasticXS::lastCS=0.;
00062 G4int G4ChipsKaonZeroInelasticXS::lastI=0;
00063
00064
00065 G4ChipsKaonZeroInelasticXS::G4ChipsKaonZeroInelasticXS():G4VCrossSectionDataSet(Default_Name())
00066 {
00067 theKMinusCS = (G4ChipsKaonMinusInelasticXS*)G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4ChipsKaonMinusInelasticXS::Default_Name());;
00068 theKPlusCS = (G4ChipsKaonPlusInelasticXS*)G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4ChipsKaonPlusInelasticXS::Default_Name());
00069 }
00070
00071
00072 G4ChipsKaonZeroInelasticXS::~G4ChipsKaonZeroInelasticXS()
00073 {
00074 }
00075
00076 G4bool G4ChipsKaonZeroInelasticXS::IsIsoApplicable(const G4DynamicParticle* Pt, G4int, G4int,
00077 const G4Element*,
00078 const G4Material*)
00079 {
00080 G4ParticleDefinition* particle = Pt->GetDefinition();
00081
00082 if(particle == G4KaonZeroLong::KaonZeroLong() ||
00083 particle == G4KaonZeroShort::KaonZeroShort() ||
00084 particle == G4KaonZero::KaonZero() ||
00085 particle == G4AntiKaonZero::AntiKaonZero() )
00086 {
00087 return true;
00088 }
00089 return false;
00090 }
00091
00092
00093
00094
00095
00096
00097 G4double G4ChipsKaonZeroInelasticXS::GetIsoCrossSection(const G4DynamicParticle* Pt, G4int tgZ, G4int A,
00098 const G4Isotope*,
00099 const G4Element*,
00100 const G4Material*)
00101 {
00102 G4double pMom=Pt->GetTotalMomentum();
00103 G4int N = A - tgZ;
00104
00105 return GetChipsCrossSection(pMom, tgZ, N, 311);
00106 }
00107
00108 G4double G4ChipsKaonZeroInelasticXS::GetChipsCrossSection(G4double mom, G4int Z, G4int N, G4int pdg)
00109 {
00110 return (theKMinusCS->GetChipsCrossSection(mom,Z,N,pdg)
00111 +theKPlusCS->GetChipsCrossSection(mom,Z,N,pdg))/2;
00112 }