28 produces<reco::TrackCollection>().setBranchAlias(
alias_ +
"Tracks");
29 produces<reco::TrackExtraCollection>().setBranchAlias(
alias_ +
"TrackExtras");
30 produces<TrackingRecHitCollection>().setBranchAlias(
alias_ +
"RecHits");
31 produces<std::vector<Trajectory> >();
32 produces<TrajTrackAssociationCollection>();
33 produces<TrajAnnealingCollection>().setBranchAlias(
alias_ +
"TrajectoryAnnealing");
34 produces<reco::TrackCollection>(
"beforeDAF").setBranchAlias(
alias_ +
"TracksBeforeDAF");
35 produces<reco::TrackExtraCollection>(
"beforeDAF").setBranchAlias(
alias_ +
"TrackExtrasBeforeDAF");
36 produces<reco::TrackCollection>(
"afterDAF").setBranchAlias(
alias_ +
"TracksAfterDAF");
37 produces<reco::TrackExtraCollection>(
"afterDAF").setBranchAlias(
alias_ +
"TrackExtrasAfterDAF");
43 edm::LogInfo(
"DAFTrackProducer") <<
"Analyzing event number: " << theEvent.
id() <<
"\n";
49 std::unique_ptr<std::vector<Trajectory> > outputTrajectoryColl(
new std::vector<Trajectory>);
51 std::unique_ptr<std::vector<int> > outputIndecesInputColl(
new std::vector<int>);
57 std::unique_ptr<std::vector<Trajectory> > outputTrajectoryCollBeforeDAF(
new std::vector<Trajectory>);
58 std::unique_ptr<std::vector<int> > outputIndecesInputCollBeforeDAF(
new std::vector<int>);
63 std::unique_ptr<std::vector<Trajectory> > outputTrajectoryCollAfterDAF(
new std::vector<Trajectory>);
64 std::unique_ptr<std::vector<int> > outputIndecesInputCollAfterDAF(
new std::vector<int>);
73 getFromES(setup, theG, theMF, theFitter, thePropagator, theMeasTk, theBuilder);
100 getFromEvt(theEvent, trajTrackAssociationHandle, bs);
103 LogDebug(
"DAFTrackProducer") <<
"run the DAF algorithm"
107 *trajTrackAssociationHandle,
111 measurementCollectorHandle.
product(),
117 algoResultsBeforeDAF,
118 algoResultsAfterDAF);
121 edm::LogInfo(
"DAFTrackProducer") <<
"cms::Exception caught!!!"
134 outputTrajectoryColl,
135 outputIndecesInputColl,
145 outputRHCollBeforeDAF,
146 outputTCollBeforeDAF,
147 outputTECollBeforeDAF,
148 outputTrajectoryCollBeforeDAF,
149 outputIndecesInputCollBeforeDAF,
150 algoResultsBeforeDAF,
157 outputRHCollAfterDAF,
159 outputTECollAfterDAF,
160 outputTrajectoryCollAfterDAF,
161 outputIndecesInputCollAfterDAF,
167 LogDebug(
"DAFTrackProducer") <<
"end the DAF algorithm."
181 bs = *recoBeamSpotHandle;
186 std::unique_ptr<TrajAnnealingCollection>& outputTrajAnnColl) {
187 const int size = trajannResults.size();
188 outputTrajAnnColl->reserve(size);
190 for (
unsigned int i = 0;
i < trajannResults.size();
i++) {
191 outputTrajAnnColl->push_back(trajannResults[
i]);
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
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.
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
void initTrackProducerBase(const edm::ParameterSet &conf, edm::ConsumesCollector cc, const edm::EDGetToken &src)
Call this method in inheriting class' constructor.
DAFTrackProducerAlgorithm theAlgo
void setAlias(std::string alias)
set the aliases of produced collections
void getFromEvt(edm::Event &, edm::Handle< TrajTrackAssociationCollection > &, reco::BeamSpot &)
edm::EDGetTokenT< MeasurementTrackerEvent > mteSrc_
Log< level::Info, false > LogInfo
std::vector< TrackExtra > TrackExtraCollection
collection of TrackExtra objects
std::vector< AlgoProduct > AlgoProductCollection
T const * product() const
T getParameter(std::string const &) const
edm::EDGetTokenT< reco::BeamSpot > bsSrc_
DAFTrackProducer(const edm::ParameterSet &iConfig)
const edm::ParameterSet & getConf() const
tuple size
Write out results.
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.