public class EcalRawConverter extends Object
RawCalorimeterHit
or
RawTrackerHit
, objects with ADC/sample information, and
CalorimeterHit
, an object with energy+time information. At minimum this involves pedestal
subtraction/addition and gain scaling. Knows how to deal with Mode-1/3/7 FADC readout formats. Can perform Mode-3/7
firmware algorithms on Mode-1 data. Can alternatively call pulse-fitting on Mode-1 data.Modifier and Type | Field and Description |
---|---|
private FADCConfig |
config
The DAQ configuration from EVIO used to set EcalRawConverter parameters if useDAQConfig=true.
|
private boolean |
constantGain
If true, use a single gain factor for all channels.
|
private EcalConditions |
ecalConditions |
private double |
gain
A single gain factor for all channels (only used if constantGain=true)
|
private double |
leadingEdgeThreshold
The leading-edge threshold, relative to pedestal, for pulse-finding and time determination.
|
private boolean |
mode7
Perform Mode-7 algorithm, else Mode-3.
|
private int |
nPeak
The maximum number of peaks to be searched for.
|
private int |
NSA |
private int |
NSB
Integration range after (NSA) and before (NSB) threshold crossing.
|
private static int |
nsPerSample
The time for one FADC sample (units = ns).
|
private EcalPulseFitter |
pulseFitter
The pulse fitter class.
|
private boolean |
use2014Gain
If true, the relationship between ADC and GeV is a convention that includes readoutPeriod and a global scaling
factor.
|
private boolean |
useDAQConfig
If true, use the DAQ configuration from EVIO to set EcalRawConverter parameters.
|
private boolean |
useFit
Whether to use pulse fitting (EcalPulseFitter) to extract pulse energy time.
|
private boolean |
useRunningPedestal
If true, running pedestal is used.
|
private boolean |
useTimeWalkCorrection
If true, time walk correction is performed.
|
private int |
windowSamples
The number of samples in the FADC readout window.
|
Constructor and Description |
---|
EcalRawConverter()
Currently sets up a listener for DAQ configuration from EVIO.
|
Modifier and Type | Method and Description |
---|---|
private double |
adcToEnergy(double adcSum,
long cellID)
return energy (units of GeV) corresponding to the ADC sum and crystal ID
|
double[] |
convertWaveformToPulse(org.lcsim.event.RawTrackerHit hit,
int thresholdCrossing,
boolean mode7)
Emulate the FADC250 firmware in conversion of Mode-1 waveform to a Mode-3/7 pulse, given a time for threshold
crossing.
|
EcalChannelConstants |
findChannel(long cellID)
Convert physical ID to gain value.
|
double |
getPulsePedestal(org.lcsim.event.EventHeader event,
long cellID,
int windowSamples,
int thresholdCrossing)
Get pedestal for entire pulse integral.
|
double |
getSingleSamplePedestal(org.lcsim.event.EventHeader event,
long cellID)
Get pedestal for a single ADC sample.
|
org.lcsim.event.RawCalorimeterHit |
HitAtoD(org.lcsim.event.CalorimeterHit hit)
This converts a corrected pulse integral (pedestal-subtracted and gain-scaled) back into raw pulse integral with
units ADC.
|
org.lcsim.event.CalorimeterHit |
HitDtoA(org.lcsim.event.EventHeader event,
org.lcsim.event.RawCalorimeterHit hit,
double timeOffset)
This HitDtoA is for Mode-3 data.
|
org.lcsim.event.CalorimeterHit |
HitDtoA(org.lcsim.event.EventHeader event,
org.lcsim.event.RawCalorimeterHit hit,
org.lcsim.event.GenericObject mode7Data,
double timeOffset)
This HitDtoA is exclusively for Mode-7 data, hence the GenericObject parameter.
|
ArrayList<org.lcsim.event.CalorimeterHit> |
HitDtoA(org.lcsim.event.EventHeader event,
org.lcsim.event.RawTrackerHit hit)
This HitDtoA is for emulating the conversion of Mode-1 readout (RawTrackerHit) into what EcalRawConverter would
have created from a Mode-3 or Mode-7 readout.
|
org.lcsim.event.CalorimeterHit |
HitDtoA(org.lcsim.event.RawTrackerHit hit)
This should probably be deprecated.
|
void |
setDetector(org.lcsim.geometry.Detector detector)
Must be set when an object EcalRawConverter is created.
|
void |
setDisplay(boolean display)
activates a display of all the fits in AIDA.
|
void |
setFitLimitTimeHi(int sample)
Tell Minuit to limit pulse time parameter in fit to be less than this.
|
void |
setFitLimitTimeLo(int sample)
Tell Minuit to limit pulse time parameter in fit to be greater than this.
|
void |
setFitThresholdTimeHi(int sample)
Pulses with threshold crossing time greater than this will not be fit.
|
void |
setFitThresholdTimeLo(int sample)
Pulses with threshold crossing earlier than this will not be fit.
|
void |
setFixedWidth(boolean fixedWidth) |
void |
setFixShapeParameter(boolean fix) |
void |
setGain(double gain)
Set global gain value and turn on constant gain.
|
void |
setGlobalFixedPulseWidth(double width) |
void |
setLeadingEdgeThreshold(double thresh)
Set threshold for pulse finding.
|
void |
setMode7(boolean mode7)
Set Mode-7 emulation on/off.
|
void |
setNPeak(int nPeak)
Set maximum number of pulses to search for in Mode-1 data.
|
void |
setNSA(int nsa)
Set number of samples after threshold crossing for pulse integration range.
|
void |
setNSB(int nsb)
Set number of samples before threshold crossing for pulse integration range.
|
void |
setUse2014Gain(boolean use2014Gain)
Chooses which ADC --> Energy convention is used.
|
void |
setUseDAQConfig(boolean state)
Set whether to use DAQ configuration read from EVIO to set EcalRawConverter parameters.
|
void |
setUseFit(boolean useFit) |
void |
setUseRunningPedestal(boolean useRunningPedestal)
Enables using running pedestals calculated on the fly from previous events.
|
void |
setUseTimeWalkCorrection(boolean useTimeWalkCorrection)
Set whether to use timewalk corrections.
|
void |
setWindowSamples(int windowSamples)
Set number of samples in readout window.
|
int |
sumADC(org.lcsim.event.RawTrackerHit hit)
Integrate the entire window.
|
private boolean useTimeWalkCorrection
private boolean useRunningPedestal
private boolean constantGain
private double gain
private boolean use2014Gain
private boolean useDAQConfig
private FADCConfig config
private boolean useFit
private EcalPulseFitter pulseFitter
private static final int nsPerSample
private double leadingEdgeThreshold
private int NSB
private int NSA
private int windowSamples
private int nPeak
private boolean mode7
private EcalConditions ecalConditions
public EcalRawConverter()
public void setDisplay(boolean display)
display
- public void setUseFit(boolean useFit)
public void setFixShapeParameter(boolean fix)
public void setGlobalFixedPulseWidth(double width)
public void setFitThresholdTimeLo(int sample)
public void setFitThresholdTimeHi(int sample)
public void setFitLimitTimeLo(int sample)
public void setFitLimitTimeHi(int sample)
public void setLeadingEdgeThreshold(double thresh)
public void setNSA(int nsa)
public void setNSB(int nsb)
public void setWindowSamples(int windowSamples)
public void setNPeak(int nPeak)
public void setMode7(boolean mode7)
public void setGain(double gain)
public void setUse2014Gain(boolean use2014Gain)
public void setUseRunningPedestal(boolean useRunningPedestal)
public void setUseTimeWalkCorrection(boolean useTimeWalkCorrection)
public void setUseDAQConfig(boolean state)
public int sumADC(org.lcsim.event.RawTrackerHit hit)
public org.lcsim.event.CalorimeterHit HitDtoA(org.lcsim.event.RawTrackerHit hit)
public double getSingleSamplePedestal(org.lcsim.event.EventHeader event, long cellID)
public double getPulsePedestal(org.lcsim.event.EventHeader event, long cellID, int windowSamples, int thresholdCrossing)
public double[] convertWaveformToPulse(org.lcsim.event.RawTrackerHit hit, int thresholdCrossing, boolean mode7)
public ArrayList<org.lcsim.event.CalorimeterHit> HitDtoA(org.lcsim.event.EventHeader event, org.lcsim.event.RawTrackerHit hit)
public org.lcsim.event.CalorimeterHit HitDtoA(org.lcsim.event.EventHeader event, org.lcsim.event.RawCalorimeterHit hit, double timeOffset)
public org.lcsim.event.CalorimeterHit HitDtoA(org.lcsim.event.EventHeader event, org.lcsim.event.RawCalorimeterHit hit, org.lcsim.event.GenericObject mode7Data, double timeOffset)
public org.lcsim.event.RawCalorimeterHit HitAtoD(org.lcsim.event.CalorimeterHit hit)
private double adcToEnergy(double adcSum, long cellID)
public void setDetector(org.lcsim.geometry.Detector detector)
detector
- (long)public EcalChannelConstants findChannel(long cellID)
cellID
- (long)public void setFixedWidth(boolean fixedWidth)
Copyright © 2019. All rights reserved.