Changeset 1337 for trunk/examples/extended/electromagnetic/TestEm9/src
- Timestamp:
- Sep 30, 2010, 2:47:17 PM (15 years ago)
- Location:
- trunk/examples/extended/electromagnetic/TestEm9/src
- Files:
-
- 14 edited
-
DetectorConstruction.cc (modified) (2 diffs)
-
DetectorMessenger.cc (modified) (1 diff)
-
EmAcceptance.cc (modified) (1 diff)
-
EventAction.cc (modified) (3 diffs)
-
EventActionMessenger.cc (modified) (1 diff)
-
HistoManager.cc (modified) (5 diffs)
-
HistoMessenger.cc (modified) (1 diff)
-
PhysListEmStandard.cc (modified) (1 diff)
-
PhysicsList.cc (modified) (3 diffs)
-
PhysicsListMessenger.cc (modified) (1 diff)
-
PrimaryGeneratorAction.cc (modified) (1 diff)
-
StepMax.cc (modified) (1 diff)
-
StepMaxMessenger.cc (modified) (1 diff)
-
SteppingAction.cc (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/examples/extended/electromagnetic/TestEm9/src/DetectorConstruction.cc
r1230 r1337 25 25 // 26 26 // 27 // $Id: DetectorConstruction.cc,v 1.1 1 2008/04/07 18:09:05vnivanch Exp $28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // $Id: DetectorConstruction.cc,v 1.14 2009/11/21 17:28:16 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // … … 251 251 G4double vertWidth = ecalWidth/5.; 252 252 G4int npads = (G4int)(vertWidth/padWidth); 253 //G4cout << " vertWidth= " << vertWidth << " padWidth= " << padWidth 254 // << " npads= " << npads << G4endl; 255 // insure beam to hit a middle of central pad 253 256 npads = (npads/2)*2 + 1; 254 x0 = -0.5* padWidth*((G4double)(npads-1));255 G4double x1 = std::fabs(x0) + 0.5*padWidth + gap;257 x0 = -0.5*(padWidth + vertWidth); 258 G4double x1 = 0.5*vertWidth + gap; 256 259 G4double z = -(vertexLength+absLength); 257 260 -
trunk/examples/extended/electromagnetic/TestEm9/src/DetectorMessenger.cc
r1230 r1337 26 26 // 27 27 // $Id: DetectorMessenger.cc,v 1.3 2006/06/29 17:03:01 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/TestEm9/src/EmAcceptance.cc
r1230 r1337 26 26 // 27 27 // $Id: EmAcceptance.cc,v 1.4 2006/06/29 17:03:03 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/TestEm9/src/EventAction.cc
r1230 r1337 24 24 // ******************************************************************** 25 25 // 26 // $Id: EventAction.cc,v 1. 4 2006/06/29 17:03:06 gunterExp $27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $26 // $Id: EventAction.cc,v 1.6 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.... … … 35 35 36 36 #include "G4UImanager.hh" 37 #include "G4TrajectoryContainer.hh"38 #include "G4Trajectory.hh"39 #include "G4VVisManager.hh"40 37 #include "G4Gamma.hh" 41 38 #include "G4ios.hh" … … 92 89 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 93 90 94 void EventAction::EndOfEventAction(const G4Event* evt)91 void EventAction::EndOfEventAction(const G4Event*) 95 92 { 96 93 (HistoManager::GetPointer())->EndOfEvent(); 97 G4VVisManager* pVVisManager = G4VVisManager::GetConcreteInstance();98 99 if(pVVisManager) {100 G4TrajectoryContainer* trjc = evt->GetTrajectoryContainer();101 G4int n_trajectories = 0;102 if (trjc) n_trajectories = trjc->entries();103 104 for(G4int i=0; i<n_trajectories; i++) {105 G4Trajectory* t = (G4Trajectory*)((*(evt->GetTrajectoryContainer()))[i]);106 if (drawFlag == "all") t->DrawTrajectory(1000);107 else if ((drawFlag == "charged")&&(t->GetCharge() != 0.))108 t->DrawTrajectory(1000);109 }110 }111 94 112 95 if(verbose > 0) { -
trunk/examples/extended/electromagnetic/TestEm9/src/EventActionMessenger.cc
r1230 r1337 25 25 // 26 26 // $Id: EventActionMessenger.cc,v 1.3 2006/06/29 17:03:08 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/TestEm9/src/HistoManager.cc
r1230 r1337 38 38 39 39 #include "HistoManager.hh" 40 #include "G4MaterialCutsCouple.hh" 41 #include "G4EmProcessSubType.hh" 42 #include "G4VProcess.hh" 43 #include "G4VEmProcess.hh" 44 #include "G4VEnergyLossProcess.hh" 40 45 #include "G4UnitsTable.hh" 41 46 #include "Histo.hh" … … 163 168 164 169 histo->book(); 170 171 brem.resize(93,0.0); 172 phot.resize(93,0.0); 173 comp.resize(93,0.0); 174 conv.resize(93,0.0); 165 175 166 176 if(verbose > 0) { … … 280 290 } 281 291 if(isStarted) acc.EndOfAcceptance(); 292 293 // atom frequency 294 G4cout << " Z bremsstrahlung photoeffect compton conversion" << G4endl; 295 for(j=1; j<93; ++j) { 296 G4int n1 = G4int(brem[j]*x); 297 G4int n2 = G4int(phot[j]*x); 298 G4int n3 = G4int(comp[j]*x); 299 G4int n4 = G4int(conv[j]*x); 300 if(n1 + n2 + n3 + n4 > 0) { 301 G4cout << std::setw(4) << j << std::setw(12) << n1 << std::setw(12) << n2 302 << std::setw(12) << n3 << std::setw(12) << n4 << G4endl; 303 } 304 } 282 305 } 283 306 … … 390 413 G4ThreeVector pos = aTrack->GetVertexPosition(); 391 414 415 // primary 392 416 if(0 == pid) { 393 417 … … 414 438 } 415 439 440 // secondary 441 } else { 442 const G4VProcess* proc = aTrack->GetCreatorProcess(); 443 G4int type = proc->GetProcessSubType(); 444 if(type == fBremsstrahlung) { 445 const G4Element* elm = static_cast<const G4VEnergyLossProcess*>(proc)->GetCurrentElement(); 446 if(elm) { 447 G4int Z = G4int(elm->GetZ()); 448 if(Z > 0 && Z < 93) { brem[Z] += 1.0; } 449 } 450 } else if(type == fPhotoElectricEffect) { 451 const G4Element* elm = static_cast<const G4VEmProcess*>(proc)->GetCurrentElement(); 452 if(elm) { 453 G4int Z = G4int(elm->GetZ()); 454 if(Z > 0 && Z < 93) { phot[Z] += 1.0; } 455 } 456 } else if(type == fGammaConversion) { 457 const G4Element* elm = static_cast<const G4VEmProcess*>(proc)->GetCurrentElement(); 458 if(elm) { 459 G4int Z = G4int(elm->GetZ()); 460 if(Z > 0 && Z < 93) { conv[Z] += 1.0; } 461 } 462 } else if(type == fComptonScattering) { 463 const G4Element* elm = static_cast<const G4VEmProcess*>(proc)->GetCurrentElement(); 464 if(elm) { 465 G4int Z = G4int(elm->GetZ()); 466 if(Z > 0 && Z < 93) { comp[Z] += 1.0; } 467 } 468 } 469 416 470 // delta-electron 417 } elseif (0 < pid && "e-" == name) {418 if(1 < verbose) {419 G4cout << "TrackingAction: Secondary electron " << G4endl;420 }421 AddDeltaElectron(dynParticle);422 423 } else if (0 < pid && "e+" == name) {424 if(1 < verbose) {425 G4cout << "TrackingAction: Secondary positron " << G4endl;426 }427 AddPositron(dynParticle);428 429 } else if (0 < pid && "gamma" == name) {430 if(1 < verbose) {431 G4cout << "TrackingAction: Secondary gamma; parentID= " << pid432 << " E= " << kinE << G4endl;433 }434 AddPhoton(dynParticle);435 471 if (0 < pid && "e-" == name) { 472 if(1 < verbose) { 473 G4cout << "TrackingAction: Secondary electron " << G4endl; 474 } 475 AddDeltaElectron(dynParticle); 476 477 } else if (0 < pid && "e+" == name) { 478 if(1 < verbose) { 479 G4cout << "TrackingAction: Secondary positron " << G4endl; 480 } 481 AddPositron(dynParticle); 482 483 } else if (0 < pid && "gamma" == name) { 484 if(1 < verbose) { 485 G4cout << "TrackingAction: Secondary gamma; parentID= " << pid 486 << " E= " << kinE << G4endl; 487 } 488 AddPhoton(dynParticle); 489 } 436 490 } 437 491 } -
trunk/examples/extended/electromagnetic/TestEm9/src/HistoMessenger.cc
r1230 r1337 26 26 // 27 27 // $Id: HistoMessenger.cc,v 1.7 2008/08/22 14:11:53 vnivanch 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/TestEm9/src/PhysListEmStandard.cc
r1230 r1337 25 25 // 26 26 // 27 // $Id: PhysListEmStandard.cc,v 1.1 3 2008/11/16 21:01:10 maireExp $28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // $Id: PhysListEmStandard.cc,v 1.15 2009/11/20 20:27:21 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/electromagnetic/TestEm9/src/PhysicsList.cc
r1230 r1337 24 24 // ******************************************************************** 25 25 // 26 // $Id: PhysicsList.cc,v 1.2 4 2008/10/16 11:48:58vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $26 // $Id: PhysicsList.cc,v 1.25 2009/11/20 20:22:44 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 28 28 // 29 29 //--------------------------------------------------------------------------- … … 50 50 #include "G4EmStandardPhysics_option2.hh" 51 51 #include "G4EmStandardPhysics_option3.hh" 52 #include " PhysListEmLivermore.hh"53 #include " PhysListEmPenelope.hh"52 #include "G4EmLivermorePhysics.hh" 53 #include "G4EmPenelopePhysics.hh" 54 54 #include "G4DecayPhysics.hh" 55 55 #include "G4HadronElasticPhysics.hh" … … 188 188 G4cout << "PhysicsList::Set " << name << " EM physics" << G4endl; 189 189 190 } else if (name == "livermore") { 191 emName = name; 192 delete emPhysicsList; 193 emPhysicsList = new PhysListEmLivermore(); 194 if (verboseLevel > 0) 195 G4cout << "PhysicsList::Set Livermore EM physics" << G4endl; 196 197 } else if (name == "penelope") { 198 emName = name; 199 delete emPhysicsList; 200 emPhysicsList = new PhysListEmPenelope(); 201 if (verboseLevel > 0) 202 G4cout << "PhysicsList::Set Penelope EM physics" << G4endl; 190 } else if (name == "emlivermore") { 191 emName = name; 192 delete emPhysicsList; 193 emPhysicsList = new G4EmLivermorePhysics(); 194 195 } else if (name == "empenelope") { 196 emName = name; 197 delete emPhysicsList; 198 emPhysicsList = new G4EmPenelopePhysics(); 203 199 204 200 } else if (name == "elastic" && !helIsRegisted) { -
trunk/examples/extended/electromagnetic/TestEm9/src/PhysicsListMessenger.cc
r1230 r1337 26 26 // 27 27 // $Id: PhysicsListMessenger.cc,v 1.4 2008/04/03 15:07:55 vnivanch 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/TestEm9/src/PrimaryGeneratorAction.cc
r1230 r1337 26 26 // 27 27 // $Id: PrimaryGeneratorAction.cc,v 1.3 2006/06/29 17:03:46 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/TestEm9/src/StepMax.cc
r1230 r1337 25 25 // 26 26 // $Id: StepMax.cc,v 1.3 2006/06/29 17:03:52 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/TestEm9/src/StepMaxMessenger.cc
r1230 r1337 25 25 // 26 26 // $Id: StepMaxMessenger.cc,v 1.2 2006/06/29 17:03:54 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/TestEm9/src/SteppingAction.cc
r1230 r1337 26 26 // 27 27 // $Id: SteppingAction.cc,v 1.2 2006/06/29 17:03:57 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 //
Note:
See TracChangeset
for help on using the changeset viewer.
