23 inputTagTracks_ = consumes<reco::TrackCollection>(iConfig.
getParameter<
InputTag>(
"trackCollection"));
25 inputTagMainVertex_=consumes<reco::VertexCollection>(iConfig.
getParameter<
InputTag>(
"mainVertexLabel"));
27 inputTagBeamSpot_ =consumes<reco::BeamSpot>(iConfig.
getParameter<
InputTag>(
"offlineBeamSpotLabel"));
44 double primaryVertexCut
48 double dcaPInnerHitCut
55 produces<reco::PFDisplacedVertexCandidateCollection>();
58 pfDisplacedVertexCandidateFinder_.setDebug(debug);
59 pfDisplacedVertexCandidateFinder_.setParameters(dcaCut, primaryVertexCut, dcaPInnerHitCut, ps_trk);
71 LogDebug(
"PFDisplacedVertexCandidateProducer")<<
"START event: "<<iEvent.
id().
event()
72 <<
" in run "<<iEvent.
id().
run()<<endl;
80 iEvent.
getByToken(inputTagTracks_, trackCollection);
83 iEvent.
getByToken(inputTagMainVertex_, mainVertexHandle);
86 iEvent.
getByToken(inputTagBeamSpot_, beamSpotHandle);
88 pfDisplacedVertexCandidateFinder_.setPrimaryVertex(mainVertexHandle, beamSpotHandle);
89 pfDisplacedVertexCandidateFinder_.setInput( trackCollection, theMagField );
93 pfDisplacedVertexCandidateFinder_.findDisplacedVertexCandidates();
98 str<<pfDisplacedVertexCandidateFinder_<<endl;
99 cout << pfDisplacedVertexCandidateFinder_<<endl;
100 LogInfo(
"PFDisplacedVertexCandidateProducer") << str.str()<<endl;
104 auto_ptr< reco::PFDisplacedVertexCandidateCollection >
105 pOutputDisplacedVertexCandidateCollection(
106 pfDisplacedVertexCandidateFinder_.transferVertexCandidates() );
109 iEvent.
put(pOutputDisplacedVertexCandidateCollection);
111 LogDebug(
"PFDisplacedVertexCandidateProducer")<<
"STOP event: "<<iEvent.
id().
event()
112 <<
" in run "<<iEvent.
id().
run()<<endl;
T getParameter(std::string const &) const
EventNumber_t event() const
T getUntrackedParameter(std::string const &, T const &) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
~PFDisplacedVertexCandidateProducer()
virtual void produce(edm::Event &, const edm::EventSetup &) override
PFDisplacedVertexCandidateProducer(const edm::ParameterSet &)
T const * product() const