Back to home page

EIC code displayed by LXR

 
 

    


Warning, /geant4/examples/advanced/gammaray_telescope/macro1.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 /control/execute physics.mac
0016 
0017 /run/initialize
0018 /gun/sourceGen true
0019 /gun/particle gamma
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 
0028 #/payload/setNbOfTKRLayers 15
0029 #/payload/update
0030 
0031 # Open a viewer
0032 /vis/open
0033 # This opens the default viewer - see examples/basic/B1/vis.mac for a
0034 # more comprehensive overview of options. Also the documentation.
0035 #
0036 # Disable auto refresh and quieten vis messages whilst scene and
0037 # trajectories are established:
0038 /vis/viewer/set/autoRefresh false
0039 /vis/verbose errors
0040 #
0041 # Draw geometry:
0042 /vis/drawVolume
0043 #
0044 # Specify view angle:
0045 /vis/viewer/set/viewpointThetaPhi 90. 0.
0046 #
0047 # Specify zoom value:
0048 #/vis/viewer/zoom 2.
0049 #
0050 # Specify style (surface or wireframe):
0051 #/vis/viewer/set/style wireframe
0052 #
0053 # Draw coordinate axes:
0054 #/vis/scene/add/axes 0 0 0 1 m
0055 #
0056 # Draw smooth trajectories at end of event, showing trajectory points
0057 # as markers 2 pixels wide:
0058 /vis/scene/add/trajectories smooth
0059 /vis/modeling/trajectories/create/drawByCharge
0060 /vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true
0061 /vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 2
0062 # (if too many tracks cause core dump => /tracking/storeTrajectory 0)
0063 #
0064 # Draw hits at end of event:
0065 #/vis/scene/add/hits
0066 #
0067 # To draw only gammas:
0068 #/vis/filtering/trajectories/create/particleFilter
0069 #/vis/filtering/trajectories/particleFilter-0/add gamma
0070 #
0071 # To invert the above, drawing all particles except gammas,
0072 # keep the above two lines but also add:
0073 #/vis/filtering/trajectories/particleFilter-0/invert true
0074 #
0075 # Many other options are available with /vis/modeling and /vis/filtering.
0076 # For example, to select colour by particle ID:
0077 #/vis/modeling/trajectories/create/drawByParticleID
0078 #/vis/modeling/trajectories/drawByParticleID-0/set e- blue
0079 #
0080 # To superimpose all of the events from a given run:
0081 #/vis/scene/endOfEventAction accumulate
0082 #
0083 # Re-establish auto refreshing and verbosity:
0084 /vis/viewer/set/autoRefresh true
0085 /vis/verbose warnings
0086 #
0087 # For file-based drivers, use this to create an empty detector view:
0088 #/vis/viewer/flush
0089 
0090 # run 10 events
0091 /run/beamOn 10