36 #include <type_traits> 100 produces<P2GTCandidateCollection>(
"GTTPromptJets");
101 produces<P2GTCandidateCollection>(
"GTTDisplacedJets");
102 produces<P2GTCandidateCollection>(
"GTTPrimaryVert");
104 produces<P2GTCandidateCollection>(
"GMTSaPromptMuons");
105 produces<P2GTCandidateCollection>(
"GMTSaDisplacedMuons");
106 produces<P2GTCandidateCollection>(
"GMTTkMuons");
108 produces<P2GTCandidateCollection>(
"CL2JetsSC4");
109 produces<P2GTCandidateCollection>(
"CL2JetsSC8");
110 produces<P2GTCandidateCollection>(
"CL2Photons");
111 produces<P2GTCandidateCollection>(
"CL2Electrons");
112 produces<P2GTCandidateCollection>(
"CL2Taus");
113 produces<P2GTCandidateCollection>(
"CL2EtSum");
114 produces<P2GTCandidateCollection>(
"CL2HtSum");
144 std::unique_ptr<P2GTCandidateCollection> outputCollection = std::make_unique<P2GTCandidateCollection>();
148 int hwZ0 =
obj.z0Word().V.to_int() * 5;
158 outputCollection->push_back(gtObj);
160 event.put(
std::move(outputCollection),
"GTTPrimaryVert");
164 std::unique_ptr<P2GTCandidateCollection> outputCollection = std::make_unique<P2GTCandidateCollection>();
168 int hwZ0 =
obj.z0Word().V.to_int() << 7;
175 gtObj.
hwPT_ =
obj.ptWord().V.to_int();
176 gtObj.
hwPhi_ =
obj.glbPhiWord().V.to_int();
177 gtObj.
hwEta_ =
obj.glbEtaWord().V.to_int();
182 outputCollection->push_back(gtObj);
184 event.put(
std::move(outputCollection),
"GTTPromptJets");
188 std::unique_ptr<P2GTCandidateCollection> outputCollection = std::make_unique<P2GTCandidateCollection>();
192 int hwZ0 =
obj.z0Word().V.to_int() << 7;
199 gtObj.
hwPT_ =
obj.ptWord().V.to_int();
200 gtObj.
hwPhi_ =
obj.glbPhiWord().V.to_int();
201 gtObj.
hwEta_ =
obj.glbEtaWord().V.to_int();
206 outputCollection->push_back(gtObj);
208 event.put(
std::move(outputCollection),
"GTTDisplacedJets");
212 std::unique_ptr<P2GTCandidateCollection> outputCollection = std::make_unique<P2GTCandidateCollection>();
216 int hwZ0 =
obj.apZ0().to_int() << 12;
232 outputCollection->push_back(gtObj);
234 event.put(
std::move(outputCollection),
"GMTSaPromptMuons");
238 std::unique_ptr<P2GTCandidateCollection> outputCollection = std::make_unique<P2GTCandidateCollection>();
242 int hwZ0 =
obj.apZ0().to_int() << 12;
258 outputCollection->push_back(gtObj);
260 event.put(
std::move(outputCollection),
"GMTSaDisplacedMuons");
264 std::unique_ptr<P2GTCandidateCollection> outputCollection = std::make_unique<P2GTCandidateCollection>();
268 int hwZ0 =
obj.apZ0().to_int() << 7;
286 outputCollection->push_back(gtObj);
288 event.put(
std::move(outputCollection),
"GMTTkMuons");
292 std::unique_ptr<P2GTCandidateCollection> outputCollection = std::make_unique<P2GTCandidateCollection>();
296 int hwZ0 =
gtJet.z0.V.to_int() << 7;
309 outputCollection->push_back(gtObj);
311 event.put(
std::move(outputCollection),
"CL2JetsSC4");
315 std::unique_ptr<P2GTCandidateCollection> outputCollection = std::make_unique<P2GTCandidateCollection>();
319 int hwZ0 =
gtJet.z0.V.to_int() << 7;
332 outputCollection->push_back(gtObj);
334 event.put(
std::move(outputCollection),
"CL2JetsSC8");
338 std::unique_ptr<P2GTCandidateCollection> outputCollection = std::make_unique<P2GTCandidateCollection>();
348 gtObj.hwPhi_ = gtPhoton.
v3.
phi.V.to_int();
349 gtObj.hwEta_ = gtPhoton.
v3.
eta.V.to_int();
350 gtObj.hwIsolationPT_ = gtPhoton.
isolationPT.V.to_int();
351 gtObj.hwQualityFlags_ = gtPhoton.
qualityFlags.V.to_int();
354 outputCollection->push_back(gtObj);
356 event.put(
std::move(outputCollection),
"CL2Photons");
360 std::unique_ptr<P2GTCandidateCollection> outputCollection = std::make_unique<P2GTCandidateCollection>();
364 int hwZ0 = gtElectron.
z0.V.to_int() << 7;
371 gtObj.
hwPT_ = gtElectron.
v3.
pt.V.to_int();
380 outputCollection->push_back(gtObj);
382 event.put(
std::move(outputCollection),
"CL2Electrons");
386 std::unique_ptr<P2GTCandidateCollection> outputCollection = std::make_unique<P2GTCandidateCollection>();
396 gtObj.hwPhi_ =
gtTau.v3.phi.V.to_int();
397 gtObj.hwEta_ =
gtTau.v3.eta.V.to_int();
398 gtObj.hwSeed_pT_ =
gtTau.seed_pt.V.to_int();
399 gtObj.hwSeed_z0_ =
gtTau.seed_z0.V.to_int();
400 gtObj.hwCharge_ =
gtTau.charge.V.to_int();
401 gtObj.hwType_ =
gtTau.type.V.to_int();
402 gtObj.hwQualityScore_ =
gtTau.quality.V.to_int();
405 outputCollection->push_back(gtObj);
407 event.put(
std::move(outputCollection),
"CL2Taus");
411 std::unique_ptr<P2GTCandidateCollection> outputCollection = std::make_unique<P2GTCandidateCollection>();
420 gtObj.
hwPT_ = sum.vector_pt.V.to_int();
421 gtObj.hwPhi_ = sum.vector_phi.V.to_int();
422 gtObj.hwScalarSumPT_ = sum.scalar_pt.V.to_int();
425 outputCollection->push_back(gtObj);
426 event.put(
std::move(outputCollection),
"CL2EtSum");
430 std::unique_ptr<P2GTCandidateCollection> outputCollection = std::make_unique<P2GTCandidateCollection>();
437 gtObj.
hwPT_ = mht.hwPt();
438 gtObj.hwPhi_ = mht.hwPhi();
439 gtObj.hwScalarSumPT_ = ht.hwPt();
442 outputCollection->push_back(gtObj);
443 event.put(
std::move(outputCollection),
"CL2HtSum");
~L1GTProducer() override=default
const edm::EDGetTokenT< VertexWordCollection > gttPrimaryVertexToken_
std::vector< l1t::TkJetWord > TkJetWordCollection
std::vector< TkElectron > TkElectronCollection
std::vector< l1t::PFTau > PFTauCollection
const edm::EDGetTokenT< TkElectronCollection > cl2ElectronToken_
L1GTProducer(const edm::ParameterSet &)
Optional< int > hwNumber_of_tracks_in_pv_
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
Optional< int > hwIsolationPT_
const edm::EDGetTokenT< TkJetWordCollection > gttPromptJetToken_
void produceCL2JetsSC8(edm::Event &event) const
double to_phi(int value) const
int to_chg(int value) const
static void fillPSetDescription(edm::ParameterSetDescription &)
math::XYZPoint Point
point in the space
void produceGMTSaPromptMuons(edm::Event &event) const
const edm::EDGetTokenT< std::vector< l1t::EtSum > > cl2HtSumToken_
const edm::EDGetTokenT< PFTauCollection > cl2TauToken_
double to_z0(int value) const
void produceCL2Taus(edm::Event &event) const
void produceCL2Photons(edm::Event &event) const
Optional< int > hwCharge_
static Jet unpack(const std::array< uint64_t, 2 > &src)
std::vector< l1t::PFJet > PFJetCollection
Optional< int > hwQualityScore_
std::vector< TkEm > TkEmCollection
double to_eta(int value) const
void produceCL2Electrons(edm::Event &event) const
void produceGMTTkMuons(edm::Event &event) const
Optional< int > hwQualityFlags_
const edm::EDGetTokenT< PFJetCollection > cl2JetSC4Token_
void produceGTTPromptJets(edm::Event &event) const
#define DEFINE_FWK_MODULE(type)
const edm::EDGetTokenT< TrackerMuonCollection > gmtTkMuonToken_
std::vector< VertexWord > VertexWordCollection
const edm::EDGetTokenT< std::vector< l1t::EtSum > > cl2EtSumToken_
void produceCL2EtSum(edm::Event &event) const
static void fillDescriptions(edm::ConfigurationDescriptions &)
void produceCL2JetsSC4(edm::Event &event) const
const edm::EDGetTokenT< SAMuonCollection > gmtSaDisplacedMuonToken_
void produceGTTDisplacedJets(edm::Event &event) const
std::vector< TrackerMuon > TrackerMuonCollection
std::vector< SAMuon > SAMuonCollection
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
Optional< int > hwNumber_of_tracks_
const edm::EDGetTokenT< SAMuonCollection > gmtSaPromptMuonToken_
const edm::EDGetTokenT< PFJetCollection > cl2JetSC8Token_
double to_pT(int value) const
constexpr float ETAPHI_LSB
void produceCl2HtSum(edm::Event &event) const
Optional< int > hwSum_pT_pv_
Optional< int > hwNumber_of_tracks_not_in_pv_
void produceGTTPrimaryVert(edm::Event &event) const
const edm::EDGetTokenT< TkEmCollection > cl2PhotonToken_
void produceGMTSaDisplacedMuons(edm::Event &event) const
const edm::EDGetTokenT< TkJetWordCollection > gttDisplacedJetToken_