|
|
Go to the documentation of this file.
20 iConfig.getParameter<
bool>(
"useHitsSplitting")),
28 if (iConfig.
exists(
"clusterRemovalInfo")) {
36 produces<reco::TrackCollection>().setBranchAlias(
alias_ +
"Tracks");
37 produces<reco::TrackExtraCollection>().setBranchAlias(
alias_ +
"TrackExtras");
38 produces<TrackingRecHitCollection>().setBranchAlias(
alias_ +
"RecHits");
39 produces<std::vector<Trajectory> >();
40 produces<std::vector<int> >();
41 produces<TrajTrackAssociationCollection>();
45 LogDebug(
"TrackProducer") <<
"Analyzing event number: " << theEvent.
id() <<
"\n";
52 std::unique_ptr<std::vector<Trajectory> > outputTrajectoryColl(
new std::vector<Trajectory>);
53 std::unique_ptr<std::vector<int> > outputIndecesInputColl(
new std::vector<int>);
64 getFromES(
setup, theG, theMF, theFitter, thePropagator, theMeasTk, theBuilder);
78 edm::LogError(
"TrackProducer") <<
"could not get the TrackCandidateCollection.";
80 LogDebug(
"TrackProducer") <<
"run the algorithm"
92 edm::LogError(
"TrackProducer") <<
"cms::Exception caught during theAlgo.runWithCandidate."
106 outputTrajectoryColl,
107 outputIndecesInputColl,
116 LogDebug(
"TrackProducer") <<
"Analyzing event number: " << theEvent.
id() <<
"\n";
120 std::vector<reco::TransientTrack> ttks;
131 getFromES(
setup, theG, theMF, theFitter, thePropagator, theMeasTk, theBuilder);
142 edm::LogError(
"TrackProducer") <<
"could not get the TrackCandidateCollection.";
144 LogDebug(
"TrackProducer") <<
"run the algorithm"
156 edm::LogError(
"TrackProducer") <<
"cms::Exception caught during theAlgo.runWithCandidate."
162 ttks.reserve(algoResults.size());
163 for (
auto&
prod : algoResults) {
T const * product() const
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.
virtual void getFromEvt(edm::Event &, edm::Handle< TrackCandidateCollection > &, reco::BeamSpot &)
Get TrackCandidateCollection from the Event (needed by TrackProducer)
void setConf(const edm::ParameterSet &conf)
Set parameter set.
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.
virtual const MagneticField * magneticField() const =0
std::vector< AlgoProduct > AlgoProductCollection
void setClusterRemovalInfo(const edm::InputTag &clusterRemovalInfo)
Sets the information on cluster removal, and turns it on.
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.
TrackProducer(const edm::ParameterSet &iConfig)
Constructor.
std::vector< TrackExtra > TrackExtraCollection
collection of TrackExtra objects
void setAlias(std::string alias)
set the aliases of produced collections
bool exists(std::string const ¶meterName) const
checks if a parameter exists
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.
Log< level::Error, false > LogError
void setSrc(const edm::EDGetToken &src, const edm::EDGetTokenT< reco::BeamSpot > &bsSrc, const edm::EDGetTokenT< MeasurementTrackerEvent > &mteSrc)
set label of source collection
TrackProducerAlgorithm< reco::Track > theAlgo
T getParameter(std::string const &) const
std::vector< Track > TrackCollection
collection of Tracks