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 260 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 263 of file L1TrackSelectionProducer.cc.

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

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

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

Referenced by operator()().

◆ deltaZMaxEtaBounds_

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

Definition at line 276 of file L1TrackSelectionProducer.cc.

Referenced by operator()().