52 std::vector<CaloTowerDetId> towers;
53 std::vector<reco::CaloClusterPtr> orderedClusters;
66 for ( ; it !=itend; ++it) {
67 orderedClusters.push_back(*it);
70 unsigned nclusters=orderedClusters.size();
71 for (
unsigned iclus =0 ; iclus <nclusters && iclus <
NMaxClusters_; ++iclus) {
75 std:: cout <<
"CaloTowerId " <<
id << std::endl;
77 std::vector<CaloTowerDetId>::const_iterator itcheck=
find(towers.begin(),towers.end(),
id);
78 if( itcheck == towers.end() ) {
103 for( ; trItr != trItrEnd ; ++trItr){
104 std::vector<CaloTowerDetId>::const_iterator itcheck =
find(towers.begin(), towers.end(), trItr->id());
105 if( itcheck != towers.end() ) {
106 esum += trItr->ietaAbs()<18 || trItr->ietaAbs()>29 ? trItr->hadEnergy() : trItr->hadEnergyHeInnerLayer() ;
116 for( ; trItr != trItrEnd ; ++trItr){
117 std::vector<CaloTowerDetId>::const_iterator itcheck =
find(towers.begin(), towers.end(), trItr->id());
118 if( itcheck != towers.end() ) {
119 esum += trItr->hadEnergyHeOuterLayer();
130 std::cout <<
"DEBUG: hasActiveHcal called with " << towers.size()
131 <<
" detids. First tower detid ieta " << towers.front().ieta()
132 <<
" iphi " << towers.front().iphi() << std::endl;
134 for (
auto towerid : towers) {
135 unsigned int ngood = 0, nbad = 0;
143 std::cout <<
"EgammaHadTower DetId " << std::hex <<
id.rawId()
145 <<
" sub " << hid.
subdet() <<
" ieta " << hid.
ieta()
146 <<
" iphi " << hid.
iphi()
147 <<
" depth " << hid.
depth() << std::endl;
155 <<
" int value = " << status << std::endl;
158 if (status & statusMask) {
168 std::cout <<
" overall ngood " << ngood <<
" nbad " << nbad <<
"\n";
170 if (nbad == 0 || (ngood > 0 && nbad < ngood)) {
const CaloTowerCollection * towerCollection_
const HcalTopology * hcalTopology_
HcalSubdetector subdet() const
get the subdetector
const HcalChannelQuality * hcalQuality_
CaloTowerDetId towerOf(const reco::CaloCluster &cluster) const
constexpr uint32_t rawId() const
get the raw id
std::vector< CaloTower >::const_iterator const_iterator
const std::vector< std::pair< DetId, float > > & hitsAndFractions() const
const Item * getValues(DetId fId, bool throwOnFail=true) const
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
bool hasActiveHcal(const reco::SuperCluster &sc) const
std::vector< DetId > constituentsOf(const CaloTowerDetId &id) const
Get the constituent detids for this tower id ( not yet implemented )
void setTowerCollection(const CaloTowerCollection *towercollection)
int depth() const
get the tower depth
CaloTowerDetId towerOf(const DetId &id) const
Get the tower id for this det id (or null if not known)
double getDepth1HcalESum(const reco::SuperCluster &sc) const
int ieta() const
get the cell ieta
bool ClusterGreaterThan(const reco::CaloClusterPtr &c1, const reco::CaloClusterPtr &c2)
const_iterator end() const
int iphi() const
get the cell iphi
const CaloTowerConstituentsMap * towerMap_
DetId seed() const
return DetId of seed
std::vector< CaloTowerDetId > towersOf(const reco::SuperCluster &sc) const
double getDepth2HcalESum(const reco::SuperCluster &sc) const
CaloCluster_iterator clustersBegin() const
fist iterator over BasicCluster constituents
unsigned int NMaxClusters_
HcalDetId idFront(const HcalDetId &id) const
const CaloClusterPtr & seed() const
seed BasicCluster
uint32_t getValue() const
T const * product() const
EgammaHadTower(const edm::EventSetup &es, HoeMode mode=SingleTower)
const_iterator begin() const
CaloCluster_iterator clustersEnd() const
last iterator over BasicCluster constituents
constexpr Detector det() const
get the detector field from this detid