Main Page
Namespaces
Classes
Package Documentation
SimCalorimetry
HcalTrigPrimAlgos
src
HcalFeatureHFEMBit.cc
Go to the documentation of this file.
1
2
//HcalFeatureHFEMBit
3
//version 2.0
4
5
#include "
SimCalorimetry/HcalTrigPrimAlgos/interface/HcalFeatureHFEMBit.h
"
6
#include "
CondFormats/HcalObjects/interface/HcalQIECoder.h
"
7
8
9
HcalFeatureHFEMBit::HcalFeatureHFEMBit
(
double
ShortMinE,
double
LongMinE,
10
double
ShortLongCutSlope,
double
ShortLongCutOffset,
const
HcalDbService
& conditions) : conditions_(conditions)
11
{
12
ShortMinE_
= ShortMinE;
//minimum energy deposited
13
LongMinE_
= LongMinE;
14
ShortLongCutSlope_
= ShortLongCutSlope;
// this is a the slope of the cut line related to energy deposited in short fibers vrs long fibers
15
ShortLongCutOffset_
= ShortLongCutOffset;
// this is the offset of said line.
16
17
18
19
}
20
21
HcalFeatureHFEMBit::~HcalFeatureHFEMBit
() { }
22
23
bool
24
HcalFeatureHFEMBit::fineGrainbit
(
25
const
HFDataFrame
& shortDigi,
26
const
HFDataFrame
& longDigi,
27
int
idx
)
const
28
{
29
float
shortE =
getE
(shortDigi, idx);
30
float
longE =
getE
(longDigi, idx);
31
32
if
(shortE <
ShortMinE_
)
33
return
false
;
34
if
(longE <
LongMinE_
)
35
return
false
;
36
37
return
(shortE < (longE -
ShortLongCutOffset_
) *
ShortLongCutSlope_
);
38
}
39
40
bool
HcalFeatureHFEMBit::fineGrainbit
(
41
const
QIE10DataFrame
& short1,
42
const
QIE10DataFrame
& short2,
43
const
QIE10DataFrame
& long1,
44
const
QIE10DataFrame
& long2,
45
bool
validShort1,
46
bool
validShort2,
47
bool
validLong1,
48
bool
validLong2,
49
int
idx
)
const
50
{
51
float
shortE = 0;
52
if
(validShort1)
53
shortE +=
getE
(short1, idx);
54
if
(validShort2)
55
shortE +=
getE
(short2, idx);
56
if
(validShort1 and validShort2)
57
shortE *= .5;
58
59
float
longE = 0;
60
if
(validLong1)
61
longE +=
getE
(long1, idx);
62
if
(validLong2)
63
longE +=
getE
(long2, idx);
64
if
(validLong1 and validLong2)
65
longE *= .5;
66
67
if
(shortE <
ShortMinE_
)
68
return
false
;
69
if
(longE <
LongMinE_
)
70
return
false
;
71
72
return
(shortE < (longE -
ShortLongCutOffset_
) *
ShortLongCutSlope_
);
73
}
QIE10DataFrame
Definition:
QIE10DataFrame.h:11
HcalDbService
Definition:
HcalDbService.h:27
HcalQIECoder.h
HcalFeatureHFEMBit::getE
float getE(const T &f, int idx) const
Definition:
HcalFeatureHFEMBit.h:38
HFDataFrame
Definition:
HFDataFrame.h:15
HcalFeatureHFEMBit.h
HcalFeatureHFEMBit::fineGrainbit
virtual bool fineGrainbit(const QIE10DataFrame &short1, const QIE10DataFrame &short2, const QIE10DataFrame &long1, const QIE10DataFrame &long2, bool validShort1, bool validShort2, bool validLong1, bool validLong2, int idx) const override
Definition:
HcalFeatureHFEMBit.cc:40
training_settings.idx
idx
Definition:
training_settings.py:16
HcalFeatureHFEMBit::ShortLongCutOffset_
double ShortLongCutOffset_
Definition:
HcalFeatureHFEMBit.h:32
HcalFeatureHFEMBit::LongMinE_
double LongMinE_
Definition:
HcalFeatureHFEMBit.h:32
HcalFeatureHFEMBit::ShortMinE_
double ShortMinE_
Definition:
HcalFeatureHFEMBit.h:32
HcalFeatureHFEMBit::ShortLongCutSlope_
double ShortLongCutSlope_
Definition:
HcalFeatureHFEMBit.h:32
HcalFeatureHFEMBit::~HcalFeatureHFEMBit
~HcalFeatureHFEMBit()
Definition:
HcalFeatureHFEMBit.cc:21
HcalFeatureHFEMBit::HcalFeatureHFEMBit
HcalFeatureHFEMBit(double ShortMinE, double LongMinE, double ShortLongCutSlope, double ShortLongCutOffset, const HcalDbService &conditions)
Definition:
HcalFeatureHFEMBit.cc:9
Generated for CMSSW Reference Manual by
1.8.11