Fills a ROOT tree with trigger emulation results. More...
Classes | |
struct | BeamInfo_t |
Data structure for the beam gate data in the tree. More... | |
struct | Config |
struct | GlobalTriggerInfo_t |
Data structure for the global trigger data in the tree. More... | |
Public Types | |
using | TriggerInfo_t = sbn::details::TriggerResponseManager::TriggerInfo_t |
Data record the trigger response branch is based on. More... | |
using | Parameters = art::EDAnalyzer::Table< Config > |
Public Member Functions | |
TriggerEmulationTree (Parameters const &config) | |
void | analyze (art::Event const &event) override |
void | endJob () override |
Private Types | |
using | TriggerInputSpec_t = sbn::details::TriggerResponseManager::TriggerInputSpec_t |
Private Attributes | |
art::InputTag const | fBeamGateProducer |
art::InputTag const | fTriggerProducer |
std::string const | fLogCategory |
struct { | |
unsigned int run | |
unsigned int subRun | |
unsigned int event | |
} | fEventID |
BeamInfo_t | fBeamInfo |
GlobalTriggerInfo_t | fGlobalTriggerInfo |
Data for global trigger in tree. More... | |
TTree * | fStoreTree = nullptr |
unsigned int | fTotalProcessed = 0U |
sbn::details::TriggerResponseManager | fTriggerResponses |
< Manages filling of trigger result branches. More... | |
Friends | |
TriggerInputSpec_t | convert (Config::TriggerSpecConfig const &config) |
Fills a ROOT tree with trigger emulation results.
There are two distinct groups of information about triggers in the tree. The first one is the hardware trigger, that is the trigger that was actually used to decide to record the event. The other group of information is from trigger logic "emulation" on the collected data (optical detector waveforms): there may be multiple branches in this group, one for each emulated trigger logic, threshold and gate.
A branch is added for each configured trigger logic. This module actually ignores the details of the logic yielding the results: a trigger result is a group of data products under the same tag. For example, a tag M1
(presumably, a very loose trigger logic requiring just one PMT pair above threshold anywhere in the detector, with no hint of which that threshold is) will produce a branch with name "M1"
including information from the M1
data products (so far, only a collection of raw::Trigger
is read). Note that a trigger object is expected to be present regardless whether the trigger fired or not. It is assumed that the trigger fired if at least one of the raw::Trigger::TriggerBits()
is set, not fired otherwise.
Each branch mirrors a data record, TriggerInfo_t
, reporting the response for one simulated trigger logic. The structure and interpretation of the trigger response branch is described in ROOT TTree code by the string in TriggerInfo_t::TriggerResponseBranchStructure
, and its meaning is:
fired
(boolean): whether this trigger has triggered at all during the considered trigger gate.time
(double): time of the trigger, taken directly from raw::Trigger::TriggerTime()
; it is expected to be measured in microseconds and relative to the nominal time reference of the event, which for data is the hardware trigger time and for simulation is the "hardware" beam gate time (however that is defined).gate
(double): start time of the gate where the trigger logic was simulated. It is in the same time scale as the trigger time, and directly taken from raw::Trigger::BeamGateTime()
. Definition at line 90 of file TriggerEmulationTree_module.cc.
using sbn::TriggerEmulationTree::Parameters = art::EDAnalyzer::Table<Config> |
Definition at line 151 of file TriggerEmulationTree_module.cc.
using sbn::TriggerEmulationTree::TriggerInfo_t = sbn::details::TriggerResponseManager::TriggerInfo_t |
Data record the trigger response branch is based on.
Definition at line 98 of file TriggerEmulationTree_module.cc.
|
private |
Definition at line 93 of file TriggerEmulationTree_module.cc.
|
explicit |
Definition at line 243 of file TriggerEmulationTree_module.cc.
|
override |
Definition at line 277 of file TriggerEmulationTree_module.cc.
|
override |
Definition at line 322 of file TriggerEmulationTree_module.cc.
|
friend |
Definition at line 231 of file TriggerEmulationTree_module.cc.
unsigned int sbn::TriggerEmulationTree::event |
Definition at line 200 of file TriggerEmulationTree_module.cc.
|
private |
Definition at line 189 of file TriggerEmulationTree_module.cc.
|
private |
Definition at line 203 of file TriggerEmulationTree_module.cc.
struct { ... } sbn::TriggerEmulationTree::fEventID |
|
private |
Data for global trigger in tree.
Definition at line 204 of file TriggerEmulationTree_module.cc.
|
private |
Definition at line 191 of file TriggerEmulationTree_module.cc.
|
private |
Definition at line 208 of file TriggerEmulationTree_module.cc.
|
private |
Definition at line 210 of file TriggerEmulationTree_module.cc.
|
private |
Definition at line 190 of file TriggerEmulationTree_module.cc.
|
private |
< Manages filling of trigger result branches.
Definition at line 220 of file TriggerEmulationTree_module.cc.
unsigned int sbn::TriggerEmulationTree::run |
Definition at line 198 of file TriggerEmulationTree_module.cc.
unsigned int sbn::TriggerEmulationTree::subRun |
Definition at line 199 of file TriggerEmulationTree_module.cc.