public class EcalOnlineRawConverter extends Object
EcalOnlineRawConverter
handles the conversion of raw
hits of all modes to energy hit CalorimeterHit
objects.
This converter will employ the runtime values for all parameters and
is intended to emulate the firmware specifically.DatabaseDAQConfigDriver
or DAQConfigDriver
depending on from where it is to
obtain the configuration.Modifier and Type | Field and Description |
---|---|
private FADCConfig |
config |
private boolean |
constantWindow |
private int |
nPeak |
private static int |
nsPerSample |
Constructor and Description |
---|
EcalOnlineRawConverter()
Instantiates the
EcalOnlineRawConverter and connects
it to the ConfigurationManager to receive settings
from the DAQ configuration. |
Modifier and Type | Method and Description |
---|---|
private double |
adcToEnergy(int adcSum,
long cellID)
Converts a value in ADC in a crystal to energy in units of GeV.
|
private int[] |
convertWaveformToPulse(short[] waveform,
int thresholdCrossing)
Converts a mode-1 digitized waveform to a mode-3/7 pulse for a
a given threshold crossing.
|
int |
getPulsePedestal(long cellID,
int windowSamples,
int thresholdCrossing)
Gets the pedestal for a given crystal and threshold crossing.
|
org.lcsim.event.CalorimeterHit |
HitDtoA(org.lcsim.event.RawCalorimeterHit hit,
double timeOffset)
Converts a raw mode-3 hit to a proper calorimeter hit in units
of energy.
|
org.lcsim.event.CalorimeterHit |
HitDtoA(org.lcsim.event.RawCalorimeterHit hit,
org.lcsim.event.GenericObject mode7Data,
double timeOffset)
Converts a raw mode-7 hit to a proper calorimeter hit in units
of energy.
|
List<org.lcsim.event.CalorimeterHit> |
HitDtoA(org.lcsim.event.RawTrackerHit hit)
Converts a mode-1 digitized waveform into standard energy hit.
|
(package private) void |
setUseConstantWindow(boolean state)
Sets whether to use a constant integration window for the the
purpose of determining the correct pedestal.
|
private int nPeak
private FADCConfig config
private boolean constantWindow
private static final int nsPerSample
public EcalOnlineRawConverter()
EcalOnlineRawConverter
and connects
it to the ConfigurationManager
to receive settings
from the DAQ configuration.public int getPulsePedestal(long cellID, int windowSamples, int thresholdCrossing)
cellID
- - The cell ID of the crystal.windowSamples
- - The size of the readout window. A value
of -1
indicates an infinite readout window.thresholdCrossing
- - The time of the threshold crossing in
4-nanosecond clock-cycles (samples).public List<org.lcsim.event.CalorimeterHit> HitDtoA(org.lcsim.event.RawTrackerHit hit)
hit
- - The "hit" object representing the digitized waveform
for a given crystal.CalorimeterHit
objects
parsed from the waveform.public org.lcsim.event.CalorimeterHit HitDtoA(org.lcsim.event.RawCalorimeterHit hit, double timeOffset)
hit
- - The raw hit that is to be converted.timeOffset
- - The time offset for the hit.CalorimeterHit
hit object that
represents the raw mode-3 hit with units of energy and a correct
time-stamp.public org.lcsim.event.CalorimeterHit HitDtoA(org.lcsim.event.RawCalorimeterHit hit, org.lcsim.event.GenericObject mode7Data, double timeOffset)
hit
- - The raw hit that is to be converted.mode7Data
- - Additional mode-7 data object.timeOffset
- - The time offset for the hit.CalorimeterHit
hit object that
represents the raw mode-7 hit with units of energy and a correct
time-stamp.private double adcToEnergy(int adcSum, long cellID)
adcSum
- - The ADC value to convert.cellID
- - The cell ID of the crystal containing the value.private int[] convertWaveformToPulse(short[] waveform, int thresholdCrossing)
waveform
- - The digitized waveform. Each array value should
correspond to a sample of the waveform in units of ADC.thresholdCrossing
- - The time of the threshold crossing
in samples.double
primitive of size 2. The
first value represents the time in nanoseconds of the pulser and
the second value the total integrated value of the pulse in ADC.void setUseConstantWindow(boolean state)
state
- - true
ignores the size of the readout
window when calculating pedestals, and false
accounts
for it in the case of pulse-clipping.Copyright © 2019. All rights reserved.