84 caloTopologyToken_ = esConsumes<CaloTopology, CaloTopologyRecord, edm::Transition::BeginRun>();
85 sevLVToken_ = esConsumes<EcalSeverityLevelAlgo, EcalSeverityLevelAlgoRcd, edm::Transition::BeginRun>();
86 nextToDeadToken_ = esConsumes<EcalNextToDeadChannel, EcalNextToDeadChannelRcd>();
93 edm::LogError(
"InterestingDetIdCollectionProducerError") <<
"Size of eta/phi should be odd numbers";
125 std::vector<DetId> indexToStore;
126 indexToStore.reserve(1000);
128 reco::BasicClusterCollection::const_iterator clusIt;
130 std::vector<DetId> xtalsToStore;
131 xtalsToStore.reserve(50);
132 for (clusIt = pClusters->begin(); clusIt != pClusters->end(); clusIt++) {
133 const std::vector<std::pair<DetId, float> >& clusterDetIds = clusIt->hitsAndFractions();
134 for (
const auto& detidpair : clusterDetIds) {
135 indexToStore.push_back(detidpair.first);
139 if (clusterDetIds.front().first.subdetId() ==
EcalBarrel || clusterDetIds.front().first.subdetId() ==
EcalEndcap) {
140 std::vector<std::pair<DetId, float> >::const_iterator posCurrent;
147 for (posCurrent = clusterDetIds.begin(); posCurrent != clusterDetIds.end(); posCurrent++) {
149 if ((!((*posCurrent).first.null())) && (itt != recHitsHandle->
end()) && ((*itt).energy() >
eMax)) {
150 eMax = (*itt).energy();
151 eMaxId = (*itt).id();
162 for (
const auto& detid : xtalsToStore) {
163 indexToStore.push_back(detid);
172 indexToStore.push_back(it->id());
176 indexToStore.push_back(it->id());
182 indexToStore.push_back(it->id());
190 if (
abs(ebid.ieta()) == 85)
191 indexToStore.push_back(it->id());
194 indexToStore.push_back(it->id());
201 std::sort(indexToStore.begin(), indexToStore.end());
202 std::unique(indexToStore.begin(), indexToStore.end());
edm::ESGetToken< EcalNextToDeadChannel, EcalNextToDeadChannelRcd > nextToDeadToken_
T getParameter(std::string const &) const
std::vector< EcalRecHit >::const_iterator const_iterator
const EcalSeverityLevelAlgo * severity_
Log< level::Error, false > LogError
constexpr Detector det() const
get the detector field from this detid
EcalSeverityLevel::SeverityLevel severityLevel(const DetId &id) const
Evaluate status from id use channelStatus from DB.
constexpr bool null() const
is this a null id ?
T const * product() const
def unique(seq, keepstr=True)
Abs< T >::type abs(const T &t)
static bool isNextToRingBoundary(EEDetId id)
edm::EDGetTokenT< EcalRecHitCollection > recHitsToken_
InterestingDetIdCollectionProducer(const edm::ParameterSet &)
ctor
edm::ESGetToken< EcalSeverityLevelAlgo, EcalSeverityLevelAlgoRcd > sevLVToken_
#define DEFINE_FWK_MODULE(type)
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
const_iterator begin() const
virtual std::vector< DetId > getWindow(const DetId &id, const int &northSouthSize, const int &eastWestSize) const
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
const_iterator end() const
void produce(edm::Event &, const edm::EventSetup &) override
producer
const CaloSubdetectorTopology * getSubdetectorTopology(const DetId &id) const
access the subdetector Topology for the given subdetector directly
iterator find(key_type k)
const CaloTopology * caloTopology_
std::string interestingDetIdCollection_
void beginRun(edm::Run const &, const edm::EventSetup &) final
edm::EDGetTokenT< reco::BasicClusterCollection > basicClustersToken_
edm::ESGetToken< CaloTopology, CaloTopologyRecord > caloTopologyToken_