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>();
35 produces<TrajAnnealingCollection>().setBranchAlias(
alias_ +
"TrajectoryAnnealing");
36 produces<reco::TrackCollection>(
"beforeDAF").setBranchAlias(
alias_ +
"TracksBeforeDAF");
37 produces<reco::TrackExtraCollection>(
"beforeDAF").setBranchAlias(
alias_ +
"TrackExtrasBeforeDAF");
38 produces<reco::TrackCollection>(
"afterDAF").setBranchAlias(
alias_ +
"TracksAfterDAF");
39 produces<reco::TrackExtraCollection>(
"afterDAF").setBranchAlias(
alias_ +
"TrackExtrasAfterDAF");
45 edm::LogInfo(
"DAFTrackProducer") <<
"Analyzing event number: " << theEvent.
id() <<
"\n";
51 std::unique_ptr<std::vector<Trajectory> > outputTrajectoryColl(
new std::vector<Trajectory>);
53 std::unique_ptr<std::vector<int> > outputIndecesInputColl(
new std::vector<int>);
59 std::unique_ptr<std::vector<Trajectory> > outputTrajectoryCollBeforeDAF(
new std::vector<Trajectory>);
60 std::unique_ptr<std::vector<int> > outputIndecesInputCollBeforeDAF(
new std::vector<int>);
65 std::unique_ptr<std::vector<Trajectory> > outputTrajectoryCollAfterDAF(
new std::vector<Trajectory>);
66 std::unique_ptr<std::vector<int> > outputIndecesInputCollAfterDAF(
new std::vector<int>);
75 getFromES(setup, theG, theMF, theFitter, thePropagator, theMeasTk, theBuilder);
102 getFromEvt(theEvent, trajTrackAssociationHandle, bs);
105 LogDebug(
"DAFTrackProducer") <<
"run the DAF algorithm" 109 *trajTrackAssociationHandle,
113 measurementCollectorHandle.
product(),
119 algoResultsBeforeDAF,
120 algoResultsAfterDAF);
123 edm::LogInfo(
"DAFTrackProducer") <<
"cms::Exception caught!!!" 136 outputTrajectoryColl,
137 outputIndecesInputColl,
147 outputRHCollBeforeDAF,
148 outputTCollBeforeDAF,
149 outputTECollBeforeDAF,
150 outputTrajectoryCollBeforeDAF,
151 outputIndecesInputCollBeforeDAF,
152 algoResultsBeforeDAF,
159 outputRHCollAfterDAF,
161 outputTECollAfterDAF,
162 outputTrajectoryCollAfterDAF,
163 outputIndecesInputCollAfterDAF,
169 LogDebug(
"DAFTrackProducer") <<
"end the DAF algorithm." 183 bs = *recoBeamSpotHandle;
188 std::unique_ptr<TrajAnnealingCollection>& outputTrajAnnColl) {
189 const int size = trajannResults.size();
190 outputTrajAnnColl->reserve(size);
192 for (
unsigned int i = 0;
i < trajannResults.size();
i++) {
193 outputTrajAnnColl->push_back(trajannResults[
i]);
T getParameter(std::string const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
void runWithCandidate(const TrackingGeometry *, const MagneticField *, const TrajTrackAssociationCollection &, const MeasurementTrackerEvent *measTk, const TrajectoryFitter *, const TransientTrackingRecHitBuilder *, const MultiRecHitCollector *measurementTracker, const SiTrackerMultiRecHitUpdator *, const reco::BeamSpot &, AlgoProductCollection &, TrajAnnealingCollection &, bool, AlgoProductCollection &, AlgoProductCollection &) const
Run the Final Fit taking TrackCandidates as input.
std::vector< TrajAnnealing > TrajAnnealingCollection
std::vector< Track > TrackCollection
collection of Tracks
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.
DAFTrackProducerAlgorithm theAlgo
void setAlias(std::string alias)
set the aliases of produced collections
void setConf(const edm::ParameterSet &conf)
Set parameter set.
void getFromEvt(edm::Event &, edm::Handle< TrajTrackAssociationCollection > &, reco::BeamSpot &)
edm::EDGetTokenT< MeasurementTrackerEvent > mteSrc_
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
std::vector< AlgoProduct > AlgoProductCollection
edm::EDGetTokenT< reco::BeamSpot > bsSrc_
DAFTrackProducer(const edm::ParameterSet &iConfig)
const edm::ParameterSet & getConf() const
T const * product() const
void produce(edm::Event &, const edm::EventSetup &) override
Method where the procduction take place. To be implemented in concrete classes.
void putInEvtTrajAnn(edm::Event &theEvent, TrajAnnealingCollection &trajannResults, std::unique_ptr< TrajAnnealingCollection > &selTrajAnn)
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.