CMS 3D CMS Logo

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

Producer for DisplacedVertices. More...

#include <PFDisplacedVertexCandidateProducer.h>

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

Public Member Functions

 PFDisplacedVertexCandidateProducer (const edm::ParameterSet &)
 
void produce (edm::Event &, const edm::EventSetup &) override
 
 ~PFDisplacedVertexCandidateProducer () 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::TrackCollectioninputTagTracks_
 Reco Tracks used to spot the nuclear interactions. More...
 
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecordmagneticFieldToken_
 
PFDisplacedVertexCandidateFinder pfDisplacedVertexCandidateFinder_
 Displaced Vertex Candidates 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 DisplacedVertexCandidateFinder. This Finder loop recursively over reco::Tracks to find those which are linked together by the criterion which is by default the minimal approach distance.

Author
Maxime Gouzevitch
Date
November 2009

Definition at line 27 of file PFDisplacedVertexCandidateProducer.h.

Constructor & Destructor Documentation

◆ PFDisplacedVertexCandidateProducer()

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

Definition at line 13 of file PFDisplacedVertexCandidateProducer.cc.

15  // --- Setup input collection names --- //
16  inputTagTracks_ = consumes<reco::TrackCollection>(iConfig.getParameter<InputTag>("trackCollection"));
17 
18  inputTagMainVertex_ = consumes<reco::VertexCollection>(iConfig.getParameter<InputTag>("mainVertexLabel"));
19 
20  inputTagBeamSpot_ = consumes<reco::BeamSpot>(iConfig.getParameter<InputTag>("offlineBeamSpotLabel"));
21 
22  verbose_ = iConfig.getUntrackedParameter<bool>("verbose");
23 
24  bool debug = iConfig.getUntrackedParameter<bool>("debug");
25 
26  // ------ Algo Parameters ------ //
27 
28  // Distance of minimal approach below which
29  // two tracks are considered as linked together
30  double dcaCut = iConfig.getParameter<double>("dcaCut");
31 
32  // Do not reconstruct vertices wich are
33  // too close to the beam pipe
34  double primaryVertexCut = iConfig.getParameter<double>("primaryVertexCut");
35 
36  //maximum distance between the DCA Point and the inner hit of the track
37  double dcaPInnerHitCut = iConfig.getParameter<double>("dcaPInnerHitCut");
38 
39  edm::ParameterSet ps_trk = iConfig.getParameter<edm::ParameterSet>("tracksSelectorParameters");
40 
41  // Collection to be produced
42  produces<reco::PFDisplacedVertexCandidateCollection>();
43 
44  // Vertex Finder parameters -----------------------------------
47 }

References particleFlowDisplacedVertexCandidate_cfi::dcaCut, particleFlowDisplacedVertexCandidate_cfi::dcaPInnerHitCut, debug, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), inputTagBeamSpot_, inputTagMainVertex_, inputTagTracks_, pfDisplacedVertexCandidateFinder_, particleFlowDisplacedVertex_cfi::primaryVertexCut, PFDisplacedVertexCandidateFinder::setDebug(), PFDisplacedVertexCandidateFinder::setParameters(), and verbose_.

◆ ~PFDisplacedVertexCandidateProducer()

PFDisplacedVertexCandidateProducer::~PFDisplacedVertexCandidateProducer ( )
override

Definition at line 49 of file PFDisplacedVertexCandidateProducer.cc.

49 {}

Member Function Documentation

◆ produce()

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

Definition at line 51 of file PFDisplacedVertexCandidateProducer.cc.

51  {
52  LogDebug("PFDisplacedVertexCandidateProducer")
53  << "START event: " << iEvent.id().event() << " in run " << iEvent.id().run() << endl;
54 
55  // Prepare and fill useful event information for the Finder
56  auto const& theMagField = &iSetup.getData(magneticFieldToken_);
57 
60 
61  Handle<reco::VertexCollection> mainVertexHandle;
62  iEvent.getByToken(inputTagMainVertex_, mainVertexHandle);
63 
64  Handle<reco::BeamSpot> beamSpotHandle;
65  iEvent.getByToken(inputTagBeamSpot_, beamSpotHandle);
66 
67  pfDisplacedVertexCandidateFinder_.setPrimaryVertex(mainVertexHandle, beamSpotHandle);
69 
70  // Run the finder
72 
73  if (verbose_) {
74  ostringstream str;
77  LogInfo("PFDisplacedVertexCandidateProducer") << str.str() << endl;
78  }
79 
80  std::unique_ptr<reco::PFDisplacedVertexCandidateCollection> pOutputDisplacedVertexCandidateCollection(
82 
83  iEvent.put(std::move(pOutputDisplacedVertexCandidateCollection));
84 
85  LogDebug("PFDisplacedVertexCandidateProducer")
86  << "STOP event: " << iEvent.id().event() << " in run " << iEvent.id().run() << endl;
87 }

References gather_cfg::cout, PFDisplacedVertexCandidateFinder::findDisplacedVertexCandidates(), edm::EventSetup::getData(), iEvent, inputTagBeamSpot_, inputTagMainVertex_, inputTagTracks_, LogDebug, magneticFieldToken_, eostools::move(), pfDisplacedVertexCandidateFinder_, PFDisplacedVertexCandidateFinder::setInput(), PFDisplacedVertexCandidateFinder::setPrimaryVertex(), str, duplicaterechits_cfi::trackCollection, PFDisplacedVertexCandidateFinder::transferVertexCandidates(), and verbose_.

Member Data Documentation

◆ inputTagBeamSpot_

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

◆ inputTagMainVertex_

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

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

Definition at line 40 of file PFDisplacedVertexCandidateProducer.h.

Referenced by PFDisplacedVertexCandidateProducer(), and produce().

◆ inputTagTracks_

edm::EDGetTokenT<reco::TrackCollection> PFDisplacedVertexCandidateProducer::inputTagTracks_
private

Reco Tracks used to spot the nuclear interactions.

Definition at line 37 of file PFDisplacedVertexCandidateProducer.h.

Referenced by PFDisplacedVertexCandidateProducer(), and produce().

◆ magneticFieldToken_

const edm::ESGetToken<MagneticField, IdealMagneticFieldRecord> PFDisplacedVertexCandidateProducer::magneticFieldToken_
private

Definition at line 43 of file PFDisplacedVertexCandidateProducer.h.

Referenced by produce().

◆ pfDisplacedVertexCandidateFinder_

PFDisplacedVertexCandidateFinder PFDisplacedVertexCandidateProducer::pfDisplacedVertexCandidateFinder_
private

Displaced Vertex Candidates finder.

Definition at line 49 of file PFDisplacedVertexCandidateProducer.h.

Referenced by PFDisplacedVertexCandidateProducer(), and produce().

◆ verbose_

bool PFDisplacedVertexCandidateProducer::verbose_
private

verbose ?

Definition at line 46 of file PFDisplacedVertexCandidateProducer.h.

Referenced by PFDisplacedVertexCandidateProducer(), and produce().

PFDisplacedVertexCandidateFinder::setPrimaryVertex
void setPrimaryVertex(edm::Handle< reco::VertexCollection > mainVertexHandle, edm::Handle< reco::BeamSpot > beamSpotHandle)
Definition: PFDisplacedVertexCandidateFinder.cc:32
PFDisplacedVertexCandidateFinder::setInput
void setInput(const edm::Handle< reco::TrackCollection > &trackh, const MagneticField *magField)
Definition: PFDisplacedVertexCandidateFinder.cc:49
gather_cfg.cout
cout
Definition: gather_cfg.py:144
PFDisplacedVertexCandidateProducer::inputTagTracks_
edm::EDGetTokenT< reco::TrackCollection > inputTagTracks_
Reco Tracks used to spot the nuclear interactions.
Definition: PFDisplacedVertexCandidateProducer.h:37
PFDisplacedVertexCandidateProducer::verbose_
bool verbose_
verbose ?
Definition: PFDisplacedVertexCandidateProducer.h:46
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
PFDisplacedVertexCandidateProducer::pfDisplacedVertexCandidateFinder_
PFDisplacedVertexCandidateFinder pfDisplacedVertexCandidateFinder_
Displaced Vertex Candidates finder.
Definition: PFDisplacedVertexCandidateProducer.h:49
edm::Handle< reco::TrackCollection >
PFDisplacedVertexCandidateProducer::inputTagMainVertex_
edm::EDGetTokenT< reco::VertexCollection > inputTagMainVertex_
Input tag for main vertex to cut of dxy of secondary tracks.
Definition: PFDisplacedVertexCandidateProducer.h:40
debug
#define debug
Definition: HDRShower.cc:19
particleFlowDisplacedVertexCandidate_cfi.dcaPInnerHitCut
dcaPInnerHitCut
Definition: particleFlowDisplacedVertexCandidate_cfi.py:24
str
#define str(s)
Definition: TestProcessor.cc:52
particleFlowDisplacedVertexCandidate_cfi.dcaCut
dcaCut
Definition: particleFlowDisplacedVertexCandidate_cfi.py:17
PFDisplacedVertexCandidateFinder::setDebug
void setDebug(bool debug)
sets debug printout flag
Definition: PFDisplacedVertexCandidateFinder.h:53
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:233
PFDisplacedVertexCandidateFinder::setParameters
void setParameters(double dcaCut, double primaryVertexCut, double dcaPInnerHitCut, const edm::ParameterSet &ps_trk)
------— Set different algo parameters ---— ///
Definition: PFDisplacedVertexCandidateFinder.h:42
edm::ParameterSet
Definition: ParameterSet.h:47
PFDisplacedVertexCandidateProducer::inputTagBeamSpot_
edm::EDGetTokenT< reco::BeamSpot > inputTagBeamSpot_
Definition: PFDisplacedVertexCandidateProducer.h:41
duplicaterechits_cfi.trackCollection
trackCollection
Definition: duplicaterechits_cfi.py:4
iEvent
int iEvent
Definition: GenABIO.cc:224
edm::EventSetup::getData
bool getData(T &iHolder) const
Definition: EventSetup.h:127
particleFlowDisplacedVertex_cfi.primaryVertexCut
primaryVertexCut
Definition: particleFlowDisplacedVertex_cfi.py:21
PFDisplacedVertexCandidateProducer::magneticFieldToken_
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magneticFieldToken_
Definition: PFDisplacedVertexCandidateProducer.h:43
eostools.move
def move(src, dest)
Definition: eostools.py:511
PFDisplacedVertexCandidateFinder::transferVertexCandidates
std::unique_ptr< reco::PFDisplacedVertexCandidateCollection > transferVertexCandidates()
Definition: PFDisplacedVertexCandidateFinder.h:60
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
PFDisplacedVertexCandidateFinder::findDisplacedVertexCandidates
void findDisplacedVertexCandidates()
-----— Main function which find vertices -----— ///
Definition: PFDisplacedVertexCandidateFinder.cc:81
DeDxTools::esConsumes
ESGetTokenH3DDVariant esConsumes(std::string const &Reccord, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
edm::InputTag
Definition: InputTag.h:15