Changeset 1313 for trunk/examples/advanced/gammaray_telescope
- Timestamp:
- Jun 14, 2010, 3:54:58 PM (14 years ago)
- Location:
- trunk/examples/advanced/gammaray_telescope
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/examples/advanced/gammaray_telescope/GNUmakefile
r807 r1313 1 # $Id: GNUmakefile,v 1.2 4 2006/11/17 15:49:35 flongo Exp $1 # $Id: GNUmakefile,v 1.25 2010/01/11 14:29:03 gcosmo Exp $ 2 2 # -------------------------------------------------------------- 3 3 # GNUmakefile for examples module. Gabriele Cosmo, 06/04/98. … … 9 9 10 10 ifndef G4INSTALL 11 G4INSTALL = ../.. /..11 G4INSTALL = ../.. 12 12 endif 13 13 -
trunk/examples/advanced/gammaray_telescope/History
r807 r1313 1 1 ------------------------------------------------------------------- 2 $Id: History,v 1. 4 2005/12/07 10:50:31 guatelliExp $2 $Id: History,v 1.7 2010/06/06 06:18:54 perl Exp $ 3 3 ------------------------------------------------------------------- 4 4 … … 9 9 History file 10 10 ------------ 11 07-12-2005 - Susanna Guatelli (gammaraytel-V07-01-00) 12 - GammaRayParticles introduced 13 - G4Exception deriving from Hadronic Physics List deleted 11 03.06.2010 Joseph Perl, Tag: gammaraytel-V09-03-00 12 Update vis usage 14 13 15 3rd May 2005 John Allison (examples-V07-00-03) 16 - Replaced vis manager with G4VisExecutive. 14 24.11.2008 G.A.P.Cirrone, Tag: gammaraytel-V09-01-02 15 Updated History file 17 16 18 10.12.2004 - Gabriele Cosmo (gammaraytel-V06-02-01) 17 24.11.2008 G.A.P.Cirrone, Tag: gammaraytel-V09-01-01 18 Fixed compilation problems 19 20 11.06.2008 G.A.P.Cirrone (gammaraytel-V09-01-00) 21 Fixed errors in compilation 22 23 07-12-2005 Susanna Guatelli (gammaraytel-V07-01-00) 24 GammaRayParticles introduced 25 G4Exception deriving from Hadronic Physics List deleted 26 27 3rd May 2005 John Allison (examples-V07-00-03) 28 Replaced vis manager with G4VisExecutive. 29 30 10.12.2004 Gabriele Cosmo (gammaraytel-V06-02-01) 19 31 Replaced usage of M_PI with CLHEP's pi. 20 32 21 01.12.2004 -Francesco Longo (gammaraytel-V06-02-00)33 01.12.2004 Francesco Longo (gammaraytel-V06-02-00) 22 34 Updates and migration to <cmath>. 23 35 24 01.06.2004 -Susanna Guatelli36 01.06.2004 Susanna Guatelli 25 37 Migration to AIDA 3.2.1 and PI 1.2.1. -
trunk/examples/advanced/gammaray_telescope/macro1.mac
r1230 r1313 28 28 #/payload/update 29 29 30 # Use this open statement to create an OpenGL view: 31 /vis/open OGL 600x600-0+0 30 32 # 31 # Create a scene handler for a specific graphics system 32 /vis/open OGLSX 33 # Use this open statement to create a .prim file suitable for 34 # viewing in DAWN: 35 #/vis/open DAWNFILE 36 # 37 # Use this open statement to create a .heprep file suitable for 38 # viewing in HepRApp: 33 39 #/vis/open HepRepFile 34 35 /vis/viewer/reset 36 /vis/viewer/set/viewpointThetaPhi 90 0 37 38 # Visualize of the whole detector geometry 40 # 41 # Use this open statement to create a .wrl file suitable for 42 # viewing in a VRML viewer: 43 #/vis/open VRML2FILE 44 # 45 # Disable auto refresh and quieten vis messages whilst scene and 46 # trajectories are established: 47 /vis/viewer/set/autoRefresh false 48 /vis/verbose errors 49 # 50 # Draw geometry: 39 51 /vis/drawVolume 40 41 # for drawing the tracks42 # if too many tracks cause core dump => storeTrajectory 043 /tracking/storeTrajectory 144 45 52 # 46 # Flush visualization 47 /vis/viewer/update 53 # Specify view angle: 54 /vis/viewer/set/viewpointThetaPhi 90. 0. 55 # 56 # Specify zoom value: 57 #/vis/viewer/zoom 2. 58 # 59 # Specify style (surface or wireframe): 60 #/vis/viewer/set/style wireframe 61 # 62 # Draw coordinate axes: 63 #/vis/scene/add/axes 0 0 0 1 m 64 # 65 # Draw smooth trajectories at end of event, showing trajectory points 66 # as markers 2 pixels wide: 67 /vis/scene/add/trajectories smooth 68 /vis/modeling/trajectories/create/drawByCharge 69 /vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true 70 /vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2 71 # (if too many tracks cause core dump => /tracking/storeTrajectory 0) 72 # 73 # Draw hits at end of event: 74 #/vis/scene/add/hits 75 # 76 # To draw only gammas: 77 #/vis/filtering/trajectories/create/particleFilter 78 #/vis/filtering/trajectories/particleFilter-0/add gamma 79 # 80 # To invert the above, drawing all particles except gammas, 81 # keep the above two lines but also add: 82 #/vis/filtering/trajectories/particleFilter-0/invert true 83 # 84 # Many other options are available with /vis/modeling and /vis/filtering. 85 # For example, to select colour by particle ID: 86 #/vis/modeling/trajectories/create/drawByParticleID 87 #/vis/modeling/trajectories/drawByParticleID-0/set e- blue 88 # 89 # To superimpose all of the events from a given run: 90 #/vis/scene/endOfEventAction accumulate 91 # 92 # Re-establish auto refreshing and verbosity: 93 /vis/viewer/set/autoRefresh true 94 /vis/verbose warnings 95 # 96 # For file-based drivers, use this to create an empty detector view: 97 #/vis/viewer/flush 48 98 49 99 # run 10 events -
trunk/examples/advanced/gammaray_telescope/macro2.mac
r1230 r1313 32 32 /payload/update 33 33 34 34 # Use this open statement to create an OpenGL view: 35 #/vis/open OGL 600x600-0+0 35 36 # 36 # Create a scene handler for a specific graphics system 37 # Use this open statement to create a .prim file suitable for 38 # viewing in DAWN: 39 #/vis/open DAWNFILE 40 # 41 # Use this open statement to create a .heprep file suitable for 42 # viewing in HepRApp: 43 #/vis/open HepRepFile 44 # 45 # Use this open statement to create a .wrl file suitable for 46 # viewing in a VRML viewer: 37 47 /vis/open VRML2FILE 38 #/vis/open OGLIX 39 40 /vis/viewer/reset 41 /vis/viewer/set/viewpointThetaPhi 90 0 42 43 # Visualize of the whole detector geometry 48 # 49 # Disable auto refresh and quieten vis messages whilst scene and 50 # trajectories are established: 51 /vis/viewer/set/autoRefresh false 52 /vis/verbose errors 53 # 54 # Draw geometry: 44 55 /vis/drawVolume 45 46 # for drawing the tracks47 # if too many tracks cause core dump => storeTrajectory 048 /tracking/storeTrajectory 149 50 56 # 51 # Flush visualization 52 /vis/viewer/update 57 # Specify view angle: 58 /vis/viewer/set/viewpointThetaPhi 90. 0. 59 # 60 # Specify zoom value: 61 #/vis/viewer/zoom 2. 62 # 63 # Specify style (surface or wireframe): 64 #/vis/viewer/set/style wireframe 65 # 66 # Draw coordinate axes: 67 #/vis/scene/add/axes 0 0 0 1 m 68 # 69 # Draw smooth trajectories at end of event, showing trajectory points 70 # as markers 2 pixels wide: 71 /vis/scene/add/trajectories smooth 72 /vis/modeling/trajectories/create/drawByCharge 73 /vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true 74 /vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2 75 # (if too many tracks cause core dump => /tracking/storeTrajectory 0) 76 # 77 # Draw hits at end of event: 78 #/vis/scene/add/hits 79 # 80 # To draw only gammas: 81 #/vis/filtering/trajectories/create/particleFilter 82 #/vis/filtering/trajectories/particleFilter-0/add gamma 83 # 84 # To invert the above, drawing all particles except gammas, 85 # keep the above two lines but also add: 86 #/vis/filtering/trajectories/particleFilter-0/invert true 87 # 88 # Many other options are available with /vis/modeling and /vis/filtering. 89 # For example, to select colour by particle ID: 90 #/vis/modeling/trajectories/create/drawByParticleID 91 #/vis/modeling/trajectories/drawByParticleID-0/set e- blue 92 # 93 # To superimpose all of the events from a given run: 94 #/vis/scene/endOfEventAction accumulate 95 # 96 # Re-establish auto refreshing and verbosity: 97 /vis/viewer/set/autoRefresh true 98 /vis/verbose warnings 99 # 100 # For file-based drivers, use this to create an empty detector view: 101 #/vis/viewer/flush 53 102 54 103 /run/beamOn 10 -
trunk/examples/advanced/gammaray_telescope/macro3.mac
r1230 r1313 26 26 #/payload/update 27 27 28 # Use this open statement to create an OpenGL view: 29 #/vis/open OGL 600x600-0+0 28 30 # 29 # Create a scene handler for a specific graphics system31 # Use this open statement to create a DAWN view: 30 32 /vis/open DAWN 33 # 34 # Use this open statement to create a .heprep file suitable for 35 # viewing in HepRApp: 31 36 #/vis/open HepRepFile 32 33 /vis/viewer/reset 34 /vis/viewer/set/viewpointThetaPhi 90 0 35 36 # Visualize of the whole detector geometry 37 # 38 # Use this open statement to create a .wrl file suitable for 39 # viewing in a VRML viewer: 40 #/vis/open VRML2FILE 41 # 42 # Disable auto refresh and quieten vis messages whilst scene and 43 # trajectories are established: 44 /vis/viewer/set/autoRefresh false 45 /vis/verbose errors 46 # 47 # Draw geometry: 37 48 /vis/drawVolume 38 39 # for drawing the tracks40 # if too many tracks cause core dump => storeTrajectory 041 /tracking/storeTrajectory 142 43 49 # 44 # Flush visualization 45 /vis/viewer/update 50 # Specify view angle: 51 /vis/viewer/set/viewpointThetaPhi 90. 0. 52 # 53 # Specify zoom value: 54 #/vis/viewer/zoom 2. 55 # 56 # Specify style (surface or wireframe): 57 #/vis/viewer/set/style wireframe 58 # 59 # Draw coordinate axes: 60 #/vis/scene/add/axes 0 0 0 1 m 61 # 62 # Draw smooth trajectories at end of event, showing trajectory points 63 # as markers 2 pixels wide: 64 /vis/scene/add/trajectories smooth 65 /vis/modeling/trajectories/create/drawByCharge 66 /vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true 67 /vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2 68 # (if too many tracks cause core dump => /tracking/storeTrajectory 0) 69 # 70 # Draw hits at end of event: 71 #/vis/scene/add/hits 72 # 73 # To draw only gammas: 74 #/vis/filtering/trajectories/create/particleFilter 75 #/vis/filtering/trajectories/particleFilter-0/add gamma 76 # 77 # To invert the above, drawing all particles except gammas, 78 # keep the above two lines but also add: 79 #/vis/filtering/trajectories/particleFilter-0/invert true 80 # 81 # Many other options are available with /vis/modeling and /vis/filtering. 82 # For example, to select colour by particle ID: 83 #/vis/modeling/trajectories/create/drawByParticleID 84 #/vis/modeling/trajectories/drawByParticleID-0/set e- blue 85 # 86 # To superimpose all of the events from a given run: 87 #/vis/scene/endOfEventAction accumulate 88 # 89 # Re-establish auto refreshing and verbosity: 90 /vis/viewer/set/autoRefresh true 91 /vis/verbose warnings 92 # 93 # For file-based drivers, use this to create an empty detector view: 94 #/vis/viewer/flush 46 95 47 96 # run 10 events -
trunk/examples/advanced/gammaray_telescope/src/GammaRayTelEventAction.cc
r1230 r1313 25 25 // 26 26 // 27 // $Id: GammaRayTelEventAction.cc,v 1. 19 2006/06/29 15:56:39 gunterExp $28 // GEANT4 tag $Name: geant4-09-0 3-cand-01$27 // $Id: GammaRayTelEventAction.cc,v 1.20 2010/06/06 06:18:54 perl Exp $ 28 // GEANT4 tag $Name: geant4-09-04-beta-cand-00 $ 29 29 // ------------------------------------------------------------ 30 30 // GEANT 4 class implementation file … … 54 54 #include "G4HCofThisEvent.hh" 55 55 #include "G4VHitsCollection.hh" 56 #include "G4TrajectoryContainer.hh"57 #include "G4Trajectory.hh"58 #include "G4VVisManager.hh"59 56 #include "G4SDManager.hh" 60 57 #include "G4UImanager.hh" … … 243 240 } 244 241 } 245 246 if(G4VVisManager::GetConcreteInstance()) { 247 for(G4int i=0; i<n_trajectories; i++) { 248 G4Trajectory* trj = (G4Trajectory *)((*(evt->GetTrajectoryContainer()))[i]); 249 if (drawFlag == "all") trj->DrawTrajectory(50); 250 else if ((drawFlag == "charged")&&(trj->GetCharge() != 0.)) 251 trj->DrawTrajectory(50); 252 } 253 } 254 } 255 256 257 258 259 260 261 262 263 264 265 266 267 242 } 243 244 245 246 247 248 249 250 251 252 253 254 255
Note: See TracChangeset
for help on using the changeset viewer.