Changeset 483 for trunk/geant4/N03/src
- Timestamp:
- Jun 5, 2007, 3:50:26 PM (17 years ago)
- Location:
- trunk/geant4/N03/src
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/geant4/N03/src/ExN03DetectorConstruction.cc
r474 r483 26 26 // 27 27 // $Id: ExN03DetectorConstruction.cc,v 1.23 2006/06/29 17:48:54 gunter Exp $ 28 // GEANT4 tag $Name: geant4-08-01 $28 // GEANT4 tag $Name: geant4-08-01-patch-01 $ 29 29 // 30 30 // -
trunk/geant4/N03/src/ExN03DetectorMessenger.cc
r474 r483 26 26 // 27 27 // $Id: ExN03DetectorMessenger.cc,v 1.10 2006/06/29 17:48:58 gunter Exp $ 28 // GEANT4 tag $Name: geant4-08-01 $28 // GEANT4 tag $Name: geant4-08-01-patch-01 $ 29 29 // 30 30 // -
trunk/geant4/N03/src/ExN03EventAction.cc
r474 r483 25 25 // 26 26 // 27 // $Id: ExN03EventAction.cc,v 1.2 7 2006/06/29 17:49:00 gunterExp $28 // GEANT4 tag $Name: geant4-08-0 1$27 // $Id: ExN03EventAction.cc,v 1.28 2006/10/26 14:30:05 allison Exp $ 28 // GEANT4 tag $Name: geant4-08-02-patch-01-ref $ 29 29 // 30 30 // … … 50 50 51 51 ExN03EventAction::ExN03EventAction(ExN03RunAction* run) 52 :runAct(run), drawFlag("all"),printModulo(1),eventMessenger(0)52 :runAct(run),printModulo(1),eventMessenger(0) 53 53 { 54 54 eventMessenger = new ExN03EventActionMessenger(this); … … 103 103 << G4endl; 104 104 105 } 106 107 // extract the trajectories and draw them 108 109 // You can get a default drawing without this code by using, e.g., 110 // /vis/scene/add/trajectories 1000 111 // The code here adds sophistication under control of drawFlag. 112 113 // See comments in G4VTrajectory::DrawTrajectory for the 114 // interpretation of the argument, 1000. 115 116 G4VVisManager* pVisManager = G4VVisManager::GetConcreteInstance(); 117 if (pVisManager) 118 { 119 G4TrajectoryContainer* trajectoryContainer = evt->GetTrajectoryContainer(); 120 G4int n_trajectories = 0; 121 if (trajectoryContainer) n_trajectories = trajectoryContainer->entries(); 122 123 for (G4int i=0; i<n_trajectories; i++) 124 { G4VTrajectory* trj = ((*(evt->GetTrajectoryContainer()))[i]); 125 if (drawFlag == "all") pVisManager->Draw(*trj,100); 126 else if ((drawFlag == "charged")&&(trj->GetCharge() != 0.)) 127 pVisManager->Draw(*trj,100); 128 else if ((drawFlag == "neutral")&&(trj->GetCharge() == 0.)) 129 pVisManager->Draw(*trj,100); 130 } 131 } 105 } 132 106 } 133 107 -
trunk/geant4/N03/src/ExN03EventActionMessenger.cc
r474 r483 25 25 // 26 26 // 27 // $Id: ExN03EventActionMessenger.cc,v 1.1 1 2006/06/29 17:49:03 gunterExp $28 // GEANT4 tag $Name: geant4-08-0 1$27 // $Id: ExN03EventActionMessenger.cc,v 1.12 2006/10/26 14:28:00 allison Exp $ 28 // GEANT4 tag $Name: geant4-08-02-patch-01-ref $ 29 29 // 30 30 // … … 37 37 #include "ExN03EventAction.hh" 38 38 #include "G4UIdirectory.hh" 39 #include "G4UIcmdWithAString.hh"40 39 #include "G4UIcmdWithAnInteger.hh" 41 40 #include "globals.hh" … … 49 48 eventDir->SetGuidance("event control"); 50 49 51 DrawCmd = new G4UIcmdWithAString("/N03/event/drawTracks",this);52 DrawCmd->SetGuidance("Draw the tracks in the event");53 DrawCmd->SetGuidance(" Choice : none, charged(default),neutral, all");54 DrawCmd->SetParameterName("choice",true);55 DrawCmd->SetDefaultValue("all");56 DrawCmd->SetCandidates("none charged neutral all");57 DrawCmd->AvailableForStates(G4State_Idle);58 59 50 PrintCmd = new G4UIcmdWithAnInteger("/N03/event/printModulo",this); 60 51 PrintCmd->SetGuidance("Print events modulo n"); … … 67 58 ExN03EventActionMessenger::~ExN03EventActionMessenger() 68 59 { 69 delete DrawCmd;70 60 delete PrintCmd; 71 61 delete eventDir; … … 77 67 G4UIcommand* command,G4String newValue) 78 68 { 79 if(command == DrawCmd)80 {eventAction->SetDrawFlag(newValue);}81 82 69 if(command == PrintCmd) 83 70 {eventAction->SetPrintModulo(PrintCmd->GetNewIntValue(newValue));} -
trunk/geant4/N03/src/ExN03PhysicsList.cc
r474 r483 26 26 // 27 27 // $Id: ExN03PhysicsList.cc,v 1.20 2006/06/29 17:49:05 gunter Exp $ 28 // GEANT4 tag $Name: geant4-08-01 $28 // GEANT4 tag $Name: geant4-08-01-patch-01 $ 29 29 // 30 30 // -
trunk/geant4/N03/src/ExN03PrimaryGeneratorAction.cc
r474 r483 26 26 // 27 27 // $Id: ExN03PrimaryGeneratorAction.cc,v 1.8 2006/06/29 17:49:07 gunter Exp $ 28 // GEANT4 tag $Name: geant4-08-01 $28 // GEANT4 tag $Name: geant4-08-01-patch-01 $ 29 29 // 30 30 // -
trunk/geant4/N03/src/ExN03PrimaryGeneratorMessenger.cc
r474 r483 26 26 // 27 27 // $Id: ExN03PrimaryGeneratorMessenger.cc,v 1.9 2006/06/29 17:49:09 gunter Exp $ 28 // GEANT4 tag $Name: geant4-08-01 $28 // GEANT4 tag $Name: geant4-08-01-patch-01 $ 29 29 // 30 30 // -
trunk/geant4/N03/src/ExN03RunAction.cc
r474 r483 26 26 // 27 27 // $Id: ExN03RunAction.cc,v 1.18 2006/06/29 17:49:11 gunter Exp $ 28 // GEANT4 tag $Name: geant4-08-01 $28 // GEANT4 tag $Name: geant4-08-01-patch-01 $ 29 29 // 30 30 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/geant4/N03/src/ExN03SteppingAction.cc
r474 r483 26 26 // 27 27 // $Id: ExN03SteppingAction.cc,v 1.15 2006/06/29 17:49:13 gunter Exp $ 28 // GEANT4 tag $Name: geant4-08-01 $28 // GEANT4 tag $Name: geant4-08-01-patch-01 $ 29 29 // 30 30 // -
trunk/geant4/N03/src/ExN03SteppingVerbose.cc
r474 r483 26 26 // 27 27 // $Id: ExN03SteppingVerbose.cc,v 1.13 2006/06/29 17:49:16 gunter Exp $ 28 // GEANT4 tag $Name: geant4-08-01 $28 // GEANT4 tag $Name: geant4-08-01-patch-01 $ 29 29 // 30 30 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Note: See TracChangeset
for help on using the changeset viewer.