104 if (not srFlagsIn_.
label().empty()) {
113 if (not srFlagsIn_.
label().empty()) {
134 if (region ==
"barrel")
136 else if (region ==
"endcap")
150 std::unique_ptr<EBDigiCollection> outputEBDigiCollection(
new EBDigiCollection);
151 std::unique_ptr<EEDigiCollection> outputEEDigiCollection(
new EEDigiCollection);
176 srFlagsEB = srFlagsEBHandle.
product();
182 for (ituneEB = recHitsHandle->
begin(); ituneEB != recHitsHandle->
end(); ituneEB++) {
186 if (digiLookUp == digisEB->
end())
188 outputEBDigiCollection->push_back(digiLookUp->id(), digiLookUp->begin());
196 if (outputEBSrFlagCollection->find(ttId) != outputEBSrFlagCollection->end())
198 srFlagLookUp = srFlagsEB->
find(ttId);
200 if (srFlagLookUp == srFlagsEB->
end())
202 outputEBSrFlagCollection->push_back(*srFlagLookUp);
220 srFlagsEE = srFlagsEEHandle.
product();
226 for (ituneEE = recHitsHandle->
begin(); ituneEE != recHitsHandle->
end(); ituneEE++) {
230 if (digiLookUp == digisEE->
end())
232 outputEEDigiCollection->push_back(digiLookUp->id(), digiLookUp->begin());
240 if (outputEESrFlagCollection->find(scId) != outputEESrFlagCollection->end())
242 srFlagLookUp = srFlagsEE->
find(scId);
244 if (srFlagLookUp == srFlagsEE->
end())
246 outputEESrFlagCollection->push_back(*srFlagLookUp);
301 ->setComment(
"Region of rechits to save Digis for. Allowed values: barrel or endcap.");
303 ->setComment(
"The collection of either barrel or endcap digis which correspond to the rechit collection");
304 desc.
add<
std::string>(
"digisOut",
"pi0EBDigis")->setComment(
"Name for the collection of Digis saved by the module");
306 ->setComment(
"Collection of rechits to match Digis to");
308 ->setComment(
"The collection of either barrel or endcap srFlags which correspond to the rechit collection");
310 ->setComment(
"Name for the collection of SrFlags saved by the module");
311 descriptions.
add(
"hltFindMatchingECALDigisToRechits", desc);
T getParameter(std::string const &) const
edm::EDGetTokenT< EBSrFlagCollection > srFlagsEBInToken_
edm::EDGetTokenT< EESrFlagCollection > srFlagsEEInToken_
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::vector< EcalRecHit >::const_iterator const_iterator
~HLTRechitsToDigis() override
edm::EDGetTokenT< EEDigiCollection > digisEEInToken_
unsigned ttId(DetId const &)
void produce(edm::Event &, edm::EventSetup const &) override
const_iterator find(id_type i) const
HLTRechitsToDigis(const edm::ParameterSet &)
#define DEFINE_FWK_MODULE(type)
static const HLTRechitsToDigis::ecalRegion stringToRegion(const std::string ®ion)
edm::EDGetTokenT< EcalRecHitCollection > recHitsToken_
ParameterDescriptionBase * add(U const &iLabel, T const &value)
const_iterator end() const
DetId id() const
get the id
T const * product() const
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
const_iterator end() const
iterator find(key_type k)
edm::EDGetTokenT< EBDigiCollection > digisEBInToken_
const_iterator begin() const