Back to home page

EIC code displayed by LXR

 
 

    


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

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