Changeset 1337 for trunk/examples/extended/electromagnetic/TestEm3/src
- Timestamp:
- Sep 30, 2010, 2:47:17 PM (14 years ago)
- Location:
- trunk/examples/extended/electromagnetic/TestEm3/src
- Files:
-
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/examples/extended/electromagnetic/TestEm3/src/DetectorConstruction.cc
r1230 r1337 25 25 // 26 26 // $Id: DetectorConstruction.cc,v 1.23 2009/03/04 18:49:17 maire 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/TestEm3/src/DetectorMessenger.cc
r1230 r1337 25 25 // 26 26 // $Id: DetectorMessenger.cc,v 1.11 2006/06/29 16:52:26 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/TestEm3/src/EmAcceptance.cc
r1230 r1337 25 25 // 26 26 // $Id: EmAcceptance.cc,v 1.6 2006/06/29 16:52:28 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/TestEm3/src/EventAction.cc
r1230 r1337 24 24 // ******************************************************************** 25 25 // 26 // $Id: EventAction.cc,v 1.1 6 2008/05/29 16:59:27 vnivanchExp $27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $26 // $Id: EventAction.cc,v 1.18 2010/06/07 05:40:46 perl Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... … … 37 37 38 38 #include "G4Event.hh" 39 #include "G4TrajectoryContainer.hh"40 #include "G4Trajectory.hh"41 #include "G4VVisManager.hh"42 39 43 40 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... … … 78 75 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 79 76 80 void EventAction::EndOfEventAction(const G4Event* evt)77 void EventAction::EndOfEventAction(const G4Event*) 81 78 { 82 79 for (G4int k=1; k<=detector->GetNbOfAbsor(); k++) { … … 84 81 if (energyDeposit[k] > 0.) histoManager->FillHisto(k, energyDeposit[k]); 85 82 } 86 87 if (G4VVisManager::GetConcreteInstance())88 {89 G4TrajectoryContainer* trajectoryContainer = evt->GetTrajectoryContainer();90 G4int n_trajectories = 0;91 if (trajectoryContainer) n_trajectories = trajectoryContainer->entries();92 for (G4int i=0; i<n_trajectories; i++)93 { G4Trajectory* trj = (G4Trajectory*)94 ((*(evt->GetTrajectoryContainer()))[i]);95 if (drawFlag == "all") trj->DrawTrajectory(100);96 else if ((drawFlag == "charged")&&(trj->GetCharge() != 0.))97 trj->DrawTrajectory(100);98 }99 }100 83 } 101 84 -
trunk/examples/extended/electromagnetic/TestEm3/src/EventActionMessenger.cc
r1230 r1337 25 25 // 26 26 // $Id: EventActionMessenger.cc,v 1.4 2006/06/29 16:52:38 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/TestEm3/src/HistoManager.cc
r1230 r1337 25 25 // 26 26 // $Id: HistoManager.cc,v 1.17 2009/03/04 18:49:17 maire 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/TestEm3/src/HistoMessenger.cc
r1230 r1337 25 25 // 26 26 // $Id: HistoMessenger.cc,v 1.9 2007/11/12 17:04:55 maire 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/TestEm3/src/PhysListEmStandard.cc
r1230 r1337 25 25 // 26 26 // $Id: PhysListEmStandard.cc,v 1.23 2009/11/13 17:01:44 maire 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/TestEm3/src/PhysicsList.cc
r1230 r1337 24 24 // ******************************************************************** 25 25 // 26 // $Id: PhysicsList.cc,v 1.3 0 2009/11/13 17:01:44 maireExp $27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $26 // $Id: PhysicsList.cc,v 1.32 2010/04/13 08:10:19 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... … … 42 42 #include "G4EmPenelopePhysics.hh" 43 43 44 #include "PhysListEmStandardGS.hh" 45 #include "PhysListEmStandardWVI.hh" 46 44 47 #include "G4UnitsTable.hh" 45 #include "G4UrbanMscModel.hh"46 48 47 49 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... … … 255 257 emPhysicsList = new G4EmPenelopePhysics(); 256 258 259 } else if (name == "standardGS") { 260 261 emName = name; 262 delete emPhysicsList; 263 emPhysicsList = new PhysListEmStandardGS(name); 264 265 } else if (name == "standardWVI") { 266 267 emName = name; 268 delete emPhysicsList; 269 emPhysicsList = new PhysListEmStandardWVI(name); 270 257 271 } else { 258 272 … … 298 312 SetCutValue(cutForElectron, "e-"); 299 313 SetCutValue(cutForPositron, "e+"); 314 315 // Cut for proton not used in EM processes except single scattering 316 // so electron cut is used in this example 317 SetCutValue(cutForElectron, "proton"); 300 318 301 319 if (verboseLevel>0) DumpCutValuesTable(); -
trunk/examples/extended/electromagnetic/TestEm3/src/PhysicsListMessenger.cc
r1230 r1337 25 25 // 26 26 // $Id: PhysicsListMessenger.cc,v 1.3 2006/06/29 16:52:57 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/TestEm3/src/PrimaryGeneratorAction.cc
r1230 r1337 25 25 // 26 26 // $Id: PrimaryGeneratorAction.cc,v 1.7 2006/06/29 16:53:00 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/TestEm3/src/PrimaryGeneratorMessenger.cc
r1230 r1337 25 25 // 26 26 // $Id: PrimaryGeneratorMessenger.cc,v 1.3 2006/06/29 16:53:02 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/TestEm3/src/RunAction.cc
r1230 r1337 24 24 // ******************************************************************** 25 25 // 26 // $Id: RunAction.cc,v 1.3 7 2008/05/29 16:59:27 vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $26 // $Id: RunAction.cc,v 1.38 2010/01/24 17:25:07 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... … … 41 41 #include "G4UnitsTable.hh" 42 42 43 #include "G4ParticleTable.hh" 44 #include "G4ParticleDefinition.hh" 45 #include "G4Track.hh" 46 #include "G4Gamma.hh" 47 #include "G4Electron.hh" 48 #include "G4Positron.hh" 49 #include "G4ProductionCutsTable.hh" 50 #include "G4LossTableManager.hh" 51 43 52 #include "Randomize.hh" 44 53 … … 81 90 energyDeposit[k].clear(); 82 91 } 92 93 n_gamma = 0; 94 n_elec = 0; 95 n_pos = 0; 83 96 84 97 //initialize Eflow … … 195 208 GetParticleDefinition()->GetParticleName() 196 209 << " E = " << G4BestUnit(beamEnergy,"Energy") << G4endl; 210 G4cout << " Mean number of gamma " << (G4double)n_gamma*norm << G4endl; 211 G4cout << " Mean number of e- " << (G4double)n_elec*norm << G4endl; 212 G4cout << " Mean number of e+ " << (G4double)n_pos*norm << G4endl; 213 G4cout << "------------------------------------------------------------\n"; 197 214 198 215 //Energy flow … … 263 280 CLHEP::HepRandom::showEngineStatus(); 264 281 } 265 266 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......267 268 #include "G4ParticleTable.hh"269 #include "G4ParticleDefinition.hh"270 #include "G4Gamma.hh"271 #include "G4Electron.hh"272 #include "G4ProductionCutsTable.hh"273 #include "G4LossTableManager.hh"274 282 275 283 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... … … 364 372 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 365 373 374 void RunAction::AddSecondaryTrack(const G4Track* track) 375 { 376 const G4ParticleDefinition* d = track->GetDefinition(); 377 if(d == G4Gamma::Gamma()) { ++n_gamma; } 378 else if (d == G4Electron::Electron()) { ++n_elec; } 379 else if (d == G4Positron::Positron()) { ++n_pos; } 380 } 381 382 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 383 366 384 void RunAction::SetEdepAndRMS(G4int i, G4double edep, G4double rms, G4double lim) 367 385 { -
trunk/examples/extended/electromagnetic/TestEm3/src/RunActionMessenger.cc
r1230 r1337 25 25 // 26 26 // $Id: RunActionMessenger.cc,v 1.13 2007/04/25 10:07:27 vnivanch 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/TestEm3/src/StepMax.cc
r1230 r1337 25 25 // 26 26 // $Id: StepMax.cc,v 1.4 2006/06/29 16:53:19 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/TestEm3/src/StepMaxMessenger.cc
r1230 r1337 25 25 // 26 26 // $Id: StepMaxMessenger.cc,v 1.3 2006/06/29 16:53:21 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/TestEm3/src/SteppingAction.cc
r1230 r1337 25 25 // 26 26 // $Id: SteppingAction.cc,v 1.28 2008/05/29 16:59:27 vnivanch 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/TestEm3/src/SteppingVerbose.cc
r1230 r1337 25 25 // 26 26 // $Id: SteppingVerbose.cc,v 1.4 2006/06/29 16:53:25 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/TestEm3/src/TrackingAction.cc
r1230 r1337 25 25 // 26 26 // 27 // $Id: TrackingAction.cc,v 1. 2 2006/06/29 16:53:27 gunterExp $28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // $Id: TrackingAction.cc,v 1.3 2010/01/24 17:25:07 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... … … 69 69 70 70 //flux artefact, if primary vertex is inside the calorimeter 71 for (G4int pl=1; pl<=Idnow; pl++) runAct->sumEnergyFlow(pl, Eflow); 71 for (G4int pl=1; pl<=Idnow; pl++) {runAct->sumEnergyFlow(pl, Eflow);} 72 } else { 73 runAct->AddSecondaryTrack(track); 72 74 } 73 75 }
Note: See TracChangeset
for help on using the changeset viewer.