94 : trkZMax_(iConfig.getParameter<double>(
"trk_zMax")),
95 trkPtMax_(iConfig.getParameter<double>(
"trk_ptMax")),
96 trkEtaMax_(iConfig.getParameter<double>(
"trk_etaMax")),
97 lowpTJetMinTrackMultiplicity_(iConfig.getParameter<
int>(
"lowpTJetMinTrackMultiplicity")),
98 lowpTJetThreshold_(iConfig.getParameter<double>(
"lowpTJetThreshold")),
99 highpTJetMinTrackMultiplicity_(iConfig.getParameter<
int>(
"highpTJetMinTrackMultiplicity")),
100 highpTJetThreshold_(iConfig.getParameter<double>(
"highpTJetThreshold")),
101 zBins_(iConfig.getParameter<
int>(
"zBins")),
102 etaBins_(iConfig.getParameter<
int>(
"etaBins")),
103 phiBins_(iConfig.getParameter<
int>(
"phiBins")),
104 minTrkJetpT_(iConfig.getParameter<double>(
"minTrkJetpT")),
105 displaced_(iConfig.getParameter<
bool>(
"displaced")),
106 d0CutNStubs4_(iConfig.getParameter<double>(
"d0_cutNStubs4")),
107 d0CutNStubs5_(iConfig.getParameter<double>(
"d0_cutNStubs5")),
108 nDisplacedTracks_(iConfig.getParameter<
int>(
"nDisplacedTracks")),
117 produces<l1t::TkJetWordCollection>(
"L1TrackJetsExtended");
119 produces<l1t::TkJetWordCollection>(
"L1TrackJets");
131 for (
unsigned int this_l1track = 0; this_l1track < TTTrackHandle->
size(); this_l1track++) {
164 std::vector<z0_intern> zmins, zmaxs;
165 for (
int zbin = 0; zbin <
zBins_; zbin++) {
169 TTTrack_TrackWord::TrackBitWidths::kZ0Size,
174 std::vector<std::vector<TrackJetEmulationEtaPhiBin>> L1clusters;
176 std::vector<TrackJetEmulationEtaPhiBin> L2clusters;
181 epbins_default[
i][
j].
pTtot = 0;
182 epbins_default[
i][
j].
used =
false;
191 for (
unsigned int zbin = 0; zbin < zmins.size(); ++zbin) {
209 if (zbin == 0 &&
zmin == trkZ)
213 ap_uint<TTTrack_TrackWord::TrackBitWidths::kRinvSize - 1> ptEmulationBits =
L1TrkPtrs_[
k]->getRinvWord();
215 trkpt.V = ptEmulationBits.range();
255 for (
int phibin = 0; phibin <
phiBins_; ++phibin) {
256 L1clusters.push_back(L1_clustering<TrackJetEmulationEtaPhiBin, pt_intern, glbeta_intern, glbphi_intern>(
261 L2clusters = L2_clustering<TrackJetEmulationEtaPhiBin, pt_intern, glbeta_intern, glbphi_intern>(
266 for (
unsigned int k = 0;
k < L2clusters.size(); ++
k) {
274 sum_pt += L2clusters[
k].pTtot;
282 mzb.
nclust = L2clusters.size();
286 vector<edm::Ptr<L1TTTrackType>> L1TrackAssocJet;
287 for (
unsigned int j = 0;
j < mzb.
clusters.size(); ++
j) {
289 TkJetWord::TkJetBitWidths::kGlbEtaSize,
293 TkJetWord::TkJetBitWidths::kGlbPhiSize,
294 (2. *
std::abs(
M_PI)) / (1 << TkJetWord::TkJetBitWidths::kGlbPhiSize));
304 L1TrackAssocJet.clear();
305 for (
unsigned int itrk = 0; itrk < mzb.
clusters[
j].trackidx.size(); itrk++)
310 L1TrackJetContainer->push_back(trkJet);
313 std::sort(L1TrackJetContainer->begin(), L1TrackJetContainer->end(), [](
auto &
a,
auto &
b) {
return a.pt() >
b.pt(); });
325 desc.add<
double>(
"trk_zMax", 15.0);
326 desc.add<
double>(
"trk_ptMax", 200.0);
327 desc.add<
double>(
"trk_etaMax", 2.4);
328 desc.add<
double>(
"minTrkJetpT", -1.0);
329 desc.add<
int>(
"etaBins", 24);
330 desc.add<
int>(
"phiBins", 27);
331 desc.add<
int>(
"zBins", 1);
332 desc.add<
double>(
"d0_cutNStubs4", -1);
333 desc.add<
double>(
"d0_cutNStubs5", -1);
334 desc.add<
int>(
"lowpTJetMinTrackMultiplicity", 2);
335 desc.add<
double>(
"lowpTJetThreshold", 50.0);
336 desc.add<
int>(
"highpTJetMinTrackMultiplicity", 3);
337 desc.add<
double>(
"highpTJetThreshold", 100.0);
338 desc.add<
bool>(
"displaced",
false);
339 desc.add<
int>(
"nDisplacedTracks", 2);
340 descriptions.
add(
"l1tTrackJetsEmulator",
desc);
l1t::TkJetWord::nx_t nxtracks
ap_uint< TTTrack_TrackWord::TrackBitWidths::kD0Size > d0_intern
std::vector< l1t::TkJetWord > TkJetWordCollection
ap_int< kGlbEtaSize > glbeta_t
std::vector< unsigned int > trackidx
const double minTrkJetpT_
const int highpTJetMinTrackMultiplicity_
const float d0CutNStubs5_
const float highpTJetThreshold_
const unsigned int kExtraGlobalPhiBit
const unsigned int DoubleToBit(double value, unsigned int maxBits, double step)
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
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
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)
unsigned int eta_bin_firmwareStyle(int eta_word)
std::vector< TrackJetEmulationEtaPhiBin > clusters
unsigned int phi_bin_firmwareStyle(int phi_sector_raw, int phi_word)
const EDGetTokenT< L1TTTrackRefCollectionType > trackToken_
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.
void add(std::string const &label, ParameterSetDescription const &psetDescription)
static void fillDescriptions(ConfigurationDescriptions &descriptions)
static constexpr double stepPhi0
const float d0CutNStubs4_
TTTrack< Ref_Phase2TrackerDigi_ > L1TTTrackType
const int lowpTJetMinTrackMultiplicity_
static constexpr double stepZ0
const float lowpTJetThreshold_
TTTrack_TrackWord trackword