14 #include <JANA/JApplication.h>
30 mess <<
"=========================================================================="<<endl;
32 mess <<
"W W A RRRRR NN N IIIIIII NN N GGGGGG "<<endl;
33 mess <<
"W W A A R R N N N I N N N G "<<endl;
34 mess <<
"W W A A R R N N N I N N N G "<<endl;
35 mess <<
"W W W AAAAAAA RRRRR N N N I N N N G GGGGG"<<endl;
36 mess <<
" W W W W A A R R N NN I N NN G G "<<endl;
37 mess <<
" W W A A R R N N IIIIIII N N GGGGG "<<endl;
38 mess <<
"=========================================================================="<<endl;
40 mess <<
"Warning! You are using a deprecated plugin!"<<endl;
41 mess <<
"The level1_trigger plugin has been replaced with the TRIGGER library"<<endl;
42 mess <<
"that is now a part of standard DANA. "<<endl;
44 mess <<
"ALSO! The DTrigger class has been renamed to DMCTrigger to allow DTrigger"<<endl;
45 mess <<
"to be used for data related to the real hardware trigger in the future."<<endl;
46 mess <<
"=========================================================================="<<endl;
69 unattenuate_to_center = exp(+L_over_2/Xo);
81 vector<const DBCALHit*> bcalhits;
82 vector<const DFCALHit*> fcalhits;
83 vector<const DSCHit*> schits;
115 double BCAL_Eupstream = 0.0;
116 double BCAL_Edownstream = 0.0;
117 for(
unsigned int i=0; i< bcalhits.size(); i++){
118 const DBCALHit* bcalhit = bcalhits[i];
121 BCAL_Eupstream += bcalhit->
E;
123 BCAL_Edownstream += bcalhit->
E;
128 double Ebcal = unattenuate_to_center * (BCAL_Eupstream + BCAL_Edownstream)/2.0;
132 for(
unsigned int i=0; i< fcalhits.size(); i++){
133 const DFCALHit* fcalhit = fcalhits[i];
139 unsigned int Nschits = schits.size();
144 bool sum_cut = (Ebcal + 4.0*Efcal)>=2.0;
145 trig->
L1a_fired = sum_cut && Ebcal>0.200 && Efcal>0.030;
146 trig->
L1b_fired = sum_cut && Ebcal>0.030 && Efcal>0.030 && Nschits>0;
153 _data.push_back(trig);
float ATTEN_LENGTH
attenuation length
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.
float BCALFIBERLENGTH
BCAL Scintilator fiber lenth in cm.
jerror_t fini(void)
Called after last event of last event source has been processed.