20 iConfig.getParameter<bool>(
"useHitsSplitting")),
29 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>();
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>);
67 getFromES(setup,theG,theMF,theFitter,thePropagator,theMeasTk,theBuilder);
81 edm::LogError(
"TrackProducer") <<
"could not get the TrackCandidateCollection.";}
83 LogDebug(
"TrackProducer") <<
"run the algorithm" <<
"\n";
87 }
catch (
cms::Exception &
e){
edm::LogError(
"TrackProducer") <<
"cms::Exception caught during theAlgo.runWithCandidate." <<
"\n" << e <<
"\n";
throw;}
91 putInEvt(theEvent, thePropagator.
product(),theMeasTk.
product(), outputRHColl, outputTColl, outputTEColl, outputTrajectoryColl, outputIndecesInputColl, algoResults, theBuilder.
product(), httopo.
product());
92 LogDebug(
"TrackProducer") <<
"end" <<
"\n";
98 LogDebug(
"TrackProducer") <<
"Analyzing event number: " << theEvent.
id() <<
"\n";
102 std::vector<reco::TransientTrack> ttks;
113 getFromES(setup,theG,theMF,theFitter,thePropagator,theMeasTk,theBuilder);
124 edm::LogError(
"TrackProducer") <<
"could not get the TrackCandidateCollection.";}
126 LogDebug(
"TrackProducer") <<
"run the algorithm" <<
"\n";
131 catch (
cms::Exception &
e){
edm::LogError(
"TrackProducer") <<
"cms::Exception caught during theAlgo.runWithCandidate." <<
"\n" << e <<
"\n";
throw; }
133 ttks.reserve(algoResults.size());
134 for (
auto &
prod : algoResults){
138 LogDebug(
"TrackProducer") <<
"end" <<
"\n";
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)
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
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.
void setClusterRemovalInfo(const edm::InputTag &clusterRemovalInfo)
Sets the information on cluster removal, and turns it on.
def setup(process, global_tag, zero_tesla=False)
void setAlias(std::string alias)
set the aliases of produced collections
void setConf(const edm::ParameterSet &conf)
Set parameter set.
virtual const MagneticField * magneticField() const =0
void setSrc(const edm::EDGetToken &src, const edm::EDGetTokenT< reco::BeamSpot > &bsSrc, const edm::EDGetTokenT< MeasurementTrackerEvent > &mteSrc)
set label of source collection
std::vector< TrackExtra > TrackExtraCollection
collection of TrackExtra objects
virtual 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
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.
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.