Other readout/main

Table Of Contents

Previous topic

Trigger Simulation

Next topic

Simulation Processing Models

This Page

Daya Bay Links

Content Skeleton

Readout

Introduction

ReadoutSim is located in Simulation/ReadoutSim within the dybgaudi project. It uses SimTrigCommand‘s and ElecCrate‘s to produce readouts. The produced readouts are held within a SimReadoutHeader object. An addition ReadoutHeader object exists to satify the requirement that only one (1) readout be produced each execution cycle. The details of the header objects are shown in figures fig::simreadoutheader and fig::readoutheader

../../_images/readout_roheader.png

fig::readoutheader

The ReadoutHeader contains a single Readout. The two flavors of readouts are discussed in ReadoutHeader
../../_images/readout_simroheader.png

fig::simreadoutheader

The SimReadoutHeader holds multiple SimReadout‘s which in turn contain a pointer to a single Readout object. The Readout object pointer points to the same object a SimReadoutHeader points to.

ReadoutHeader

The ReadoutHeader contains a single readout which consists of the following:

detector
Detector uniquely identifying the subsystem that was readout to produce this object.
triggerNumber
unsigned int enumerating triggers.
triggerTime
TimeStamp of trigger issuance.
triggerType
TriggerType_t enum which constructs a bitmap to define the trigger type.
readoutHeader
A pointer back to the ReadoutHeader which contains this object.

Two flavors of Readouts exist, ReadoutPmtCrate and ReadoutRpcCrate. The ReadoutPmtCrate contains a map of FeeChannelId‘s to ReadoutPmtChannel‘s and the ReadoutRpcCrate contains a similar map of FeeChannelId‘s to ReadoutRpcChannel‘s. The ReadoutPmtChannel Contains

channelId
FeeChannelId uniquely identifying the channel that was read out.
tdc
a vector of tdc values
adc
a map of adc values, keyed with their clock cycle.
adcGain

FeeGain_t denoting either that the high or low gain was read out.

readout pointer back to the ReadoutPmtCrate which contains this channel readout.

The ReadoutRpcChannel contains

channelId
FeeChannelId uniquely identifying the channel that was read out.
hit
a boolean value indicating a hit.
readout
a pointer back to the ReadoutRpcCrate which contains this channel readout.

SimReadoutHeader

The SimReadoutHeader contains all the readout headers produced during a single execution cycle. This can include 0..N readouts for each detector.

Readout Algorithms

ReadoutSim currently has two Algorithms described below:

ROsSequencerAlg

ROsSequencerAlg tries to fix the many-to-one, readouts to execution cycle mismatch. The sequencer fill the ReadoutHeader object with only the first ReadoutEvent produced during each execution cycle.

ROsReadoutAlg

ROsReadoutAlg is the driving algorithm for ReadoutSim. This algorithm applies each tool specified in the RoTools property for each trigger event. It is up to the tool to decide if it should act or not. The default setup is as follows:

import ReadoutSim
rosim = ReadoutSim.Configure()
import ReadoutSim.ReadoutSimConf as ROsConf
ROsConf.ROsReadoutAlg().RoTools=["ROsFecReadoutTool","ROsFeeReadoutTool"]
ROsConf.ROsReadoutAlg().RoName="ReadoutAlg"
ROsConf.ROsReadoutAlg().TrigLocation="/Event/SimTrig/SimTrigHeader"
ROsConf.ROsReadoutAlg().ElecLocation="Event/Elec/ElecHeader"

Readout Tools

ReadoutSim currently has 5 tools described below which can be used to customize readout.

ROsFeeReadoutTool

ROsFeeReadoutTool handles reading out pmt based detectors. By default this tool acts on all trigger commands associated with a pmt based detector. To specify different parameters for specific pmt based detectors create multiple instances of this tool and specify DetectorsToProcess appropriately in each. The default configuration is shown below.

import ReadoutSim.ReadoutSimConf as ROsConf
ROsConf.ROsFeeReadoutTool().DetectorsToProcess=["DayaBayAD1","DayaBayAD2",\
                        "DayaBayIWS","DayaBayOWS","LingAoAD1","LingAoAD2",\
                        "LingAoIWS","LingAoOWS","FarAD1", "FarAD2",\
                        "FarAD3","FarAD4", "FarIWS","FarOWS"]
ROsConf.ROsFeeReadoutTool().AdcTool="ROsFeeAdcPeakOnlyTool"
ROsConf.ROsFeeReadoutTool().TdcTool="ROsFeeTdcTool"
ROsConf.ROsFeeReadoutTool().ReadoutLength=12
ROsConf.ROsFeeReadoutTool().TriggerOffset=2

ROsFecReadoutTool

ROsFecReadoutTool handles reading out the rpc based detectors. By default this acts on all rpc based detectors. This is the only property currently available as seen below in the default setup.

import ReadoutSim.ReadoutSimConf as ROsConf
ROsConf.ROsFeeReadoutTool()=detectorsToProcess=[ "DayaBayRPC" ,\
                                                 "LingAoRPC" , "FarRPC" ]

ROsFeeAdcMultiTool

ROsFeeAdcMultiTool reads out samples the adc values in the readout window based on the readout window start. The user specifies the ReadoutCycles with 0 corresponding the adc value at the beginning of the readout window.

ROsConf.ROsFeeReadoutTool().AdcTool="ROsFeeAdcMultiTool"
ROsConf.ROsFeeAdcMultiTool().ReadoutCycles=[ 0 , 2 , 3 , 4 , 8 ]

ROsFeeAdcPeakOnlyTool

ROsFeeAdcPeakOnlyTool reads out the peak adc value in the readout window.

ROsConf.ROsFeeReadoutTool().AdcTool="ROsFeeAdcPeakOnlyTool"

ROsFeeTdcTool

ROsFeeTdcTool readout the tdc values during the readout window. The user has the option to readout multiple tdc values but changing the UseMultiHitTdc property.

ROsConf.ROsFeeReadoutTool().TdcTool="ROsFeeTdcTool"
ROsConf.ROsFeeTdcTool().UseMultiHitTdc=False
ROsConf.ROsFeeTdcTool().TdcResetCycles=True