CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
l1t::L1GTProducer Class Reference
Inheritance diagram for l1t::L1GTProducer:
edm::global::EDProducer<> edm::global::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 L1GTProducer (const edm::ParameterSet &)
 
 ~L1GTProducer () override=default
 
- Public Member Functions inherited from edm::global::EDProducer<>
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
EDProduceroperator= (const EDProducer &)=delete
 
bool wantsGlobalLuminosityBlocks () const noexcept final
 
bool wantsGlobalRuns () const noexcept final
 
bool wantsInputProcessBlocks () const noexcept final
 
bool wantsProcessBlocks () const noexcept final
 
bool wantsStreamLuminosityBlocks () const noexcept final
 
bool wantsStreamRuns () const noexcept final
 
- Public Member Functions inherited from edm::global::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
std::vector< bool > const & recordProvenanceList () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
TypeLabelList const & typeLabelList () const
 used by the fwk to register the list of products of this module More...
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESResolverIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESResolverIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const *> *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const *> const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProductResolverIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &)
 
- Static Public Member Functions inherited from edm::global::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Private Member Functions

void produce (edm::StreamID, edm::Event &, const edm::EventSetup &) const override
 
void produceCL2Electrons (edm::Event &event) const
 
void produceCL2EtSum (edm::Event &event) const
 
void produceCl2HtSum (edm::Event &event) const
 
void produceCL2JetsSC4 (edm::Event &event) const
 
void produceCL2JetsSC8 (edm::Event &event) const
 
void produceCL2Photons (edm::Event &event) const
 
void produceCL2Taus (edm::Event &event) const
 
void produceGMTSaDisplacedMuons (edm::Event &event) const
 
void produceGMTSaPromptMuons (edm::Event &event) const
 
void produceGMTTkMuons (edm::Event &event) const
 
void produceGTTDisplacedHtSum (edm::Event &event) const
 
void produceGTTDisplacedJets (edm::Event &event) const
 
void produceGTTEtSum (edm::Event &event) const
 
void produceGTTPrimaryVert (edm::Event &event) const
 
void produceGTTPromptHtSum (edm::Event &event) const
 
void produceGTTPromptJets (edm::Event &event) const
 

Private Attributes

const edm::EDGetTokenT< TkElectronCollectioncl2ElectronToken_
 
const edm::EDGetTokenT< std::vector< l1t::EtSum > > cl2EtSumToken_
 
const edm::EDGetTokenT< std::vector< l1t::EtSum > > cl2HtSumToken_
 
const edm::EDGetTokenT< PFJetCollectioncl2JetSC4Token_
 
const edm::EDGetTokenT< PFJetCollectioncl2JetSC8Token_
 
const edm::EDGetTokenT< TkEmCollectioncl2PhotonToken_
 
const edm::EDGetTokenT< PFTauCollectioncl2TauToken_
 
const edm::EDGetTokenT< SAMuonCollectiongmtSaDisplacedMuonToken_
 
const edm::EDGetTokenT< SAMuonCollectiongmtSaPromptMuonToken_
 
const edm::EDGetTokenT< TrackerMuonCollectiongmtTkMuonToken_
 
const edm::EDGetTokenT< std::vector< l1t::EtSum > > gttDisplacedHtSumToken_
 
const edm::EDGetTokenT< TkJetWordCollectiongttDisplacedJetToken_
 
const edm::EDGetTokenT< std::vector< l1t::EtSum > > gttEtSumToken_
 
const edm::EDGetTokenT< VertexWordCollectiongttPrimaryVertexToken_
 
const edm::EDGetTokenT< std::vector< l1t::EtSum > > gttPromptHtSumToken_
 
const edm::EDGetTokenT< TkJetWordCollectiongttPromptJetToken_
 
const L1GTScales scales_
 

Additional Inherited Members

- Public Types inherited from edm::global::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
template<typename T >
using BranchAliasSetterT = ProductRegistryHelper::BranchAliasSetterT< T >
 
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex > >
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Protected Member Functions inherited from edm::ProducerBase
template<Transition Tr = Transition::Event>
auto produces (std::string instanceName) noexcept
 declare what type of product will make and with which optional label More...
 
template<Transition B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<BranchType B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
template<Transition Tr = Transition::Event>
auto produces () noexcept
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
void resetItemsToGetFrom (BranchType iType)
 

Detailed Description

Definition at line 42 of file L1GTProducer.cc.

Constructor & Destructor Documentation

◆ L1GTProducer()

l1t::L1GTProducer::L1GTProducer ( const edm::ParameterSet config)
explicit

Definition at line 93 of file L1GTProducer.cc.

94  : scales_(config.getParameter<edm::ParameterSet>("scales")),
95  gttPromptJetToken_(consumes<TkJetWordCollection>(config.getParameter<edm::InputTag>("GTTPromptJets"))),
96  gttDisplacedJetToken_(consumes<TkJetWordCollection>(config.getParameter<edm::InputTag>("GTTDisplacedJets"))),
97  gttPromptHtSumToken_(consumes<std::vector<l1t::EtSum>>(config.getParameter<edm::InputTag>("GTTPromptHtSum"))),
99  consumes<std::vector<l1t::EtSum>>(config.getParameter<edm::InputTag>("GTTDisplacedHtSum"))),
100  gttEtSumToken_(consumes<std::vector<l1t::EtSum>>(config.getParameter<edm::InputTag>("GTTEtSum"))),
101  gttPrimaryVertexToken_(consumes<VertexWordCollection>(config.getParameter<edm::InputTag>("GTTPrimaryVert"))),
102  gmtSaPromptMuonToken_(consumes<SAMuonCollection>(config.getParameter<edm::InputTag>("GMTSaPromptMuons"))),
103  gmtSaDisplacedMuonToken_(consumes<SAMuonCollection>(config.getParameter<edm::InputTag>("GMTSaDisplacedMuons"))),
104  gmtTkMuonToken_(consumes<TrackerMuonCollection>(config.getParameter<edm::InputTag>("GMTTkMuons"))),
105  cl2JetSC4Token_(consumes<PFJetCollection>(config.getParameter<edm::InputTag>("CL2JetsSC4"))),
106  cl2JetSC8Token_(consumes<PFJetCollection>(config.getParameter<edm::InputTag>("CL2JetsSC8"))),
107  cl2PhotonToken_(consumes<TkEmCollection>(config.getParameter<edm::InputTag>("CL2Photons"))),
108  cl2ElectronToken_(consumes<TkElectronCollection>(config.getParameter<edm::InputTag>("CL2Electrons"))),
109  cl2TauToken_(consumes<PFTauCollection>(config.getParameter<edm::InputTag>("CL2Taus"))),
110  cl2EtSumToken_(consumes<std::vector<l1t::EtSum>>(config.getParameter<edm::InputTag>("CL2EtSum"))),
111  cl2HtSumToken_(consumes<std::vector<l1t::EtSum>>(config.getParameter<edm::InputTag>("CL2HtSum"))) {
112  produces<P2GTCandidateCollection>("GTTPromptJets");
113  produces<P2GTCandidateCollection>("GTTDisplacedJets");
114  produces<P2GTCandidateCollection>("GTTPromptHtSum");
115  produces<P2GTCandidateCollection>("GTTDisplacedHtSum");
116  produces<P2GTCandidateCollection>("GTTEtSum");
117  produces<P2GTCandidateCollection>("GTTPrimaryVert");
118 
119  produces<P2GTCandidateCollection>("GMTSaPromptMuons");
120  produces<P2GTCandidateCollection>("GMTSaDisplacedMuons");
121  produces<P2GTCandidateCollection>("GMTTkMuons");
122 
123  produces<P2GTCandidateCollection>("CL2JetsSC4");
124  produces<P2GTCandidateCollection>("CL2JetsSC8");
125  produces<P2GTCandidateCollection>("CL2Photons");
126  produces<P2GTCandidateCollection>("CL2Electrons");
127  produces<P2GTCandidateCollection>("CL2Taus");
128  produces<P2GTCandidateCollection>("CL2EtSum");
129  produces<P2GTCandidateCollection>("CL2HtSum");
130  }
const edm::EDGetTokenT< VertexWordCollection > gttPrimaryVertexToken_
Definition: L1GTProducer.cc:78
const edm::EDGetTokenT< TkElectronCollection > cl2ElectronToken_
Definition: L1GTProducer.cc:87
const L1GTScales scales_
Definition: L1GTProducer.cc:71
const edm::EDGetTokenT< TkJetWordCollection > gttPromptJetToken_
Definition: L1GTProducer.cc:73
Definition: config.py:1
const edm::EDGetTokenT< std::vector< l1t::EtSum > > cl2HtSumToken_
Definition: L1GTProducer.cc:90
const edm::EDGetTokenT< PFTauCollection > cl2TauToken_
Definition: L1GTProducer.cc:88
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
const edm::EDGetTokenT< std::vector< l1t::EtSum > > gttDisplacedHtSumToken_
Definition: L1GTProducer.cc:76
const edm::EDGetTokenT< PFJetCollection > cl2JetSC4Token_
Definition: L1GTProducer.cc:84
const edm::EDGetTokenT< TrackerMuonCollection > gmtTkMuonToken_
Definition: L1GTProducer.cc:82
const edm::EDGetTokenT< std::vector< l1t::EtSum > > cl2EtSumToken_
Definition: L1GTProducer.cc:89
const edm::EDGetTokenT< SAMuonCollection > gmtSaDisplacedMuonToken_
Definition: L1GTProducer.cc:81
const edm::EDGetTokenT< SAMuonCollection > gmtSaPromptMuonToken_
Definition: L1GTProducer.cc:80
const edm::EDGetTokenT< PFJetCollection > cl2JetSC8Token_
Definition: L1GTProducer.cc:85
const edm::EDGetTokenT< TkEmCollection > cl2PhotonToken_
Definition: L1GTProducer.cc:86
const edm::EDGetTokenT< std::vector< l1t::EtSum > > gttPromptHtSumToken_
Definition: L1GTProducer.cc:75
const edm::EDGetTokenT< std::vector< l1t::EtSum > > gttEtSumToken_
Definition: L1GTProducer.cc:77
const edm::EDGetTokenT< TkJetWordCollection > gttDisplacedJetToken_
Definition: L1GTProducer.cc:74

◆ ~L1GTProducer()

l1t::L1GTProducer::~L1GTProducer ( )
overridedefault

Member Function Documentation

◆ fillDescriptions()

void l1t::L1GTProducer::fillDescriptions ( edm::ConfigurationDescriptions description)
static

Definition at line 132 of file L1GTProducer.cc.

References submitPVResolutionJobs::desc, makeListRunsInFiles::description, and l1t::L1GTScales::fillPSetDescription().

132  {
134 
135  edm::ParameterSetDescription scalesDesc;
137  desc.add<edm::ParameterSetDescription>("scales", scalesDesc);
138 
139  desc.add<edm::InputTag>("GTTPromptJets");
140  desc.add<edm::InputTag>("GTTDisplacedJets");
141  desc.add<edm::InputTag>("GTTPromptHtSum");
142  desc.add<edm::InputTag>("GTTDisplacedHtSum");
143  desc.add<edm::InputTag>("GTTEtSum");
144  desc.add<edm::InputTag>("GTTPrimaryVert");
145 
146  desc.add<edm::InputTag>("GMTSaPromptMuons");
147  desc.add<edm::InputTag>("GMTSaDisplacedMuons");
148  desc.add<edm::InputTag>("GMTTkMuons");
149 
150  desc.add<edm::InputTag>("CL2JetsSC4");
151  desc.add<edm::InputTag>("CL2JetsSC8");
152  desc.add<edm::InputTag>("CL2Photons");
153  desc.add<edm::InputTag>("CL2Electrons");
154  desc.add<edm::InputTag>("CL2Taus");
155  desc.add<edm::InputTag>("CL2EtSum");
156  desc.add<edm::InputTag>("CL2HtSum");
157 
158  description.addWithDefaultLabel(desc);
159  }
static void fillPSetDescription(edm::ParameterSetDescription &)
Definition: L1GTScales.cc:53

◆ produce()

void l1t::L1GTProducer::produce ( edm::StreamID  ,
edm::Event event,
const edm::EventSetup setup 
) const
overrideprivatevirtual

Implements edm::global::EDProducerBase.

Definition at line 525 of file L1GTProducer.cc.

References produceCL2Electrons(), produceCL2EtSum(), produceCl2HtSum(), produceCL2JetsSC4(), produceCL2JetsSC8(), produceCL2Photons(), produceCL2Taus(), produceGMTSaDisplacedMuons(), produceGMTSaPromptMuons(), produceGMTTkMuons(), produceGTTDisplacedHtSum(), produceGTTDisplacedJets(), produceGTTEtSum(), produceGTTPrimaryVert(), produceGTTPromptHtSum(), and produceGTTPromptJets().

525  {
532 
536 
544  }
void produceCL2JetsSC8(edm::Event &event) const
void produceGMTSaPromptMuons(edm::Event &event) const
void produceCL2Taus(edm::Event &event) const
void produceCL2Photons(edm::Event &event) const
void produceCL2Electrons(edm::Event &event) const
void produceGMTTkMuons(edm::Event &event) const
void produceGTTPromptJets(edm::Event &event) const
void produceCL2EtSum(edm::Event &event) const
void produceCL2JetsSC4(edm::Event &event) const
void produceGTTDisplacedJets(edm::Event &event) const
void produceGTTPromptHtSum(edm::Event &event) const
void produceGTTDisplacedHtSum(edm::Event &event) const
void produceGTTEtSum(edm::Event &event) const
void produceCl2HtSum(edm::Event &event) const
void produceGTTPrimaryVert(edm::Event &event) const
void produceGMTSaDisplacedMuons(edm::Event &event) const
Definition: event.py:1

◆ produceCL2Electrons()

void l1t::L1GTProducer::produceCL2Electrons ( edm::Event event) const
private

Definition at line 438 of file L1GTProducer.cc.

References l1gt::Electron::charge, l1t::P2GTCandidate::CL2Electrons, cl2ElectronToken_, universalConfigTemplate::collection, l1gt::ThreeVector::eta, l1t::P2GTCandidate::hwCharge_, l1t::P2GTCandidate::hwEta_, l1t::P2GTCandidate::hwIsolationPT_, l1t::P2GTCandidate::hwPhi_, l1t::P2GTCandidate::hwPT_, l1t::P2GTCandidate::hwQualityFlags_, l1t::P2GTCandidate::hwZ0_, mps_fire::i, l1gt::Electron::isolationPT, eostools::move(), l1t::P2GTCandidate::objectType_, valuemaptraslator_cfi::outputCollection, l1gt::ThreeVector::phi, l1gt::ThreeVector::pt, l1gt::Electron::qualityFlags, scales_, l1t::L1GTScales::to_chg(), l1t::L1GTScales::to_eta(), l1t::L1GTScales::to_phi(), l1t::L1GTScales::to_pT(), l1t::L1GTScales::to_z0(), l1gt::Electron::v3, and l1gt::Electron::z0.

Referenced by produce().

438  {
439  std::unique_ptr<P2GTCandidateCollection> outputCollection = std::make_unique<P2GTCandidateCollection>();
441  for (size_t i = 0; i < collection.size() && i < 12; i++) {
442  l1gt::Electron gtElectron = collection[i].hwObj();
443  int hwZ0 = gtElectron.z0.V.to_int() << 7;
444  P2GTCandidate gtObj(scales_.to_chg(gtElectron.charge.V.to_int()),
446  scales_.to_eta(gtElectron.v3.eta.V.to_int()),
447  scales_.to_phi(gtElectron.v3.phi.V.to_int()),
448  0),
450  gtObj.hwPT_ = gtElectron.v3.pt.V.to_int();
451  gtObj.hwPhi_ = gtElectron.v3.phi.V.to_int();
452  gtObj.hwEta_ = gtElectron.v3.eta.V.to_int();
453  gtObj.hwZ0_ = hwZ0;
454  gtObj.hwIsolationPT_ = gtElectron.isolationPT.V.to_int();
455  gtObj.hwQualityFlags_ = gtElectron.qualityFlags.V.to_int();
456  gtObj.hwCharge_ = gtElectron.charge.V.to_int();
457  gtObj.objectType_ = P2GTCandidate::CL2Electrons;
458 
459  outputCollection->push_back(gtObj);
460  }
461  event.put(std::move(outputCollection), "CL2Electrons");
462  }
std::vector< TkElectron > TkElectronCollection
Definition: TkElectronFwd.h:16
const edm::EDGetTokenT< TkElectronCollection > cl2ElectronToken_
Definition: L1GTProducer.cc:87
const L1GTScales scales_
Definition: L1GTProducer.cc:71
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
Definition: ParticleState.h:29
double to_phi(int value) const
Definition: L1GTScales.h:82
int to_chg(int value) const
Definition: L1GTScales.h:87
math::XYZPoint Point
point in the space
Definition: ParticleState.h:31
double to_z0(int value) const
Definition: L1GTScales.h:84
double to_eta(int value) const
Definition: L1GTScales.h:83
egquality_t qualityFlags
Definition: gt_datatypes.h:264
ThreeVector v3
Definition: gt_datatypes.h:263
double to_pT(int value) const
Definition: L1GTScales.h:81
ap_uint< 1 > charge
Definition: gt_datatypes.h:265
def move(src, dest)
Definition: eostools.py:511

◆ produceCL2EtSum()

void l1t::L1GTProducer::produceCL2EtSum ( edm::Event event) const
private

Definition at line 489 of file L1GTProducer.cc.

References l1t::P2GTCandidate::CL2EtSum, cl2EtSumToken_, universalConfigTemplate::collection, l1gt::Scales::ETAPHI_LSB, l1t::P2GTCandidate::hwPT_, BTaggingMonitor_cfi::met, eostools::move(), valuemaptraslator_cfi::outputCollection, scales_, l1t::L1GTScales::to_phi(), and l1t::L1GTScales::to_pT().

Referenced by produce().

489  {
490  std::unique_ptr<P2GTCandidateCollection> outputCollection = std::make_unique<P2GTCandidateCollection>();
491  const std::vector<EtSum> &collection = event.get(cl2EtSumToken_);
492  const EtSum &met = collection[0];
493 
494  l1gt::Sum sum{true /* valid */, met.pt(), met.phi() / l1gt::Scales::ETAPHI_LSB, 0 /* scalar sum */};
495 
496  P2GTCandidate gtObj(0,
498  scales_.to_pT(sum.vector_pt.V.to_int()), 0, scales_.to_phi(sum.vector_phi.V.to_int()), 0));
499  gtObj.hwPT_ = sum.vector_pt.V.to_int();
500  gtObj.hwPhi_ = sum.vector_phi.V.to_int();
501  gtObj.hwScalarSumPT_ = sum.scalar_pt.V.to_int();
502  gtObj.objectType_ = P2GTCandidate::CL2EtSum;
503 
504  outputCollection->push_back(gtObj);
505  event.put(std::move(outputCollection), "CL2EtSum");
506  }
const L1GTScales scales_
Definition: L1GTProducer.cc:71
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
Definition: ParticleState.h:29
double to_phi(int value) const
Definition: L1GTScales.h:82
Optional< int > hwPT_
const edm::EDGetTokenT< std::vector< l1t::EtSum > > cl2EtSumToken_
Definition: L1GTProducer.cc:89
double to_pT(int value) const
Definition: L1GTScales.h:81
constexpr float ETAPHI_LSB
Definition: gt_datatypes.h:45
def move(src, dest)
Definition: eostools.py:511

◆ produceCl2HtSum()

void l1t::L1GTProducer::produceCl2HtSum ( edm::Event event) const
private

Definition at line 508 of file L1GTProducer.cc.

References l1t::P2GTCandidate::CL2HtSum, cl2HtSumToken_, universalConfigTemplate::collection, l1t::P2GTCandidate::hwPT_, eostools::move(), valuemaptraslator_cfi::outputCollection, scales_, l1t::L1GTScales::to_phi(), and l1t::L1GTScales::to_pT().

Referenced by produce().

508  {
509  std::unique_ptr<P2GTCandidateCollection> outputCollection = std::make_unique<P2GTCandidateCollection>();
510  const std::vector<EtSum> &collection = event.get(cl2HtSumToken_);
511  const EtSum &ht = collection[0];
512  const EtSum &mht = collection[1];
513 
514  P2GTCandidate gtObj(
516  gtObj.hwPT_ = mht.hwPt();
517  gtObj.hwPhi_ = mht.hwPhi();
518  gtObj.hwScalarSumPT_ = ht.hwPt();
519  gtObj.objectType_ = P2GTCandidate::CL2HtSum;
520 
521  outputCollection->push_back(gtObj);
522  event.put(std::move(outputCollection), "CL2HtSum");
523  }
const L1GTScales scales_
Definition: L1GTProducer.cc:71
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
Definition: ParticleState.h:29
double to_phi(int value) const
Definition: L1GTScales.h:82
const edm::EDGetTokenT< std::vector< l1t::EtSum > > cl2HtSumToken_
Definition: L1GTProducer.cc:90
Optional< int > hwPT_
double to_pT(int value) const
Definition: L1GTScales.h:81
def move(src, dest)
Definition: eostools.py:511

◆ produceCL2JetsSC4()

void l1t::L1GTProducer::produceCL2JetsSC4 ( edm::Event event) const
private

Definition at line 370 of file L1GTProducer.cc.

References cl2JetSC4Token_, l1t::P2GTCandidate::CL2JetsSC4, universalConfigTemplate::collection, l1t::gtJet, l1t::P2GTCandidate::hwEta_, l1t::P2GTCandidate::hwPhi_, l1t::P2GTCandidate::hwPT_, l1t::P2GTCandidate::hwZ0_, mps_fire::i, eostools::move(), l1t::P2GTCandidate::objectType_, valuemaptraslator_cfi::outputCollection, scales_, l1t::L1GTScales::to_eta(), l1t::L1GTScales::to_phi(), l1t::L1GTScales::to_pT(), l1t::L1GTScales::to_z0(), and l1gt::Jet::unpack().

Referenced by produce().

370  {
371  std::unique_ptr<P2GTCandidateCollection> outputCollection = std::make_unique<P2GTCandidateCollection>();
372  const PFJetCollection &collection = event.get(cl2JetSC4Token_);
373  for (size_t i = 0; i < collection.size() && i < 12; i++) {
374  l1gt::Jet gtJet = l1gt::Jet::unpack(collection[i].getHWJetGT());
375  int hwZ0 = gtJet.z0.V.to_int() << 7;
376  P2GTCandidate gtObj(0,
378  scales_.to_eta(gtJet.v3.eta.V.to_int()),
379  scales_.to_phi(gtJet.v3.phi.V.to_int()),
380  0),
382  gtObj.hwPT_ = gtJet.v3.pt.V.to_int();
383  gtObj.hwPhi_ = gtJet.v3.phi.V.to_int();
384  gtObj.hwEta_ = gtJet.v3.eta.V.to_int();
385  gtObj.hwZ0_ = hwZ0;
386  gtObj.objectType_ = P2GTCandidate::CL2JetsSC4;
387 
388  outputCollection->push_back(gtObj);
389  }
390  event.put(std::move(outputCollection), "CL2JetsSC4");
391  }
const L1GTScales scales_
Definition: L1GTProducer.cc:71
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
Definition: ParticleState.h:29
double to_phi(int value) const
Definition: L1GTScales.h:82
math::XYZPoint Point
point in the space
Definition: ParticleState.h:31
double to_z0(int value) const
Definition: L1GTScales.h:84
static Jet unpack(const std::array< uint64_t, 2 > &src)
Definition: gt_datatypes.h:129
std::vector< l1t::PFJet > PFJetCollection
Definition: PFJet.h:61
double to_eta(int value) const
Definition: L1GTScales.h:83
const edm::EDGetTokenT< PFJetCollection > cl2JetSC4Token_
Definition: L1GTProducer.cc:84
double to_pT(int value) const
Definition: L1GTScales.h:81
def move(src, dest)
Definition: eostools.py:511

◆ produceCL2JetsSC8()

void l1t::L1GTProducer::produceCL2JetsSC8 ( edm::Event event) const
private

Definition at line 393 of file L1GTProducer.cc.

References cl2JetSC8Token_, l1t::P2GTCandidate::CL2JetsSC8, universalConfigTemplate::collection, l1t::gtJet, l1t::P2GTCandidate::hwEta_, l1t::P2GTCandidate::hwPhi_, l1t::P2GTCandidate::hwPT_, l1t::P2GTCandidate::hwZ0_, mps_fire::i, eostools::move(), l1t::P2GTCandidate::objectType_, valuemaptraslator_cfi::outputCollection, scales_, l1t::L1GTScales::to_eta(), l1t::L1GTScales::to_phi(), l1t::L1GTScales::to_pT(), l1t::L1GTScales::to_z0(), and l1gt::Jet::unpack().

Referenced by produce().

393  {
394  std::unique_ptr<P2GTCandidateCollection> outputCollection = std::make_unique<P2GTCandidateCollection>();
395  const PFJetCollection &collection = event.get(cl2JetSC8Token_);
396  for (size_t i = 0; i < collection.size() && i < 12; i++) {
397  l1gt::Jet gtJet = l1gt::Jet::unpack(collection[i].getHWJetGT());
398  int hwZ0 = gtJet.z0.V.to_int() << 7;
399  P2GTCandidate gtObj(0,
401  scales_.to_eta(gtJet.v3.eta.V.to_int()),
402  scales_.to_phi(gtJet.v3.phi.V.to_int()),
403  0),
405  gtObj.hwPT_ = gtJet.v3.pt.V.to_int();
406  gtObj.hwPhi_ = gtJet.v3.phi.V.to_int();
407  gtObj.hwEta_ = gtJet.v3.eta.V.to_int();
408  gtObj.hwZ0_ = hwZ0;
409  gtObj.objectType_ = P2GTCandidate::CL2JetsSC8;
410 
411  outputCollection->push_back(gtObj);
412  }
413  event.put(std::move(outputCollection), "CL2JetsSC8");
414  }
const L1GTScales scales_
Definition: L1GTProducer.cc:71
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
Definition: ParticleState.h:29
double to_phi(int value) const
Definition: L1GTScales.h:82
math::XYZPoint Point
point in the space
Definition: ParticleState.h:31
double to_z0(int value) const
Definition: L1GTScales.h:84
static Jet unpack(const std::array< uint64_t, 2 > &src)
Definition: gt_datatypes.h:129
std::vector< l1t::PFJet > PFJetCollection
Definition: PFJet.h:61
double to_eta(int value) const
Definition: L1GTScales.h:83
const edm::EDGetTokenT< PFJetCollection > cl2JetSC8Token_
Definition: L1GTProducer.cc:85
double to_pT(int value) const
Definition: L1GTScales.h:81
def move(src, dest)
Definition: eostools.py:511

◆ produceCL2Photons()

void l1t::L1GTProducer::produceCL2Photons ( edm::Event event) const
private

Definition at line 416 of file L1GTProducer.cc.

References l1t::P2GTCandidate::CL2Photons, cl2PhotonToken_, universalConfigTemplate::collection, l1gt::ThreeVector::eta, l1t::P2GTCandidate::hwPT_, mps_fire::i, l1gt::Photon::isolationPT, eostools::move(), valuemaptraslator_cfi::outputCollection, l1gt::ThreeVector::phi, l1gt::ThreeVector::pt, l1gt::Photon::qualityFlags, scales_, l1t::L1GTScales::to_eta(), l1t::L1GTScales::to_phi(), l1t::L1GTScales::to_pT(), and l1gt::Photon::v3.

Referenced by produce().

416  {
417  std::unique_ptr<P2GTCandidateCollection> outputCollection = std::make_unique<P2GTCandidateCollection>();
418  const TkEmCollection &collection = event.get(cl2PhotonToken_);
419  for (size_t i = 0; i < collection.size() && i < 12; i++) {
420  l1gt::Photon gtPhoton = collection[i].hwObj();
421  P2GTCandidate gtObj(0,
423  scales_.to_eta(gtPhoton.v3.eta.V.to_int()),
424  scales_.to_phi(gtPhoton.v3.phi.V.to_int()),
425  0));
426  gtObj.hwPT_ = gtPhoton.v3.pt.V.to_int();
427  gtObj.hwPhi_ = gtPhoton.v3.phi.V.to_int();
428  gtObj.hwEta_ = gtPhoton.v3.eta.V.to_int();
429  gtObj.hwIsolationPT_ = gtPhoton.isolationPT.V.to_int();
430  gtObj.hwQualityFlags_ = gtPhoton.qualityFlags.V.to_int();
431  gtObj.objectType_ = P2GTCandidate::CL2Photons;
432 
433  outputCollection->push_back(gtObj);
434  }
435  event.put(std::move(outputCollection), "CL2Photons");
436  }
egquality_t qualityFlags
Definition: gt_datatypes.h:316
const L1GTScales scales_
Definition: L1GTProducer.cc:71
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
Definition: ParticleState.h:29
double to_phi(int value) const
Definition: L1GTScales.h:82
iso_t isolationPT
Definition: gt_datatypes.h:317
std::vector< TkEm > TkEmCollection
Definition: TkEmFwd.h:17
double to_eta(int value) const
Definition: L1GTScales.h:83
Optional< int > hwPT_
double to_pT(int value) const
Definition: L1GTScales.h:81
ThreeVector v3
Definition: gt_datatypes.h:315
const edm::EDGetTokenT< TkEmCollection > cl2PhotonToken_
Definition: L1GTProducer.cc:86
def move(src, dest)
Definition: eostools.py:511

◆ produceCL2Taus()

void l1t::L1GTProducer::produceCL2Taus ( edm::Event event) const
private

Definition at line 464 of file L1GTProducer.cc.

References l1t::P2GTCandidate::CL2Taus, cl2TauToken_, universalConfigTemplate::collection, l1t::gtTau, l1t::P2GTCandidate::hwPT_, mps_fire::i, eostools::move(), valuemaptraslator_cfi::outputCollection, scales_, l1t::L1GTScales::to_chg(), l1t::L1GTScales::to_eta(), l1t::L1GTScales::to_phi(), and l1t::L1GTScales::to_pT().

Referenced by produce().

464  {
465  std::unique_ptr<P2GTCandidateCollection> outputCollection = std::make_unique<P2GTCandidateCollection>();
466  const PFTauCollection &collection = event.get(cl2TauToken_);
467  for (size_t i = 0; i < collection.size() && i < 12; i++) {
468  l1gt::Tau gtTau = collection[i].getHWTauGT();
469  P2GTCandidate gtObj(scales_.to_chg(gtTau.charge.V.to_int()),
471  scales_.to_eta(gtTau.v3.eta.V.to_int()),
472  scales_.to_phi(gtTau.v3.phi.V.to_int()),
473  0));
474  gtObj.hwPT_ = gtTau.v3.pt.V.to_int();
475  gtObj.hwPhi_ = gtTau.v3.phi.V.to_int();
476  gtObj.hwEta_ = gtTau.v3.eta.V.to_int();
477  gtObj.hwSeed_pT_ = gtTau.seed_pt.V.to_int();
478  gtObj.hwSeed_z0_ = gtTau.seed_z0.V.to_int();
479  gtObj.hwCharge_ = gtTau.charge.V.to_int();
480  gtObj.hwType_ = gtTau.type.V.to_int();
481  gtObj.hwQualityScore_ = gtTau.quality.V.to_int();
482  gtObj.objectType_ = P2GTCandidate::CL2Taus;
483 
484  outputCollection->push_back(gtObj);
485  }
486  event.put(std::move(outputCollection), "CL2Taus");
487  }
std::vector< l1t::PFTau > PFTauCollection
Definition: PFTau.h:90
const L1GTScales scales_
Definition: L1GTProducer.cc:71
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
Definition: ParticleState.h:29
double to_phi(int value) const
Definition: L1GTScales.h:82
int to_chg(int value) const
Definition: L1GTScales.h:87
const edm::EDGetTokenT< PFTauCollection > cl2TauToken_
Definition: L1GTProducer.cc:88
double to_eta(int value) const
Definition: L1GTScales.h:83
Optional< int > hwPT_
double to_pT(int value) const
Definition: L1GTScales.h:81
def move(src, dest)
Definition: eostools.py:511

◆ produceGMTSaDisplacedMuons()

void l1t::L1GTProducer::produceGMTSaDisplacedMuons ( edm::Event event) const
private

Definition at line 316 of file L1GTProducer.cc.

References universalConfigTemplate::collection, l1t::P2GTCandidate::GMTSaDisplacedMuons, gmtSaDisplacedMuonToken_, l1t::P2GTCandidate::hwCharge_, l1t::P2GTCandidate::hwD0_, l1t::P2GTCandidate::hwEta_, l1t::P2GTCandidate::hwPhi_, l1t::P2GTCandidate::hwPT_, l1t::P2GTCandidate::hwQualityFlags_, l1t::P2GTCandidate::hwZ0_, mps_fire::i, eostools::move(), getGTfromDQMFile::obj, l1t::P2GTCandidate::objectType_, valuemaptraslator_cfi::outputCollection, scales_, l1t::L1GTScales::to_chg(), l1t::L1GTScales::to_eta(), l1t::L1GTScales::to_phi(), l1t::L1GTScales::to_pT(), and l1t::L1GTScales::to_z0().

Referenced by produce().

316  {
317  std::unique_ptr<P2GTCandidateCollection> outputCollection = std::make_unique<P2GTCandidateCollection>();
319  for (size_t i = 0; i < collection.size() && i < 12; i++) {
320  const SAMuon &obj = collection[i];
321  int hwZ0 = obj.apZ0().to_int() << 12;
322  P2GTCandidate gtObj(scales_.to_chg(obj.apCharge().to_int()),
324  scales_.to_eta(obj.apEta().to_int()),
325  scales_.to_phi(obj.apPhi().to_int()),
326  0),
328  gtObj.hwPT_ = obj.apPt().to_int();
329  gtObj.hwPhi_ = obj.apPhi().to_int();
330  gtObj.hwEta_ = obj.apEta().to_int();
331  gtObj.hwZ0_ = hwZ0;
332  gtObj.hwQualityFlags_ = obj.apQualFlags().to_int();
333  gtObj.hwCharge_ = obj.apCharge().to_int();
334  gtObj.hwD0_ = obj.apD0().to_int();
335  gtObj.objectType_ = P2GTCandidate::GMTSaDisplacedMuons;
336 
337  outputCollection->push_back(gtObj);
338  }
339  event.put(std::move(outputCollection), "GMTSaDisplacedMuons");
340  }
const L1GTScales scales_
Definition: L1GTProducer.cc:71
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
Definition: ParticleState.h:29
double to_phi(int value) const
Definition: L1GTScales.h:82
int to_chg(int value) const
Definition: L1GTScales.h:87
math::XYZPoint Point
point in the space
Definition: ParticleState.h:31
double to_z0(int value) const
Definition: L1GTScales.h:84
double to_eta(int value) const
Definition: L1GTScales.h:83
const edm::EDGetTokenT< SAMuonCollection > gmtSaDisplacedMuonToken_
Definition: L1GTProducer.cc:81
std::vector< SAMuon > SAMuonCollection
Definition: SAMuon.h:15
double to_pT(int value) const
Definition: L1GTScales.h:81
def move(src, dest)
Definition: eostools.py:511

◆ produceGMTSaPromptMuons()

void l1t::L1GTProducer::produceGMTSaPromptMuons ( edm::Event event) const
private

Definition at line 290 of file L1GTProducer.cc.

References universalConfigTemplate::collection, l1t::P2GTCandidate::GMTSaPromptMuons, gmtSaPromptMuonToken_, l1t::P2GTCandidate::hwCharge_, l1t::P2GTCandidate::hwD0_, l1t::P2GTCandidate::hwEta_, l1t::P2GTCandidate::hwPhi_, l1t::P2GTCandidate::hwPT_, l1t::P2GTCandidate::hwQualityFlags_, l1t::P2GTCandidate::hwZ0_, mps_fire::i, eostools::move(), getGTfromDQMFile::obj, l1t::P2GTCandidate::objectType_, valuemaptraslator_cfi::outputCollection, scales_, l1t::L1GTScales::to_chg(), l1t::L1GTScales::to_eta(), l1t::L1GTScales::to_phi(), l1t::L1GTScales::to_pT(), and l1t::L1GTScales::to_z0().

Referenced by produce().

290  {
291  std::unique_ptr<P2GTCandidateCollection> outputCollection = std::make_unique<P2GTCandidateCollection>();
293  for (size_t i = 0; i < collection.size() && i < 12; i++) {
294  const SAMuon &obj = collection[i];
295  int hwZ0 = obj.apZ0().to_int() << 12;
296  P2GTCandidate gtObj(scales_.to_chg(obj.apCharge().to_int()),
298  scales_.to_eta(obj.apEta().to_int()),
299  scales_.to_phi(obj.apPhi().to_int()),
300  0),
302  gtObj.hwPT_ = obj.apPt().to_int();
303  gtObj.hwPhi_ = obj.apPhi().to_int();
304  gtObj.hwEta_ = obj.apEta().to_int();
305  gtObj.hwZ0_ = hwZ0;
306  gtObj.hwQualityFlags_ = obj.apQualFlags().to_int();
307  gtObj.hwCharge_ = obj.apCharge().to_int();
308  gtObj.hwD0_ = obj.apD0().to_int();
309  gtObj.objectType_ = P2GTCandidate::GMTSaPromptMuons;
310 
311  outputCollection->push_back(gtObj);
312  }
313  event.put(std::move(outputCollection), "GMTSaPromptMuons");
314  }
const L1GTScales scales_
Definition: L1GTProducer.cc:71
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
Definition: ParticleState.h:29
double to_phi(int value) const
Definition: L1GTScales.h:82
int to_chg(int value) const
Definition: L1GTScales.h:87
math::XYZPoint Point
point in the space
Definition: ParticleState.h:31
double to_z0(int value) const
Definition: L1GTScales.h:84
double to_eta(int value) const
Definition: L1GTScales.h:83
std::vector< SAMuon > SAMuonCollection
Definition: SAMuon.h:15
const edm::EDGetTokenT< SAMuonCollection > gmtSaPromptMuonToken_
Definition: L1GTProducer.cc:80
double to_pT(int value) const
Definition: L1GTScales.h:81
def move(src, dest)
Definition: eostools.py:511

◆ produceGMTTkMuons()

void l1t::L1GTProducer::produceGMTTkMuons ( edm::Event event) const
private

Definition at line 342 of file L1GTProducer.cc.

References universalConfigTemplate::collection, l1t::P2GTCandidate::GMTTkMuons, gmtTkMuonToken_, l1t::P2GTCandidate::hwBeta_, l1t::P2GTCandidate::hwCharge_, l1t::P2GTCandidate::hwD0_, l1t::P2GTCandidate::hwEta_, l1t::P2GTCandidate::hwIsolationPT_, l1t::P2GTCandidate::hwPhi_, l1t::P2GTCandidate::hwPT_, l1t::P2GTCandidate::hwQualityFlags_, l1t::P2GTCandidate::hwZ0_, mps_fire::i, eostools::move(), getGTfromDQMFile::obj, l1t::P2GTCandidate::objectType_, valuemaptraslator_cfi::outputCollection, scales_, l1t::L1GTScales::to_chg(), l1t::L1GTScales::to_eta(), l1t::L1GTScales::to_phi(), l1t::L1GTScales::to_pT(), and l1t::L1GTScales::to_z0().

Referenced by produce().

342  {
343  std::unique_ptr<P2GTCandidateCollection> outputCollection = std::make_unique<P2GTCandidateCollection>();
345  for (size_t i = 0; i < collection.size() && i < 12; i++) {
346  const TrackerMuon &obj = collection[i];
347  int hwZ0 = obj.apZ0().to_int() << 7;
348  P2GTCandidate gtObj(scales_.to_chg(obj.apCharge().to_int()),
350  scales_.to_eta(obj.apEta().to_int()),
351  scales_.to_phi(obj.apPhi().to_int()),
352  0),
354  gtObj.hwPT_ = obj.apPt().to_int();
355  gtObj.hwPhi_ = obj.apPhi().to_int();
356  gtObj.hwEta_ = obj.apEta().to_int();
357  gtObj.hwZ0_ = hwZ0;
358  gtObj.hwQualityFlags_ = obj.apQualFlags().to_int();
359  gtObj.hwIsolationPT_ = obj.apIso().to_int();
360  gtObj.hwCharge_ = obj.apCharge().to_int();
361  gtObj.hwD0_ = obj.apD0().to_int();
362  gtObj.hwBeta_ = obj.apBeta().to_int();
363  gtObj.objectType_ = P2GTCandidate::GMTTkMuons;
364 
365  outputCollection->push_back(gtObj);
366  }
367  event.put(std::move(outputCollection), "GMTTkMuons");
368  }
const L1GTScales scales_
Definition: L1GTProducer.cc:71
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
Definition: ParticleState.h:29
double to_phi(int value) const
Definition: L1GTScales.h:82
int to_chg(int value) const
Definition: L1GTScales.h:87
math::XYZPoint Point
point in the space
Definition: ParticleState.h:31
double to_z0(int value) const
Definition: L1GTScales.h:84
double to_eta(int value) const
Definition: L1GTScales.h:83
const edm::EDGetTokenT< TrackerMuonCollection > gmtTkMuonToken_
Definition: L1GTProducer.cc:82
std::vector< TrackerMuon > TrackerMuonCollection
Definition: TrackerMuon.h:17
double to_pT(int value) const
Definition: L1GTScales.h:81
def move(src, dest)
Definition: eostools.py:511

◆ produceGTTDisplacedHtSum()

void l1t::L1GTProducer::produceGTTDisplacedHtSum ( edm::Event event) const
private

Definition at line 251 of file L1GTProducer.cc.

References universalConfigTemplate::collection, l1tmhtemu::EtMiss::Et, l1t::P2GTCandidate::GTTDisplacedHtSum, gttDisplacedHtSumToken_, l1t::P2GTCandidate::hwPT_, eostools::move(), getGTfromDQMFile::obj, valuemaptraslator_cfi::outputCollection, scales_, l1t::L1GTScales::to_phi(), and l1t::L1GTScales::to_pT().

Referenced by produce().

251  {
252  std::unique_ptr<P2GTCandidateCollection> outputCollection = std::make_unique<P2GTCandidateCollection>();
253  const std::vector<l1t::EtSum> &collection = event.get(gttDisplacedHtSumToken_);
254  if (collection.size() > 0) {
255  const l1t::EtSum &obj = collection[0];
256  l1tmhtemu::EtMiss htMiss;
257  htMiss.Et = obj.p4().energy();
258  P2GTCandidate gtObj(0,
260  scales_.to_pT(htMiss.Et.V.to_int()), 0, scales_.to_phi(obj.hwPhi()), 0));
261 
262  gtObj.hwPT_ = htMiss.Et.V.to_int();
263  gtObj.hwPhi_ = obj.hwPhi();
264  gtObj.hwScalarSumPT_ = obj.hwPt();
265  gtObj.objectType_ = P2GTCandidate::GTTDisplacedHtSum;
266 
267  outputCollection->push_back(gtObj);
268  }
269 
270  event.put(std::move(outputCollection), "GTTDisplacedHtSum");
271  }
const L1GTScales scales_
Definition: L1GTProducer.cc:71
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
Definition: ParticleState.h:29
double to_phi(int value) const
Definition: L1GTScales.h:82
const edm::EDGetTokenT< std::vector< l1t::EtSum > > gttDisplacedHtSumToken_
Definition: L1GTProducer.cc:76
Optional< int > hwPT_
double to_pT(int value) const
Definition: L1GTScales.h:81
def move(src, dest)
Definition: eostools.py:511

◆ produceGTTDisplacedJets()

void l1t::L1GTProducer::produceGTTDisplacedJets ( edm::Event event) const
private

Definition at line 205 of file L1GTProducer.cc.

References universalConfigTemplate::collection, l1t::P2GTCandidate::GTTDisplacedJets, gttDisplacedJetToken_, l1t::P2GTCandidate::hwEta_, l1t::P2GTCandidate::hwNumber_of_tracks_, l1t::P2GTCandidate::hwPhi_, l1t::P2GTCandidate::hwPT_, l1t::P2GTCandidate::hwZ0_, mps_fire::i, eostools::move(), getGTfromDQMFile::obj, l1t::P2GTCandidate::objectType_, valuemaptraslator_cfi::outputCollection, scales_, l1t::L1GTScales::to_eta(), l1t::L1GTScales::to_phi(), l1t::L1GTScales::to_pT(), and l1t::L1GTScales::to_z0().

Referenced by produce().

205  {
206  std::unique_ptr<P2GTCandidateCollection> outputCollection = std::make_unique<P2GTCandidateCollection>();
208  for (std::size_t i = 0; i < collection.size() && i < 12; i++) {
209  const TkJetWord &obj = collection[i];
210  int hwZ0 = obj.z0Word().V.to_int() << 7;
211  P2GTCandidate gtObj(0,
213  scales_.to_eta(obj.glbEtaWord().V.to_int()),
214  scales_.to_phi(obj.glbPhiWord().V.to_int()),
215  0),
217  gtObj.hwPT_ = obj.ptWord().V.to_int();
218  gtObj.hwPhi_ = obj.glbPhiWord().V.to_int();
219  gtObj.hwEta_ = obj.glbEtaWord().V.to_int();
220  gtObj.hwZ0_ = hwZ0;
221  gtObj.hwNumber_of_tracks_ = obj.ntWord().V.to_int();
222  gtObj.objectType_ = P2GTCandidate::GTTDisplacedJets;
223 
224  outputCollection->push_back(gtObj);
225  }
226  event.put(std::move(outputCollection), "GTTDisplacedJets");
227  }
std::vector< l1t::TkJetWord > TkJetWordCollection
Definition: TkJetWord.h:191
const L1GTScales scales_
Definition: L1GTProducer.cc:71
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
Definition: ParticleState.h:29
double to_phi(int value) const
Definition: L1GTScales.h:82
math::XYZPoint Point
point in the space
Definition: ParticleState.h:31
double to_z0(int value) const
Definition: L1GTScales.h:84
double to_eta(int value) const
Definition: L1GTScales.h:83
double to_pT(int value) const
Definition: L1GTScales.h:81
def move(src, dest)
Definition: eostools.py:511
const edm::EDGetTokenT< TkJetWordCollection > gttDisplacedJetToken_
Definition: L1GTProducer.cc:74

◆ produceGTTEtSum()

void l1t::L1GTProducer::produceGTTEtSum ( edm::Event event) const
private

Definition at line 273 of file L1GTProducer.cc.

References universalConfigTemplate::collection, l1t::P2GTCandidate::GTTEtSum, gttEtSumToken_, l1t::P2GTCandidate::hwPT_, eostools::move(), getGTfromDQMFile::obj, valuemaptraslator_cfi::outputCollection, scales_, l1t::L1GTScales::to_phi(), and l1t::L1GTScales::to_pT().

Referenced by produce().

273  {
274  std::unique_ptr<P2GTCandidateCollection> outputCollection = std::make_unique<P2GTCandidateCollection>();
275  const std::vector<l1t::EtSum> &collection = event.get(gttEtSumToken_);
276  if (collection.size() > 0) {
277  const l1t::EtSum &obj = collection[0];
278  P2GTCandidate gtObj(
280  gtObj.hwPT_ = obj.hwPt();
281  gtObj.hwPhi_ = obj.hwPhi();
282  gtObj.objectType_ = P2GTCandidate::GTTEtSum;
283 
284  outputCollection->push_back(gtObj);
285  }
286 
287  event.put(std::move(outputCollection), "GTTEtSum");
288  }
const L1GTScales scales_
Definition: L1GTProducer.cc:71
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
Definition: ParticleState.h:29
double to_phi(int value) const
Definition: L1GTScales.h:82
Optional< int > hwPT_
double to_pT(int value) const
Definition: L1GTScales.h:81
def move(src, dest)
Definition: eostools.py:511
const edm::EDGetTokenT< std::vector< l1t::EtSum > > gttEtSumToken_
Definition: L1GTProducer.cc:77

◆ produceGTTPrimaryVert()

void l1t::L1GTProducer::produceGTTPrimaryVert ( edm::Event event) const
private

Definition at line 161 of file L1GTProducer.cc.

References universalConfigTemplate::collection, l1t::P2GTCandidate::GTTPrimaryVert, gttPrimaryVertexToken_, l1t::P2GTCandidate::hwNumber_of_tracks_in_pv_, l1t::P2GTCandidate::hwNumber_of_tracks_not_in_pv_, l1t::P2GTCandidate::hwQualityScore_, l1t::P2GTCandidate::hwSum_pT_pv_, l1t::P2GTCandidate::hwZ0_, mps_fire::i, eostools::move(), getGTfromDQMFile::obj, l1t::P2GTCandidate::objectType_, valuemaptraslator_cfi::outputCollection, scales_, and l1t::L1GTScales::to_z0().

Referenced by produce().

161  {
162  std::unique_ptr<P2GTCandidateCollection> outputCollection = std::make_unique<P2GTCandidateCollection>();
164  for (std::size_t i = 0; i < collection.size() && i < 10; i++) {
165  const VertexWord &obj = collection[i];
166  int hwZ0 = obj.z0Word().V.to_int() * 5;
167  P2GTCandidate gtObj(
169  gtObj.hwZ0_ = hwZ0;
170  gtObj.hwQualityScore_ = obj.qualityWord().V.to_int();
171  gtObj.hwSum_pT_pv_ = obj.multiplicityWord().V.to_int();
172  gtObj.hwNumber_of_tracks_in_pv_ = obj.multiplicityWord().V.to_int();
173  gtObj.hwNumber_of_tracks_not_in_pv_ = obj.inverseMultiplicityWord().V.to_int();
174  gtObj.objectType_ = P2GTCandidate::GTTPrimaryVert;
175 
176  outputCollection->push_back(gtObj);
177  }
178  event.put(std::move(outputCollection), "GTTPrimaryVert");
179  }
const edm::EDGetTokenT< VertexWordCollection > gttPrimaryVertexToken_
Definition: L1GTProducer.cc:78
const L1GTScales scales_
Definition: L1GTProducer.cc:71
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
Definition: ParticleState.h:29
math::XYZPoint Point
point in the space
Definition: ParticleState.h:31
double to_z0(int value) const
Definition: L1GTScales.h:84
std::vector< VertexWord > VertexWordCollection
Definition: VertexWord.h:197
def move(src, dest)
Definition: eostools.py:511

◆ produceGTTPromptHtSum()

void l1t::L1GTProducer::produceGTTPromptHtSum ( edm::Event event) const
private

Definition at line 229 of file L1GTProducer.cc.

References universalConfigTemplate::collection, l1tmhtemu::EtMiss::Et, l1t::P2GTCandidate::GTTPromptHtSum, gttPromptHtSumToken_, l1t::P2GTCandidate::hwPT_, eostools::move(), getGTfromDQMFile::obj, valuemaptraslator_cfi::outputCollection, scales_, l1t::L1GTScales::to_phi(), and l1t::L1GTScales::to_pT().

Referenced by produce().

229  {
230  std::unique_ptr<P2GTCandidateCollection> outputCollection = std::make_unique<P2GTCandidateCollection>();
231  const std::vector<l1t::EtSum> &collection = event.get(gttPromptHtSumToken_);
232  if (collection.size() > 0) {
233  const l1t::EtSum &obj = collection[0];
234  l1tmhtemu::EtMiss htMiss;
235  htMiss.Et = obj.p4().energy();
236  P2GTCandidate gtObj(0,
238  scales_.to_pT(htMiss.Et.V.to_int()), 0, scales_.to_phi(obj.hwPhi()), 0));
239 
240  gtObj.hwPT_ = htMiss.Et.V.to_int();
241  gtObj.hwPhi_ = obj.hwPhi();
242  gtObj.hwScalarSumPT_ = obj.hwPt();
243  gtObj.objectType_ = P2GTCandidate::GTTPromptHtSum;
244 
245  outputCollection->push_back(gtObj);
246  }
247 
248  event.put(std::move(outputCollection), "GTTPromptHtSum");
249  }
const L1GTScales scales_
Definition: L1GTProducer.cc:71
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
Definition: ParticleState.h:29
double to_phi(int value) const
Definition: L1GTScales.h:82
Optional< int > hwPT_
double to_pT(int value) const
Definition: L1GTScales.h:81
const edm::EDGetTokenT< std::vector< l1t::EtSum > > gttPromptHtSumToken_
Definition: L1GTProducer.cc:75
def move(src, dest)
Definition: eostools.py:511

◆ produceGTTPromptJets()

void l1t::L1GTProducer::produceGTTPromptJets ( edm::Event event) const
private

Definition at line 181 of file L1GTProducer.cc.

References universalConfigTemplate::collection, l1t::P2GTCandidate::GTTPromptJets, gttPromptJetToken_, l1t::P2GTCandidate::hwEta_, l1t::P2GTCandidate::hwNumber_of_tracks_, l1t::P2GTCandidate::hwPhi_, l1t::P2GTCandidate::hwPT_, l1t::P2GTCandidate::hwZ0_, mps_fire::i, eostools::move(), getGTfromDQMFile::obj, l1t::P2GTCandidate::objectType_, valuemaptraslator_cfi::outputCollection, scales_, l1t::L1GTScales::to_eta(), l1t::L1GTScales::to_phi(), l1t::L1GTScales::to_pT(), and l1t::L1GTScales::to_z0().

Referenced by produce().

181  {
182  std::unique_ptr<P2GTCandidateCollection> outputCollection = std::make_unique<P2GTCandidateCollection>();
184  for (std::size_t i = 0; i < collection.size() && i < 12; i++) {
185  const TkJetWord &obj = collection[i];
186  int hwZ0 = obj.z0Word().V.to_int() << 7;
187  P2GTCandidate gtObj(0,
189  scales_.to_eta(obj.glbEtaWord().V.to_int()),
190  scales_.to_phi(obj.glbPhiWord().V.to_int()),
191  0),
193  gtObj.hwPT_ = obj.ptWord().V.to_int();
194  gtObj.hwPhi_ = obj.glbPhiWord().V.to_int();
195  gtObj.hwEta_ = obj.glbEtaWord().V.to_int();
196  gtObj.hwZ0_ = hwZ0;
197  gtObj.hwNumber_of_tracks_ = obj.ntWord().V.to_int();
198  gtObj.objectType_ = P2GTCandidate::GTTPromptJets;
199 
200  outputCollection->push_back(gtObj);
201  }
202  event.put(std::move(outputCollection), "GTTPromptJets");
203  }
std::vector< l1t::TkJetWord > TkJetWordCollection
Definition: TkJetWord.h:191
const L1GTScales scales_
Definition: L1GTProducer.cc:71
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
Definition: ParticleState.h:29
const edm::EDGetTokenT< TkJetWordCollection > gttPromptJetToken_
Definition: L1GTProducer.cc:73
double to_phi(int value) const
Definition: L1GTScales.h:82
math::XYZPoint Point
point in the space
Definition: ParticleState.h:31
double to_z0(int value) const
Definition: L1GTScales.h:84
double to_eta(int value) const
Definition: L1GTScales.h:83
double to_pT(int value) const
Definition: L1GTScales.h:81
def move(src, dest)
Definition: eostools.py:511

Member Data Documentation

◆ cl2ElectronToken_

const edm::EDGetTokenT<TkElectronCollection> l1t::L1GTProducer::cl2ElectronToken_
private

Definition at line 87 of file L1GTProducer.cc.

Referenced by produceCL2Electrons().

◆ cl2EtSumToken_

const edm::EDGetTokenT<std::vector<l1t::EtSum> > l1t::L1GTProducer::cl2EtSumToken_
private

Definition at line 89 of file L1GTProducer.cc.

Referenced by produceCL2EtSum().

◆ cl2HtSumToken_

const edm::EDGetTokenT<std::vector<l1t::EtSum> > l1t::L1GTProducer::cl2HtSumToken_
private

Definition at line 90 of file L1GTProducer.cc.

Referenced by produceCl2HtSum().

◆ cl2JetSC4Token_

const edm::EDGetTokenT<PFJetCollection> l1t::L1GTProducer::cl2JetSC4Token_
private

Definition at line 84 of file L1GTProducer.cc.

Referenced by produceCL2JetsSC4().

◆ cl2JetSC8Token_

const edm::EDGetTokenT<PFJetCollection> l1t::L1GTProducer::cl2JetSC8Token_
private

Definition at line 85 of file L1GTProducer.cc.

Referenced by produceCL2JetsSC8().

◆ cl2PhotonToken_

const edm::EDGetTokenT<TkEmCollection> l1t::L1GTProducer::cl2PhotonToken_
private

Definition at line 86 of file L1GTProducer.cc.

Referenced by produceCL2Photons().

◆ cl2TauToken_

const edm::EDGetTokenT<PFTauCollection> l1t::L1GTProducer::cl2TauToken_
private

Definition at line 88 of file L1GTProducer.cc.

Referenced by produceCL2Taus().

◆ gmtSaDisplacedMuonToken_

const edm::EDGetTokenT<SAMuonCollection> l1t::L1GTProducer::gmtSaDisplacedMuonToken_
private

Definition at line 81 of file L1GTProducer.cc.

Referenced by produceGMTSaDisplacedMuons().

◆ gmtSaPromptMuonToken_

const edm::EDGetTokenT<SAMuonCollection> l1t::L1GTProducer::gmtSaPromptMuonToken_
private

Definition at line 80 of file L1GTProducer.cc.

Referenced by produceGMTSaPromptMuons().

◆ gmtTkMuonToken_

const edm::EDGetTokenT<TrackerMuonCollection> l1t::L1GTProducer::gmtTkMuonToken_
private

Definition at line 82 of file L1GTProducer.cc.

Referenced by produceGMTTkMuons().

◆ gttDisplacedHtSumToken_

const edm::EDGetTokenT<std::vector<l1t::EtSum> > l1t::L1GTProducer::gttDisplacedHtSumToken_
private

Definition at line 76 of file L1GTProducer.cc.

Referenced by produceGTTDisplacedHtSum().

◆ gttDisplacedJetToken_

const edm::EDGetTokenT<TkJetWordCollection> l1t::L1GTProducer::gttDisplacedJetToken_
private

Definition at line 74 of file L1GTProducer.cc.

Referenced by produceGTTDisplacedJets().

◆ gttEtSumToken_

const edm::EDGetTokenT<std::vector<l1t::EtSum> > l1t::L1GTProducer::gttEtSumToken_
private

Definition at line 77 of file L1GTProducer.cc.

Referenced by produceGTTEtSum().

◆ gttPrimaryVertexToken_

const edm::EDGetTokenT<VertexWordCollection> l1t::L1GTProducer::gttPrimaryVertexToken_
private

Definition at line 78 of file L1GTProducer.cc.

Referenced by produceGTTPrimaryVert().

◆ gttPromptHtSumToken_

const edm::EDGetTokenT<std::vector<l1t::EtSum> > l1t::L1GTProducer::gttPromptHtSumToken_
private

Definition at line 75 of file L1GTProducer.cc.

Referenced by produceGTTPromptHtSum().

◆ gttPromptJetToken_

const edm::EDGetTokenT<TkJetWordCollection> l1t::L1GTProducer::gttPromptJetToken_
private

Definition at line 73 of file L1GTProducer.cc.

Referenced by produceGTTPromptJets().

◆ scales_

const L1GTScales l1t::L1GTProducer::scales_
private