CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
PFDisplacedVertexProducer Class Reference

Producer for DisplacedVertices. More...

#include <PFDisplacedVertexProducer.h>

Inheritance diagram for PFDisplacedVertexProducer:
edm::stream::EDProducer<>

Public Member Functions

 PFDisplacedVertexProducer (const edm::ParameterSet &)
 
void produce (edm::Event &, const edm::EventSetup &) override
 
 ~PFDisplacedVertexProducer () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

Private Attributes

const edm::ESGetToken< GlobalTrackingGeometry, GlobalTrackingGeometryRecordglobTkGeomToken_
 
edm::EDGetTokenT< reco::BeamSpotinputTagBeamSpot_
 
edm::EDGetTokenT< reco::VertexCollectioninputTagMainVertex_
 Input tag for main vertex to cut of dxy of secondary tracks. More...
 
edm::EDGetTokenT< reco::PFDisplacedVertexCandidateCollectioninputTagVertexCandidates_
 
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecordmagFieldToken_
 
PFDisplacedVertexFinder pfDisplacedVertexFinder_
 Displaced Vertices finder. More...
 
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecordtkerGeomToken_
 
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcdtkerTopoToken_
 
bool verbose_
 verbose ? More...
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 

Detailed Description

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.

Author
Maxime Gouzevitch
Date
November 2009

Definition at line 29 of file PFDisplacedVertexProducer.h.

Constructor & Destructor Documentation

◆ PFDisplacedVertexProducer()

PFDisplacedVertexProducer::PFDisplacedVertexProducer ( const edm::ParameterSet iConfig)
explicit

Definition at line 15 of file PFDisplacedVertexProducer.cc.

20  // --- Setup input collection names --- //
21 
23  consumes<reco::PFDisplacedVertexCandidateCollection>(iConfig.getParameter<InputTag>("vertexCandidatesLabel"));
24 
25  inputTagMainVertex_ = consumes<reco::VertexCollection>(iConfig.getParameter<InputTag>("mainVertexLabel"));
26 
27  inputTagBeamSpot_ = consumes<reco::BeamSpot>(iConfig.getParameter<InputTag>("offlineBeamSpotLabel"));
28 
29  verbose_ = iConfig.getUntrackedParameter<bool>("verbose");
30 
31  bool debug = iConfig.getUntrackedParameter<bool>("debug");
32 
33  // ------ Algo Parameters ------ //
34 
35  // Maximal transverse distance between two minimal
36  // approach points to be used together
37  double transvSize = iConfig.getParameter<double>("transvSize");
38 
39  // Maximal longitudinal distance between two minimal
40  // approach points to be used together
41  double longSize = iConfig.getParameter<double>("longSize");
42 
43  // Minimal radius below which we do not reconstruct interactions
44  // Typically the position of the first Pixel layer
45  double primaryVertexCut = iConfig.getParameter<double>("primaryVertexCut");
46 
47  // Radius at which no secondary tracks are availables
48  // in the barrel.For the moment we exclude the TOB barrel
49  // since 5-th track step starts the latest at first TOB
50  // layer.
51  double tobCut = iConfig.getParameter<double>("tobCut");
52 
53  // Radius at which no secondary tracks are availables
54  // in the endcaps.For the moment we exclude the TEC wheel.
55  double tecCut = iConfig.getParameter<double>("tecCut");
56 
57  // The minimal accepted weight for the tracks calculated in the
58  // adaptive vertex fitter to be associated to the displaced vertex
59  double minAdaptWeight = iConfig.getParameter<double>("minAdaptWeight");
60 
61  bool switchOff2TrackVertex = iConfig.getUntrackedParameter<bool>("switchOff2TrackVertex");
62 
63  edm::ParameterSet ps_trk = iConfig.getParameter<edm::ParameterSet>("tracksSelectorParameters");
64  edm::ParameterSet ps_vtx = iConfig.getParameter<edm::ParameterSet>("vertexIdentifierParameters");
65  edm::ParameterSet ps_avf = iConfig.getParameter<edm::ParameterSet>("avfParameters");
66 
67  produces<reco::PFDisplacedVertexCollection>();
68 
69  // Vertex Finder parameters -----------------------------------
76 }

References debug, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), inputTagBeamSpot_, inputTagMainVertex_, inputTagVertexCandidates_, particleFlowDisplacedVertex_cfi::longSize, particleFlowDisplacedVertex_cfi::minAdaptWeight, pfDisplacedVertexFinder_, particleFlowDisplacedVertex_cfi::primaryVertexCut, PFDisplacedVertexFinder::setAVFParameters(), PFDisplacedVertexFinder::setDebug(), PFDisplacedVertexFinder::setParameters(), PFDisplacedVertexFinder::setTracksSelector(), PFDisplacedVertexFinder::setVertexIdentifier(), particleFlowDisplacedVertex_cfi::switchOff2TrackVertex, particleFlowDisplacedVertex_cfi::tecCut, particleFlowDisplacedVertex_cfi::tobCut, particleFlowDisplacedVertex_cfi::transvSize, and verbose_.

◆ ~PFDisplacedVertexProducer()

PFDisplacedVertexProducer::~PFDisplacedVertexProducer ( )
override

Definition at line 78 of file PFDisplacedVertexProducer.cc.

78 {}

Member Function Documentation

◆ produce()

void PFDisplacedVertexProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
override

Definition at line 80 of file PFDisplacedVertexProducer.cc.

80  {
81  LogDebug("PFDisplacedVertexProducer") << "START event: " << iEvent.id().event() << " in run " << iEvent.id().run()
82  << endl;
83 
84  // Prepare useful information for the Finder
85 
86  auto const& theMagField = &iSetup.getData(magFieldToken_);
87  auto const& globTkGeom = &iSetup.getData(globTkGeomToken_);
88  auto const& tkerTopo = &iSetup.getData(tkerTopoToken_);
89  auto const& tkerGeom = &iSetup.getData(tkerGeomToken_);
90 
92  iEvent.getByToken(inputTagVertexCandidates_, vertexCandidates);
93 
94  Handle<reco::VertexCollection> mainVertexHandle;
95  iEvent.getByToken(inputTagMainVertex_, mainVertexHandle);
96 
97  Handle<reco::BeamSpot> beamSpotHandle;
98  iEvent.getByToken(inputTagBeamSpot_, beamSpotHandle);
99 
100  // Fill useful event information for the Finder
101  pfDisplacedVertexFinder_.setEdmParameters(theMagField, globTkGeom, tkerTopo, tkerGeom);
102  pfDisplacedVertexFinder_.setPrimaryVertex(mainVertexHandle, beamSpotHandle);
103  pfDisplacedVertexFinder_.setInput(vertexCandidates);
104 
105  // Run the finder
107 
108  if (verbose_) {
109  ostringstream str;
110  //str<<pfDisplacedVertexFinder_<<endl;
111  cout << pfDisplacedVertexFinder_ << endl;
112  LogInfo("PFDisplacedVertexProducer") << str.str() << endl;
113  }
114 
115  std::unique_ptr<reco::PFDisplacedVertexCollection> pOutputDisplacedVertexCollection(
117 
118  iEvent.put(std::move(pOutputDisplacedVertexCollection));
119 
120  LogDebug("PFDisplacedVertexProducer") << "STOP event: " << iEvent.id().event() << " in run " << iEvent.id().run()
121  << endl;
122 }

References gather_cfg::cout, PFDisplacedVertexFinder::findDisplacedVertices(), edm::EventSetup::getData(), globTkGeomToken_, iEvent, inputTagBeamSpot_, inputTagMainVertex_, inputTagVertexCandidates_, LogDebug, magFieldToken_, eostools::move(), pfDisplacedVertexFinder_, PFDisplacedVertexFinder::setEdmParameters(), PFDisplacedVertexFinder::setInput(), PFDisplacedVertexFinder::setPrimaryVertex(), str, tkerGeomToken_, tkerTopoToken_, PFDisplacedVertexFinder::transferDisplacedVertices(), and verbose_.

Member Data Documentation

◆ globTkGeomToken_

const edm::ESGetToken<GlobalTrackingGeometry, GlobalTrackingGeometryRecord> PFDisplacedVertexProducer::globTkGeomToken_
private

Definition at line 48 of file PFDisplacedVertexProducer.h.

Referenced by produce().

◆ inputTagBeamSpot_

edm::EDGetTokenT<reco::BeamSpot> PFDisplacedVertexProducer::inputTagBeamSpot_
private

Definition at line 45 of file PFDisplacedVertexProducer.h.

Referenced by PFDisplacedVertexProducer(), and produce().

◆ inputTagMainVertex_

edm::EDGetTokenT<reco::VertexCollection> PFDisplacedVertexProducer::inputTagMainVertex_
private

Input tag for main vertex to cut of dxy of secondary tracks.

Definition at line 44 of file PFDisplacedVertexProducer.h.

Referenced by PFDisplacedVertexProducer(), and produce().

◆ inputTagVertexCandidates_

edm::EDGetTokenT<reco::PFDisplacedVertexCandidateCollection> PFDisplacedVertexProducer::inputTagVertexCandidates_
private

Collection of DisplacedVertex Candidates used as input for the Displaced VertexFinder.

Definition at line 40 of file PFDisplacedVertexProducer.h.

Referenced by PFDisplacedVertexProducer(), and produce().

◆ magFieldToken_

const edm::ESGetToken<MagneticField, IdealMagneticFieldRecord> PFDisplacedVertexProducer::magFieldToken_
private

Definition at line 47 of file PFDisplacedVertexProducer.h.

Referenced by produce().

◆ pfDisplacedVertexFinder_

PFDisplacedVertexFinder PFDisplacedVertexProducer::pfDisplacedVertexFinder_
private

Displaced Vertices finder.

Definition at line 56 of file PFDisplacedVertexProducer.h.

Referenced by PFDisplacedVertexProducer(), and produce().

◆ tkerGeomToken_

const edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord> PFDisplacedVertexProducer::tkerGeomToken_
private

Definition at line 50 of file PFDisplacedVertexProducer.h.

Referenced by produce().

◆ tkerTopoToken_

const edm::ESGetToken<TrackerTopology, TrackerTopologyRcd> PFDisplacedVertexProducer::tkerTopoToken_
private

Definition at line 49 of file PFDisplacedVertexProducer.h.

Referenced by produce().

◆ verbose_

bool PFDisplacedVertexProducer::verbose_
private

verbose ?

Definition at line 53 of file PFDisplacedVertexProducer.h.

Referenced by PFDisplacedVertexProducer(), and produce().

PFDisplacedVertexProducer::tkerGeomToken_
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tkerGeomToken_
Definition: PFDisplacedVertexProducer.h:50
particleFlowDisplacedVertex_cfi.minAdaptWeight
minAdaptWeight
Definition: particleFlowDisplacedVertex_cfi.py:34
PFDisplacedVertexFinder::setEdmParameters
void setEdmParameters(const MagneticField *magField, edm::ESHandle< GlobalTrackingGeometry > globTkGeomHandle, const TrackerTopology *tkerTopo, const TrackerGeometry *tkerGeom)
Sets parameters for track extrapolation and hits study.
Definition: PFDisplacedVertexFinder.h:71
PFDisplacedVertexFinder::transferDisplacedVertices
std::unique_ptr< reco::PFDisplacedVertexCollection > transferDisplacedVertices()
Definition: PFDisplacedVertexFinder.h:100
gather_cfg.cout
cout
Definition: gather_cfg.py:144
PFDisplacedVertexProducer::inputTagMainVertex_
edm::EDGetTokenT< reco::VertexCollection > inputTagMainVertex_
Input tag for main vertex to cut of dxy of secondary tracks.
Definition: PFDisplacedVertexProducer.h:44
particleFlowDisplacedVertex_cfi.transvSize
transvSize
Definition: particleFlowDisplacedVertex_cfi.py:14
particleFlowDisplacedVertex_cfi.tecCut
tecCut
Definition: particleFlowDisplacedVertex_cfi.py:29
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
PFDisplacedVertexFinder::findDisplacedVertices
void findDisplacedVertices()
-----— Main function which find vertices -----— ///
Definition: PFDisplacedVertexFinder.cc:54
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
edm::Handle
Definition: AssociativeIterator.h:50
PFDisplacedVertexProducer::inputTagBeamSpot_
edm::EDGetTokenT< reco::BeamSpot > inputTagBeamSpot_
Definition: PFDisplacedVertexProducer.h:45
PFDisplacedVertexProducer::inputTagVertexCandidates_
edm::EDGetTokenT< reco::PFDisplacedVertexCandidateCollection > inputTagVertexCandidates_
Definition: PFDisplacedVertexProducer.h:40
PFDisplacedVertexProducer::magFieldToken_
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magFieldToken_
Definition: PFDisplacedVertexProducer.h:47
particleFlowDisplacedVertex_cfi.tobCut
tobCut
Definition: particleFlowDisplacedVertex_cfi.py:25
debug
#define debug
Definition: HDRShower.cc:19
str
#define str(s)
Definition: TestProcessor.cc:52
PFDisplacedVertexFinder::setDebug
void setDebug(bool debug)
Sets debug printout flag.
Definition: PFDisplacedVertexFinder.h:68
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:233
edm::ParameterSet
Definition: ParameterSet.h:47
PFDisplacedVertexFinder::setTracksSelector
void setTracksSelector(const edm::ParameterSet &ps)
Definition: PFDisplacedVertexFinder.h:81
iEvent
int iEvent
Definition: GenABIO.cc:224
PFDisplacedVertexFinder::setAVFParameters
void setAVFParameters(const edm::ParameterSet &ps)
Definition: PFDisplacedVertexFinder.h:90
particleFlowDisplacedVertex_cfi.longSize
longSize
Definition: particleFlowDisplacedVertex_cfi.py:17
PFDisplacedVertexProducer::pfDisplacedVertexFinder_
PFDisplacedVertexFinder pfDisplacedVertexFinder_
Displaced Vertices finder.
Definition: PFDisplacedVertexProducer.h:56
PFDisplacedVertexProducer::tkerTopoToken_
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tkerTopoToken_
Definition: PFDisplacedVertexProducer.h:49
edm::EventSetup::getData
bool getData(T &iHolder) const
Definition: EventSetup.h:127
particleFlowDisplacedVertex_cfi.primaryVertexCut
primaryVertexCut
Definition: particleFlowDisplacedVertex_cfi.py:21
PFDisplacedVertexFinder::setPrimaryVertex
void setPrimaryVertex(edm::Handle< reco::VertexCollection > mainVertexHandle, edm::Handle< reco::BeamSpot > beamSpotHandle)
Definition: PFDisplacedVertexFinder.h:85
PFDisplacedVertexFinder::setInput
void setInput(const edm::Handle< reco::PFDisplacedVertexCandidateCollection > &)
Set input collections of tracks.
Definition: PFDisplacedVertexFinder.cc:43
eostools.move
def move(src, dest)
Definition: eostools.py:511
PFDisplacedVertexProducer::verbose_
bool verbose_
verbose ?
Definition: PFDisplacedVertexProducer.h:53
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
PFDisplacedVertexFinder::setVertexIdentifier
void setVertexIdentifier(const edm::ParameterSet &ps)
Definition: PFDisplacedVertexFinder.h:83
PFDisplacedVertexFinder::setParameters
void setParameters(double transvSize, double longSize, double primaryVertexCut, double tobCut, double tecCut, double minAdaptWeight, bool switchOff2TrackVertex)
-----— Set different algo parameters -----— ///
Definition: PFDisplacedVertexFinder.h:51
DeDxTools::esConsumes
ESGetTokenH3DDVariant esConsumes(std::string const &Reccord, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
edm::InputTag
Definition: InputTag.h:15
particleFlowDisplacedVertex_cfi.switchOff2TrackVertex
switchOff2TrackVertex
Definition: particleFlowDisplacedVertex_cfi.py:38
PFDisplacedVertexProducer::globTkGeomToken_
const edm::ESGetToken< GlobalTrackingGeometry, GlobalTrackingGeometryRecord > globTkGeomToken_
Definition: PFDisplacedVertexProducer.h:48