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
L2algoUtil
L2exampleAlgo08.h
1
#ifndef L2exampleAlgo08_H
2
#define L2exampleAlgo08_H
3
/*********************************************************************
4
* $Id: L2exampleAlgo08.h,v 1.5 2008/01/30 00:47:17 balewski 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
18
#include "StTriggerUtilities/L2Emulator/L2algoUtil/L2VirtualAlgo2008.h"
19
#include "L2exampleResult08.h"
20
21
class
L2exampleAlgo08
;
22
class
L2Histo
;
23
class
L2EmcGeom
;
24
25
// remember to clear in initRun() to avoid stale data
26
class
L2exampleEvent08
{
// WARN : all is in RAM x 4096 tokens!
27
public
:
28
enum
{mxClust=50};
// keep the size down
29
enum
{kDataFresh=0};
// if used 1 or more times data are stale
30
private
:
31
friend
class
L2exampleAlgo08
;
32
int
isFresh;
// for QA
33
int
size;
// size of used data in the array below
34
float
clusterET[mxClust];
//above seed thresholds, not cleared
35
L2exampleResult08
resultBlob;
36
};
37
38
class
L2exampleAlgo08
:
public
L2VirtualAlgo2008
{
39
/* this class fills the folowing bins
40
of counter histo (mhN), see also L2VirtualAlgo2008.h
41
5 - # of eve w/ overflow # of clusters, on input
42
6 - # of eve w/ STALE data - very bad, on input
43
44
15 - # of eve w/ overflow # of clusters, accepted
45
*/
46
public
:
47
enum
{mxBtow=(BtowGeom::mxEtaBin) * (BtowGeom::mxPhiBin)};
// shortcut
48
private
:
49
50
//..................... params set in initRun
51
int
par_dbg;
52
float
par_seedEtThres;
53
float
par_clusterEtThres;
54
float
par_eventEtThres;
55
56
//.............run-long, token independent variables
57
L2EmcGeom
*mGeom;
// avaliable but not used in this example
58
int
mRdo2tower[mxBtow];
59
int
mTower2rdo[mxBtow];
60
61
//---- event-long variables changed by COMPUTE() -----
62
//............... working, token independent
63
float
wrkBtow_et[mxBtow];
// full event
64
int
wrkBtow_tower_seed[mxBtow];
// above seed thresholds, not cleared
65
int
wrkBtow_tower_seed_size;
66
//............... preserved for Decision(),
67
L2exampleEvent08
mBtow[L2eventStream2008::mxToken];
//it is a lot of RAM!
68
69
// utility methods
70
void
createHisto();
71
void
clearEvent(
int
token);
72
float
sumET(
int
phi,
int
eta);
73
74
public
:
75
L2exampleAlgo08
(
const
char
* name,
L2EmcDb
* db,
L2EmcGeom
*geo,
char
* outDir);
76
int
initRunUser(
int
runNo,
int
*rc_ints,
float
*rc_floats);
77
void
finishRunUser();
// at the end of each run
78
void
computeUser(
int
token);
79
bool
decisionUser(
int
token,
void
**myL2Result);
80
81
void
print1(
int
token);
82
void
print2();
83
void
print3();
84
85
};
86
87
#endif
88
89
/**********************************************************************
90
$Log: L2exampleAlgo08.h,v $
91
Revision 1.5 2008/01/30 00:47:17 balewski
92
Added L2-Etow-calib
93
94
Revision 1.4 2008/01/18 23:29:13 balewski
95
now L2result is exported
96
97
Revision 1.3 2008/01/17 23:15:52 balewski
98
bug in token-addressed memory fixed
99
100
Revision 1.2 2008/01/16 23:32:36 balewski
101
toward token dependent compute()
102
103
Revision 1.1 2007/12/19 02:30:19 balewski
104
new L2-btow-calib-2008
105
106
107
108
*/
109
L2EmcGeom
Definition:
L2EmcGeom.h:60
L2exampleEvent08
Definition:
L2exampleAlgo08.h:26
L2exampleAlgo08
Definition:
L2exampleAlgo08.h:38
L2exampleResult08
Definition:
L2exampleResult08.h:11
L2Histo
Definition:
L2Histo.h:14
L2VirtualAlgo2008
Definition:
L2VirtualAlgo2008.h:34
L2EmcDb
Definition:
L2EmcDb.h:14
Generated by
1.8.5