Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
plugins/Analysis/level1_trigger/DTrigger_factory.h
Go to the documentation of this file.
1 // $Id$
2 //
3 // File: DTrigger_factory.h
4 // Created: Tue Jun 7 10:15:05 EDT 2011
5 // Creator: davidl (on Darwin eleanor.jlab.org 10.7.0 i386)
6 //
7 
8 #ifndef _DTrigger_factory_
9 #define _DTrigger_factory_
10 
11 #include <JANA/JFactory.h>
12 #include "DTrigger.h"
13 
14 /// Implements a L1 trigger algorithm on simulated data in the form of
15 /// a flag in the DTrigger object. The flag will indicate whether the
16 /// level 1 trigger would have fired for the event based on the hit
17 /// objects. This can be used by analysis programs to decide whether
18 /// to process or ignore the event.
19 ///
20 /// Much of this is based on the information GlueX-doc-1043. What is
21 /// currently implemented are two algorithms described on page 13.
22 /// both require BCAL + 4*FCAL >= 2.0GeV. Additional requirements are:
23 ///
24 /// L1afired: BCAL > 200 MeV && FCAL > 30 MeV
25 ///
26 /// L1bfired: BCAL > 30 MeV && FCAL > 30 MeV && NSC > 0
27 ///
28 /// The values of BCAL and FCAL and NSC used to make the decision
29 /// are kept in the DTrigger object at Ebcal, Efcal, and Nschits
30 /// respectively.
31 
32 class DTrigger_factory:public jana::JFactory<DTrigger>{
33  public:
36 
37 
38  private:
39  jerror_t init(void); ///< Called once at program start.
40  jerror_t brun(jana::JEventLoop *eventLoop, int32_t runnumber); ///< Called everytime a new run number is detected.
41  jerror_t evnt(jana::JEventLoop *eventLoop, uint64_t eventnumber); ///< Called every event.
42  jerror_t erun(void); ///< Called everytime run number changes, provided brun has been called.
43  jerror_t fini(void); ///< Called after last event of last event source has been processed.
44 
47 };
48 
49 #endif // _DTrigger_factory_
50 
jerror_t brun(jana::JEventLoop *eventLoop, int32_t runnumber)
Called everytime a new run number is detected.
jerror_t init(void)
Called once at program start.
jerror_t evnt(JEventLoop *locEventLoop, uint64_t locEventNumber)
jerror_t erun(void)
Called everytime run number changes, provided brun has been called.
jerror_t fini(void)
Called after last event of last event source has been processed.
Implements a L1 trigger algorithm on simulated data in the form of a flag in the DTrigger object...