15 #include "../L2algoUtil/L2Histo.h"
16 #include "../L2algoUtil/L2EmcDb.h"
18 #include "L2wEemc2009.h"
37 L2wEemc2009::initRunUser(
int runNo,
int *rc_ints,
float *rc_floats) {
41 par_RndAcceptPrescale = rc_ints[1];
42 par_EtThresh = rc_floats[0];
46 kBad+=2*(par_EtThresh<0);
50 fprintf(mLogFile,
"L2%s algorithm initRun(R=%d), compiled: %s , %s\n",getName(),mRunNumber,__DATE__,__TIME__);
51 fprintf(mLogFile,
" - use ET Thresh =%f, RndAcceptPrescale=%d debug=%d\n", par_EtThresh , par_RndAcceptPrescale, par_dbg);
52 fprintf(mLogFile,
"initRun() params checked for consistency, Error flag=0x%04x\n",kBad);
54 if(kBad)
return -kBad;
58 for (i=0; i<mxHA;i++)
if(hA[i])hA[i]->reset();
59 for (i=0;i<L2eventStream2009::mxToken;i++) highestEt[i]=0;
64 sprintf(txt,
"highest endcap tower ET; x: tower ET; y: counts");
67 sprintf(txt,
"accepted: highest endcap tower ET; x: tower ET; y: counts");
78 L2wEemc2009::computeUser(
int token){
87 hit =mEveStream_etow[token].get_hits();
88 hitSize=mEveStream_etow[token].get_hitSize();
91 for(i=0;i< hitSize;i++,hit++)
92 if (hit->et>highestEt[token]) highestEt[token]=hit->et;
99 L2wEemc2009::decisionUser(
int token,
int *myL2Result){
102 float h=highestEt[token];
118 L2wEemc2009::finishRunUser() {
131 L2wEemc2009::createHisto() {
132 memset(hA,0,
sizeof(hA));
134 hA[0]=
new L2Histo(0,(
char*)
"L0triggered: highest endcap tower ET; x: tower ET; y: counts", 100);
135 hA[1]=
new L2Histo(1,(
char*)
"accepted: highest endcap tower ET; x: tower ET; y: counts", 100);