Changeset 1337 for trunk/examples/extended/eventgenerator/HepMC/HepMCEx02
- Timestamp:
- Sep 30, 2010, 2:47:17 PM (14 years ago)
- Location:
- trunk/examples/extended/eventgenerator/HepMC/HepMCEx02
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
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.
Note: See TracChangeset
for help on using the changeset viewer.