82 caloTopologyToken_ = esConsumes<CaloTopology, CaloTopologyRecord, edm::Transition::BeginRun>();
83 severityLevelToken_ = esConsumes<EcalSeverityLevelAlgo, EcalSeverityLevelAlgoRcd, edm::Transition::BeginRun>();
89 edm::LogError(
"InterestingDetIdFromSuperClusterProducerError") <<
"Size of eta/phi should be odd numbers";
98 nextToDeadToken_ = esConsumes<EcalNextToDeadChannel, EcalNextToDeadChannelRcd>();
124 std::vector<DetId> indexToStore;
125 indexToStore.reserve(1000);
127 reco::SuperClusterCollection::const_iterator sclusIt;
129 std::vector<DetId> xtalsToStore;
130 xtalsToStore.reserve(50);
133 for (sclusIt = pClusters->begin(); sclusIt != pClusters->end(); sclusIt++) {
141 std::vector<std::pair<DetId, float> > clusterDetIds = (*clusIt)->hitsAndFractions();
142 std::vector<std::pair<DetId, float> >::iterator posCurrent;
146 for (posCurrent = clusterDetIds.begin(); posCurrent != clusterDetIds.end(); posCurrent++) {
148 if ((!((*posCurrent).first.null())) && (itt != recHitsHandle->
end()) && ((*itt).energy() >
eMax)) {
149 eMax = (*itt).energy();
150 eMaxId = (*itt).id();
160 std::vector<std::pair<DetId, float> > xtalsInClus = (*clusIt)->hitsAndFractions();
162 for (
unsigned int ii = 0;
ii < xtalsInClus.size();
ii++) {
163 xtalsToStore.push_back(xtalsInClus[
ii].
first);
166 indexToStore.insert(indexToStore.end(), xtalsToStore.begin(), xtalsToStore.end());
173 indexToStore.push_back(it->id());
177 indexToStore.push_back(it->id());
183 indexToStore.push_back(it->id());
191 if (
abs(ebid.ieta()) == 85)
192 indexToStore.push_back(it->id());
195 indexToStore.push_back(it->id());
201 std::sort(indexToStore.begin(), indexToStore.end());
202 std::unique(indexToStore.begin(), indexToStore.end());
204 auto detIdCollection = std::make_unique<DetIdCollection>(indexToStore);
const EcalSeverityLevelAlgo * severity_
edm::ESGetToken< CaloTopology, CaloTopologyRecord > caloTopologyToken_
T getParameter(std::string const &) const
void beginRun(edm::Run const &, const edm::EventSetup &) final
std::vector< EcalRecHit >::const_iterator const_iterator
Log< level::Error, false > LogError
constexpr Detector det() const
get the detector field from this detid
edm::EDGetTokenT< EcalRecHitCollection > recHitsToken_
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)
void produce(edm::Event &, const edm::EventSetup &) override
producer
#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
std::string interestingDetIdCollection_
edm::ESGetToken< EcalNextToDeadChannel, EcalNextToDeadChannelRcd > nextToDeadToken_
const_iterator end() const
const CaloTopology * caloTopology_
InterestingDetIdFromSuperClusterProducer(const edm::ParameterSet &)
ctor
const CaloSubdetectorTopology * getSubdetectorTopology(const DetId &id) const
access the subdetector Topology for the given subdetector directly
edm::EDGetTokenT< reco::SuperClusterCollection > superClustersToken_
iterator find(key_type k)
edm::ESGetToken< EcalSeverityLevelAlgo, EcalSeverityLevelAlgoRcd > severityLevelToken_