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;
127 iEvent.
getByToken(inputTagVertexCandidates_, vertexCandidates);
130 iEvent.
getByToken(inputTagMainVertex_, mainVertexHandle);
133 iEvent.
getByToken(inputTagBeamSpot_, beamSpotHandle);
136 pfDisplacedVertexFinder_.setEdmParameters(theMagField, globTkGeomHandle, tkerTopoHandle.
product(), tkerGeomHandle.
product());
137 pfDisplacedVertexFinder_.setPrimaryVertex(mainVertexHandle, beamSpotHandle);
138 pfDisplacedVertexFinder_.setInput(vertexCandidates);
141 pfDisplacedVertexFinder_.findDisplacedVertices();
147 cout << pfDisplacedVertexFinder_<<endl;
148 LogInfo(
"PFDisplacedVertexProducer") << str.str()<<endl;
152 std::unique_ptr<reco::PFDisplacedVertexCollection>
153 pOutputDisplacedVertexCollection(
154 pfDisplacedVertexFinder_.transferDisplacedVertices() );
158 iEvent.
put(
std::move(pOutputDisplacedVertexCollection));
160 LogDebug(
"PFDisplacedVertexProducer")<<
"STOP event: "<<iEvent.
id().
event()
161 <<
" 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
PFDisplacedVertexProducer(const edm::ParameterSet &)
~PFDisplacedVertexProducer() override
void produce(edm::Event &, const edm::EventSetup &) override
T const * product() const