51 std::vector<CaloTowerDetId>
towers;
52 std::vector<reco::CaloClusterPtr> orderedClusters;
65 for (; it != itend; ++it) {
66 orderedClusters.push_back(*it);
69 unsigned nclusters = orderedClusters.size();
70 for (
unsigned iclus = 0; iclus < nclusters && iclus <
NMaxClusters_; ++iclus) {
74 std::cout <<
"CaloTowerId " <<
id << std::endl;
76 std::vector<CaloTowerDetId>::const_iterator itcheck =
find(towers.begin(), towers.end(),
id);
77 if (itcheck == towers.end()) {
102 for (; trItr != trItrEnd; ++trItr) {
103 std::vector<CaloTowerDetId>::const_iterator itcheck =
find(towers.begin(), towers.end(), trItr->id());
104 if (itcheck != towers.end()) {
105 esum += trItr->ietaAbs() < 18 || trItr->ietaAbs() > 29 ? trItr->hadEnergy() : trItr->hadEnergyHeInnerLayer();
115 for (; trItr != trItrEnd; ++trItr) {
116 std::vector<CaloTowerDetId>::const_iterator itcheck =
find(towers.begin(), towers.end(), trItr->id());
117 if (itcheck != towers.end()) {
118 esum += trItr->hadEnergyHeOuterLayer();
129 std::cout <<
"DEBUG: hasActiveHcal called with " << towers.size() <<
" detids. First tower detid ieta " 130 << towers.front().ieta() <<
" iphi " << towers.front().iphi() << std::endl;
132 for (
auto towerid : towers) {
133 unsigned int ngood = 0, nbad = 0;
142 std::cout <<
"EgammaHadTower DetId " << std::hex <<
id.rawId() <<
" hid.rawId " << hid.
rawId() <<
std::dec 143 <<
" sub " << hid.
subdet() <<
" ieta " << hid.
ieta() <<
" iphi " << hid.
iphi() <<
" depth " 144 << hid.
depth() << std::endl;
152 std::cout <<
"channels status = " << std::hex << status <<
std::dec <<
" int value = " << status << std::endl;
155 if (status & statusMask) {
165 std::cout <<
" overall ngood " << ngood <<
" nbad " << nbad <<
"\n";
167 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 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
const std::vector< std::pair< DetId, float > > & hitsAndFractions() const
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