pkgs/ReadoutSim (NOvA offline)

ReadoutSim simulates everything after photoelectron creation at the APD through the creation of digitized raw data (RawDigits). At present there is exactly one runtime module, "SimpleReadout". It is part of the main detector simulation chain and comes after a PhotonTransport module (e.g., SimpleTransport).

  • Input: PhotonTransport/PhotonSignals
  • Output: RawData/RawDigits


The ReadoutSim package provides the SimpleReadout module. Default configuration(s) are provided in job/simplereadout.fcl.

There are many configuration parameters for this module, but unless you are doing targeted studies, the defaults are what you want.

General parameters
Name Type Default Description
PhotonFolder string "setrans" location of input PhotonSignals on the DetSim() branch
OutputFolder string "." location of output RawDigits on the Raw() branch
Clocktick double 62.5 period of base clocktick in the code, in nanoseconds
NumClockticksInSpill int 500 number of clockticks in the spill (sets spill length; default is approximately 30 microseconds)
GlobalTimeOffset double 0 shift all PE times by this amount (ns). useful for "singlep"-generated events
RandomTimeOffset double 0 shift all PE times by a uniformly drawn number between 0 and this parameter (ns)
ADCMaxPE double 2800 maximum signal size (in PE) that the ADC can handle before saturating. In other words, ADCMaxPE/(4096-1) is the PE/count conversion factor.
ASICBaselineInADCCounts double 500 baseline output level of ASIC given no input, in ADC counts
ASICRiseTime_Far double 250 rise time (e-folding) of the ASIC shaping, in nanoseconds. 'Far' means FD and NDOS.
ASICRiseTime_Near double 60 rise time (e-folding) of the ASIC shaping, in nanoseconds.
ASICFallTime_Far double 2000 fall time (e-folding) of the ASIC shaping, in nanoseconds. 'Far' means FD and NDOS.
ASICFallTime_Near double 500 fall time (e-folding) of the ASIC shaping, in nanoseconds.
Parameters affecting noise
Name Type Default Description
LeakageCurrent double 0.1 APD leakage current (nA) at -15 deg C, which is ~20x lower than the room temperature current of about 2 nA
APDExcessNoiseFactor double 2.5 APD's excess noise factor, which gives the variance of the APD's output in units of the variance due to shot noise
VoltageNoiseDensity double 1.5 property of the APD driving circuit [nV/sqrt(Hz]; see doc-4401
Gain double 100 APD gain
DetectorCapacitance double 10 APD capacitance (pF)
OversamplingFactor int 10 how many noise samples in between digitizations should be generated. 10 or more should be plenty to model the correlations pretty well
NumNormSamples int 100000 how many noise samples to use to determine the on-the-fly normalization of the noise amplitude at the beginning of the job
EmptyCellNoiseFile_ND string "emptycellnoise_nd.root" PDF for fast generation of noise on physics-less cells (ND)
EmptyCellNoiseFile_FD string "emptycellnoise_fd.root" PDF for fast generation of noise on physics-less cells (FD, NDOS)
Parameters related to FPGA signal processing
FPGAAlgorithm string "DualCorrelatedSampling" the signal shaping algorithm used by the FPGA. See XML.
FPGA_DualCorrelatedSampling_ThresholdADC_Far double 20.5 threshold, tuned to ~15 PE (approx). 'Far' means FD and NDOS.
FPGA_DualCorrelatedSampling_ThresholdADC_Near double 22.5 threshold, tuned to ~15 PE (approx). 'Near' means ND but NDOS.
FPGA_MatchedFiltering_BaselineTime_Far double -1500 (ns) see code
FPGA_MatchedFiltering_EndTime_Far double 10000 (ns) see code
FPGA_MatchedFiltering_ThresholdMatchValue_Far double 18.7 (template units, not PE) tuned for ~12.5 PE thresh
FPGA_MatchedFiltering_BaselineTime_Near double -500 (ns) see code
FPGA_MatchedFiltering_EndTime_Near double 2500 (ns) see code
FPGA_MatchedFiltering_ThresholdMatchValue_Near double 18.7 (template units, not PE) tuned for ~12.5 PE thresh

Technical description

The source:pkgs/ReadoutSim/SimpleReadout.cxx code has extensive comments, so check there next if this description misses a detail you're interested in.

For each detector channel with activity (PhotonSignals), RawDigits are created as follows. An array represents the voltage seen by the channel's ADC at each potential digitization time. (Due to the MUXing on-board, only every Nth element of this array [with a channel-dependent offset] will get used in the end.) The array starts out filled with zeros, and then gets contributions representing:
  • smooth ASIC-shaped pulse, placed in time with, and scaled appropriately for, each PhotonSignal on the channel.
  • baseline offset
  • noise

As shot noise is already treated (Poisson fluctuations from PhotonTransport), only the APD excess noise factor contributes jitter in the first item.

Once all contributions to the ADC input trace have been tallied, the trace is digitized and passed through the FPGA digital signal processing algorithm specified by the user (default: dual-correlated sampling).


For each detector channel with no PhotonSignals, talk about other noise

Getting rid of Noise

If someone wants to turn off the noise simulation there is a way to do that. Noise simulation is treated differently for empty cells (no PhotonSignals in them, meaning no physical hits) and for hit cells (the one that had at least one PhotonSignal).
If you want to turn off empty cells, then use the following parameter set in SimpleReadout.fcl:

daq: @local::noiseless_rsim

instead of standard
daq : @local::standard_rsim

with local::noiseless_rsim, empty cells won't be generated.

If you want to turn off noise even in the physics simulation, then set these parameters in SimpleReadout.fcl:

ScaleEmptyCellNoiseRate_FD:        0.  
LeakageCurrent_FD:                 0.0
VoltageNoiseDensity:               0. 
APDExcessNoiseFactor:              1.0

FPGA algorithms

talk about them