46 ftlbInstance_(ps.getParameter<std::
string>(
"BarrelHitsName")),
47 ftleInstance_(ps.getParameter<std::
string>(
"EndcapHitsName")) {
51 auto sumes = consumesCollector();
52 mtdgeoToken_ = esConsumes<MTDGeometry, MTDDigiGeometryRecord>();
77 auto barrelRechits = std::make_unique<FTLRecHitCollection>();
78 auto endcapRechits = std::make_unique<FTLRecHitCollection>();
82 barrelRechits->reserve(hBarrel->size() / 2);
83 for (
const auto& uhit : *hBarrel) {
85 auto rechit =
barrel_->makeRecHit(uhit, flags);
87 barrelRechits->push_back(rechit);
92 endcapRechits->reserve(hEndcap->size() / 2);
93 for (
const auto& uhit : *hEndcap) {
95 auto rechit =
endcap_->makeRecHit(uhit, flags);
97 endcapRechits->push_back(rechit);
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
~MTDRecHitProducer() override
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
MTDRecHitProducer(const edm::ParameterSet &ps)
std::unique_ptr< MTDRecHitAlgoBase > endcap_
const edm::EDGetTokenT< FTLUncalibratedRecHitCollection > ftleURecHits_
const MTDGeometry * geom_
const std::string ftleInstance_
edm::ESGetToken< MTDGeometry, MTDDigiGeometryRecord > mtdgeoToken_
const std::string ftlbInstance_
ParameterSet const & getParameterSet(std::string const &) const
T getParameter(std::string const &) const
void produce(edm::Event &evt, const edm::EventSetup &es) override
ESTransientHandle< T > getTransientHandle(const ESGetToken< T, R > &iToken) const
std::unique_ptr< MTDRecHitAlgoBase > barrel_
const edm::EDGetTokenT< FTLUncalibratedRecHitCollection > ftlbURecHits_