SLAC PEP-II
BABAR
SLAC<->RAL
Babar logo
HEPIC E,S & H Databases PDG HEP preprints
Organization Detector Computing Physics Documentation
Personnel Glossary Sitemap Search Hypernews
Unwrap page!
Simulation Home
Sim Codes
Event Generators
Bogus/BgsApp
SimApp
Bear
Moose
Fast Simulation
Geant4 Home
Subsystems
PEP
SVT
DCH
DRC
EMC
IFR
Mixing/Trigger
Backgrounds
Mixing
Trigger Simulation
MC Truth/QA
MC Truth
Micro/Mini
QA Histograms
Sim Error Reports
REMEDY
MC Production
Production Home
Test Production
Tools
Database
CERNLIB
CLHEP
Event display
RandControl
Scripts
Check this page for HTML 4.01 Transitional compliance with the
W3C Validator
(More checks...)

Simulation Tutorials and How-Tos

How To Produce Your Own Simulated BaBar Events

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.

How to Produce Views of the Detector

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.

  1. 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
  2. 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

  3. to get a fresh view
         /vis/viewer/refresh
         


  4. to look at the detector from different angles:
         /vis/viewer/viewpointThetaPhi theta phi
         
    where theta and phi are in degrees

  5. 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.

  6. 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
         


  7. You can choose between surface-style drawings or wireframes by
         /vis/viewer/set/style s
         
    or
         /vis/viewer/set/style w
        


  8. Many more options are available by typing help at the Idle> prompt.
  9. To finish, type exit at the Idle> prompt.

Page author: Dennis Wright
Last significant update: 31 October 2002 Expiration date: