Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DMCTrigger_factory Class Reference

Implements a L1 trigger algorithm on simulated data in the form of a flag in the DMCTrigger 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 <DMCTrigger_factory.h>

+ Inheritance diagram for DMCTrigger_factory:

Public Member Functions

 DMCTrigger_factory ()
 
 ~DMCTrigger_factory ()
 

Private Member Functions

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

double unattenuate_to_center
 
int USE_OLD_BCAL_HITS
 
double BCAL_CHANNEL_THRESHOLD
 
double FCAL_CHANNEL_THRESHOLD
 

Detailed Description

Implements a L1 trigger algorithm on simulated data in the form of a flag in the DMCTrigger 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 DMCTrigger object at Ebcal, Efcal, and Nschits respectively.

Definition at line 32 of file DMCTrigger_factory.h.

Constructor & Destructor Documentation

DMCTrigger_factory::DMCTrigger_factory ( )
inline

Definition at line 34 of file DMCTrigger_factory.h.

DMCTrigger_factory::~DMCTrigger_factory ( )
inline

Definition at line 35 of file DMCTrigger_factory.h.

Member Function Documentation

jerror_t DMCTrigger_factory::brun ( jana::JEventLoop *  eventLoop,
int32_t  runnumber 
)
private

Called everytime a new run number is detected.

Definition at line 38 of file DMCTrigger_factory.cc.

References DBCALGeometry::GetBCAL_attenutation_length(), and DBCALGeometry::GetBCAL_length().

jerror_t DMCTrigger_factory::erun ( void  )
private

Called everytime run number changes, provided brun has been called.

Definition at line 204 of file DMCTrigger_factory.cc.

jerror_t DMCTrigger_factory::evnt ( jana::JEventLoop *  eventLoop,
uint64_t  eventnumber 
)
private

Called every event.

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 77 of file DMCTrigger_factory.cc.

References BCAL_MEV_PER_ADC_COUNT, DFCALHit::E, DBCALHit::E, DMCTrigger::Ebcal, DMCTrigger::Ebcal_all, DMCTrigger::Efcal, DMCTrigger::Efcal_all, DBCALHit::end, DBCALGeometry::kUpstream, DMCTrigger::L1a_fired, DMCTrigger::L1b_fired, DMCTrigger::L1c_fired, DMCTrigger::Nschits, DMCTrigger::Ntofhits, DBCALDigiHit::pulse_integral, and trig.

jerror_t DMCTrigger_factory::fini ( void  )
private

Called after last event of last event source has been processed.

Definition at line 212 of file DMCTrigger_factory.cc.

jerror_t DMCTrigger_factory::init ( void  )
private

Called once at program start.

Definition at line 30 of file DMCTrigger_factory.cc.

Member Data Documentation

double DMCTrigger_factory::BCAL_CHANNEL_THRESHOLD
private

Definition at line 49 of file DMCTrigger_factory.h.

double DMCTrigger_factory::FCAL_CHANNEL_THRESHOLD
private

Definition at line 50 of file DMCTrigger_factory.h.

double DMCTrigger_factory::unattenuate_to_center
private

Definition at line 46 of file DMCTrigger_factory.h.

int DMCTrigger_factory::USE_OLD_BCAL_HITS
private

Definition at line 48 of file DMCTrigger_factory.h.


The documentation for this class was generated from the following files: