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
RTS
EventTracker
gl3EMC.h
1
#ifndef GL3EMC_H
2
#define GL3EMC_H
3
4
5
#ifndef TRG_VERSION
6
#define TRG_VERSION 0x32
7
#endif
8
9
#include "daqFormats.h"
10
#include "gl3Track.h"
11
#include "l3EmcCalibration.h"
12
#ifdef OLD_DAQ_READER
13
#include <evpReader.hh>
14
#else
/* OLD_DAQ_READER */
15
#include <DAQ_READER/daqReader.h>
16
#endif
/* OLD_DAQ_READER */
17
18
class
gl3Event
;
19
20
class
gl3EmcTower
{
21
22
public
:
23
inline
int
getADC() {
return
adc; }
24
inline
float
getEnergy() {
return
energy; }
25
inline
int
getNTracks() {
return
nTracks; }
26
27
inline
void
setADC(
int
x) {
28
adc = x;
29
30
if
(info->getGain() <= 0)
31
energy = 0.;
32
else
if
(adc==0)
33
energy = 0.;
34
else
35
energy = (adc - info->getPed())*info->getGain();
36
}
37
38
inline
void
setNTracks(
int
x) { nTracks = x; }
39
inline
void
incrNTracks() { nTracks++; }
40
41
inline
l3EmcTowerInfo
*getTowerInfo() {
return
info; }
42
inline
void
setTowerInfo(
l3EmcTowerInfo
*_info) {
43
info = _info;
44
}
45
46
private
:
47
int
adc;
48
float
energy;
49
int
nTracks;
50
51
l3EmcTowerInfo
*info;
52
};
53
54
class
gl3EMC
{
55
public
:
56
gl3EMC
(
l3EmcCalibration
*BarrelCalib,
l3EmcCalibration
*EndcapCalib=NULL);
57
~
gl3EMC
();
58
59
60
#ifdef OLD_DAQ_READER
61
int
readFromEvpReader(
evpReader
*evp,
char
*mem);
62
#else
/* OLD_DAQ_READER */
63
int
readFromEvpReader(
daqReader
*rdr,
char
*mem);
64
#endif
/* OLD_DAQ_READER */
65
66
int
readEMCSECP(
EMCSECP
* secp);
67
int
readRawData(
L3_P
*l3p);
68
int
matchTracks(
gl3Event
*event);
69
70
void
reset();
71
72
inline
float
getEtotal() {
return
Etotal;};
73
inline
float
getBarrelEnergy() {
return
Ebarrel;};
74
inline
float
getEndcapEnergy() {
return
Eendcap;};
75
76
inline
int
getErrFlags() {
return
errFlags; }
77
78
inline
int
getNTowers() {
return
nTotalTowers; }
79
80
inline
gl3EmcTower
* getTower(
int
twr) {
81
return
&tower[twr];
82
}
83
84
inline
int
getNBarrelTowers() {
return
nBarrelTowers; }
85
86
inline
gl3EmcTower
* getBarrelTower(
int
twr) {
87
return
&tower[twr];
88
}
89
90
inline
int
getNEndcapTowers() {
return
nEndcapTowers; }
91
92
inline
gl3EmcTower
* getEndcapTower(
int
twr) {
93
return
&tower[twr+getNBarrelTowers()];
94
}
95
96
97
// inline gl3EmcTower* getTower(gl3Track *track) {
98
99
// return NULL;
100
// }
101
102
private
:
103
int
nBarrelTowers;
104
int
nEndcapTowers;
105
int
nTotalTowers;
106
107
gl3EmcTower
*tower;
108
gl3EmcTower
*barrelTower;
109
gl3EmcTower
*endcapTower;
110
111
float
Etotal, Ebarrel, Eendcap;
112
113
unsigned
int
errFlags;
114
115
l3EmcCalibration
*barrelCalib;
116
l3EmcCalibration
*endcapCalib;
117
};
118
119
120
121
#endif
l3EmcCalibration
Definition:
l3EmcCalibration.h:59
daqReader
Definition:
daqReader.h:87
EMCSECP
Definition:
daqFormats.h:1011
gl3Event
Definition:
gl3Event.h:53
l3EmcTowerInfo
Definition:
l3EmcCalibration.h:9
gl3EMC
Definition:
gl3EMC.h:54
gl3EmcTower
Definition:
gl3EMC.h:20
L3_P
Definition:
L3Formats.h:230
Generated by
1.8.5