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

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_
 
PFDisplacedVertexFinder pfDisplacedVertexFinder_
 Displaced Vertices finder. More...
 
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 25 of file PFDisplacedVertexProducer.h.

Constructor & Destructor Documentation

◆ PFDisplacedVertexProducer()

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

Definition at line 27 of file PFDisplacedVertexProducer.cc.

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

References debug, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), particleFlowDisplacedVertex_cfi::longSize, particleFlowDisplacedVertex_cfi::minAdaptWeight, particleFlowDisplacedVertex_cfi::primaryVertexCut, particleFlowDisplacedVertex_cfi::switchOff2TrackVertex, particleFlowDisplacedVertex_cfi::tecCut, particleFlowDisplacedVertex_cfi::tobCut, and particleFlowDisplacedVertex_cfi::transvSize.

◆ ~PFDisplacedVertexProducer()

PFDisplacedVertexProducer::~PFDisplacedVertexProducer ( )
override

Definition at line 86 of file PFDisplacedVertexProducer.cc.

86 {}

Member Function Documentation

◆ produce()

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

Definition at line 88 of file PFDisplacedVertexProducer.cc.

88  {
89  LogDebug("PFDisplacedVertexProducer") << "START event: " << iEvent.id().event() << " in run " << iEvent.id().run()
90  << endl;
91 
92  // Prepare useful information for the Finder
93 
94  ESHandle<MagneticField> magField;
95  iSetup.get<IdealMagneticFieldRecord>().get(magField);
96  const MagneticField* theMagField = magField.product();
97 
98  ESHandle<GlobalTrackingGeometry> globTkGeomHandle;
99  iSetup.get<GlobalTrackingGeometryRecord>().get(globTkGeomHandle);
100 
101  ESHandle<TrackerTopology> tkerTopoHandle;
102  iSetup.get<TrackerTopologyRcd>().get(tkerTopoHandle);
103 
104  ESHandle<TrackerGeometry> tkerGeomHandle;
105  iSetup.get<TrackerDigiGeometryRecord>().get(tkerGeomHandle);
106 
108  iEvent.getByToken(inputTagVertexCandidates_, vertexCandidates);
109 
110  Handle<reco::VertexCollection> mainVertexHandle;
111  iEvent.getByToken(inputTagMainVertex_, mainVertexHandle);
112 
113  Handle<reco::BeamSpot> beamSpotHandle;
114  iEvent.getByToken(inputTagBeamSpot_, beamSpotHandle);
115 
116  // Fill useful event information for the Finder
118  theMagField, globTkGeomHandle, tkerTopoHandle.product(), tkerGeomHandle.product());
119  pfDisplacedVertexFinder_.setPrimaryVertex(mainVertexHandle, beamSpotHandle);
120  pfDisplacedVertexFinder_.setInput(vertexCandidates);
121 
122  // Run the finder
124 
125  if (verbose_) {
126  ostringstream str;
127  //str<<pfDisplacedVertexFinder_<<endl;
128  cout << pfDisplacedVertexFinder_ << endl;
129  LogInfo("PFDisplacedVertexProducer") << str.str() << endl;
130  }
131 
132  std::unique_ptr<reco::PFDisplacedVertexCollection> pOutputDisplacedVertexCollection(
134 
135  iEvent.put(std::move(pOutputDisplacedVertexCollection));
136 
137  LogDebug("PFDisplacedVertexProducer") << "STOP event: " << iEvent.id().event() << " in run " << iEvent.id().run()
138  << endl;
139 }

References gather_cfg::cout, edm::EventSetup::get(), get, iEvent, LogDebug, eostools::move(), edm::ESHandle< T >::product(), and str.

Member Data Documentation

◆ inputTagBeamSpot_

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

Definition at line 41 of file PFDisplacedVertexProducer.h.

◆ inputTagMainVertex_

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

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

Definition at line 40 of file PFDisplacedVertexProducer.h.

◆ inputTagVertexCandidates_

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

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

Definition at line 36 of file PFDisplacedVertexProducer.h.

◆ pfDisplacedVertexFinder_

PFDisplacedVertexFinder PFDisplacedVertexProducer::pfDisplacedVertexFinder_
private

Displaced Vertices finder.

Definition at line 47 of file PFDisplacedVertexProducer.h.

◆ verbose_

bool PFDisplacedVertexProducer::verbose_
private

verbose ?

Definition at line 44 of file PFDisplacedVertexProducer.h.

edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
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:40
particleFlowDisplacedVertex_cfi.transvSize
transvSize
Definition: particleFlowDisplacedVertex_cfi.py:14
particleFlowDisplacedVertex_cfi.tecCut
tecCut
Definition: particleFlowDisplacedVertex_cfi.py:29
GlobalTrackingGeometryRecord
Definition: GlobalTrackingGeometryRecord.h:17
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:41
PFDisplacedVertexProducer::inputTagVertexCandidates_
edm::EDGetTokenT< reco::PFDisplacedVertexCandidateCollection > inputTagVertexCandidates_
Definition: PFDisplacedVertexProducer.h:36
particleFlowDisplacedVertex_cfi.tobCut
tobCut
Definition: particleFlowDisplacedVertex_cfi.py:25
IdealMagneticFieldRecord
Definition: IdealMagneticFieldRecord.h:11
debug
#define debug
Definition: HDRShower.cc:19
edm::EventSetup::get
T get() const
Definition: EventSetup.h:80
TrackerDigiGeometryRecord
Definition: TrackerDigiGeometryRecord.h:15
str
#define str(s)
Definition: TestProcessor.cc:51
edm::ESHandle< MagneticField >
PFDisplacedVertexFinder::setDebug
void setDebug(bool debug)
Sets debug printout flag.
Definition: PFDisplacedVertexFinder.h:68
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:223
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:47
get
#define get
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:44
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
TrackerTopologyRcd
Definition: TrackerTopologyRcd.h:10
MagneticField
Definition: MagneticField.h:19
edm::InputTag
Definition: InputTag.h:15
particleFlowDisplacedVertex_cfi.switchOff2TrackVertex
switchOff2TrackVertex
Definition: particleFlowDisplacedVertex_cfi.py:38