Changeset 1337 for trunk/examples/extended/eventgenerator
- Timestamp:
- Sep 30, 2010, 2:47:17 PM (14 years ago)
- Location:
- trunk/examples/extended/eventgenerator
- Files:
-
- 46 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/examples/extended/eventgenerator/HepMC/HepMCEx01/History
r807 r1337 1 $Id: History,v 1.1 2 2006/11/22 15:09:21 gcosmoExp $1 $Id: History,v 1.14 2010/06/06 04:51:10 perl Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 15 15 * Reverse chronological order (last date on top), please * 16 16 ---------------------------------------------------------- 17 18 June 4th 2010 J.Perl 19 - Updated vis usage 20 21 May 12th 2010 J.Allison 22 - Introduced GUIExecutive. 17 23 18 24 November, 22nd 2006 G.Cosmo -
trunk/examples/extended/eventgenerator/HepMC/HepMCEx01/hepmcEx01.cc
r1230 r1337 25 25 // 26 26 // 27 // $Id: hepmcEx01.cc,v 1. 5 2006/07/05 11:06:36 gcosmoExp $28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // $Id: hepmcEx01.cc,v 1.6 2010/05/12 12:58:17 allison Exp $ 28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // … … 35 35 #include "G4RunManager.hh" 36 36 #include "G4UImanager.hh" 37 #include "G4UIterminal.hh"38 #include "G4UItcsh.hh"39 37 40 38 #include "ExN04DetectorConstruction.hh" … … 50 48 #ifdef G4VIS_USE 51 49 #include "G4VisExecutive.hh" 50 #endif 51 52 #ifdef G4UI_USE 53 #include "G4UIExecutive.hh" 52 54 #endif 53 55 … … 71 73 runManager->SetUserInitialization(physics); 72 74 73 #ifdef G4VIS_USE74 // Visualization, if you choose to have it!75 G4VisManager* visManager = new G4VisExecutive;76 visManager->Initialize();77 #endif78 79 75 runManager->Initialize(); 80 76 … … 99 95 runManager->SetUserAction(stepping_action); 100 96 97 #ifdef G4VIS_USE 98 // Visualization, if you choose to have it! 99 G4VisManager* visManager = new G4VisExecutive; 100 visManager->Initialize(); 101 #endif 102 101 103 //get the pointer to the User Interface manager 102 104 G4UImanager* UImanager = G4UImanager::GetUIpointer(); 103 105 104 if(argc==1) 105 { 106 // G4UIterminal is a (dumb) terminal 107 // 108 #ifdef G4UI_USE_TCSH 109 G4UIsession* session = new G4UIterminal(new G4UItcsh); 110 #else 111 G4UIsession* session = new G4UIterminal(); 112 #endif 113 UImanager->ApplyCommand("/control/execute vis.mac"); 114 session->SessionStart(); 115 delete session; 116 } 117 else // Batch mode 118 { 119 G4String command = "/control/execute "; 120 G4String fileName = argv[1]; 121 UImanager->ApplyCommand(command+fileName); 122 } 106 if (argc!=1) // batch mode 107 { 108 #ifdef G4VIS_USE 109 visManager->SetVerboseLevel("quiet"); 110 #endif 111 G4String command = "/control/execute "; 112 G4String fileName = argv[1]; 113 UImanager->ApplyCommand(command+fileName); 114 } 115 else 116 { // interactive mode : define UI session 117 #ifdef G4UI_USE 118 G4UIExecutive* ui = new G4UIExecutive(argc, argv); 119 ui->SessionStart(); 120 delete ui; 121 #endif 122 } 123 123 124 124 // Free the store: user actions, physics_list and detector_description are -
trunk/examples/extended/eventgenerator/HepMC/HepMCEx01/include/ExN04RunAction.hh
r807 r1337 26 26 // 27 27 // $Id: ExN04RunAction.hh,v 1.3 2006/07/05 11:06:36 gcosmo Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/eventgenerator/HepMC/HepMCEx01/include/ExN04SteppingVerbose.hh
r807 r1337 26 26 // 27 27 // $Id: ExN04SteppingVerbose.hh,v 1.2 2006/06/29 17:05:06 gunter Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // This class manages the verbose outputs in G4SteppingManager. -
trunk/examples/extended/eventgenerator/HepMC/HepMCEx01/src/ExN04EventAction.cc
r807 r1337 35 35 #include "G4HCofThisEvent.hh" 36 36 #include "G4VHitsCollection.hh" 37 #include "G4TrajectoryContainer.hh"38 #include "G4Trajectory.hh"39 #include "G4VVisManager.hh"40 37 #include "G4SDManager.hh" 41 38 #include "G4UImanager.hh" -
trunk/examples/extended/eventgenerator/HepMC/HepMCEx01/src/ExN04RunAction.cc
r807 r1337 26 26 // 27 27 // $Id: ExN04RunAction.cc,v 1.3 2006/07/05 11:06:36 gcosmo Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/eventgenerator/HepMC/HepMCEx01/src/ExN04SteppingVerbose.cc
r807 r1337 26 26 // 27 27 // $Id: ExN04SteppingVerbose.cc,v 1.4 2006/06/29 17:06:23 gunter Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... -
trunk/examples/extended/eventgenerator/HepMC/HepMCEx01/vis.mac
r807 r1337 8 8 /run/verbose 2 9 9 # 10 # create empty scene 10 # Use this open statement to create an OpenGL view: 11 /vis/open OGL 600x600-0+0 11 12 # 12 /vis/scene/create 13 # Use this open statement to create a .prim file suitable for 14 # viewing in DAWN: 15 #/vis/open DAWNFILE 13 16 # 14 # Create a scene handler for a specific graphics system 15 # (Edit the next line(s) to choose another graphic system) 17 # Use this open statement to create a .heprep file suitable for 18 # viewing in HepRApp: 19 #/vis/open HepRepFile 16 20 # 17 /vis/open OGLIX 21 # Use this open statement to create a .wrl file suitable for 22 # viewing in a VRML viewer: 23 #/vis/open VRML2FILE 18 24 # 19 ####/vis/open DAWNFILE 25 # Disable auto refresh and quieten vis messages whilst scene and 26 # trajectories are established: 27 /vis/viewer/set/autoRefresh false 28 /vis/verbose errors 20 29 # 21 # draw scene 30 # Draw geometry: 31 /vis/drawVolume 22 32 # 23 /vis/viewer/set/viewpointThetaPhi 90 180 deg 33 # Specify view angle: 34 /vis/viewer/set/viewpointThetaPhi 90. 180. 35 # 36 # Specify zoom value: 24 37 /vis/viewer/zoom 1.4 25 /vis/viewer/flush26 38 # 27 # for drawing the tracks 28 # Draw trajectories at end of event, showing trajectory points as 29 # markers of size 2 pixels 30 /vis/scene/add/trajectories 39 # Specify style (surface or wireframe): 40 #/vis/viewer/set/style wireframe 41 # 42 # Draw coordinate axes: 43 #/vis/scene/add/axes 0 0 0 1 m 44 # 45 # Draw smooth trajectories at end of event, showing trajectory points 46 # as markers 2 pixels wide: 47 /vis/scene/add/trajectories smooth 31 48 /vis/modeling/trajectories/create/drawByCharge 32 49 /vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true 33 50 /vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2 34 # (if too many tracks cause core dump => storeTrajectory 0) 35 51 # (if too many tracks cause core dump => /tracking/storeTrajectory 0) 52 # 53 # Draw hits at end of event: 54 #/vis/scene/add/hits 55 # 56 # To draw only gammas: 57 #/vis/filtering/trajectories/create/particleFilter 58 #/vis/filtering/trajectories/particleFilter-0/add gamma 59 # 60 # To invert the above, drawing all particles except gammas, 61 # keep the above two lines but also add: 62 #/vis/filtering/trajectories/particleFilter-0/invert true 63 # 64 # Many other options are available with /vis/modeling and /vis/filtering. 65 # For example, to select colour by particle ID: 66 #/vis/modeling/trajectories/create/drawByParticleID 67 #/vis/modeling/trajectories/drawByParticleID-0/set e- blue 68 # 69 # To superimpose all of the events from a given run: 36 70 /vis/scene/endOfEventAction accumulate 37 71 # 38 # Refresh ready for run 39 /vis/viewer/refresh 72 # Re-establish auto refreshing and verbosity: 73 /vis/viewer/set/autoRefresh true 74 /vis/verbose warnings 75 # 76 # For file-based drivers, use this to create an empty detector view: 77 #/vis/viewer/flush 40 78 # 41 79 # Now ready for /run/beamOn. -
trunk/examples/extended/eventgenerator/HepMC/HepMCEx02/History
r807 r1337 1 $Id: History,v 1. 8 2006/11/22 15:09:07 gcosmoExp $1 $Id: History,v 1.9 2010/05/24 05:33:12 kmura Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 15 15 * Reverse chronological order (last date on top), please * 16 16 ---------------------------------------------------------- 17 18 May 24, 2010 K.Murakami 19 - use QGSP physics list instead of old flag physics list 20 - introduce G4UIExective 21 - modify for HepMC ver.2 (2.06.00) 17 22 18 23 Nov, 22nd, 2006 G.Cosmo -
trunk/examples/extended/eventgenerator/HepMC/HepMCEx02/README
r807 r1337 1 $Id: README,v 1. 1 2002/05/28 14:20:36 murakamiExp $1 $Id: README,v 1.2 2010/05/24 05:32:50 kmura Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 34 34 3. Physics List 35 35 36 Full set of "ordinary" physics processes, which is the same one as 37 ExN04PhysicsList. 36 QGSP predefined physics list 38 37 39 38 4. User actions -
trunk/examples/extended/eventgenerator/HepMC/HepMCEx02/hepmcEx02.cc
r1230 r1337 25 25 // 26 26 // 27 // $Id: hepmcEx02.cc,v 1. 5 2006/07/05 12:04:07 gcosmoExp $28 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $27 // $Id: hepmcEx02.cc,v 1.6 2010/05/24 05:32:22 kmura Exp $ 28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // … … 39 39 40 40 #include "H02DetectorConstruction.hh" 41 #include " H02PhysicsList.hh"41 #include "QGSP.hh" 42 42 #include "H02PrimaryGeneratorAction.hh" 43 43 #include "H02EventAction.hh" … … 46 46 #ifdef G4VIS_USE 47 47 #include "G4VisExecutive.hh" 48 #endif 49 50 #ifdef G4UI_USE 51 #include "G4UIExecutive.hh" 48 52 #endif 49 53 … … 57 61 runManager-> SetUserInitialization(detector); 58 62 // 59 G4VUserPhysicsList* physics = new H02PhysicsList;63 G4VUserPhysicsList* physics = new QGSP; 60 64 runManager-> SetUserInitialization(physics); 61 65 … … 81 85 #endif 82 86 83 if(argc==1) // G4UIterminal is a (dumb) terminal 84 { 85 #ifdef QERAUOY 86 G4UItcsh* tcsh= new 87 G4UItcsh("[40;01;36mhepmcEx02[40;33m(%s)[40;32m[%/][00;30m:"); 88 G4UIterminal* session= new G4UIterminal(tcsh); 89 tcsh-> SetLsColor(RED, GREEN); 90 #else 91 G4UItcsh* tcsh= new G4UItcsh("hepmcEx01(%s)[%/]:"); 92 G4UIterminal* session= new G4UIterminal(tcsh); 87 //get the pointer to the User Interface manager 88 G4UImanager* UImanager = G4UImanager::GetUIpointer(); 89 90 if (argc!=1) { // batch mode 91 #ifdef G4VIS_USE 92 visManager-> SetVerboseLevel("quiet"); 93 93 #endif 94 session->SessionStart(); 95 delete session; 96 97 } 98 else // Batch mode 99 { 100 G4UImanager* UImanager= G4UImanager::GetUIpointer(); 101 G4String command= "/control/execute "; 102 G4String fileName= argv[1]; 103 UImanager-> ApplyCommand(command+fileName); 94 G4String command = "/control/execute "; 95 G4String fileName = argv[1]; 96 UImanager-> ApplyCommand(command+fileName); 97 } else { // interactive mode : define UI session 98 #ifdef G4UI_USE 99 G4UIExecutive* ui = new G4UIExecutive(argc, argv); 100 ui-> SessionStart(); 101 delete ui; 102 #endif 104 103 } 105 104 -
trunk/examples/extended/eventgenerator/HepMC/HepMCEx02/include/HepMCG4AsciiReader.hh
r807 r1337 27 27 // 28 28 // HepMCG4AsciiReader.hh 29 // $Id: HepMCG4AsciiReader.hh,v 1. 4 2006/06/29 17:10:08 gunterExp $29 // $Id: HepMCG4AsciiReader.hh,v 1.5 2010/05/24 05:31:10 kmura Exp $ 30 30 // 31 31 // ==================================================================== … … 34 34 35 35 #include "HepMCG4Interface.hh" 36 #include "HepMC/IO_Ascii .h"36 #include "HepMC/IO_AsciiParticles.h" 37 37 38 38 class HepMCG4AsciiReaderMessenger; … … 41 41 protected: 42 42 G4String filename; 43 HepMC::IO_Ascii * asciiInput;43 HepMC::IO_AsciiParticles* asciiInput; 44 44 45 45 G4int verbose; -
trunk/examples/extended/eventgenerator/HepMC/HepMCEx02/src/HepMCG4AsciiReader.cc
r807 r1337 27 27 // 28 28 // HepMCG4AsciiReader.cc 29 // $Id: HepMCG4AsciiReader.cc,v 1. 5 2006/06/29 17:12:09 gunterExp $29 // $Id: HepMCG4AsciiReader.cc,v 1.6 2010/05/24 05:29:44 kmura Exp $ 30 30 // 31 31 // ==================================================================== … … 41 41 //////////////////////////////////////// 42 42 { 43 asciiInput= new HepMC::IO_Ascii (filename.c_str(), std::ios::in);43 asciiInput= new HepMC::IO_AsciiParticles(filename.c_str(), std::ios::in); 44 44 45 45 messenger= new HepMCG4AsciiReaderMessenger(this); … … 60 60 delete asciiInput; 61 61 62 asciiInput= new HepMC::IO_Ascii (filename.c_str(), std::ios::in);62 asciiInput= new HepMC::IO_AsciiParticles(filename.c_str(), std::ios::in); 63 63 asciiInput-> print(); 64 64 } -
trunk/examples/extended/eventgenerator/HepMC/HepMCEx02/src/HepMCG4Interface.cc
r807 r1337 27 27 // 28 28 // HepMCG4Interface.cc 29 // $Id: HepMCG4Interface.cc,v 1. 4 2006/06/29 17:12:24 gunterExp $29 // $Id: HepMCG4Interface.cc,v 1.5 2010/05/24 05:29:44 kmura Exp $ 30 30 // 31 31 // ==================================================================== … … 91 91 92 92 // check world boundary 93 G4LorentzVector xvtx= (*vitr)-> position(); 93 HepMC::FourVector pos= (*vitr)-> position(); 94 G4LorentzVector xvtx(pos.x(), pos.y(), pos.z(), pos.t()); 94 95 if (! CheckVertexInsideWorld(xvtx.vect()*mm)) continue; 95 96 … … 106 107 107 108 G4int pdgcode= (*vpitr)-> pdg_id(); 108 G4LorentzVector p= (*vpitr)-> momentum(); 109 pos= (*vpitr)-> momentum(); 110 G4LorentzVector p(pos.px(), pos.py(), pos.pz(), pos.e()); 109 111 G4PrimaryParticle* g4prim= 110 112 new G4PrimaryParticle(pdgcode, p.x()*GeV, p.y()*GeV, p.z()*GeV); -
trunk/examples/extended/eventgenerator/HepMC/HepMCEx02/src/HepMCG4PythiaInterface.cc
r807 r1337 27 27 // 28 28 // HepMCG4PythiaInterface.cc 29 // $Id: HepMCG4PythiaInterface.cc,v 1. 6 2006/07/05 12:04:13 gcosmoExp $29 // $Id: HepMCG4PythiaInterface.cc,v 1.7 2010/05/24 05:29:44 kmura Exp $ 30 30 // 31 31 // ==================================================================== … … 37 37 38 38 #include "HepMC/GenEvent.h" 39 #include "HepMC/PythiaWrapper6_ 152.h"39 #include "HepMC/PythiaWrapper6_4.h" 40 40 41 41 // additional pythia calls -
trunk/examples/extended/eventgenerator/HepMC/HepMCEx02/vis.mac
r807 r1337 1 1 # 2 # Macro file for the initialization phase 2 # Macro file for the initialization phase of "exampleN02.cc" 3 3 # when runing in interactive mode 4 4 # … … 8 8 /run/verbose 2 9 9 # 10 # create empty scene 10 # Use this open statement to create an OpenGL view: 11 /vis/open OGL 600x600-0+0 11 12 # 12 /vis/scene/create 13 # Use this open statement to create a .prim file suitable for 14 # viewing in DAWN: 15 #/vis/open DAWNFILE 13 16 # 14 # Create a scene handler for a specific graphics system 15 # (Edit the next line(s) to choose another graphic system) 17 # Use this open statement to create a .heprep file suitable for 18 # viewing in HepRApp: 19 #/vis/open HepRepFile 16 20 # 17 /vis/open OGLIX 21 # Use this open statement to create a .wrl file suitable for 22 # viewing in a VRML viewer: 23 #/vis/open VRML2FILE 18 24 # 19 ####/vis/open DAWNFILE 25 # Disable auto refresh and quieten vis messages whilst scene and 26 # trajectories are established: 27 /vis/viewer/set/autoRefresh false 28 /vis/verbose errors 20 29 # 21 # draw scene 30 # Draw geometry: 31 /vis/drawVolume 22 32 # 23 /vis/viewer/set/viewpointThetaPhi 90 180 deg 33 # Specify view angle: 34 /vis/viewer/set/viewpointThetaPhi 90. 180. 35 # 36 # Specify zoom value: 24 37 /vis/viewer/zoom 1.4 25 /vis/viewer/flush26 38 # 27 # for drawing the tracks 28 # (if too many tracks cause core dump => storeTrajectory 0) 29 /tracking/storeTrajectory 1 30 /vis/scene/add/trajectories 39 # Specify style (surface or wireframe): 40 #/vis/viewer/set/style wireframe 41 # 42 # Draw coordinate axes: 43 #/vis/scene/add/axes 0 0 0 1 m 44 # 45 # Draw smooth trajectories at end of event, showing trajectory points 46 # as markers 2 pixels wide: 47 /vis/scene/add/trajectories smooth 48 /vis/modeling/trajectories/create/drawByCharge 49 /vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true 50 /vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2 51 # (if too many tracks cause core dump => /tracking/storeTrajectory 0) 52 # 53 # Draw hits at end of event: 54 #/vis/scene/add/hits 55 # 56 # To draw only gammas: 57 #/vis/filtering/trajectories/create/particleFilter 58 #/vis/filtering/trajectories/particleFilter-0/add gamma 59 # 60 # To invert the above, drawing all particles except gammas, 61 # keep the above two lines but also add: 62 #/vis/filtering/trajectories/particleFilter-0/invert true 63 # 64 # Many other options are available with /vis/modeling and /vis/filtering. 65 # For example, to select colour by particle ID: 66 #/vis/modeling/trajectories/create/drawByParticleID 67 #/vis/modeling/trajectories/drawByParticleID-0/set e- blue 68 # 69 # To superimpose all of the events from a given run: 31 70 /vis/scene/endOfEventAction accumulate 32 71 # 72 # Re-establish auto refreshing and verbosity: 73 /vis/viewer/set/autoRefresh true 74 /vis/verbose warnings 75 # 76 # For file-based drivers, use this to create an empty detector view: 77 #/vis/viewer/flush 78 # 79 # Now ready for /run/beamOn. -
trunk/examples/extended/eventgenerator/HepMC/History
r807 r1337 1 $Id: History,v 1. 18 2006/11/22 15:09:43 gcosmoExp $1 $Id: History,v 1.21 2010/06/06 04:51:10 perl Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 15 15 * Reverse chronological order (last date on top), please * 16 16 ---------------------------------------------------------- 17 18 June 4, 2010 J. Perl (exHepMC-V09-03-02) 19 20 May 24, 2010 K. Murakami (exHepMC-V09-03-01) 21 - HepMCEx02: Introdiced G4UIExecutive. 22 update for latest HepMC (2.06.00) 23 use QGSP physics list 24 25 May 12, 2010 J.Allison (exHepMC-V09-03-00) 26 - HepMCEx01: Introduced GUIExecutive. 17 27 18 28 Nov 22, 2006 G.Cosmo (exHepMC-V08-01-05) -
trunk/examples/extended/eventgenerator/HepMC/MCTruth/include/DetectorConstruction.hh
r807 r1337 26 26 // 27 27 // $Id: DetectorConstruction.hh,v 1.1 2006/11/22 14:51:27 gcosmo Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/eventgenerator/HepMC/MCTruth/include/MCTruthConfig.hh
r807 r1337 26 26 // 27 27 // $Id: MCTruthConfig.hh,v 1.1 2006/11/22 14:51:27 gcosmo Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/eventgenerator/HepMC/MCTruth/include/MCTruthEventAction.hh
r807 r1337 26 26 // 27 27 // $Id: MCTruthEventAction.hh,v 1.1 2006/11/22 14:51:27 gcosmo Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/eventgenerator/HepMC/MCTruth/include/MCTruthManager.hh
r807 r1337 26 26 // 27 27 // $Id: MCTruthManager.hh,v 1.1 2006/11/22 14:51:28 gcosmo Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/eventgenerator/HepMC/MCTruth/include/MCTruthTrackInformation.hh
r807 r1337 26 26 // 27 27 // $Id: MCTruthTrackInformation.hh,v 1.1 2006/11/22 14:51:28 gcosmo Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/eventgenerator/HepMC/MCTruth/include/MCTruthTrackingAction.hh
r807 r1337 26 26 // 27 27 // $Id: MCTruthTrackingAction.hh,v 1.1 2006/11/22 14:51:28 gcosmo Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/eventgenerator/HepMC/MCTruth/include/PhysicsList.hh
r807 r1337 26 26 // 27 27 // $Id: PhysicsList.hh,v 1.1 2006/11/22 14:51:28 gcosmo Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/eventgenerator/HepMC/MCTruth/include/PrimaryGeneratorAction.hh
r807 r1337 26 26 // 27 27 // $Id: PrimaryGeneratorAction.hh,v 1.1 2006/11/22 14:51:28 gcosmo Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/eventgenerator/HepMC/MCTruth/src/DetectorConstruction.cc
r807 r1337 26 26 // 27 27 // $Id: DetectorConstruction.cc,v 1.1 2006/11/22 14:51:29 gcosmo Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/eventgenerator/HepMC/MCTruth/src/MCTruthConfig.cc
r807 r1337 26 26 // 27 27 // $Id: MCTruthConfig.cc,v 1.1 2006/11/22 14:51:29 gcosmo Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/eventgenerator/HepMC/MCTruth/src/MCTruthEventAction.cc
r807 r1337 26 26 // 27 27 // $Id: MCTruthEventAction.cc,v 1.1 2006/11/22 14:51:29 gcosmo Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/eventgenerator/HepMC/MCTruth/src/MCTruthManager.cc
r807 r1337 26 26 // 27 27 // $Id: MCTruthManager.cc,v 1.2 2006/12/13 15:42:36 gunter Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/eventgenerator/HepMC/MCTruth/src/MCTruthTrackInformation.cc
r807 r1337 26 26 // 27 27 // $Id: MCTruthTrackInformation.cc,v 1.1 2006/11/22 14:51:30 gcosmo Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/eventgenerator/HepMC/MCTruth/src/MCTruthTrackingAction.cc
r807 r1337 26 26 // 27 27 // $Id: MCTruthTrackingAction.cc,v 1.1 2006/11/22 14:51:30 gcosmo Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/eventgenerator/HepMC/MCTruth/src/PhysicsList.cc
r807 r1337 26 26 // 27 27 // $Id: PhysicsList.cc,v 1.1 2006/11/22 14:51:30 gcosmo Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/eventgenerator/HepMC/MCTruth/src/PrimaryGeneratorAction.cc
r807 r1337 26 26 // 27 27 // $Id: PrimaryGeneratorAction.cc,v 1.1 2006/11/22 14:51:31 gcosmo Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 29 29 // 30 30 // -
trunk/examples/extended/eventgenerator/HepMC/README
r807 r1337 10 10 ------------------------------------------- 11 11 HepMC: 12 tested version : 1.27.02 13 http://lcgapp.cern.ch/project/spi/extsoft/packages.php?pkg=HepMC 14 http://cern.ch/mdobbs/HepMC/ 12 tested version : 2.06.00 13 http://lcgapp.cern.ch/project/simu/HepMC/ 15 14 16 15 Note: examples were tested only on Linux with gcc. -
trunk/examples/extended/eventgenerator/exgps/GNUmakefile
r1230 r1337 1 # $Id: GNUmakefile,v 1. 5 2008/12/02 21:42:48 fleiExp $1 # $Id: GNUmakefile,v 1.6 2010/01/11 16:33:59 gcosmo Exp $ 2 2 # -------------------------------------------------------------- 3 3 # GNUmakefile for tests module. Gabriele Cosmo, 27/06/98. … … 9 9 10 10 ifndef G4INSTALL 11 G4INSTALL = ../../.. 11 G4INSTALL = ../../../.. 12 12 endif 13 13 … … 16 16 17 17 include $(G4INSTALL)/config/binmake.gmk 18 19 #G4VIS_BUILD_OPENGLX_DRIVER = 020 #G4VIS_USE_OPENGLX = 021 #LDFLAGS += -static22 -
trunk/examples/extended/eventgenerator/exgps/History
r807 r1337 12 12 * Reverse chronological order (last date on top), please * 13 13 ---------------------------------------------------------- 14 15 03/06/2010 - J.Perl (exgps-V09-03-01) 16 - Updated vis usage 17 18 12/05/2010 J.Allison (exgps-V09-03-00) 19 - Introduced GUIExecutive. 20 21 08/12/2008 G.Barrand 22 - correct / compleete the part concerning AIDA in the README file. 23 24 06/12/2008 F.Lei (exgps-V09-01-02) 25 - updated g4mac files in ./macros 26 27 05/12/2008 G.Barrand 28 - exGPSAnalysisManager : have a comment in case the 29 AIDA_createAnalysisFactory or the AIDA::ITree creation 30 fails ; which is something that may happen. 31 - exGPSAnalysisManager : have the creation of the AIDA::IPlotter 32 on the same footing than other AIDA objects. Remove then 33 the createPlotter method. 34 - exGPSAnalysisManager : have t,hFactories local in BeginOfRun 35 and then rm getHistogram,getTupleFactories. 36 37 04/12/2008 F.Lei (exgps-V09-01-01) 38 - updated README 39 - tag Guy's changes 40 41 04/12/2008 G.Barrand 42 - exGPSAnalysisManager.hh : have the destructor private. 43 - exGPS.cc : then use the exGPSAnalysisManager::dispose() method. 44 - exGPS.cc : rm the aMgr which is no more used. 45 - exGPSAnalysisManager::createPlotter : rm the "Plotter" string 46 and then ask to the AIDA implementation the default plotter. 47 - exGPSAnalysisManager::EndOfRun : reset the variable after the deletions. 48 - exGPS.cc and exGPSEventAction : use #ifdef G4VIS_USE in case 49 somone want to build without the G4 vis system. 50 - exGPSAnalysisManager.cc : revisit : createPlotter : delete 51 of plotterFactory and plotter where lacking. (Seen with the 52 OpenScientist object decount). 53 - exGPSRunAction : #ifdef G4VIS_USE. 54 55 02/12/2008 F.Lei (exgps-V09-01-00) 56 - updated exGPSAnalysisManager class to improve the AIDA output 57 - removed AIDA setup from GNUmakefile (use G4 default one) 58 - removed the ROOT file option 59 60 21/12/2006 F.Lei (exgps-V08-02-00) 61 - Added the option for output results in .root file 62 - Changed particle_name to PDGcode in the ntuple 63 14 64 19/07/2005 F.Lei (exgps-V07-01-00) 15 65 - Changing in GNUmakefile -
trunk/examples/extended/eventgenerator/exgps/README
r807 r1337 35 35 36 36 Visualisation of the geometry and the tracks is possible with many of the G4 visualisation packages. An 37 example of displaying the geometry and tracks using VRML is given in the macro file display_vrml.mac.37 example of displaying the geometry and tracks using VRML is given in the macro file vis.mac. 38 38 39 39 6. ANALYSIS: 40 40 41 41 This example implements an AIDA-compliant analysis manager which creates histograms and ntuples. 42 If user has an AIDA-compliant tool such as AIDAJNI, ANAPHE, or PI installed on his/her system, 43 the analysis part of this example can be activated by: 42 If user has an AIDA-compliant tool such as AIDAJNI, ANAPHE, OpenScientist or PI installed on his/her system. Some URLs : 43 http://aida.freehep.org/ 44 http://java.freehep.org/aidajni 45 http://www.cern.ch/PI 46 http://OpenScientist.lal.in2p3.fr 47 48 The analysis part of this example can be activated by doing a "source 49 aida-setup" of the AIDA compliant tool (to activate the aida-config 50 program) and by raising some environment variabless so that the 51 G4 GNUmakefile system can take into account the AIDA tool. 52 This can be done, for example on a UNIX under a csh like shell, with : 53 csh> source <path_where_the_AIDA_tool_is_installed>/aida-setup.csh 54 csh> aida-config # to check that this program is up and running 55 G4 related part : 56 csh> setenv G4ANALYSIS_USE 1 57 csh> setenv G4ANALYSIS_AIDA_CONFIG_CFLAGS `aida-config --include` 58 csh> setenv G4ANALYSIS_AIDA_CONFIG_LIBS `aida-config --lib` 44 59 45 setenv G4ANALYSIS_USE 1 60 (It may be usefull to note that in the G4 GNUmakefile system, 61 the upper variables are used in the file config/analysis.gmk). 46 62 47 63 This needs to be done before building the executable. 48 64 49 65 At the end of an excution, an xml file "exgps.aida" is created by default which contains 50 histograms and ntuples. User can change the name and typeof this output file with the commands66 histograms and ntuples. User can change the name and format of this output file with the commands 51 67 52 68 /analysis/filetype new-type … … 55 71 e.g. 56 72 57 /analysis/filetype hbook58 /analysis/filename exgps.hbook73 /analysis/filetype root 74 /analysis/filename myfile.root 59 75 60 these change the output file type to "hbook" and name to "exgps.hbbok" 76 these change the output file format to ROOT and output file name to "myfile.root". There are three file 77 formats to choose from: xml, root or hbook. 61 78 62 79 The output file conatins 6 histograms and one ntuple: … … 74 91 In the ntuple the following data are recorded for each incident particle: 75 92 76 Particle Name93 Particle ID 77 94 Incident Position (x,y,z); 78 95 Incident Angle (theta,phi); 79 96 Particle weight; 80 81 97 82 98 7. GETTING STARTED: … … 86 102 87 103 setenv G4ANALYSIS_USE 1 104 105 otherwise do 106 107 unsetenv G4ANALYSIS_USE 88 108 89 otherwise make sure the G4ANALYSIS_USE is not defined: 90 91 unsetenv G4ANALYSIS_USE 109 to remove the generation of an output file. 92 110 93 111 ii) Build the exGPS executable: … … 106 124 $G4BIN/$G4SYSTEM/exGPS exrgps.in 107 125 108 If G4ANALYSIS_USE is defined, one should see a display of the six histograms. If JAIDA is used, one has 109 to close the plotter window in order to terminate the execution. After the termination one will find 110 the "exgps.aida", as well as a vrml file "g4_00.wrl" in the directory. 126 If G4ANALYSIS_USE is defined, and dpends on the particular AIDA system used, e.g. JAIDA, one could see 127 a display window of the six histograms. It may be neccessary to close the plotter window in order to 128 terminate the execution. After the termination one will find the "exgps.aida", as well as a vrml file 129 "g4_00.wrl" in the directory. 111 130 112 131 8. FURTHER EXAMPLES of MACRO FILES: … … 119 138 120 139 121 122 140 123 124 -
trunk/examples/extended/eventgenerator/exgps/exGPS.cc
r1230 r1337 26 26 #include "G4RunManager.hh" 27 27 #include "G4UImanager.hh" 28 #include "G4UIterminal.hh"29 #include "G4UItcsh.hh"30 28 31 29 #ifdef G4UI_USE_XM … … 39 37 #ifdef G4VIS_USE 40 38 #include "G4VisExecutive.hh" 39 #endif 40 41 #ifdef G4UI_USE 42 #include "G4UIExecutive.hh" 41 43 #endif 42 44 … … 72 74 runManager->SetUserAction(eventAction); 73 75 74 G4UIsession* session=0; 75 76 if (argc==1) // Define UI session for interactive mode. 77 { 78 // G4UIterminal is a (dumb) terminal. 79 #ifdef G4UI_USE_XM 80 session = new G4UIXm(argc,argv); 81 #else 82 #ifdef G4UI_USE_TCSH 83 session = new G4UIterminal(new G4UItcsh); 84 #else 85 session = new G4UIterminal(); 86 #endif 87 #endif 88 } 89 76 //Initialize G4 kernel 77 runManager->Initialize(); 78 90 79 // visualization manager 91 80 #ifdef G4VIS_USE … … 94 83 #endif 95 84 96 //Initialize G4 kernel97 runManager->Initialize();98 99 85 // get the pointer to the User Interface manager 100 G4UImanager* UI = G4UImanager::GetUIpointer();86 G4UImanager* UImanager = G4UImanager::GetUIpointer(); 101 87 // UI->ApplyCommand("/control/execute display.mac"); 102 88 103 if ( session) // Define UI session for interactive mode.89 if (argc!=1) // batch mode 104 90 { 105 // G4UIterminal is a (dumb) terminal.106 session->SessionStart();107 delete session;108 }109 else // Batch mode110 {111 91 G4String command = "/control/execute "; 112 92 G4String fileName = argv[1]; 113 UI ->ApplyCommand(command+fileName);93 UImanager->ApplyCommand(command+fileName); 114 94 } 115 95 else 96 { // interactive mode : define UI session 97 #ifdef G4UI_USE 98 G4UIExecutive* ui = new G4UIExecutive(argc, argv); 99 ui->SessionStart(); 100 delete ui; 101 #endif 102 } 103 116 104 // job termination 117 105 -
trunk/examples/extended/eventgenerator/exgps/exgps.in
r807 r1337 26 26 # commands below are independent of gps 27 27 # 28 #/analysis/filename focus.aida 28 #/analysis/filename exgps.root 29 #/analysis/filetype root 29 30 /analysis/maxeng 800 MeV 30 31 /analysis/mineng 200 MeV … … 34 35 #/tracking/verbose 1 35 36 # 36 /control/execute display_vrml.mac37 /control/execute macros/display.mac 37 38 # 38 /run/beamOn 20 39 /run/beamOn 2000 39 40 -
trunk/examples/extended/eventgenerator/exgps/include/exGPSEventActionMessenger.hh
r1230 r1337 32 32 // 33 33 // $Id: exGPSEventActionMessenger.hh,v 1.4 2006/06/29 17:14:26 gunter Exp $ 34 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $34 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 35 35 // 36 36 // -
trunk/examples/extended/eventgenerator/exgps/macros/display.mac
r1230 r1337 1 # Use this open statement to create an OpenGL view: 2 #/vis/open OGL 600x600-0+0 1 3 # 2 /vis/scene/create 3 /vis/sceneHandler/create VRML2FILE 4 /vis/viewer/create 4 # Use this open statement to create a .prim file suitable for 5 # viewing in DAWN: 6 #/vis/open DAWNFILE 7 # 8 # Use this open statement to create a .heprep file suitable for 9 # viewing in HepRApp: 10 #/vis/open HepRepFile 11 # 12 # Use this open statement to create a .wrl file suitable for 13 # viewing in a VRML viewer: 14 /vis/open VRML2FILE 15 # 16 # Disable auto refresh and quieten vis messages whilst scene and 17 # trajectories are established: 18 /vis/viewer/set/autoRefresh false 19 /vis/verbose errors 20 # 21 # Draw geometry: 5 22 /vis/drawVolume 6 #/vis/viewer/viewpointThetaPhi 30 307 #/vis/viewer/update8 /vis/scene/endOfEventAction accumulate9 /tracking/storeTrajectory 110 11 23 # 12 24 # Specify view angle: 25 #/vis/viewer/set/viewpointThetaPhi 90. 0. 26 # 27 # Specify zoom value: 28 #/vis/viewer/zoom 2. 29 # 30 # Specify style (surface or wireframe): 31 #/vis/viewer/set/style wireframe 32 # 33 # Draw coordinate axes: 34 #/vis/scene/add/axes 0 0 0 1 m 35 # 36 # Draw smooth trajectories at end of event, showing trajectory points 37 # as markers 2 pixels wide: 38 /vis/scene/add/trajectories smooth 39 /vis/modeling/trajectories/create/drawByCharge 40 /vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true 41 /vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2 42 # (if too many tracks cause core dump => /tracking/storeTrajectory 0) 43 # 44 # Draw hits at end of event: 45 #/vis/scene/add/hits 46 # 47 # To draw only gammas: 48 #/vis/filtering/trajectories/create/particleFilter 49 #/vis/filtering/trajectories/particleFilter-0/add gamma 50 # 51 # To invert the above, drawing all particles except gammas, 52 # keep the above two lines but also add: 53 #/vis/filtering/trajectories/particleFilter-0/invert true 54 # 55 # Many other options are available with /vis/modeling and /vis/filtering. 56 # For example, to select colour by particle ID: 57 #/vis/modeling/trajectories/create/drawByParticleID 58 #/vis/modeling/trajectories/drawByParticleID-0/set e- blue 59 # 60 # To superimpose all of the events from a given run: 61 #/vis/scene/endOfEventAction accumulate 62 # 63 # Re-establish auto refreshing and verbosity: 64 /vis/viewer/set/autoRefresh true 65 /vis/verbose warnings 66 # 67 # For file-based drivers, use this to create an empty detector view: 68 #/vis/viewer/flush -
trunk/examples/extended/eventgenerator/exgps/macros/test1.g4mac
r807 r1337 1 # test1 1 2 /gps/particle proton 2 3 /gps/pos/type Point … … 15 16 /analysis/maxpos 5 cm 16 17 /analysis/minpos -5 cm 17 /event/printModulo 1000 018 /event/printModulo 1000 18 19 #/control/execute display.mac 19 20 /run/beamOn 10000 20 21 -
trunk/examples/extended/eventgenerator/exgps/macros/test33.g4mac
r807 r1337 34 34 #/tracking/verbose 1 35 35 # 36 /control/execute display _vrml.mac36 /control/execute display.mac 37 37 # 38 38 /run/beamOn 20 -
trunk/examples/extended/eventgenerator/exgps/macros/test34.g4mac
r807 r1337 18 18 /gps/ang/type cos 19 19 # 20 # the proton energy is in gaussian profile centered at 4MeV20 # the proton energy is in gaussian profile centered at 2.5 MeV 21 21 /gps/ene/type Gauss 22 /gps/ene/mono 4MeV22 /gps/ene/mono 2.5 MeV 23 23 /gps/ene/sigma 0.5 MeV 24 24 # … … 49 49 # commands below are independent of gps 50 50 # 51 #/analysis/filetype root 51 52 /analysis/filename test34.aida 52 53 /analysis/maxeng 5 MeV … … 54 55 /analysis/maxpos 10 cm 55 56 /analysis/minpos -10 cm 56 #/event/printModulo 1000057 /event/printModulo 10000 57 58 # 58 /control/execute display_vrml.mac59 #/control/execute display.mac 59 60 # 60 61 #/tracking/verbose 1 61 /run/beamOn 10062 /run/beamOn 2000 62 63 -
trunk/examples/extended/eventgenerator/exgps/src/exGPSEventAction.cc
r1230 r1337 35 35 #include "G4Event.hh" 36 36 #include "G4EventManager.hh" 37 #include "G4TrajectoryContainer.hh"38 #include "G4Trajectory.hh"39 #include "G4VVisManager.hh"40 37 #include "G4ios.hh" 41 38 #include "G4UnitsTable.hh" … … 107 104 #endif 108 105 109 #ifdef G4VIS_USE110 // extract the trajectories and draw them111 if (G4VVisManager::GetConcreteInstance())112 {113 G4TrajectoryContainer * trajectoryContainer = evt->GetTrajectoryContainer();114 G4int n_trajectories = 0;115 if (trajectoryContainer) n_trajectories = trajectoryContainer->entries();116 117 for (G4int i=0; i<n_trajectories; i++)118 { G4Trajectory* trj = (G4Trajectory*)((*(evt->GetTrajectoryContainer()))[i]);119 if (drawFlag == "all") trj->DrawTrajectory(0);120 else if ((drawFlag == "charged")&&(trj->GetCharge() != 0.))121 trj->DrawTrajectory(0);122 else if ((drawFlag == "neutral")&&(trj->GetCharge() == 0.))123 trj->DrawTrajectory(0);124 }125 }126 #endif127 106 } 128 107 -
trunk/examples/extended/eventgenerator/exgps/src/exGPSEventActionMessenger.cc
r1230 r1337 32 32 // 33 33 // $Id: exGPSEventActionMessenger.cc,v 1.3 2006/06/29 17:14:43 gunter Exp $ 34 // GEANT4 tag $Name: geant4-09-0 3-cand-01 $34 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 35 35 // 36 36 //
Note: See TracChangeset
for help on using the changeset viewer.