78 produces<EcalRecHitCollection>(
"EcalRecHitsEB");
79 produces<EcalRecHitCollection>(
"EcalRecHitsEE");
80 produces<HBHERecHitCollection>();
87 ecalebhits_token = consumes<EcalRecHitCollection>(it_EBRecHits);
88 ecaleehits_token = consumes<EcalRecHitCollection>(it_EERecHits);
89 hbhehits_token = consumes<HBHERecHitCollection>(it_HBHERecHits);
91 globalhalo_token = consumes<GlobalHaloData>(it_GlobalHaloData);
106 using namespace reco;
110 iEvent.getByToken(ecalebhits_token, ebrhitsuncleaned);
113 iEvent.getByToken(ecaleehits_token, eerhitsuncleaned);
116 iEvent.getByToken(hbhehits_token, hbherhitsuncleaned);
120 iEvent.getByToken(globalhalo_token, TheGlobalHaloData);
127 auto ebrhitscleaned = std::make_unique<EcalRecHitCollection>();
128 for (
unsigned int i = 0;
i < ebrhitsuncleaned->
size();
i++) {
132 for (
unsigned int j = 0;
j < refbeamhalorechits.
size();
j++) {
133 const EcalRecHit& rhitbeamhalo = *(refbeamhalorechits)[
j];
140 ebrhitscleaned->push_back(rhit);
144 auto eerhitscleaned = std::make_unique<EcalRecHitCollection>();
145 for (
unsigned int i = 0;
i < eerhitsuncleaned->
size();
i++) {
149 for (
unsigned int j = 0;
j < refbeamhalorechits.
size();
j++) {
150 const EcalRecHit& rhitbeamhalo = *(refbeamhalorechits)[
j];
157 eerhitscleaned->push_back(rhit);
161 auto hbherhitscleaned = std::make_unique<HBHERecHitCollection>();
162 for (
unsigned int i = 0;
i < hbherhitsuncleaned->
size();
i++) {
166 for (
unsigned int j = 0;
j < refbeamhalorechits.
size();
j++) {
167 const HBHERecHit& rhitbeamhalo = *(refbeamhalorechits)[
j];
174 hbherhitscleaned->push_back(rhit);
189 desc.add<
bool>(
"IsHLT",
false);
190 descriptions.
add(
"caloRecHitsBeamHaloCleaned",
desc);
T getParameter(std::string const &) const
constexpr const DetId & detid() const
edm::InputTag it_GlobalHaloData
~CaloRecHitsBeamHaloCleaned() override
CaloRecHitsBeamHaloCleaned(const edm::ParameterSet &)
edm::InputTag it_HBHERecHits
edm::InputTag it_EBRecHits
edm::RefVector< HBHERecHitCollection > & GetHBHERechits()
edm::InputTag it_EERecHits
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
#define DEFINE_FWK_MODULE(type)
edm::EDGetTokenT< GlobalHaloData > globalhalo_token
size_type size() const
Size of the RefVector.
edm::EDGetTokenT< EcalRecHitCollection > ecalebhits_token
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void produce(edm::Event &, const edm::EventSetup &) override
void add(std::string const &label, ParameterSetDescription const &psetDescription)
const DetId & detid() const
edm::RefVector< EcalRecHitCollection > & GetEBRechits()
edm::EDGetTokenT< HBHERecHitCollection > hbhehits_token
edm::RefVector< EcalRecHitCollection > & GetEERechits()
edm::EDGetTokenT< EcalRecHitCollection > ecaleehits_token