CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
L1TrackSelectionProducer::TTTrackDeltaZMaxSelector Struct Reference

Public Member Functions

bool operator() (const L1Track &t, const l1t::Vertex &v) const
 
 TTTrackDeltaZMaxSelector (const std::vector< double > &deltaZMaxEtaBounds, const std::vector< double > &deltaZMax)
 
 TTTrackDeltaZMaxSelector (const edm::ParameterSet &cfg)
 

Private Attributes

std::vector< double > deltaZMax_
 
std::vector< double > deltaZMaxEtaBounds_
 

Detailed Description

Definition at line 257 of file L1TrackSelectionProducer.cc.

Constructor & Destructor Documentation

◆ TTTrackDeltaZMaxSelector() [1/2]

L1TrackSelectionProducer::TTTrackDeltaZMaxSelector::TTTrackDeltaZMaxSelector ( const std::vector< double > &  deltaZMaxEtaBounds,
const std::vector< double > &  deltaZMax 
)
inline

◆ TTTrackDeltaZMaxSelector() [2/2]

L1TrackSelectionProducer::TTTrackDeltaZMaxSelector::TTTrackDeltaZMaxSelector ( const edm::ParameterSet cfg)
inline

Definition at line 260 of file L1TrackSelectionProducer.cc.

261  : deltaZMaxEtaBounds_(cfg.template getParameter<double>("deltaZMaxEtaBounds")),
262  deltaZMax_(cfg.template getParameter<double>("deltaZMax")) {}

Member Function Documentation

◆ operator()()

bool L1TrackSelectionProducer::TTTrackDeltaZMaxSelector::operator() ( const L1Track t,
const l1t::Vertex v 
) const
inline

Definition at line 263 of file L1TrackSelectionProducer.cc.

References funct::abs(), deltaZMax_, deltaZMaxEtaBounds_, pfDeepBoostedJetPreprocessParams_cfi::lower_bound, submitPVValidationJobs::t, and findQualityFiles::v.

263  {
264  size_t etaIndex =
265  std::lower_bound(deltaZMaxEtaBounds_.begin(), deltaZMaxEtaBounds_.end(), std::abs(t.momentum().eta())) -
266  deltaZMaxEtaBounds_.begin() - 1;
267  if (etaIndex > deltaZMax_.size() - 1)
268  etaIndex = deltaZMax_.size() - 1;
269  return std::abs(v.z0() - t.z0()) <= deltaZMax_[etaIndex];
270  }
Abs< T >::type abs(const T &t)
Definition: Abs.h:22

Member Data Documentation

◆ deltaZMax_

std::vector<double> L1TrackSelectionProducer::TTTrackDeltaZMaxSelector::deltaZMax_
private

Definition at line 274 of file L1TrackSelectionProducer.cc.

Referenced by operator()().

◆ deltaZMaxEtaBounds_

std::vector<double> L1TrackSelectionProducer::TTTrackDeltaZMaxSelector::deltaZMaxEtaBounds_
private

Definition at line 273 of file L1TrackSelectionProducer.cc.

Referenced by operator()().