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
L2bemcGamma2009.h
1
#ifndef L2bemcGamma2009_H
2
#define L2bemcGamma2009_H
3
/*********************************************************************
4
* $Id: L2bemcGamma2009.h,v 1.1 2011/03/09 16:29:07 pibero 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 "L2VirtualAlgo2009.h"
19
#else
20
#include "StTriggerUtilities/L2Emulator/L2algoUtil/L2VirtualAlgo2009.h"
21
#endif
22
23
#include "L2gammaResult2009.h"
24
25
class
L2bemcGamma2009
;
26
class
L2Histo
;
27
class
L2EmcGeom
;
28
// remember to clear in initRun() to avoid stale data
29
class
L2bemcGammaEvent2009
{
// 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
L2bemcGamma2009
;
34
int
isFresh;
// for QA
35
float
clusterET;
36
float
seedET;
37
int
seedTwID;
38
L2gammaResult2009
resultBlob;
39
};
40
41
class
L2bemcGamma2009
:
public
L2VirtualAlgo2009
{
42
/* this class fills the folowing bins
43
of counter histo (mhN), see also L2VirtualAlgo2009.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
L2EmcGeom
*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
L2bemcGammaEvent2009
mBtow[L2eventStream2009::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
L2bemcGamma2009
(
const
char
* name,
L2EmcDb
* db,
L2EmcGeom
*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: L2bemcGamma2009.h,v $
96
Revision 1.1 2011/03/09 16:29:07 pibero
97
Added L2gamma2009
98
99
Revision 1.6 2008/11/18 00:00:00 rcorliss
100
Switched to 2009, updated as necessary
101
102
Revision 1.5 2008/01/30 00:47:17 balewski
103
Added L2-Etow-calib
104
105
Revision 1.4 2008/01/18 23:29:13 balewski
106
now L2result is exported
107
108
Revision 1.3 2008/01/17 23:15:52 balewski
109
bug in token-addressed memory fixed
110
111
Revision 1.2 2008/01/16 23:32:36 balewski
112
toward token dependent compute()
113
114
Revision 1.1 2007/12/19 02:30:19 balewski
115
new L2-btow-calib-2008
116
117
118
119
*/
120
L2EmcGeom
Definition:
L2EmcGeom.h:60
L2VirtualAlgo2009
Definition:
L2VirtualAlgo2009.h:27
L2Histo
Definition:
L2Histo.h:14
L2gammaResult2009
Definition:
L2gammaResult2009.h:11
L2bemcGammaEvent2009
Definition:
L2bemcGamma2009.h:29
L2EmcDb
Definition:
L2EmcDb.h:14
L2bemcGamma2009
Definition:
L2bemcGamma2009.h:41
Generated by
1.8.5