31 produces<reco::TrackCollection>().setBranchAlias(
alias_ +
"Tracks" );
32 produces<reco::TrackExtraCollection>().setBranchAlias(
alias_ +
"TrackExtras" );
33 produces<TrackingRecHitCollection>().setBranchAlias(
alias_ +
"RecHits" );
34 produces<std::vector<Trajectory> >();
35 produces<TrajTrackAssociationCollection>();
36 produces<TrajAnnealingCollection>().setBranchAlias(
alias_ +
"TrajectoryAnnealing" );
37 produces<reco::TrackCollection>(
"beforeDAF").setBranchAlias(
alias_ +
"TracksBeforeDAF" );
38 produces<reco::TrackExtraCollection>(
"beforeDAF").setBranchAlias(
alias_ +
"TrackExtrasBeforeDAF" );
39 produces<reco::TrackCollection>(
"afterDAF").setBranchAlias(
alias_ +
"TracksAfterDAF" );
40 produces<reco::TrackExtraCollection>(
"afterDAF").setBranchAlias(
alias_ +
"TrackExtrasAfterDAF" );
48 edm::LogInfo(
"DAFTrackProducer") <<
"Analyzing event number: " << theEvent.
id() <<
"\n";
54 std::auto_ptr<std::vector<Trajectory> > outputTrajectoryColl(
new std::vector<Trajectory>);
61 std::auto_ptr<std::vector<Trajectory> > outputTrajectoryCollBeforeDAF(
new std::vector<Trajectory>);
66 std::auto_ptr<std::vector<Trajectory> > outputTrajectoryCollAfterDAF(
new std::vector<Trajectory>);
75 getFromES(setup,theG,theMF,theFitter,thePropagator,theMeasTk,theBuilder);
101 getFromEvt(theEvent,trajTrackAssociationHandle,bs);
105 LogDebug(
"DAFTrackProducer") <<
"run the DAF algorithm" <<
"\n";
107 *trajTrackAssociationHandle,
110 measurementCollectorHandle.
product(), updatorHandle.
product(), bs,
112 algoResultsBeforeDAF, algoResultsAfterDAF);
115 edm::LogInfo(
"DAFTrackProducer") <<
"cms::Exception caught!!!" <<
"\n" << e <<
"\n";
121 outputRHColl, outputTColl, outputTEColl,
122 outputTrajectoryColl, algoResults, theBuilder.
product());
127 outputRHCollBeforeDAF, outputTCollBeforeDAF, outputTECollBeforeDAF,
128 outputTrajectoryCollBeforeDAF, algoResultsBeforeDAF, theBuilder.
product(), 1);
130 outputRHCollAfterDAF, outputTCollAfterDAF, outputTECollAfterDAF,
131 outputTrajectoryCollAfterDAF, algoResultsAfterDAF, theBuilder.
product(), 2);
133 LogDebug(
"DAFTrackProducer") <<
"end the DAF algorithm." <<
"\n";
146 bs = *recoBeamSpotHandle;
151 std::auto_ptr<TrajAnnealingCollection>& outputTrajAnnColl){
152 const int size = trajannResults.size();
153 outputTrajAnnColl->reserve(size);
155 for(
unsigned int i = 0;
i < trajannResults.size() ;
i++){
156 outputTrajAnnColl->push_back(trajannResults[
i]);
159 theEvent.
put( outputTrajAnnColl );
T getParameter(std::string const &) 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 &, TransientTrackingRecHitBuilder const *, 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.
std::vector< AlgoProduct > AlgoProductCollection
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
void putInEvtTrajAnn(edm::Event &theEvent, TrajAnnealingCollection &trajannResults, std::auto_ptr< TrajAnnealingCollection > &selTrajAnn)
T const * product() const
edm::EDGetTokenT< reco::BeamSpot > bsSrc_
volatile std::atomic< bool > shutdown_flag false
DAFTrackProducer(const edm::ParameterSet &iConfig)
const edm::ParameterSet & getConf() const
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
tuple size
Write out results.
virtual void produce(edm::Event &, const edm::EventSetup &) override
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.