31 produces<DTRecSegment4DCollection>();
34 debug =
pset.getUntrackedParameter<
bool>(
"debug",
false);
37 cout <<
"[DTRecSegment4DProducer] Constructor called" << endl;
45 if(debug)
cout <<
"the Reco4D AlgoName is " <<
pset.getParameter<
string>(
"Reco4DAlgoName") << endl;
51 cout <<
"[DTRecSegment4DProducer] Destructor called" << endl;
66 auto segments4DCollection = std::make_unique<DTRecSegment4DCollection>();
80 for (dtLayerIt = all1DHits->id_begin(); dtLayerIt != all1DHits->id_end(); ++dtLayerIt){
84 if (chId==oldChId)
continue;
86 if(
debug)
cout <<
"ChamberId: "<< chId << endl;
89 if(
debug)
cout<<
"Take the DTRecHits1D and set them in the reconstructor"<<endl;
91 the4DAlgo->setDTRecHit1DContainer(all1DHits);
93 if(
debug)
cout<<
"Take the DTRecSegments2D and set them in the reconstructor"<<endl;
95 the4DAlgo->setDTRecSegment2DContainer(all2DSegments);
97 if(
debug)
cout <<
"Start 4D-Segments Reco " << endl;
102 cout <<
"Number of reconstructed 4D-segments " << segments4D.
size() << endl;
104 ostream_iterator<DTRecSegment4D>(
cout,
"\n"));
107 if (!segments4D.
empty() )
109 segments4DCollection->put(chId, segments4D.
begin(),segments4D.
end());
112 event.put(
std::move(segments4DCollection));
T getParameter(std::string const &) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::unique_ptr< DTRecSegment4DBaseAlgo > the4DAlgo
def setup(process, global_tag, zero_tesla=False)
DTRecSegment4DProducer(const edm::ParameterSet &)
Constructor.
edm::EDGetTokenT< DTRecSegment2DCollection > recHits2DToken_
~DTRecSegment4DProducer() override
Destructor.
edm::EDGetTokenT< DTRecHitCollection > recHits1DToken_
void produce(edm::Event &event, const edm::EventSetup &setup) override
The method which produces the 4D rec segments.
T get(const Candidate &c)