17 iConfig.getParameter<bool>(
"useHitsSplitting")),
24 if ( iConfig.
exists(
"clusterRemovalInfo") ) {
30 produces<reco::TrackCollection>().setBranchAlias(
alias_ +
"Tracks" );
31 produces<reco::TrackExtraCollection>().setBranchAlias(
alias_ +
"TrackExtras" );
32 produces<TrackingRecHitCollection>().setBranchAlias(
alias_ +
"RecHits" );
33 produces<std::vector<Trajectory> >() ;
34 produces<TrajTrackAssociationCollection>();
41 LogDebug(
"TrackProducer") <<
"Analyzing event number: " << theEvent.
id() <<
"\n";
48 std::auto_ptr<std::vector<Trajectory> > outputTrajectoryColl(
new std::vector<Trajectory>);
59 getFromES(setup,theG,theMF,theFitter,thePropagator,theMeasTk,theBuilder);
70 edm::LogError(
"TrackProducer") <<
"could not get the TrackCandidateCollection.";}
72 LogDebug(
"TrackProducer") <<
"run the algorithm" <<
"\n";
76 }
catch (
cms::Exception &
e){
edm::LogError(
"TrackProducer") <<
"cms::Exception caught during theAlgo.runWithCandidate." <<
"\n" << e <<
"\n";
throw;}
80 putInEvt(theEvent, thePropagator.
product(),theMeasTk.
product(), outputRHColl, outputTColl, outputTEColl, outputTrajectoryColl, algoResults);
81 LogDebug(
"TrackProducer") <<
"end" <<
"\n";
87 LogDebug(
"TrackProducer") <<
"Analyzing event number: " << theEvent.
id() <<
"\n";
91 std::vector<reco::TransientTrack> ttks;
102 getFromES(setup,theG,theMF,theFitter,thePropagator,theMeasTk,theBuilder);
113 edm::LogError(
"TrackProducer") <<
"could not get the TrackCandidateCollection.";}
115 LogDebug(
"TrackProducer") <<
"run the algorithm" <<
"\n";
120 catch (
cms::Exception &
e){
edm::LogError(
"TrackProducer") <<
"cms::Exception caught during theAlgo.runWithCandidate." <<
"\n" << e <<
"\n";
throw; }
123 for (AlgoProductCollection::iterator
prod=algoResults.begin();
prod!=algoResults.end();
prod++){
127 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.
void setSrc(const edm::InputTag &src, const edm::InputTag &bsSrc)
set label of source collection
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
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.