27 allowMissingInputs_ =
true;
30 produces<HBHERecHitCollection>(
"DiJetsHBHEReRecHitCollection");
31 produces<HORecHitCollection>(
"DiJetsHOReRecHitCollection");
32 produces<HFRecHitCollection>(
"DiJetsHFReRecHitCollection");
39 HitReCalibrator::~HitReCalibrator()
51 std::auto_ptr<HORecHitCollection> miniDiJetsHORecHitCollection(
new HORecHitCollection);
52 std::auto_ptr<HFRecHitCollection> miniDiJetsHFRecHitCollection(
new HFRecHitCollection);
66 DetId id = hbheItr->detid();
68 if (jetRecalib->
exists(
id))
71 float energy = hbheItr->energy();
72 float time = hbheItr->time();
74 miniDiJetsHBHERecHitCollection->push_back(*hbhehit);
77 if (!allowMissingInputs_) {
cout<<
"No HBHE collection "<<endl;
throw e;}
86 DetId id = hoItr->detid();
88 if (jetRecalib->
exists(
id))
91 float energy = hoItr->energy();
92 float time = hoItr->time();
94 miniDiJetsHORecHitCollection->push_back(*hohit);
97 if (!allowMissingInputs_) {
cout<<
" No HO collection "<<endl;
throw e;}
106 DetId id = hfItr->detid();
108 if (jetRecalib->
exists(
id))
111 float energy = hfItr->energy();
112 float time = hfItr->time();
114 miniDiJetsHFRecHitCollection->push_back(*hfhit);
117 if (!allowMissingInputs_)
throw e;
122 iEvent.
put( miniDiJetsHBHERecHitCollection,
"DiJetsHBHEReRecHitCollection");
124 iEvent.
put( miniDiJetsHORecHitCollection,
"DiJetsHOReRecHitCollection");
126 iEvent.
put( miniDiJetsHFRecHitCollection,
"DiJetsHFReRecHitCollection");
T getParameter(std::string const &) const
std::vector< T >::const_iterator const_iterator
const Item * getValues(DetId fId, bool throwOnFail=true) const
const bool exists(DetId fId) const
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
const_iterator end() const
T const * product() const
T const * product() const
const_iterator begin() const