36 if ( minimalPhiSize_ % 2 == 0 || minimalEtaSize_ % 2 == 0)
37 edm::LogError(
"InterestingDetIdCollectionProducerError") <<
"Size of eta/phi should be odd numbers";
79 std::vector<DetId> indexToStore;
80 indexToStore.reserve(1000);
82 reco::BasicClusterCollection::const_iterator clusIt;
84 std::vector<DetId> xtalsToStore;
85 xtalsToStore.reserve(50);
86 for (clusIt=pClusters->begin(); clusIt!=pClusters->end(); clusIt++) {
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) )
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());
128 indexToStore.push_back(it->id());
134 indexToStore.push_back(it->id());
139 indexToStore.push_back(it->id());
147 if (
abs(ebid.ieta())== 85)
148 indexToStore.push_back(it->id());
152 indexToStore.push_back(it->id());
160 std::sort(indexToStore.begin(),indexToStore.end());
161 std::unique(indexToStore.begin(),indexToStore.end());
163 std::auto_ptr< DetIdCollection > detIdCollection (
new DetIdCollection(indexToStore) ) ;
T getParameter(std::string const &) const
virtual void produce(edm::Event &, const edm::EventSetup &)
producer
~InterestingDetIdCollectionProducer()
std::vector< EcalRecHit >::const_iterator const_iterator
const EcalSeverityLevelAlgo * severity_
virtual void beginRun(edm::Run const &, const edm::EventSetup &) overridefinal
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
static bool isNextToRingBoundary(EEDetId id)
InterestingDetIdCollectionProducer(const edm::ParameterSet &)
ctor
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
edm::InputTag recHitsLabel_
virtual std::vector< DetId > getWindow(const DetId &id, const int &northSouthSize, const int &eastWestSize) const
bool null() const
is this a null id ?
T const * product() const
const CaloSubdetectorTopology * getSubdetectorTopology(const DetId &id) const
access the subdetector Topology for the given subdetector directly
edm::InputTag basicClusters_
const CaloTopology * caloTopology_
std::string interestingDetIdCollection_
edm::EDCollection< DetId > DetIdCollection
Detector det() const
get the detector field from this detid
EcalSeverityLevel::SeverityLevel severityLevel(const DetId &id, const EcalRecHitCollection &rhs) const
Evaluate status from id.