108 if (not srFlagsIn_.
label().empty()) {
117 if (not srFlagsIn_.
label().empty()) {
140 if (region ==
"barrel")
return barrel;
141 else if (region ==
"endcap")
return endcap;
155 std::unique_ptr<EBDigiCollection> outputEBDigiCollection(
new EBDigiCollection );
156 std::unique_ptr<EEDigiCollection> outputEEDigiCollection(
new EEDigiCollection );
163 std::unique_ptr<EBSrFlagCollection> outputEBSrFlagCollection(
new EBSrFlagCollection );
164 std::unique_ptr<EESrFlagCollection> outputEESrFlagCollection(
new EESrFlagCollection );
181 srFlagsEB = srFlagsEBHandle.
product();
187 for (ituneEB = recHitsHandle->
begin(); ituneEB != recHitsHandle->
end(); ituneEB++) {
191 if( digiLookUp == digisEB->
end())
continue;
192 outputEBDigiCollection->push_back( digiLookUp->id(), digiLookUp->begin() );
200 if (outputEBSrFlagCollection->find(ttId) != outputEBSrFlagCollection->end())
continue;
201 srFlagLookUp = srFlagsEB->
find( ttId );
203 if( srFlagLookUp == srFlagsEB->
end())
continue;
204 outputEBSrFlagCollection->push_back( *srFlagLookUp );
221 srFlagsEE = srFlagsEEHandle.
product();
227 for (ituneEE = recHitsHandle->
begin(); ituneEE != recHitsHandle->
end(); ituneEE++) {
231 if(digiLookUp == digisEE->
end())
continue;
232 outputEEDigiCollection->push_back( digiLookUp->id(), digiLookUp->begin() );
240 if (outputEESrFlagCollection->find(scId) != outputEESrFlagCollection->end())
continue;
241 srFlagLookUp = srFlagsEE->
find( scId );
243 if(srFlagLookUp == srFlagsEE->
end())
continue;
244 outputEESrFlagCollection->push_back( *srFlagLookUp );
299 ->setComment(
"Region of rechits to save Digis for. Allowed values: barrel or endcap.");
301 ->setComment(
"The collection of either barrel or endcap digis which correspond to the rechit collection");
303 ->setComment(
"Name for the collection of Digis saved by the module");
305 ->setComment(
"Collection of rechits to match Digis to");
307 ->setComment(
"The collection of either barrel or endcap srFlags which correspond to the rechit collection");
309 ->setComment(
"Name for the collection of SrFlags saved by the module");
310 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.
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::vector< EcalRecHit >::const_iterator const_iterator
def setup(process, global_tag, zero_tesla=False)
~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)
const_iterator end() const
iterator find(key_type k)
edm::EDGetTokenT< EBDigiCollection > digisEBInToken_
const_iterator begin() const