27 produces<DTRecSegment4DCollection>();
33 cout <<
"[DTRecSegment4DProducer] Constructor called" << endl;
39 recHits2DToken_ = consumes<DTRecSegment2DCollection>(pset.
getParameter<
InputTag>(
"recHits2DLabel"));
42 string theReco4DAlgoName = pset.
getParameter<
string>(
"Reco4DAlgoName");
43 if(debug)
cout <<
"the Reco4D AlgoName is " << theReco4DAlgoName << endl;
51 cout <<
"[DTRecSegment4DProducer] Destructor called" << endl;
59 event.getByToken(recHits1DToken_, all1DHits);
63 if(the4DAlgo->wants2DSegments())
64 event.
getByToken(recHits2DToken_, all2DSegments);
67 auto segments4DCollection = std::make_unique<DTRecSegment4DCollection>();
74 the4DAlgo->setES(setup);
77 DTRecHitCollection::id_iterator dtLayerIt;
81 for (dtLayerIt = all1DHits->id_begin(); dtLayerIt != all1DHits->id_end(); ++dtLayerIt){
85 if (chId==oldChId)
continue;
87 if(
debug)
cout <<
"ChamberId: "<< chId << endl;
88 the4DAlgo->setChamber(chId);
90 if(
debug)
cout<<
"Take the DTRecHits1D and set them in the reconstructor"<<endl;
92 the4DAlgo->setDTRecHit1DContainer(all1DHits);
94 if(
debug)
cout<<
"Take the DTRecSegments2D and set them in the reconstructor"<<endl;
96 the4DAlgo->setDTRecSegment2DContainer(all2DSegments);
98 if(
debug)
cout <<
"Start 4D-Segments Reco " << endl;
103 cout <<
"Number of reconstructed 4D-segments " << segments4D.
size() << endl;
105 ostream_iterator<DTRecSegment4D>(
cout,
"\n"));
108 if (segments4D.
size() > 0 )
110 segments4DCollection->put(chId, segments4D.
begin(),segments4D.
end());
113 event.put(
std::move(segments4DCollection));
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
virtual ~DTRecSegment4DProducer()
Destructor.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
def setup(process, global_tag, zero_tesla=False)
DTRecSegment4DProducer(const edm::ParameterSet &)
Constructor.
virtual void produce(edm::Event &event, const edm::EventSetup &setup)
The method which produces the 4D rec segments.
T get(const Candidate &c)