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 258 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 261 of file L1TrackSelectionProducer.cc.

262  : deltaZMaxEtaBounds_(cfg.template getParameter<double>("deltaZMaxEtaBounds")),
263  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 264 of file L1TrackSelectionProducer.cc.

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

264  {
265  size_t etaIndex =
266  std::lower_bound(deltaZMaxEtaBounds_.begin(), deltaZMaxEtaBounds_.end(), std::abs(t.momentum().eta())) -
267  deltaZMaxEtaBounds_.begin() - 1;
268  if (etaIndex > deltaZMax_.size() - 1)
269  etaIndex = deltaZMax_.size() - 1;
270  return std::abs(v.z0() - t.z0()) <= deltaZMax_[etaIndex];
271  }
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 275 of file L1TrackSelectionProducer.cc.

Referenced by operator()().

◆ deltaZMaxEtaBounds_

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

Definition at line 274 of file L1TrackSelectionProducer.cc.

Referenced by operator()().