9 #include <Math/VectorUtil.h>
25 InclusionRule intIncRule,
27 const arrayHB &eThresHB,
28 const arrayHB &etThresHB,
30 const arrayHE &eThresHE,
31 const arrayHE &etThresHE,
39 : extIncRule_(extIncRule),
41 intIncRule_(intIncRule),
43 maxSeverityHB_(maxSeverityHB),
44 maxSeverityHE_(maxSeverityHE),
46 caloGeometry_(*caloGeometry.product()),
47 hcalTopology_(*hcalTopology.product()),
48 hcalChStatus_(*hcalChStatus.product()),
49 hcalSevLvlComputer_(*hcalSevLvlComputer.product()),
50 towerMap_(*towerMap.product()) {
52 etThresHB_ = etThresHB;
54 etThresHE_ = etThresHE;
57 if (extIncRule_ == InclusionRule::isBehindClusterSeed and intIncRule_ == InclusionRule::withinConeAroundCluster) {
60 }
else if (extIncRule_ == InclusionRule::withinConeAroundCluster and
61 intIncRule_ == InclusionRule::isBehindClusterSeed) {
63 }
else if (extIncRule_ == InclusionRule::isBehindClusterSeed and intIncRule_ == InclusionRule::isBehindClusterSeed) {
65 <<
" external and internal rechit inclusion rules can't both be isBehindClusterSeed."
66 <<
" Setting both to withinConeAroundCluster!";
67 extIncRule_ = InclusionRule::withinConeAroundCluster;
68 intIncRule_ = InclusionRule::withinConeAroundCluster;
74 InclusionRule intIncRule,
76 const arrayHB &eThresHB,
77 const arrayHB &etThresHB,
79 const arrayHE &eThresHE,
80 const arrayHE &etThresHE,
88 : extIncRule_(extIncRule),
90 intIncRule_(intIncRule),
92 maxSeverityHB_(maxSeverityHB),
93 maxSeverityHE_(maxSeverityHE),
95 caloGeometry_(caloGeometry),
96 hcalTopology_(hcalTopology),
97 hcalChStatus_(hcalChStatus),
98 hcalSevLvlComputer_(hcalSevLvlComputer),
100 eThresHB_ = eThresHB;
101 etThresHB_ = etThresHB;
102 eThresHE_ = eThresHE;
103 etThresHE_ = etThresHE;
106 if (extIncRule_ == InclusionRule::isBehindClusterSeed and intIncRule_ == InclusionRule::withinConeAroundCluster) {
109 }
else if (extIncRule_ == InclusionRule::withinConeAroundCluster and
110 intIncRule_ == InclusionRule::isBehindClusterSeed) {
112 }
else if (extIncRule_ == InclusionRule::isBehindClusterSeed and intIncRule_ == InclusionRule::isBehindClusterSeed) {
114 <<
" external and internal rechit inclusion rules can't both be isBehindClusterSeed."
115 <<
" Setting both to withinConeAroundCluster!";
116 extIncRule_ = InclusionRule::withinConeAroundCluster;
117 intIncRule_ = InclusionRule::withinConeAroundCluster;
126 int include_or_exclude,
127 double (*
scale)(
const double &))
const {
135 const int hd = hid.
depth(),
he = hid.ieta(),
hp = hid.iphi();
136 const int h1 = hd - 1;
141 <<
" hit in subdet " << hid.subdet() <<
" has an unaccounted for depth of " << hd <<
"!!";
146 if (include_or_exclude == 1 and (
he ==
ieta and
hp ==
iphi))
154 const uint32_t
flag =
hit.flags();
159 const double het =
hit.energy() *
scaleToEt(phit.eta());
165 if (goodHB
or goodHE)
166 return hit.energy() *
scale(phit.eta());
175 int include_or_exclude,
176 double (*
scale)(
const double &))
const {