00001 #ifndef L2Upsilon2009_H
00002 #define L2Upsilon2009_H
00003
00004 #ifdef IS_REAL_L2 //in l2-ana environment
00005 #include "L2VirtualAlgo2009.h"
00006 #else
00007 #include "StTriggerUtilities/L2Emulator/L2algoUtil/L2VirtualAlgo2009.h"
00008 #endif
00009 #include "L2UpsilonResult2009.h"
00010
00011 class L2Upsilon2009 ;
00012 class L2Histo;
00013 class L2EmcGeom;
00014
00015 class L2UpsilonEvent2009 {
00016 public:
00017 enum {kDataFresh=0};
00018 private:
00019 friend class L2Upsilon2009 ;
00020 int isFresh;
00021 L2UpsilonResult2009 resultBlob;
00022 };
00023
00024 class L2Upsilon2009 : public L2VirtualAlgo2009 {
00025 public:
00026 enum {mxBtow=(BtowGeom::mxEtaBin) * (BtowGeom::mxPhiBin)};
00027 private:
00028
00029
00030 int par_prescale;
00031 int fMaxDynamicMaskTowers;
00032 int fHowManyEventPerUpdateDynamicMask;
00033 int fHotTowerSeenTimesThreshold;
00034 float fMinL0ClusterEnergy,fMinL2ClusterEnergy;
00035 float fMinInvMass,fMaxInvMass,fMaxCosTheta;
00036 float fL0SeedThreshold,fL2SeedThreshold;
00037 float fHotTowerThreshold;
00038 float fThresholdRatioOfHotTower;
00039
00040 int prescale;
00041
00042 L2EmcGeom *mGeom;
00043 int mRdo2tower[mxBtow];
00044 int mTower2rdo[mxBtow];
00045 int rdo2softID[mxBtow+1];
00046 int event_accept;
00047 int EventSeen;
00048
00049
00050 float wrkBtow_ene[mxBtow+1];
00051 int wrkBtow_tower[mxBtow+1];
00052 int wrkL2_seed_tower[mxBtow+1];
00053 float wrkL2_seed_ClusterE[mxBtow+1];
00054 int wrkL0_seed_tower[mxBtow+1];
00055 float wrkL0_seed_ClusterE[mxBtow+1];
00056 int wrkNumberOfL2;
00057 int wrkNumberOfL0;
00058
00059 int wrkDynamicMask_tower_stat[mxBtow+1];
00060 int wrkDynamicMasked_tower[101];
00061 int wrkNumberOfMasked;
00062
00063
00064 L2UpsilonEvent2009 mBtow[L2eventStream2009::mxToken];
00065
00066
00067 void createHisto();
00068 void clearEvent(int token);
00069 void clearEvent();
00070 void update_DynamicMask();
00071
00072 public:
00073 L2Upsilon2009(const char* name, L2EmcDb* db, L2EmcGeom *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
00080 #endif
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103