159 float PVz = (PVtx->at(0)).
z0();
164 for (
unsigned int this_l1track = 0; this_l1track < TTTrackHandle->
size(); this_l1track++) {
166 float trk_pt = trkPtr->momentum().perp();
167 int trk_nstubs = (
int)trkPtr->getStubRefs().size();
168 float trk_chi2dof = trkPtr->chi2Red();
169 float trk_bendchi2 = trkPtr->stubPtConsistency();
171 for (
int istub = 0; istub < trk_nstubs; istub++) {
172 DetId detId(trkPtr->getStubRefs().at(istub)->getDetId());
234 std::vector<z0_intern> zmins, zmaxs;
235 for (
int zbin = 0; zbin <
zBins_; zbin++) {
239 TTTrack_TrackWord::TrackBitWidths::kZ0Size,
244 std::vector<std::vector<TrackJetEmulationEtaPhiBin>> L1clusters;
246 std::vector<TrackJetEmulationEtaPhiBin> L2clusters;
251 epbins_default[
i][
j].
pTtot = 0;
252 epbins_default[
i][
j].
used =
false;
260 for (
unsigned int zbin = 0; zbin < zmins.size(); ++zbin) {
281 if (zbin == 0 &&
zmin == trkZ)
285 ap_uint<TTTrack_TrackWord::TrackBitWidths::kRinvSize - 1> ptEmulationBits =
L1TrkPtrs_[
k]->getRinvWord();
287 trkpt.V = ptEmulationBits.range();
292 trketa.V = etaEmulationBits.range();
296 double sector_phi_value = 0;
298 sector_phi_value = 2.0 *
M_PI * Sector / 9.0;
300 sector_phi_value = (-1.0 *
M_PI +
M_PI / 9.0 + (Sector - 5) * 2.0 *
M_PI / 9.0);
331 if ((trkphi < phi_min) &&
i != 0)
333 if ((trkphi > phi_max) &&
i !=
phiBins_ - 1)
355 for (
int phibin = 0; phibin <
phiBins_; ++phibin) {
356 L1clusters.push_back(L1_clustering<TrackJetEmulationEtaPhiBin, pt_intern, glbeta_intern, glbphi_intern>(
361 L2clusters = L2_clustering<TrackJetEmulationEtaPhiBin, pt_intern, glbeta_intern, glbphi_intern>(
366 for (
unsigned int k = 0;
k < L2clusters.size(); ++
k) {
374 sum_pt += L2clusters[
k].pTtot;
382 mzb.
nclust = L2clusters.size();
386 vector<edm::Ptr<L1TTTrackType>> L1TrackAssocJet;
387 for (
unsigned int j = 0;
j < mzb.
clusters.size(); ++
j) {
392 TkJetWord::TkJetBitWidths::kGlbEtaSize,
396 TkJetWord::TkJetBitWidths::kGlbPhiSize,
397 (2. *
std::abs(
M_PI)) / (1 << TkJetWord::TkJetBitWidths::kGlbPhiSize));
407 L1TrackAssocJet.clear();
408 for (
unsigned int itrk = 0; itrk < mzb.
clusters[
j].trackidx.size(); itrk++)
413 L1TrackJetContainer->push_back(trkJet);
416 std::sort(L1TrackJetContainer->begin(), L1TrackJetContainer->end(), [](
auto &
a,
auto &
b) {
return a.pt() >
b.pt(); });
l1t::TkJetWord::nx_t nxtracks
const float nStubs4PromptBend_
ap_uint< TTTrack_TrackWord::TrackBitWidths::kD0Size > d0_intern
unsigned int tobLayer(const DetId &id) const
std::vector< l1t::TkJetWord > TkJetWordCollection
ap_int< kGlbEtaSize > glbeta_t
std::vector< unsigned int > trackidx
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
const double minTrkJetpT_
const int highpTJetMinTrackMultiplicity_
const float d0CutNStubs5_
const float highpTJetThreshold_
const unsigned int kExtraGlobalPhiBit
bool TrackQualitySelection(int trk_nstub, double trk_chi2, double trk_bendchi2, double nStubs4PromptBend_, double nStubs5PromptBend_, double nStubs4PromptChi2_, double nStubs5PromptChi2_, double nStubs4DisplacedBend_, double nStubs5DisplacedBend_, double nStubs4DisplacedChi2_, double nStubs5DisplacedChi2_, bool displaced_)
const unsigned int DoubleToBit(double value, unsigned int maxBits, double step)
const float nStubs4DisplacedChi2_
static constexpr double stepD0
ap_int< kGlbPhiSize > glbphi_t
ap_ufixed< kPtSize, kPtMagSize, AP_TRN, AP_SAT > pt_t
ap_uint< kDispFlagSize > dispflag_t
ap_uint< TkJetBitWidths::kUnassignedSize > tkjetunassigned_t
const double BitToDouble(unsigned int bits, unsigned int maxBits, double step)
ap_fixed< TTTrack_TrackWord::TrackBitWidths::kTanlSize, ETA_INTPART_BITS, AP_TRN, AP_SAT > glbeta_intern
ap_ufixed< TTTrack_TrackWord::TrackBitWidths::kRinvSize - 1, PT_INTPART_BITS, AP_TRN, AP_SAT > pt_intern
l1t::TkJetWord::nt_t ntracks
const int nDisplacedTracks_
const float nStubs4DisplacedBend_
Abs< T >::type abs(const T &t)
ap_int< TTTrack_TrackWord::TrackBitWidths::kZ0Size > z0_intern
static constexpr auto TOB
std::vector< TrackJetEmulationEtaPhiBin > clusters
const EDGetTokenT< L1TTTrackRefCollectionType > trackToken_
const float nStubs5PromptChi2_
size_type size() const
Size of the RefVector.
ap_int< TTTrack_TrackWord::TrackBitWidths::kPhiSize+kExtraGlobalPhiBit > glbphi_intern
std::vector< edm::Ptr< L1TTTrackType > > L1TrkPtrs_
const float nStubs5PromptBend_
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken_
static constexpr double stepPhi0
const EDGetTokenT< l1t::VertexWordCollection > PVtxToken_
ap_uint< TrackBitWidths::kTanlSize > tanl_t
const float nStubs5DisplacedChi2_
const float d0CutNStubs4_
const float nStubs5DisplacedBend_
unsigned int tidRing(const DetId &id) const
const int lowpTJetMinTrackMultiplicity_
static constexpr double stepZ0
static constexpr auto TID
const float nStubs4PromptChi2_