StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
L2Upsilon2012.h
1 #ifndef L2Upsilon2012_H
2 #define L2Upsilon2012_H
3 
4 #ifdef IS_REAL_L2 //in l2-ana environment
5  #include "L2VirtualAlgo2012.h"
6 #else
7  #include "StTriggerUtilities/L2Emulator/L2algoUtil/L2VirtualAlgo2012.h"
8 #endif
9 #include "L2UpsilonResult2012.h"
10 
11 class L2Upsilon2012 ;
12 class L2Histo;
13 class L2EmcGeom2012;
14 // remember to clear in initRun() to avoid stale data
15 class L2UpsilonEvent2012 {// WARN : all is in RAM x 4126 tokens!
16  public:
17  enum {kDataFresh=0}; // if used 1 or more times data are stale
18  private:
19  friend class L2Upsilon2012 ;
20  int isFresh; // for QA
21  L2UpsilonResult2012 resultBlob;
22 };
23 
25  public:
26  enum {mxBtow=(BtowGeom::mxEtaBin) * (BtowGeom::mxPhiBin)}; // shortcut
27  private:
28 
29  //..................... params set in initRun
30  int par_prescale;
31  int fMaxDynamicMaskTowers;
32  int fHowManyEventPerUpdateDynamicMask;
33  int fHotTowerSeenTimesThreshold;
34  float fMinL0ClusterEnergy,fMinL2ClusterEnergy;
35  float fMinInvMass,fMaxInvMass,fMaxCosTheta;
36  float fL0SeedThreshold,fL2SeedThreshold;
37  float fHotTowerThreshold;
38  float fThresholdRatioOfHotTower;
39 
40  int prescale;
41  //.............run-long, token independent variables
42  L2EmcGeom2012 *mGeom;// avaliable but not used in this example
43  int mRdo2tower[mxBtow];
44  int mTower2rdo[mxBtow];
45  int rdo2softID[mxBtow+1];
46  int event_accept;
47  int EventSeen;
48 
49  //---- event-long variables changed by COMPUTE() -----
50  float wrkBtow_ene[mxBtow+1];
51  int wrkBtow_tower[mxBtow+1];
52  int wrkL2_seed_tower[mxBtow+1]; //store tower ID [0~wrkNumberOfL0]
53  float wrkL2_seed_ClusterE[mxBtow+1];
54  int wrkL0_seed_tower[mxBtow+1]; //store tower ID [0~wrkNumberOfL2]
55  float wrkL0_seed_ClusterE[mxBtow+1];
56  int wrkNumberOfL2;
57  int wrkNumberOfL0;
58 
59  int wrkDynamicMask_tower_stat[mxBtow+1]; //status of tower ID (use to judge hot towers)
60  int wrkDynamicMasked_tower[101]; //tower ID
61  int wrkNumberOfMasked; // howmany tower have been masked
62 
63  //............... preserved for Decision(),
64  L2UpsilonEvent2012 mBtow[L2eventStream2012::mxToken]; //it is a lot of RAM!
65 
66  // utility methods
67  void createHisto();
68  void clearEvent(int token);
69  void clearEvent();
70  void update_DynamicMask();
71 
72  public:
73  L2Upsilon2012(const char* name, const char *uid, L2EmcDb2012* db, L2EmcGeom2012 *geo, char* outDir, int resOff);
74  int initRunUser( int runNo, int *rc_ints, float *rc_floats);
75  void finishRunUser();// at the end of each run
76  void computeUser(int token);
77  bool decisionUser(int token, int *myL2Result);
78 };
79 
80 #endif
81 
82 /**********************************************************************
83  $Log: L2Upsilon2012.h,v $
84  Revision 1.3 2011/10/19 16:12:12 jml
85  more 2012 stuff
86 
87  Revision 1.2 2011/10/19 15:39:44 jml
88  2012
89 
90  Revision 1.1 2011/10/18 15:11:44 jml
91  adding 2012 algorithms
92 
93  Revision 1.1 2011/09/22 20:46:52 pibero
94  *** empty log message ***
95 
96  Revision 1.5 2008/01/30 00:47:17 balewski
97  Added L2-Etow-calib
98 
99  Revision 1.4 2008/01/18 23:29:13 balewski
100  now L2result is exported
101 
102  Revision 1.3 2008/01/17 23:15:52 balewski
103  bug in token-addressed memory fixed
104 
105  Revision 1.2 2008/01/16 23:32:36 balewski
106  toward token dependent compute()
107 
108  Revision 1.1 2007/12/19 02:30:19 balewski
109  new L2-btow-calib-2008
110 
111 */
112