27 std::vector<edm::InputTag> srcLabels = iConfig.
getParameter<std::vector<edm::InputTag> >(
"srcLabels");
51 edm::LogError(
"AlCaECALRecHitReducerError") <<
"Size of eta/phi should be odd numbers";
103 auto miniEBRecHitCollection = std::make_unique<EBRecHitCollection>();
104 auto miniEERecHitCollection = std::make_unique<EERecHitCollection>();
107 std::set<DetId> reducedRecHit_EBmap;
108 std::set<DetId> reducedRecHit_EEmap;
112 auto reducedCaloClusterCollection = std::make_unique<reco::CaloClusterCollection>();
116 for (reco::PhotonCollection::const_iterator phoIt = phoHandle->begin(); phoIt != phoHandle->end(); phoIt++) {
128 for (; it != itend; ++it) {
130 reducedCaloClusterCollection->push_back(caloClus);
137 iEvent.getByToken(*iToken, eleViewHandle);
140 for (
auto eleIt = eleViewHandle->begin(); eleIt != eleViewHandle->end(); eleIt++) {
143 if (fabs(sc.
eta()) < 1.479) {
151 for (; it != itend; ++it) {
153 reducedCaloClusterCollection->push_back(caloClus);
159 for (reco::SuperClusterCollection::const_iterator SC_iter = EESCHandle->begin(); SC_iter != EESCHandle->end();
168 for (; it != itend; ++it) {
170 reducedCaloClusterCollection->push_back(caloClus);
175 for (std::set<DetId>::const_iterator itr = reducedRecHit_EBmap.begin(); itr != reducedRecHit_EBmap.end(); itr++) {
176 if (barrelHitsCollection->
find(*itr) != barrelHitsCollection->
end())
177 miniEBRecHitCollection->push_back(*(barrelHitsCollection->
find(*itr)));
180 for (std::set<DetId>::const_iterator itr = reducedRecHit_EEmap.begin(); itr != reducedRecHit_EEmap.end(); itr++) {
181 if (endcapHitsCollection->
find(*itr) != endcapHitsCollection->
end())
182 miniEERecHitCollection->push_back(*(endcapHitsCollection->
find(*itr)));
193 std::set<DetId>& reducedRecHitMap,
203 for (
unsigned int i = 0;
i < recHit_window.size();
i++) {
204 reducedRecHitMap.insert(recHit_window[
i]);
207 const std::vector<std::pair<DetId, float> >& scHits = sc.
hitsAndFractions();
208 for (
std::vector<std::pair<DetId, float> >::const_iterator scHit_itr = scHits.begin(); scHit_itr != scHits.end();
211 reducedRecHitMap.insert(scHit_itr->first);
T getParameter(std::string const &) const
const std::vector< std::pair< DetId, float > > & hitsAndFractions() const
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
producer
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
CaloCluster_iterator clustersBegin() const
fist iterator over BasicCluster constituents
T const * product() const
~AlCaECALRecHitReducer() override
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.
Log< level::Error, false > LogError
CaloCluster_iterator clustersEnd() const
last iterator over BasicCluster constituents
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
edm::ESGetToken< CaloTopology, CaloTopologyRecord > caloTopologyToken_
std::string alcaBarrelHitsCollection_
edm::EDGetTokenT< reco::SuperClusterCollection > EESuperClusterToken_
#define DEFINE_FWK_MODULE(type)
const_iterator end() const
AlCaECALRecHitReducer(const edm::ParameterSet &)
ctor
std::string alcaEndcapHitsCollection_
std::string alcaCaloClusterCollection_
const CaloClusterPtr & seed() const
seed BasicCluster
edm::EDGetTokenT< reco::PhotonCollection > photonToken_
iterator find(key_type k)
std::vector< edm::EDGetTokenT< edm::View< reco::RecoCandidate > > > eleViewTokens_
edm::EDGetTokenT< EcalRecHitCollection > eeRecHitsToken_
double eta() const
pseudorapidity of cluster centroid
void AddMiniRecHitCollection(const reco::SuperCluster &sc, std::set< DetId > &reducedRecHitMap, const CaloTopology *caloTopology) const
edm::EDGetTokenT< EcalRecHitCollection > ebRecHitsToken_