00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032 #include "globals.hh"
00033
00034 #include "G4PhysicalConstants.hh"
00035 #include "G4SystemOfUnits.hh"
00036
00037 #include "G4ErrorPhysicsList.hh"
00038 #include "G4ComptonScattering.hh"
00039 #include "G4GammaConversion.hh"
00040 #include "G4PhotoElectricEffect.hh"
00041
00042 #include "G4eIonisation.hh"
00043 #include "G4eBremsstrahlung.hh"
00044 #include "G4eplusAnnihilation.hh"
00045
00046 #include "G4MuIonisation.hh"
00047 #include "G4MuBremsstrahlung.hh"
00048 #include "G4MuPairProduction.hh"
00049
00050 #include "G4hIonisation.hh"
00051
00052 #include "G4MuIonisation.hh"
00053 #include "G4MuBremsstrahlung.hh"
00054 #include "G4MuPairProduction.hh"
00055
00056 #include "G4hIonisation.hh"
00057
00058 #include "G4ParticleDefinition.hh"
00059 #include "G4ProcessManager.hh"
00060 #include "G4ProcessVector.hh"
00061 #include "G4ParticleTypes.hh"
00062 #include "G4ParticleTable.hh"
00063 #include "G4Material.hh"
00064 #include "G4MaterialTable.hh"
00065 #include "G4ios.hh"
00066 #include "G4PhysicsTable.hh"
00067 #include "G4Transportation.hh"
00068
00069 #include "G4ErrorEnergyLoss.hh"
00070
00071
00072 G4ErrorPhysicsList::G4ErrorPhysicsList(): G4VUserPhysicsList()
00073 {
00074 defaultCutValue = 1.0E+9*cm;
00075 }
00076
00077
00078
00079 G4ErrorPhysicsList::~G4ErrorPhysicsList()
00080 {
00081 }
00082
00083
00084
00085 void G4ErrorPhysicsList::ConstructParticle()
00086 {
00087
00088
00089
00090
00091
00092 G4Gamma::GammaDefinition();
00093
00094 G4Electron::ElectronDefinition();
00095 G4Positron::PositronDefinition();
00096
00097 G4MuonPlus::MuonPlusDefinition();
00098 G4MuonMinus::MuonMinusDefinition();
00099
00100
00101 G4PionPlus::PionPlusDefinition();
00102 G4PionMinus::PionMinusDefinition();
00103
00104
00105 G4Proton::ProtonDefinition();
00106
00107 }
00108
00109
00110
00111 void G4ErrorPhysicsList::ConstructProcess()
00112 {
00113 G4Transportation* theTransportationProcess= new G4Transportation();
00114
00115 #ifdef G4VERBOSE
00116 if (verboseLevel >= 4){
00117 G4cout << "G4VUserPhysicsList::ConstructProcess() "<< G4endl;
00118 }
00119 #endif
00120
00121
00122 theParticleIterator->reset();
00123 while( (*theParticleIterator)() ){
00124 G4ParticleDefinition* particle = theParticleIterator->value();
00125 G4ProcessManager* pmanager = particle->GetProcessManager();
00126 if (!particle->IsShortLived()) {
00127 G4cout << particle << "G4ErrorPhysicsList:: particle process manager " << particle->GetParticleName() << " = " << particle->GetProcessManager() << G4endl;
00128
00129 if ( pmanager == 0) {
00130
00131 G4String particleName = particle->GetParticleName();
00132 G4Exception("G4ErrorPhysicsList::ConstructProcess","No process manager",
00133 RunMustBeAborted, particleName );
00134 } else {
00135
00136 pmanager ->AddProcess(theTransportationProcess);
00137 pmanager ->SetProcessOrderingToFirst(theTransportationProcess, idxAlongStep);
00138 pmanager ->SetProcessOrderingToFirst(theTransportationProcess, idxPostStep);
00139 }
00140 } else {
00141
00142 }
00143 }
00144
00145 ConstructEM();
00146 }
00147
00148
00149
00150 #include "G4eBremsstrahlung.hh"
00151 #include "G4eIonisation.hh"
00152
00153 #include "G4eIonisation.hh"
00154
00155 #include "G4MuBremsstrahlung.hh"
00156 #include "G4MuIonisation.hh"
00157 #include "G4MuPairProduction.hh"
00158
00159 #include "G4PhysicsTable.hh"
00160
00161 #include "G4MuIonisation.hh"
00162
00163 #include "G4ErrorStepLengthLimitProcess.hh"
00164 #include "G4ErrorMagFieldLimitProcess.hh"
00165 #include "G4ErrorMessenger.hh"
00166
00167 void G4ErrorPhysicsList::ConstructEM()
00168 {
00169
00170 G4ErrorEnergyLoss* eLossProcess = new G4ErrorEnergyLoss;
00171 G4ErrorStepLengthLimitProcess* stepLengthLimitProcess = new G4ErrorStepLengthLimitProcess;
00172 G4ErrorMagFieldLimitProcess* magFieldLimitProcess = new G4ErrorMagFieldLimitProcess;
00173 new G4ErrorMessenger( stepLengthLimitProcess, magFieldLimitProcess, eLossProcess );
00174
00175 theParticleIterator->reset();
00176 while( (*theParticleIterator)() ){
00177 G4ParticleDefinition* particle = theParticleIterator->value();
00178 G4ProcessManager* pmanager = particle->GetProcessManager();
00179 G4String particleName = particle->GetParticleName();
00180
00181 if (particleName == "gamma") {
00182
00183 pmanager->AddDiscreteProcess(new G4GammaConversion());
00184 pmanager->AddDiscreteProcess(new G4ComptonScattering());
00185 pmanager->AddDiscreteProcess(new G4PhotoElectricEffect());
00186
00187
00188
00189 }else if (!particle->IsShortLived() && particle->GetPDGCharge() != 0 ) {
00190
00191 pmanager->AddContinuousProcess(eLossProcess,1);
00192 pmanager->AddDiscreteProcess( stepLengthLimitProcess, 2 );
00193 pmanager->AddDiscreteProcess( magFieldLimitProcess, 3 );
00194
00195
00196
00197
00198
00199
00200
00202
00203
00204
00205
00206
00208
00209
00210
00211
00212
00213
00214
00215
00216
00217
00219
00220 }
00221 }
00222 }
00223
00224
00225
00226 void G4ErrorPhysicsList::SetCuts()
00227 {
00228
00229
00230 SetCutsWithDefault();
00231
00232
00233 }
00234