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

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

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

285  {
286  TTTrack_TrackWord::tanl_t etaEmulationBits = t.getTanlWord();
287  ap_fixed<TrackBitWidths::kEtaSize, TrackBitWidths::kEtaMagSize> etaEmulation;
288  etaEmulation.V = etaEmulationBits.range();
289  size_t etaIndex =
290  std::upper_bound(deltaZMaxEtaBounds_.begin(), deltaZMaxEtaBounds_.end(), std::abs(etaEmulation.to_double())) -
291  deltaZMaxEtaBounds_.begin() - 1;
292  if (etaIndex > deltaZMax_.size() - 1)
293  etaIndex = deltaZMax_.size() - 1;
294  l1t::VertexWord::vtxz0_t fixedTkZ0 = t.undigitizeSignedValue(
295  t.getZ0Bits(), TTTrack_TrackWord::TrackBitWidths::kZ0Size, TTTrack_TrackWord::stepZ0, 0.0);
296 
297  return std::abs(v.z0() - fixedTkZ0.to_double()) <= deltaZMax_[etaIndex];
298  }
ap_fixed< VertexBitWidths::kZ0Size, VertexBitWidths::kZ0MagSize, AP_RND_CONV, AP_SAT > vtxz0_t
Definition: VertexWord.h:65
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
ap_uint< TrackBitWidths::kTanlSize > tanl_t
static constexpr double stepZ0

Member Data Documentation

◆ deltaZMax_

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

Definition at line 302 of file L1TrackSelectionProducer.cc.

Referenced by operator()().

◆ deltaZMaxEtaBounds_

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

Definition at line 301 of file L1TrackSelectionProducer.cc.

Referenced by operator()().