Changeset 1313 for trunk/examples/advanced/air_shower
- Timestamp:
- Jun 14, 2010, 3:54:58 PM (14 years ago)
- Location:
- trunk/examples/advanced/air_shower
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/examples/advanced/air_shower/GNUmakefile
r1230 r1313 8 8 9 9 ifndef G4INSTALL 10 G4INSTALL = ../.. /..10 G4INSTALL = ../.. 11 11 endif 12 12 -
trunk/examples/advanced/air_shower/History
r807 r1313 1 $Id: History,v 1. 14 2007/09/30 23:05:58 gumExp $1 $Id: History,v 1.24 2010/06/06 06:13:59 perl Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 8 8 History file 9 9 ------------ 10 02.06.2010 - J.Perl (air_shower-V09-03-00) 11 Updated vis usage 12 13 16.11.2009 -- B. Tomé, 14 Tag air_shower-V09-02-06 15 Changed UltraPhysicsList.cc to use new processes G4eMultipleScattering, G4MuMultipleScattering 16 and G4hMultipleScattering 17 Tested example air_shower with Geant4 tag geant4-09-02-ref-10 18 19 15.05.2009 -- B. Tomé, 20 Updated README file. Tag air_shower-V09-01-00 21 Tested example with Geant4 tag geant4-09-02-ref-04 and iAIDA-1.0.14 22 23 10.12.2008 -- G.A.P.Cirrone, Tag: air_shower-V09-01-05 24 Updated README file; 25 03.07.2008 -- B. Tomé; Tag air_shower-V09-01-04 26 Access to private data members of UltraDetectorConstruction through Get functions. 27 28 03.07.2008 -- B. Tomé; Tag air_shower-V09-01-03 29 Adjusted range of optical properties tables in UltraDetectorConstruction; 30 Added check of optical photon energy in UltraPrimaryGeneratorAction; 31 Cerenkov process attached to all applicable particles; 32 Modified Visualisation.mac and UltraMacro.mac files 33 34 26.06.2008 -- G.A.P.Cirrone; Tag air_shower-V09-01-02 35 Corrected a parameter in the UltraDetectorConstruction to remove a segmentation 36 due to a non correct definition of the refraction index of the Quartz. 37 38 15.06.2008 -- G.A.P.Cirrone; Tag: air_shower-V09-01-01 39 Removed no more necessary AIDA commands from GNUmakefile 40 41 11.06.2008 -- G.A.P.Cirrone air_shower-V09-01-00 42 Solved a compilation error in the Analysis Manager 10 43 11 44 30.09.2007 -- P.Gumplinger - air_shower-V09-00-00 … … 38 71 -- Corrected usage of <strstream> in RunActionMessenger. 39 72 -- Corrected call to Visualisation.mac from Ultra.cc. 40 73 -- Changed viewer to OGLSX in Visualisation.mac. 41 74 42 75 03.05.2005 -- J.Allison -
trunk/examples/advanced/air_shower/Visualisation.mac
r1230 r1313 3 3 /run/verbose 2 4 4 # 5 # create empty scene 5 # Use this open statement to create an OpenGL view: 6 #/vis/open OGL 600x600-0+0 6 7 # 7 # /vis/scene/create Space8 # /vis/scene/notifyHandlers Space flush9 /vis/ scene/create8 # Use this open statement to create a .prim file suitable for 9 # viewing in DAWN: 10 /vis/open DAWNFILE 10 11 # 11 # Create a scene handler for a specific graphics system 12 # (Edit the next line(s) to choose another graphic system) 12 # Use this open statement to create a .heprep file suitable for 13 # viewing in HepRApp: 14 #/vis/open HepRepFile 13 15 # 14 #/vis/open OGLIX 15 #/vis/open RayTracer 16 #/vis/open OGLSX 17 /vis/open DAWNFILE 18 #/vis/open HepRepFile 16 # Use this open statement to create a .wrl file suitable for 17 # viewing in a VRML viewer: 19 18 #/vis/open VRML2FILE 20 19 # 21 /vis/viewer/set/viewpointThetaPhi 90.0 0.0 deg 22 /vis/viewer/zoom 1. 23 /vis/viewer/flush 20 # Disable auto refresh and quieten vis messages whilst scene and 21 # trajectories are established: 22 /vis/viewer/set/autoRefresh false 23 /vis/verbose errors 24 # 25 # Draw geometry: 26 /vis/drawVolume 27 # 28 # Specify view angle: 29 /vis/viewer/set/viewpointThetaPhi 90. 0. 30 # 31 # Specify zoom value: 32 #/vis/viewer/zoom 2. 33 # 34 # Specify style (surface or wireframe): 35 #/vis/viewer/set/style wireframe 36 # 37 # Draw coordinate axes: 38 #/vis/scene/add/axes 0 0 0 1 m 39 # 40 # Draw smooth trajectories at end of event, showing trajectory points 41 # as markers 2 pixels wide: 42 /vis/scene/add/trajectories smooth 43 /vis/modeling/trajectories/create/drawByCharge 44 /vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true 45 /vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2 46 # (if too many tracks cause core dump => /tracking/storeTrajectory 0) 47 # 48 # Draw hits at end of event: 49 #/vis/scene/add/hits 50 # 51 # To draw only gammas: 52 #/vis/filtering/trajectories/create/particleFilter 53 #/vis/filtering/trajectories/particleFilter-0/add gamma 54 # 55 # To invert the above, drawing all particles except gammas, 56 # keep the above two lines but also add: 57 #/vis/filtering/trajectories/particleFilter-0/invert true 58 # 59 # Many other options are available with /vis/modeling and /vis/filtering. 60 # For example, to select colour by particle ID: 61 #/vis/modeling/trajectories/create/drawByParticleID 62 #/vis/modeling/trajectories/drawByParticleID-0/set e- blue 63 # 64 # To superimpose all of the events from a given run: 65 /vis/scene/endOfEventAction accumulate 66 # 67 # Re-establish auto refreshing and verbosity: 24 68 /vis/viewer/set/autoRefresh true 69 /vis/verbose warnings 25 70 # 26 # for drawing the tracks 27 # (if too many tracks cause core dump => storeTrajectory 0) 28 /tracking/storeTrajectory 1 29 /tracking/verbose 0 30 #/vis/drawView 31 32 /vis/scene/add/trajectories 33 /vis/scene/endOfEventAction accumulate 34 #/vis/drawVolume 71 # For file-based drivers, use this to create an empty detector view: 72 #/vis/viewer/flush 73 # 35 74 /gps/particle opticalphoton 36 75 /gps/energy 2.0 eV 37 76 /mysetrun/SetRunID 9999 38 77 /run/beamOn 100 39 -
trunk/examples/advanced/air_shower/src/UltraEventAction.cc
r807 r1313 51 51 #include "G4VHitsCollection.hh" 52 52 #include "G4GeneralParticleSource.hh" 53 54 #include "G4TrajectoryContainer.hh"55 #include "G4Trajectory.hh"56 #include "G4VVisManager.hh"57 53 58 54 #ifdef G4ANALYSIS_USE … … 134 130 analysis->FillHistogram(2,nOptHits); 135 131 #endif 136 137 // Define visualization atributes:138 139 G4String drawFlag = "all";140 G4VVisManager* pVVisManager = G4VVisManager::GetConcreteInstance();141 142 if(pVVisManager)143 {144 G4TrajectoryContainer* trajectoryContainer = evt->GetTrajectoryContainer();145 G4int n_trajectories = 0;146 if (trajectoryContainer) n_trajectories = trajectoryContainer->entries();147 for(G4int i=0; i<n_trajectories; i++)148 { G4Trajectory* trj = (G4Trajectory *)((*(evt->GetTrajectoryContainer()))[i]);149 if (drawFlag == "all") trj->DrawTrajectory();150 else if ((drawFlag == "charged")&&(trj->GetCharge() != 0.))151 trj->DrawTrajectory();152 }153 }154 155 132 } 156 133
Note: See TracChangeset
for help on using the changeset viewer.