public class EvioDAQParser extends Object
EvioDAQParser
takes DAQ configuration banks from
EvIO data and extracts the configuration parameters from them. These
are then stored within package-accessible variables within the class.
ConfigurationManager
. The latter
should be used for accessing this information for any other classes.Modifier and Type | Field and Description |
---|---|
static int |
BANK_TAG
The EvIO bank identification tag for DAQ configuration banks.
|
private List<EcalChannel> |
channels |
private Map<String,List<String>> |
configMap |
private boolean |
debug |
private EcalConditions |
ecalConditions |
(package private) int |
fadcMODE
The pulse-processing mode used by the FADC.
|
(package private) int |
fadcNPEAK
The maximum number of pulses that will be extracted from a single
channel within a readout window.
|
(package private) int |
fadcNSA
The length of time after a pulse-crossing event that the pulse
should be integrated.
|
(package private) int |
fadcNSB
The length of time before a pulse-crossing event that the pulse
should be integrated.
|
(package private) int |
fadcOFFSET
The time-offset of the readout window in ns.
|
(package private) int |
fadcWIDTH
The size of readout window in nanoseconds.
|
(package private) Map<EcalChannel,Float> |
GAIN
Map of
EcalChannel to the gain for that channel. |
(package private) int |
gtpMinSeedEnergy
The seed energy lower bound cut used by the clusterer.
|
(package private) int |
gtpWindowAfter
The length of the clustering verification/inclusion window after
the seed hit.
|
(package private) int |
gtpWindowBefore
The length of the clustering verification/inclusion window before
the seed hit.
|
private int |
nBanks |
(package private) boolean[] |
pairsCoplanarityEn
Indicates whether the pair trigger pair coplanarity cuts are
enabled or not.
|
(package private) int[] |
pairsCoplanarityMax
Specifies the value of the pair trigger pair coplanarity cuts.
|
(package private) boolean[] |
pairsEn
Indicates whether the pair triggers are enabled or not.
|
(package private) boolean[] |
pairsEnergyDiffEn
Indicates whether the pair trigger pair energy difference cuts
are enabled or not.
|
(package private) int[] |
pairsEnergyDiffMax
Specifies the value of the pair trigger pair energy difference
cuts.
|
(package private) boolean[] |
pairsEnergyDistEn
Indicates whether the pair trigger pair energy slope cuts are
enabled or not.
|
(package private) int[] |
pairsEnergyDistMin
Specifies the value of the pair trigger pair energy slope cuts.
|
(package private) float[] |
pairsEnergyDistSlope
Specifies the value of the pair trigger pair energy slope cuts'
parameter F.
|
(package private) int[] |
pairsEnergyMax
Specifies the value of the pair trigger cluster total energy
upper bound cuts.
|
(package private) int[] |
pairsEnergyMin
Specifies the value of the pair trigger cluster total energy
lower bound cuts.
|
(package private) int[] |
pairsEnergySumMax
Specifies the value of the pair trigger pair energy sum lower
bound cuts.
|
(package private) boolean[] |
pairsEnergySumMaxMinEn
Indicates whether the pair trigger pair energy sum cuts are
enabled or not.
|
(package private) int[] |
pairsEnergySumMin
Specifies the value of the pair trigger pair energy sum upper
bound cuts.
|
private static int[] |
pairsIOsrc |
(package private) int[] |
pairsNhitsMin
Specifies the value of the pair trigger cluster hit count cuts.
|
(package private) int[] |
pairsTimeDiffMax
Specifies the value of the pair trigger pair time coincidence
cuts.
|
(package private) Map<EcalChannel,Float> |
PEDESTAL
Map of
EcalChannel to the pedestal for that channel. |
(package private) boolean[] |
singlesEn
Indicates whether the singles triggers are enabled or not.
|
(package private) int[] |
singlesEnergyMax
Specifies the value of the singles trigger cluster total energy
upper bound cuts.
|
(package private) boolean[] |
singlesEnergyMaxEn
Indicates whether the singles trigger cluster total energy upper
bound cuts are enabled or not.
|
(package private) int[] |
singlesEnergyMin
Specifies the value of the singles trigger cluster total energy
lower bound cuts.
|
(package private) boolean[] |
singlesEnergyMinEn
Indicates whether the singles trigger cluster total energy lower
bound cuts are enabled or not.
|
private static int[] |
singlesIOsrc |
(package private) int[] |
singlesNhits
Specifies the value of the singles trigger cluster hit count
cuts.
|
(package private) boolean[] |
singlesNhitsEn
Indicates whether the singles trigger cluster hit count cuts
are enabled or not.
|
private int |
thisFadcSlot |
(package private) Map<EcalChannel,Integer> |
THRESHOLD
Map of
EcalChannel to the threshold for that channel. |
Constructor and Description |
---|
EvioDAQParser()
Instantiates the
EvioDAQParser . |
Modifier and Type | Method and Description |
---|---|
EcalChannel |
findChannel(int channel_id)
Gets the database crystal channel object based on the crystal's
numerical index.
|
EcalChannel |
findChannel(int crate,
int fadcSlot,
int fadcChan)
Gets the database calorimeter channel for a channel defined by
a crate number, FADC slot, and FADC channel.
|
private void |
fixConfigMap2014Run(int runNumber)
Method corrects parameter data for runs that either did not
correctly record the full configuration data or were bugged.
|
boolean |
getBoolConfigSSP(int itrig,
String stub,
int ival)
Gets an SSP parameter value using a shortened version of the
full parameter key and parses it as a
boolean . |
String |
getConfigParameter(String key,
int ival)
Gets a parameter value associated with a parameter key.
|
String |
getConfigSSP(int itrig,
String stub,
int ival)
Gets an SSP parameter value using a shortened version of the
full parameter key.
|
float |
getFloatConfigSSP(int itrig,
String stub,
int ival)
Gets an SSP parameter value using a shortened version of the
full parameter key and parses it as a
float . |
int |
getIntConfigSSP(int itrig,
String stub,
int ival)
Gets an SSP parameter value using a shortened version of the
full parameter key and parses it as a
int . |
private void |
loadConfigMap(int crate,
String[] configTables)
Converts the textual configuration information into a map, where
the first column value becomes the map entry key and the remainder
becomes the map entry value.
|
void |
parse(int crate,
int runNumber,
String[] configurationTables)
Parses a set of configuration tables to obtain DAQ configuration
parameters.
|
void |
parseConfigMap()
Parses the configuration parameter map entries and extracts the
parameter values for those parameters which have the standard
format of
[PARAMETER KEY] --> { [PARAMETER VALUES] } . |
private void |
parseFADC(int crate,
String key,
List<String> vals)
Parses FADC configuration parameter entries.
|
void |
printMap()
Prints the mapped parameter keys and values to the terminal.
|
void |
printVars()
Prints the parsed parameter values to the terminal.
|
private void |
setChannelParsFloat(int crate,
int slot,
Map<EcalChannel,Float> map,
List<String> vals)
Takes a list of 16 values (in argument
vals ) and
maps the appropriate database calorimeter channel to the list
value. |
private void |
setChannelParsInt(int crate,
int slot,
Map<EcalChannel,Integer> map,
List<String> vals)
Takes a list of 16 values (in argument
vals ) and
maps the appropriate database calorimeter channel to the list
value. |
public static final int BANK_TAG
private static final int[] singlesIOsrc
private static final int[] pairsIOsrc
private int nBanks
private boolean debug
int fadcNSA
int fadcNSB
int fadcNPEAK
int fadcMODE
int fadcWIDTH
int fadcOFFSET
Map<EcalChannel,Float> GAIN
EcalChannel
to the gain for that channel.
Uses units of ADC / MeV for the mapped value.Map<EcalChannel,Float> PEDESTAL
EcalChannel
to the pedestal for that channel.
Uses units of ADC for the mapped value.Map<EcalChannel,Integer> THRESHOLD
EcalChannel
to the threshold for that channel.
Uses units of ADC for the mapped value.int gtpMinSeedEnergy
int gtpWindowBefore
int gtpWindowAfter
boolean[] singlesEn
{ Singles0_Enabled, Singles1_Enabled }
.boolean[] pairsEn
{ Pair0_Enabled, Pair1_Enabled }
.boolean[] singlesNhitsEn
{ Singles0_Cut_Enabled, Singles1_Cut_Enabled }
.boolean[] singlesEnergyMinEn
{ Singles0_Cut_Enabled, Singles1_Cut_Enabled }
.boolean[] singlesEnergyMaxEn
{ Singles0_Cut_Enabled, Singles1_Cut_Enabled }
.boolean[] pairsEnergySumMaxMinEn
{ Pair0_Cut_Enabled, Pair1_Cut_Enabled }
.boolean[] pairsEnergyDiffEn
{ Pair0_Cut_Enabled, Pair1_Cut_Enabled }
.boolean[] pairsCoplanarityEn
{ Pair0_Cut_Enabled, Pair1_Cut_Enabled }
.boolean[] pairsEnergyDistEn
{ Pair0_Cut_Enabled, Pair1_Cut_Enabled }
.int[] singlesNhits
{ Singles0_Cut_Value, Singles1_Cut_Value }
.int[] singlesEnergyMin
{ Singles0_Cut_Value, Singles1_Cut_Value }
.int[] singlesEnergyMax
{ Singles0_Cut_Value, Singles1_Cut_Value }
.int[] pairsNhitsMin
{ Pair0_Cut_Value, Pair1_Cut_Value }
.int[] pairsEnergyMin
{ Pair0_Cut_Value, Pair1_Cut_Value }
.int[] pairsEnergyMax
{ Pair0_Cut_Value, Pair1_Cut_Value }
.int[] pairsEnergySumMin
{ Pair0_Cut_Value, Pair1_Cut_Value }
.int[] pairsEnergySumMax
{ Pair0_Cut_Value, Pair1_Cut_Value }
.int[] pairsEnergyDiffMax
{ Pair0_Cut_Value, Pair1_Cut_Value }
.int[] pairsCoplanarityMax
{ Pair0_Cut_Value, Pair1_Cut_Value }
.int[] pairsTimeDiffMax
{ Pair0_Cut_Value, Pair1_Cut_Value }
.int[] pairsEnergyDistMin
{ Pair0_Cut_Value, Pair1_Cut_Value }
.float[] pairsEnergyDistSlope
{ Pair0_Cut_Value, Pair1_Cut_Value }
.private int thisFadcSlot
private EcalConditions ecalConditions
private List<EcalChannel> channels
public void parse(int crate, int runNumber, String[] configurationTables)
crate
- - The crate associated with the configuration tables.runNumber
- - The run number for the current data set.configurationTables
- - Tables containing DAQ configuration
parameters.private void loadConfigMap(int crate, String[] configTables)
crate
- - The calorimeter crate associated with the textual
configuration data.configTables
- - An array of textual configuration tables that
contain the DAQ configuration parameters.public void parseConfigMap()
[PARAMETER KEY] --> { [PARAMETER VALUES] }
.private void fixConfigMap2014Run(int runNumber)
runNumber
- - The run number for the current run. This is
used to determine if the run is a "bugged" run.private void parseFADC(int crate, String key, List<String> vals)
crate
- - The crate associated with this parameter entry.key
- - The parameter key.vals
- - A list of 16 values with indices corresponding to
the FADC channel with which they are associated.private void setChannelParsFloat(int crate, int slot, Map<EcalChannel,Float> map, List<String> vals)
vals
) and
maps the appropriate database calorimeter channel to the list
value. This assumes that the String
values should
be parsed to Float
objects.crate
- - The calorimeter crate associated with the values.slot
- - The FADC slot associated with the values.map
- - The map in which to place the values.vals
- - A List
of 16 String
objects representing the channel values. This should correspond
to FADC channels 0 - 15.private void setChannelParsInt(int crate, int slot, Map<EcalChannel,Integer> map, List<String> vals)
vals
) and
maps the appropriate database calorimeter channel to the list
value. This assumes that the String
values should
be parsed to Integer
objects.crate
- - The calorimeter crate associated with the values.slot
- - The FADC slot associated with the values.map
- - The map in which to place the values.vals
- - A List
of 16 String
objects representing the channel values.public void printMap()
public void printVars()
public float getFloatConfigSSP(int itrig, String stub, int ival)
float
.itrig
- - The number of the trigger for which to obtain
the parameter value.stub
- - The shortened version of the parameter key. This
corresponds to "SSP_HPS_[STUB]_[TRIGGER NUMBER]".ival
- - The index of the value that is to be obtained.0
is returned and a message is logged.public int getIntConfigSSP(int itrig, String stub, int ival)
int
.itrig
- - The number of the trigger for which to obtain
the parameter value.stub
- - The shortened version of the parameter key. This
corresponds to "SSP_HPS_[STUB]_[TRIGGER NUMBER]".ival
- - The index of the value that is to be obtained.0
is returned and a message is logged.public boolean getBoolConfigSSP(int itrig, String stub, int ival)
boolean
.itrig
- - The number of the trigger for which to obtain
the parameter value.stub
- - The shortened version of the parameter key. This
corresponds to "SSP_HPS_[STUB]_[TRIGGER NUMBER]".ival
- - The index of the value that is to be obtained.false
is returned and a message is logged.public String getConfigSSP(int itrig, String stub, int ival)
itrig
- - The number of the trigger for which to obtain
the parameter value.stub
- - The shortened version of the parameter key. This
corresponds to "SSP_HPS_[STUB]_[TRIGGER NUMBER]".ival
- - The index of the value that is to be obtained."0"
is returned and a message is logged.public String getConfigParameter(String key, int ival)
key
- - The parameter key to which the value belongs.ival
- - The index of the desired parameter value."0"
otherwise. In the event that a parameter
can not be found, an error message is passed to the logger.public EcalChannel findChannel(int crate, int fadcSlot, int fadcChan)
crate
- - The crate number.fadcSlot
- - The FADC slot.fadcChan
- - The FADC channel.EcalChannel
if it exists, and null
if it does not.public EcalChannel findChannel(int channel_id)
channel_id
- - The crystal index.EcalChannel
.Copyright © 2019. All rights reserved.