Package org.jlab.analysis.eventmerger
Class RandomTriggerFilter
java.lang.Object
org.jlab.analysis.eventmerger.RandomTriggerFilter
Random trigger filtering tool: filters hipo event according to trigger bit
and beam current to create random-trigger files for background merging
Usage : trigger-filter -b [trigger bit mask (e.g. 0x0000008000000000 to select the FC trigger] -o [output file]
Options :
-c : minimum beam current (default = -1)
-e : name of required bank, e.g. DC::tdc (default = )
-n : maximum number of events to process (default = -1)
-r : minimum number of rows in required bank (default = -1)
-s : source of beam current information (scalers or Epics PV name) (default = scalers)
-v : vetoed trigger bit mask (e.g. 0xFFFFFF7FFFFFFFFF to veto all but the FC trigger (default = 0x0)
Event is filtered if trigger word overlaps with the trigger mask and doesn't
overlap with the veto mask. The beam current condition is based by default on
DSC2 scaler readouts from RUN::scaler or, alternatively, Epics readouts from
RAW::epics. In the absence of (or in addition to) the current threshold, a
threshold on raw hit multiplicity can be applied selecting bank and minimum
number of rows
- Author:
- devita
-
Constructor Summary
ConstructorsConstructorDescriptionRandomTriggerFilter
(long bits, long veto, double current) RandomTriggerFilter
(long bits, long veto, double min, double max, String currentSource, String bankName, int nRows) RandomTriggerFilter
(long bits, long veto, String bankName, int nRows) -
Method Summary
Modifier and TypeMethodDescriptionorg.jlab.jnp.hipo4.data.Bank
createFilterBank
(org.jlab.jnp.hipo4.io.HipoWriterSorted writer, org.jlab.jnp.utils.json.JsonObject json) Create hipo bank with Json string saved as byte arraystatic void
boolean
processEvent
(org.jlab.jnp.hipo4.data.Event event) static long
readTriggerMask
(String mask) org.jlab.jnp.utils.json.JsonObject
settingsToJson
(long selectedBits, long vetoedBits, double minCurrent, double maxCurrent, String currentSource, String bankName, int nRows) Create Json object with filter settings
-
Constructor Details
-
RandomTriggerFilter
public RandomTriggerFilter(long bits, long veto, double current) -
RandomTriggerFilter
-
RandomTriggerFilter
-
-
Method Details
-
processEvent
public boolean processEvent(org.jlab.jnp.hipo4.data.Event event) -
settingsToJson
public org.jlab.jnp.utils.json.JsonObject settingsToJson(long selectedBits, long vetoedBits, double minCurrent, double maxCurrent, String currentSource, String bankName, int nRows) Create Json object with filter settings- Parameters:
selectedBits
-vetoedBits
-minCurrent
-currentSource
-bankName
-nRows
-- Returns:
-
createFilterBank
public org.jlab.jnp.hipo4.data.Bank createFilterBank(org.jlab.jnp.hipo4.io.HipoWriterSorted writer, org.jlab.jnp.utils.json.JsonObject json) Create hipo bank with Json string saved as byte array- Parameters:
writer
-json
-- Returns:
-
readTriggerMask
-
main
-