20 iConfig.getParameter<
bool>(
"useHitsSplitting")),
27 if (iConfig.
exists(
"clusterRemovalInfo")) {
35 produces<reco::TrackExtraCollection>().setBranchAlias(
alias_ +
"TrackExtras");
36 produces<TrackingRecHitCollection>().setBranchAlias(
alias_ +
"RecHits");
40 produces<reco::TrackCollection>().setBranchAlias(
alias_ +
"Tracks");
41 produces<std::vector<Trajectory> >();
42 produces<std::vector<int> >();
43 produces<TrajTrackAssociationCollection>();
47 LogDebug(
"TrackProducer") <<
"Analyzing event number: " << theEvent.
id() <<
"\n";
54 std::unique_ptr<std::vector<Trajectory> > outputTrajectoryColl(
new std::vector<Trajectory>);
55 std::unique_ptr<std::vector<int> > outputIndecesInputColl(
new std::vector<int>);
66 getFromES(
setup, theG, theMF, theFitter, thePropagator, theMeasTk, theBuilder);
79 edm::LogError(
"TrackProducer") <<
"could not get the TrackCandidateCollection.";
81 LogDebug(
"TrackProducer") <<
"run the algorithm" 93 edm::LogError(
"TrackProducer") <<
"cms::Exception caught during theAlgo.runWithCandidate." 107 outputTrajectoryColl,
108 outputIndecesInputColl,
117 LogDebug(
"TrackProducer") <<
"Analyzing event number: " << theEvent.
id() <<
"\n";
121 std::vector<reco::TransientTrack> ttks;
132 getFromES(
setup, theG, theMF, theFitter, thePropagator, theMeasTk, theBuilder);
143 edm::LogError(
"TrackProducer") <<
"could not get the TrackCandidateCollection.";
145 LogDebug(
"TrackProducer") <<
"run the algorithm" 157 edm::LogError(
"TrackProducer") <<
"cms::Exception caught during theAlgo.runWithCandidate." 163 ttks.reserve(algoResults.size());
164 for (
auto&
prod : algoResults) {
TrackProducerAlgorithm< reco::Track > theAlgo
T getParameter(std::string const &) const
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.
bool exists(std::string const ¶meterName) const
checks if a parameter exists
std::vector< Track > TrackCollection
collection of Tracks
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
T const * product() 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
virtual const MagneticField * magneticField() const =0
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.