public class FADCConfig extends IDAQConfig
FADCConfig
stores FADC configuration settings
parsed from the an EVIO file. This class manages the following
properties:
Modifier and Type | Field and Description |
---|---|
private float[] |
gains |
private EcalChannel.EcalChannelCollection |
geoMap |
private Map<Point,Integer> |
indexChannelMap |
private int |
maxPulses |
private int |
mode |
private int |
nsa |
private int |
nsb |
private int |
offset |
private float[] |
pedestals |
private int[] |
thresholds |
private int |
windowWidth |
Constructor and Description |
---|
FADCConfig() |
Modifier and Type | Method and Description |
---|---|
float |
getGain(EcalChannel channel)
Gets the gain for a crystal.
|
float |
getGain(int channelID)
Gets the gain for a crystal.
|
float |
getGain(int ix,
int iy)
Gets the gain for a crystal.
|
float |
getGain(long cellID)
Gets the gain for a crystal.
|
float |
getGain(Point ixy)
Gets the gain for a crystal.
|
int |
getMaxPulses()
Gets the maximum number of pulses that the FADC will look for
in a channel's window.
|
int |
getMode()
Gets the mode in which FADC data is written.
|
int |
getNSA()
Gets the number of samples (4 ns clock-cycles) that a pulse will
be integrated by the FADC after a threshold-crossing event.
|
int |
getNSB()
Gets the number of samples (4 ns clock-cycles) that a pulse will
be integrated by the FADC before a threshold-crossing event.
|
float |
getPedestal(EcalChannel channel)
Gets the pedestal for a crystal.
|
float |
getPedestal(int channelID)
Gets the pedestal for a crystal.
|
float |
getPedestal(int ix,
int iy)
Gets the pedestal for a crystal.
|
float |
getPedestal(long cellID)
Gets the pedestal for a crystal.
|
float |
getPedestal(Point ixy)
Gets the pedestal for a crystal.
|
int |
getThreshold(EcalChannel channel)
Gets the threshold for a crystal.
|
int |
getThreshold(int channelID)
Gets the threshold for a crystal.
|
int |
getThreshold(int ix,
int iy)
Gets the threshold for a crystal.
|
int |
getThreshold(long cellID)
Gets the threshold for a crystal.
|
int |
getThreshold(Point ixy)
Gets the threshold for a crystal.
|
int |
getWindowOffset()
Gets the time in nanoseconds that the readout window is offset.
|
int |
getWindowWidth()
Gets the length of the readout window for the FADC in nanoseconds.
|
(package private) void |
loadConfig(EvioDAQParser parser)
Updates the stored settings based on the argument parser.
|
void |
printConfig(PrintStream ps)
Prints a textual representation of the configuration bank to the
terminal.
|
private static void |
validateChannelID(int channelID)
Throws an exception if the argument channel ID is not within
the allowed range.
|
private int mode
private int nsa
private int nsb
private int windowWidth
private int offset
private int maxPulses
private float[] gains
private int[] thresholds
private float[] pedestals
private EcalChannel.EcalChannelCollection geoMap
void loadConfig(EvioDAQParser parser)
IDAQConfig
loadConfig
in class IDAQConfig
parser
- - The EVIO DAQ bank parser.public float getGain(EcalChannel channel)
channel
- - The channel object corresponding to the crystal.float
in units of MeV
per ADC.public float getGain(int channelID)
channelID
- - The channel ID corresponding to the crystal.float
in units of MeV
per ADC.public float getGain(int ix, int iy)
ix
- - The x-index of the crystal.iy
- - The y-index of the crystal.float
in units of MeV
per ADC.public float getGain(long cellID)
cellID
- - The geometric ID for the crystal.float
in units of MeV
per ADC.public float getGain(Point ixy)
ixy
- - The a point representing the x/y-indices of the
crystal.float
in units of MeV
per ADC.public int getMaxPulses()
public int getMode()
int
; either 1, 3,
or 7.public int getNSA()
int
in clock-cycles.public int getNSB()
int
in clock-cycles.public float getPedestal(EcalChannel channel)
channel
- - The channel object corresponding to the crystal.float
in units
of ADC.public float getPedestal(int channelID)
channelID
- - The channel ID corresponding to the crystal.float
in units
of ADC.public float getPedestal(int ix, int iy)
ix
- - The x-index of the crystal.iy
- - The y-index of the crystal.float
in units
of ADC.public float getPedestal(long cellID)
cellID
- - The geometric ID for the crystal.float
in units
of ADC.public float getPedestal(Point ixy)
ixy
- - The a point representing the x/y-indices of the
crystal.float
in units
of ADC.public int getThreshold(EcalChannel channel)
channel
- - The channel object corresponding to the crystal.int
in units
of ADC.public int getThreshold(int channelID)
channelID
- - The channel ID corresponding to the crystal.int
in units
of ADC.public int getThreshold(int ix, int iy)
ix
- - The x-index of the crystal.iy
- - The y-index of the crystal.int
in units
of ADC.public int getThreshold(long cellID)
cellID
- - The geometric ID for the crystal.int
in units
of ADC.public int getThreshold(Point ixy)
ixy
- - The a point representing the x/y-indices of the
crystal.int
in units
of ADC.public int getWindowWidth()
public int getWindowOffset()
public void printConfig(PrintStream ps)
IDAQConfig
printConfig
in class IDAQConfig
private static final void validateChannelID(int channelID)
channelID
- - The channel ID to validate.Copyright © 2019. All rights reserved.