SimApp - Detector Response and Background Mixing
SimApp takes detector hits produced by Bogus and converts them to objects
(called digis) which mimic the real electronic output of the detector.
These digis are then mixed with corresponding digis from real background
events, and the L1 and L3 trigger conditions are applied to the combined
event. Most major features, such as background mixing, L1 simulation and
L3 simulation, can be turned on and off with tcl commands or environment
variables (see "Switches" section below).
Historically, SimApp read detector hit information from xdr input files
produced by BBSIM (GEANT3) and mixed in detector hit information from
simulated background events produced by the TURTLE program. It was
found that these simulated backgrounds did not accurately portray the
real backgrounds seen in data. It was therefore decided to mix in
backgrounds from real data instead of those from the TURTLE program.
After a number of technical problems were overcome, the "DigiMix" package
was incorporated into SimApp in the summer of 1999. In order to also
improve the quality of the detector simulation, Babar moved from GEANT3
to GEANT4 in 2001. In so doing the xdr format was phased out and SimApp
was modified to read from the database.
The digitization and mixing controlled by SimApp is shown schematically
in Fig. 1 below. Before describing this process, however, a few terms
should be defined:
- GHit - an object generated by the Bogus stage of the simulation
which contains the state of a particle as it passes
through a sensitive detector element. It contains a subset
of the idealized particle information (such as energy,
time, charge, position and angle) which is tailored to each
detector subsystem.
- digi - an object containing the digital output of a sensitive
detector element. A simulated digi is created by
converting the idealized information in a GHit to
ADC and TDC words which mimic the real digi.
- waveform - an object which mimics the analog input to a detector's
ADCs. A simulated waveform is created from a GHit by
converting the deposited energy at a given time into a
peak voltage and convoluting this with a realistic
pulse shape. It is currently used only for the EMC.
For the SVT, DCH, DRC and IFR, each detector subsystem performs digitization
using its own version of the ReadoutSim process (oval) which converts GHits
to digis. For the EMC, the GHits must first be converted to waveforms
before the GHits can be passed on to its version of ReadoutSim.
The combination of digis from simulated and real background events is
performed by a DigiMixer process (oval) specific to each subsystem.
For the IFR and the DRC, which record only hit occupancies, mixing is
performed by simply adding the digis. For the SVT and the DCH, which
record pulse heights and times, some approximations must be made before
the digis are combined. For the EMC, which records both pulse height and
pulse shape, it is necessary to both recreate the original waveform from
the real digi and produce a waveform from the simulated GHit. The two
waveforms are then mixed together and the combination is fed to the Level 1
EMC trigger. The resulting waveform rejoins the path taken by the other
systems and is converted into digi form in the ReadoutSim process. In the
final stages, the DCH Level 1 trigger is applied to the combined digi,
followed by the Level 3 trigger simulation.
The operation of SimApp can be controlled by a number of switches which
can be set via environment variables. As given at the top of
SimAppProductionOptions.tcl:
* SimAppNoRun - stop instead of running
# SimAppEventOptions - command to use instead of "ev begin"
# SimAppMixDigi - switch to turn on Digi mixing
# SimAppUseMCBkndColl - needed by Emc if running on an MC bknd collection
# SimAppMakeMCBkndColl - needed by Emc to produce an MC bknd collection
# SimAppBkndFirstEvt - starting event number in background slice
# SimAppInputFile - input bbsim.xdr file name
# SimAppHbookFile - hbook file name
# SimAppOutputCollection - output collection name | note: both must
# SimAppBkndInputCollection - bknd input collection name | be in same fdb
# | for digi mixing
# SimAppInputCollection - Physics input collection. If
# set, will read from objy collection rather than
# from xdr
# CONFIGALIAS - configuration alias. Has to translate to the
# same configuration key as set in the EventID by
# BbsimModule/BgsApp
# SimAppWriteEmcWaveForm - if set, write out waveforms (not implemented)
#
###############################################################################
# env. variable: initializes tcl parameter used in
#------------------------------------------------------------------------------
# SimAppNoRun SimAppNoRun (new) SimAppProduction.tcl
# SimAppEventOptions SimAppEventOptions (new) SimAppProduction.tcl
# SimAppMixDigi * SimAppDigiMix
# SimAppProductionSequence.tcl
# EmcCalBhabha/EmcBhabhaMCExtr.tcl
# QaBetaTools/QaBeta_reco.tcl
# SimAppNoNoise Depends on SimAppDigiMix
# SimAppUseMCBkndColl * RunMCBkndCollection
# SimAppProductionSequence.tcl
# EmcCalBhabha/EmcBhabhaMCExtr.tcl
# QaBetaTools/QaBeta_reco.tcl
# SimAppMakeBkndColl * MakeMCBkndCollection
# SimAppProductionSequence.tcl
# EmcCalBhabha/EmcBhabhaMCExtr.tcl
# QaBetaTools/QaBeta_bdbGHit.tcl
# QaBetaTools/QaBeta_reco.tcl
# SimAppBkndFirstEvent SimAppBkndFirstEvent EvtMix/EvtMixSequence.tcl
# EmcCalBhabha/EmcBhabhaMCExtr.tcl
# SimAppBkndInputCollection SimAppBkndInputCollection EvtMix/EvtMixSequence.tcl
# EmcCalBhabha/EmcBhabhaMCExtr.tcl
# SimAppInputCollection SimAppInputCollection SimAppInput.tcl
# SimAppInputFile SimAppInputFile SimAppInput.tcl
# SimAppOutputCollection SimAppOutputCollection (new)SimAppProduction.tcl
# SimAppWriteEmcWaveForm SimAppWriteEmcWaveForm (new)SimAppProduction.tcl
# SimAppHbookFile HistFileName SimAppProduction.tcl
Page author:
Jim Cochran
| Last significant update: 21 October 2002 |
Expiration date: |
|