9 const std::vector<reco::CaloCluster>& layerClusters,
13 const float minEnergy,
14 const std::vector<DetId::Detector>& subDets,
18 const float minDR2 = minDR *
minDR;
19 const float maxDR2 = maxDR * maxDR;
21 for (
auto& clus : layerClusters) {
22 if (clus.energy() < minEnergy) {
26 if (
std::find(subDets.begin(), subDets.end(), clus.seed().det()) == subDets.end()) {
30 float clusEt = clus.energy() *
std::sin(clus.position().theta());
43 if (dR2 < minDR2 || dR2 > maxDR2) {
51 hadValue += clus.energy();
constexpr double deltaPhi(double phi1, double phi2)
Sin< T >::type sin(const T &t)
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
constexpr auto deltaR2(const T1 &t1, const T2 &t2) -> decltype(t1.eta())