84 caloTopologyToken_ = esConsumes<CaloTopology, CaloTopologyRecord, edm::Transition::BeginRun>();
85 sevLVToken_ = esConsumes<EcalSeverityLevelAlgo, EcalSeverityLevelAlgoRcd, edm::Transition::BeginRun>();
86 nextToDeadToken_ = esConsumes<EcalNextToDeadChannel, EcalNextToDeadChannelRcd>();
92 if (minimalPhiSize_ % 2 == 0 || minimalEtaSize_ % 2 == 0)
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)) {
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_
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
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
const EcalSeverityLevelAlgo * severity_
Log< level::Error, false > LogError
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)
edm::EDGetTokenT< EcalRecHitCollection > recHitsToken_
InterestingDetIdCollectionProducer(const edm::ParameterSet &)
ctor
edm::ESGetToken< EcalSeverityLevelAlgo, EcalSeverityLevelAlgoRcd > sevLVToken_
void produce(edm::Event &, const edm::EventSetup &) override
producer
virtual std::vector< DetId > getWindow(const DetId &id, const int &northSouthSize, const int &eastWestSize) const
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
const CaloTopology * caloTopology_
std::string interestingDetIdCollection_
void beginRun(edm::Run const &, const edm::EventSetup &) final
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
edm::EDGetTokenT< reco::BasicClusterCollection > basicClustersToken_
edm::ESGetToken< CaloTopology, CaloTopologyRecord > caloTopologyToken_
constexpr Detector det() const
get the detector field from this detid