27 std::unique_ptr<BTLUncalibratedRecHitAlgoBase>
barrel_;
28 std::unique_ptr<ETLUncalibratedRecHitAlgoBase>
endcap_;
34 ftlbInstance_(ps.getParameter<
std::
string>(
"BarrelHitsName")),
35 ftleInstance_(ps.getParameter<
std::
string>(
"EndcapHitsName")) {
39 auto sumes = consumesCollector();
43 barrel_ = std::unique_ptr<BTLUncalibratedRecHitAlgoBase>{
48 endcap_ = std::unique_ptr<ETLUncalibratedRecHitAlgoBase>{
63 auto barrelRechits = std::make_unique<FTLUncalibratedRecHitCollection>();
64 auto endcapRechits = std::make_unique<FTLUncalibratedRecHitCollection>();
68 if (hBarrel.isValid()) {
69 barrelRechits->reserve(hBarrel->size() / 2);
70 for (
const auto& digi : *hBarrel) {
71 barrelRechits->emplace_back(
barrel_->makeRecHit(digi));
74 edm::LogWarning(
"MTDReco") <<
"MTDUncalibratedRecHitProducer: Missing BTL Digi Collection";
80 endcapRechits->reserve(hEndcap->
size() / 2);
81 for (
const auto& digi : *hEndcap) {
82 endcapRechits->emplace_back(
endcap_->makeRecHit(digi));
85 edm::LogWarning(
"MTDReco") <<
"MTDUncalibratedRecHitProducer: Missing ETL Digi Collection";
const edm::EDGetTokenT< ETLDigiCollection > ftleDigis_
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
const std::string ftlbInstance_
#define DEFINE_FWK_MODULE(type)
ParameterSet const & getParameterSet(std::string const &) const
MTDUncalibratedRecHitProducer(const edm::ParameterSet &ps)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::unique_ptr< ETLUncalibratedRecHitAlgoBase > endcap_
const std::string ftleInstance_
const edm::EDGetTokenT< BTLDigiCollection > ftlbDigis_
~MTDUncalibratedRecHitProducer() override
void produce(edm::Event &evt, const edm::EventSetup &es) override
std::unique_ptr< BTLUncalibratedRecHitAlgoBase > barrel_
Log< level::Warning, false > LogWarning