CMS 3D CMS Logo

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

Producer for DisplacedVertices. More...

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
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 

Private Attributes

const edm::ESGetToken< GlobalTrackingGeometry, GlobalTrackingGeometryRecordglobTkGeomToken_
 
const edm::EDGetTokenT< reco::BeamSpotinputTagBeamSpot_
 
const edm::EDGetTokenT< reco::VertexCollectioninputTagMainVertex_
 Input tag for main vertex to cut of dxy of secondary tracks. More...
 
const 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<>
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::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 28 of file PFDisplacedVertexProducer.cc.

Constructor & Destructor Documentation

◆ PFDisplacedVertexProducer()

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

Definition at line 151 of file PFDisplacedVertexProducer.cc.

References debug, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), pfDisplacedVertexFinder_, PFDisplacedVertexFinder::setAVFParameters(), PFDisplacedVertexFinder::setDebug(), PFDisplacedVertexFinder::setParameters(), PFDisplacedVertexFinder::setTracksSelector(), PFDisplacedVertexFinder::setVertexIdentifier(), and verbose_.

152  : inputTagVertexCandidates_(consumes<reco::PFDisplacedVertexCandidateCollection>(
153  iConfig.getParameter<InputTag>("vertexCandidatesLabel"))),
154  inputTagMainVertex_(consumes<reco::VertexCollection>(iConfig.getParameter<InputTag>("mainVertexLabel"))),
155  inputTagBeamSpot_(consumes<reco::BeamSpot>(iConfig.getParameter<InputTag>("offlineBeamSpotLabel"))),
160  // --- Setup input collection names --- //
161 
162  verbose_ = iConfig.getUntrackedParameter<bool>("verbose");
163 
164  bool debug = iConfig.getUntrackedParameter<bool>("debug");
165 
166  // ------ Algo Parameters ------ //
167 
168  // Maximal transverse distance between two minimal
169  // approach points to be used together
170  double transvSize = iConfig.getParameter<double>("transvSize");
171 
172  // Maximal longitudinal distance between two minimal
173  // approach points to be used together
174  double longSize = iConfig.getParameter<double>("longSize");
175 
176  // Minimal radius below which we do not reconstruct interactions
177  // Typically the position of the first Pixel layer
178  double primaryVertexCut = iConfig.getParameter<double>("primaryVertexCut");
179 
180  // Radius at which no secondary tracks are availables
181  // in the barrel.For the moment we exclude the TOB barrel
182  // since 5-th track step starts the latest at first TOB
183  // layer.
184  double tobCut = iConfig.getParameter<double>("tobCut");
185 
186  // Radius at which no secondary tracks are availables
187  // in the endcaps.For the moment we exclude the TEC wheel.
188  double tecCut = iConfig.getParameter<double>("tecCut");
189 
190  // The minimal accepted weight for the tracks calculated in the
191  // adaptive vertex fitter to be associated to the displaced vertex
192  double minAdaptWeight = iConfig.getParameter<double>("minAdaptWeight");
193 
194  bool switchOff2TrackVertex = iConfig.getUntrackedParameter<bool>("switchOff2TrackVertex");
195 
196  edm::ParameterSet ps_trk = iConfig.getParameter<edm::ParameterSet>("tracksSelectorParameters");
197  edm::ParameterSet ps_vtx = iConfig.getParameter<edm::ParameterSet>("vertexIdentifierParameters");
198  edm::ParameterSet ps_avf = iConfig.getParameter<edm::ParameterSet>("avfParameters");
199 
200  produces<reco::PFDisplacedVertexCollection>();
201 
202  // Vertex Finder parameters -----------------------------------
205  transvSize, longSize, primaryVertexCut, tobCut, tecCut, minAdaptWeight, switchOff2TrackVertex);
209 }
const edm::EDGetTokenT< reco::BeamSpot > inputTagBeamSpot_
const edm::ESGetToken< GlobalTrackingGeometry, GlobalTrackingGeometryRecord > globTkGeomToken_
ESGetTokenH3DDVariant esConsumes(std::string const &Record, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
PFDisplacedVertexFinder pfDisplacedVertexFinder_
Displaced Vertices finder.
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magFieldToken_
const edm::EDGetTokenT< reco::PFDisplacedVertexCandidateCollection > inputTagVertexCandidates_
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tkerGeomToken_
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tkerTopoToken_
T getUntrackedParameter(std::string const &, T const &) const
const edm::EDGetTokenT< reco::VertexCollection > inputTagMainVertex_
Input tag for main vertex to cut of dxy of secondary tracks.
void setTracksSelector(const edm::ParameterSet &ps)
void setDebug(bool debug)
Sets debug printout flag.
void setAVFParameters(const edm::ParameterSet &ps)
#define debug
Definition: HDRShower.cc:19
void setParameters(double transvSize, double longSize, double primaryVertexCut, double tobCut, double tecCut, double minAdaptWeight, bool switchOff2TrackVertex)
--—— Set different algo parameters --—— ///
void setVertexIdentifier(const edm::ParameterSet &ps)

◆ ~PFDisplacedVertexProducer()

PFDisplacedVertexProducer::~PFDisplacedVertexProducer ( )
override

Definition at line 211 of file PFDisplacedVertexProducer.cc.

211 {}

Member Function Documentation

◆ fillDescriptions()

void PFDisplacedVertexProducer::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 62 of file PFDisplacedVertexProducer.cc.

References edm::ConfigurationDescriptions::add(), submitPVResolutionJobs::desc, muonDTDigis_cfi::pset, and AlCaHLTBitMon_QueryRunRegistry::string.

62  {
64  desc.add<edm::InputTag>("vertexCandidatesLabel", {"particleFlowDisplacedVertexCandidate"});
65  // verbosity
66  desc.addUntracked<bool>("verbose", false);
67  // Debug flag
68  desc.addUntracked<bool>("debug", false);
69  // maximum transverse distance between two points to be used in Seed
70  desc.add<double>("transvSize", 1.0);
71  // maximum longitudinal distance between two points to be used in Seed
72  desc.add<double>("longSize", 5);
73  // minimal radius below which we do not reconstruct interactions
74  // typically the position of the first Pixel layer or beam pipe
75  desc.add<double>("primaryVertexCut", 1.8);
76  // radius below which we don't want to reconstruct displaced
77  // vertices
78  desc.add<double>("tobCut", 100);
79  // z below which we don't want to reconstruct displaced
80  // vertices
81  desc.add<double>("tecCut", 220);
82  // the minimal accepted weight for the tracks calculated in the
83  // adaptive vertex fitter to be associated to the displaced vertex
84  // this correspond to the sigmacut of 6
85  desc.add<double>("minAdaptWeight", 0.5);
86  // this flag is designed to reduce the timing of the algorithm in the high pile-up conditions. 2 tracks
87  // vertices are the most sensitives to the pile-ups.
88  desc.addUntracked<bool>("switchOff2TrackVertex", true);
89  // ------------ Paramemeters for the track selection ------------
90  // Primary vertex information used for dxy calculation
91  desc.add<edm::InputTag>("mainVertexLabel", {"offlinePrimaryVertices", ""});
92  desc.add<edm::InputTag>("offlineBeamSpotLabel", {"offlineBeamSpot", ""});
93  // Parameters used to apply cuts
94  {
96  pset.add<bool>("bSelectTracks", true);
97  // If a track is high purity it is always kept
98  pset.add<std::string>("quality", "HighPurity");
99  // Following cuts are applyed to non high purity tracks
100  // nChi2_max and pt_min cuts are applyed to the primary and secondary tracks
101  pset.add<double>("nChi2_max", 5.);
102  pset.add<double>("pt_min", 0.2);
103  // nChi2_min applyed only to primary tracks which may be short
104  // remove fake pixel triplets
105  pset.add<double>("nChi2_min", 0.5);
106  // Cuts applyed to the secondary tracks long and displaced
107  pset.add<double>("dxy_min", 0.2);
108  pset.add<int>("nHits_min", 6);
109  pset.add<int>("nOuterHits_max", 9);
110  desc.add<edm::ParameterSetDescription>("tracksSelectorParameters", pset);
111  }
112  // ------------ Paramemeters for the vertex identification ------------
113  {
115  pset.add<bool>("bIdentifyVertices", true);
116  // Minimal sum pt of secondary tracks for displaced vertices.
117  // Below this value we find either loopers splitted in two parts eiter
118  // fake vertices in forward direction
119  pset.add<double>("pt_min", 0.5);
120  // Minimal pT and log10(P_primary/P_secondary) for primary track in kinks (Primary+Secondary)
121  // which are not identifier as K-+ decays
122  pset.add<double>("pt_kink_min", 3.0);
123  pset.add<double>("logPrimSec_min", 0.0);
124  // maximum absoluta value of eta for loopers
125  pset.add<double>("looper_eta_max", 0.1);
126  // Masses cuts for selections
127  // CVmin K0min K0max K-min K-max Ldmin Ldmax Nuclmin_ee
128  pset.add<std::vector<double>>("masses", {0.050, 0.485, 0.515, 0.480, 0.520, 1.107, 1.125, 0.200});
129  // Angle between the primaryVertex-secondaryVertex direction and secondary tracks direction
130  // this angle means that the final system shall propagate in the same direction than initial system
131  // all_max, CV and V0 max
132  pset.add<std::vector<double>>("angles", {15, 15});
133  desc.add<edm::ParameterSetDescription>("vertexIdentifierParameters", pset);
134  }
135  // Adaptive Vertex Fitter parameters identical to the default ones except sigmacut.
136  // The default value is sigmacut = 3 too tight for displaced vertices
137  // see CMS NOTE-2008/033 for more details
138  {
140  pset.add<double>("sigmacut", 6.);
141  pset.add<double>("Tini", 256.);
142  pset.add<double>("ratio", 0.25);
143  desc.add<edm::ParameterSetDescription>("avfParameters", pset);
144  }
145  descriptions.add("particleFlowDisplacedVertex", desc);
146 }
void add(std::string const &label, ParameterSetDescription const &psetDescription)

◆ produce()

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

Definition at line 213 of file PFDisplacedVertexProducer.cc.

References 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_.

213  {
214  LogDebug("PFDisplacedVertexProducer") << "START event: " << iEvent.id().event() << " in run " << iEvent.id().run();
215 
216  // Prepare useful information for the Finder
217 
218  auto const& theMagField = &iSetup.getData(magFieldToken_);
219  auto const& globTkGeom = &iSetup.getData(globTkGeomToken_);
220  auto const& tkerTopo = &iSetup.getData(tkerTopoToken_);
221  auto const& tkerGeom = &iSetup.getData(tkerGeomToken_);
222 
223  auto const& vertexCandidates = iEvent.getHandle(inputTagVertexCandidates_);
224  auto const& mainVertexHandle = iEvent.getHandle(inputTagMainVertex_);
225  auto const& beamSpotHandle = iEvent.getHandle(inputTagBeamSpot_);
226 
227  // Fill useful event information for the Finder
228  pfDisplacedVertexFinder_.setEdmParameters(theMagField, globTkGeom, tkerTopo, tkerGeom);
229  pfDisplacedVertexFinder_.setPrimaryVertex(mainVertexHandle, beamSpotHandle);
230  pfDisplacedVertexFinder_.setInput(vertexCandidates);
231 
232  // Run the finder
234 
235  if (verbose_) {
236  ostringstream str;
238  edm::LogInfo("PFDisplacedVertexProducer") << str.str();
239  }
240 
241  std::unique_ptr<reco::PFDisplacedVertexCollection> pOutputDisplacedVertexCollection(
243 
244  iEvent.put(std::move(pOutputDisplacedVertexCollection));
245 
246  LogDebug("PFDisplacedVertexProducer") << "STOP event: " << iEvent.id().event() << " in run " << iEvent.id().run();
247 }
const edm::EDGetTokenT< reco::BeamSpot > inputTagBeamSpot_
const edm::ESGetToken< GlobalTrackingGeometry, GlobalTrackingGeometryRecord > globTkGeomToken_
void setEdmParameters(const MagneticField *magField, edm::ESHandle< GlobalTrackingGeometry > globTkGeomHandle, const TrackerTopology *tkerTopo, const TrackerGeometry *tkerGeom)
Sets parameters for track extrapolation and hits study.
PFDisplacedVertexFinder pfDisplacedVertexFinder_
Displaced Vertices finder.
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magFieldToken_
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Definition: EventSetup.h:119
const edm::EDGetTokenT< reco::PFDisplacedVertexCandidateCollection > inputTagVertexCandidates_
std::unique_ptr< reco::PFDisplacedVertexCollection > transferDisplacedVertices()
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tkerGeomToken_
void findDisplacedVertices()
-----— Main function which find vertices -----— ///
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tkerTopoToken_
const edm::EDGetTokenT< reco::VertexCollection > inputTagMainVertex_
Input tag for main vertex to cut of dxy of secondary tracks.
int iEvent
Definition: GenABIO.cc:224
void setInput(const edm::Handle< reco::PFDisplacedVertexCandidateCollection > &)
Set input collections of tracks.
Log< level::Info, false > LogInfo
void setPrimaryVertex(edm::Handle< reco::VertexCollection > mainVertexHandle, edm::Handle< reco::BeamSpot > beamSpotHandle)
#define str(s)
def move(src, dest)
Definition: eostools.py:511
#define LogDebug(id)

Member Data Documentation

◆ globTkGeomToken_

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

Definition at line 48 of file PFDisplacedVertexProducer.cc.

Referenced by produce().

◆ inputTagBeamSpot_

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

Definition at line 45 of file PFDisplacedVertexProducer.cc.

Referenced by produce().

◆ inputTagMainVertex_

const 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.cc.

Referenced by produce().

◆ inputTagVertexCandidates_

const 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.cc.

Referenced by produce().

◆ magFieldToken_

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

Definition at line 47 of file PFDisplacedVertexProducer.cc.

Referenced by produce().

◆ pfDisplacedVertexFinder_

PFDisplacedVertexFinder PFDisplacedVertexProducer::pfDisplacedVertexFinder_
private

Displaced Vertices finder.

Definition at line 56 of file PFDisplacedVertexProducer.cc.

Referenced by PFDisplacedVertexProducer(), and produce().

◆ tkerGeomToken_

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

Definition at line 50 of file PFDisplacedVertexProducer.cc.

Referenced by produce().

◆ tkerTopoToken_

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

Definition at line 49 of file PFDisplacedVertexProducer.cc.

Referenced by produce().

◆ verbose_

bool PFDisplacedVertexProducer::verbose_
private

verbose ?

Definition at line 53 of file PFDisplacedVertexProducer.cc.

Referenced by PFDisplacedVertexProducer(), and produce().