#
# BCAL data base of constants used in MC
#

# Silicon PMT dark rate (from GlueX-doc-1754-v3)
BCAL_DARKRATE_GHZ         0.0176

# Single PE width to amplitude ratio
# 6.489/61.67 = 0.105 (from GlueX-doc-1754-v3)
BCAL_SIGMA_SIG_RELATIVE 0.105

# Pedestal width to single PE amplitude ratio
# 8.585/61.67 = 0.139 (from GlueX-doc-1754-v3)
BCAL_SIGMA_PED_RELATIVE 0.139

# Variation of gains between individual SiPM tiles.
# Yi measured a value of ~4% and indicated this in
# private communication.
BCAL_SIPM_GAIN_VARIATION 0.04

# This factor includes both the cross-talk and after-pulse
# probability for a 100ns window. The value from GlueX-doc-1754-v3
# was 15.7%, but is for a 1 us window. Private comminucation with
# Yi indicated a value of 12% from previous measurements with a 
# 200 ns window. Note that the 100ns assumed in the current simulation
# has the actual pulse starting 25ns into that making the actual
# cross-talk/after-pulse window at 75ns. Estimatation from Yi for
# a 100ns window is ~10%, hence the value used here.
BCAL_XTALK_FRACT          0.10

# integration widnows in [ns]
BCAL_INTWINDOW_NS         100.

# Photon detection efficiency (from GlueX-doc-1754-v3)
BCAL_DEVICEPDE            0.21

# sampling fraction:
# The value of 12.5% from NIM A 596 (2008) 327–337 (a.k.a. GlueX-doc-1071)
# is superceded by Stamatis' thesis value of ~9.5% due to the proper
# inclusion of the (inactive) cladding of the fiber
BCAL_SAMPLING_FRACT       0.095

# Digitized values due to dark pulses only
# Inner region has 3 digitized values/event
# Outer region has 2 digitized values/event
BCAL_AVG_DARK_DIGI_VALS_PER_EVENT 240

#GX-doc 1069, Table 1 -- try to extract back to
#photons per side per MeV in fiber
#4.6 / PDE / attentuation  (meaurements performed in center)
#75 = 4.6  / 0.12 / exp( -200 / 300 )
BCAL_PHOTONSPERSIDEPERMEV_INFIBER  75

#set the sampling smearing coefficients:
#(from GlueX-doc 827 v3 Figure 13 )
BCAL_SAMPLINGCOEFA  0.042
BCAL_SAMPLINGCOEFB  0.013

#time smearing comes from beam test time difference resolution with
#beam incident on the center of the module
BCAL_TIMEDIFFCOEFA 0.098994949

#no floor term, but leave the option here:
BCAL_TIMEDIFFCOEFB 0
    
# Threshold applied to energy deposition in MeV (HDGeant)
BCAL_THRESH_MEV	     1.

# time window for two hit resolution in ns
BCAL_TWO_HIT_RESOL	50.

# maximum number of hits per readout channels
BCAL_MAX_HITS 	   100