# File: prune_tracks.mac # Brief: Macro showing the various prunings that can be applied to tracks. # # Date: 2014-07-24 # Contact: P G Jones, # Revisions: # # This macro demostrates how to prune various aspects of the tracking # information. The full tracking information is saved to full.root and the # pruned tracking information in pruned.root. # Store all the tracks via /rat/tracking/store full /run/initialize # BEGIN EVENT LOOP # Output before the pruning /rat/proc outroot /rat/procset file "full.root" # Prune all electron tracks /rat/proc pruneTrack /rat/procset particle "e-" # Prune all cerenkov process steps /rat/proc pruneTrack /rat/procset process "cerenkov" # Prune all inner_av volume steps /rat/proc pruneTrack /rat/procset volume "inner_av" # The above three are logically inverted in these three # Prune all non-electron tracks #/rat/proc pruneTrack #/rat/procset notparticle "e-" # Prune all non-cerenkov process steps #/rat/proc pruneTrack #/rat/procset notprocess "cerenkov" # Prune all non-inner_av volume steps #/rat/proc pruneTrack #/rat/procset notvolume "inner_av" # Output after track pruning #/rat/proc outroot #/rat/procset file "pruned.root" # Extra rather severe pruning /rat/proc prune /rat/procset prune "mc.tracks, mc.tracks.steps" # All tracks and all steps # END EVENT LOOP # Generate something to track, 1MeV electrons /generator/add combo gun:point /generator/vtx/set e- 0 0 0 1.0 /generator/pos/set 0 0 0 /generator/rate/set 1 /rat/run/start 10 exit