CMS 3D CMS Logo

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

Public Member Functions

 FakeInputProducer (const ParameterSet &)
 
 ~FakeInputProducer () override
 
- 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 final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
bool wantsStreamLuminosityBlocks () const final
 
bool wantsStreamRuns () const 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
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > 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
 
bool registeredToConsumeMany (TypeID const &, 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::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Public Member Functions

static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
- 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 (StreamID, Event &, EventSetup const &) const override
 

Private Attributes

std::vector< int > fEgBx
 
std::vector< int > fEgHwEta
 
std::vector< int > fEgHwPhi
 
std::vector< int > fEgHwPt
 
std::vector< int > fEgIso
 
std::vector< int > fEtSumBx
 
std::vector< int > fEtSumHwPhi
 
std::vector< int > fEtSumHwPt
 
std::vector< int > fJetBx
 
std::vector< int > fJetHwEta
 
std::vector< int > fJetHwPhi
 
std::vector< int > fJetHwPt
 
std::vector< int > fMuBx
 
std::vector< int > fMuHwEta
 
std::vector< int > fMuHwPhi
 
std::vector< int > fMuHwPt
 
std::vector< int > fMuIso
 
std::vector< int > fTauBx
 
std::vector< int > fTauHwEta
 
std::vector< int > fTauHwPhi
 
std::vector< int > fTauHwPt
 
std::vector< int > fTauIso
 

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 ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
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

Description: Create Fake Input Collections for the GT. Allows testing of emulation

Author
: B. Winer OSU

Modeled after FakeInputProducer

Definition at line 44 of file FakeInputProducer.cc.

Constructor & Destructor Documentation

◆ FakeInputProducer()

l1t::FakeInputProducer::FakeInputProducer ( const ParameterSet iConfig)
explicit

Definition at line 95 of file FakeInputProducer.cc.

References edm::ParameterSet::getUntrackedParameter().

95  {
96  // register what you produce
97  produces<BXVector<l1t::EGamma>>();
98  produces<BXVector<l1t::Muon>>();
99  produces<BXVector<l1t::Tau>>();
100  produces<BXVector<l1t::Jet>>();
101  produces<BXVector<l1t::EtSum>>();
102 
103  // Setup Parameter Set for EG
104  ParameterSet eg_params = iConfig.getUntrackedParameter<ParameterSet>("egParams");
105 
106  fEgBx = eg_params.getUntrackedParameter<vector<int>>("egBx");
107  fEgHwPt = eg_params.getUntrackedParameter<vector<int>>("egHwPt");
108  fEgHwPhi = eg_params.getUntrackedParameter<vector<int>>("egHwPhi");
109  fEgHwEta = eg_params.getUntrackedParameter<vector<int>>("egHwEta");
110  fEgIso = eg_params.getUntrackedParameter<vector<int>>("egIso");
111 
112  // Setup Parameter Set for Muon
113  ParameterSet mu_params = iConfig.getUntrackedParameter<ParameterSet>("muParams");
114 
115  fMuBx = mu_params.getUntrackedParameter<vector<int>>("muBx");
116  fMuHwPt = mu_params.getUntrackedParameter<vector<int>>("muHwPt");
117  fMuHwPhi = mu_params.getUntrackedParameter<vector<int>>("muHwPhi");
118  fMuHwEta = mu_params.getUntrackedParameter<vector<int>>("muHwEta");
119  fMuIso = mu_params.getUntrackedParameter<vector<int>>("muIso");
120 
121  // Setup Parameter Set for taus
122  ParameterSet tau_params = iConfig.getUntrackedParameter<ParameterSet>("tauParams");
123 
124  fTauBx = tau_params.getUntrackedParameter<vector<int>>("tauBx");
125  fTauHwPt = tau_params.getUntrackedParameter<vector<int>>("tauHwPt");
126  fTauHwPhi = tau_params.getUntrackedParameter<vector<int>>("tauHwPhi");
127  fTauHwEta = tau_params.getUntrackedParameter<vector<int>>("tauHwEta");
128  fTauIso = tau_params.getUntrackedParameter<vector<int>>("tauIso");
129 
130  // Setup Parameter Set for jet
131  ParameterSet jet_params = iConfig.getUntrackedParameter<ParameterSet>("jetParams");
132 
133  fJetBx = jet_params.getUntrackedParameter<vector<int>>("jetBx");
134  fJetHwPt = jet_params.getUntrackedParameter<vector<int>>("jetHwPt");
135  fJetHwPhi = jet_params.getUntrackedParameter<vector<int>>("jetHwPhi");
136  fJetHwEta = jet_params.getUntrackedParameter<vector<int>>("jetHwEta");
137 
138  // Setup Parameter Set for EtSums
139  ParameterSet etsum_params = iConfig.getUntrackedParameter<ParameterSet>("etsumParams");
140 
141  fEtSumBx = etsum_params.getUntrackedParameter<vector<int>>("etsumBx");
142  fEtSumHwPt = etsum_params.getUntrackedParameter<vector<int>>("etsumHwPt");
143  fEtSumHwPhi = etsum_params.getUntrackedParameter<vector<int>>("etsumHwPhi");
144  }
std::vector< int > fJetHwPt
std::vector< int > fJetHwPhi
std::vector< int > fMuHwPt
std::vector< int > fMuBx
std::vector< int > fTauHwPt
std::vector< int > fJetBx
T getUntrackedParameter(std::string const &, T const &) const
std::vector< int > fTauHwEta
std::vector< int > fTauBx
std::vector< int > fEgHwEta
std::vector< int > fMuHwPhi
std::vector< int > fEgBx
std::vector< int > fEtSumHwPhi
std::vector< int > fEgHwPt
std::vector< int > fEgHwPhi
std::vector< int > fTauIso
std::vector< int > fJetHwEta
std::vector< int > fEgIso
std::vector< int > fTauHwPhi
std::vector< int > fMuIso
std::vector< int > fEtSumBx
std::vector< int > fEtSumHwPt
std::vector< int > fMuHwEta

◆ ~FakeInputProducer()

l1t::FakeInputProducer::~FakeInputProducer ( )
override

Definition at line 146 of file FakeInputProducer.cc.

146 {}

Member Function Documentation

◆ fillDescriptions()

void l1t::FakeInputProducer::fillDescriptions ( ConfigurationDescriptions descriptions)
static

Definition at line 216 of file FakeInputProducer.cc.

References edm::ConfigurationDescriptions::addDefault(), and submitPVResolutionJobs::desc.

216  {
217  //The following says we do not know what parameters are allowed so do no validation
218  // Please change this to state exactly what you do use, even if it is no parameters
220  desc.setUnknown();
221  descriptions.addDefault(desc);
222  }
void addDefault(ParameterSetDescription const &psetDescription)

◆ produce()

void l1t::FakeInputProducer::produce ( StreamID  ,
Event iEvent,
EventSetup const &  iSetup 
) const
overrideprivatevirtual

Implements edm::global::EDProducerBase.

Definition at line 153 of file FakeInputProducer.cc.

References simCaloStage2Layer1Digis_cfi::bxFirst, simCaloStage2Layer1Digis_cfi::bxLast, iEvent, PDWG_EXODelayedJetMET_cff::jets, L1Analysis::kMissingEt, LogDebug, eostools::move(), PDWG_BPHSkim_cff::muons, and Tau3MuMonitor_cff::taus.

153  {
154  LogDebug("l1t|Global") << "FakeInputProducer::produce function called...\n";
155 
156  // Set the range of BX....TO DO...move to Params or determine from param set.
157  int bxFirst = -2;
158  int bxLast = 2;
159 
160  //outputs
161  std::unique_ptr<l1t::EGammaBxCollection> egammas(new l1t::EGammaBxCollection(0, bxFirst, bxLast));
162  std::unique_ptr<l1t::MuonBxCollection> muons(new l1t::MuonBxCollection(0, bxFirst, bxLast));
163  std::unique_ptr<l1t::TauBxCollection> taus(new l1t::TauBxCollection(0, bxFirst, bxLast));
164  std::unique_ptr<l1t::JetBxCollection> jets(new l1t::JetBxCollection(0, bxFirst, bxLast));
165  std::unique_ptr<l1t::EtSumBxCollection> etsums(new l1t::EtSumBxCollection(0, bxFirst, bxLast));
166 
167  // Put EG into Collections
168  for (unsigned int it = 0; it < fEgBx.size(); it++) {
169  ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double>>* egLorentz =
170  new ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double>>();
171  l1t::EGamma fakeEG(*egLorentz, fEgHwPt.at(it), fEgHwEta.at(it), fEgHwPhi.at(it), 0, fEgIso.at(it));
172  egammas->push_back(fEgBx.at(it), fakeEG);
173  }
174 
175  // Put Muons into Collections
176  for (unsigned int it = 0; it < fMuBx.size(); it++) {
177  ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double>>* muLorentz =
178  new ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double>>();
179  l1t::Muon fakeMU(*muLorentz, fMuHwPt.at(it), fMuHwEta.at(it), fMuHwPhi.at(it), 4, 0, 0, fMuIso.at(it));
180  muons->push_back(fMuBx.at(it), fakeMU);
181  }
182 
183  // Put Taus into Collections
184  for (unsigned int it = 0; it < fTauBx.size(); it++) {
185  ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double>>* tauLorentz =
186  new ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double>>();
187  l1t::Tau fakeTAU(*tauLorentz, fTauHwPt.at(it), fTauHwEta.at(it), fTauHwPhi.at(it), 0, fTauIso.at(it));
188  taus->push_back(fTauBx.at(it), fakeTAU);
189  }
190 
191  // Put Jets into Collections
192  for (unsigned int it = 0; it < fJetBx.size(); it++) {
193  ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double>>* jetLorentz =
194  new ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double>>();
195  l1t::Jet fakeJET(*jetLorentz, fJetHwPt.at(it), fJetHwEta.at(it), fJetHwPhi.at(it), 0);
196  jets->push_back(fJetBx.at(it), fakeJET);
197  }
198 
199  // Put EtSums into Collections
200  for (unsigned int it = 0; it < fEtSumBx.size(); it++) {
201  ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double>>* etsumLorentz =
202  new ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double>>();
203  l1t::EtSum fakeETSUM(
204  *etsumLorentz, l1t::EtSum::EtSumType::kMissingEt, fEtSumHwPt.at(it), 0, fEtSumHwPhi.at(it), 0);
205  etsums->push_back(fEtSumBx.at(it), fakeETSUM);
206  }
207 
208  iEvent.put(std::move(egammas));
209  iEvent.put(std::move(muons));
210  iEvent.put(std::move(taus));
211  iEvent.put(std::move(jets));
212  iEvent.put(std::move(etsums));
213  }
std::vector< int > fJetHwPt
std::vector< int > fJetHwPhi
std::vector< int > fMuHwPt
std::vector< int > fMuBx
Definition: Tau.h:20
std::vector< int > fTauHwPt
std::vector< int > fJetBx
Definition: Jet.h:20
int iEvent
Definition: GenABIO.cc:224
std::vector< int > fTauHwEta
std::vector< int > fTauBx
std::vector< int > fEgHwEta
Definition: Muon.h:21
std::vector< int > fMuHwPhi
std::vector< int > fEgBx
std::vector< int > fEtSumHwPhi
std::vector< int > fEgHwPt
std::vector< int > fEgHwPhi
std::vector< int > fTauIso
std::vector< int > fJetHwEta
std::vector< int > fEgIso
std::vector< int > fTauHwPhi
std::vector< int > fMuIso
std::vector< int > fEtSumBx
def move(src, dest)
Definition: eostools.py:511
std::vector< int > fEtSumHwPt
#define LogDebug(id)
std::vector< int > fMuHwEta

Member Data Documentation

◆ fEgBx

std::vector<int> l1t::FakeInputProducer::fEgBx
private

Definition at line 60 of file FakeInputProducer.cc.

◆ fEgHwEta

std::vector<int> l1t::FakeInputProducer::fEgHwEta
private

Definition at line 63 of file FakeInputProducer.cc.

◆ fEgHwPhi

std::vector<int> l1t::FakeInputProducer::fEgHwPhi
private

Definition at line 62 of file FakeInputProducer.cc.

◆ fEgHwPt

std::vector<int> l1t::FakeInputProducer::fEgHwPt
private

Definition at line 61 of file FakeInputProducer.cc.

◆ fEgIso

std::vector<int> l1t::FakeInputProducer::fEgIso
private

Definition at line 64 of file FakeInputProducer.cc.

◆ fEtSumBx

std::vector<int> l1t::FakeInputProducer::fEtSumBx
private

Definition at line 87 of file FakeInputProducer.cc.

◆ fEtSumHwPhi

std::vector<int> l1t::FakeInputProducer::fEtSumHwPhi
private

Definition at line 89 of file FakeInputProducer.cc.

◆ fEtSumHwPt

std::vector<int> l1t::FakeInputProducer::fEtSumHwPt
private

Definition at line 88 of file FakeInputProducer.cc.

◆ fJetBx

std::vector<int> l1t::FakeInputProducer::fJetBx
private

Definition at line 81 of file FakeInputProducer.cc.

◆ fJetHwEta

std::vector<int> l1t::FakeInputProducer::fJetHwEta
private

Definition at line 84 of file FakeInputProducer.cc.

◆ fJetHwPhi

std::vector<int> l1t::FakeInputProducer::fJetHwPhi
private

Definition at line 83 of file FakeInputProducer.cc.

◆ fJetHwPt

std::vector<int> l1t::FakeInputProducer::fJetHwPt
private

Definition at line 82 of file FakeInputProducer.cc.

◆ fMuBx

std::vector<int> l1t::FakeInputProducer::fMuBx
private

Definition at line 67 of file FakeInputProducer.cc.

◆ fMuHwEta

std::vector<int> l1t::FakeInputProducer::fMuHwEta
private

Definition at line 70 of file FakeInputProducer.cc.

◆ fMuHwPhi

std::vector<int> l1t::FakeInputProducer::fMuHwPhi
private

Definition at line 69 of file FakeInputProducer.cc.

◆ fMuHwPt

std::vector<int> l1t::FakeInputProducer::fMuHwPt
private

Definition at line 68 of file FakeInputProducer.cc.

◆ fMuIso

std::vector<int> l1t::FakeInputProducer::fMuIso
private

Definition at line 71 of file FakeInputProducer.cc.

◆ fTauBx

std::vector<int> l1t::FakeInputProducer::fTauBx
private

Definition at line 74 of file FakeInputProducer.cc.

◆ fTauHwEta

std::vector<int> l1t::FakeInputProducer::fTauHwEta
private

Definition at line 77 of file FakeInputProducer.cc.

◆ fTauHwPhi

std::vector<int> l1t::FakeInputProducer::fTauHwPhi
private

Definition at line 76 of file FakeInputProducer.cc.

◆ fTauHwPt

std::vector<int> l1t::FakeInputProducer::fTauHwPt
private

Definition at line 75 of file FakeInputProducer.cc.

◆ fTauIso

std::vector<int> l1t::FakeInputProducer::fTauIso
private

Definition at line 78 of file FakeInputProducer.cc.