Display by time
Lisbon Workshop
October 2006
John Allison
University of Manchester

Mpeg files
If this presentation doesnŐt run on your computer
The movies can be downloaded from http://www.hep.man.ac.uk/u/johna/pub/Geant4/Movies/
Individual files are indicated on relevant slides
Get a Mac

Getting time information
Get from track or step  and store (G4RichTrajectory)
aTrack->GetGlobalTime()
aStep->GetPreStepPoint()->GetGlobalTime()
aStep->GetPostStepPoint()->GetGlobalTime()
Accessible through CreateAttValues at display time in your trajectory model
Instantiate trajectory in tracking action
fpTrackingManager->SetTrajectory(new G4RichTrajectory(track))
Instantiate tracking action in main
runManager->SetUserAction(new MyTrackingAction)

Time slice
Add trajectories
/vis/scene/add/trajectories
Create a trajectory model
/vis/modeling/trajectories/
create/drawByCharge
Specify time slice
/vis/modeling/trajectories/
drawByCharge-0/default/
setTimeSliceInterval 0.1 ns

Display by time
Only in OpenGL stored mode (OGLS*) at present
/vis/ogl/set/fade 1
/vis/ogl/set/displayHeadTime true
/vis/ogl/set/displayLightFront true -90 0 0 mm
/vis/ogl/set/startTime 2 ns 1 ns
Make a loop (see exN03Vis12/13.mac)
/control/alias timeRange 0.1
/control/alias dx 0.3
/control/loop loop.mac endTime 0 0.7 0.001
where loop.mac is
/vis/viewer/pan {dx} 0 mm
/vis/ogl/set/endTime {endTime} ns {timeRange} ns

exampleN03
Run exampleN03
Activate instantiation of G4RichTrajectory in ExN03TrackingAction::PreUserTrackingAction
exampleN03 visTutor/exN03Vis12.mac
Draw by charge with trajectory points
Draw by particle ID (remove gŐs)
p-m-e decay
exampleN03 visTutor/exN03Vis12.mac
10 GeV EM shower showing light front and followed by panning at light speed

Slide 7
Slide 8
Commands for previous slide
Slide 10
Slide 11
Slide 12
Slide 13
Slide 14
Slide 15
Slide 16
Conclusions
Time slicing and display by time are great new features of the Geant4 Visualisation System
Understand troublesome backgrounds
Design detectors and electronics for better discrimination of particle types
Educational tool