CMS 3D CMS Logo

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

Public Member Functions

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

Private Attributes

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

Detailed Description

Definition at line 277 of file L1TrackSelectionProducer.cc.

Constructor & Destructor Documentation

◆ TTTrackWordDeltaZMaxSelector() [1/2]

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

◆ TTTrackWordDeltaZMaxSelector() [2/2]

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

Definition at line 280 of file L1TrackSelectionProducer.cc.

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

Member Function Documentation

◆ operator()()

bool L1TrackSelectionProducer::TTTrackWordDeltaZMaxSelector::operator() ( const L1Track t,
const l1t::VertexWord v 
) const
inline

Definition at line 283 of file L1TrackSelectionProducer.cc.

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

283  {
284  size_t etaIndex =
285  std::lower_bound(deltaZMaxEtaBounds_.begin(), deltaZMaxEtaBounds_.end(), std::abs(t.momentum().eta())) -
286  deltaZMaxEtaBounds_.begin() - 1;
287  if (etaIndex > deltaZMax_.size() - 1)
288  etaIndex = deltaZMax_.size() - 1;
289  return std::abs(v.z0() - t.getZ0()) <= deltaZMax_[etaIndex];
290  }
Abs< T >::type abs(const T &t)
Definition: Abs.h:22

Member Data Documentation

◆ deltaZMax_

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

Definition at line 294 of file L1TrackSelectionProducer.cc.

Referenced by operator()().

◆ deltaZMaxEtaBounds_

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

Definition at line 293 of file L1TrackSelectionProducer.cc.

Referenced by operator()().