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 276 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 279 of file L1TrackSelectionProducer.cc.

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

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

282  {
283  size_t etaIndex =
284  std::lower_bound(deltaZMaxEtaBounds_.begin(), deltaZMaxEtaBounds_.end(), std::abs(t.momentum().eta())) -
285  deltaZMaxEtaBounds_.begin() - 1;
286  if (etaIndex > deltaZMax_.size() - 1)
287  etaIndex = deltaZMax_.size() - 1;
288  return std::abs(v.z0() - t.getZ0()) <= deltaZMax_[etaIndex];
289  }
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 293 of file L1TrackSelectionProducer.cc.

Referenced by operator()().

◆ deltaZMaxEtaBounds_

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

Definition at line 292 of file L1TrackSelectionProducer.cc.

Referenced by operator()().