Hall-D Software
alpha
|
Implements a L1 trigger algorithm on simulated data in the form of a flag in the DTrigger object. The flag will indicate whether the level 1 trigger would have fired for the event based on the hit objects. This can be used by analysis programs to decide whether to process or ignore the event. More...
#include <DTrigger_factory.h>
Public Member Functions | |
DTrigger_factory () | |
virtual | ~DTrigger_factory () |
DTrigger_factory () | |
~DTrigger_factory () | |
Private Member Functions | |
jerror_t | init (void) |
Called once at program start. More... | |
jerror_t | evnt (JEventLoop *locEventLoop, uint64_t locEventNumber) |
jerror_t | init (void) |
Called once at program start. More... | |
jerror_t | brun (jana::JEventLoop *eventLoop, int32_t runnumber) |
Called everytime a new run number is detected. More... | |
jerror_t | evnt (jana::JEventLoop *eventLoop, uint64_t eventnumber) |
Called every event. More... | |
jerror_t | erun (void) |
Called everytime run number changes, provided brun has been called. More... | |
jerror_t | fini (void) |
Called after last event of last event source has been processed. More... | |
Private Attributes | |
bool | EMULATE_BCAL_LED_TRIGGER |
bool | EMULATE_FCAL_LED_TRIGGER |
unsigned int | BCAL_LED_NHITS_THRESHOLD |
unsigned int | FCAL_LED_NHITS_THRESHOLD |
bool | REQUIRE_START_COUNTER |
double | unattenuate_to_center |
Implements a L1 trigger algorithm on simulated data in the form of a flag in the DTrigger object. The flag will indicate whether the level 1 trigger would have fired for the event based on the hit objects. This can be used by analysis programs to decide whether to process or ignore the event.
Much of this is based on the information GlueX-doc-1043. What is currently implemented are two algorithms described on page 13. both require BCAL + 4*FCAL >= 2.0GeV. Additional requirements are:
L1afired: BCAL > 200 MeV && FCAL > 30 MeV
L1bfired: BCAL > 30 MeV && FCAL > 30 MeV && NSC > 0
The values of BCAL and FCAL and NSC used to make the decision are kept in the DTrigger object at Ebcal, Efcal, and Nschits respectively.
Definition at line 15 of file libraries/TRIGGER/DTrigger_factory.h.
|
inline |
Definition at line 18 of file libraries/TRIGGER/DTrigger_factory.h.
|
inlinevirtual |
Definition at line 19 of file libraries/TRIGGER/DTrigger_factory.h.
|
inline |
Definition at line 34 of file plugins/Analysis/level1_trigger/DTrigger_factory.h.
|
inline |
Definition at line 35 of file plugins/Analysis/level1_trigger/DTrigger_factory.h.
|
private |
Called everytime a new run number is detected.
Definition at line 64 of file plugins/Analysis/level1_trigger/DTrigger_factory.cc.
References DBCALGeometry::ATTEN_LENGTH, and DBCALGeometry::BCALFIBERLENGTH.
|
private |
Called everytime run number changes, provided brun has been called.
Definition at line 161 of file plugins/Analysis/level1_trigger/DTrigger_factory.cc.
|
private |
In GlueX-doc-1043, it appaears the energy deposited in the BCAL is used. In reality, only the attenuated energy will be available to the L1 trigger electronics. If an average of the sum of both sides is used, it will be off by at most, 20% at the ends (excluding any dark pulsing effects). This conclusion comes from assuming we scale the values by e^(L/2/lambda) such that the value of the threshold is in GeV for energy deposited at the center of the module. The average of the two ends then is:
Eavg = (E*e^+x + E*e^-x)/2
or
Eavg = E * cosh(x)
where x = L/2/lambda L = 390 cm lambda = 300 cm
The dark pulses should contribute at most about 10 MeV.
For the BCAL "energy" we therefore take the average of the sums of the DBCALHits for each side knowing it is overestimated by as much as 20%.
The FCAL energy is just a straight sum of the FCAL hits
Definition at line 34 of file libraries/TRIGGER/DTrigger_factory.cc.
References BCAL_LED_NHITS_THRESHOLD, EMULATE_BCAL_LED_TRIGGER, EMULATE_FCAL_LED_TRIGGER, FCAL_LED_NHITS_THRESHOLD, DL1Trigger::fp_trig_mask, kSTATUS_EVIO, DTrigger::Set_L1FrontPanelTriggerBits(), DTrigger::Set_L1TriggerBits(), DL1MCTrigger::trig_mask, and DL1Trigger::trig_mask.
|
private |
Called every event.
|
private |
Called after last event of last event source has been processed.
Definition at line 169 of file plugins/Analysis/level1_trigger/DTrigger_factory.cc.
|
private |
Called once at program start.
Definition at line 10 of file libraries/TRIGGER/DTrigger_factory.cc.
References BCAL_LED_NHITS_THRESHOLD, EMULATE_BCAL_LED_TRIGGER, EMULATE_FCAL_LED_TRIGGER, and FCAL_LED_NHITS_THRESHOLD.
|
private |
Called once at program start.
|
private |
Definition at line 28 of file libraries/TRIGGER/DTrigger_factory.h.
|
private |
Definition at line 25 of file libraries/TRIGGER/DTrigger_factory.h.
|
private |
Definition at line 26 of file libraries/TRIGGER/DTrigger_factory.h.
|
private |
Definition at line 29 of file libraries/TRIGGER/DTrigger_factory.h.
|
private |
Definition at line 45 of file plugins/Analysis/level1_trigger/DTrigger_factory.h.
|
private |
Definition at line 46 of file plugins/Analysis/level1_trigger/DTrigger_factory.h.