Description of the slow simulator procedures for the BEMC

BSMD

The SMDs can be simulated in one of two modes.  In a rewrite of the slow simulator I call them kTestMode and kSimpleMode.  kTestMode doesn't do anything interesting, so let's focus on kSimpleMode.  Here are the steps to generate an ADC:

  1. ADC = energy deposit * sampling fraction(eta) / calib
  2. ADC += mRandom.Gaus(pedMean, pedRMS)
  3. ADC *= mRandom.Gaus(1.0 + calibOffset, calibSpread)
  4. force ADC between 0 and maxADC

The energy is then calculated from this ADC is the usual way:  energy = (ADC - pedMean) * calib.  Remember the BEMC calibration coefficients are stored as GeV/ADC.

BTOW - BPRS

The simulators for these two detectors have some additional modes (kPrimaryOnlyMode, kPrimarySecondaryFastMode, kPrimarySecondaryFullMode).  Here's the setup for the kPrimaryMode:

  1. photoElectrons = energy deposit * (MIP photo electrons / MIP energy deposit)
  2. smear using Poisson distribution
  3. ADC = photoElectrons * sampling fraction(eta) * (MIP energy deposit / MIP photo electrons) / calib
  4. follow steps 2-4 of simple simulator to add pedestals, smear calibration, and check for valid range

The other two modes also take the secondary photostatistics from the PMT amplification into account.  I'll focus on the full mode, as it's slightly easier to understand:

  1. build a set of secondary electron conversion coefficients (1 / dynode) using the relative voltage distribution among the dynodes and an approximate value for the total PMT amplification.
  2. Loop through dynodes and at each step
    1. nElectrons = mRandom.PoissonD( mSecondaryCoeff[i] * nElectrons + mDynodeNoise );
  3. ADC =  nElectrons * mTotalDynodeGain *sampling fraction(eta) * (MIP energy deposit / MIP photo electrons) / calib
  4. follow steps 2-4 of simple simulator above

The mTotalDynodeGain in step 3 is the inverse of the product of the secondary electron conversion coefficients.