35 if ( minimalPhiSize_ % 2 == 0 || minimalEtaSize_ % 2 == 0)
36 edm::LogError(
"InterestingDetIdCollectionProducerError") <<
"Size of eta/phi should be odd numbers";
75 std::vector<DetId> indexToStore;
76 indexToStore.reserve(1000);
78 reco::BasicClusterCollection::const_iterator clusIt;
80 std::vector<DetId> xtalsToStore;
81 xtalsToStore.reserve(50);
82 for (clusIt=pClusters->begin(); clusIt!=pClusters->end(); clusIt++) {
83 const std::vector<std::pair<DetId,float> > &clusterDetIds = clusIt->hitsAndFractions();
84 for (
const auto &detidpair : clusterDetIds) {
85 indexToStore.push_back(detidpair.first);
89 if (clusterDetIds.front().first.subdetId()==
EcalBarrel || clusterDetIds.front().first.subdetId()==
EcalEndcap) {
90 std::vector<std::pair<DetId,float> >::const_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();
114 for (
const auto &detid : xtalsToStore) {
115 indexToStore.push_back(detid);
126 indexToStore.push_back(it->id());
132 indexToStore.push_back(it->id());
137 indexToStore.push_back(it->id());
145 if (
abs(ebid.ieta())== 85)
146 indexToStore.push_back(it->id());
150 indexToStore.push_back(it->id());
159 std::sort(indexToStore.begin(),indexToStore.end());
160 std::unique(indexToStore.begin(),indexToStore.end());
T getParameter(std::string const &) const
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.
CaloTopology const * topology(0)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::vector< EcalRecHit >::const_iterator const_iterator
const EcalSeverityLevelAlgo * severity_
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
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
const_iterator end() const
void produce(edm::Event &, const edm::EventSetup &) override
producer
virtual std::vector< DetId > getWindow(const DetId &id, const int &northSouthSize, const int &eastWestSize) const
bool null() const
is this a null id ?
const CaloSubdetectorTopology * getSubdetectorTopology(const DetId &id) const
access the subdetector Topology for the given subdetector directly
iterator find(key_type k)
const CaloTopology * caloTopology_
std::string interestingDetIdCollection_
void beginRun(edm::Run const &, const edm::EventSetup &) final
Detector det() const
get the detector field from this detid
T const * product() const
const_iterator begin() const
edm::EDGetTokenT< reco::BasicClusterCollection > basicClustersToken_