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 produceGTTDisplacedJets (edm::Event &event) const
 
void produceGTTPrimaryVert (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< TkJetWordCollectiongttDisplacedJetToken_
 
const edm::EDGetTokenT< VertexWordCollectiongttPrimaryVertexToken_
 
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 40 of file L1GTProducer.cc.

Constructor & Destructor Documentation

◆ L1GTProducer()

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

Definition at line 85 of file L1GTProducer.cc.

86  : scales_(config.getParameter<edm::ParameterSet>("scales")),
87  gttPromptJetToken_(consumes<TkJetWordCollection>(config.getParameter<edm::InputTag>("GTTPromptJets"))),
88  gttDisplacedJetToken_(consumes<TkJetWordCollection>(config.getParameter<edm::InputTag>("GTTDisplacedJets"))),
89  gttPrimaryVertexToken_(consumes<VertexWordCollection>(config.getParameter<edm::InputTag>("GTTPrimaryVert"))),
90  gmtSaPromptMuonToken_(consumes<SAMuonCollection>(config.getParameter<edm::InputTag>("GMTSaPromptMuons"))),
91  gmtSaDisplacedMuonToken_(consumes<SAMuonCollection>(config.getParameter<edm::InputTag>("GMTSaDisplacedMuons"))),
92  gmtTkMuonToken_(consumes<TrackerMuonCollection>(config.getParameter<edm::InputTag>("GMTTkMuons"))),
93  cl2JetSC4Token_(consumes<PFJetCollection>(config.getParameter<edm::InputTag>("CL2JetsSC4"))),
94  cl2JetSC8Token_(consumes<PFJetCollection>(config.getParameter<edm::InputTag>("CL2JetsSC8"))),
95  cl2PhotonToken_(consumes<TkEmCollection>(config.getParameter<edm::InputTag>("CL2Photons"))),
96  cl2ElectronToken_(consumes<TkElectronCollection>(config.getParameter<edm::InputTag>("CL2Electrons"))),
97  cl2TauToken_(consumes<PFTauCollection>(config.getParameter<edm::InputTag>("CL2Taus"))),
98  cl2EtSumToken_(consumes<std::vector<l1t::EtSum>>(config.getParameter<edm::InputTag>("CL2EtSum"))),
99  cl2HtSumToken_(consumes<std::vector<l1t::EtSum>>(config.getParameter<edm::InputTag>("CL2HtSum"))) {
100  produces<P2GTCandidateCollection>("GTTPromptJets");
101  produces<P2GTCandidateCollection>("GTTDisplacedJets");
102  produces<P2GTCandidateCollection>("GTTPrimaryVert");
103 
104  produces<P2GTCandidateCollection>("GMTSaPromptMuons");
105  produces<P2GTCandidateCollection>("GMTSaDisplacedMuons");
106  produces<P2GTCandidateCollection>("GMTTkMuons");
107 
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");
115  }
const edm::EDGetTokenT< VertexWordCollection > gttPrimaryVertexToken_
Definition: L1GTProducer.cc:70
const edm::EDGetTokenT< TkElectronCollection > cl2ElectronToken_
Definition: L1GTProducer.cc:79
const L1GTScales scales_
Definition: L1GTProducer.cc:66
const edm::EDGetTokenT< TkJetWordCollection > gttPromptJetToken_
Definition: L1GTProducer.cc:68
Definition: config.py:1
const edm::EDGetTokenT< std::vector< l1t::EtSum > > cl2HtSumToken_
Definition: L1GTProducer.cc:82
const edm::EDGetTokenT< PFTauCollection > cl2TauToken_
Definition: L1GTProducer.cc:80
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
const edm::EDGetTokenT< PFJetCollection > cl2JetSC4Token_
Definition: L1GTProducer.cc:76
const edm::EDGetTokenT< TrackerMuonCollection > gmtTkMuonToken_
Definition: L1GTProducer.cc:74
const edm::EDGetTokenT< std::vector< l1t::EtSum > > cl2EtSumToken_
Definition: L1GTProducer.cc:81
const edm::EDGetTokenT< SAMuonCollection > gmtSaDisplacedMuonToken_
Definition: L1GTProducer.cc:73
const edm::EDGetTokenT< SAMuonCollection > gmtSaPromptMuonToken_
Definition: L1GTProducer.cc:72
const edm::EDGetTokenT< PFJetCollection > cl2JetSC8Token_
Definition: L1GTProducer.cc:77
const edm::EDGetTokenT< TkEmCollection > cl2PhotonToken_
Definition: L1GTProducer.cc:78
const edm::EDGetTokenT< TkJetWordCollection > gttDisplacedJetToken_
Definition: L1GTProducer.cc:69

◆ ~L1GTProducer()

l1t::L1GTProducer::~L1GTProducer ( )
overridedefault

Member Function Documentation

◆ fillDescriptions()

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

Definition at line 117 of file L1GTProducer.cc.

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

117  {
119 
120  edm::ParameterSetDescription scalesDesc;
122  desc.add<edm::ParameterSetDescription>("scales", scalesDesc);
123 
124  desc.add<edm::InputTag>("GTTPromptJets");
125  desc.add<edm::InputTag>("GTTDisplacedJets");
126  desc.add<edm::InputTag>("GTTPrimaryVert");
127 
128  desc.add<edm::InputTag>("GMTSaPromptMuons");
129  desc.add<edm::InputTag>("GMTSaDisplacedMuons");
130  desc.add<edm::InputTag>("GMTTkMuons");
131 
132  desc.add<edm::InputTag>("CL2JetsSC4");
133  desc.add<edm::InputTag>("CL2JetsSC8");
134  desc.add<edm::InputTag>("CL2Photons");
135  desc.add<edm::InputTag>("CL2Electrons");
136  desc.add<edm::InputTag>("CL2Taus");
137  desc.add<edm::InputTag>("CL2EtSum");
138  desc.add<edm::InputTag>("CL2HtSum");
139 
140  description.addWithDefaultLabel(desc);
141  }
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 446 of file L1GTProducer.cc.

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

446  {
450 
454 
462  }
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 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 359 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_, 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().

359  {
360  std::unique_ptr<P2GTCandidateCollection> outputCollection = std::make_unique<P2GTCandidateCollection>();
362  for (size_t i = 0; i < collection.size() && i < 12; i++) {
363  l1gt::Electron gtElectron = collection[i].hwObj();
364  int hwZ0 = gtElectron.z0.V.to_int() << 7;
365  P2GTCandidate gtObj(scales_.to_chg(gtElectron.charge.V.to_int()),
367  scales_.to_eta(gtElectron.v3.eta.V.to_int()),
368  scales_.to_phi(gtElectron.v3.phi.V.to_int()),
369  0),
371  gtObj.hwPT_ = gtElectron.v3.pt.V.to_int();
372  gtObj.hwPhi_ = gtElectron.v3.phi.V.to_int();
373  gtObj.hwEta_ = gtElectron.v3.eta.V.to_int();
374  gtObj.hwZ0_ = hwZ0;
375  gtObj.hwIsolationPT_ = gtElectron.isolationPT.V.to_int();
376  gtObj.hwQualityFlags_ = gtElectron.qualityFlags.V.to_int();
377  gtObj.hwCharge_ = gtElectron.charge.V.to_int();
378  gtObj.objectType_ = P2GTCandidate::CL2Electrons;
379 
380  outputCollection->push_back(gtObj);
381  }
382  event.put(std::move(outputCollection), "CL2Electrons");
383  }
std::vector< TkElectron > TkElectronCollection
Definition: TkElectronFwd.h:16
const edm::EDGetTokenT< TkElectronCollection > cl2ElectronToken_
Definition: L1GTProducer.cc:79
const L1GTScales scales_
Definition: L1GTProducer.cc:66
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 410 of file L1GTProducer.cc.

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

Referenced by produce().

410  {
411  std::unique_ptr<P2GTCandidateCollection> outputCollection = std::make_unique<P2GTCandidateCollection>();
412  const std::vector<EtSum> &collection = event.get(cl2EtSumToken_);
413  const EtSum &met = collection[0];
414 
415  l1gt::Sum sum{true /* valid */, met.pt(), met.phi() / l1gt::Scales::ETAPHI_LSB, 0 /* scalar sum */};
416 
417  P2GTCandidate gtObj(0,
419  scales_.to_pT(sum.vector_pt.V.to_int()), 0, scales_.to_phi(sum.vector_phi.V.to_int()), 0));
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();
423  gtObj.objectType_ = P2GTCandidate::CL2EtSum;
424 
425  outputCollection->push_back(gtObj);
426  event.put(std::move(outputCollection), "CL2EtSum");
427  }
const L1GTScales scales_
Definition: L1GTProducer.cc:66
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:81
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 429 of file L1GTProducer.cc.

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

Referenced by produce().

429  {
430  std::unique_ptr<P2GTCandidateCollection> outputCollection = std::make_unique<P2GTCandidateCollection>();
431  const std::vector<EtSum> &collection = event.get(cl2HtSumToken_);
432  const EtSum &ht = collection[0];
433  const EtSum &mht = collection[1];
434 
435  P2GTCandidate gtObj(
437  gtObj.hwPT_ = mht.hwPt();
438  gtObj.hwPhi_ = mht.hwPhi();
439  gtObj.hwScalarSumPT_ = ht.hwPt();
440  gtObj.objectType_ = P2GTCandidate::CL2HtSum;
441 
442  outputCollection->push_back(gtObj);
443  event.put(std::move(outputCollection), "CL2HtSum");
444  }
const L1GTScales scales_
Definition: L1GTProducer.cc:66
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:82
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 291 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_, scales_, l1t::L1GTScales::to_eta(), l1t::L1GTScales::to_phi(), l1t::L1GTScales::to_pT(), l1t::L1GTScales::to_z0(), and l1gt::Jet::unpack().

Referenced by produce().

291  {
292  std::unique_ptr<P2GTCandidateCollection> outputCollection = std::make_unique<P2GTCandidateCollection>();
293  const PFJetCollection &collection = event.get(cl2JetSC4Token_);
294  for (size_t i = 0; i < collection.size() && i < 12; i++) {
295  l1gt::Jet gtJet = l1gt::Jet::unpack(collection[i].getHWJetGT());
296  int hwZ0 = gtJet.z0.V.to_int() << 7;
297  P2GTCandidate gtObj(0,
299  scales_.to_eta(gtJet.v3.eta.V.to_int()),
300  scales_.to_phi(gtJet.v3.phi.V.to_int()),
301  0),
303  gtObj.hwPT_ = gtJet.v3.pt.V.to_int();
304  gtObj.hwPhi_ = gtJet.v3.phi.V.to_int();
305  gtObj.hwEta_ = gtJet.v3.eta.V.to_int();
306  gtObj.hwZ0_ = hwZ0;
307  gtObj.objectType_ = P2GTCandidate::CL2JetsSC4;
308 
309  outputCollection->push_back(gtObj);
310  }
311  event.put(std::move(outputCollection), "CL2JetsSC4");
312  }
const L1GTScales scales_
Definition: L1GTProducer.cc:66
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:76
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 314 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_, scales_, l1t::L1GTScales::to_eta(), l1t::L1GTScales::to_phi(), l1t::L1GTScales::to_pT(), l1t::L1GTScales::to_z0(), and l1gt::Jet::unpack().

Referenced by produce().

314  {
315  std::unique_ptr<P2GTCandidateCollection> outputCollection = std::make_unique<P2GTCandidateCollection>();
316  const PFJetCollection &collection = event.get(cl2JetSC8Token_);
317  for (size_t i = 0; i < collection.size() && i < 12; i++) {
318  l1gt::Jet gtJet = l1gt::Jet::unpack(collection[i].getHWJetGT());
319  int hwZ0 = gtJet.z0.V.to_int() << 7;
320  P2GTCandidate gtObj(0,
322  scales_.to_eta(gtJet.v3.eta.V.to_int()),
323  scales_.to_phi(gtJet.v3.phi.V.to_int()),
324  0),
326  gtObj.hwPT_ = gtJet.v3.pt.V.to_int();
327  gtObj.hwPhi_ = gtJet.v3.phi.V.to_int();
328  gtObj.hwEta_ = gtJet.v3.eta.V.to_int();
329  gtObj.hwZ0_ = hwZ0;
330  gtObj.objectType_ = P2GTCandidate::CL2JetsSC8;
331 
332  outputCollection->push_back(gtObj);
333  }
334  event.put(std::move(outputCollection), "CL2JetsSC8");
335  }
const L1GTScales scales_
Definition: L1GTProducer.cc:66
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:77
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 337 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(), 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().

337  {
338  std::unique_ptr<P2GTCandidateCollection> outputCollection = std::make_unique<P2GTCandidateCollection>();
339  const TkEmCollection &collection = event.get(cl2PhotonToken_);
340  for (size_t i = 0; i < collection.size() && i < 12; i++) {
341  l1gt::Photon gtPhoton = collection[i].hwObj();
342  P2GTCandidate gtObj(0,
344  scales_.to_eta(gtPhoton.v3.eta.V.to_int()),
345  scales_.to_phi(gtPhoton.v3.phi.V.to_int()),
346  0));
347  gtObj.hwPT_ = gtPhoton.v3.pt.V.to_int();
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();
352  gtObj.objectType_ = P2GTCandidate::CL2Photons;
353 
354  outputCollection->push_back(gtObj);
355  }
356  event.put(std::move(outputCollection), "CL2Photons");
357  }
egquality_t qualityFlags
Definition: gt_datatypes.h:316
const L1GTScales scales_
Definition: L1GTProducer.cc:66
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:78
def move(src, dest)
Definition: eostools.py:511

◆ produceCL2Taus()

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

Definition at line 385 of file L1GTProducer.cc.

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

Referenced by produce().

385  {
386  std::unique_ptr<P2GTCandidateCollection> outputCollection = std::make_unique<P2GTCandidateCollection>();
387  const PFTauCollection &collection = event.get(cl2TauToken_);
388  for (size_t i = 0; i < collection.size() && i < 12; i++) {
389  l1gt::Tau gtTau = collection[i].getHWTauGT();
390  P2GTCandidate gtObj(scales_.to_chg(gtTau.charge.V.to_int()),
392  scales_.to_eta(gtTau.v3.eta.V.to_int()),
393  scales_.to_phi(gtTau.v3.phi.V.to_int()),
394  0));
395  gtObj.hwPT_ = gtTau.v3.pt.V.to_int();
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();
403  gtObj.objectType_ = P2GTCandidate::CL2Taus;
404 
405  outputCollection->push_back(gtObj);
406  }
407  event.put(std::move(outputCollection), "CL2Taus");
408  }
std::vector< l1t::PFTau > PFTauCollection
Definition: PFTau.h:90
const L1GTScales scales_
Definition: L1GTProducer.cc:66
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:80
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 237 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::hwQualityScore_, l1t::P2GTCandidate::hwZ0_, mps_fire::i, eostools::move(), getGTfromDQMFile::obj, l1t::P2GTCandidate::objectType_, 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().

237  {
238  std::unique_ptr<P2GTCandidateCollection> outputCollection = std::make_unique<P2GTCandidateCollection>();
240  for (size_t i = 0; i < collection.size() && i < 12; i++) {
241  const SAMuon &obj = collection[i];
242  int hwZ0 = obj.apZ0().to_int() << 12;
243  P2GTCandidate gtObj(scales_.to_chg(obj.apCharge().to_int()),
245  scales_.to_eta(obj.apEta().to_int()),
246  scales_.to_phi(obj.apPhi().to_int()),
247  0),
249  gtObj.hwPT_ = obj.apPt().to_int();
250  gtObj.hwPhi_ = obj.apPhi().to_int();
251  gtObj.hwEta_ = obj.apEta().to_int();
252  gtObj.hwZ0_ = hwZ0;
253  gtObj.hwQualityScore_ = obj.apQualFlags().to_int();
254  gtObj.hwCharge_ = obj.apCharge().to_int();
255  gtObj.hwD0_ = obj.apD0().to_int();
256  gtObj.objectType_ = P2GTCandidate::GMTSaDisplacedMuons;
257 
258  outputCollection->push_back(gtObj);
259  }
260  event.put(std::move(outputCollection), "GMTSaDisplacedMuons");
261  }
const L1GTScales scales_
Definition: L1GTProducer.cc:66
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:73
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 211 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::hwQualityScore_, l1t::P2GTCandidate::hwZ0_, mps_fire::i, eostools::move(), getGTfromDQMFile::obj, l1t::P2GTCandidate::objectType_, 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().

211  {
212  std::unique_ptr<P2GTCandidateCollection> outputCollection = std::make_unique<P2GTCandidateCollection>();
214  for (size_t i = 0; i < collection.size() && i < 12; i++) {
215  const SAMuon &obj = collection[i];
216  int hwZ0 = obj.apZ0().to_int() << 12;
217  P2GTCandidate gtObj(scales_.to_chg(obj.apCharge().to_int()),
219  scales_.to_eta(obj.apEta().to_int()),
220  scales_.to_phi(obj.apPhi().to_int()),
221  0),
223  gtObj.hwPT_ = obj.apPt().to_int();
224  gtObj.hwPhi_ = obj.apPhi().to_int();
225  gtObj.hwEta_ = obj.apEta().to_int();
226  gtObj.hwZ0_ = hwZ0;
227  gtObj.hwQualityScore_ = obj.apQualFlags().to_int();
228  gtObj.hwCharge_ = obj.apCharge().to_int();
229  gtObj.hwD0_ = obj.apD0().to_int();
230  gtObj.objectType_ = P2GTCandidate::GMTSaPromptMuons;
231 
232  outputCollection->push_back(gtObj);
233  }
234  event.put(std::move(outputCollection), "GMTSaPromptMuons");
235  }
const L1GTScales scales_
Definition: L1GTProducer.cc:66
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:72
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 263 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::hwQualityScore_, l1t::P2GTCandidate::hwZ0_, mps_fire::i, eostools::move(), getGTfromDQMFile::obj, l1t::P2GTCandidate::objectType_, 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().

263  {
264  std::unique_ptr<P2GTCandidateCollection> outputCollection = std::make_unique<P2GTCandidateCollection>();
266  for (size_t i = 0; i < collection.size() && i < 12; i++) {
267  const TrackerMuon &obj = collection[i];
268  int hwZ0 = obj.apZ0().to_int() << 7;
269  P2GTCandidate gtObj(scales_.to_chg(obj.apCharge().to_int()),
271  scales_.to_eta(obj.apEta().to_int()),
272  scales_.to_phi(obj.apPhi().to_int()),
273  0),
275  gtObj.hwPT_ = obj.apPt().to_int();
276  gtObj.hwPhi_ = obj.apPhi().to_int();
277  gtObj.hwEta_ = obj.apEta().to_int();
278  gtObj.hwZ0_ = hwZ0;
279  gtObj.hwQualityScore_ = obj.apQualFlags().to_int();
280  gtObj.hwIsolationPT_ = obj.apIso().to_int();
281  gtObj.hwCharge_ = obj.apCharge().to_int();
282  gtObj.hwD0_ = obj.apD0().to_int();
283  gtObj.hwBeta_ = obj.apBeta().to_int();
284  gtObj.objectType_ = P2GTCandidate::GMTTkMuons;
285 
286  outputCollection->push_back(gtObj);
287  }
288  event.put(std::move(outputCollection), "GMTTkMuons");
289  }
const L1GTScales scales_
Definition: L1GTProducer.cc:66
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:74
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

◆ produceGTTDisplacedJets()

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

Definition at line 187 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_, scales_, l1t::L1GTScales::to_eta(), l1t::L1GTScales::to_phi(), l1t::L1GTScales::to_pT(), and l1t::L1GTScales::to_z0().

Referenced by produce().

187  {
188  std::unique_ptr<P2GTCandidateCollection> outputCollection = std::make_unique<P2GTCandidateCollection>();
190  for (std::size_t i = 0; i < collection.size() && i < 12; i++) {
191  const TkJetWord &obj = collection[i];
192  int hwZ0 = obj.z0Word().V.to_int() << 7;
193  P2GTCandidate gtObj(0,
195  scales_.to_eta(obj.glbEtaWord().V.to_int()),
196  scales_.to_phi(obj.glbPhiWord().V.to_int()),
197  0),
199  gtObj.hwPT_ = obj.ptWord().V.to_int();
200  gtObj.hwPhi_ = obj.glbPhiWord().V.to_int();
201  gtObj.hwEta_ = obj.glbEtaWord().V.to_int();
202  gtObj.hwZ0_ = hwZ0;
203  gtObj.hwNumber_of_tracks_ = obj.ntWord().V.to_int();
204  gtObj.objectType_ = P2GTCandidate::GTTDisplacedJets;
205 
206  outputCollection->push_back(gtObj);
207  }
208  event.put(std::move(outputCollection), "GTTDisplacedJets");
209  }
std::vector< l1t::TkJetWord > TkJetWordCollection
Definition: TkJetWord.h:191
const L1GTScales scales_
Definition: L1GTProducer.cc:66
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:69

◆ produceGTTPrimaryVert()

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

Definition at line 143 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_, scales_, and l1t::L1GTScales::to_z0().

Referenced by produce().

143  {
144  std::unique_ptr<P2GTCandidateCollection> outputCollection = std::make_unique<P2GTCandidateCollection>();
146  for (std::size_t i = 0; i < collection.size() && i < 10; i++) {
147  const VertexWord &obj = collection[i];
148  int hwZ0 = obj.z0Word().V.to_int() * 5;
149  P2GTCandidate gtObj(
151  gtObj.hwZ0_ = hwZ0;
152  gtObj.hwQualityScore_ = obj.qualityWord().V.to_int();
153  gtObj.hwSum_pT_pv_ = obj.multiplicityWord().V.to_int();
154  gtObj.hwNumber_of_tracks_in_pv_ = obj.multiplicityWord().V.to_int();
155  gtObj.hwNumber_of_tracks_not_in_pv_ = obj.inverseMultiplicityWord().V.to_int();
156  gtObj.objectType_ = P2GTCandidate::GTTPrimaryVert;
157 
158  outputCollection->push_back(gtObj);
159  }
160  event.put(std::move(outputCollection), "GTTPrimaryVert");
161  }
const edm::EDGetTokenT< VertexWordCollection > gttPrimaryVertexToken_
Definition: L1GTProducer.cc:70
const L1GTScales scales_
Definition: L1GTProducer.cc:66
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

◆ produceGTTPromptJets()

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

Definition at line 163 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_, scales_, l1t::L1GTScales::to_eta(), l1t::L1GTScales::to_phi(), l1t::L1GTScales::to_pT(), and l1t::L1GTScales::to_z0().

Referenced by produce().

163  {
164  std::unique_ptr<P2GTCandidateCollection> outputCollection = std::make_unique<P2GTCandidateCollection>();
166  for (std::size_t i = 0; i < collection.size() && i < 12; i++) {
167  const TkJetWord &obj = collection[i];
168  int hwZ0 = obj.z0Word().V.to_int() << 7;
169  P2GTCandidate gtObj(0,
171  scales_.to_eta(obj.glbEtaWord().V.to_int()),
172  scales_.to_phi(obj.glbPhiWord().V.to_int()),
173  0),
175  gtObj.hwPT_ = obj.ptWord().V.to_int();
176  gtObj.hwPhi_ = obj.glbPhiWord().V.to_int();
177  gtObj.hwEta_ = obj.glbEtaWord().V.to_int();
178  gtObj.hwZ0_ = hwZ0;
179  gtObj.hwNumber_of_tracks_ = obj.ntWord().V.to_int();
180  gtObj.objectType_ = P2GTCandidate::GTTPromptJets;
181 
182  outputCollection->push_back(gtObj);
183  }
184  event.put(std::move(outputCollection), "GTTPromptJets");
185  }
std::vector< l1t::TkJetWord > TkJetWordCollection
Definition: TkJetWord.h:191
const L1GTScales scales_
Definition: L1GTProducer.cc:66
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
Definition: ParticleState.h:29
const edm::EDGetTokenT< TkJetWordCollection > gttPromptJetToken_
Definition: L1GTProducer.cc:68
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 79 of file L1GTProducer.cc.

Referenced by produceCL2Electrons().

◆ cl2EtSumToken_

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

Definition at line 81 of file L1GTProducer.cc.

Referenced by produceCL2EtSum().

◆ cl2HtSumToken_

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

Definition at line 82 of file L1GTProducer.cc.

Referenced by produceCl2HtSum().

◆ cl2JetSC4Token_

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

Definition at line 76 of file L1GTProducer.cc.

Referenced by produceCL2JetsSC4().

◆ cl2JetSC8Token_

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

Definition at line 77 of file L1GTProducer.cc.

Referenced by produceCL2JetsSC8().

◆ cl2PhotonToken_

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

Definition at line 78 of file L1GTProducer.cc.

Referenced by produceCL2Photons().

◆ cl2TauToken_

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

Definition at line 80 of file L1GTProducer.cc.

Referenced by produceCL2Taus().

◆ gmtSaDisplacedMuonToken_

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

Definition at line 73 of file L1GTProducer.cc.

Referenced by produceGMTSaDisplacedMuons().

◆ gmtSaPromptMuonToken_

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

Definition at line 72 of file L1GTProducer.cc.

Referenced by produceGMTSaPromptMuons().

◆ gmtTkMuonToken_

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

Definition at line 74 of file L1GTProducer.cc.

Referenced by produceGMTTkMuons().

◆ gttDisplacedJetToken_

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

Definition at line 69 of file L1GTProducer.cc.

Referenced by produceGTTDisplacedJets().

◆ gttPrimaryVertexToken_

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

Definition at line 70 of file L1GTProducer.cc.

Referenced by produceGTTPrimaryVert().

◆ gttPromptJetToken_

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

Definition at line 68 of file L1GTProducer.cc.

Referenced by produceGTTPromptJets().

◆ scales_

const L1GTScales l1t::L1GTProducer::scales_
private