42 std::unique_ptr<HGCalRecHitWorkerBaseClass>
worker_;
46 : eeUncalibRecHitCollection_(
49 ps.getParameter<
edm::
InputTag>(
"HGCHEFuncalibRecHitCollection"))),
51 ps.getParameter<
edm::
InputTag>(
"HGCHEBuncalibRecHitCollection"))),
53 ps.getParameter<
edm::
InputTag>(
"HGCHFNoseuncalibRecHitCollection"))),
54 eeRechitCollection_(ps.getParameter<
std::
string>(
"HGCEErechitCollection")),
55 hefRechitCollection_(ps.getParameter<
std::
string>(
"HGCHEFrechitCollection")),
56 hebRechitCollection_(ps.getParameter<
std::
string>(
"HGCHEBrechitCollection")),
57 hfnoseRechitCollection_(ps.getParameter<
std::
string>(
"HGCHFNoserechitCollection")),
59 produces<HGCeeRecHitCollection>(eeRechitCollection_);
60 produces<HGChefRecHitCollection>(hefRechitCollection_);
61 produces<HGChebRecHitCollection>(hebRechitCollection_);
62 produces<HGChfnoseRecHitCollection>(hfnoseRechitCollection_);
82 eeUncalibRecHits = pHGCeeUncalibRecHits.
product();
85 hefUncalibRecHits = pHGChefUncalibRecHits.
product();
88 hebUncalibRecHits = pHGChebUncalibRecHits.
product();
91 if (pHGChfnoseUncalibRecHits.
isValid())
92 hfnoseUncalibRecHits = pHGChfnoseUncalibRecHits.
product();
95 auto eeRecHits = std::make_unique<HGCeeRecHitCollection>();
96 auto hefRecHits = std::make_unique<HGChefRecHitCollection>();
97 auto hebRecHits = std::make_unique<HGChebRecHitCollection>();
102 for (
auto it = eeUncalibRecHits->
begin(); it != eeUncalibRecHits->
end(); ++it) {
103 worker_->run(evt, *it, *eeRecHits);
107 for (
auto it = hefUncalibRecHits->
begin(); it != hefUncalibRecHits->
end(); ++it) {
108 worker_->run(evt, *it, *hefRecHits);
112 for (
auto it = hebUncalibRecHits->
begin(); it != hebUncalibRecHits->
end(); ++it) {
113 worker_->run(evt, *it, *hebRecHits);
122 LogInfo(
"HGCalRecHitInfo") <<
"total # HGCee calibrated rechits: " << eeRecHits->size();
123 LogInfo(
"HGCalRecHitInfo") <<
"total # HGChef calibrated rechits: " << hefRecHits->size();
124 LogInfo(
"HGCalRecHitInfo") <<
"total # HGCheb calibrated rechits: " << hebRecHits->size();
131 if (pHGChfnoseUncalibRecHits.
isValid()) {
132 auto hfnoseRecHits = std::make_unique<HGChfnoseRecHitCollection>();
133 for (
auto it = hfnoseUncalibRecHits->
begin(); it != hfnoseUncalibRecHits->
end(); ++it) {
134 worker_->run(evt, *it, *hfnoseRecHits);
136 hfnoseRecHits->sort();
137 LogInfo(
"HGCalRecHitInfo") <<
"total # HGChfnose calibrated rechits: " << hfnoseRecHits->size();