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"));
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 std::unique_ptr<reco::PFDisplacedVertexCandidateCollection> pOutputDisplacedVertexCandidateCollection(
105 pfDisplacedVertexCandidateFinder_.transferVertexCandidates() );
108 iEvent.
put(
std::move(pOutputDisplacedVertexCandidateCollection));
110 LogDebug(
"PFDisplacedVertexCandidateProducer")<<
"STOP event: "<<iEvent.
id().
event()
111 <<
" in run "<<iEvent.
id().
run()<<endl;
T getParameter(std::string const &) const
EventNumber_t event() const
T getUntrackedParameter(std::string const &, T const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
void produce(edm::Event &, const edm::EventSetup &) override
PFDisplacedVertexCandidateProducer(const edm::ParameterSet &)
T const * product() const
~PFDisplacedVertexCandidateProducer() override