17 iConfig.getParameter<bool>(
"useHitsSplitting")),
26 if ( iConfig.
exists(
"clusterRemovalInfo") ) {
32 produces<reco::TrackCollection>().setBranchAlias(
alias_ +
"Tracks" );
33 produces<reco::TrackExtraCollection>().setBranchAlias(
alias_ +
"TrackExtras" );
34 produces<TrackingRecHitCollection>().setBranchAlias(
alias_ +
"RecHits" );
35 produces<std::vector<Trajectory> >() ;
36 produces<TrajTrackAssociationCollection>();
43 LogDebug(
"TrackProducer") <<
"Analyzing event number: " << theEvent.
id() <<
"\n";
50 std::auto_ptr<std::vector<Trajectory> > outputTrajectoryColl(
new std::vector<Trajectory>);
61 getFromES(setup,theG,theMF,theFitter,thePropagator,theMeasTk,theBuilder);
72 edm::LogError(
"TrackProducer") <<
"could not get the TrackCandidateCollection.";}
74 LogDebug(
"TrackProducer") <<
"run the algorithm" <<
"\n";
78 }
catch (
cms::Exception &
e){
edm::LogError(
"TrackProducer") <<
"cms::Exception caught during theAlgo.runWithCandidate." <<
"\n" << e <<
"\n";
throw;}
82 putInEvt(theEvent, thePropagator.
product(),theMeasTk.
product(), outputRHColl, outputTColl, outputTEColl, outputTrajectoryColl, algoResults);
83 LogDebug(
"TrackProducer") <<
"end" <<
"\n";
89 LogDebug(
"TrackProducer") <<
"Analyzing event number: " << theEvent.
id() <<
"\n";
93 std::vector<reco::TransientTrack> ttks;
104 getFromES(setup,theG,theMF,theFitter,thePropagator,theMeasTk,theBuilder);
115 edm::LogError(
"TrackProducer") <<
"could not get the TrackCandidateCollection.";}
117 LogDebug(
"TrackProducer") <<
"run the algorithm" <<
"\n";
122 catch (
cms::Exception &
e){
edm::LogError(
"TrackProducer") <<
"cms::Exception caught during theAlgo.runWithCandidate." <<
"\n" << e <<
"\n";
throw; }
125 for (AlgoProductCollection::iterator
prod=algoResults.begin();
prod!=algoResults.end();
prod++){
129 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
void setClusterRemovalInfo(const edm::InputTag &clusterRemovalInfo)
Sets the information on cluster removal, and turns it on.
void setAlias(std::string alias)
set the aliases of produced collections
void setConf(const edm::ParameterSet &conf)
Set parameter set.
std::vector< AlgoProduct > AlgoProductCollection
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.
T const * product() const
virtual void putInEvt(edm::Event &, const Propagator *prop, const MeasurementTracker *measTk, std::auto_ptr< TrackingRecHitCollection > &, std::auto_ptr< reco::TrackCollection > &, std::auto_ptr< reco::TrackExtraCollection > &, std::auto_ptr< std::vector< Trajectory > > &, AlgoProductCollection &)
Put produced collections in the event.
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.
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
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.