Changeset 1007 for trunk/source/processes/hadronic/cross_sections
- Timestamp:
- Apr 20, 2009, 5:54:05 PM (15 years ago)
- Location:
- trunk/source/processes/hadronic/cross_sections
- Files:
-
- 24 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/processes/hadronic/cross_sections/History
r962 r1007 15 15 --------------------------------------------------------------- 16 16 17 25 February 2009 Vladimir Ivanchenko (hadr-cross-V09-02-03) 18 ------------------------------------------------------------ 19 - G4CrossSectionDataStore - added protection to the Clean method 20 21 14 February 2009 Vladimir Ivanchenko (hadr-cross-V09-02-02) 22 ------------------------------------------------------------ 23 - G4CrossSectionDataStore - added Clean method 24 25 06 February 2009 Vladimir Ivanchenko (hadr-cross-V09-02-01) 26 ------------------------------------------------------------ 27 28 24 January 2009 Vladimir Ivanchenko (hadr-cross-V09-02-00) 29 ------------------------------------------------------------ 30 - G4CrossSectionDataStore - moved constructor and destructor to source, 31 added destruction of data sets, use STL 32 vector instead of C-array 33 - G4CrossSectionDataSetRegistry - new singleton to keep pointers to 34 cross section data sets 35 - G4VCrossSectiondataSet - constructor and detructor moved to source and 36 registration/deregistration added 37 38 01 December 2008 Vladimir Ivanchenko (hadr-cross-V09-01-07) 17 01 December 2008 Vladimir Ivantchenko (hadr-cross-V09-01-07) 39 18 ------------------------------------------------------------ 40 19 G4BGGPionElasticXS, G4BGGPionInelasticXS, G4BGGNucleonInelasticXS, -
trunk/source/processes/hadronic/cross_sections/include/G4BGGNucleonElasticXS.hh
r962 r1007 25 25 // 26 26 // $Id: G4BGGNucleonElasticXS.hh,v 1.2 2008/12/01 16:50:23 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02 -ref-02$27 // GEANT4 tag $Name: geant4-09-02 $ 28 28 // 29 29 // ------------------------------------------------------------------- -
trunk/source/processes/hadronic/cross_sections/include/G4BGGNucleonInelasticXS.hh
r962 r1007 25 25 // 26 26 // $Id: G4BGGNucleonInelasticXS.hh,v 1.2 2008/12/01 16:50:23 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02 -ref-02$27 // GEANT4 tag $Name: geant4-09-02 $ 28 28 // 29 29 // ------------------------------------------------------------------- -
trunk/source/processes/hadronic/cross_sections/include/G4BGGPionElasticXS.hh
r962 r1007 25 25 // 26 26 // $Id: G4BGGPionElasticXS.hh,v 1.2 2008/12/01 16:50:23 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02 -ref-02$27 // GEANT4 tag $Name: geant4-09-02 $ 28 28 // 29 29 // ------------------------------------------------------------------- -
trunk/source/processes/hadronic/cross_sections/include/G4BGGPionInelasticXS.hh
r962 r1007 25 25 // 26 26 // $Id: G4BGGPionInelasticXS.hh,v 1.2 2008/12/01 16:50:23 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02 -ref-02$27 // GEANT4 tag $Name: geant4-09-02 $ 28 28 // 29 29 // ------------------------------------------------------------------- -
trunk/source/processes/hadronic/cross_sections/include/G4CrossSectionDataStore.hh
r962 r1007 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 file32 //33 //34 // File name: G4CrossSectionDataStore35 //36 //37 // Modifications:38 // 23.01.2009 V.Ivanchenko move constructor and destructor to source,39 // use STL vector instead of C-array40 //41 42 26 // Class Description 43 27 // This is the class to which cross section data sets may be registered. … … 56 40 #include "G4Material.hh" 57 41 #include "G4VCrossSectionDataSet.hh" 58 #include <vector>59 42 60 43 class G4Nucleus; … … 64 47 public: 65 48 66 G4CrossSectionDataStore(); 49 G4CrossSectionDataStore() : 50 NDataSetList(0), verboseLevel(0) 51 {} 67 52 68 ~G4CrossSectionDataStore(); 53 ~G4CrossSectionDataStore() 54 {} 69 55 70 G4double GetCrossSection(const G4DynamicParticle*,71 56 G4double GetCrossSection(const G4DynamicParticle*, 57 const G4Element*, G4double aTemperature); 72 58 73 G4double GetCrossSection(const G4DynamicParticle*,74 59 G4double GetCrossSection(const G4DynamicParticle*, 60 const G4Isotope*, G4double aTemperature); 75 61 76 G4double GetCrossSection(const G4DynamicParticle*,77 62 G4double GetCrossSection(const G4DynamicParticle*, 63 G4double Z, G4double A, G4double aTemperature); 78 64 79 // to replace GetMicroscopicCrossSection80 G4double GetCrossSection(const G4DynamicParticle*, const G4Material*);65 // to replace GetMicroscopicCrossSection 66 G4double GetCrossSection(const G4DynamicParticle*, const G4Material*); 81 67 82 //std::pair<G4double/*Z*/, G4double/*A*/>83 //SelectRandomIsotope(const G4DynamicParticle*, const G4Material*);68 std::pair<G4double/*Z*/, G4double/*A*/> 69 SelectRandomIsotope(const G4DynamicParticle*, const G4Material*); 84 70 85 G4Element* SampleZandA(const G4DynamicParticle*, const G4Material*,86 G4Nucleus& target);71 G4Element* SampleZandA(const G4DynamicParticle*, const G4Material*, 72 G4Nucleus& target); 87 73 88 void AddDataSet(G4VCrossSectionDataSet*);74 void AddDataSet(G4VCrossSectionDataSet*); 89 75 90 void BuildPhysicsTable(const G4ParticleDefinition&);76 void BuildPhysicsTable(const G4ParticleDefinition&); 91 77 92 void DumpPhysicsTable(const G4ParticleDefinition&);78 void DumpPhysicsTable(const G4ParticleDefinition&); 93 79 94 inlinevoid SetVerboseLevel(G4int value)95 {96 verboseLevel = value;97 }80 void SetVerboseLevel(G4int value) 81 { 82 verboseLevel = value; 83 } 98 84 99 inlineG4int GetVerboseLevel()100 {101 return verboseLevel;102 }85 G4int GetVerboseLevel() 86 { 87 return verboseLevel; 88 } 103 89 104 90 private: 105 91 106 G4VCrossSectionDataSet* whichDataSetInCharge(const G4DynamicParticle*,107 const G4Element*);108 92 109 std::vector<G4VCrossSectionDataSet*> DataSetList; 110 G4int NDataSetList; 111 G4int verboseLevel; 93 G4VCrossSectionDataSet* whichDataSetInCharge(const G4DynamicParticle*, 94 const G4Element*); 95 96 enum { NDataSetMax = 100 }; 97 G4VCrossSectionDataSet* DataSetList[NDataSetMax]; 98 G4int NDataSetList; 99 G4int verboseLevel; 112 100 }; 113 101 -
trunk/source/processes/hadronic/cross_sections/include/G4ElectroNuclearCrossSection.hh
r962 r1007 25 25 // 26 26 // 27 // GEANT4 tag $Name: geant4-09-02 -ref-02$27 // GEANT4 tag $Name: geant4-09-02 $ 28 28 // 29 29 // -
trunk/source/processes/hadronic/cross_sections/include/G4HadronCrossSections.hh
r962 r1007 25 25 // 26 26 // 27 // GEANT4 tag $Name: geant4-09-02 -ref-02$27 // GEANT4 tag $Name: geant4-09-02 $ 28 28 // 29 29 // -
trunk/source/processes/hadronic/cross_sections/include/G4PhotoNuclearCrossSection.hh
r962 r1007 25 25 // 26 26 // 27 // GEANT4 tag $Name: geant4-09-02 -ref-02$27 // GEANT4 tag $Name: geant4-09-02 $ 28 28 // 29 29 // -
trunk/source/processes/hadronic/cross_sections/include/G4VCrossSectionDataSet.hh
r962 r1007 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 $28 26 // 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 27 // GEANT4 physics abstract class: G4VCrossSectionData -- header file 28 // F.W. Jones, TRIUMF, 20-JAN-97 42 29 // 43 30 // Class Description … … 56 43 class G4VCrossSectionDataSet 57 44 { 45 public: 46 47 G4VCrossSectionDataSet() : 48 verboseLevel(0) 49 {} 50 51 virtual ~G4VCrossSectionDataSet() 52 {} 53 58 54 public: //with description 59 55 60 G4VCrossSectionDataSet(); 56 // The following methods need to be implemented for each new data set. 57 virtual 58 G4bool IsApplicable(const G4DynamicParticle*, const G4Element*) = 0; 61 59 62 virtual ~G4VCrossSectionDataSet(); 60 virtual 61 G4bool IsZAApplicable(const G4DynamicParticle*, G4double /*Z*/, G4double /*A*/); 63 62 64 // The following methods need to be implemented for each new data set. 65 virtual 66 G4bool IsApplicable(const G4DynamicParticle*, const G4Element*) = 0; 63 virtual 64 G4double GetCrossSection(const G4DynamicParticle*, 65 const G4Element*, 66 G4double aTemperature = 0.) = 0; 67 67 68 virtual 69 G4bool IsZAApplicable(const G4DynamicParticle*, G4double /*Z*/, G4double /*A*/); 68 virtual 69 G4double GetIsoCrossSection(const G4DynamicParticle*, const G4Isotope*, 70 G4double aTemperature = 0.); 70 71 71 virtual 72 G4double GetCrossSection(const G4DynamicParticle*, 73 const G4Element*, 74 G4double aTemperature = 0.) = 0; 72 virtual 73 G4double GetIsoZACrossSection(const G4DynamicParticle*, G4double /*Z*/, 74 G4double /*A*/, G4double aTemperature = 0.); 75 75 76 virtual 77 G4double GetIsoCrossSection(const G4DynamicParticle*, const G4Isotope*, 78 G4double aTemperature = 0.); 76 virtual 77 void BuildPhysicsTable(const G4ParticleDefinition&) = 0; 79 78 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; 79 virtual 80 void DumpPhysicsTable(const G4ParticleDefinition&) = 0; 89 81 90 82 public: // Without Description 91 83 92 inlinevoid SetVerboseLevel(G4int value)93 {94 verboseLevel = value;95 }84 void SetVerboseLevel(G4int value) 85 { 86 verboseLevel = value; 87 } 96 88 97 inlineG4int GetVerboseLevel()98 {99 return verboseLevel;100 }89 G4int GetVerboseLevel() 90 { 91 return verboseLevel; 92 } 101 93 102 94 protected: 103 95 104 G4int verboseLevel;96 G4int verboseLevel; 105 97 }; 106 98 -
trunk/source/processes/hadronic/cross_sections/src/G4BGGNucleonElasticXS.cc
r962 r1007 25 25 // 26 26 // $Id: G4BGGNucleonElasticXS.cc,v 1.3 2008/12/01 16:50:23 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02 -ref-02$27 // GEANT4 tag $Name: geant4-09-02 $ 28 28 // 29 29 // ------------------------------------------------------------------- -
trunk/source/processes/hadronic/cross_sections/src/G4BGGNucleonInelasticXS.cc
r962 r1007 25 25 // 26 26 // $Id: G4BGGNucleonInelasticXS.cc,v 1.3 2008/12/01 16:50:23 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02 -ref-02$27 // GEANT4 tag $Name: geant4-09-02 $ 28 28 // 29 29 // ------------------------------------------------------------------- -
trunk/source/processes/hadronic/cross_sections/src/G4BGGPionElasticXS.cc
r962 r1007 25 25 // 26 26 // $Id: G4BGGPionElasticXS.cc,v 1.3 2008/12/01 16:50:23 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02 -ref-02$27 // GEANT4 tag $Name: geant4-09-02 $ 28 28 // 29 29 // ------------------------------------------------------------------- -
trunk/source/processes/hadronic/cross_sections/src/G4BGGPionInelasticXS.cc
r962 r1007 25 25 // 26 26 // $Id: G4BGGPionInelasticXS.cc,v 1.3 2008/12/01 16:50:23 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02 -ref-02$27 // GEANT4 tag $Name: geant4-09-02 $ 28 28 // 29 29 // ------------------------------------------------------------------- -
trunk/source/processes/hadronic/cross_sections/src/G4CrossSectionDataStore.cc
r962 r1007 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4CrossSectionDataStore.cc,v 1.16 2009/01/24 11:54:47 vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-02-ref-02 $28 //29 // -------------------------------------------------------------------30 //31 // GEANT4 Class file32 //33 //34 // File name: G4CrossSectionDataStore35 //36 //37 // Modifications:38 // 23.01.2009 V.Ivanchenko add destruction of data sets39 //40 26 // 41 27 … … 47 33 #include "G4Nucleus.hh" 48 34 49 G4CrossSectionDataStore::G4CrossSectionDataStore() :50 NDataSetList(0), verboseLevel(0)51 {}52 53 G4CrossSectionDataStore::~G4CrossSectionDataStore()54 {}55 35 56 36 G4double … … 412 392 return anElement; 413 393 } 394 */ 414 395 415 396 std::pair<G4double, G4double> … … 532 513 return std::pair<G4double, G4double>(ZZ, AA); 533 514 } 534 */ 515 535 516 536 517 void 537 518 G4CrossSectionDataStore::AddDataSet(G4VCrossSectionDataSet* aDataSet) 538 519 { 539 DataSetList.push_back(aDataSet); 540 NDataSetList++; 541 } 520 if (NDataSetList == NDataSetMax) { 521 G4cout << "WARNING: G4CrossSectionDataStore::AddDataSet: "<<G4endl; 522 G4cout << " reached maximum number of data sets"; 523 G4cout << " data set not added !!!!!!!!!!!!!!!!"; 524 return; 525 } 526 DataSetList[NDataSetList] = aDataSet; 527 NDataSetList++; 528 } 529 542 530 543 531 void … … 545 533 BuildPhysicsTable(const G4ParticleDefinition& aParticleType) 546 534 { 547 if(NDataSetList > 0) { 548 for (G4int i=0; i<NDataSetList; i++) { 535 if (NDataSetList == 0) 536 { 537 G4Exception("G4CrossSectionDataStore", "007", FatalException, 538 "BuildPhysicsTable: no data sets registered"); 539 return; 540 } 541 for (G4int i = NDataSetList-1; i >= 0; i--) { 549 542 DataSetList[i]->BuildPhysicsTable(aParticleType); 550 } 551 } 543 } 552 544 } 553 545 … … 557 549 DumpPhysicsTable(const G4ParticleDefinition& aParticleType) 558 550 { 559 if (NDataSetList == 0) { 560 G4cout << "WARNING - G4CrossSectionDataStore::DumpPhysicsTable: " 561 << " no data sets registered"<<G4endl; 562 return; 563 } 564 for (G4int i = NDataSetList-1; i >= 0; i--) { 565 DataSetList[i]->DumpPhysicsTable(aParticleType); 566 } 567 } 551 if (NDataSetList == 0) { 552 G4cout << "WARNING - G4CrossSectionDataStore::DumpPhysicsTable: no data sets registered"<<G4endl; 553 return; 554 } 555 for (G4int i = NDataSetList-1; i >= 0; i--) { 556 DataSetList[i]->DumpPhysicsTable(aParticleType); 557 } 558 } -
trunk/source/processes/hadronic/cross_sections/src/G4ElectroNuclearCrossSection.cc
r962 r1007 26 26 // 27 27 // $Id: G4ElectroNuclearCrossSection.cc,v 1.29 2008/10/24 19:15:17 dennis Exp $ 28 // GEANT4 tag $Name: geant4-09-02 -ref-02$28 // GEANT4 tag $Name: geant4-09-02 $ 29 29 // 30 30 // -
trunk/source/processes/hadronic/cross_sections/src/G4HadronCaptureDataSet.cc
r962 r1007 26 26 // 27 27 // $Id: G4HadronCaptureDataSet.cc,v 1.8 2006/06/29 19:57:35 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-02 -ref-02$28 // GEANT4 tag $Name: geant4-09-02 $ 29 29 // 30 30 // -
trunk/source/processes/hadronic/cross_sections/src/G4HadronCrossSections.cc
r962 r1007 25 25 // 26 26 // 27 // GEANT4 tag $Name: geant4-09-02 -ref-02$27 // GEANT4 tag $Name: geant4-09-02 $ 28 28 // 29 29 // -
trunk/source/processes/hadronic/cross_sections/src/G4HadronElasticDataSet.cc
r962 r1007 26 26 // 27 27 // $Id: G4HadronElasticDataSet.cc,v 1.8 2006/06/29 19:57:39 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-02 -ref-02$28 // GEANT4 tag $Name: geant4-09-02 $ 29 29 // 30 30 // -
trunk/source/processes/hadronic/cross_sections/src/G4HadronFissionDataSet.cc
r962 r1007 26 26 // 27 27 // $Id: G4HadronFissionDataSet.cc,v 1.8 2006/06/29 19:57:41 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-02 -ref-02$28 // GEANT4 tag $Name: geant4-09-02 $ 29 29 // 30 30 // -
trunk/source/processes/hadronic/cross_sections/src/G4HadronInelasticDataSet.cc
r962 r1007 26 26 // 27 27 // $Id: G4HadronInelasticDataSet.cc,v 1.8 2006/06/29 19:57:43 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-02 -ref-02$28 // GEANT4 tag $Name: geant4-09-02 $ 29 29 // 30 30 // -
trunk/source/processes/hadronic/cross_sections/src/G4PhotoNuclearCrossSection.cc
r962 r1007 26 26 // 27 27 // The lust update: M.V. Kossov, CERN/ITEP(Moscow) 17-June-02 28 // GEANT4 tag $Name: geant4-09-02 -ref-02$28 // GEANT4 tag $Name: geant4-09-02 $ 29 29 // 30 30 // -
trunk/source/processes/hadronic/cross_sections/src/G4PiData.cc
r962 r1007 24 24 // ******************************************************************** 25 25 // 26 // GEANT4 tag $Name: geant4-09-02 -ref-02$26 // GEANT4 tag $Name: geant4-09-02 $ 27 27 // 28 28 // -------------------------------------------------------------------- -
trunk/source/processes/hadronic/cross_sections/src/G4VCrossSectionDataSet.cc
r962 r1007 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4VCrossSectionDataSet.cc,v 1.8 2009/01/24 11:54:47 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 // 29 // ------------------------------------------------------------------- 30 // 31 // GEANT4 Class 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 // 26 // $Id: G4VCrossSectionDataSet.cc,v 1.7 2006/12/29 02:05:48 dennis Exp $ 27 // 41 28 42 29 #include "G4VCrossSectionDataSet.hh" 43 #include "G4CrossSectionDataSetRegistry.hh"44 45 G4VCrossSectionDataSet::G4VCrossSectionDataSet() :46 verboseLevel(0)47 {48 G4CrossSectionDataSetRegistry::Instance()->Register(this);49 }50 51 G4VCrossSectionDataSet::~G4VCrossSectionDataSet()52 {53 G4CrossSectionDataSetRegistry::Instance()->DeRegister(this);54 }55 30 56 31 // Override this method to test for particle and isotope applicability
Note: See TracChangeset
for help on using the changeset viewer.