00001 #ifndef L2wBemc2012b_H
00002 #define L2wBemc2012b_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifdef IS_REAL_L2 //in l2-ana environment
00017 #include "L2VirtualAlgo2012.h"
00018 #else
00019 #include "StTriggerUtilities/L2Emulator/L2algoUtil/L2VirtualAlgo2012.h"
00020 #endif
00021 #include "L2wResult2012.h"
00022
00023 class L2wBemc2012 ;
00024 class L2Histo;
00025 class L2EmcGeom2012;
00026
00027 class L2wBemcEvent2012 {
00028 public:
00029 enum {kDataFresh=0};
00030 private:
00031 friend class L2wBemc2012 ;
00032 int isFresh;
00033 float clusterET;
00034 float seedET;
00035 unsigned long long tkCompute;
00036 L2wResult2012 resultBlob;
00037 };
00038
00039 class L2wBemc2012 : public L2VirtualAlgo2012 {
00040
00041
00042
00043
00044 public:
00045 enum {mxBtow=(BtowGeom::mxEtaBin) * (BtowGeom::mxPhiBin)};
00046 private:
00047
00048
00049 int par_dbg;
00050 float par_seedEtThres;
00051 float par_clustEtThres;
00052
00053
00054 L2EmcGeom2012 *mGeom;
00055 int mRdo2tower[mxBtow];
00056 int mTower2rdo[mxBtow];
00057
00058
00059
00060 float wrkBtow_et[mxBtow];
00061 int wrkBtow_tower_seed[mxBtow];
00062 int wrkBtow_tower_seed_size;
00063
00064 L2wBemcEvent2012 mBtow[L2eventStream2012::mxToken];
00065
00066
00067 void createHisto();
00068 void clearEvent(int token);
00069 void clearEvent();
00070 float sumET(int phi, int eta);
00071
00072 public:
00073 L2wBemc2012(const char* name, const char *uid, L2EmcDb2012* db, L2EmcGeom2012 *geo, char* outDir, int resOff);
00074 int initRunUser( int runNo, int *rc_ints, float *rc_floats);
00075 void finishRunUser();
00076 void computeUser(int token);
00077 bool decisionUser(int token, int *myL2Result);
00078
00079 void print1(int token);
00080 void print2();
00081 void print3();
00082 void print4(int token, int hitSize);
00083
00084 };
00085
00086 #endif
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105