Back to home page

EIC code displayed by LXR

 
 

    


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