31 inputTagVertexCandidates_= consumes<reco::PFDisplacedVertexCandidateCollection>(iConfig.
getParameter<
InputTag>(
"vertexCandidatesLabel"));
33 inputTagMainVertex_ = consumes<reco::VertexCollection>(iConfig.
getParameter<
InputTag>(
"mainVertexLabel"));
36 inputTagBeamSpot_ =consumes<reco::BeamSpot> (iConfig.
getParameter<
InputTag>(
"offlineBeamSpotLabel"));
85 produces<reco::PFDisplacedVertexCollection>();
88 pfDisplacedVertexFinder_.setDebug(debug);
89 pfDisplacedVertexFinder_.setParameters(transvSize, longSize,
90 primaryVertexCut, tobCut,
91 tecCut, minAdaptWeight, switchOff2TrackVertex);
92 pfDisplacedVertexFinder_.setAVFParameters(ps_avf);
93 pfDisplacedVertexFinder_.setTracksSelector(ps_trk);
94 pfDisplacedVertexFinder_.setVertexIdentifier(ps_vtx);
108 LogDebug(
"PFDisplacedVertexProducer")<<
"START event: "<<iEvent.
id().
event()
109 <<
" in run "<<iEvent.
id().
run()<<endl;
124 iEvent.
getByToken(inputTagVertexCandidates_, vertexCandidates);
127 iEvent.
getByToken(inputTagMainVertex_, mainVertexHandle);
130 iEvent.
getByToken(inputTagBeamSpot_, beamSpotHandle);
133 pfDisplacedVertexFinder_.setEdmParameters(theMagField, globTkGeomHandle, tkerGeomHandle);
134 pfDisplacedVertexFinder_.setPrimaryVertex(mainVertexHandle, beamSpotHandle);
135 pfDisplacedVertexFinder_.setInput(vertexCandidates);
138 pfDisplacedVertexFinder_.findDisplacedVertices();
144 cout << pfDisplacedVertexFinder_<<endl;
145 LogInfo(
"PFDisplacedVertexProducer") << str.str()<<endl;
149 std::unique_ptr<reco::PFDisplacedVertexCollection>
150 pOutputDisplacedVertexCollection(
151 pfDisplacedVertexFinder_.transferDisplacedVertices() );
155 iEvent.
put(
std::move(pOutputDisplacedVertexCollection));
157 LogDebug(
"PFDisplacedVertexProducer")<<
"STOP event: "<<iEvent.
id().
event()
158 <<
" in run "<<iEvent.
id().
run()<<endl;
T getParameter(std::string const &) const
EventNumber_t event() const
T getUntrackedParameter(std::string const &, T const &) const
~PFDisplacedVertexProducer()
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
PFDisplacedVertexProducer(const edm::ParameterSet &)
virtual void produce(edm::Event &, const edm::EventSetup &) override
T const * product() const