85 produces<EcalRecHitCollection>(
"EcalRecHitsEB");
86 produces<EcalRecHitCollection>(
"EcalRecHitsEE");
87 produces<HBHERecHitCollection>();
96 ecalebhits_token= consumes<EcalRecHitCollection>(it_EBRecHits);
97 ecaleehits_token= consumes<EcalRecHitCollection>(it_EERecHits);
98 hbhehits_token= consumes<HBHERecHitCollection>(it_HBHERecHits);
100 globalhalo_token=consumes<GlobalHaloData>(it_GlobalHaloData);
122 using namespace reco;
127 iEvent.
getByToken(ecalebhits_token, ebrhitsuncleaned );
130 iEvent.
getByToken(ecaleehits_token, eerhitsuncleaned );
133 iEvent.
getByToken(hbhehits_token, hbherhitsuncleaned );
137 iEvent.
getByToken(globalhalo_token, TheGlobalHaloData);
147 auto ebrhitscleaned = std::make_unique<EcalRecHitCollection>();
148 for(
unsigned int i = 0;
i < ebrhitsuncleaned->
size();
i++){
152 for(
unsigned int j = 0; j <refbeamhalorechits.
size() ; j++){
153 const EcalRecHit &rhitbeamhalo = *(refbeamhalorechits)[j];
159 if(isclean) ebrhitscleaned->push_back(rhit);
163 auto eerhitscleaned = std::make_unique<EcalRecHitCollection>();
164 for(
unsigned int i = 0;
i < eerhitsuncleaned->
size();
i++){
168 for(
unsigned int j = 0; j <refbeamhalorechits.
size() ; j++){
169 const EcalRecHit &rhitbeamhalo = *(refbeamhalorechits)[j];
175 if(isclean) eerhitscleaned->push_back(rhit);
179 auto hbherhitscleaned = std::make_unique<HBHERecHitCollection>();
180 for(
unsigned int i = 0;
i < hbherhitsuncleaned->
size();
i++){
181 const HBHERecHit & rhit = (*hbherhitsuncleaned)[
i];
184 for(
unsigned int j = 0; j <refbeamhalorechits.
size() ; j++){
185 const HBHERecHit &rhitbeamhalo = *(refbeamhalorechits)[j];
191 if(isclean) hbherhitscleaned->push_back(rhit);
211 desc.
add<
bool>(
"IsHLT",
false);
212 descriptions.
add(
"caloRecHitsBeamHaloCleaned",desc);
T getParameter(std::string const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
const DetId & detid() const
edm::InputTag it_GlobalHaloData
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
CaloRecHitsBeamHaloCleaned(const edm::ParameterSet &)
edm::InputTag it_HBHERecHits
const DetId & detid() const
edm::InputTag it_EBRecHits
~CaloRecHitsBeamHaloCleaned()
edm::RefVector< HBHERecHitCollection > & GetHBHERechits()
edm::InputTag it_EERecHits
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
edm::EDGetTokenT< GlobalHaloData > globalhalo_token
edm::EDGetTokenT< EcalRecHitCollection > ecalebhits_token
virtual void produce(edm::Event &, const edm::EventSetup &) override
void add(std::string const &label, ParameterSetDescription const &psetDescription)
size_type size() const
Size of the RefVector.
edm::RefVector< EcalRecHitCollection > & GetEBRechits()
edm::EDGetTokenT< HBHERecHitCollection > hbhehits_token
edm::RefVector< EcalRecHitCollection > & GetEERechits()
edm::EDGetTokenT< EcalRecHitCollection > ecaleehits_token