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!
Det. Search
Who's who?
Meetings
FAQ
Images
Archive
Systems
Performance
Intern. region
Vertex Tracker
Drift chamber
DIRC
Calorimeter
IFR
LST
Magnet
Electronics
Trigger
Operations
Run Coordination
Contact Experts
Shift Takers Info
Operations Manual
Electronic Logbook
Ops Hypernews
Shift Signup
Check this page for HTML 4.01 Transitional compliance with the
W3C Validator
(More checks...)

trgFrame (Ed Frank) October 1996

Overview

The trgFrame package contains (1) background hit mixing, (2) fast control system simulation, (3) interfaces to L1 drift chamber and calorimeter trigger and (4) the first L1 global trigger code. It also implements random number and histogramming control. The trgFrame package currently provides the following functions for trigger simulation studies:
  • Hit mixing between base physics events and multiple sources of background, including sampling of rate probabilities, distribution over particle bunches, and consideration of empty bunches.
  • Data and control interface between the reconstruction system's C++ based Framework and the Fortran based trigger packages trgEM and trgDC.
  • Direct access to simulation data (XDR format) without the need for custom ASCII files.
  • Event level synchronization of EMC and DCH trigger simulations.
  • Synchronization of EMC and DCH trigger simulations at the level of Fast Control clock ticks.
  • Capability to simulate the Global Trigger, by virtue of the synchronization mentioned above.
  • Simulation of the Fast Control system's clocks. This allows conversion between clock tick, beam crossing number, and time for clocks related to the accelerator clock by powers of two. Random synchronization of the various clocks is simulated.
  • Random number generation interface and initialization.

A physicist need only work in fortran to do real work. The EM and DC trigger codes are in trgEM and trgDC, where minor changes have been made. (As time goes on, more things will move to C++, but the investment in trgDC and trgEM fortran is maintained)

Additional information may be found in the README file in the distribution. Some of the information in the README is redundant with this summary, but a few usage details are given there. The copy released with SRT release 1.2.3 may be found via the link, trgFrame.README.

Preparing a trgFrame job

Input is taken from dbio (DbiEvent) generated data. You build a mixer sequence out of an APPFileInputModule, which is provided to you automatically by the framework, to read the base event, and then add one APPMixerInputModule per background stream. There are some helper modules that are needed too. One is the Mixer Control module which is responsible for telling the Mixer modules how many events to mix in from their streams, and another is the Mixer End module which does some data checks and copies the data from C++ back to Dbio's Fortran common blocks. Finally, there are some histogram modulesto setup the Unt interface to Hbook (trgDC and trgEM were based on Unt), a module to provide simulation of Fast Control, and another to provide random number initialization. Fully cooked, the list looks like this:
        HistoStart     (enabled)        Global Histo startup
        RandomCTL      (enabled)        Random number controller
        FCClockCTL     (enabled)        Clock controller
        MixCTL         (enabled)        Hit Mix Controller
        Mixer1         (enabled)        Background-1 input
        Mixer2         (enabled)        Background-2 input
        MixEnd         (enabled)        End of Mix Controller
        trgDC          (enabled)        DCH Trigger
        trgEM          (enabled)        EMC Trigger
        trgGL          (enabled)        General Trigger Analysis
        HistoEnd       (enabled)        Global Histo shutdo
This example shows a trigger job. If you want to do some other kind of job with the Mixer, replace trgDC/trgEM/trgGL with your own modules to make a new sandwhich. Use the AppUserBuild in trgFrame to see how to build the mixer components. If your code does not use Unt, you would not, in principle, need the HistoModules, but since trgFrame modules use unt themselves, you may be stuck. I have put in switches to turn off the unt calls, but have not tested a run w/o the Histo modules.

Mixing

These are the data that are considered when mixing:
    GVertex
    GTrack
    IfrGHit
    EmcGHit
    DrcGHit
    DchGLayHit
    DchGWirHit
    SvtGHit
The list needs to be modified in view of simulation changes.

"Mixing" means that for each BG event read in, choose a beam crossing for it to occur in, translate all the times in the event to correspond to the displaced beam crossing, and then renumber all the tracks and vertices so as not to overlay the numbers already used in the base physics event, or backgrounds already mixed in. "Displaced beam crossing" is just the idea that we place the base physics event in beam crossing zero, always, and sprinkle the background uniformly in time over the other beam crossings. You decide how many beam crossings that is.

Status

All capabilities described above are complete. The code has been used for detailed EMC trigger simulations, including studies that require consideration of backgrounds. Background rates in the DCH trigger have been obtained and compared with previous stand-alone studies. With a few exceptions, trgFrame is essentially a completed project.

In July 96, the C++ and F77 interface code for DCH and EMC was moved into the trgDC and trgEM packages. But it still contains the driver code for a sample trigger job and new quality checking code.

Contains about 3,500 lines of C++ and 1,500 lines of F77 code.
Last tested with SRT release 1.2.2.

Plans

The package will be broken up into its different pieces. The mixer code should be migrated into the Framework package. The FC clock simulation will go into FcsSim. The global trigger to trgGL. The utility histogramming and random number components can either become packages or migrate into the reconstruction utilities package.

Manpower

Ed Frank, package coordinator, developer and user
Paul Dauncey, developer and user
Several other users

Needs from other parts of simulation

Future homes.

SRT integration

Fully functional version available in SRT release 1.2.2. Independent of BBSIM.