Back to home page

EIC code displayed by LXR

 
 

    


Warning, /geant4/examples/advanced/gammaray_telescope/macro3.mac is written in an unsupported language. File is not indexed.

0001 # ----------------------------------------------
0002 # Example macro file for the GammaRayTel
0003 # Visualization with OpenGL 
0004 # ----------------------------------------------
0005 # Authors: R.Giannitrapani, F.Longo and G.Santin 
0006 # ----------------------------------------------
0007 
0008 #
0009 # Sets some default verbose
0010 # and initializes the graphic.
0011 #
0012 /control/verbose 1
0013 /control/saveHistory
0014 /run/verbose 1
0015 /run/initialize
0016 /gun/sourceGen true
0017 #/control/execute emstd.mac
0018 /gun/particle gamma
0019 /gun/energy 1 GeV
0020 /gun/vertexRadius 25. cm
0021 /gun/sourceType 2
0022 
0023 # Set a very high time threshold to allow all decays to happen
0024 /process/had/rdm/thresholdForVeryLongDecayTime 1.0e+60 year
0025 
0026 # You can modify the geometry of the telescope via a messenger
0027 #/payload/setNbOfTKRLayers 15
0028 #/payload/update
0029 
0030 # Open a viewer
0031 /vis/open
0032 # This opens the default viewer - see examples/basic/B1/vis.mac for a
0033 # more comprehensive overview of options. Also the documentation.
0034 #
0035 # Disable auto refresh and quieten vis messages whilst scene and
0036 # trajectories are established:
0037 /vis/viewer/set/autoRefresh false
0038 /vis/verbose errors
0039 #
0040 # Draw geometry:
0041 /vis/drawVolume
0042 #
0043 # Specify view angle:
0044 /vis/viewer/set/viewpointThetaPhi 90. 0.
0045 #
0046 # Specify zoom value:
0047 #/vis/viewer/zoom 2.
0048 #
0049 # Specify style (surface or wireframe):
0050 #/vis/viewer/set/style wireframe
0051 #
0052 # Draw coordinate axes:
0053 #/vis/scene/add/axes 0 0 0 1 m
0054 #
0055 # Draw smooth trajectories at end of event, showing trajectory points
0056 # as markers 2 pixels wide:
0057 /vis/scene/add/trajectories smooth
0058 /vis/modeling/trajectories/create/drawByCharge
0059 /vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true
0060 /vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2
0061 # (if too many tracks cause core dump => /tracking/storeTrajectory 0)
0062 #
0063 # Draw hits at end of event:
0064 #/vis/scene/add/hits
0065 #
0066 # To draw only gammas:
0067 #/vis/filtering/trajectories/create/particleFilter
0068 #/vis/filtering/trajectories/particleFilter-0/add gamma
0069 #
0070 # To invert the above, drawing all particles except gammas,
0071 # keep the above two lines but also add:
0072 #/vis/filtering/trajectories/particleFilter-0/invert true
0073 #
0074 # Many other options are available with /vis/modeling and /vis/filtering.
0075 # For example, to select colour by particle ID:
0076 #/vis/modeling/trajectories/create/drawByParticleID
0077 #/vis/modeling/trajectories/drawByParticleID-0/set e- blue
0078 #
0079 # To superimpose all of the events from a given run:
0080 #/vis/scene/endOfEventAction accumulate
0081 #
0082 # Re-establish auto refreshing and verbosity:
0083 /vis/viewer/set/autoRefresh true
0084 /vis/verbose warnings
0085 #
0086 # For file-based drivers, use this to create an empty detector view:
0087 #/vis/viewer/flush
0088 
0089 # run 10 events
0090 /run/beamOn 10