|
|
Go to the documentation of this file.
51 std::vector<CaloTowerDetId>
towers;
52 std::vector<reco::CaloClusterPtr> orderedClusters;
63 orderedClusters.push_back(*it);
65 std::sort(orderedClusters.begin(), orderedClusters.end(), [](
auto&
c1,
auto& c2) {
return (*
c1 > *c2); });
66 unsigned nclusters = orderedClusters.size();
67 for (
unsigned iclus = 0; iclus < nclusters && iclus <
nMaxClusters_; ++iclus) {
71 std::cout <<
"CaloTowerId " <<
id << std::endl;
99 esum +=
tower.ietaAbs() < 18 ||
tower.ietaAbs() > 29 ?
tower.hadEnergy() :
tower.hadEnergyHeInnerLayer();
110 esum +=
tower.hadEnergyHeOuterLayer();
121 std::cout <<
"DEBUG: hasActiveHcal called with " <<
towers.size() <<
" detids. First tower detid ieta "
122 <<
towers.front().ieta() <<
" iphi " <<
towers.front().iphi() << std::endl;
124 for (
auto towerid :
towers) {
125 unsigned int ngood = 0, nbad = 0;
134 std::cout <<
"EgammaHadTower DetId " << std::hex <<
id.rawId() <<
" hid.rawId " << hid.
rawId() <<
std::dec
135 <<
" sub " << hid.
subdet() <<
" ieta " << hid.
ieta() <<
" iphi " << hid.
iphi() <<
" depth "
136 << hid.
depth() << std::endl;
147 if (
status & statusMask) {
157 std::cout <<
" overall ngood " << ngood <<
" nbad " << nbad <<
"\n";
159 if (nbad == 0 || (ngood > 0 && nbad < ngood)) {
T const * product() const
HcalDetId idFront(const HcalDetId &id) const
unsigned int nMaxClusters_
std::vector< DetId > constituentsOf(const CaloTowerDetId &id) const
Get the constituent detids for this tower id ( not yet implemented )
constexpr int iphi() const
get the cell iphi
constexpr Detector det() const
get the detector field from this detid
EgammaHadTower(const edm::EventSetup &es, HoeMode mode=SingleTower)
constexpr int depth() const
get the tower depth
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
const Item * getValues(DetId fId, bool throwOnFail=true) const
bool hasActiveHcal(const std::vector< CaloTowerDetId > &towers) const
double getDepth2HcalESum(const std::vector< CaloTowerDetId > &towers, CaloTowerCollection const &) const
const HcalChannelQuality * hcalQuality_
uint32_t getValue() const
constexpr int ieta() const
get the cell ieta
const CaloClusterPtr & seed() const
seed BasicCluster
const std::vector< std::pair< DetId, float > > & hitsAndFractions() const
constexpr HcalSubdetector subdet() const
get the subdetector
CaloCluster_iterator clustersBegin() const
fist iterator over BasicCluster constituents
CaloTowerDetId towerOf(const DetId &id) const
Get the tower id for this det id (or null if not known)
DetId seed() const
return DetId of seed
std::vector< CaloTowerDetId > towersOf(const reco::SuperCluster &sc) const
constexpr uint32_t rawId() const
get the raw id
const CaloTowerConstituentsMap * towerMap_
double getDepth1HcalESum(const std::vector< CaloTowerDetId > &towers, CaloTowerCollection const &) const
CaloCluster_iterator clustersEnd() const
last iterator over BasicCluster constituents
const HcalTopology * hcalTopology_
CaloTowerDetId towerOf(const reco::CaloCluster &cluster) const