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";
112 auto miniEBRecHitCollection = std::make_unique<EBRecHitCollection>();
113 auto miniEERecHitCollection = std::make_unique<EERecHitCollection>();
116 std::set<DetId> reducedRecHit_EBmap;
117 std::set<DetId> reducedRecHit_EEmap;
121 auto reducedCaloClusterCollection = std::make_unique<reco::CaloClusterCollection>();
125 for (reco::PhotonCollection::const_iterator phoIt=phoHandle->begin(); phoIt!=phoHandle->end(); phoIt++) {
137 for ( ; it !=itend; ++it) {
139 reducedCaloClusterCollection->push_back(caloClus);
149 for (
auto eleIt=eleViewHandle->begin(); eleIt!=eleViewHandle->end(); eleIt++) {
152 if (fabs(sc.
eta())<1.479) {
160 for ( ; it !=itend; ++it) {
162 reducedCaloClusterCollection->push_back(caloClus);
170 for(reco::SuperClusterCollection::const_iterator SC_iter = EESCHandle->begin();
171 SC_iter!=EESCHandle->end();
179 for ( ; it !=itend; ++it) {
181 reducedCaloClusterCollection->push_back(caloClus);
187 for(std::set<DetId>::const_iterator itr = reducedRecHit_EBmap.begin();
188 itr != reducedRecHit_EBmap.end(); itr++){
189 if (barrelHitsCollection->
find(*itr) != barrelHitsCollection->
end())
190 miniEBRecHitCollection->push_back(*(barrelHitsCollection->
find(*itr)));
193 for(std::set<DetId>::const_iterator itr = reducedRecHit_EEmap.begin();
194 itr != reducedRecHit_EEmap.end(); itr++){
195 if (endcapHitsCollection->
find(*itr) != endcapHitsCollection->
end())
196 miniEERecHitCollection->push_back(*(endcapHitsCollection->
find(*itr)));
208 std::set<DetId>& reducedRecHitMap,
218 std::vector<DetId> recHit_window = caloTopology->
getWindow(seed, phiSize, etaSize);
219 for(
unsigned int i =0;
i < recHit_window.size();
i++){
220 reducedRecHitMap.insert(recHit_window[
i]);
223 const std::vector< std::pair<DetId, float> > & scHits = sc.
hitsAndFractions();
224 for(std::vector< std::pair<DetId, float> >::const_iterator scHit_itr = scHits.begin();
225 scHit_itr != scHits.end(); scHit_itr++){
227 reducedRecHitMap.insert(scHit_itr->first);
T getParameter(std::string const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
~AlCaECALRecHitReducer() override
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_
#define DEFINE_FWK_MODULE(type)
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.
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
edm::EDGetTokenT< reco::SuperClusterCollection > EESuperClusterToken_
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
void produce(edm::Event &, const edm::EventSetup &) override
producer
T const * product() const
edm::EDGetTokenT< EcalRecHitCollection > ebRecHitsToken_
CaloCluster_iterator clustersEnd() const
last iterator over BasicCluster constituents