Geant4 Cross Reference |
1 // 2 // ******************************************************************** 3 // * License and Disclaimer * 4 // * * 5 // * The Geant4 software is copyright of the Copyright Holders of * 6 // * the Geant4 Collaboration. It is provided under the terms and * 7 // * conditions of the Geant4 Software License, included in the file * 8 // * LICENSE and available at http://cern.ch/geant4/license . These * 9 // * include a list of copyright holders. * 10 // * * 11 // * Neither the authors of this software system, nor their employing * 12 // * institutes,nor the agencies providing financial support for this * 13 // * work make any representation or warranty, express or implied, * 14 // * regarding this software system or assume any liability for its * 15 // * use. Please see the license in the file LICENSE and URL above * 16 // * for the full disclaimer and the limitation of liability. * 17 // * * 18 // * This code implementation is the result of the scientific and * 19 // * technical work of the GEANT4 collaboration. * 20 // * By using, copying, modifying or distributing the software (or * 21 // * any work based on the software) you agree to acknowledge its * 22 // * use in resulting scientific publications, and indicate your * 23 // * acceptance of all terms of the Geant4 Software license. * 24 // ******************************************************************** 25 // 26 // 27 /// \file XrayTESdetPhysicsList.cc 28 /// \brief Implementation of the PhysicsList class 29 // 30 // Authors: P.Dondero (paolo.dondero@cern.ch), R.Stanzani (ronny.stanzani@cern.ch) 31 // 32 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 33 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 34 35 36 #include "G4VUserPhysicsList.hh" 37 #include "XrayTESdetPhysicsList.hh" 38 #include "XrayTESdetPhysicsListMessenger.hh" 39 40 #include "G4RadioactiveDecayPhysics.hh" 41 #include "G4DecayPhysics.hh" 42 #include "G4EmStandardPhysics.hh" 43 #include "G4EmStandardPhysics_option1.hh" 44 #include "G4EmStandardPhysics_option2.hh" 45 #include "G4EmStandardPhysics_option3.hh" 46 #include "G4EmStandardPhysics_option4.hh" 47 #include "G4EmStandardPhysicsSS.hh" 48 49 #include "G4EmStandardPhysics_SpacePhysics.hh" 50 #include "G4EmLivermorePhysics.hh" 51 #include "G4EmPenelopePhysics.hh" 52 #include "G4HadronElasticPhysics.hh" 53 #include "G4HadronElasticPhysicsXS.hh" 54 #include "G4HadronElasticPhysicsHP.hh" 55 #include "G4ChargeExchangePhysics.hh" 56 #include "G4NeutronTrackingCut.hh" 57 #include "G4NeutronCrossSectionXS.hh" 58 #include "G4StoppingPhysics.hh" 59 #include "G4IonBinaryCascadePhysics.hh" 60 #include "G4IonPhysics.hh" 61 #include "G4EmExtraPhysics.hh" 62 63 #include "G4HadronPhysicsFTFP_BERT.hh" 64 #include "G4HadronPhysicsFTFP_BERT_HP.hh" 65 #include "G4HadronPhysicsFTF_BIC.hh" 66 #include "G4HadronInelasticQBBC.hh" 67 #include "G4HadronPhysicsQGSP_BERT.hh" 68 #include "G4HadronPhysicsQGSP_BERT_HP.hh" 69 #include "G4HadronPhysicsQGSP_BIC.hh" 70 #include "G4HadronPhysicsQGSP_BIC_HP.hh" 71 #include "G4HadronPhysicsQGSP_FTFP_BERT.hh" 72 #include "G4HadronPhysicsQGS_BIC.hh" 73 74 #include "G4LossTableManager.hh" 75 #include "G4ProcessManager.hh" 76 #include "G4ParticleTypes.hh" 77 #include "G4ParticleTable.hh" 78 #include "G4Gamma.hh" 79 #include "G4Electron.hh" 80 #include "G4Positron.hh" 81 #include "G4Proton.hh" 82 83 #include "G4Region.hh" 84 #include "G4RegionStore.hh" 85 #include "G4SystemOfUnits.hh" 86 #include "G4PhysicalConstants.hh" 87 88 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo..... 89 90 XrayTESdetPhysicsList::XrayTESdetPhysicsList() : fMessenger(nullptr), fEmPhysicsList(nullptr), fParticleList(nullptr) 91 { 92 fMessenger = new XrayTESdetPhysicsListMessenger(this); 93 G4LossTableManager::Instance(); 94 verboseLevel = 1; 95 96 // Particles 97 G4cout << "1 - Defining DecayPhysics" << G4endl; 98 fParticleList = new G4DecayPhysics("decays"); 99 100 // Radioactive decay 101 G4cout << "2 - Defining RadioactiveDecayPhysics" << G4endl; 102 RegisterPhysics(new G4RadioactiveDecayPhysics()); 103 104 // EM physics 105 G4cout << "3 - Defining Standard em" << G4endl; 106 fEmName = G4String("local"); 107 //fEmPhysicsList = new PhysListEmStandard(fEmName); 108 fEmPhysicsList = new G4EmStandardPhysics(); 109 } 110 111 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo..... 112 113 XrayTESdetPhysicsList::~XrayTESdetPhysicsList() 114 { 115 delete fParticleList; 116 delete fEmPhysicsList; 117 delete fMessenger; 118 for(size_t i=0; i<fHadronPhys.size(); i++) 119 { 120 delete fHadronPhys[i]; 121 } 122 } 123 124 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo..... 125 126 void XrayTESdetPhysicsList::ConstructParticle() 127 { 128 fParticleList->ConstructParticle(); 129 } 130 131 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo..... 132 133 void XrayTESdetPhysicsList::ConstructProcess() 134 { 135 AddTransportation(); 136 fEmPhysicsList->ConstructProcess(); 137 fParticleList->ConstructProcess(); 138 for(size_t i=0; i<fHadronPhys.size(); i++) 139 { 140 fHadronPhys[i]->ConstructProcess(); 141 } 142 143 // Em options 144 G4cout << "4 - Defining em options" << G4endl; 145 G4EmParameters* param = G4EmParameters::Instance(); 146 param->SetDeexActiveRegion("InnerRegion", true, true, true); 147 148 param->SetAuger(true); 149 param->SetAugerCascade(false); 150 param->SetFluo(true); 151 param->SetPixe(true); 152 param->SetDeexcitationIgnoreCut(false); 153 154 param->SetMuHadLateralDisplacement(false); 155 param->SetBremsstrahlungTh(10*TeV); 156 param->Dump(); 157 } 158 159 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo..... 160 161 void XrayTESdetPhysicsList::AddPhysicsList(const G4String& name) 162 { 163 if (verboseLevel>0) 164 { 165 G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" << G4endl; 166 } 167 168 if (name == fEmName) 169 { 170 return; 171 } 172 173 if (name == "SpacePhysics") 174 { 175 delete fEmPhysicsList; 176 G4cout << "X - Defining SpacePhysics, no hadronic part" << G4endl; 177 fEmName = name; 178 fEmPhysicsList = new G4EmStandardPhysics_SpacePhysics(); 179 } 180 else if (name == "SpacePhysics_QBBC") 181 { 182 delete fEmPhysicsList; 183 G4cout << "X - Defining SpacePhysics" << G4endl; 184 fEmName = name; 185 fEmPhysicsList = new G4EmStandardPhysics_SpacePhysics(); 186 fSetBuilderList1(false); 187 fHadronPhys.push_back(new G4HadronInelasticQBBC(verboseLevel)); 188 } 189 else if (name == "opt4_QGSP") 190 { 191 delete fEmPhysicsList; 192 fEmName = name; 193 G4cout << "X - Defining opt4+QGSP no HP physics" << G4endl; 194 fEmPhysicsList = new G4EmStandardPhysics_option4(); 195 fSetBuilderList1(false); 196 fHadronPhys.push_back( new G4HadronPhysicsQGSP_BERT_HP()); 197 } 198 else if (name == "opt4_QBBC") 199 { 200 delete fEmPhysicsList; 201 fEmName = name; 202 G4cout << "X - Defining opt4+QBBC physics" << G4endl; 203 fEmPhysicsList = new G4EmStandardPhysics_option4(); 204 fSetBuilderList1(false); 205 fHadronPhys.push_back(new G4HadronInelasticQBBC(verboseLevel)); 206 } 207 else if (name == "emstandard_opt4") 208 { 209 delete fEmPhysicsList; 210 G4cout << "X - Defining opt4" << G4endl; 211 fEmName = name; 212 fEmPhysicsList = new G4EmStandardPhysics_option4(); 213 } 214 else if (name == "emstandardSS") 215 { 216 delete fEmPhysicsList; 217 G4cout << "X - Defining SS" << G4endl; 218 fEmName = name; 219 fEmPhysicsList = new G4EmStandardPhysicsSS(); 220 } 221 else 222 { 223 G4cout << "PhysicsList::AddPhysicsList: <" << name << ">" 224 << " is not defined" 225 << G4endl; 226 } 227 } 228 229 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo..... 230 231 void XrayTESdetPhysicsList::fSetBuilderList1(G4bool flagHP) 232 { 233 fHadronPhys.push_back( new G4EmExtraPhysics(verboseLevel)); 234 if(flagHP) 235 { 236 fHadronPhys.push_back( new G4HadronElasticPhysicsHP(verboseLevel)); 237 } 238 else 239 { 240 fHadronPhys.push_back( new G4HadronElasticPhysics(verboseLevel)); 241 } 242 fHadronPhys.push_back(new G4StoppingPhysics(verboseLevel)); 243 fHadronPhys.push_back(new G4IonPhysics(verboseLevel)); 244 fHadronPhys.push_back(new G4NeutronTrackingCut(verboseLevel)); 245 } 246 247 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 248