35 if ( minimalPhiSize_ % 2 == 0 || minimalEtaSize_ % 2 == 0)
36 edm::LogError(
"InterestingDetIdFromSuperClusterProducerError") <<
"Size of eta/phi should be odd numbers";
75 std::vector<DetId> indexToStore;
76 indexToStore.reserve(1000);
78 reco::SuperClusterCollection::const_iterator sclusIt;
80 std::vector<DetId> xtalsToStore;
81 xtalsToStore.reserve(50);
84 for (sclusIt=pClusters->begin(); sclusIt!=pClusters->end(); sclusIt++) {
92 std::vector<std::pair<DetId,float> > clusterDetIds = (*clusIt)->hitsAndFractions();
93 std::vector<std::pair<DetId,float> >::iterator posCurrent;
97 for(posCurrent = clusterDetIds.begin(); posCurrent != clusterDetIds.end(); posCurrent++)
100 if ((!((*posCurrent).first.null())) && (itt != recHitsHandle->
end()) && ((*itt).energy() >
eMax) )
102 eMax = (*itt).energy();
103 eMaxId = (*itt).id();
113 std::vector<std::pair<DetId,float > > xtalsInClus=(*clusIt)->hitsAndFractions();
115 for (
unsigned int ii=0;
ii<xtalsInClus.size();
ii++)
117 xtalsToStore.push_back(xtalsInClus[
ii].
first);
120 indexToStore.insert(indexToStore.end(),xtalsToStore.begin(),xtalsToStore.end());
129 indexToStore.push_back(it->id());
135 indexToStore.push_back(it->id());
140 indexToStore.push_back(it->id());
148 if (
abs(ebid.ieta())== 85)
149 indexToStore.push_back(it->id());
153 indexToStore.push_back(it->id());
161 std::sort(indexToStore.begin(),indexToStore.end());
162 std::unique(indexToStore.begin(),indexToStore.end());
164 auto detIdCollection = std::make_unique<DetIdCollection>(indexToStore);
T getParameter(std::string const &) const
const EcalSeverityLevelAlgo * severity_
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.
CaloTopology const * topology(0)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
constexpr bool null() const
is this a null id ?
std::vector< EcalRecHit >::const_iterator const_iterator
edm::EDGetTokenT< EcalRecHitCollection > recHitsToken_
def unique(seq, keepstr=True)
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_
const_iterator end() const
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_
const CaloSubdetectorTopology * getSubdetectorTopology(const DetId &id) const
access the subdetector Topology for the given subdetector directly
iterator find(key_type k)
T const * product() const
const_iterator begin() const
constexpr Detector det() const
get the detector field from this detid