StRoot
1
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
StTriggerUtilities
L2Emulator
L2gammaAlgo
L2bemcGamma2012.h
1
#ifndef L2bemcGamma2012_H
2
#define L2bemcGamma2012_H
3
/*********************************************************************
4
* $Id: L2bemcGamma2012.h,v 1.3 2011/10/19 16:12:11 jml Exp $
5
* \author Jan Balewski, MIT, 2008
6
*********************************************************************
7
* Descripion:
8
* example algo finding list of 2x2 BTOW clusters based on ET-seed list produced by L2-btow-calib algo
9
* features: uses 2D array (ieta vs. iphi )
10
* Limitations:
11
* - ignores seeds at the edges
12
* - double counts for neighbours seeds
13
* - no provision for wrap up in phi
14
*********************************************************************
15
*/
16
17
#ifdef IS_REAL_L2 //in l2-ana environment
18
#include "L2VirtualAlgo2012.h"
19
#else
20
#include "StTriggerUtilities/L2Emulator/L2algoUtil/L2VirtualAlgo2012.h"
21
#endif
22
23
#include "L2gammaResult2012.h"
24
25
class
L2bemcGamma2012
;
26
class
L2Histo
;
27
class
L2EmcGeom2012
;
28
// remember to clear in initRun() to avoid stale data
29
class
L2bemcGammaEvent2012
{
// WARN : all is in RAM x 4096 tokens!
30
public
:
31
enum
{kDataFresh=0};
// if used 1 or more times data are stale
32
private
:
33
friend
class
L2bemcGamma2012
;
34
int
isFresh;
// for QA
35
float
clusterET;
36
float
seedET;
37
int
seedTwID;
38
L2gammaResult2012
resultBlob;
39
};
40
41
class
L2bemcGamma2012
:
public
L2VirtualAlgo2012
{
42
/* this class fills the folowing bins
43
of counter histo (mhN), see also L2VirtualAlgo2012.h
44
5 - # of eve w/ overflow # of clusters, on input
45
6 - # of eve w/ STALE data - very bad, on input
46
47
15 - # of eve w/ overflow # of clusters, accepted
48
*/
49
public
:
50
enum
{mxBtow=(BtowGeom::mxEtaBin) * (BtowGeom::mxPhiBin)};
// shortcut
51
private
:
52
53
//..................... params set in initRun
54
int
par_dbg;
55
float
par_seedEtThres;
56
float
par_clusterEtThres;
57
58
59
//.............run-long, token independent variables
60
L2EmcGeom2012
*mGeom;
// avaliable but not used in this example
61
int
mRdo2tower[mxBtow];
62
int
mTower2rdo[mxBtow];
63
64
//---- event-long variables changed by COMPUTE() -----
65
//............... working, token independent
66
float
wrkBtow_et[mxBtow];
// full event
67
int
wrkBtow_tower_seed[mxBtow];
// above seed thresholds, not cleared
68
int
wrkBtow_tower_seed_size;
69
//............... preserved for Decision(),
70
L2bemcGammaEvent2012
mBtow[L2eventStream2012::mxToken];
//it is a lot of RAM!
71
72
// utility methods
73
void
createHisto();
74
void
clearEvent(
int
token);
75
void
clearEvent();
76
float
sumET(
int
phi,
int
eta);
77
78
public
:
79
L2bemcGamma2012
(
const
char
* name,
const
char
*uid,
L2EmcDb2012
* db,
L2EmcGeom2012
*geo,
char
* outDir,
int
resOff);
80
int
initRunUser(
int
runNo,
int
*rc_ints,
float
*rc_floats);
81
void
finishRunUser();
// at the end of each run
82
void
computeUser(
int
token);
83
bool
decisionUser(
int
token,
int
*myL2Result);
84
85
void
print1(
int
token);
86
void
print2();
87
void
print3();
88
void
print4(
int
token,
int
hitSize);
89
90
};
91
92
#endif
93
94
/**********************************************************************
95
$Log: L2bemcGamma2012.h,v $
96
Revision 1.3 2011/10/19 16:12:11 jml
97
more 2012 stuff
98
99
Revision 1.2 2011/10/19 15:39:43 jml
100
2012
101
102
Revision 1.1 2011/10/18 15:11:42 jml
103
adding 2012 algorithms
104
105
Revision 1.1 2011/03/09 16:29:07 pibero
106
Added L2gamma2009
107
108
Revision 1.6 2008/11/18 00:00:00 rcorliss
109
Switched to 2009, updated as necessary
110
111
Revision 1.5 2008/01/30 00:47:17 balewski
112
Added L2-Etow-calib
113
114
Revision 1.4 2008/01/18 23:29:13 balewski
115
now L2result is exported
116
117
Revision 1.3 2008/01/17 23:15:52 balewski
118
bug in token-addressed memory fixed
119
120
Revision 1.2 2008/01/16 23:32:36 balewski
121
toward token dependent compute()
122
123
Revision 1.1 2007/12/19 02:30:19 balewski
124
new L2-btow-calib-2008
125
126
127
128
*/
129
L2EmcGeom2012
Definition:
L2EmcGeom2012.h:60
L2bemcGammaEvent2012
Definition:
L2bemcGamma2012.h:29
L2bemcGamma2012
Definition:
L2bemcGamma2012.h:41
L2gammaResult2012
Definition:
L2gammaResult2012.h:11
L2Histo
Definition:
L2Histo.h:14
L2EmcDb2012
Definition:
L2EmcDb2012.h:14
L2VirtualAlgo2012
Definition:
L2VirtualAlgo2012.h:27
Generated by
1.8.5