Geant4 Cross Reference |
1 // 1 2 // ******************************************* 3 // * License and Disclaimer 4 // * 5 // * The Geant4 software is copyright of th 6 // * the Geant4 Collaboration. It is provided 7 // * conditions of the Geant4 Software License 8 // * LICENSE and available at http://cern.ch/ 9 // * include a list of copyright holders. 10 // * 11 // * Neither the authors of this software syst 12 // * institutes,nor the agencies providing fin 13 // * work make any representation or warran 14 // * regarding this software system or assum 15 // * use. Please see the license in the file 16 // * for the full disclaimer and the limitatio 17 // * 18 // * This code implementation is the result 19 // * technical work of the GEANT4 collaboratio 20 // * By using, copying, modifying or distri 21 // * any work based on the software) you ag 22 // * use in resulting scientific publicati 23 // * acceptance of all terms of the Geant4 Sof 24 // ******************************************* 25 // 26 // 27 /// \file Par02PhysicsList.cc 28 /// \brief Implementation of the Par02PhysicsL 29 30 #include "Par02PhysicsList.hh" 31 32 #include "G4BaryonConstructor.hh" 33 #include "G4ComptonScattering.hh" 34 #include "G4Decay.hh" 35 #include "G4FastSimulationManagerProcess.hh" 36 #include "G4GammaConversion.hh" 37 #include "G4IonConstructor.hh" 38 #include "G4LeptonConstructor.hh" 39 #include "G4Material.hh" 40 #include "G4MaterialTable.hh" 41 #include "G4MesonConstructor.hh" 42 #include "G4MuBremsstrahlung.hh" 43 #include "G4MuIonisation.hh" 44 #include "G4MuMultipleScattering.hh" 45 #include "G4MuPairProduction.hh" 46 #include "G4ParticleDefinition.hh" 47 #include "G4ParticleTable.hh" 48 #include "G4ParticleTypes.hh" 49 #include "G4PhotoElectricEffect.hh" 50 #include "G4ProcessManager.hh" 51 #include "G4ProcessVector.hh" 52 #include "G4SystemOfUnits.hh" 53 #include "G4eBremsstrahlung.hh" 54 #include "G4eIonisation.hh" 55 #include "G4eMultipleScattering.hh" 56 #include "G4eplusAnnihilation.hh" 57 #include "G4hIonisation.hh" 58 #include "G4hMultipleScattering.hh" 59 #include "G4ios.hh" 60 #include "globals.hh" 61 62 #include <iomanip> 63 64 //....oooOO0OOooo........oooOO0OOooo........oo 65 66 Par02PhysicsList::Par02PhysicsList() : G4VUser 67 { 68 SetVerboseLevel(1); 69 defaultCutValue = 0.1 * m; 70 } 71 72 //....oooOO0OOooo........oooOO0OOooo........oo 73 74 Par02PhysicsList::~Par02PhysicsList() = defaul 75 76 //....oooOO0OOooo........oooOO0OOooo........oo 77 78 void Par02PhysicsList::ConstructParticle() 79 { 80 // In this method, static member functions s 81 // which you want to use. 82 // This ensures that objects of these partic 83 ConstructBosons(); 84 ConstructLeptons(); 85 ConstructMesons(); 86 ConstructBaryons(); 87 ConstructIons(); 88 } 89 90 //....oooOO0OOooo........oooOO0OOooo........oo 91 92 void Par02PhysicsList::ConstructBosons() 93 { 94 G4Geantino::GeantinoDefinition(); 95 G4ChargedGeantino::ChargedGeantinoDefinition 96 G4Gamma::GammaDefinition(); 97 G4OpticalPhoton::OpticalPhotonDefinition(); 98 } 99 100 //....oooOO0OOooo........oooOO0OOooo........oo 101 102 void Par02PhysicsList::ConstructLeptons() 103 { 104 G4LeptonConstructor pConstructor; 105 pConstructor.ConstructParticle(); 106 } 107 108 //....oooOO0OOooo........oooOO0OOooo........oo 109 110 void Par02PhysicsList::ConstructMesons() 111 { 112 G4MesonConstructor pConstructor; 113 pConstructor.ConstructParticle(); 114 } 115 116 //....oooOO0OOooo........oooOO0OOooo........oo 117 118 void Par02PhysicsList::ConstructBaryons() 119 { 120 G4BaryonConstructor pConstructor; 121 pConstructor.ConstructParticle(); 122 } 123 124 //....oooOO0OOooo........oooOO0OOooo........oo 125 126 void Par02PhysicsList::ConstructIons() 127 { 128 G4IonConstructor pConstructor; 129 pConstructor.ConstructParticle(); 130 } 131 132 //....oooOO0OOooo........oooOO0OOooo........oo 133 134 void Par02PhysicsList::ConstructProcess() 135 { 136 AddTransportation(); 137 AddParameterisation(); 138 ConstructGeneral(); 139 } 140 141 //....oooOO0OOooo........oooOO0OOooo........oo 142 143 void Par02PhysicsList::AddTransportation() 144 { 145 // UseCoupledTransportation(); 146 G4VUserPhysicsList::AddTransportation(); 147 } 148 149 //....oooOO0OOooo........oooOO0OOooo........oo 150 151 void Par02PhysicsList::ConstructGeneral() 152 { 153 auto theDecayProcess = new G4Decay(); 154 auto particleIterator = GetParticleIterator( 155 particleIterator->reset(); 156 while ((*particleIterator)()) { 157 G4ParticleDefinition* particle = particleI 158 G4ProcessManager* pmanager = particle->Get 159 if (theDecayProcess->IsApplicable(*particl 160 pmanager->AddProcess(theDecayProcess); 161 // set ordering for PostStepDoIt and AtR 162 pmanager->SetProcessOrdering(theDecayPro 163 pmanager->SetProcessOrdering(theDecayPro 164 } 165 } 166 } 167 168 //....oooOO0OOooo........oooOO0OOooo........oo 169 170 void Par02PhysicsList::AddParameterisation() 171 { 172 G4FastSimulationManagerProcess* fastSimProce 173 174 // Registers the fastSimProcess with all the 175 // continuous process (this works in all cas 176 // geometries are not used, as in this examp 177 // add it as a discrete process). 178 auto particleIterator = GetParticleIterator( 179 particleIterator->reset(); 180 while ((*particleIterator)()) { 181 G4ParticleDefinition* particle = particleI 182 G4ProcessManager* pmanager = particle->Get 183 // pmanager->AddDiscreteProcess( fastSimPr 184 pmanager->AddProcess(fastSimProcess, -1, 0 185 } 186 } 187 188 //....oooOO0OOooo........oooOO0OOooo........oo 189 190 void Par02PhysicsList::SetCuts() 191 { 192 if (verboseLevel > 1) { 193 G4cout << "Par02PhysicsList::SetCuts:"; 194 } 195 SetCutsWithDefault(); 196 } 197 198 //....oooOO0OOooo........oooOO0OOooo........oo 199