Geant4 Cross Reference |
1 // 1 // 2 // ******************************************* 2 // ******************************************************************** 3 // * License and Disclaimer 3 // * License and Disclaimer * 4 // * 4 // * * 5 // * The Geant4 software is copyright of th 5 // * The Geant4 software is copyright of the Copyright Holders of * 6 // * the Geant4 Collaboration. It is provided 6 // * the Geant4 Collaboration. It is provided under the terms and * 7 // * conditions of the Geant4 Software License 7 // * conditions of the Geant4 Software License, included in the file * 8 // * LICENSE and available at http://cern.ch/ 8 // * LICENSE and available at http://cern.ch/geant4/license . These * 9 // * include a list of copyright holders. 9 // * include a list of copyright holders. * 10 // * 10 // * * 11 // * Neither the authors of this software syst 11 // * Neither the authors of this software system, nor their employing * 12 // * institutes,nor the agencies providing fin 12 // * institutes,nor the agencies providing financial support for this * 13 // * work make any representation or warran 13 // * work make any representation or warranty, express or implied, * 14 // * regarding this software system or assum 14 // * regarding this software system or assume any liability for its * 15 // * use. Please see the license in the file 15 // * use. Please see the license in the file LICENSE and URL above * 16 // * for the full disclaimer and the limitatio 16 // * for the full disclaimer and the limitation of liability. * 17 // * 17 // * * 18 // * This code implementation is the result 18 // * This code implementation is the result of the scientific and * 19 // * technical work of the GEANT4 collaboratio 19 // * technical work of the GEANT4 collaboration. * 20 // * By using, copying, modifying or distri 20 // * By using, copying, modifying or distributing the software (or * 21 // * any work based on the software) you ag 21 // * any work based on the software) you agree to acknowledge its * 22 // * use in resulting scientific publicati 22 // * use in resulting scientific publications, and indicate your * 23 // * acceptance of all terms of the Geant4 Sof 23 // * acceptance of all terms of the Geant4 Software license. * 24 // ******************************************* 24 // ******************************************************************** 25 // 25 // 26 /* 26 /* 27 Author: Susanna Guatelli 27 Author: Susanna Guatelli 28 */ 28 */ 29 // 29 // 30 // ********************************** 30 // ********************************** 31 // * * 31 // * * 32 // * BrachyPhysicsList.cc * 32 // * BrachyPhysicsList.cc * 33 // * * 33 // * * 34 // ********************************** 34 // ********************************** 35 // 35 // 36 #include "BrachyPhysicsList.hh" << 37 #include "BrachyPhysicsListMessenger.hh" << 38 #include "G4EmStandardPhysics_option4.hh" 36 #include "G4EmStandardPhysics_option4.hh" 39 #include "G4EmLivermorePhysics.hh" 37 #include "G4EmLivermorePhysics.hh" 40 #include "G4EmStandardPhysics.hh" << 41 #include "G4EmStandardPhysics_option1.hh" << 42 #include "G4EmStandardPhysics_option2.hh" << 43 #include "G4EmStandardPhysics_option3.hh" << 44 #include "G4EmStandardPhysics_option4.hh" << 45 #include "G4DecayPhysics.hh" 38 #include "G4DecayPhysics.hh" 46 #include "G4RadioactiveDecayPhysics.hh" 39 #include "G4RadioactiveDecayPhysics.hh" 47 #include "G4EmPenelopePhysics.hh" 40 #include "G4EmPenelopePhysics.hh" >> 41 #include "BrachyPhysicsList.hh" 48 #include "G4VPhysicsConstructor.hh" 42 #include "G4VPhysicsConstructor.hh" 49 #include "G4ParticleDefinition.hh" 43 #include "G4ParticleDefinition.hh" 50 #include "G4ProductionCutsTable.hh" 44 #include "G4ProductionCutsTable.hh" 51 #include "G4ProcessManager.hh" 45 #include "G4ProcessManager.hh" 52 #include "G4ParticleTypes.hh" 46 #include "G4ParticleTypes.hh" 53 #include "G4ios.hh" 47 #include "G4ios.hh" 54 #include "G4StepLimiter.hh" 48 #include "G4StepLimiter.hh" 55 #include "G4ParticleDefinition.hh" 49 #include "G4ParticleDefinition.hh" 56 #include "globals.hh" 50 #include "globals.hh" 57 #include "G4SystemOfUnits.hh" 51 #include "G4SystemOfUnits.hh" 58 #include "G4UAtomicDeexcitation.hh" << 59 #include "G4LossTableManager.hh" << 60 52 61 BrachyPhysicsList::BrachyPhysicsList(): G4VMo 53 BrachyPhysicsList::BrachyPhysicsList(): G4VModularPhysicsList() 62 { 54 { 63 SetVerboseLevel(1); 55 SetVerboseLevel(1); >> 56 >> 57 // EM physics: 3 alternatives >> 58 >> 59 emPhysicsList = new G4EmStandardPhysics_option4(1); 64 60 65 G4ProductionCutsTable::GetProductionCutsTable( << 61 // Alternatively you can substitute this physics list 66 SetDefaultCutValue(0.05 *mm); << 62 // with the LowEnergy Livermore or LowEnergy Penelope: 67 DumpCutValuesTable(); << 63 // emPhysicsList = new G4EmLivermorePhysics(); 68 << 64 // Low Energy based on Livermore Evaluated Data Libraries 69 // EM physics: default << 65 // 70 fEmPhysicsList = new G4EmLivermorePhysics(); << 66 // Penelope physics 71 fEmName="emlivermore"; << 67 //emPhysicsList = new G4EmPenelopePhysics(); 72 68 73 // Add Decay 69 // Add Decay 74 fDecPhysicsList = new G4DecayPhysics(); << 70 decPhysicsList = new G4DecayPhysics(); 75 fRadDecayPhysicsList = new G4RadioactiveDecayP << 71 radDecayPhysicsList = new G4RadioactiveDecayPhysics(); 76 fMessenger = new BrachyPhysicsListMessenger(th << 72 77 } 73 } 78 74 79 BrachyPhysicsList::~BrachyPhysicsList() 75 BrachyPhysicsList::~BrachyPhysicsList() 80 { 76 { 81 delete fMessenger; << 77 delete decPhysicsList; 82 delete fDecPhysicsList; << 78 delete radDecayPhysicsList; 83 delete fRadDecayPhysicsList; << 79 delete emPhysicsList; 84 delete fEmPhysicsList; << 85 } 80 } 86 81 87 void BrachyPhysicsList::ConstructParticle() 82 void BrachyPhysicsList::ConstructParticle() 88 { 83 { 89 fDecPhysicsList -> ConstructParticle(); << 84 decPhysicsList -> ConstructParticle(); 90 } 85 } 91 86 92 void BrachyPhysicsList::ConstructProcess() 87 void BrachyPhysicsList::ConstructProcess() 93 { 88 { 94 AddTransportation(); 89 AddTransportation(); 95 fEmPhysicsList -> ConstructProcess(); << 90 emPhysicsList -> ConstructProcess(); 96 91 97 // decay physics list 92 // decay physics list 98 fDecPhysicsList -> ConstructProcess(); << 93 decPhysicsList -> ConstructProcess(); 99 fRadDecayPhysicsList -> ConstructProcess(); << 94 radDecayPhysicsList -> ConstructProcess(); 100 << 101 // Deexcitation << 102 // Both Fluorescence and Auger e- emission act << 103 G4VAtomDeexcitation* de = new G4UAtomicDeexcit << 104 G4LossTableManager::Instance()->SetAtomDeexcit << 105 de -> SetFluo(true); << 106 de -> SetAuger(true); << 107 << 108 // To model full Auger cascade include in the << 109 // the following UI commands: << 110 // process/em/augerCascade true << 111 // process/em/deexcitationIgnoreCut true << 112 } 95 } 113 96 114 void BrachyPhysicsList::AddPhysicsList(const G << 97 void BrachyPhysicsList::SetCuts() 115 { 98 { >> 99 // Definition of threshold of production >> 100 // of secondary particles >> 101 // This is defined in range. >> 102 defaultCutValue = 0.1 * mm; >> 103 SetCutValue(defaultCutValue, "gamma"); >> 104 SetCutValue(defaultCutValue, "e-"); >> 105 SetCutValue(defaultCutValue, "e+"); 116 106 117 if (name == fEmName) return; << 107 // By default the low energy limit to produce >> 108 // secondary particles is 990 eV. >> 109 // This value is correct when using the EM Standard Physics. >> 110 // When using the Low Energy Livermore this value can be >> 111 // changed to 250 eV corresponding to the limit >> 112 // of validity of the physics models. >> 113 // Comment out following three lines if the >> 114 // Standard electromagnetic Package is adopted. >> 115 G4double lowLimit = 250. * eV; >> 116 G4double highLimit = 100. * GeV; 118 117 119 if (name == "emstandard_opt0"){ << 118 G4ProductionCutsTable::GetProductionCutsTable()->SetEnergyRange(lowLimit, 120 fEmName = name; << 119 highLimit); 121 delete fEmPhysicsList; << 122 fEmPhysicsList = new G4EmStandardPhysics() << 123 G4cout << "PhysicsList::AddPhysicsList: <" << 124 << 125 } else if (name == "emstandard_opt1"){ << 126 fEmName = name; << 127 delete fEmPhysicsList; << 128 fEmPhysicsList = new G4EmStandardPhysics_o << 129 G4cout << "PhysicsList::AddPhysicsList: <" << 130 } else if (name == "emstandard_opt2"){ << 131 fEmName = name; << 132 delete fEmPhysicsList; << 133 fEmPhysicsList = new G4EmStandardPhysics_o << 134 G4cout << "PhysicsList::AddPhysicsList: <" << 135 } else if (name == "emstandard_opt3"){ << 136 fEmName = name; << 137 delete fEmPhysicsList; << 138 fEmPhysicsList = new G4EmStandardPhysics_o << 139 G4cout << "PhysicsList::AddPhysicsList: <" << 140 } else if (name == "emstandard_opt4"){ << 141 fEmName = name; << 142 delete fEmPhysicsList; << 143 fEmPhysicsList = new G4EmStandardPhysics_o << 144 G4cout << "PhysicsList::AddPhysicsList: <" << 145 } else if (name == "empenelope"){ << 146 fEmName = name; << 147 delete fEmPhysicsList; << 148 fEmPhysicsList = new G4EmPenelopePhysics() << 149 G4cout << "PhysicsList::AddPhysicsList: <" << 150 } else if (name == "emlivermore"){ << 151 fEmName = name; << 152 delete fEmPhysicsList; << 153 fEmPhysicsList = new G4EmLivermorePhysics( << 154 G4cout << "PhysicsList::AddPhysicsList: <" << 155 } else { << 156 << 157 G4cout << "PhysicsList::AddPhysicsList: <" << 158 << " is not defined" << 159 << G4endl; << 160 } << 161 G4cout << "PhysicsList::AddPhysicsList: <" < << 162 << " is activated" << 163 << G4endl; << 164 } << 165 120 >> 121 // Print the cuts >> 122 if (verboseLevel>0) DumpCutValuesTable(); >> 123 } 166 124