82 sevLVToken_ = esConsumes<EcalSeverityLevelAlgo, EcalSeverityLevelAlgoRcd>();
83 nextToDeadToken_ = esConsumes<EcalNextToDeadChannel, EcalNextToDeadChannelRcd>();
90 edm::LogError(
"InterestingDetIdCollectionProducerError") <<
"Size of eta/phi should be odd numbers";
120 std::vector<DetId> indexToStore;
121 indexToStore.reserve(1000);
123 reco::BasicClusterCollection::const_iterator clusIt;
125 std::vector<DetId> xtalsToStore;
126 xtalsToStore.reserve(50);
127 for (clusIt = pClusters->begin(); clusIt != pClusters->end(); clusIt++) {
128 const std::vector<std::pair<DetId, float> >& clusterDetIds = clusIt->hitsAndFractions();
129 for (
const auto& detidpair : clusterDetIds) {
130 indexToStore.push_back(detidpair.first);
134 if (clusterDetIds.front().first.subdetId() ==
EcalBarrel || clusterDetIds.front().first.subdetId() ==
EcalEndcap) {
135 std::vector<std::pair<DetId, float> >::const_iterator posCurrent;
142 for (posCurrent = clusterDetIds.begin(); posCurrent != clusterDetIds.end(); posCurrent++) {
144 if ((!((*posCurrent).first.null())) && (itt != recHitsHandle->
end()) && ((*itt).energy() >
eMax)) {
145 eMax = (*itt).energy();
146 eMaxId = (*itt).id();
157 for (
const auto&
detid : xtalsToStore) {
158 indexToStore.push_back(
detid);
167 indexToStore.push_back(
it->id());
171 indexToStore.push_back(
it->id());
177 indexToStore.push_back(
it->id());
185 if (
abs(ebid.ieta()) == 85)
186 indexToStore.push_back(
it->id());
189 indexToStore.push_back(
it->id());
196 std::sort(indexToStore.begin(), indexToStore.end());
197 std::unique(indexToStore.begin(), indexToStore.end());
edm::ESGetToken< EcalNextToDeadChannel, EcalNextToDeadChannelRcd > nextToDeadToken_
T getParameter(std::string const &) const
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
std::vector< EcalRecHit >::const_iterator const_iterator
Log< level::Error, false > LogError
constexpr Detector det() const
get the detector field from this detid
constexpr bool null() const
is this a null id ?
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
producer
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
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
const_iterator end() const
iterator find(key_type k)
std::string interestingDetIdCollection_
edm::EDGetTokenT< reco::BasicClusterCollection > basicClustersToken_
edm::ESGetToken< CaloTopology, CaloTopologyRecord > caloTopologyToken_