20 iConfig.getParameter<bool>(
"useHitsSplitting")),
27 if (iConfig.
exists(
"clusterRemovalInfo")) {
35 produces<reco::TrackCollection>().setBranchAlias(
alias_ +
"Tracks");
36 produces<reco::TrackExtraCollection>().setBranchAlias(
alias_ +
"TrackExtras");
37 produces<TrackingRecHitCollection>().setBranchAlias(
alias_ +
"RecHits");
38 produces<std::vector<Trajectory> >();
39 produces<std::vector<int> >();
40 produces<TrajTrackAssociationCollection>();
44 LogDebug(
"TrackProducer") <<
"Analyzing event number: " << theEvent.
id() <<
"\n";
51 std::unique_ptr<std::vector<Trajectory> > outputTrajectoryColl(
new std::vector<Trajectory>);
52 std::unique_ptr<std::vector<int> > outputIndecesInputColl(
new std::vector<int>);
63 getFromES(setup, theG, theMF, theFitter, thePropagator, theMeasTk, theBuilder);
76 edm::LogError(
"TrackProducer") <<
"could not get the TrackCandidateCollection.";
78 LogDebug(
"TrackProducer") <<
"run the algorithm"
90 edm::LogError(
"TrackProducer") <<
"cms::Exception caught during theAlgo.runWithCandidate."
104 outputTrajectoryColl,
105 outputIndecesInputColl,
114 LogDebug(
"TrackProducer") <<
"Analyzing event number: " << theEvent.
id() <<
"\n";
118 std::vector<reco::TransientTrack> ttks;
129 getFromES(setup, theG, theMF, theFitter, thePropagator, theMeasTk, theBuilder);
140 edm::LogError(
"TrackProducer") <<
"could not get the TrackCandidateCollection.";
142 LogDebug(
"TrackProducer") <<
"run the algorithm"
154 edm::LogError(
"TrackProducer") <<
"cms::Exception caught during theAlgo.runWithCandidate."
160 ttks.reserve(algoResults.size());
161 for (
auto& prod : algoResults) {
TrackProducerAlgorithm< reco::Track > theAlgo
virtual void getFromEvt(edm::Event &, edm::Handle< TrackCandidateCollection > &, reco::BeamSpot &)
Get TrackCandidateCollection from the Event (needed by TrackProducer)
virtual void putInEvt(edm::Event &, const Propagator *prop, const MeasurementTracker *measTk, std::unique_ptr< TrackingRecHitCollection > &, std::unique_ptr< reco::TrackCollection > &, std::unique_ptr< reco::TrackExtraCollection > &, std::unique_ptr< std::vector< Trajectory > > &, std::unique_ptr< std::vector< int > > &, AlgoProductCollection &, TransientTrackingRecHitBuilder const *, const TrackerTopology *ttopo, int BeforeOrAfter=0)
Put produced collections in the event.
TrackProducer(const edm::ParameterSet &iConfig)
Constructor.
std::vector< Track > TrackCollection
collection of Tracks
bool exists(std::string const ¶meterName) const
checks if a parameter exists
void initTrackProducerBase(const edm::ParameterSet &conf, edm::ConsumesCollector cc, const edm::EDGetToken &src)
Call this method in inheriting class' constructor.
Log< level::Error, false > LogError
void setAlias(std::string alias)
set the aliases of produced collections
bool getData(T &iHolder) const
void setClusterRemovalInfo(const edm::InputTag &clusterRemovalInfo)
Sets the information on cluster removal, and turns it on.
std::vector< TrackExtra > TrackExtraCollection
collection of TrackExtra objects
void produce(edm::Event &, const edm::EventSetup &) override
Implementation of produce method.
std::vector< reco::TransientTrack > getTransient(edm::Event &, const edm::EventSetup &)
Get Transient Tracks.
std::vector< AlgoProduct > AlgoProductCollection
T const * product() const
T getParameter(std::string const &) const
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > theTTopoToken
void runWithCandidate(const TrackingGeometry *, const MagneticField *, const TrackCandidateCollection &, const TrajectoryFitter *, const Propagator *, const TransientTrackingRecHitBuilder *, const reco::BeamSpot &, AlgoProductCollection &)
Run the Final Fit taking TrackCandidates as input.
virtual void getFromES(const edm::EventSetup &, edm::ESHandle< TrackerGeometry > &, edm::ESHandle< MagneticField > &, edm::ESHandle< TrajectoryFitter > &, edm::ESHandle< Propagator > &, edm::ESHandle< MeasurementTracker > &, edm::ESHandle< TransientTrackingRecHitBuilder > &)
Get needed services from the Event Setup.