bank_mc


                   MC      Monte Carlo top level bank
                   ==================================
 
    Contact:  N. West, Oxford.
 
    Revision History:-
    ================
 
    2.00  N. West     First version.
    2.05  N. West     Redefine date stamps.
    2.07  N. West     Add seed (KMC_SEED). Moved from EV bank.
    2.08  J. Klein    Added data word to hold MC global trigger time.
          D. Wark     Changed seed words for new random number generator.
          R. Van de Water, Add SNOMAN MC version and event number.
          Mike Lay    KMC_GTR corrected to integer.
    2.09  N. West     Update this .html to reflect updates in 2.08.
    3.00  J. Klein    Add new GTR.  Old GTR now spare.
          N. West     Old GTR now _RTP. Rename _RTP -> _DTP
          N. West     Local Date Stamp now GMT not EST.
    4.02  N. West     Add _NUM_GE_ERR.
          N. McCauley Add _PMT_EFF
    5.00  N. West     Add MCNH. Add MCNS.
   

 
Description
-----------
 
    Top level bank for all Monte Carlo data.
 
Reference Links
---------------
 
    None.
 
Structural Links
----------------
 

 -6  -KMC_MCNS  MCNS  First NCD Signal from a String Set
 -5  -KMC_MCNH  MCNH  First NCD Hit String.
 -4  -KMC_MCPM  MCPM  First PMT hit.
 -3  -KMC_EGS4  EGS4  First EGS4 bank.
 -2  -KMC_MCVX  MCVX  First vertex bank.
 -1  -KMC_MCGN  MCGN  First generator bank.
 
Status Bits
-----------
 
Note: Any status bit parameters are defined to work with bit functions such as
      IAND and BTEST.
 
Data Words
----------
 
    Data types: B(bit), I, F, D(double), H(hollerith 4 char)
 
 
       The first 3 words are the Universal Date Stamp (generation time):-
 
 +1  I KMC_JDY      Julian date. See note 1. and note 6.
 +2  I KMC_UT1      Universal Time seconds.
 +3  I KMC_UT2      Universal Time nanoseconds.
 
       The next 2 words are the Local Date Stamp:-
 
 +4  I KMC_DTE      Date (format: yyyymmdd). See note 2
 +5  I KMC_HMSC     Time (format: hhmmsscc  - cc is centisec).
 
 +6  I KMC_SEED1    First random number seed.
 +7  I KMC_SEED2    Second random number seed.
 +8  I KMC_SEED_NUM Random number number.  See note 3.
 +9  I KMC_DTP      Data type (see Data Type Codes).
 +10 F KMC_MCVER    SNOMAN MC version number.
 +11 I KMC_EVN      Monte Carlo event number.  See note 4.
 +12 D KMC_GTR      Generation time in nsec(first word). See note 5. and note 6.
 +13                Second word.
 +14 I KMC_NUM_GE_ERR 
                    Number of suppressed Cerenkov photon tracking errors.
 +15 F KMC_PMT_EFF  The current PMT collection efficiency. See note 7.


Notes
-----
 
 
 
1)  The Universal Date Stamp gives the trigger time to the nearest 100
    nanosecond, except for MC data that has not been through the 
    packer/unpacker for which it is only rounded to 20 nanosecond. The date
    stamp is relative to:-

      31 Dec 1974, 0hr  (eqv to Julian date 2442412.5)

    The date is derived from a 53 bit register 10MHz clock which started on:-

           1 Jan 1996 00:00

    and runs forever (= 28.5years). Due to imperfections in our mechanical
    universe the clock does not run at constant rate.  Unlike the EV
    Universal Date Stamp, this data is not rounded onto 100nsec boundaries.

    The functions:-

        time difference
        universal_date_compare

    can be used to calculate the time shift when comparing times that are
    relative to different Universal Date Stamps.


 
2)  The Local Date Stamp gives a time to the nearest centisec in GMT (no
    daylight saving correction) and is equivalent to the Universal Date Stamp.
    As it is of lower resolution it should be derived from the Universal
    version (using universal_date_local) and NOT the other way round.  The
    reason for the duplication is that this form is easier for humans (helps
    when debugging etc.) and will probably used for database validity ranges.


 
3)  To reset the random number generator to the state at the start of the
    event:-

        1)   Select the random number seed sequence KMC_SEED1, KMC_SEED2
        2)   Call SNORAN KMC_SEED_NUM times

    The reason for this rather bizarre initialisation is explained in the
    section "Generating Random Number Seeds" of the User Manual.


 
4)  The Monte Carlo event number can be different than that in the EV bank
    when mulitple triggers occur.  The EV event number increments on each
    separate trigger, while the MC event number increments only for each
    generated event.  There can be one or more triggers per MC event.
    When writing out EV and MC information to ZDAB records, the MC event
    number can serve as a flag to identify triggers (separate events)
    originating from a common MC event.


 
5)  The generation time is the time based on a 43 bit 50MHz clock. It must
    restart/wrap every 2.04 days.  For simplicity, the clock starts at:-

           1 Jan 1996 00:00

    i.e. as  for the 10MHz clock and runs forever.  Strictly speaking this
    data is not needed, as with this simple model it is equivalent to the
    Universal Date Stamp less the time of the last roll over which can be found
    using:-

        mcg_50mhz_rollover

    It is included to make it symmetric with the EV bank: both have 50MHz and
    100MHz clocks, the EV records the trigger time and the MC the generation
    time.


 
6)  The JDY/UT1/UT2 and GTR both hold the global generation times for the event.
    The times in subordinate banks such as the MCVX and MCPM are relative to 
    these times.  It is important to note that this time is NOT necessarily the
    time at which particles are generated.  For example if generating using a 
    uniform time:-

      $mc_time  $tim_uniform 0. 100.

    then the particle will be generated at a time in the range 0. to 100. 
    relative to the global generation time.  In general, the global generation
    will only be the same as the start time of the particle if:-

    1)  Generating with:-

        $mc_time  $tim_fixed 0.

    or

    2)  Generating with solar neutrino rate:-

        $mc_time $tim_solar_neutrino ...

 
7)  The PMT collection efficiency is usually a constant however one method that 
    can be used to simulate the drifting detector gain is to drift the PMT 
    collection  efficiency. When this mode is enabled it is important to 
    record the PMT collection efficiency for each event.


Go Back to the Snoman Companion Top Page