86 edm::LogError(
"InterestingDetIdFromSuperClusterProducerError") <<
"Size of eta/phi should be odd numbers";
95 nextToDeadToken_ = esConsumes<EcalNextToDeadChannel, EcalNextToDeadChannelRcd>();
118 std::vector<DetId> indexToStore;
119 indexToStore.reserve(1000);
121 reco::SuperClusterCollection::const_iterator sclusIt;
123 std::vector<DetId> xtalsToStore;
124 xtalsToStore.reserve(50);
127 for (sclusIt = pClusters->begin(); sclusIt != pClusters->end(); sclusIt++) {
135 std::vector<std::pair<DetId, float> > clusterDetIds = (*clusIt)->hitsAndFractions();
136 std::vector<std::pair<DetId, float> >::iterator posCurrent;
140 for (posCurrent = clusterDetIds.begin(); posCurrent != clusterDetIds.end(); posCurrent++) {
142 if ((!((*posCurrent).first.null())) && (itt != recHitsHandle->
end()) && ((*itt).energy() >
eMax)) {
143 eMax = (*itt).energy();
144 eMaxId = (*itt).id();
154 std::vector<std::pair<DetId, float> > xtalsInClus = (*clusIt)->hitsAndFractions();
156 for (
unsigned int ii = 0;
ii < xtalsInClus.size();
ii++) {
157 xtalsToStore.push_back(xtalsInClus[
ii].
first);
160 indexToStore.insert(indexToStore.end(), xtalsToStore.begin(), xtalsToStore.end());
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());
195 std::sort(indexToStore.begin(), indexToStore.end());
196 std::unique(indexToStore.begin(), indexToStore.end());
198 auto detIdCollection = std::make_unique<DetIdCollection>(indexToStore);
edm::ESGetToken< CaloTopology, CaloTopologyRecord > caloTopologyToken_
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
edm::EDGetTokenT< EcalRecHitCollection > recHitsToken_
constexpr bool null() const
is this a null id ?
def unique(seq, keepstr=True)
Abs< T >::type abs(const T &t)
static bool isNextToRingBoundary(EEDetId id)
#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
std::string interestingDetIdCollection_
edm::ESGetToken< EcalNextToDeadChannel, EcalNextToDeadChannelRcd > nextToDeadToken_
const_iterator end() const
InterestingDetIdFromSuperClusterProducer(const edm::ParameterSet &)
ctor
edm::EDGetTokenT< reco::SuperClusterCollection > superClustersToken_
iterator find(key_type k)
edm::ESGetToken< EcalSeverityLevelAlgo, EcalSeverityLevelAlgoRcd > severityLevelToken_
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
producer