33 produces<reco::TrackCollection>().setBranchAlias(
alias_ +
"Tracks" );
34 produces<reco::TrackExtraCollection>().setBranchAlias(
alias_ +
"TrackExtras" );
35 produces<TrackingRecHitCollection>().setBranchAlias(
alias_ +
"RecHits" );
36 produces<std::vector<Trajectory> >();
37 produces<TrajTrackAssociationCollection>();
38 produces<TrajAnnealingCollection>().setBranchAlias(
alias_ +
"TrajectoryAnnealing" );
39 produces<reco::TrackCollection>(
"beforeDAF").setBranchAlias(
alias_ +
"TracksBeforeDAF" );
40 produces<reco::TrackExtraCollection>(
"beforeDAF").setBranchAlias(
alias_ +
"TrackExtrasBeforeDAF" );
41 produces<reco::TrackCollection>(
"afterDAF").setBranchAlias(
alias_ +
"TracksAfterDAF" );
42 produces<reco::TrackExtraCollection>(
"afterDAF").setBranchAlias(
alias_ +
"TrackExtrasAfterDAF" );
50 edm::LogInfo(
"DAFTrackProducer") <<
"Analyzing event number: " << theEvent.
id() <<
"\n";
56 std::unique_ptr<std::vector<Trajectory> > outputTrajectoryColl(
new std::vector<Trajectory>);
58 std::unique_ptr<std::vector<int> > outputIndecesInputColl(
new std::vector<int>);
65 std::unique_ptr<std::vector<Trajectory> > outputTrajectoryCollBeforeDAF(
new std::vector<Trajectory>);
66 std::unique_ptr<std::vector<int> > outputIndecesInputCollBeforeDAF(
new std::vector<int>);
71 std::unique_ptr<std::vector<Trajectory> > outputTrajectoryCollAfterDAF(
new std::vector<Trajectory>);
72 std::unique_ptr<std::vector<int> > outputIndecesInputCollAfterDAF(
new std::vector<int>);
81 getFromES(setup,theG,theMF,theFitter,thePropagator,theMeasTk,theBuilder);
110 getFromEvt(theEvent,trajTrackAssociationHandle,bs);
114 LogDebug(
"DAFTrackProducer") <<
"run the DAF algorithm" <<
"\n";
116 *trajTrackAssociationHandle,
119 measurementCollectorHandle.
product(), updatorHandle.
product(), bs,
121 algoResultsBeforeDAF, algoResultsAfterDAF);
124 edm::LogInfo(
"DAFTrackProducer") <<
"cms::Exception caught!!!" <<
"\n" << e <<
"\n";
130 outputRHColl, outputTColl, outputTEColl,
131 outputTrajectoryColl, outputIndecesInputColl, algoResults, theBuilder.
product(), httopo.
product());
136 outputRHCollBeforeDAF, outputTCollBeforeDAF, outputTECollBeforeDAF,
137 outputTrajectoryCollBeforeDAF, outputIndecesInputCollBeforeDAF, algoResultsBeforeDAF, theBuilder.
product(), httopo.
product(), 1);
139 outputRHCollAfterDAF, outputTCollAfterDAF, outputTECollAfterDAF,
140 outputTrajectoryCollAfterDAF, outputIndecesInputCollAfterDAF, algoResultsAfterDAF, theBuilder.
product(), httopo.
product(), 2);
142 LogDebug(
"DAFTrackProducer") <<
"end the DAF algorithm." <<
"\n";
155 bs = *recoBeamSpotHandle;
160 std::unique_ptr<TrajAnnealingCollection>& outputTrajAnnColl){
161 const int size = trajannResults.size();
162 outputTrajAnnColl->reserve(size);
164 for(
unsigned int i = 0;
i < trajannResults.size() ;
i++){
165 outputTrajAnnColl->push_back(trajannResults[
i]);
T getParameter(std::string const &) const
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< Track > TrackCollection
collection of Tracks
DAFTrackProducerAlgorithm theAlgo
std::vector< TrajAnnealing > TrajAnnealingCollection
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 &)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
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
T const * product() const
std::vector< AlgoProduct > AlgoProductCollection
edm::EDGetTokenT< reco::BeamSpot > bsSrc_
volatile std::atomic< bool > shutdown_flag false
DAFTrackProducer(const edm::ParameterSet &iConfig)
const edm::ParameterSet & getConf() const
tuple size
Write out results.
virtual void produce(edm::Event &, const edm::EventSetup &) override
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.