Changeset 1337 for trunk/examples/extended/electromagnetic/TestEm0/src
- Timestamp:
- Sep 30, 2010, 2:47:17 PM (14 years ago)
- Location:
- trunk/examples/extended/electromagnetic/TestEm0/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/examples/extended/electromagnetic/TestEm0/src/DetectorConstruction.cc
r1230 r1337 27 27 // 28 28 // $Id: DetectorConstruction.cc,v 1.10 2009/11/14 18:04:20 maire Exp $ 29 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $29 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 30 30 // 31 31 // -
trunk/examples/extended/electromagnetic/TestEm0/src/DetectorMessenger.cc
r1230 r1337 25 25 // 26 26 // $Id: DetectorMessenger.cc,v 1.2 2006/06/29 16:35:48 gunter Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/electromagnetic/TestEm0/src/PhysListEmStandard.cc
r1230 r1337 26 26 // 27 27 // $Id: PhysListEmStandard.cc,v 1.3 2009/11/14 18:04:20 maire Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/electromagnetic/TestEm0/src/PhysicsList.cc
r1230 r1337 25 25 // 26 26 // 27 // $Id: PhysicsList.cc,v 1. 8 2009/11/17 22:48:26 maireExp $28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // $Id: PhysicsList.cc,v 1.9 2010/03/21 19:07:53 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... … … 35 35 36 36 #include "PhysListEmStandard.hh" 37 #include "G4EmStandardPhysics.hh" 38 #include "G4EmStandardPhysics_option1.hh" 39 #include "G4EmStandardPhysics_option2.hh" 40 #include "G4EmStandardPhysics_option3.hh" 37 41 #include "G4EmLivermorePhysics.hh" 38 42 #include "G4EmPenelopePhysics.hh" … … 58 62 59 63 // EM physics 60 emName = G4String(" standard");64 emName = G4String("local"); 61 65 emPhysicsList = new PhysListEmStandard(emName); 62 66 … … 189 193 //physics tables 190 194 // 191 emOptions.SetMinEnergy(100*eV); //default192 emOptions.SetMaxEnergy(100*TeV); //default193 emOptions.SetDEDXBinning(12*20); //default=12*7194 emOptions.SetLambdaBinning(12*20); //default=12*7195 //emOptions.SetMinEnergy(100*eV); //default 196 //emOptions.SetMaxEnergy(100*TeV); //default 197 //emOptions.SetDEDXBinning(12*20); //default=12*7 198 //emOptions.SetLambdaBinning(12*20); //default=12*7 195 199 196 200 emOptions.SetBuildCSDARange(true); 197 emOptions.SetMaxEnergyForCSDARange(100*TeV);198 emOptions.SetDEDXBinningForCSDARange(12*20);199 200 emOptions.SetSplineFlag(true); //default201 //emOptions.SetMaxEnergyForCSDARange(100*TeV); 202 //emOptions.SetDEDXBinningForCSDARange(12*20); 203 204 //emOptions.SetSplineFlag(true); //default 201 205 202 206 emOptions.SetVerbose(0); … … 213 217 if (name == emName) return; 214 218 215 if (name == " standard") {219 if (name == "local") { 216 220 217 221 emName = name; … … 219 223 emPhysicsList = new PhysListEmStandard(name); 220 224 221 } else if (name == "penelope"){ 225 } else if (name == "emstandard_opt0"){ 226 emName = name; 227 delete emPhysicsList; 228 emPhysicsList = new G4EmStandardPhysics(); 229 230 } else if (name == "emstandard_opt1"){ 231 emName = name; 232 delete emPhysicsList; 233 emPhysicsList = new G4EmStandardPhysics_option1(); 234 235 } else if (name == "emstandard_opt2"){ 236 emName = name; 237 delete emPhysicsList; 238 emPhysicsList = new G4EmStandardPhysics_option2(); 239 240 } else if (name == "emstandard_opt3"){ 241 emName = name; 242 delete emPhysicsList; 243 emPhysicsList = new G4EmStandardPhysics_option3(); 244 245 } else if (name == "empenelope"){ 222 246 emName = name; 223 247 delete emPhysicsList; 224 248 emPhysicsList = new G4EmPenelopePhysics(); 225 249 226 } else if (name == " livermore"){250 } else if (name == "emlivermore"){ 227 251 emName = name; 228 252 delete emPhysicsList; -
trunk/examples/extended/electromagnetic/TestEm0/src/PhysicsListMessenger.cc
r1230 r1337 25 25 // 26 26 // $Id: PhysicsListMessenger.cc,v 1.2 2006/06/29 16:35:55 gunter Exp $ 27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/electromagnetic/TestEm0/src/PrimaryGeneratorAction.cc
r1230 r1337 26 26 // 27 27 // $Id: PrimaryGeneratorAction.cc,v 1.2 2006/06/29 16:35:58 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/electromagnetic/TestEm0/src/RunAction.cc
r1230 r1337 24 24 // ******************************************************************** 25 25 // 26 // $Id: RunAction.cc,v 1.1 0 2007/12/17 17:22:44maire Exp $27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $26 // $Id: RunAction.cc,v 1.15 2010/05/10 13:45:49 maire Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... … … 104 104 G4double range = emCal.GetCSDARange(Tmax,G4Electron::Electron(),material); 105 105 106 G4cout << "\n Max_energy _transferable: " << G4BestUnit(Tmax,"Energy")106 G4cout << "\n Max_energy _transferable : " << G4BestUnit(Tmax,"Energy") 107 107 << " (" << G4BestUnit(range,"Length") << ")" << G4endl; 108 108 } … … 148 148 sigma0.push_back(sigtot); 149 149 150 G4cout << "\n \n cross section per atom : ";150 G4cout << "\n \n cross section per atom : "; 151 151 for (size_t j=0; j<sigma0.size();j++) { 152 152 G4cout << "\t" << std::setw(13) << G4BestUnit(sigma0[j], "Surface"); … … 156 156 157 157 //get cross section per volume 158 std::vector<G4double> sigma0; 158 159 std::vector<G4double> sigma1; 159 std::vector<G4double> sigma2; 160 G4double Sig, Sigtot = 0.;160 std::vector<G4double> sigma2; 161 G4double Sig, SigtotComp = 0., Sigtot = 0.; 161 162 162 163 for (size_t j=0; j<emName.size();j++) { 163 Sig = emCal.GetCrossSectionPerVolume(energy,particle,emName[j],material); 164 if (Sig == 0.) Sig = emCal.ComputeCrossSectionPerVolume 165 (energy,particle,emName[j],material,enerCut[j]); 166 Sigtot += Sig; 164 Sig = emCal.ComputeCrossSectionPerVolume 165 (energy,particle,emName[j],material,enerCut[j]); 166 SigtotComp += Sig; 167 sigma0.push_back(Sig); 168 Sig = emCal.GetCrossSectionPerVolume(energy,particle,emName[j],material); 169 Sigtot += Sig; 167 170 sigma1.push_back(Sig); 168 171 sigma2.push_back(Sig/density); 169 172 } 173 sigma0.push_back(SigtotComp); 170 174 sigma1.push_back(Sigtot); 171 175 sigma2.push_back(Sigtot/density); 172 176 173 177 //print cross sections 174 G4cout << "\n \n cross section per volume : "; 178 G4cout << "\n \n compCrossSectionPerVolume : "; 179 for (size_t j=0; j<sigma0.size();j++) { 180 G4cout << "\t" << std::setw(13) << sigma0[j]*cm << " cm^-1"; 181 } 182 G4cout << "\n cross section per volume : "; 175 183 for (size_t j=0; j<sigma1.size();j++) { 176 184 G4cout << "\t" << std::setw(13) << sigma1[j]*cm << " cm^-1"; … … 179 187 G4cout << "\n cross section per mass : "; 180 188 for (size_t j=0; j<sigma2.size();j++) { 181 G4cout << "\t" << std::setw(13) << G4BestUnit(sigma2[j], "Surface/Mass"); 189 G4cout << "\t" << std::setw(13) 190 << G4BestUnit(sigma2[j], "Surface/Mass"); 182 191 } 183 192
Note: See TracChangeset
for help on using the changeset viewer.