Changeset 1230 for trunk/examples/extended/electromagnetic/TestEm1/src
- Timestamp:
- Jan 8, 2010, 3:02:48 PM (14 years ago)
- Location:
- trunk/examples/extended/electromagnetic/TestEm1/src
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/examples/extended/electromagnetic/TestEm1/src/DetectorConstruction.cc
r807 r1230 27 27 // 28 28 // $Id: DetectorConstruction.cc,v 1.8 2007/11/12 15:48:58 maire Exp $ 29 // GEANT4 tag $Name: $29 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 30 30 // 31 31 // -
trunk/examples/extended/electromagnetic/TestEm1/src/DetectorMessenger.cc
r807 r1230 25 25 // 26 26 // $Id: DetectorMessenger.cc,v 1.3 2006/06/29 16:36:57 gunter Exp $ 27 // GEANT4 tag $Name: $27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/electromagnetic/TestEm1/src/EventAction.cc
r807 r1230 26 26 // 27 27 // $Id: EventAction.cc,v 1.7 2007/11/12 15:48:58 maire Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 29 29 // 30 30 // -
trunk/examples/extended/electromagnetic/TestEm1/src/EventActionMessenger.cc
r807 r1230 25 25 // 26 26 // $Id: EventActionMessenger.cc,v 1.3 2006/06/29 16:37:01 gunter Exp $ 27 // GEANT4 tag $Name: $27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/electromagnetic/TestEm1/src/HistoManager.cc
r807 r1230 24 24 // ******************************************************************** 25 25 // 26 // $Id: HistoManager.cc,v 1.1 0 2007/11/12 15:48:58maire Exp $27 // GEANT4 tag $Name: geant4-09-0 1-patch-02$26 // $Id: HistoManager.cc,v 1.13 2008/09/12 16:32:25 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... … … 54 54 55 55 fileName[0] = "testem1"; 56 fileType = " hbook";57 fileOption = " --noErrors uncompress";56 fileType = "root"; 57 fileOption = "export=root"; 58 58 // histograms 59 59 for (G4int k=0; k<MaxHisto; k++) { … … 215 215 void HistoManager::PrintHisto(G4int ih) 216 216 { 217 if (ih < MaxHisto) ascii[ih] = true;217 if (ih < MaxHisto) { ascii[ih] = true; ascii[0] = true; } 218 218 else 219 219 G4cout << "---> warning from HistoManager::PrintHisto() : histo " << ih … … 228 228 { 229 229 #ifdef G4ANALYSIS_USE 230 231 if (!ascii[0]) return; 230 232 231 233 G4String name = fileName[0] + ".ascii"; … … 241 243 for (G4int iBin=0; iBin<Nbins[ih]; iBin++) { 242 244 File << " " << iBin << "\t" 243 << histo[ih]->binMean(iBin) << "\t" 245 << 0.5*(histo[ih]->axis().binLowerEdge(iBin) + 246 histo[ih]->axis().binUpperEdge(iBin)) << "\t" 244 247 << histo[ih]->binHeight(iBin) 245 248 << G4endl; -
trunk/examples/extended/electromagnetic/TestEm1/src/HistoMessenger.cc
r807 r1230 25 25 // 26 26 // $Id: HistoMessenger.cc,v 1.6 2007/11/12 15:48:58 maire Exp $ 27 // GEANT4 tag $Name: $27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/electromagnetic/TestEm1/src/PhysListEmStandard.cc
r807 r1230 25 25 // 26 26 // 27 // $Id: PhysListEmStandard.cc,v 1. 14 2007/06/20 15:26:33maire Exp $28 // GEANT4 tag $Name: $27 // $Id: PhysListEmStandard.cc,v 1.21 2009/11/13 15:44:28 maire Exp $ 28 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 29 29 // 30 30 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... … … 39 39 #include "G4PhotoElectricEffect.hh" 40 40 41 #include "G4 MultipleScattering.hh"42 41 #include "G4eMultipleScattering.hh" 42 #include "G4UrbanMscModel93.hh" 43 43 #include "G4eIonisation.hh" 44 44 #include "G4eBremsstrahlung.hh" 45 45 #include "G4eplusAnnihilation.hh" 46 46 47 #include "G4MuMultipleScattering.hh" 47 48 #include "G4MuIonisation.hh" 48 49 #include "G4MuBremsstrahlung.hh" 49 50 #include "G4MuPairProduction.hh" 50 51 52 #include "G4hMultipleScattering.hh" 51 53 #include "G4hIonisation.hh" 54 #include "G4hBremsstrahlung.hh" 55 #include "G4hPairProduction.hh" 56 52 57 #include "G4ionIonisation.hh" 53 58 … … 86 91 } else if (particleName == "e-") { 87 92 //electron 88 pmanager->AddProcess(new G4MultipleScattering, -1, 1, 1); 89 pmanager->AddProcess(new G4eIonisation, -1, 2, 2); 90 pmanager->AddProcess(new G4eBremsstrahlung, -1, 3, 3); 93 G4eMultipleScattering* msc = new G4eMultipleScattering(); 94 msc->AddEmModel(0, new G4UrbanMscModel93()); 95 pmanager->AddProcess(msc, -1, 1, 1); 96 pmanager->AddProcess(new G4eIonisation, -1, 2, 2); 97 pmanager->AddProcess(new G4eBremsstrahlung, -1, 3, 3); 91 98 92 99 } else if (particleName == "e+") { 93 100 //positron 94 pmanager->AddProcess(new G4MultipleScattering, -1, 1, 1); 95 pmanager->AddProcess(new G4eIonisation, -1, 2, 2); 96 pmanager->AddProcess(new G4eBremsstrahlung, -1, 3, 3); 97 pmanager->AddProcess(new G4eplusAnnihilation, 0,-1, 4); 101 G4eMultipleScattering* msc = new G4eMultipleScattering(); 102 msc->AddEmModel(0, new G4UrbanMscModel93()); 103 pmanager->AddProcess(msc, -1, 1, 1); 104 pmanager->AddProcess(new G4eIonisation, -1, 2, 2); 105 pmanager->AddProcess(new G4eBremsstrahlung, -1, 3, 3); 106 pmanager->AddProcess(new G4eplusAnnihilation, 0,-1, 4); 98 107 99 108 } else if( particleName == "mu+" || 100 109 particleName == "mu-" ) { 101 110 //muon 102 pmanager->AddProcess(new G4MultipleScattering,-1, 1, 1); 103 pmanager->AddProcess(new G4MuIonisation, -1, 2, 2); 104 pmanager->AddProcess(new G4MuBremsstrahlung, -1, 3, 3); 105 pmanager->AddProcess(new G4MuPairProduction, -1, 4, 4); 106 107 } else if( particleName == "alpha" || particleName == "He3" 108 || particleName == "GenericIon" ) { 111 pmanager->AddProcess(new G4MuMultipleScattering,-1, 1, 1); 112 pmanager->AddProcess(new G4MuIonisation, -1, 2, 2); 113 pmanager->AddProcess(new G4MuBremsstrahlung, -1, 3, 3); 114 pmanager->AddProcess(new G4MuPairProduction, -1, 4, 4); 115 116 } else if( particleName == "proton" || 117 particleName == "pi-" || 118 particleName == "pi+" ) { 119 //proton 120 pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1); 121 pmanager->AddProcess(new G4hIonisation, -1, 2, 2); 122 pmanager->AddProcess(new G4hBremsstrahlung, -1, 3, 3); 123 pmanager->AddProcess(new G4hPairProduction, -1, 4, 4); 124 125 } else if( particleName == "alpha" || 126 particleName == "He3" || 127 particleName == "GenericIon" ) { 109 128 110 pmanager->AddProcess(new G4 MultipleScattering,-1, 1, 1);111 pmanager->AddProcess(new G4ionIonisation, -1, 2, 2);129 pmanager->AddProcess(new G4hMultipleScattering,-1, 1, 1); 130 pmanager->AddProcess(new G4ionIonisation, -1, 2, 2); 112 131 113 132 } else if ((!particle->IsShortLived()) && … … 115 134 (particle->GetParticleName() != "chargedgeantino")) { 116 135 //all others charged particles except geantino 117 pmanager->AddProcess(new G4 MultipleScattering,-1, 1, 1);118 pmanager->AddProcess(new G4hIonisation, -1, 2, 2);136 pmanager->AddProcess(new G4hMultipleScattering,-1, 1, 1); 137 pmanager->AddProcess(new G4hIonisation, -1, 2, 2); 119 138 } 120 139 } 121 140 122 141 // Em options 123 142 // 143 // Main options and setting parameters are shown here. 144 // Several of them have default values. 145 // 124 146 G4EmProcessOptions emOptions; 125 126 // coulomb scattering147 148 //physics tables 127 149 // 128 emOptions.SetMscStepLimitation(fUseDistanceToBoundary); 129 emOptions.SetSkin(2.); 130 150 emOptions.SetMinEnergy(100*eV); //default 151 emOptions.SetMaxEnergy(100*TeV); //default 152 emOptions.SetDEDXBinning(12*20); //default=12*7 153 emOptions.SetLambdaBinning(12*20); //default=12*7 154 emOptions.SetSplineFlag(true); //default 155 156 //multiple coulomb scattering 157 // 158 emOptions.SetMscStepLimitation(fUseDistanceToBoundary); //default=fUseSafety 159 emOptions.SetMscRangeFactor(0.04); //default 160 emOptions.SetMscGeomFactor (2.5); //default 161 emOptions.SetSkin(3.); //default 162 131 163 //energy loss 132 164 // 133 emOptions.Set LinearLossLimit(1.e-6);134 emOptions.Set StepFunction(0.2, 100*um);165 emOptions.SetStepFunction(0.2, 100*um); //default=(0.2, 1*mm) 166 emOptions.SetLinearLossLimit(1.e-2); //default 135 167 136 168 //ionization 137 169 // 138 emOptions.SetSubCutoff(true); 139 140 // define high energy threshold for bremstrahlung 141 // 142 emOptions.SetBremsstrahlungTh(10.*GeV); 170 emOptions.SetSubCutoff(false); //default=false 143 171 } 144 172 -
trunk/examples/extended/electromagnetic/TestEm1/src/PhysicsList.cc
r807 r1230 25 25 // 26 26 // 27 // $Id: PhysicsList.cc,v 1.1 0 2006/10/19 17:24:13maire Exp $28 // GEANT4 tag $Name: $27 // $Id: PhysicsList.cc,v 1.12 2009/09/15 12:51:49 maire Exp $ 28 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 29 29 // 30 30 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... … … 35 35 36 36 #include "PhysListEmStandard.hh" 37 #include "PhysListEmLivermore.hh" 38 #include "PhysListEmPenelope.hh" 37 38 #include "G4EmStandardPhysics.hh" 39 #include "G4EmStandardPhysics_option1.hh" 40 #include "G4EmStandardPhysics_option2.hh" 41 #include "G4EmStandardPhysics_option3.hh" 42 #include "G4EmLivermorePhysics.hh" 43 #include "G4EmPenelopePhysics.hh" 39 44 40 45 #include "DetectorConstruction.hh" … … 61 66 62 67 // EM physics 63 emName = G4String(" standard");68 emName = G4String("local"); 64 69 emPhysicsList = new PhysListEmStandard(emName); 65 70 … … 189 194 G4EmProcessOptions emOptions; 190 195 emOptions.SetBuildCSDARange(true); 191 196 emOptions.SetDEDXBinningForCSDARange(8*20); 197 192 198 // Decay Process 193 199 // … … 209 215 if (name == emName) return; 210 216 211 if (name == " standard") {217 if (name == "local") { 212 218 213 219 emName = name; 214 220 delete emPhysicsList; 215 221 emPhysicsList = new PhysListEmStandard(name); 216 217 } else if (name == "livermore") {218 219 emName = name;220 delete emPhysicsList;221 emPhysicsList = new PhysListEmLivermore(name);222 222 223 } else if (name == "penelope") { 224 225 emName = name; 226 delete emPhysicsList; 227 emPhysicsList = new PhysListEmPenelope(name); 228 223 } else if (name == "emstandard_opt0") { 224 225 emName = name; 226 delete emPhysicsList; 227 emPhysicsList = new G4EmStandardPhysics(); 228 229 } else if (name == "emstandard_opt1") { 230 231 emName = name; 232 delete emPhysicsList; 233 emPhysicsList = new G4EmStandardPhysics_option1(); 234 235 } else if (name == "emstandard_opt2") { 236 237 emName = name; 238 delete emPhysicsList; 239 emPhysicsList = new G4EmStandardPhysics_option2(); 240 241 } else if (name == "emstandard_opt3") { 242 243 emName = name; 244 delete emPhysicsList; 245 emPhysicsList = new G4EmStandardPhysics_option3(); 246 247 } else if (name == "emlivermore") { 248 emName = name; 249 delete emPhysicsList; 250 emPhysicsList = new G4EmLivermorePhysics(); 251 252 } else if (name == "empenelope") { 253 emName = name; 254 delete emPhysicsList; 255 emPhysicsList = new G4EmPenelopePhysics(); 256 229 257 } else { 230 258 -
trunk/examples/extended/electromagnetic/TestEm1/src/PhysicsListMessenger.cc
r807 r1230 25 25 // 26 26 // $Id: PhysicsListMessenger.cc,v 1.3 2006/06/29 16:37:19 gunter Exp $ 27 // GEANT4 tag $Name: $27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/electromagnetic/TestEm1/src/PrimaryGeneratorAction.cc
r807 r1230 26 26 // 27 27 // $Id: PrimaryGeneratorAction.cc,v 1.4 2006/06/29 16:37:21 gunter Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 29 29 // 30 30 // -
trunk/examples/extended/electromagnetic/TestEm1/src/PrimaryGeneratorMessenger.cc
r807 r1230 25 25 // 26 26 // $Id: PrimaryGeneratorMessenger.cc,v 1.4 2006/06/29 16:37:23 gunter Exp $ 27 // GEANT4 tag $Name: $27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/electromagnetic/TestEm1/src/RunAction.cc
r807 r1230 25 25 // 26 26 // $Id: RunAction.cc,v 1.19 2006/06/29 16:37:25 gunter Exp $ 27 // GEANT4 tag $Name: $27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/electromagnetic/TestEm1/src/StepMax.cc
r807 r1230 25 25 // 26 26 // $Id: StepMax.cc,v 1.2 2006/06/29 16:37:27 gunter Exp $ 27 // GEANT4 tag $Name: $27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/electromagnetic/TestEm1/src/StepMaxMessenger.cc
r807 r1230 25 25 // 26 26 // $Id: StepMaxMessenger.cc,v 1.2 2006/06/29 16:37:29 gunter Exp $ 27 // GEANT4 tag $Name: $27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/electromagnetic/TestEm1/src/SteppingAction.cc
r807 r1230 25 25 // 26 26 // $Id: SteppingAction.cc,v 1.8 2006/06/29 16:37:31 gunter Exp $ 27 // GEANT4 tag $Name: $27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/electromagnetic/TestEm1/src/SteppingVerbose.cc
r807 r1230 26 26 // 27 27 // $Id: SteppingVerbose.cc,v 1.2 2006/06/29 16:37:34 gunter Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 29 29 // 30 30 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/electromagnetic/TestEm1/src/TrackingAction.cc
r807 r1230 25 25 // 26 26 // $Id: TrackingAction.cc,v 1.10 2006/06/29 16:37:36 gunter Exp $ 27 // GEANT4 tag $Name: $27 // GEANT4 tag $Name: geant4-09-03-cand-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Note: See TracChangeset
for help on using the changeset viewer.