108 : trkZMax_(iConfig.getParameter<double>(
"trk_zMax")),
109 trkPtMax_(iConfig.getParameter<double>(
"trk_ptMax")),
110 trkPtMin_(iConfig.getParameter<double>(
"trk_ptMin")),
111 trkEtaMax_(iConfig.getParameter<double>(
"trk_etaMax")),
112 nStubs4PromptChi2_(iConfig.getParameter<double>(
"nStubs4PromptChi2")),
113 nStubs5PromptChi2_(iConfig.getParameter<double>(
"nStubs5PromptChi2")),
114 nStubs4PromptBend_(iConfig.getParameter<double>(
"nStubs4PromptBend")),
115 nStubs5PromptBend_(iConfig.getParameter<double>(
"nStubs5PromptBend")),
116 trkNPSStubMin_(iConfig.getParameter<
int>(
"trk_nPSStubMin")),
117 lowpTJetMinTrackMultiplicity_(iConfig.getParameter<
int>(
"lowpTJetMinTrackMultiplicity")),
118 lowpTJetThreshold_(iConfig.getParameter<double>(
"lowpTJetThreshold")),
119 highpTJetMinTrackMultiplicity_(iConfig.getParameter<
int>(
"highpTJetMinTrackMultiplicity")),
120 highpTJetThreshold_(iConfig.getParameter<double>(
"highpTJetThreshold")),
121 zBins_(iConfig.getParameter<
int>(
"zBins")),
122 etaBins_(iConfig.getParameter<
int>(
"etaBins")),
123 phiBins_(iConfig.getParameter<
int>(
"phiBins")),
124 minTrkJetpT_(iConfig.getParameter<double>(
"minTrkJetpT")),
125 displaced_(iConfig.getParameter<
bool>(
"displaced")),
126 d0CutNStubs4_(iConfig.getParameter<double>(
"d0_cutNStubs4")),
127 d0CutNStubs5_(iConfig.getParameter<double>(
"d0_cutNStubs5")),
128 nStubs4DisplacedChi2_(iConfig.getParameter<double>(
"nStubs4DisplacedChi2")),
129 nStubs5DisplacedChi2_(iConfig.getParameter<double>(
"nStubs5DisplacedChi2")),
130 nStubs4DisplacedBend_(iConfig.getParameter<double>(
"nStubs4DisplacedBend")),
131 nStubs5DisplacedBend_(iConfig.getParameter<double>(
"nStubs5DisplacedBend")),
132 nDisplacedTracks_(iConfig.getParameter<
int>(
"nDisplacedTracks")),
133 dzPVTrk_(iConfig.getParameter<double>(
"MaxDzTrackPV")),
144 produces<l1t::TkJetWordCollection>(
"L1TrackJetsExtended");
146 produces<l1t::TkJetWordCollection>(
"L1TrackJets");
159 float PVz = (PVtx->at(0)).
z0();
164 for (
unsigned int this_l1track = 0; this_l1track < TTTrackHandle->
size(); this_l1track++) {
168 float trk_chi2dof = trkPtr->
chi2Red();
171 for (
int istub = 0; istub < trk_nstubs; istub++) {
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(); });
429 desc.add<
double>(
"MaxDzTrackPV", 1.0);
430 desc.add<
double>(
"trk_zMax", 15.0);
431 desc.add<
double>(
"trk_ptMax", 200.0);
432 desc.add<
double>(
"trk_ptMin", 3.0);
433 desc.add<
double>(
"trk_etaMax", 2.4);
434 desc.add<
double>(
"nStubs4PromptChi2", 5.0);
435 desc.add<
double>(
"nStubs4PromptBend", 1.7);
436 desc.add<
double>(
"nStubs5PromptChi2", 2.75);
437 desc.add<
double>(
"nStubs5PromptBend", 3.5);
438 desc.add<
int>(
"trk_nPSStubMin", -1);
439 desc.add<
double>(
"minTrkJetpT", -1.0);
440 desc.add<
int>(
"etaBins", 24);
441 desc.add<
int>(
"phiBins", 27);
442 desc.add<
int>(
"zBins", 1);
443 desc.add<
double>(
"d0_cutNStubs4", -1);
444 desc.add<
double>(
"d0_cutNStubs5", -1);
445 desc.add<
int>(
"lowpTJetMinTrackMultiplicity", 2);
446 desc.add<
double>(
"lowpTJetThreshold", 50.0);
447 desc.add<
int>(
"highpTJetMinTrackMultiplicity", 3);
448 desc.add<
double>(
"highpTJetThreshold", 100.0);
449 desc.add<
bool>(
"displaced",
false);
450 desc.add<
double>(
"nStubs4DisplacedChi2", 5.0);
451 desc.add<
double>(
"nStubs4DisplacedBend", 1.7);
452 desc.add<
double>(
"nStubs5DisplacedChi2", 2.75);
453 desc.add<
double>(
"nStubs5DisplacedBend", 3.5);
454 desc.add<
int>(
"nDisplacedTracks", 2);
455 descriptions.
add(
"l1tTrackJetsEmulator",
desc);
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
GlobalVector momentum() const
Track momentum.
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
edm::RefVector< L1TTTrackCollectionType > L1TTTrackRefCollectionType
L1TrackJetEmulatorProducer(const ParameterSet &)
ap_ufixed< TTTrack_TrackWord::TrackBitWidths::kRinvSize - 1, PT_INTPART_BITS, AP_TRN, AP_SAT > pt_intern
l1t::TkJetWord::nt_t ntracks
const int nDisplacedTracks_
vector< L1TTTrackType > L1TTTrackCollectionType
const float nStubs4DisplacedBend_
Abs< T >::type abs(const T &t)
void produce(Event &, const EventSetup &) override
ap_int< TTTrack_TrackWord::TrackBitWidths::kZ0Size > z0_intern
#define DEFINE_FWK_MODULE(type)
std::vector< VertexWord > VertexWordCollection
static constexpr auto TOB
std::vector< TrackJetEmulationEtaPhiBin > clusters
std::vector< edm::Ref< edmNew::DetSetVector< TTStub< T > >, TTStub< T > > > getStubRefs() const
Track components.
const EDGetTokenT< L1TTTrackRefCollectionType > trackToken_
const float nStubs5PromptChi2_
size_type size() const
Size of the RefVector.
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
ap_int< TTTrack_TrackWord::TrackBitWidths::kPhiSize+kExtraGlobalPhiBit > glbphi_intern
std::vector< edm::Ptr< L1TTTrackType > > L1TrkPtrs_
Class to store the L1 Track Trigger tracks.
double stubPtConsistency() const
StubPtConsistency.
const float nStubs5PromptBend_
void add(std::string const &label, ParameterSetDescription const &psetDescription)
static void fillDescriptions(ConfigurationDescriptions &descriptions)
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken_
static constexpr double stepPhi0
const EDGetTokenT< l1t::VertexWordCollection > PVtxToken_
double chi2Red() const
Chi2 reduced.
ap_uint< TrackBitWidths::kTanlSize > tanl_t
const float nStubs5DisplacedChi2_
double z0() const
Track z0.
const float nStubs5DisplacedBend_
const float d0CutNStubs4_
unsigned int tidRing(const DetId &id) const
TTTrack< Ref_Phase2TrackerDigi_ > L1TTTrackType
const int lowpTJetMinTrackMultiplicity_
static constexpr double stepZ0
static constexpr auto TID
const float nStubs4PromptChi2_
const float lowpTJetThreshold_
TTTrack_TrackWord trackword