Simulation Tutorials and How-Tos
For SP4, simulated events were produced using the three-stage procedure of
Bogus, SimApp and Bear, in which intermediate as well as fully reconstructed
information was persisted in the database. In order to reduce database
transactions and increase execution speed, SP5 will employ a one-stage
process, MOOSE, in which only the reconstructed information is persisted.
The three-stage process is still very useful, however, in debugging the
simulation. A detailed recipe for running both of these procedures
is given in the BaBar
workbook page. An
example
set-up session is also provided.
This example uses OpenGL to produce views of the BaBar detector within Bogus.
To produce views of single subsystems, all other subsystems must be
removed from the Bogus geometry.
- First set the following environment variables:
- setenv INTERACTIVE 1 -- brings up the Idle> prompt in Bogus
- setenv RUNNUM 250000 -- set the run number
- setenv NEVENT 1 -- only need one event for displaying detector elements
- setenv CONDALIAS Sep2001 -- to get database conditions
- setenv CONFIGALIAS $CONDALIAS-Cfg -- to get configurations
- Now run BgsApp, for example:
BgsApp ../BgsApp/BgsUserExampleEvtGen.tcl
At the "Idle" prompt type
/vis/scene/create
/vis/sceneHandler/create OGLSX
/vis/viewer/create
a view of the detector should now appear
- to get a fresh view
/vis/viewer/refresh
- to look at the detector from different angles:
/vis/viewer/viewpointThetaPhi theta phi
where theta and phi are in degrees
- to magnify (or de-magnify) the view:
/vis/viewer/zoomTo scale-factor
where scale-factor musrt be greater than one to expand, and smaller
to contract.
- to produce a cross sectional view:
/vis/viewer/set/sectionPlane on x0 y0 z0 cm vx vy vz
where (x0, y0, z0) is a point through which the cut plane passes and
(vx, vy, vz) is the normal to the plane. As an example, choose
(x0, y0, z0) to be (0,0,0) and (vx, vy, vz) to be (-0.95, 0.31, 0.0).
The cross sectional view can be turned off by
/vis/viewer/set/sectionPlane off
- You can choose between surface-style drawings or
wireframes by
/vis/viewer/set/style s
or
/vis/viewer/set/style w
- Many more options are available by typing help at the Idle> prompt.
- To finish, type exit at the Idle> prompt.
Page author:
Dennis Wright
| Last significant update: 31 October 2002 |
Expiration date: |
|