36 #include <type_traits> 97 produces<P2GTCandidateCollection>(
"GTTPromptJets");
98 produces<P2GTCandidateCollection>(
"GTTDisplacedJets");
99 produces<P2GTCandidateCollection>(
"GTTPrimaryVert");
101 produces<P2GTCandidateCollection>(
"GMTSaPromptMuons");
102 produces<P2GTCandidateCollection>(
"GMTSaDisplacedMuons");
103 produces<P2GTCandidateCollection>(
"GMTTkMuons");
105 produces<P2GTCandidateCollection>(
"CL2Jets");
106 produces<P2GTCandidateCollection>(
"CL2Photons");
107 produces<P2GTCandidateCollection>(
"CL2Electrons");
108 produces<P2GTCandidateCollection>(
"CL2Taus");
109 produces<P2GTCandidateCollection>(
"CL2EtSum");
110 produces<P2GTCandidateCollection>(
"CL2HtSum");
139 std::unique_ptr<P2GTCandidateCollection> outputCollection = std::make_unique<P2GTCandidateCollection>();
143 int hwZ0 =
obj.z0Word().V.to_int() * 5;
153 outputCollection->push_back(gtObj);
155 event.put(
std::move(outputCollection),
"GTTPrimaryVert");
159 std::unique_ptr<P2GTCandidateCollection> outputCollection = std::make_unique<P2GTCandidateCollection>();
163 int hwZ0 =
obj.z0Word().V.to_int() << 7;
170 gtObj.
hwPT_ =
obj.ptWord().V.to_int();
171 gtObj.
hwPhi_ =
obj.glbPhiWord().V.to_int();
172 gtObj.
hwEta_ =
obj.glbEtaWord().V.to_int();
177 outputCollection->push_back(gtObj);
179 event.put(
std::move(outputCollection),
"GTTPromptJets");
183 std::unique_ptr<P2GTCandidateCollection> outputCollection = std::make_unique<P2GTCandidateCollection>();
187 int hwZ0 =
obj.z0Word().V.to_int() << 7;
194 gtObj.
hwPT_ =
obj.ptWord().V.to_int();
195 gtObj.
hwPhi_ =
obj.glbPhiWord().V.to_int();
196 gtObj.
hwEta_ =
obj.glbEtaWord().V.to_int();
201 outputCollection->push_back(gtObj);
203 event.put(
std::move(outputCollection),
"GTTDisplacedJets");
207 std::unique_ptr<P2GTCandidateCollection> outputCollection = std::make_unique<P2GTCandidateCollection>();
211 int hwZ0 =
obj.apZ0().to_int() << 12;
227 outputCollection->push_back(gtObj);
229 event.put(
std::move(outputCollection),
"GMTSaPromptMuons");
233 std::unique_ptr<P2GTCandidateCollection> outputCollection = std::make_unique<P2GTCandidateCollection>();
237 int hwZ0 =
obj.apZ0().to_int() << 12;
253 outputCollection->push_back(gtObj);
255 event.put(
std::move(outputCollection),
"GMTSaDisplacedMuons");
259 std::unique_ptr<P2GTCandidateCollection> outputCollection = std::make_unique<P2GTCandidateCollection>();
263 int hwZ0 =
obj.apZ0().to_int() << 7;
281 outputCollection->push_back(gtObj);
283 event.put(
std::move(outputCollection),
"GMTTkMuons");
287 std::unique_ptr<P2GTCandidateCollection> outputCollection = std::make_unique<P2GTCandidateCollection>();
291 int hwZ0 =
gtJet.z0.V.to_int() << 7;
304 outputCollection->push_back(gtObj);
306 event.put(
std::move(outputCollection),
"CL2Jets");
310 std::unique_ptr<P2GTCandidateCollection> outputCollection = std::make_unique<P2GTCandidateCollection>();
320 gtObj.hwPhi_ = gtPhoton.
v3.
phi.V.to_int();
321 gtObj.hwEta_ = gtPhoton.
v3.
eta.V.to_int();
322 gtObj.hwIso_ = gtPhoton.
isolation.V.to_int();
323 gtObj.hwQual_ = gtPhoton.
quality.V.to_int();
326 outputCollection->push_back(gtObj);
328 event.put(
std::move(outputCollection),
"CL2Photons");
332 std::unique_ptr<P2GTCandidateCollection> outputCollection = std::make_unique<P2GTCandidateCollection>();
336 int hwZ0 = gtElectron.
z0.V.to_int() << 7;
343 gtObj.
hwPT_ = gtElectron.
v3.
pt.V.to_int();
352 outputCollection->push_back(gtObj);
354 event.put(
std::move(outputCollection),
"CL2Electrons");
358 std::unique_ptr<P2GTCandidateCollection> outputCollection = std::make_unique<P2GTCandidateCollection>();
368 gtObj.hwPhi_ =
gtTau.v3.phi.V.to_int();
369 gtObj.hwEta_ =
gtTau.v3.eta.V.to_int();
370 gtObj.hwSeed_pT_ =
gtTau.seed_pt.V.to_int();
371 gtObj.hwSeed_z0_ =
gtTau.seed_z0.V.to_int();
372 gtObj.hwCharge_ =
gtTau.charge.V.to_int();
373 gtObj.hwType_ =
gtTau.type.V.to_int();
374 gtObj.hwIso_ =
gtTau.isolation.V.to_int();
377 outputCollection->push_back(gtObj);
379 event.put(
std::move(outputCollection),
"CL2Taus");
383 std::unique_ptr<P2GTCandidateCollection> outputCollection = std::make_unique<P2GTCandidateCollection>();
392 gtObj.
hwPT_ = sum.vector_pt.V.to_int();
393 gtObj.hwPhi_ = sum.vector_phi.V.to_int();
394 gtObj.hwSca_sum_ = sum.scalar_pt.V.to_int();
397 outputCollection->push_back(gtObj);
398 event.put(
std::move(outputCollection),
"CL2EtSum");
402 std::unique_ptr<P2GTCandidateCollection> outputCollection = std::make_unique<P2GTCandidateCollection>();
409 gtObj.
hwPT_ = mht.hwPt();
410 gtObj.hwPhi_ = mht.hwPhi();
411 gtObj.hwSca_sum_ = ht.hwPt();
414 outputCollection->push_back(gtObj);
415 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.
const edm::EDGetTokenT< TkJetWordCollection > gttPromptJetToken_
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
std::vector< TkEm > TkEmCollection
const edm::EDGetTokenT< PFJetCollection > cl2JetToken_
double to_eta(int value) const
void produceCL2Electrons(edm::Event &event) const
void produceGMTTkMuons(edm::Event &event) const
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 &)
const edm::EDGetTokenT< SAMuonCollection > gmtSaDisplacedMuonToken_
static Photon unpack_ap(const ap_uint< BITWIDTH > &src)
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_
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
void produceCL2Jets(edm::Event &event) const
const edm::EDGetTokenT< TkEmCollection > cl2PhotonToken_
static Electron unpack_ap(const ap_uint< BITWIDTH > &src)
void produceGMTSaDisplacedMuons(edm::Event &event) const
const edm::EDGetTokenT< TkJetWordCollection > gttDisplacedJetToken_