Producer for DisplacedVertices. More...
#include <PFDisplacedVertexProducer.h>
Public Member Functions | |
virtual void | beginJob () |
virtual void | beginRun (edm::Run &r, const edm::EventSetup &c) |
PFDisplacedVertexProducer (const edm::ParameterSet &) | |
virtual void | produce (edm::Event &, const edm::EventSetup &) |
~PFDisplacedVertexProducer () | |
Private Attributes | |
edm::InputTag | inputTagBeamSpot_ |
edm::InputTag | inputTagMainVertex_ |
Input tag for main vertex to cut of dxy of secondary tracks. | |
edm::InputTag | inputTagVertexCandidates_ |
PFDisplacedVertexFinder | pfDisplacedVertexFinder_ |
Displaced Vertices finder. | |
bool | verbose_ |
verbose ? |
Producer for DisplacedVertices.
This producer makes use of DisplacedVertexFinder. This Finder fit vertex candidates out of the DisplacedVertexCandidates which contain all tracks linked together by the criterion which is by default the minimal approach distance.
Definition at line 25 of file PFDisplacedVertexProducer.h.
PFDisplacedVertexProducer::PFDisplacedVertexProducer | ( | const edm::ParameterSet & | iConfig | ) | [explicit] |
Definition at line 27 of file PFDisplacedVertexProducer.cc.
References debug, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), ExpressReco_HICollisions_FallBack::longSize, ExpressReco_HICollisions_FallBack::minAdaptWeight, ExpressReco_HICollisions_FallBack::primaryVertexCut, ExpressReco_HICollisions_FallBack::tecCut, ExpressReco_HICollisions_FallBack::tobCut, and ExpressReco_HICollisions_FallBack::transvSize.
{ // --- Setup input collection names --- // inputTagVertexCandidates_ = iConfig.getParameter<InputTag>("vertexCandidatesLabel"); inputTagMainVertex_ = iConfig.getParameter<InputTag>("mainVertexLabel"); inputTagBeamSpot_ = iConfig.getParameter<InputTag>("offlineBeamSpotLabel"); verbose_ = iConfig.getUntrackedParameter<bool>("verbose"); bool debug = iConfig.getUntrackedParameter<bool>("debug"); // ------ Algo Parameters ------ // // Maximal transverse distance between two minimal // approach points to be used together double transvSize = iConfig.getParameter< double >("transvSize"); // Maximal longitudinal distance between two minimal // approach points to be used together double longSize = iConfig.getParameter< double >("longSize"); // Minimal radius below which we do not reconstruct interactions // Typically the position of the first Pixel layer double primaryVertexCut = iConfig.getParameter< double >("primaryVertexCut"); // Radius at which no secondary tracks are availables // in the barrel.For the moment we exclude the TOB barrel // since 5-th track step starts the latest at first TOB // layer. double tobCut = iConfig.getParameter< double >("tobCut"); // Radius at which no secondary tracks are availables // in the endcaps.For the moment we exclude the TEC wheel. double tecCut = iConfig.getParameter< double >("tecCut"); // The minimal accepted weight for the tracks calculated in the // adaptive vertex fitter to be associated to the displaced vertex double minAdaptWeight = iConfig.getParameter< double >("minAdaptWeight"); edm::ParameterSet ps_trk = iConfig.getParameter<edm::ParameterSet>("tracksSelectorParameters"); edm::ParameterSet ps_vtx = iConfig.getParameter<edm::ParameterSet>("vertexIdentifierParameters"); edm::ParameterSet ps_avf = iConfig.getParameter<edm::ParameterSet>("avfParameters"); produces<reco::PFDisplacedVertexCollection>(); // Vertex Finder parameters ----------------------------------- pfDisplacedVertexFinder_.setDebug(debug); pfDisplacedVertexFinder_.setParameters(transvSize, longSize, primaryVertexCut, tobCut, tecCut, minAdaptWeight); pfDisplacedVertexFinder_.setAVFParameters(ps_avf); pfDisplacedVertexFinder_.setTracksSelector(ps_trk); pfDisplacedVertexFinder_.setVertexIdentifier(ps_vtx); }
PFDisplacedVertexProducer::~PFDisplacedVertexProducer | ( | ) |
Definition at line 99 of file PFDisplacedVertexProducer.cc.
{ }
void PFDisplacedVertexProducer::beginJob | ( | void | ) | [virtual] |
Reimplemented from edm::EDProducer.
Definition at line 104 of file PFDisplacedVertexProducer.cc.
{ }
void PFDisplacedVertexProducer::beginRun | ( | edm::Run & | r, |
const edm::EventSetup & | c | ||
) | [virtual] |
Reimplemented from edm::EDProducer.
Definition at line 107 of file PFDisplacedVertexProducer.cc.
{ }
void PFDisplacedVertexProducer::produce | ( | edm::Event & | iEvent, |
const edm::EventSetup & | iSetup | ||
) | [virtual] |
Implements edm::EDProducer.
Definition at line 112 of file PFDisplacedVertexProducer.cc.
References gather_cfg::cout, edm::EventID::event(), edm::EventSetup::get(), edm::Event::getByLabel(), edm::EventBase::id(), LogDebug, edm::ESHandle< T >::product(), edm::Event::put(), and edm::EventID::run().
{ LogDebug("PFDisplacedVertexProducer")<<"START event: "<<iEvent.id().event() <<" in run "<<iEvent.id().run()<<endl; // Prepare useful information for the Finder ESHandle<MagneticField> magField; iSetup.get<IdealMagneticFieldRecord>().get(magField); const MagneticField* theMagField = magField.product(); ESHandle<GlobalTrackingGeometry> globTkGeomHandle; iSetup.get<GlobalTrackingGeometryRecord>().get(globTkGeomHandle); ESHandle<TrackerGeometry> tkerGeomHandle; iSetup.get<TrackerDigiGeometryRecord>().get(tkerGeomHandle); Handle<reco::PFDisplacedVertexCandidateCollection> vertexCandidates; iEvent.getByLabel(inputTagVertexCandidates_, vertexCandidates); Handle< reco::VertexCollection > mainVertexHandle; iEvent.getByLabel(inputTagMainVertex_, mainVertexHandle); Handle< reco::BeamSpot > beamSpotHandle; iEvent.getByLabel(inputTagBeamSpot_, beamSpotHandle); // Fill useful event information for the Finder pfDisplacedVertexFinder_.setEdmParameters(theMagField, globTkGeomHandle, tkerGeomHandle); pfDisplacedVertexFinder_.setPrimaryVertex(mainVertexHandle, beamSpotHandle); pfDisplacedVertexFinder_.setInput(vertexCandidates); // Run the finder pfDisplacedVertexFinder_.findDisplacedVertices(); if(verbose_) { ostringstream str; //str<<pfDisplacedVertexFinder_<<endl; cout << pfDisplacedVertexFinder_<<endl; LogInfo("PFDisplacedVertexProducer") << str.str()<<endl; } auto_ptr< reco::PFDisplacedVertexCollection > pOutputDisplacedVertexCollection( pfDisplacedVertexFinder_.transferDisplacedVertices() ); iEvent.put(pOutputDisplacedVertexCollection); LogDebug("PFDisplacedVertexProducer")<<"STOP event: "<<iEvent.id().event() <<" in run "<<iEvent.id().run()<<endl; }
Definition at line 46 of file PFDisplacedVertexProducer.h.
Input tag for main vertex to cut of dxy of secondary tracks.
Definition at line 45 of file PFDisplacedVertexProducer.h.
Collection of DisplacedVertex Candidates used as input for the Displaced VertexFinder.
Definition at line 42 of file PFDisplacedVertexProducer.h.
Displaced Vertices finder.
Definition at line 52 of file PFDisplacedVertexProducer.h.
bool PFDisplacedVertexProducer::verbose_ [private] |
verbose ?
Definition at line 49 of file PFDisplacedVertexProducer.h.