31 if(passCleaning_(&(*hbheItr),hcalSevLvlAlgo,dbHcalChStatus)){
35 if(!(
id.ietaAbs()==28 &&
id.depth()==3)){
36 float energy = hbheItr->energy();
38 if(acceptHit_(
id,pos,energy,candEta,candPhi)){
44 float energy = hbheItr->energy()/2.;
45 HcalDetId tower28Id(
id.subdet(),28*
id.zside(),
id.iphi(),2);
47 if(acceptHit_(
id,tower28Pos,energy,candEta,candPhi)){
49 sumEt+=energy*
sin(tower28Pos.
theta());
51 HcalDetId tower29Id(
id.subdet(),29*
id.zside(),
id.iphi(),2);
53 if(acceptHit_(
id,tower29Pos,energy,candEta,candPhi)){
55 sumEt+=energy*
sin(tower29Pos.
theta());
60 return std::make_pair(sumE,sumEt);
72 float hitEta = pos.
eta();
73 float hitPhi = pos.
phi();
77 if(dR2>=innerConeSq && dR2<outerConeSq) {
78 float hitEt = hitEnergy*
sin(2*atan(
exp(-hitEta)));
103 if(
depth_==-1)
return true;
113 if(hcalSevLvlComp==
NULL || hcalChanStatus==
NULL)
return true;
117 const uint32_t recHitFlag = hit->
flags();
120 int severityLevel = hcalSevLvlComp->
getSeverityLevel(
id,recHitFlag,dbStatusFlag);
123 if(severityLevel == 0)
return true;
134 int iEtaAbs =
id.ietaAbs();
135 int depth =
id.depth();
137 (iEtaAbs<=29 && depth==1) ||
138 (iEtaAbs>=27 && iEtaAbs<=29 && depth==2)){
bool passDepth_(const HcalDetId id) const
std::pair< float, float > getSum(float candEta, float candPhi, const HBHERecHitCollection *hbhe, const CaloGeometry *geometry, const HcalSeverityLevelComputer *hcalSevLvlAlgo=NULL, const HcalChannelQuality *dbHcalChStatus=NULL) const
const DetId & detid() const
Sin< T >::type sin(const T &t)
bool passCleaning_(const CaloRecHit *hit, const HcalSeverityLevelComputer *hcalSevLvlComp, const HcalChannelQuality *hcalChanStatus) const
Geom::Phi< T > phi() const
std::vector< T >::const_iterator const_iterator
const Item * getValues(DetId fId, bool throwOnFail=true) const
bool passMinEt_(float et, const HcalDetId id) const
Geom::Theta< T > theta() const
bool recoveredRecHit(const DetId &myid, const uint32_t &myflag) const
int hcalAcceptSeverityLevel_
int getSeverityLevel(const DetId &myid, const uint32_t &myflag, const uint32_t &mystatus) const
static int getEffectiveDepth(const HcalDetId id)
T1 deltaR2(T1 eta1, T2 phi1, T3 eta2, T4 phi2)
ESHandle< TrackerGeometry > geometry
bool acceptHit_(const HcalDetId id, const GlobalPoint &pos, const float hitEnergy, const float candEta, const float candPhi) const
uint32_t getValue() const
bool passMinE_(float energy, const HcalDetId id) const
bool useRecoveredHcalHits_