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