26 allowMissingInputs_ =
true;
29 produces<HBHERecHitCollection>(
"DiJetsHBHEReRecHitCollection");
30 produces<HORecHitCollection>(
"DiJetsHOReRecHitCollection");
31 produces<HFRecHitCollection>(
"DiJetsHFReRecHitCollection");
38 HitReCalibrator::~HitReCalibrator()
50 std::auto_ptr<HORecHitCollection> miniDiJetsHORecHitCollection(
new HORecHitCollection);
51 std::auto_ptr<HFRecHitCollection> miniDiJetsHFRecHitCollection(
new 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( miniDiJetsHBHERecHitCollection,
"DiJetsHBHEReRecHitCollection");
123 iEvent.
put( miniDiJetsHORecHitCollection,
"DiJetsHOReRecHitCollection");
125 iEvent.
put( miniDiJetsHFRecHitCollection,
"DiJetsHFReRecHitCollection");
T getParameter(std::string const &) const
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
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
const_iterator end() const
T const * product() const
T const * product() const
const_iterator begin() const