Changeset 962 for trunk/source/processes/hadronic/cross_sections/include
- Timestamp:
- Apr 6, 2009, 12:30:29 PM (15 years ago)
- Location:
- trunk/source/processes/hadronic/cross_sections/include
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/processes/hadronic/cross_sections/include/G4BGGNucleonElasticXS.hh
r819 r962 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4BGGNucleonElasticXS.hh,v 1. 1 2007/03/13 15:19:30vnivanch Exp $27 // GEANT4 tag $Name: $26 // $Id: G4BGGNucleonElasticXS.hh,v 1.2 2008/12/01 16:50:23 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 60 60 class G4GlauberGribovCrossSection; 61 61 class G4NucleonNuclearCrossSection; 62 class G4HadronNucleonXsc; 62 63 63 64 class G4BGGNucleonElasticXS : public G4VCrossSectionDataSet … … 93 94 void Initialise(); 94 95 95 G4double thEnergy; // threshold of Glauber model 96 G4double theFac[93]; 96 G4double CoulombFactor(G4double kinEnergy, G4double A); 97 98 G4double fGlauberEnergy; 99 G4double fLowEnergy; 100 G4double theGlauberFac[93]; 101 G4double theCoulombFac[93]; 97 102 98 103 const G4ParticleDefinition* particle; 99 104 G4GlauberGribovCrossSection* fGlauber; 100 105 G4NucleonNuclearCrossSection* fNucleon; 106 G4HadronNucleonXsc* fHadron; 107 G4bool isProton; 108 G4bool isInitialized; 101 109 }; 102 110 … … 104 112 105 113 inline 106 G4bool G4BGGNucleonElasticXS::IsApplicable(const G4DynamicParticle* dp,107 const G4Element* elm)114 G4bool G4BGGNucleonElasticXS::IsApplicable(const G4DynamicParticle*, 115 const G4Element*) 108 116 { 109 return IsZAApplicable(dp, elm->GetZ(), elm->GetN()); 117 return true; 118 // return IsZAApplicable(dp, elm->GetZ(), elm->GetN()); 110 119 } 111 120 … … 113 122 114 123 inline 115 G4bool G4BGGNucleonElasticXS::IsZAApplicable(const G4DynamicParticle* dp,116 G4double Z, G4double/* A*/)124 G4bool G4BGGNucleonElasticXS::IsZAApplicable(const G4DynamicParticle*, 125 G4double /*Z*/, G4double/* A*/) 117 126 { 118 return (dp->GetDefinition() == particle && Z > 1.5); 127 return true; 128 // return (dp->GetDefinition() == particle); 119 129 } 120 130 -
trunk/source/processes/hadronic/cross_sections/include/G4BGGNucleonInelasticXS.hh
r819 r962 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4BGGNucleonInelasticXS.hh,v 1. 1 2007/03/13 15:19:30vnivanch Exp $27 // GEANT4 tag $Name: $26 // $Id: G4BGGNucleonInelasticXS.hh,v 1.2 2008/12/01 16:50:23 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 60 60 class G4GlauberGribovCrossSection; 61 61 class G4NucleonNuclearCrossSection; 62 class G4HadronNucleonXsc; 62 63 63 64 class G4BGGNucleonInelasticXS : public G4VCrossSectionDataSet … … 93 94 void Initialise(); 94 95 95 G4double thEnergy; // threshold of Glauber model 96 G4double theFac[93]; 96 G4double CoulombFactor(G4double kinEnergy, G4double A); 97 98 G4double fGlauberEnergy; 99 G4double fLowEnergy; 100 G4double theGlauberFac[93]; 101 G4double theCoulombFac[93]; 97 102 98 103 const G4ParticleDefinition* particle; 99 104 G4GlauberGribovCrossSection* fGlauber; 100 105 G4NucleonNuclearCrossSection* fNucleon; 106 G4HadronNucleonXsc* fHadron; 107 G4bool isProton; 108 G4bool isInitialized; 101 109 }; 102 110 … … 104 112 105 113 inline 106 G4bool G4BGGNucleonInelasticXS::IsApplicable(const G4DynamicParticle* dp,107 const G4Element* elm)114 G4bool G4BGGNucleonInelasticXS::IsApplicable(const G4DynamicParticle*, 115 const G4Element*) 108 116 { 109 return IsZAApplicable(dp, elm->GetZ(), elm->GetN()); 117 return true; 118 // return IsZAApplicable(dp, elm->GetZ(), elm->GetN()); 110 119 } 111 120 … … 113 122 114 123 inline 115 G4bool G4BGGNucleonInelasticXS::IsZAApplicable(const G4DynamicParticle* dp,116 G4double Z, G4double/* A*/)124 G4bool G4BGGNucleonInelasticXS::IsZAApplicable(const G4DynamicParticle*, 125 G4double /*Z*/, G4double/* A*/) 117 126 { 118 return (dp->GetDefinition() == particle && Z > 1.5); 127 return true; 128 // return (dp->GetDefinition() == particle); 119 129 } 120 130 -
trunk/source/processes/hadronic/cross_sections/include/G4BGGPionElasticXS.hh
r819 r962 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4BGGPionElasticXS.hh,v 1. 1 2007/03/13 15:19:30vnivanch Exp $27 // GEANT4 tag $Name: $26 // $Id: G4BGGPionElasticXS.hh,v 1.2 2008/12/01 16:50:23 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 60 60 class G4GlauberGribovCrossSection; 61 61 class G4UPiNuclearCrossSection; 62 class G4HadronNucleonXsc; 62 63 63 64 class G4BGGPionElasticXS : public G4VCrossSectionDataSet … … 93 94 void Initialise(); 94 95 95 G4double thEnergy; // threshold of Glauber model 96 G4double theFac[93]; 96 G4double CoulombFactor(G4double kinEnergy, G4double A); 97 98 G4double fGlauberEnergy; 99 G4double fLowEnergy; 100 G4double theGlauberFac[93]; 101 G4double theCoulombFac[93]; 97 102 98 103 const G4ParticleDefinition* particle; 99 104 G4GlauberGribovCrossSection* fGlauber; 100 105 G4UPiNuclearCrossSection* fPion; 106 G4HadronNucleonXsc* fHadron; 107 G4bool isPiplus; 108 G4bool isInitialized; 101 109 }; 102 110 … … 104 112 105 113 inline 106 G4bool G4BGGPionElasticXS::IsApplicable(const G4DynamicParticle* dp,107 const G4Element* elm)114 G4bool G4BGGPionElasticXS::IsApplicable(const G4DynamicParticle*, 115 const G4Element*) 108 116 { 109 return IsZAApplicable(dp, elm->GetZ(), elm->GetN()); 117 return true; 118 //return IsZAApplicable(dp, elm->GetZ(), elm->GetN()); 110 119 } 111 120 … … 113 122 114 123 inline 115 G4bool G4BGGPionElasticXS::IsZAApplicable(const G4DynamicParticle* dp,116 G4double Z, G4double/* A*/)124 G4bool G4BGGPionElasticXS::IsZAApplicable(const G4DynamicParticle*, 125 G4double /*Z*/, G4double/* A*/) 117 126 { 118 return (dp->GetDefinition() == particle && Z > 1.5); 127 return true; 128 // return (dp->GetDefinition() == particle); 119 129 } 120 130 -
trunk/source/processes/hadronic/cross_sections/include/G4BGGPionInelasticXS.hh
r819 r962 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4BGGPionInelasticXS.hh,v 1. 1 2007/03/13 15:19:30vnivanch Exp $27 // GEANT4 tag $Name: $26 // $Id: G4BGGPionInelasticXS.hh,v 1.2 2008/12/01 16:50:23 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 60 60 class G4GlauberGribovCrossSection; 61 61 class G4UPiNuclearCrossSection; 62 class G4HadronNucleonXsc; 62 63 63 64 class G4BGGPionInelasticXS : public G4VCrossSectionDataSet … … 93 94 void Initialise(); 94 95 95 G4double thEnergy; // threshold of Glauber model 96 G4double theFac[93]; 96 G4double CoulombFactor(G4double kinEnergy, G4double A); 97 98 G4double fGlauberEnergy; 99 G4double fLowEnergy; 100 G4double theGlauberFac[93]; 101 G4double theCoulombFac[93]; 97 102 98 103 const G4ParticleDefinition* particle; 99 104 G4GlauberGribovCrossSection* fGlauber; 100 105 G4UPiNuclearCrossSection* fPion; 106 G4HadronNucleonXsc* fHadron; 107 G4bool isPiplus; 108 G4bool isInitialized; 101 109 }; 102 110 … … 104 112 105 113 inline 106 G4bool G4BGGPionInelasticXS::IsApplicable(const G4DynamicParticle* dp,107 const G4Element* elm)114 G4bool G4BGGPionInelasticXS::IsApplicable(const G4DynamicParticle*, 115 const G4Element*) 108 116 { 109 return IsZAApplicable(dp, elm->GetZ(), elm->GetN()); 117 return true; 118 // return IsZAApplicable(dp, elm->GetZ(), elm->GetN()); 110 119 } 111 120 … … 113 122 114 123 inline 115 G4bool G4BGGPionInelasticXS::IsZAApplicable(const G4DynamicParticle* dp,116 G4double Z, G4double/* A*/)124 G4bool G4BGGPionInelasticXS::IsZAApplicable(const G4DynamicParticle*, 125 G4double /*Z*/, G4double/* A*/) 117 126 { 118 return (dp->GetDefinition() == particle && Z > 1.5); 127 return true; 128 // return (dp->GetDefinition() == particle); 119 129 } 120 130 … … 123 133 inline 124 134 G4double G4BGGPionInelasticXS::GetCrossSection(const G4DynamicParticle* dp, 125 const G4Element* elm,126 G4double temp)135 const G4Element* elm, 136 G4double temp) 127 137 { 128 138 return GetIsoZACrossSection(dp, elm->GetZ(), elm->GetN(), temp); -
trunk/source/processes/hadronic/cross_sections/include/G4CrossSectionDataStore.hh
r819 r962 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4CrossSectionDataStore.hh,v 1.14 2009/01/24 11:54:47 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 // 29 // ------------------------------------------------------------------- 30 // 31 // GEANT4 Class header file 32 // 33 // 34 // File name: G4CrossSectionDataStore 35 // 36 // 37 // Modifications: 38 // 23.01.2009 V.Ivanchenko move constructor and destructor to source, 39 // use STL vector instead of C-array 40 // 41 26 42 // Class Description 27 43 // This is the class to which cross section data sets may be registered. … … 40 56 #include "G4Material.hh" 41 57 #include "G4VCrossSectionDataSet.hh" 58 #include <vector> 42 59 60 class G4Nucleus; 43 61 44 62 class G4CrossSectionDataStore … … 46 64 public: 47 65 48 G4CrossSectionDataStore() : 49 NDataSetList(0), verboseLevel(0) 50 {} 66 G4CrossSectionDataStore(); 51 67 52 ~G4CrossSectionDataStore() 53 {} 68 ~G4CrossSectionDataStore(); 54 69 55 56 70 G4double GetCrossSection(const G4DynamicParticle*, 71 const G4Element*, G4double aTemperature); 57 72 58 59 73 G4double GetCrossSection(const G4DynamicParticle*, 74 const G4Isotope*, G4double aTemperature); 60 75 61 62 76 G4double GetCrossSection(const G4DynamicParticle*, 77 G4double Z, G4double A, G4double aTemperature); 63 78 64 65 79 // to replace GetMicroscopicCrossSection 80 G4double GetCrossSection(const G4DynamicParticle*, const G4Material*); 66 81 67 68 SelectRandomIsotope(const G4DynamicParticle*, const G4Material*);82 //std::pair<G4double/*Z*/, G4double/*A*/> 83 // SelectRandomIsotope(const G4DynamicParticle*, const G4Material*); 69 84 70 void AddDataSet(G4VCrossSectionDataSet*); 85 G4Element* SampleZandA(const G4DynamicParticle*, const G4Material*, 86 G4Nucleus& target); 71 87 72 void BuildPhysicsTable(const G4ParticleDefinition&);88 void AddDataSet(G4VCrossSectionDataSet*); 73 89 74 void DumpPhysicsTable(const G4ParticleDefinition&);90 void BuildPhysicsTable(const G4ParticleDefinition&); 75 91 76 void SetVerboseLevel(G4int value) 77 { 78 verboseLevel = value; 79 } 92 void DumpPhysicsTable(const G4ParticleDefinition&); 80 93 81 G4int GetVerboseLevel() 82 { 83 return verboseLevel; 84 } 94 inline void SetVerboseLevel(G4int value) 95 { 96 verboseLevel = value; 97 } 98 99 inline G4int GetVerboseLevel() 100 { 101 return verboseLevel; 102 } 85 103 86 104 private: 87 105 106 G4VCrossSectionDataSet* whichDataSetInCharge(const G4DynamicParticle*, 107 const G4Element*); 88 108 89 G4VCrossSectionDataSet* whichDataSetInCharge(const G4DynamicParticle*, 90 const G4Element*); 91 92 enum { NDataSetMax = 100 }; 93 G4VCrossSectionDataSet* DataSetList[NDataSetMax]; 94 G4int NDataSetList; 95 G4int verboseLevel; 109 std::vector<G4VCrossSectionDataSet*> DataSetList; 110 G4int NDataSetList; 111 G4int verboseLevel; 96 112 }; 97 113 -
trunk/source/processes/hadronic/cross_sections/include/G4ElectroNuclearCrossSection.hh
r819 r962 25 25 // 26 26 // 27 // GEANT4 tag $Name: $27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // … … 41 41 #include "G4ParticleTable.hh" 42 42 #include "G4NucleiProperties.hh" 43 #include "G4NucleiPropertiesTable.hh"44 43 #include <vector> 45 44 #include "Randomize.hh" -
trunk/source/processes/hadronic/cross_sections/include/G4GlauberGribovCrossSection.hh
r819 r962 118 118 G4double GetNucleusRadius(G4double At); 119 119 120 inline G4double GetParticleBarCorTot( const G4ParticleDefinition* theParticle, G4double Z ); 121 inline G4double GetParticleBarCorIn( const G4ParticleDefinition* theParticle, G4double Z ); 122 123 inline void SetEnergyLowerLimit(G4double E ){fLowerLimit=E;}; 124 120 125 private: 121 126 122 127 const G4double fUpperLimit; 123 constG4double fLowerLimit;128 G4double fLowerLimit; 124 129 const G4double fRadiusConst; 130 131 static const G4double fNeutronBarCorrectionTot[93]; 132 static const G4double fNeutronBarCorrectionIn[93]; 133 134 static const G4double fProtonBarCorrectionTot[93]; 135 static const G4double fProtonBarCorrectionIn[93]; 136 137 static const G4double fPionPlusBarCorrectionTot[93]; 138 static const G4double fPionPlusBarCorrectionIn[93]; 139 140 static const G4double fPionMinusBarCorrectionTot[93]; 141 static const G4double fPionMinusBarCorrectionIn[93]; 125 142 126 143 G4double fTotalXsc, fElasticXsc, fInelasticXsc, fProductionXsc, fDiffractionXsc; … … 160 177 }; 161 178 179 //////////////////////////////////////////////////////////////// 180 // 181 // Inlines 182 162 183 inline 163 184 G4double G4GlauberGribovCrossSection::GetElasticGlauberGribov( … … 168 189 } 169 190 191 ///////////////////////////////////////////////////////////////// 192 170 193 inline 171 194 G4double G4GlauberGribovCrossSection::GetInelasticGlauberGribov( … … 176 199 } 177 200 201 ///////////////////////////////////////////////////////////////////// 202 // 203 // return correction at Tkin = 90*GeV GG -> Barashenkov tot xsc, when it 204 // is available, else return 1.0 205 206 207 inline G4double G4GlauberGribovCrossSection::GetParticleBarCorTot( 208 const G4ParticleDefinition* theParticle, G4double Z ) 209 { 210 G4int iZ = G4int(Z); 211 212 if( iZ >= 2 && iZ <= 92) 213 { 214 if( theParticle == theProton ) return fProtonBarCorrectionTot[iZ]; 215 else if( theParticle == theNeutron) return fNeutronBarCorrectionTot[iZ]; 216 else if( theParticle == thePiPlus ) return fPionPlusBarCorrectionTot[iZ]; 217 else if( theParticle == thePiMinus) return fPionMinusBarCorrectionTot[iZ]; 218 else return 1.0; 219 } 220 else return 1.0; 221 } 222 223 ///////////////////////////////////////////////////////////////////// 224 // 225 // return correction at Tkin = 90*GeV GG -> Barashenkov in xsc, when it 226 // is available, else return 1.0 227 228 229 inline G4double G4GlauberGribovCrossSection::GetParticleBarCorIn( 230 const G4ParticleDefinition* theParticle, G4double Z ) 231 { 232 G4int iZ = G4int(Z); 233 234 if( iZ >= 2 && iZ <= 92) 235 { 236 if( theParticle == theProton ) return fProtonBarCorrectionIn[iZ]; 237 else if( theParticle == theNeutron) return fNeutronBarCorrectionIn[iZ]; 238 else if( theParticle == thePiPlus ) return fPionPlusBarCorrectionIn[iZ]; 239 else if( theParticle == thePiMinus) return fPionMinusBarCorrectionIn[iZ]; 240 else return 1.0; 241 } 242 else return 1.0; 243 } 244 178 245 #endif -
trunk/source/processes/hadronic/cross_sections/include/G4HadronCrossSections.hh
r819 r962 25 25 // 26 26 // 27 // GEANT4 tag $Name: $27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // -
trunk/source/processes/hadronic/cross_sections/include/G4PhotoNuclearCrossSection.hh
r819 r962 25 25 // 26 26 // 27 // GEANT4 tag $Name: $27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // … … 37 37 38 38 #include "G4VCrossSectionDataSet.hh" 39 /////////#include "G4HadronCrossSections.hh"40 39 #include "G4DynamicParticle.hh" 41 40 #include "G4Element.hh" 42 //#include "G4QPDGCode.hh"43 41 #include "G4ParticleTable.hh" 44 42 #include "G4NucleiProperties.hh" 45 #include "G4NucleiPropertiesTable.hh"46 43 #include <vector> 47 44 … … 82 79 private: 83 80 G4int GetFunctions(G4double a, G4double* y, G4double* z); 84 //G4double LinearFit(G4double X, G4int N, const G4double* XN, const G4double* YN);85 81 G4double EquLinearFit(G4double X, G4int N,const G4double X0,const G4double XD, const G4double* Y); 86 82 G4double ThresholdEnergy(G4int Z, G4int N); … … 100 96 static std::vector <G4double*> HEN; // Vector of pointers to the HighEnPhotonuclearCrossSect 101 97 102 //G4HadronCrossSections* theHadronCrossSections;103 98 }; 104 99 -
trunk/source/processes/hadronic/cross_sections/include/G4UPiNuclearCrossSection.hh
r819 r962 105 105 G4double elow; 106 106 G4double elowest; 107 G4double APower[92]; 107 108 108 109 const G4ParticleDefinition* piPlus; -
trunk/source/processes/hadronic/cross_sections/include/G4VCrossSectionDataSet.hh
r819 r962 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4VCrossSectionDataSet.hh,v 1.13 2009/01/24 11:54:47 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 26 28 // 27 // GEANT4 physics abstract class: G4VCrossSectionData -- header file 28 // F.W. Jones, TRIUMF, 20-JAN-97 29 // ------------------------------------------------------------------- 30 // 31 // GEANT4 Class header file 32 // 33 // 34 // File name: G4VCrossSectionDataSet 35 // 36 // Author F.W. Jones, TRIUMF, 20-JAN-97 37 // 38 // Modifications: 39 // 23.01.2009 V.Ivanchenko move constructor and destructor to source 40 // 41 29 42 // 30 43 // Class Description … … 43 56 class G4VCrossSectionDataSet 44 57 { 45 public:46 47 G4VCrossSectionDataSet() :48 verboseLevel(0)49 {}50 51 virtual ~G4VCrossSectionDataSet()52 {}53 54 58 public: //with description 55 59 56 // The following methods need to be implemented for each new data set. 57 virtual 58 G4bool IsApplicable(const G4DynamicParticle*, const G4Element*) = 0; 60 G4VCrossSectionDataSet(); 59 61 60 virtual 61 G4bool IsZAApplicable(const G4DynamicParticle*, G4double /*Z*/, G4double /*A*/); 62 virtual ~G4VCrossSectionDataSet(); 62 63 63 virtual 64 G4double GetCrossSection(const G4DynamicParticle*, 65 const G4Element*, 66 G4double aTemperature = 0.) = 0; 64 // The following methods need to be implemented for each new data set. 65 virtual 66 G4bool IsApplicable(const G4DynamicParticle*, const G4Element*) = 0; 67 67 68 virtual 69 G4double GetIsoCrossSection(const G4DynamicParticle*, const G4Isotope*, 70 G4double aTemperature = 0.); 68 virtual 69 G4bool IsZAApplicable(const G4DynamicParticle*, G4double /*Z*/, G4double /*A*/); 71 70 72 virtual 73 G4double GetIsoZACrossSection(const G4DynamicParticle*, G4double /*Z*/, 74 G4double /*A*/, G4double aTemperature = 0.); 71 virtual 72 G4double GetCrossSection(const G4DynamicParticle*, 73 const G4Element*, 74 G4double aTemperature = 0.) = 0; 75 75 76 virtual 77 void BuildPhysicsTable(const G4ParticleDefinition&) = 0; 76 virtual 77 G4double GetIsoCrossSection(const G4DynamicParticle*, const G4Isotope*, 78 G4double aTemperature = 0.); 78 79 79 virtual 80 void DumpPhysicsTable(const G4ParticleDefinition&) = 0; 80 virtual 81 G4double GetIsoZACrossSection(const G4DynamicParticle*, G4double /*Z*/, 82 G4double /*A*/, G4double aTemperature = 0.); 83 84 virtual 85 void BuildPhysicsTable(const G4ParticleDefinition&) = 0; 86 87 virtual 88 void DumpPhysicsTable(const G4ParticleDefinition&) = 0; 81 89 82 90 public: // Without Description 83 91 84 void SetVerboseLevel(G4int value)85 86 87 92 inline void SetVerboseLevel(G4int value) 93 { 94 verboseLevel = value; 95 } 88 96 89 G4int GetVerboseLevel()90 91 92 97 inline G4int GetVerboseLevel() 98 { 99 return verboseLevel; 100 } 93 101 94 102 protected: 95 103 96 104 G4int verboseLevel; 97 105 }; 98 106
Note: See TracChangeset
for help on using the changeset viewer.