CMS 3D CMS Logo

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

Public Member Functions

bool operator() (const TTTrackType &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 123 of file L1TrackVertexAssociationProducer.cc.

Constructor & Destructor Documentation

◆ TTTrackWordDeltaZMaxSelector() [1/2]

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

◆ TTTrackWordDeltaZMaxSelector() [2/2]

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

Definition at line 126 of file L1TrackVertexAssociationProducer.cc.

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

Member Function Documentation

◆ operator()()

bool L1TrackVertexAssociationProducer::TTTrackWordDeltaZMaxSelector::operator() ( const TTTrackType t,
const l1t::VertexWord v 
) const
inline

Definition at line 129 of file L1TrackVertexAssociationProducer.cc.

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

129  {
130  TTTrack_TrackWord::tanl_t etaEmulationBits = t.getTanlWord();
131  ap_fixed<TrackBitWidths::kEtaSize, TrackBitWidths::kEtaMagSize> etaEmulation;
132  etaEmulation.V = etaEmulationBits.range();
133  size_t etaIndex =
134  std::upper_bound(deltaZMaxEtaBounds_.begin(), deltaZMaxEtaBounds_.end(), std::abs(etaEmulation.to_double())) -
135  deltaZMaxEtaBounds_.begin() - 1;
136  if (etaIndex > deltaZMax_.size() - 1)
137  etaIndex = deltaZMax_.size() - 1;
138  l1t::VertexWord::vtxz0_t fixedTkZ0 = t.undigitizeSignedValue(
139  t.getZ0Bits(), TTTrack_TrackWord::TrackBitWidths::kZ0Size, TTTrack_TrackWord::stepZ0, 0.0);
140 
141  ap_uint<TrackBitWidths::kPtSize> ptEmulationBits = t.getTrackWord()(
142  TTTrack_TrackWord::TrackBitLocations::kRinvMSB - 1, TTTrack_TrackWord::TrackBitLocations::kRinvLSB);
143  ap_ufixed<TrackBitWidths::kPtSize, TrackBitWidths::kPtMagSize> ptEmulation;
144  ptEmulation.V = ptEmulationBits.range();
145  return std::abs(v.z0() - fixedTkZ0.to_double()) <= deltaZMax_[etaIndex];
146  }
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> L1TrackVertexAssociationProducer::TTTrackWordDeltaZMaxSelector::deltaZMax_
private

Definition at line 150 of file L1TrackVertexAssociationProducer.cc.

Referenced by operator()().

◆ deltaZMaxEtaBounds_

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

Definition at line 149 of file L1TrackVertexAssociationProducer.cc.

Referenced by operator()().