30 std::vector<edm::InputTag> srcLabels = iConfig.
getParameter< std::vector<edm::InputTag> >(
"srcLabels");
50 if ( phiSize_ % 2 == 0 || etaSize_ % 2 == 0)
51 edm::LogError(
"AlCaECALRecHitReducerError") <<
"Size of eta/phi should be odd numbers";
114 auto miniEBRecHitCollection = std::make_unique<EBRecHitCollection>();
115 auto miniEERecHitCollection = std::make_unique<EERecHitCollection>();
118 std::set<DetId> reducedRecHit_EBmap;
119 std::set<DetId> reducedRecHit_EEmap;
123 auto reducedCaloClusterCollection = std::make_unique<reco::CaloClusterCollection>();
127 for (reco::PhotonCollection::const_iterator phoIt=phoHandle->begin(); phoIt!=phoHandle->end(); phoIt++) {
139 for ( ; it !=itend; ++it) {
141 reducedCaloClusterCollection->push_back(caloClus);
151 for (
auto eleIt=eleViewHandle->begin(); eleIt!=eleViewHandle->end(); eleIt++) {
154 if (fabs(sc.
eta())<1.479) {
162 for ( ; it !=itend; ++it) {
164 reducedCaloClusterCollection->push_back(caloClus);
172 for(reco::SuperClusterCollection::const_iterator SC_iter = EESCHandle->begin();
173 SC_iter!=EESCHandle->end();
181 for ( ; it !=itend; ++it) {
183 reducedCaloClusterCollection->push_back(caloClus);
189 for(std::set<DetId>::const_iterator itr = reducedRecHit_EBmap.begin();
190 itr != reducedRecHit_EBmap.end(); itr++){
191 if (barrelHitsCollection->
find(*itr) != barrelHitsCollection->
end())
192 miniEBRecHitCollection->push_back(*(barrelHitsCollection->
find(*itr)));
195 for(std::set<DetId>::const_iterator itr = reducedRecHit_EEmap.begin();
196 itr != reducedRecHit_EEmap.end(); itr++){
197 if (endcapHitsCollection->
find(*itr) != endcapHitsCollection->
end())
198 miniEERecHitCollection->push_back(*(endcapHitsCollection->
find(*itr)));
210 std::set<DetId>& reducedRecHitMap,
220 std::vector<DetId> recHit_window = caloTopology->
getWindow(seed, phiSize, etaSize);
221 for(
unsigned int i =0;
i < recHit_window.size();
i++){
222 reducedRecHitMap.insert(recHit_window[
i]);
225 const std::vector< std::pair<DetId, float> > & scHits = sc.
hitsAndFractions();
226 for(std::vector< std::pair<DetId, float> >::const_iterator scHit_itr = scHits.begin();
227 scHit_itr != scHits.end(); scHit_itr++){
229 reducedRecHitMap.insert(scHit_itr->first);
T getParameter(std::string const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
virtual void produce(edm::Event &, const edm::EventSetup &)
producer
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
std::vector< EcalRecHit >::const_iterator const_iterator
const std::vector< std::pair< DetId, float > > & hitsAndFractions() const
double eta() const
pseudorapidity of cluster centroid
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
void AddMiniRecHitCollection(const reco::SuperCluster &sc, std::set< DetId > &reducedRecHitMap, const CaloTopology *caloTopology)
std::string alcaBarrelHitsCollection_
std::vector< DetId > getWindow(const DetId &id, const int &northSouthSize, const int &eastWestSize) const
Get the neighbors of the given cell in a window of given size.
edm::EDGetTokenT< reco::SuperClusterCollection > EESuperClusterToken_
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
std::vector< edm::EDGetTokenT< edm::View< reco::RecoCandidate > > > eleViewTokens_
const_iterator end() const
AlCaECALRecHitReducer(const edm::ParameterSet &)
ctor
T const * product() const
std::string alcaEndcapHitsCollection_
std::string alcaCaloClusterCollection_
edm::EDGetTokenT< reco::PhotonCollection > photonToken_
iterator find(key_type k)
edm::EDGetTokenT< EcalRecHitCollection > eeRecHitsToken_
CaloCluster_iterator clustersBegin() const
fist iterator over BasicCluster constituents
const CaloClusterPtr & seed() const
seed BasicCluster
T const * product() const
edm::EDGetTokenT< EcalRecHitCollection > ebRecHitsToken_
CaloCluster_iterator clustersEnd() const
last iterator over BasicCluster constituents