82 caloTopologyToken_ = esConsumes<CaloTopology, CaloTopologyRecord, edm::Transition::BeginRun>();
83 severityLevelToken_ = esConsumes<EcalSeverityLevelAlgo, EcalSeverityLevelAlgoRcd, edm::Transition::BeginRun>();
88 if (minimalPhiSize_ % 2 == 0 || minimalEtaSize_ % 2 == 0)
89 edm::LogError(
"InterestingDetIdFromSuperClusterProducerError") <<
"Size of eta/phi should be odd numbers";
97 if (keepNextToDead_) {
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)) {
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_
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
void beginRun(edm::Run const &, const edm::EventSetup &) final
EcalSeverityLevel::SeverityLevel severityLevel(const DetId &id) const
Evaluate status from id use channelStatus from DB.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
constexpr bool null() const
is this a null id ?
#define DEFINE_FWK_MODULE(type)
std::vector< EcalRecHit >::const_iterator const_iterator
Log< level::Error, false > LogError
edm::EDGetTokenT< EcalRecHitCollection > recHitsToken_
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
Abs< T >::type abs(const T &t)
static bool isNextToRingBoundary(EEDetId id)
void produce(edm::Event &, const edm::EventSetup &) override
producer
std::string interestingDetIdCollection_
edm::ESGetToken< EcalNextToDeadChannel, EcalNextToDeadChannelRcd > nextToDeadToken_
const CaloTopology * caloTopology_
InterestingDetIdFromSuperClusterProducer(const edm::ParameterSet &)
ctor
virtual std::vector< DetId > getWindow(const DetId &id, const int &northSouthSize, const int &eastWestSize) const
edm::EDGetTokenT< reco::SuperClusterCollection > superClustersToken_
T const * product() const
T getParameter(std::string const &) const
const CaloSubdetectorTopology * getSubdetectorTopology(const DetId &id) const
access the subdetector Topology for the given subdetector directly
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
edm::ESGetToken< EcalSeverityLevelAlgo, EcalSeverityLevelAlgoRcd > severityLevelToken_
constexpr Detector det() const
get the detector field from this detid