00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #include "Physics.h"
00019
00020
00021
00022 #include "globals.hh"
00023
00024 #include "G4ProcessManager.hh"
00025 #include "G4ParticleTypes.hh"
00026
00027 #include "G4ComptonScattering.hh"
00028 #include "G4GammaConversion.hh"
00029 #include "G4PhotoElectricEffect.hh"
00030
00031 #include "G4eMultipleScattering.hh"
00032 #include "G4eIonisation.hh"
00033 #include "G4eBremsstrahlung.hh"
00034 #include "G4eplusAnnihilation.hh"
00035
00036 #include "G4MuMultipleScattering.hh"
00037 #include "G4MuIonisation.hh"
00038 #include "G4MuBremsstrahlung.hh"
00039 #include "G4MuPairProduction.hh"
00040
00041 #include "G4hMultipleScattering.hh"
00042 #include "G4hIonisation.hh"
00043
00044 #include "G4StepLimiter.hh"
00045 #include "G4UserSpecialCuts.hh"
00046
00047 #include "G4Decay.hh"
00048
00049
00050
00051 Physics::Physics(): G4VUserPhysicsList() {
00052
00053
00054
00055 defaultCutValue = 1.0 * cm;
00056
00057
00058
00059 SetVerboseLevel(0);
00060 }
00061
00062
00063
00064 Physics::~Physics() {}
00065
00066
00067
00068 void Physics::ConstructParticle() {
00069
00070
00071
00072 ConstructBosons();
00073 ConstructLeptons();
00074 ConstructMesons();
00075 ConstructBaryons();
00076 }
00077
00078
00079
00080 void Physics::ConstructBosons() {
00081
00082
00083
00084 G4Geantino::GeantinoDefinition();
00085 G4ChargedGeantino::ChargedGeantinoDefinition();
00086
00087
00088
00089 G4Gamma::GammaDefinition();
00090 }
00091
00092
00093
00094 void Physics::ConstructLeptons() {
00095
00096
00097
00098 G4Electron::ElectronDefinition();
00099 G4Positron::PositronDefinition();
00100
00101
00102
00103 G4MuonPlus::MuonPlusDefinition();
00104 G4MuonMinus::MuonMinusDefinition();
00105
00106
00107
00108 G4NeutrinoE::NeutrinoEDefinition();
00109 G4AntiNeutrinoE::AntiNeutrinoEDefinition();
00110
00111
00112
00113 G4NeutrinoMu::NeutrinoMuDefinition();
00114 G4AntiNeutrinoMu::AntiNeutrinoMuDefinition();
00115 }
00116
00117
00118
00119 void Physics::ConstructMesons() {
00120
00121
00122
00123 G4PionPlus::PionPlusDefinition();
00124 G4PionMinus::PionMinusDefinition();
00125 G4PionZero::PionZeroDefinition();
00126
00127 G4Eta::EtaDefinition();
00128 G4EtaPrime::EtaPrimeDefinition();
00129
00130 G4KaonPlus::KaonPlusDefinition();
00131 G4KaonMinus::KaonMinusDefinition();
00132 G4KaonZero::KaonZeroDefinition();
00133 G4AntiKaonZero::AntiKaonZeroDefinition();
00134 G4KaonZeroLong::KaonZeroLongDefinition();
00135 G4KaonZeroShort::KaonZeroShortDefinition();
00136 }
00137
00138
00139
00140 void Physics::ConstructBaryons() {
00141
00142
00143
00144 G4Proton::ProtonDefinition();
00145 G4AntiProton::AntiProtonDefinition();
00146
00147 G4Neutron::NeutronDefinition();
00148 G4AntiNeutron::AntiNeutronDefinition();
00149 }
00150
00151
00152
00153 void Physics::ConstructProcess() {
00154 AddTransportation();
00155 ConstructEM();
00156 ConstructGeneral();
00157 }
00158
00159
00160
00161 void Physics::ConstructGeneral() {
00162
00163
00164
00165 G4Decay* theDecayProcess = new G4Decay();
00166 theParticleIterator->reset();
00167
00168 while( ( *theParticleIterator )() ){
00169
00170 G4ParticleDefinition* particle = theParticleIterator->value();
00171 G4ProcessManager* pmanager = particle->GetProcessManager();
00172
00173 if( theDecayProcess->IsApplicable(*particle) ) {
00174
00175 pmanager ->AddProcess(theDecayProcess);
00176
00177 pmanager ->SetProcessOrdering(theDecayProcess, idxPostStep);
00178 pmanager ->SetProcessOrdering(theDecayProcess, idxAtRest);
00179 }
00180 }
00181 }
00182
00183
00184
00185 void Physics::ConstructEM() {
00186
00187 theParticleIterator->reset();
00188
00189 while( ( *theParticleIterator )() ) {
00190
00191 G4ParticleDefinition * particle = theParticleIterator->value();
00192 G4ProcessManager * pmanager = particle->GetProcessManager();
00193 G4String particleName = particle->GetParticleName();
00194
00195 if (particleName == "gamma") {
00196
00197 pmanager->AddDiscreteProcess(new G4PhotoElectricEffect);
00198 pmanager->AddDiscreteProcess(new G4ComptonScattering);
00199 pmanager->AddDiscreteProcess(new G4GammaConversion);
00200
00201 }
00202 else if( particleName == "e-" ) {
00203
00204 pmanager->AddProcess(new G4eMultipleScattering,-1, 1, 1 );
00205 pmanager->AddProcess(new G4eIonisation, -1, 2, 2 );
00206 pmanager->AddProcess(new G4eBremsstrahlung, -1, -3, 3 );
00207
00208 }
00209 else if( particleName == "e+" ) {
00210
00211 pmanager->AddProcess(new G4eMultipleScattering, -1, 1, 1 );
00212 pmanager->AddProcess(new G4eIonisation, -1, 2, 2 );
00213 pmanager->AddProcess(new G4eBremsstrahlung, -1, -3, 3 );
00214 pmanager->AddProcess(new G4eplusAnnihilation, 0, -1, 4 );
00215
00216 }
00217 else if( particleName == "mu+" || particleName == "mu-" ) {
00218
00219 pmanager->AddProcess(new G4MuMultipleScattering, -1, 1, 1 );
00220 pmanager->AddProcess(new G4MuIonisation, -1, 2, 2 );
00221 pmanager->AddProcess(new G4MuBremsstrahlung, -1, -3, 3 );
00222 pmanager->AddProcess(new G4MuPairProduction, -1, -4, 4 );
00223
00224 }
00225 else if( !( particle->IsShortLived() ) &&
00226 particle->GetPDGCharge() != 0.0 &&
00227 particle->GetParticleName() != "chargedgeantino" ) {
00228
00229
00230 pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1 );
00231 pmanager->AddProcess(new G4hIonisation, -1, 2, 2 );
00232 pmanager->AddProcess(new G4MuBremsstrahlung, -1, -3, 3 );
00233 pmanager->AddProcess(new G4MuPairProduction, -1, -4, 4 );
00234
00235
00236
00237 }
00238 }
00239 }
00240
00241
00242
00243 void Physics::SetCuts() {
00244
00245
00246
00247
00248 SetCutsWithDefault();
00249
00250 if( verboseLevel > 0 ) DumpCutValuesTable();
00251 }