30 consumesCollector())} {
31 produces<DTRecSegment4DCollection>();
34 debug =
pset.getUntrackedParameter<
bool>(
"debug",
false);
37 cout <<
"[DTRecSegment4DProducer] Constructor called" << endl;
40 recHits1DToken_ = consumes<DTRecHitCollection>(
pset.getParameter<
InputTag>(
"recHits1DLabel"));
43 recHits2DToken_ = consumes<DTRecSegment2DCollection>(
pset.getParameter<
InputTag>(
"recHits2DLabel"));
46 cout <<
"the Reco4D AlgoName is " <<
pset.getParameter<
string>(
"Reco4DAlgoName") << endl;
52 cout <<
"[DTRecSegment4DProducer] Destructor called" << endl;
66 auto segments4DCollection = std::make_unique<DTRecSegment4DCollection>();
76 for (dtLayerIt = all1DHits->id_begin(); dtLayerIt != all1DHits->id_end(); ++dtLayerIt) {
83 cout <<
"ChamberId: " << chId << endl;
87 cout <<
"Take the DTRecHits1D and set them in the reconstructor" << endl;
89 the4DAlgo->setDTRecHit1DContainer(all1DHits);
92 cout <<
"Take the DTRecSegments2D and set them in the reconstructor" << endl;
94 the4DAlgo->setDTRecSegment2DContainer(all2DSegments);
97 cout <<
"Start 4D-Segments Reco " << endl;
102 cout <<
"Number of reconstructed 4D-segments " << segments4D.
size() << endl;
103 copy(segments4D.
begin(), segments4D.
end(), ostream_iterator<DTRecSegment4D>(
cout,
"\n"));
106 if (!segments4D.
empty())
108 segments4DCollection->put(chId, segments4D.
begin(), segments4D.
end());
111 event.put(
std::move(segments4DCollection));
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::unique_ptr< DTRecSegment4DBaseAlgo > the4DAlgo
DTRecSegment4DProducer(const edm::ParameterSet &)
Constructor.
edm::EDGetTokenT< DTRecSegment2DCollection > recHits2DToken_
~DTRecSegment4DProducer() override
Destructor.
T getParameter(std::string const &) const
edm::EDGetTokenT< DTRecHitCollection > recHits1DToken_
void produce(edm::Event &event, const edm::EventSetup &setup) override
The method which produces the 4D rec segments.