9 #include <Math/VectorUtil.h> 26 InclusionRule intIncRule,
40 : extIncRule_(extIncRule),
42 intIncRule_(intIncRule),
47 caloGeometry_(*caloGeometry.product()),
48 hcalTopology_(*hcalTopology.product()),
49 hcalChStatus_(*hcalChStatus.product()),
50 hcalSevLvlComputer_(*hcalSevLvlComputer.product()),
51 towerMap_(*towerMap.product()) {
58 if (extIncRule_ == InclusionRule::isBehindClusterSeed and intIncRule_ == InclusionRule::withinConeAroundCluster) {
61 }
else if (extIncRule_ == InclusionRule::withinConeAroundCluster and
62 intIncRule_ == InclusionRule::isBehindClusterSeed) {
64 }
else if (extIncRule_ == InclusionRule::isBehindClusterSeed and intIncRule_ == InclusionRule::isBehindClusterSeed) {
66 <<
" external and internal rechit inclusion rules can't both be isBehindClusterSeed." 67 <<
" Setting both to withinConeAroundCluster!";
68 extIncRule_ = InclusionRule::withinConeAroundCluster;
69 intIncRule_ = InclusionRule::withinConeAroundCluster;
75 InclusionRule intIncRule,
89 : extIncRule_(extIncRule),
91 intIncRule_(intIncRule),
96 caloGeometry_(caloGeometry),
97 hcalTopology_(hcalTopology),
98 hcalChStatus_(hcalChStatus),
99 hcalSevLvlComputer_(hcalSevLvlComputer),
100 towerMap_(towerMap) {
107 if (extIncRule_ == InclusionRule::isBehindClusterSeed and intIncRule_ == InclusionRule::withinConeAroundCluster) {
110 }
else if (extIncRule_ == InclusionRule::withinConeAroundCluster and
111 intIncRule_ == InclusionRule::isBehindClusterSeed) {
113 }
else if (extIncRule_ == InclusionRule::isBehindClusterSeed and intIncRule_ == InclusionRule::isBehindClusterSeed) {
115 <<
" external and internal rechit inclusion rules can't both be isBehindClusterSeed." 116 <<
" Setting both to withinConeAroundCluster!";
117 extIncRule_ = InclusionRule::withinConeAroundCluster;
118 intIncRule_ = InclusionRule::withinConeAroundCluster;
128 int include_or_exclude,
129 double (*
scale)(
const double &))
const {
131 const int hd = hid.
depth(),
he = hid.ieta(),
hp = hid.iphi();
132 const int h1 = hd - 1;
137 if (include_or_exclude == 1 and (
he ==
ieta and
hp ==
iphi))
143 <<
" hit in subdet " << hid.subdet() <<
" has an unaccounted for depth of " << hd <<
"!!";
151 if (!(goodHBe
or goodHEe))
155 const float phitEta = phit.eta();
158 auto const dR2 =
deltaR2(pcluEta, pcluPhi, phitEta, phit.phi());
165 const uint32_t
flag =
hit.flags();
174 if (goodHB
or goodHE)
175 return hit.energy() *
scale(phitEta);
184 int include_or_exclude,
185 double (*
scale)(
const double &))
const {
187 const float pcluEta = pclu.
eta();
188 const float pcluPhi = pclu.
phi();
double scaleToEt(const double &eta)
double getHcalSum(const GlobalPoint &pclu, int depth, int ieta, int iphi, int include_or_exclude, double(*scale)(const double &)) const
const CaloGeometry & caloGeometry_
EgammaHcalIsolation(InclusionRule extIncRule, double extRadius, InclusionRule intIncRule, double intRadius, const arrayHB &eThresHB, const arrayHB &etThresHB, int maxSeverityHB, const arrayHE &eThresHE, const arrayHE &etThresHE, int maxSeverityHE, const HBHERecHitCollection &mhbhe, edm::ESHandle< CaloGeometry > caloGeometry, edm::ESHandle< HcalTopology > hcalTopology, edm::ESHandle< HcalChannelQuality > hcalChStatus, edm::ESHandle< HcalSeverityLevelComputer > hcalSevLvlComputer, edm::ESHandle< CaloTowerConstituentsMap > towerMap)
Geom::Phi< T > phi() const
bool recoveredRecHit(const DetId &myid, const uint32_t &myflag) const
Sin< T >::type sin(const T &t)
double scaleToE(const double &eta)
double goodHitEnergy(float pcluEta, float pcluPhi, const HBHERecHit &hit, int depth, int ieta, int iphi, int include_or_exclude, double(*scale)(const double &)) const
const HcalChannelQuality & hcalChStatus_
InclusionRule extIncRule_
const Item * getValues(DetId fId, bool throwOnFail=true) const
const HBHERecHitCollection & mhbhe_
InclusionRule intIncRule_
HcalDetId idFront(const HcalDetId &id) const
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
std::shared_ptr< const CaloCellGeometry > getGeometry(const DetId &id) const
Get the cell geometry of a given detector id.
uint32_t getValue() const
int getSeverityLevel(const DetId &myid, const uint32_t &myflag, const uint32_t &mystatus) const
const HcalTopology & hcalTopology_
const HcalSeverityLevelComputer & hcalSevLvlComputer_
Log< level::Warning, false > LogWarning
constexpr int depth() const
get the tower depth