13 #include <Math/VectorUtil.h>
41 extRadius_(extRadius),
42 intRadius_(intRadius),
46 theCaloGeom_(theCaloGeom) ,
49 useNumCrystals_(
false),
50 vetoClustered_(
false),
53 severityLevelCut_(-1),
79 theCaloPosition.y () ,
80 theCaloPosition.z () );
81 double etaclus = pclu.
eta();
82 double phiclus = pclu.phi();
86 std::vector< std::pair<DetId, float> >::const_iterator rhIt;
89 for(
int subdetnr=0; subdetnr<=1 ; subdetnr++){
92 for (CaloSubdetectorGeometry::DetIdSet::const_iterator
i = chosen.begin ();
i!= chosen.end ();++
i){
97 double eta = position.
eta();
98 double phi = position.
phi();
99 double etaDiff = eta - etaclus;
104 if( fabs(etaclus) < 1.479 ) {
105 if ( fabs(etaDiff) < 0.0174*
etaSlice_)
continue;
106 if (
sqrt(etaDiff*etaDiff + phiDiff*phiDiff) < 0.0174*intRadius_)
continue;
108 if ( fabs(etaDiff) < 0.00864*fabs(sinh(eta))*
etaSlice_)
continue;
109 if (
sqrt(etaDiff*etaDiff + phiDiff*phiDiff) < 0.00864*fabs(sinh(eta))*intRadius_)
continue;
112 if ( fabs(etaDiff) <
etaSlice_)
continue;
113 if ( etaDiff*etaDiff + phiDiff*phiDiff < r2)
continue;
120 bool isClustered =
false;
122 for(rhIt = (*bcIt)->hitsAndFractions().begin();rhIt != (*bcIt)->hitsAndFractions().end(); ++rhIt) {
123 if( rhIt->first == *
i ) isClustered =
true;
124 if( isClustered )
break;
126 if( isClustered )
break;
129 if(isClustered)
continue;
161 double et = energy*position.
perp()/position.
mag();
163 if(returnEt) energySum+=et;
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
std::set< DetId > DetIdSet
const CaloSubdetectorGeometry * subdet_[2]
edm::ESHandle< CaloGeometry > theCaloGeom_
CaloRecHitMetaCollectionV * caloHits_
const DetId & detid() const
Geom::Phi< T > phi() const
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
static int position[TOTALCHAMBERS][3]
double getSum_(const reco::Candidate *, bool returnEt) const
EcalSeverityLevel severityLevel(const DetId &id, const EcalRecHitCollection &rhs) const
Evaluate status from id.
virtual DetIdSet getCells(const GlobalPoint &r, double dR) const
Get a list of all cells within a dR of the given cell.
EgammaRecHitIsolation(double extRadius, double intRadius, double etaSlice, double etLow, double eLow, edm::ESHandle< CaloGeometry >, CaloRecHitMetaCollectionV *, const EcalSeverityLevelAlgo *, DetId::Detector detector)
const EcalRecHitCollection * ecalBarHits_
double deltaPhi(double phi1, double phi2)
XYZPointD XYZPoint
point in space with cartesian internal representation
std::vector< int > v_chstatus_
T const * product() const
T get() const
get a component
const EcalSeverityLevelAlgo * sevLevel_
double energySum(const DataFrame &df, int fs, int ls)
T const * get() const
Returns C++ pointer to the item.