26 allowMissingInputs_ =
true;
29 produces<HBHERecHitCollection>(
"DiJetsHBHEReRecHitCollection");
30 produces<HORecHitCollection>(
"DiJetsHOReRecHitCollection");
31 produces<HFRecHitCollection>(
"DiJetsHFReRecHitCollection");
38 HitReCalibrator::~HitReCalibrator()
49 auto miniDiJetsHBHERecHitCollection = std::make_unique<HBHERecHitCollection>();
50 auto miniDiJetsHORecHitCollection = std::make_unique<HORecHitCollection>();
51 auto miniDiJetsHFRecHitCollection = std::make_unique<HFRecHitCollection>();
65 DetId id = hbheItr->detid();
67 if (jetRecalib->
exists(
id))
70 float energy = hbheItr->energy();
71 float time = hbheItr->time();
73 miniDiJetsHBHERecHitCollection->push_back(*hbhehit);
76 if (!allowMissingInputs_) {
cout<<
"No HBHE collection "<<endl;
throw e;}
85 DetId id = hoItr->detid();
87 if (jetRecalib->
exists(
id))
90 float energy = hoItr->energy();
91 float time = hoItr->time();
93 miniDiJetsHORecHitCollection->push_back(*hohit);
96 if (!allowMissingInputs_) {
cout<<
" No HO collection "<<endl;
throw e;}
105 DetId id = hfItr->detid();
107 if (jetRecalib->
exists(
id))
110 float energy = hfItr->energy();
111 float time = hfItr->time();
113 miniDiJetsHFRecHitCollection->push_back(*hfhit);
116 if (!allowMissingInputs_)
throw e;
121 iEvent.
put(
std::move(miniDiJetsHBHERecHitCollection),
"DiJetsHBHEReRecHitCollection");
123 iEvent.
put(
std::move(miniDiJetsHORecHitCollection),
"DiJetsHOReRecHitCollection");
125 iEvent.
put(
std::move(miniDiJetsHFRecHitCollection),
"DiJetsHFReRecHitCollection");
T getParameter(std::string const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
std::vector< HBHERecHit >::const_iterator const_iterator
const Item * getValues(DetId fId, bool throwOnFail=true) const
const bool exists(DetId fId) const
Namespace of DDCMS conversion namespace.
const_iterator end() const
T const * product() const
const_iterator begin() const