CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
L1DummyProducer Class Reference

#include <L1DummyProducer.h>

Inheritance diagram for L1DummyProducer:
edm::EDProducer edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 L1DummyProducer (const edm::ParameterSet &)
 
template<>
void SimpleDigi (CLHEP::HepRandomEngine *, std::unique_ptr< LTCDigiCollection > &data, int type)
 
template<class T >
void SimpleDigi (CLHEP::HepRandomEngine *, std::unique_ptr< T > &data, int type=0)
 
template<>
void SimpleDigi (CLHEP::HepRandomEngine *engine, std::unique_ptr< CSCCorrelatedLCTDigiCollection > &data, int type)
 
template<>
void SimpleDigi (CLHEP::HepRandomEngine *engine, std::unique_ptr< EcalTrigPrimDigiCollection > &data, int type)
 
template<>
void SimpleDigi (CLHEP::HepRandomEngine *engine, std::unique_ptr< HcalTrigPrimDigiCollection > &data, int type)
 
template<>
void SimpleDigi (CLHEP::HepRandomEngine *engine, std::unique_ptr< L1CaloEmCollection > &data, int type)
 
template<>
void SimpleDigi (CLHEP::HepRandomEngine *engine, std::unique_ptr< L1CaloRegionCollection > &data, int type)
 
template<>
void SimpleDigi (CLHEP::HepRandomEngine *engine, std::unique_ptr< L1CSCTrackCollection > &data, int type)
 
template<>
void SimpleDigi (CLHEP::HepRandomEngine *engine, std::unique_ptr< L1GctEmCandCollection > &data, int type)
 
template<>
void SimpleDigi (CLHEP::HepRandomEngine *engine, std::unique_ptr< L1GctJetCandCollection > &data, int type)
 
template<>
void SimpleDigi (CLHEP::HepRandomEngine *engine, std::unique_ptr< L1MuDTChambPhContainer > &data, int type)
 
template<>
void SimpleDigi (CLHEP::HepRandomEngine *engine, std::unique_ptr< L1MuDTChambThContainer > &data, int type)
 
template<>
void SimpleDigi (CLHEP::HepRandomEngine *engine, std::unique_ptr< L1MuDTTrackContainer > &data, int type)
 
template<>
void SimpleDigi (CLHEP::HepRandomEngine *engine, std::unique_ptr< L1MuGMTCandCollection > &data, int type)
 
template<>
void SimpleDigi (CLHEP::HepRandomEngine *engine, std::unique_ptr< L1MuGMTReadoutCollection > &data, int type)
 
template<>
void SimpleDigi (CLHEP::HepRandomEngine *engine, std::unique_ptr< L1MuRegionalCandCollection > &data, int type)
 
 ~L1DummyProducer () override
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
SerialTaskQueueglobalLuminosityBlocksQueue ()
 
SerialTaskQueueglobalRunsQueue ()
 
ModuleDescription const & moduleDescription () const
 
 ~EDProducer () 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 &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
ESProxyIndex const * esGetTokenIndices (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::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Member Functions

void beginJob (void) override
 
void endJob () override
 
void produce (edm::Event &, const edm::EventSetup &) override
 
int verbose ()
 

Private Attributes

double EBase_
 
double ESigm_
 
std::string instName [dedefs::DEnsys][5]
 
bool m_doSys [dedefs::DEnsys]
 
int nevt_
 
int verbose_
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
- Public Types inherited from edm::ProducerBase
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
 
- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
static bool wantsGlobalLuminosityBlocks ()
 
static bool wantsGlobalRuns ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 
- Protected Member Functions inherited from edm::ProducerBase
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 declare what type of product will make and with which optional label More...
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
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)
 
template<Transition B>
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 (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (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)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

Detailed Description

Definition at line 37 of file L1DummyProducer.h.

Constructor & Destructor Documentation

◆ L1DummyProducer()

L1DummyProducer::L1DummyProducer ( const edm::ParameterSet iConfig)
explicit

assertions/temporary

list of collections to be produced

rnd # settings

Definition at line 9 of file L1DummyProducer.cc.

9  {
10  verbose_ = iConfig.getUntrackedParameter<int>("VerboseFlag", 0);
11 
12  if (verbose())
13  std::cout << "L1DummyProducer::L1DummyProducer...\n" << std::flush;
14 
15  std::vector<unsigned int> compColls = iConfig.getUntrackedParameter<std::vector<unsigned int> >("DO_SYSTEM");
16 
17  for (int i = 0; i < DEnsys; i++)
18  m_doSys[i] = compColls[i];
19 
20  if (verbose()) {
21  std::cout << "[L1DummyProducer] do sys? ";
22  for (int i = 0; i < DEnsys; i++)
23  std::cout << m_doSys[i];
24  std::cout << std::endl;
25  for (int i = 0; i < DEnsys; i++)
26  if (m_doSys[i])
27  std::cout << SystLabel[i] << " ";
28  std::cout << std::endl;
29  }
30 
31  std::string CollInstName[DEnsys][5];
32  for (int i = 0; i < DEnsys; i++)
33  for (int j = 0; j < 5; j++)
34  CollInstName[i][j] = std::string("");
35 
36  CollInstName[GCT][0] += "isoEm";
37  CollInstName[GCT][1] += "nonIsoEm";
38  CollInstName[GCT][2] += "cenJets";
39  CollInstName[GCT][3] += "forJets";
40  CollInstName[GCT][4] += "tauJets";
41  CollInstName[DTF][0] += "DT";
42  CollInstName[DTF][1] += "DTTF";
43  CollInstName[CTF][0] += "CSC";
44  CollInstName[CTF][1] += "";
45  CollInstName[RPC][0] += "RPCb";
46  CollInstName[RPC][1] += "RPCf";
47 
48  for (int i = 0; i < DEnsys; i++)
49  for (int j = 0; j < 5; j++)
50  instName[i][j] = CollInstName[i][j];
51 
52  if (verbose()) {
53  std::cout << "[L1DummyProducer] instName:\n";
54  for (int i = 0; i < DEnsys; i++)
55  for (int j = 0; j < 5; j++)
56  if (!instName[i][j].empty())
57  std::cout << i << " " << SystLabel[i] << " " << j << " " << instName[i][j] << std::endl;
58  std::cout << std::flush;
59  }
60 
62  assert(ETP == 0);
63  assert(HTP == 1);
64  assert(RCT == 2);
65  assert(GCT == 3);
66  assert(DTP == 4);
67  assert(DTF == 5);
68  assert(CTP == 6);
69  assert(CTF == 7);
70  assert(RPC == 8);
71  assert(LTC == 9);
72  assert(GMT == 10);
73  assert(GLT == 11);
74 
76  if (m_doSys[ETP])
77  produces<EcalTrigPrimDigiCollection>(instName[ETP][0]);
78  if (m_doSys[HTP])
79  produces<HcalTrigPrimDigiCollection>(instName[HTP][0]);
80  if (m_doSys[RCT])
81  produces<L1CaloEmCollection>(instName[RCT][0]);
82  if (m_doSys[RCT])
83  produces<L1CaloRegionCollection>(instName[RCT][0]);
84  if (m_doSys[GCT])
85  produces<L1GctEmCandCollection>(instName[GCT][0]);
86  if (m_doSys[GCT])
87  produces<L1GctEmCandCollection>(instName[GCT][1]);
88  if (m_doSys[GCT])
89  produces<L1GctJetCandCollection>(instName[GCT][2]);
90  if (m_doSys[GCT])
91  produces<L1GctJetCandCollection>(instName[GCT][3]);
92  if (m_doSys[GCT])
93  produces<L1GctJetCandCollection>(instName[GCT][4]);
94  if (m_doSys[DTP])
95  produces<L1MuDTChambPhContainer>(instName[DTP][0]);
96  if (m_doSys[DTP])
97  produces<L1MuDTChambThContainer>(instName[DTP][0]);
98  if (m_doSys[DTF])
99  produces<L1MuRegionalCandCollection>(instName[DTF][0]);
100  if (m_doSys[DTF])
101  produces<L1MuDTTrackContainer>(instName[DTF][1]);
102  if (m_doSys[CTP])
103  produces<CSCCorrelatedLCTDigiCollection>(instName[CTP][0]);
104  if (m_doSys[CTF])
105  produces<L1MuRegionalCandCollection>(instName[CTF][0]);
106  if (m_doSys[CTF])
107  produces<L1CSCTrackCollection>(instName[CTF][1]);
108  if (m_doSys[RPC])
109  produces<L1MuRegionalCandCollection>(instName[RPC][0]);
110  if (m_doSys[RPC])
111  produces<L1MuRegionalCandCollection>(instName[RPC][1]);
112  if (m_doSys[LTC])
113  produces<LTCDigiCollection>(instName[LTC][0]);
114  if (m_doSys[GMT])
115  produces<L1MuGMTCandCollection>(instName[GMT][0]);
116  if (m_doSys[GMT])
117  produces<L1MuGMTReadoutCollection>(instName[GMT][0]);
118  if (m_doSys[GLT])
119  produces<L1GlobalTriggerReadoutRecord>(instName[GLT][0]);
120  if (m_doSys[GLT])
121  produces<L1GlobalTriggerEvmReadoutRecord>(instName[GLT][0]);
122  if (m_doSys[GLT])
123  produces<L1GlobalTriggerObjectMapRecord>(instName[GLT][0]);
124 
127  if (!rng.isAvailable()) {
128  throw cms::Exception("Configuration")
129  << "L1DummyProducer requires the RandomNumberGeneratorService\n"
130  "which is not present in the configuration file. You must add the service\n"
131  "in the configuration file or remove the modules that require it.";
132  }
133  EBase_ = iConfig.getUntrackedParameter<double>("EnergyBase", 100.);
134  ESigm_ = iConfig.getUntrackedParameter<double>("EnergySigm", 10.);
135 
136  nevt_ = 0;
137 }

References cms::cuda::assert(), gather_cfg::cout, dedefs::CTF, dedefs::CTP, dedefs::DEnsys, dedefs::DTF, dedefs::DTP, relativeConstraints::empty, dedefs::ETP, Exception, dedefs::GCT, edm::ParameterSet::getUntrackedParameter(), dedefs::GLT, dedefs::GMT, dedefs::HTP, mps_fire::i, edm::Service< T >::isAvailable(), dqmiolumiharvest::j, dedefs::LTC, dedefs::RCT, dedefs::RPC, AlCaHLTBitMon_QueryRunRegistry::string, dedefs::SystLabel, and verbose.

◆ ~L1DummyProducer()

L1DummyProducer::~L1DummyProducer ( )
override

Definition at line 139 of file L1DummyProducer.cc.

139 {}

Member Function Documentation

◆ beginJob()

void L1DummyProducer::beginJob ( void  )
inlineoverrideprivatevirtual

Reimplemented from edm::EDProducer.

Definition at line 43 of file L1DummyProducer.h.

43 {};

◆ endJob()

void L1DummyProducer::endJob ( void  )
inlineoverrideprivatevirtual

Reimplemented from edm::EDProducer.

Definition at line 46 of file L1DummyProducer.h.

46 {};

◆ produce()

void L1DummyProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

define the data collections

fill candidate collections

put collection

Implements edm::EDProducer.

Definition at line 141 of file L1DummyProducer.cc.

141  {
143  CLHEP::HepRandomEngine* engine = &rng->getEngine(iEvent.streamID());
144 
145  if (verbose())
146  std::cout << "L1DummyProducer::produce...\n" << std::flush;
147 
149  std::unique_ptr<EcalTrigPrimDigiCollection> ecal_tp_data(new EcalTrigPrimDigiCollection);
150  std::unique_ptr<HcalTrigPrimDigiCollection> hcal_tp_data(new HcalTrigPrimDigiCollection);
151  std::unique_ptr<L1CaloEmCollection> rct_em_data(new L1CaloEmCollection);
152  std::unique_ptr<L1CaloRegionCollection> rct_rgn_data(new L1CaloRegionCollection);
153  std::unique_ptr<L1GctEmCandCollection> gct_isolaem_data(new L1GctEmCandCollection);
154  std::unique_ptr<L1GctEmCandCollection> gct_noisoem_data(new L1GctEmCandCollection);
155  std::unique_ptr<L1GctJetCandCollection> gct_cenjets_data(new L1GctJetCandCollection);
156  std::unique_ptr<L1GctJetCandCollection> gct_forjets_data(new L1GctJetCandCollection);
157  std::unique_ptr<L1GctJetCandCollection> gct_taujets_data(new L1GctJetCandCollection);
158  std::unique_ptr<L1MuDTChambPhContainer> dtp_ph_data(new L1MuDTChambPhContainer);
159  std::unique_ptr<L1MuDTChambThContainer> dtp_th_data(new L1MuDTChambThContainer);
160  std::unique_ptr<L1MuRegionalCandCollection> dtf_data(new L1MuRegionalCandCollection);
161  std::unique_ptr<L1MuDTTrackContainer> dtf_trk_data(new L1MuDTTrackContainer);
162  std::unique_ptr<CSCCorrelatedLCTDigiCollection> ctp_data(new CSCCorrelatedLCTDigiCollection);
163  std::unique_ptr<L1MuRegionalCandCollection> ctf_data(new L1MuRegionalCandCollection);
164  std::unique_ptr<L1CSCTrackCollection> ctf_trk_data(new L1CSCTrackCollection);
165  std::unique_ptr<L1MuRegionalCandCollection> rpc_cen_data(new L1MuRegionalCandCollection);
166  std::unique_ptr<L1MuRegionalCandCollection> rpc_for_data(new L1MuRegionalCandCollection);
167  std::unique_ptr<LTCDigiCollection> ltc_data(new LTCDigiCollection);
168  std::unique_ptr<L1MuGMTCandCollection> gmt_data(new L1MuGMTCandCollection);
169  std::unique_ptr<L1MuGMTReadoutCollection> gmt_rdt_data(new L1MuGMTReadoutCollection);
170  std::unique_ptr<L1GlobalTriggerReadoutRecord> glt_rdt_data(new L1GlobalTriggerReadoutRecord);
171  std::unique_ptr<L1GlobalTriggerEvmReadoutRecord> glt_evm_data(new L1GlobalTriggerEvmReadoutRecord);
172  std::unique_ptr<L1GlobalTriggerObjectMapRecord> glt_obj_data(new L1GlobalTriggerObjectMapRecord);
173 
175  if (m_doSys[ETP])
176  SimpleDigi(engine, ecal_tp_data);
177  if (m_doSys[HTP])
178  SimpleDigi(engine, hcal_tp_data);
179  if (m_doSys[RCT])
180  SimpleDigi(engine, rct_em_data);
181  if (m_doSys[RCT])
182  SimpleDigi(engine, rct_rgn_data);
183  if (m_doSys[GCT])
184  SimpleDigi(engine, gct_isolaem_data, 0);
185  if (m_doSys[GCT])
186  SimpleDigi(engine, gct_noisoem_data, 1);
187  if (m_doSys[GCT])
188  SimpleDigi(engine, gct_cenjets_data, 0);
189  if (m_doSys[GCT])
190  SimpleDigi(engine, gct_forjets_data, 1);
191  if (m_doSys[GCT])
192  SimpleDigi(engine, gct_taujets_data, 2);
193  if (m_doSys[DTP])
194  SimpleDigi(engine, dtp_ph_data);
195  if (m_doSys[DTP])
196  SimpleDigi(engine, dtp_th_data);
197  if (m_doSys[DTF])
198  SimpleDigi(engine, dtf_data, 0);
199  if (m_doSys[DTF])
200  SimpleDigi(engine, dtf_trk_data);
201  if (m_doSys[CTP])
202  SimpleDigi(engine, ctp_data);
203  if (m_doSys[CTF])
204  SimpleDigi(engine, ctf_data, 2);
205  if (m_doSys[CTF])
206  SimpleDigi(engine, ctf_trk_data);
207  if (m_doSys[RPC])
208  SimpleDigi(engine, rpc_cen_data, 1);
209  if (m_doSys[RPC])
210  SimpleDigi(engine, rpc_for_data, 3);
211  if (m_doSys[LTC])
212  SimpleDigi(engine, ltc_data);
213  if (m_doSys[GMT])
214  SimpleDigi(engine, gmt_data);
215  if (m_doSys[GMT])
216  SimpleDigi(engine, gmt_rdt_data);
217  if (m_doSys[GLT])
218  SimpleDigi(engine, glt_rdt_data);
219  if (m_doSys[GLT])
220  SimpleDigi(engine, glt_evm_data);
221  if (m_doSys[GLT])
222  SimpleDigi(engine, glt_obj_data);
223 
225  if (m_doSys[ETP])
226  iEvent.put(std::move(ecal_tp_data), instName[ETP][0]);
227  if (m_doSys[HTP])
228  iEvent.put(std::move(hcal_tp_data), instName[HTP][0]);
229  if (m_doSys[RCT])
230  iEvent.put(std::move(rct_em_data), instName[RCT][0]);
231  if (m_doSys[RCT])
232  iEvent.put(std::move(rct_rgn_data), instName[RCT][0]);
233  if (m_doSys[GCT])
234  iEvent.put(std::move(gct_isolaem_data), instName[GCT][0]);
235  if (m_doSys[GCT])
236  iEvent.put(std::move(gct_noisoem_data), instName[GCT][1]);
237  if (m_doSys[GCT])
238  iEvent.put(std::move(gct_cenjets_data), instName[GCT][2]);
239  if (m_doSys[GCT])
240  iEvent.put(std::move(gct_forjets_data), instName[GCT][3]);
241  if (m_doSys[GCT])
242  iEvent.put(std::move(gct_taujets_data), instName[GCT][4]);
243  if (m_doSys[DTP])
244  iEvent.put(std::move(dtp_ph_data), instName[DTP][0]);
245  if (m_doSys[DTP])
246  iEvent.put(std::move(dtp_th_data), instName[DTP][0]);
247  if (m_doSys[DTF])
248  iEvent.put(std::move(dtf_data), instName[DTF][0]);
249  if (m_doSys[DTF])
250  iEvent.put(std::move(dtf_trk_data), instName[DTF][1]);
251  if (m_doSys[CTP])
252  iEvent.put(std::move(ctp_data), instName[CTP][0]);
253  if (m_doSys[CTF])
254  iEvent.put(std::move(ctf_data), instName[CTF][0]);
255  if (m_doSys[CTF])
256  iEvent.put(std::move(ctf_trk_data), instName[CTF][1]);
257  if (m_doSys[RPC])
258  iEvent.put(std::move(rpc_cen_data), instName[RPC][0]);
259  if (m_doSys[RPC])
260  iEvent.put(std::move(rpc_for_data), instName[RPC][1]);
261  if (m_doSys[LTC])
262  iEvent.put(std::move(ltc_data), instName[LTC][0]);
263  if (m_doSys[GMT])
264  iEvent.put(std::move(gmt_data), instName[GMT][0]);
265  if (m_doSys[GMT])
266  iEvent.put(std::move(gmt_rdt_data), instName[GMT][0]);
267  if (m_doSys[GLT])
268  iEvent.put(std::move(glt_rdt_data), instName[GLT][0]);
269  if (m_doSys[GLT])
270  iEvent.put(std::move(glt_evm_data), instName[GLT][0]);
271  if (m_doSys[GLT])
272  iEvent.put(std::move(glt_obj_data), instName[GLT][0]);
273 
274  nevt_++;
275 
276  if (verbose())
277  std::cout << "L1DummyProducer::produce end.\n" << std::flush;
278 }

References gather_cfg::cout, dedefs::CTF, dedefs::CTP, dedefs::DTF, dedefs::DTP, dedefs::ETP, dedefs::GCT, edm::RandomNumberGenerator::getEngine(), dedefs::GLT, dedefs::GMT, dedefs::HTP, iEvent, dedefs::LTC, eostools::move(), dedefs::RCT, dedefs::RPC, and verbose.

◆ SimpleDigi() [1/16]

template<>
void L1DummyProducer::SimpleDigi ( CLHEP::HepRandomEngine *  ,
std::unique_ptr< LTCDigiCollection > &  data,
int  type 
)
inline

Definition at line 445 of file L1DummyProducer.h.

445  {
446  if (verbose())
447  std::cout << "L1DummyProducer::SimpleDigi<LTCDigiCollection>....\n" << std::flush;
448  //LTCs are FED id 816-823
449  /*
450  6 64-bit words
451  uint64_t *ld = (uint64_t*)data;
452 
453  word0: 59:56 4 bit ld[0]>>56 & 0xf trigType
454  55:32 24 bit ld[0]>>32 & 0x00ffffff eventID
455  31:20 12 bit ld[0]>>20 & 0xfff bunchNumber
456  19: 8 12 bit ld[0]>> 8 & 0x00000fff sourceID (816-823?)
457 
458  word1: 63:32 32 bit ld[1]>>32 & 0xffffffff orbitNumber
459  31:24 8 bit ld[1]>>24 & 0xff versionNumber
460  3: 0 4 bit ld[1 & 0xf daqPartition
461 
462  word2: 63:32 32 bit ld[0]>>32 & 0xffffffff runNumber
463  31: 0 32 bit ld[0] & 0xffffffff eventNumber
464 
465  word3: 63:32 32 bit ld[3]>>32 & 0xffffffff trigInhibitNumber
466  31: 0 32 bit ld[3] & 0xffffffff trigInputStat
467 
468  word4: 63:0 64 bit ld[4] bstGpsTime
469 
470  word5: (empty)
471  */
472  //need to make up something meaningfull to produce here..
473  //LTCDigi(const unsigned char* data);
474  if (verbose())
475  std::cout << "L1DummyProducer::SimpleDigi<LTCDigiCollection> end.\n" << std::flush;
476 }

References gather_cfg::cout, and verbose().

◆ SimpleDigi() [2/16]

template<class T >
void L1DummyProducer::SimpleDigi ( CLHEP::HepRandomEngine *  ,
std::unique_ptr< T > &  data,
int  type = 0 
)

Definition at line 65 of file L1DummyProducer.h.

65  {
66  /*collections generated in specializations below*/
67 }

Referenced by SimpleDigi().

◆ SimpleDigi() [3/16]

template<>
void L1DummyProducer::SimpleDigi ( CLHEP::HepRandomEngine *  engine,
std::unique_ptr< CSCCorrelatedLCTDigiCollection > &  data,
int  type 
)
inline

Definition at line 479 of file L1DummyProducer.h.

481  {
482  if (verbose())
483  std::cout << "L1DummyProducer::SimpleDigi<CSCCorrelatedLCTDigiCollection>....\n" << std::flush;
484  //typedef MuonDigiCollection<CSCDetId,CSCCorrelatedLCTDigi> CSCCorrelatedLCTDigiCollection;
485  //CSCCorrelatedLCTDigi(const int trknmb, const int valid, const int quality, const int keywire, const int strip, const int clct_pattern, const int bend, const int bx, const int& mpclink = 0, const uint16_t & bx0=0, const uint16_t & syncErr = 0, const uint16_t & cscID=0);
487  //tbd: set non-trivial random values
488  dg.clear(); // set contents to zero
489  //CSCDetId( int iendcap, int istation, int iring, int ichamber, int ilayer = 0 );
490  enum eMinNum { MIN_ENDCAP = 1, MIN_STATION = 1, MIN_RING = 1, MIN_CHAMBER = 1, MIN_LAYER = 1 };
491  enum eMaxNum { MAX_ENDCAP = 2, MAX_STATION = 4, MAX_RING = 4, MAX_CHAMBER = 36, MAX_LAYER = 6 };
492  float rnd = engine->flat();
493  int ec = (int)(MIN_ENDCAP + (MAX_ENDCAP - MIN_ENDCAP) * rnd + 1);
494  int st = (int)(MIN_STATION + (MAX_STATION - MIN_STATION) * rnd + 1);
495  int rg = (int)(MIN_RING + (MAX_RING - MIN_RING) * rnd + 1);
496  int ch = (int)(MIN_CHAMBER + (MAX_CHAMBER - MIN_CHAMBER) * rnd + 1);
497  int lr = (int)(MIN_LAYER + (MAX_LAYER - MIN_LAYER) * rnd + 1);
498  CSCDetId did = CSCDetId(ec, st, rg, ch, lr);
499  //CSCDetId did = CSCDetId(); //DetId(DetId::Muon, MuonSubdetId::CSC)
500  //MuonDigiCollection::insertDigi(const IndexType& index, const DigiType& digi)
501  data->insertDigi(did, dg);
502  if (verbose())
503  std::cout << "L1DummyProducer::SimpleDigi<CSCCorrelatedLCTDigiCollection> end.\n" << std::flush;
504 }

References CSCCorrelatedLCTDigi::clear(), gather_cfg::cout, data, createfilelist::int, emtf::MAX_ENDCAP, emtf::MIN_ENDCAP, and verbose().

◆ SimpleDigi() [4/16]

template<>
void L1DummyProducer::SimpleDigi ( CLHEP::HepRandomEngine *  engine,
std::unique_ptr< EcalTrigPrimDigiCollection > &  data,
int  type 
)
inline

Definition at line 70 of file L1DummyProducer.h.

72  {
73  if (verbose())
74  std::cout << "L1DummyProducer::SimpleDigi<EcalTrigPrimDigiCollection>....\n" << std::flush;
75  int side = (engine->flat() > 0.5) ? -1 : 1;
76  int ieta = (int)(1 + 17 * engine->flat()); //1-17
77  int iphi = (int)(1 + 72 * engine->flat()); //1-72
78  const EcalTrigTowerDetId e_id(side, EcalBarrel, ieta, iphi, 0);
79  EcalTriggerPrimitiveDigi e_digi(e_id);
80  int energy = (int)(EBase_ + ESigm_ * CLHEP::RandGaussQ::shoot(engine));
81  bool fg = (engine->flat() > 0.5);
82  int ttf = (int)(8 * engine->flat()); //0-7
83  EcalTriggerPrimitiveSample e_sample(energy, fg, ttf);
84  e_digi.setSize(1); //set sampleOfInterest to 0
85  e_digi.setSample(0, e_sample);
86  data->push_back(e_digi);
87  //EcalTriggerPrimitiveSample(int encodedEt, bool finegrain, int triggerFlag);
88  //const EcalTrigTowerDetId e_id( zside , EcalBarrel, etaTT, phiTT, 0);
89  if (verbose())
90  std::cout << "L1DummyProducer::SimpleDigi<EcalTrigPrimDigiCollection> end.\n" << std::flush;
91 }

References gather_cfg::cout, data, EBase_, EcalBarrel, HCALHighEnergyHPDFilter_cfi::energy, ESigm_, LEDCalibrationChannels::ieta, createfilelist::int, LEDCalibrationChannels::iphi, EcalTriggerPrimitiveDigi::setSample(), EcalTriggerPrimitiveDigi::setSize(), and verbose().

◆ SimpleDigi() [5/16]

template<>
void L1DummyProducer::SimpleDigi ( CLHEP::HepRandomEngine *  engine,
std::unique_ptr< HcalTrigPrimDigiCollection > &  data,
int  type 
)
inline

Definition at line 94 of file L1DummyProducer.h.

96  {
97  if (verbose())
98  std::cout << "L1DummyProducer::SimpleDigi<HcalTrigPrimDigiCollection>....\n" << std::flush;
99  int side = (engine->flat() > 0.5) ? -1 : 1;
100  int ieta = (int)(1 + 17 * engine->flat());
101  int iphi = (int)(1 + 72 * engine->flat());
102  const HcalTrigTowerDetId h_id(side * ieta, iphi);
103  HcalTriggerPrimitiveDigi h_digi(h_id);
104  int energy = (int)(EBase_ + ESigm_ * CLHEP::RandGaussQ::shoot(engine));
105  HcalTriggerPrimitiveSample h_sample(energy, false, 0, 0);
106  h_digi.setSize(1); //set sampleOfInterest to 0
107  h_digi.setSample(0, h_sample);
108  data->push_back(h_digi);
109  //HcalTriggerPrimitiveSample(int encodedEt, bool finegrain, int slb, int slbchan);
110  //HcalTrigTowerDetId(int ieta, int iphi);
111  if (verbose())
112  std::cout << "L1DummyProducer::SimpleDigi<HcalTrigPrimDigiCollection> end.\n" << std::flush;
113 }

References gather_cfg::cout, data, EBase_, HCALHighEnergyHPDFilter_cfi::energy, ESigm_, LEDCalibrationChannels::ieta, createfilelist::int, LEDCalibrationChannels::iphi, HcalTriggerPrimitiveDigi::setSample(), HcalTriggerPrimitiveDigi::setSize(), and verbose().

◆ SimpleDigi() [6/16]

template<>
void L1DummyProducer::SimpleDigi ( CLHEP::HepRandomEngine *  engine,
std::unique_ptr< L1CaloEmCollection > &  data,
int  type 
)
inline

Definition at line 116 of file L1DummyProducer.h.

118  {
119  if (verbose())
120  std::cout << "L1DummyProducer::SimpleDigi<L1CaloEmCollection>....\n" << std::flush;
121  int energy = (int)(EBase_ + ESigm_ * CLHEP::RandGaussQ::shoot(engine));
122  unsigned rank = energy & 0x3f;
123  unsigned region = (engine->flat() > 0.5 ? 0 : 1);
124  unsigned card = (unsigned)(7 * engine->flat());
125  unsigned crate = (unsigned)(18 * engine->flat());
126  bool iso = (engine->flat() > 0.4);
127  uint16_t index = (unsigned)(4 * engine->flat());
128  int16_t bx = nevt_;
129  L1CaloEmCand cand(rank, region, card, crate, iso, index, bx);
130  data->push_back(cand);
131  //L1CaloEmCand(unsigned rank, unsigned region, unsigned card, unsigned crate, bool iso, uint16_t index, int16_t bx);
132  if (verbose())
133  std::cout << "L1DummyProducer::SimpleDigi<L1CaloEmCollection> end.\n" << std::flush;
134 }

References simKBmtfDigis_cfi::bx, gather_cfg::cout, data, EBase_, HCALHighEnergyHPDFilter_cfi::energy, ESigm_, createfilelist::int, nevt_, HLT_2018_cff::region, and verbose().

◆ SimpleDigi() [7/16]

template<>
void L1DummyProducer::SimpleDigi ( CLHEP::HepRandomEngine *  engine,
std::unique_ptr< L1CaloRegionCollection > &  data,
int  type 
)
inline

Definition at line 137 of file L1DummyProducer.h.

139  {
140  if (verbose())
141  std::cout << "L1DummyProducer::SimpleDigi<L1CaloRegionCollection>....\n" << std::flush;
142  int energy = (int)(EBase_ + ESigm_ * CLHEP::RandGaussQ::shoot(engine));
143  unsigned et = energy & 0x3ff;
144  bool overFlow = false; //(engine->flat()>0.4);
145  bool tauVeto = false; //(engine->flat()>0.3);
146  bool mip = false; //(engine->flat()>0.1);
147  bool quiet = false; //(engine->flat()>0.6);
148  unsigned crate = (unsigned)(18 * engine->flat());
149  unsigned card = (unsigned)(7 * engine->flat());
150  unsigned rgn = crate % 2; //(engine->flat()>0.5?0:1);
151  L1CaloRegion cand(et, overFlow, tauVeto, mip, quiet, crate, card, rgn);
152  data->push_back(cand);
153  //L1CaloRegion(unsigned et, bool overFlow, bool tauVeto, bool mip, bool quiet, unsigned crate, unsigned card, unsigned rgn);
154  if (verbose())
155  std::cout << "L1DummyProducer::SimpleDigi<L1CaloRegionCollection> end.\n" << std::flush;
156 }

References gather_cfg::cout, data, EBase_, HCALHighEnergyHPDFilter_cfi::energy, ESigm_, EgHLTOffHistBins_cfi::et, createfilelist::int, and verbose().

◆ SimpleDigi() [8/16]

template<>
void L1DummyProducer::SimpleDigi ( CLHEP::HepRandomEngine *  engine,
std::unique_ptr< L1CSCTrackCollection > &  data,
int  type 
)
inline

Definition at line 507 of file L1DummyProducer.h.

509  {
510  if (verbose())
511  std::cout << "L1DummyProducer::SimpleDigi<L1CSCTrackCollection>...\n" << std::flush;
512  std::unique_ptr<CSCCorrelatedLCTDigiCollection> dgcoll(new CSCCorrelatedLCTDigiCollection);
513  SimpleDigi(engine, dgcoll, 0);
514  csc::L1Track l1trk = csc::L1Track();
515  std::unique_ptr<L1MuRegionalCandCollection> regcoll(new L1MuRegionalCandCollection);
516  SimpleDigi(engine, regcoll, 2);
517  L1MuRegionalCand regcand = *(regcoll->begin());
518  l1trk.setDataWord(regcand.getDataWord());
519  l1trk.setBx(regcand.bx());
520  l1trk.setPhiValue(regcand.phiValue());
521  l1trk.setEtaValue(regcand.etaValue());
522  l1trk.setPtValue(regcand.ptValue());
523  L1CSCTrack l1csctrk = std::make_pair(l1trk, *dgcoll);
524  data->push_back(l1csctrk);
525  //typedef std::vector<L1CSCTrack> L1CSCTrackCollection;
526  //typedef std::pair<csc::L1Track,CSCCorrelatedLCTDigiCollection> L1CSCTrack;
527  //L1Track() : L1MuRegionalCand(), m_name("csc::L1Track") { setType(2); setPtPacked(0); }
528  //L1MuRegionalCand(unsigned dataword = 0, int bx = 0);
529  if (verbose())
530  std::cout << "L1DummyProducer::SimpleDigi<L1CSCTrackCollection> end.\n" << std::flush;
531 }

References L1MuRegionalCand::bx(), gather_cfg::cout, data, L1MuRegionalCand::etaValue(), L1MuRegionalCand::getDataWord(), L1MuRegionalCand::phiValue(), L1MuRegionalCand::ptValue(), L1MuRegionalCand::setBx(), L1MuRegionalCand::setDataWord(), L1MuRegionalCand::setEtaValue(), L1MuRegionalCand::setPhiValue(), L1MuRegionalCand::setPtValue(), SimpleDigi(), and verbose().

◆ SimpleDigi() [9/16]

template<>
void L1DummyProducer::SimpleDigi ( CLHEP::HepRandomEngine *  engine,
std::unique_ptr< L1GctEmCandCollection > &  data,
int  type 
)
inline

Definition at line 159 of file L1DummyProducer.h.

161  {
162  if (verbose())
163  std::cout << "L1DummyProducer::SimpleDigi<L1GctEmCandCollection>....\n" << std::flush;
164  bool iso; //= type==0;
165  switch (type) { // 0 iso, 1 noniso
166  case 0:
167  iso = true;
168  break;
169  case 1:
170  iso = false;
171  break;
172  default:
173  throw cms::Exception("L1DummyProducerInvalidType")
174  << "L1DummyProducer::SimpleDigi production of L1GctEmCandCollection "
175  << " invalid type: " << type << std::endl;
176  }
177  int energy = (int)(EBase_ + ESigm_ * CLHEP::RandGaussQ::shoot(engine));
178  unsigned rank = energy & 0x3f;
179  unsigned phi = (unsigned)(18 * engine->flat());
180  unsigned eta = (unsigned)(7 * engine->flat());
181  if (engine->flat() > 0.5) //-z (eta sign)
182  eta = (eta & 0x7) + (0x1 << 3);
183  L1GctEmCand cand(rank, phi, eta, iso);
184  data->push_back(cand);
185  // eta = -6 to -0, +0 to +6. Sign is bit 3, 1 means -ve Z, 0 means +ve Z
186  //L1GctEmCand(unsigned rank, unsigned phi, unsigned eta, bool iso);
187  if (verbose())
188  std::cout << "L1DummyProducer::SimpleDigi<L1GctEmCandCollection> end.\n" << std::flush;
189 }

References gather_cfg::cout, data, EBase_, HCALHighEnergyHPDFilter_cfi::energy, ESigm_, PVValHelper::eta, Exception, createfilelist::int, phi, verbose(), and testProducerWithPsetDescEmpty_cfi::x1.

◆ SimpleDigi() [10/16]

template<>
void L1DummyProducer::SimpleDigi ( CLHEP::HepRandomEngine *  engine,
std::unique_ptr< L1GctJetCandCollection > &  data,
int  type 
)
inline

Definition at line 192 of file L1DummyProducer.h.

194  {
195  if (verbose())
196  std::cout << "L1DummyProducer::SimpleDigi<L1GctJetCandCollection>....\n" << std::flush;
197  bool isFor, isTau;
198  switch (type) { // 0 cen, 1 for, 2 tau
199  case 0:
200  isFor = false;
201  isTau = false;
202  break;
203  case 1:
204  isFor = true;
205  isTau = false;
206  break;
207  case 2:
208  isFor = false;
209  isTau = true;
210  break;
211  default:
212  throw cms::Exception("L1DummyProducerInvalidType")
213  << "L1DummyProducer::SimpleDigi production of L1GctJetCandCollection "
214  << " invalid type: " << type << std::endl;
215  }
216 
217  int energy = (int)(EBase_ + ESigm_ * CLHEP::RandGaussQ::shoot(engine));
218  unsigned rank = energy & 0x3f;
219  unsigned phi = (unsigned)(18 * engine->flat());
220  unsigned eta = (unsigned)(7 * engine->flat());
221  if (engine->flat() > 0.5) //-z (eta sign)
222  eta = (eta & 0x7) + (0x1 << 3);
223  L1GctJetCand cand(rank, phi, eta, isTau, isFor);
224  data->push_back(cand);
225  //L1GctJetCand(unsigned rank, unsigned phi, unsigned eta, bool isTau, bool isFor);
226  if (verbose())
227  std::cout << "L1DummyProducer::SimpleDigi<L1GctJetCandCollection> end.\n" << std::flush;
228 }

References gather_cfg::cout, data, EBase_, HCALHighEnergyHPDFilter_cfi::energy, ESigm_, PVValHelper::eta, Exception, createfilelist::int, reco::isTau(), phi, verbose(), and testProducerWithPsetDescEmpty_cfi::x1.

◆ SimpleDigi() [11/16]

template<>
void L1DummyProducer::SimpleDigi ( CLHEP::HepRandomEngine *  engine,
std::unique_ptr< L1MuDTChambPhContainer > &  data,
int  type 
)
inline

Definition at line 293 of file L1DummyProducer.h.

295  {
296  if (verbose())
297  std::cout << "L1DummyProducer::SimpleDigi<L1MuDTChambPhContainer>....\n" << std::flush;
298  typedef std::vector<L1MuDTChambPhDigi> Phi_Container;
299  int ntrk = 4;
300  Phi_Container tracks(ntrk);
301  int ubx, uwh, usc, ust, uphr, uphb, uqua, utag, ucnt;
302  for (int i = 0; i < ntrk; i++) {
303  ubx = 0; //bxNum() - bx
304  uwh = 0; //whNum() - wheel
305  usc = 0; //scNum() - sector
306  ust = 0; //stNum() - station
307  uphr = 0; //phi() - radialAngle
308  uphb = 0; //phiB() - bendingAngle
309  uqua = 0; //code() - qualityCode
310  utag = 0; //Ts2Tag() - Ts2TagCode
311  ucnt = 0; //BxCnt() - BxCntCode
312  uwh = (int)(-2 + 5 * engine->flat());
313  usc = (int)(12 * engine->flat());
314  ust = (int)(1. + 4 * engine->flat());
315  uqua = (int)(8 * engine->flat());
316  L1MuDTChambPhDigi cand(ubx, uwh, usc, ust, uphr, uphb, uqua, utag, ucnt);
317  tracks.push_back(cand);
318  }
319  data->setContainer(tracks);
320  //L1MuDTChambPhDigi( int ubx, int uwh, int usc, int ust,
321  // int uphr, int uphb, int uqua, int utag, int ucnt );
322  if (verbose())
323  std::cout << "L1DummyProducer::SimpleDigi<L1MuDTChambPhContainer> end.\n" << std::flush;
324 }

References gather_cfg::cout, data, mps_fire::i, createfilelist::int, PDWG_EXOHSCP_cff::tracks, and verbose().

◆ SimpleDigi() [12/16]

template<>
void L1DummyProducer::SimpleDigi ( CLHEP::HepRandomEngine *  engine,
std::unique_ptr< L1MuDTChambThContainer > &  data,
int  type 
)
inline

Definition at line 327 of file L1DummyProducer.h.

329  {
330  if (verbose())
331  std::cout << "L1DummyProducer::SimpleDigi<L1MuDTChambThContainer>....\n" << std::flush;
332  typedef std::vector<L1MuDTChambThDigi> The_Container;
333  int ntrk = 4;
334  The_Container tracks(ntrk);
335  int ubx, uwh, usc, ust, uos[7], uqa[7];
336  for (int i = 0; i < ntrk; i++) {
337  ubx = 0;
338  uwh = (int)(-2 + 5 * engine->flat());
339  usc = (int)(12 * engine->flat());
340  ust = (int)(1. + 4 * engine->flat());
341  for (int j = 0; j < 7; j++) {
342  uos[j] = (engine->flat() > 0.5 ? 0 : 1);
343  uqa[j] = (engine->flat() > 0.5 ? 0 : 1);
344  }
345  L1MuDTChambThDigi cand(ubx, uwh, usc, ust, uos, uqa);
346  tracks.push_back(cand);
347  }
348  data->setContainer(tracks);
349  //L1MuDTChambThDigi( int ubx, int uwh, int usc, int ust,
350  // int* uos, [int* uqual] );
351  //"DataFormats/L1DTTrackFinder/interface/L1MuDTChambThContainer.h"
352  if (verbose())
353  std::cout << "L1DummyProducer::SimpleDigi<L1MuDTChambThContainer> end.\n" << std::flush;
354 }

References gather_cfg::cout, data, mps_fire::i, createfilelist::int, dqmiolumiharvest::j, PDWG_EXOHSCP_cff::tracks, and verbose().

◆ SimpleDigi() [13/16]

template<>
void L1DummyProducer::SimpleDigi ( CLHEP::HepRandomEngine *  engine,
std::unique_ptr< L1MuDTTrackContainer > &  data,
int  type 
)
inline

Definition at line 267 of file L1DummyProducer.h.

269  {
270  assert(type == 0);
271  int type_idx = type; //choose data type: 0 DT, 1 bRPC, 2 CSC, 3 fRPC
272  if (verbose())
273  std::cout << "L1DummyProducer::SimpleDigi<L1MuDTTrackContainer>....\n" << std::flush;
274  std::unique_ptr<L1MuRegionalCandCollection> tracks(new L1MuRegionalCandCollection());
275  SimpleDigi(engine, tracks, type_idx);
276  typedef std::vector<L1MuDTTrackCand> L1MuDTTrackCandCollection;
277  std::unique_ptr<L1MuDTTrackCandCollection> tracksd(new L1MuDTTrackCandCollection());
278  for (L1MuRegionalCandCollection::const_iterator it = tracks->begin(); it != tracks->end(); it++) {
279  L1MuDTTrackCand* cnd = new L1MuDTTrackCand();
280  cnd->setDataWord(it->getDataWord());
281  cnd->setBx(it->bx());
282  tracksd->push_back(L1MuDTTrackCand());
283  tracksd->push_back(*cnd);
284  }
285  data->setContainer(*tracksd);
286  if (verbose())
287  std::cout << "L1DummyProducer::SimpleDigi<L1MuDTTrackContainer> end.\n" << std::flush;
288  //L1MuDTTrackCand( unsigned dataword, int bx, int uwh, int usc, int utag,
289  // int adr1, int adr2, int adr3, int adr4, int utc );
290 }

References cms::cuda::assert(), gather_cfg::cout, data, L1MuRegionalCand::setBx(), L1MuRegionalCand::setDataWord(), SimpleDigi(), PDWG_EXOHSCP_cff::tracks, and verbose().

◆ SimpleDigi() [14/16]

template<>
void L1DummyProducer::SimpleDigi ( CLHEP::HepRandomEngine *  engine,
std::unique_ptr< L1MuGMTCandCollection > &  data,
int  type 
)
inline

Definition at line 357 of file L1DummyProducer.h.

359  {
360  if (verbose())
361  std::cout << "L1DummyProducer::SimpleDigi<L1MuGMTCandCollection>....\n" << std::flush;
362  //typedef std::vector<L1MuGMTCand> L1MuGMTCandCollection;
363  L1MuGMTCand cand(0, nevt_);
364  //cand.setPhiPacked();//8bits
365  //cand.setPtPacked ();//5bits
366  //cand.setQuality ();//3bits
367  //cand.setEtaPacked();//6bits
368  //cand.setIsolation();//1bit
369  //cand.setMIP ();//1bit
370  //cand.setChargePacked();//0:+, 1:-, 2:undef, 3:sync
371  //cand.setBx (nevt_);
372  //set physical values
373  double eng = EBase_ + ESigm_ * CLHEP::RandGaussQ::shoot(engine);
374  double phi = 2 * TMath::Pi() * engine->flat();
375  double eta = 2.5 * (-1 + 2 * engine->flat());
376  cand.setPtValue(eng);
377  cand.setPhiValue(phi);
378  cand.setEtaValue(eta);
379  unsigned engp = (unsigned)(EBase_ + ESigm_ * CLHEP::RandGaussQ::shoot(engine));
380  unsigned phip = (unsigned)(255 * engine->flat());
381  unsigned etap = (unsigned)(63 * engine->flat());
382  cand.setPtPacked(engp & 0x1f);
383  cand.setPhiPacked(phip & 0x7f);
384  cand.setEtaPacked(etap & 0x3f);
385  double r = engine->flat();
386  cand.setIsolation(r > 0.2);
387  cand.setMIP(r > 0.7);
388  cand.setChargePacked(r > 0.5 ? 0 : 1);
389  cand.setBx(0);
390  data->push_back(cand);
391  if (verbose())
392  std::cout << "L1DummyProducer::SimpleDigi<L1MuGMTCandCollection> end.\n" << std::flush;
393 }

References gather_cfg::cout, data, EBase_, ESigm_, PVValHelper::eta, nevt_, phi, Pi, alignCSCRings::r, and verbose().

◆ SimpleDigi() [15/16]

template<>
void L1DummyProducer::SimpleDigi ( CLHEP::HepRandomEngine *  engine,
std::unique_ptr< L1MuGMTReadoutCollection > &  data,
int  type 
)
inline

tbd: add GMT extended cand(!)

Definition at line 396 of file L1DummyProducer.h.

398  {
399  if (verbose())
400  std::cout << "L1DummyProducer::SimpleDigi<L1MuGMTReadoutCollection>....\n" << std::flush;
401  L1MuGMTReadoutRecord rec(0);
402  int bxn = nevt_;
403  rec.setBxNr(bxn);
404  rec.setEvNr(bxn);
405  rec.setBxInEvent(0);
406  std::unique_ptr<L1MuRegionalCandCollection> trks_dttf(new L1MuRegionalCandCollection);
407  std::unique_ptr<L1MuRegionalCandCollection> trks_rpcb(new L1MuRegionalCandCollection);
408  std::unique_ptr<L1MuRegionalCandCollection> trks_csc(new L1MuRegionalCandCollection);
409  std::unique_ptr<L1MuRegionalCandCollection> trks_rpcf(new L1MuRegionalCandCollection);
410  SimpleDigi(engine, trks_dttf, 0);
411  SimpleDigi(engine, trks_rpcb, 1);
412  SimpleDigi(engine, trks_csc, 2);
413  SimpleDigi(engine, trks_rpcf, 3);
414  for (int i = 0; i < 4; i++) {
415  rec.setInputCand(i, trks_dttf->at(i)); //dt : 0..3
416  rec.setInputCand(i + 4, trks_rpcb->at(i)); //rpcb: 4..7
417  rec.setInputCand(i + 8, trks_csc->at(i)); //csc : 8..11
418  rec.setInputCand(i + 12, trks_rpcf->at(i)); //rpcf:12..15
419  }
420  for (int nr = 0; nr < 4; nr++) {
421  int eng = (int)(EBase_ + ESigm_ * CLHEP::RandGaussQ::shoot(engine));
422  rec.setGMTBrlCand(nr, eng & 0x11, eng & 0x11); //set GMT barrel candidate
423  rec.setGMTFwdCand(nr, eng & 0x11, eng & 0x11); //set GMT forward candidate
424  rec.setGMTCand(nr, eng & 0x11); //set GMT candidate (does not store rank)
425  int eta = (int)(14 * engine->flat()); //0..13
426  int phi = (int)(18 * engine->flat()); //0..17
427  rec.setMIPbit(eta, phi);
428  rec.setQuietbit(eta, phi);
429  }
430  data->addRecord(rec);
432  //rec.setBCERR(int bcerr);
433  //rec.setGMTBrlCand(int nr, L1MuGMTExtendedCand const& cand);
434  //rec.setGMTFwdCand(int nr, L1MuGMTExtendedCand const& cand);
435  //rec.setGMTCand (int nr, L1MuGMTExtendedCand const& cand);
436  //rec.setInputCand (int nr, L1MuRegionalCand const& cand);
437  //L1MuGMTReadoutCollection :: std::vector<L1MuGMTReadoutRecord> m_Records;
438  //L1MuGMTReadoutCollection(int nbx) { m_Records.reserve(nbx); };
439  //L1MuGMTExtendedCand(unsigned data, unsigned rank, int bx=0) : L1MuGMTCand (data, bx), m_rank(rank) {}
440  if (verbose())
441  std::cout << "L1DummyProducer::SimpleDigi<L1MuGMTReadoutCollection> end.\n" << std::flush;
442 }

References gather_cfg::cout, data, EBase_, ESigm_, PVValHelper::eta, mps_fire::i, createfilelist::int, nevt_, EgHLTOffHistBins_cfi::nr, phi, L1MuGMTReadoutRecord::setBxInEvent(), L1MuGMTReadoutRecord::setBxNr(), L1MuGMTReadoutRecord::setEvNr(), L1MuGMTReadoutRecord::setGMTBrlCand(), L1MuGMTReadoutRecord::setGMTCand(), L1MuGMTReadoutRecord::setGMTFwdCand(), L1MuGMTReadoutRecord::setInputCand(), L1MuGMTReadoutRecord::setMIPbit(), L1MuGMTReadoutRecord::setQuietbit(), SimpleDigi(), and verbose().

◆ SimpleDigi() [16/16]

template<>
void L1DummyProducer::SimpleDigi ( CLHEP::HepRandomEngine *  engine,
std::unique_ptr< L1MuRegionalCandCollection > &  data,
int  type 
)
inline

Definition at line 231 of file L1DummyProducer.h.

233  {
234  if (verbose())
235  std::cout << "L1DummyProducer::SimpleDigi<L1MuRegionalCandCollection>....\n" << std::flush;
236  //typedef std::vector<L1MuRegionalCand> L1MuRegionalCandCollection;
237  assert(type >= 0 && type < 4);
238  unsigned type_idx = type; //tType: 0 DT, 1 bRPC, 2 CSC, 3 fRPC
239  int bx = 0;
240  unsigned phi, eta, pt, charge, ch_valid, finehalo, quality;
241  float phiv(0.), etav(0.), ptv(0.); //linear translation? 0.2pi,-2.5..2.5,0..100
242  for (int i = 0; i < 4; i++) {
243  phi = (int)(144 * engine->flat()); //8bits, 0..143
244  eta = (int)(63 * engine->flat()); //6bits code
245  phiv = phi * 2 * TMath::Pi() / 144.;
246  etav = 2.5 * (-1 + 2 * eta / 63.);
247  pt = ((int)(32 * engine->flat())) & 0x1f; //5bits: 0..31
248  ptv = 100 * (pt / 31.);
249  charge = (engine->flat() > 0.5 ? 0 : 1);
250  ;
251  ch_valid = 0;
252  finehalo = 0;
253  quality = (int)(8 * engine->flat()); //3bits: 0..7
254  L1MuRegionalCand cand(type_idx, phi, eta, pt, charge, ch_valid, finehalo, quality, bx);
255  cand.setPhiValue(phiv);
256  cand.setEtaValue(etav);
257  cand.setPtValue(ptv);
258  data->push_back(cand);
259  }
260  //L1MuRegionalCand(unsigned type_idx, unsigned phi, unsigned eta, unsigned pt,
261  //unsigned charge, unsigned ch_valid, unsigned finehalo, unsigned quality, int bx);
262  if (verbose())
263  std::cout << "L1DummyProducer::SimpleDigi<L1MuRegionalCandCollection> end.\n" << std::flush;
264 }

References cms::cuda::assert(), simKBmtfDigis_cfi::bx, ALCARECOTkAlJpsiMuMu_cff::charge, gather_cfg::cout, data, PVValHelper::eta, mps_fire::i, createfilelist::int, phi, Pi, DiDispStaMuonMonitor_cfi::pt, qcdUeDQM_cfi::quality, and verbose().

◆ verbose()

int L1DummyProducer::verbose ( )
inlineprivate

Definition at line 54 of file L1DummyProducer.h.

54 { return verbose_; }

References verbose_.

Referenced by SimpleDigi().

Member Data Documentation

◆ EBase_

double L1DummyProducer::EBase_
private

Definition at line 60 of file L1DummyProducer.h.

Referenced by SimpleDigi().

◆ ESigm_

double L1DummyProducer::ESigm_
private

Definition at line 61 of file L1DummyProducer.h.

Referenced by SimpleDigi().

◆ instName

std::string L1DummyProducer::instName[dedefs::DEnsys][5]
private

Definition at line 58 of file L1DummyProducer.h.

◆ m_doSys

bool L1DummyProducer::m_doSys[dedefs::DEnsys]
private

Definition at line 57 of file L1DummyProducer.h.

◆ nevt_

int L1DummyProducer::nevt_
private

Definition at line 55 of file L1DummyProducer.h.

Referenced by SimpleDigi().

◆ verbose_

int L1DummyProducer::verbose_
private

Definition at line 53 of file L1DummyProducer.h.

Referenced by verbose().

dedefs::HTP
Definition: DEtrait.h:40
L1DummyProducer::SimpleDigi
void SimpleDigi(CLHEP::HepRandomEngine *, std::unique_ptr< T > &data, int type=0)
Definition: L1DummyProducer.h:65
L1MuRegionalCand::bx
int bx() const
return bunch crossing identifier
Definition: L1MuRegionalCand.h:79
dedefs::SystLabel
const std::string SystLabel[DEnsys]
Definition: DEtrait.h:42
edm::RandomNumberGenerator::getEngine
virtual CLHEP::HepRandomEngine & getEngine(StreamID const &)=0
Use this engine in event methods.
L1MuRegionalCand::setPtValue
void setPtValue(float ptVal)
Set Pt Value.
Definition: L1MuRegionalCand.h:148
PDWG_EXOHSCP_cff.tracks
tracks
Definition: PDWG_EXOHSCP_cff.py:28
mps_fire.i
i
Definition: mps_fire.py:355
L1MuRegionalCand::etaValue
float etaValue() const
get eta-value of muon candidate
Definition: L1MuRegionalCand.cc:87
L1GctJetCand
Level-1 Trigger jet candidate.
Definition: L1GctJetCand.h:17
L1CSCTrack
std::pair< csc::L1Track, CSCCorrelatedLCTDigiCollection > L1CSCTrack
Definition: L1CSCTrackCollection.h:7
L1CaloRegion
A calorimeter trigger region (sum of 4x4 trigger towers)
Definition: L1CaloRegion.h:21
dedefs::RPC
Definition: DEtrait.h:40
L1MuGMTCandCollection
std::vector< L1MuGMTCand > L1MuGMTCandCollection
Definition: DEtrait.h:99
DiDispStaMuonMonitor_cfi.pt
pt
Definition: DiDispStaMuonMonitor_cfi.py:39
HcalTriggerPrimitiveSample
Definition: HcalTriggerPrimitiveSample.h:11
L1GctJetCandCollection
std::vector< L1GctJetCand > L1GctJetCandCollection
Definition: L1GctCollections.h:31
gather_cfg.cout
cout
Definition: gather_cfg.py:144
L1MuRegionalCand::setPhiValue
void setPhiValue(float phiVal)
Set Phi Value.
Definition: L1MuRegionalCand.h:145
dedefs::CTP
Definition: DEtrait.h:40
emtf::MAX_ENDCAP
constexpr int MAX_ENDCAP
Definition: Common.h:46
L1GctEmCand
Level-1 Trigger EM candidate at output of GCT.
Definition: L1GctEmCand.h:21
cms::cuda::assert
assert(be >=bs)
edm::SortedCollection
Definition: SortedCollection.h:49
L1DummyProducer::ESigm_
double ESigm_
Definition: L1DummyProducer.h:61
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
L1DummyProducer::nevt_
int nevt_
Definition: L1DummyProducer.h:55
EcalTrigTowerDetId
Definition: EcalTrigTowerDetId.h:14
L1CSCTrackCollection
std::vector< L1CSCTrack > L1CSCTrackCollection
Definition: L1CSCTrackCollection.h:8
edm::Service::isAvailable
bool isAvailable() const
Definition: Service.h:40
L1MuGMTCand
Definition: L1MuGMTCand.h:39
L1GlobalTriggerReadoutRecord
Definition: L1GlobalTriggerReadoutRecord.h:46
EcalBarrel
Definition: EcalSubdetector.h:10
L1MuDTChambPhContainer
Definition: L1MuDTChambPhContainer.h:33
dedefs::DTP
Definition: DEtrait.h:40
L1DummyProducer::verbose_
int verbose_
Definition: L1DummyProducer.h:53
L1MuDTTrackCand
Definition: L1MuDTTrackCand.h:33
LEDCalibrationChannels.iphi
iphi
Definition: LEDCalibrationChannels.py:64
simKBmtfDigis_cfi.bx
bx
Definition: simKBmtfDigis_cfi.py:55
L1MuRegionalCand::getDataWord
unsigned getDataWord() const
return data word
Definition: L1MuRegionalCand.h:107
L1MuRegionalCand::setBx
void setBx(int bx)
Set Bunch Crossing.
Definition: L1MuRegionalCand.h:117
testProducerWithPsetDescEmpty_cfi.x1
x1
Definition: testProducerWithPsetDescEmpty_cfi.py:33
L1MuRegionalCand::setEtaValue
void setEtaValue(float etaVal)
Set Eta Value (need to set type, first)
Definition: L1MuRegionalCand.h:151
L1CaloEmCollection
std::vector< L1CaloEmCand > L1CaloEmCollection
Definition: L1CaloCollections.h:10
L1MuGMTReadoutRecord
Definition: L1MuGMTReadoutRecord.h:44
L1GlobalTriggerEvmReadoutRecord
Definition: L1GlobalTriggerEvmReadoutRecord.h:36
dedefs::GCT
Definition: DEtrait.h:40
PVValHelper::eta
Definition: PVValidationHelpers.h:69
emtf::MIN_ENDCAP
constexpr int MIN_ENDCAP
Definition: Common.h:45
L1MuRegionalCand::phiValue
float phiValue() const
get phi-value of muon candidate in radians (low edge of bin)
Definition: L1MuRegionalCand.cc:80
GMT
Definition: L1GtDefinitions.h:27
L1MuRegionalCand
Definition: L1MuRegionalCand.h:26
dedefs::ETP
Definition: DEtrait.h:40
HCALHighEnergyHPDFilter_cfi.energy
energy
Definition: HCALHighEnergyHPDFilter_cfi.py:5
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
ALCARECOTkAlJpsiMuMu_cff.charge
charge
Definition: ALCARECOTkAlJpsiMuMu_cff.py:47
LTCDigiCollection
std::vector< LTCDigi > LTCDigiCollection
Definition: LTCDigi.h:91
LEDCalibrationChannels.ieta
ieta
Definition: LEDCalibrationChannels.py:63
HcalTriggerPrimitiveDigi
Definition: HcalTriggerPrimitiveDigi.h:13
EgHLTOffHistBins_cfi.nr
nr
Definition: EgHLTOffHistBins_cfi.py:4
L1Track
TTTrack< Ref_Phase2TrackerDigi_ > L1Track
Definition: L1Track.h:8
dedefs::GLT
Definition: DEtrait.h:40
L1GlobalTriggerObjectMapRecord
Definition: L1GlobalTriggerObjectMapRecord.h:29
dedefs::DTF
Definition: DEtrait.h:40
L1MuRegionalCand::setDataWord
void setDataWord(unsigned dataword)
Set data word.
Definition: L1MuRegionalCand.h:166
CSCDetId
Definition: CSCDetId.h:26
cand
Definition: decayParser.h:34
edm::Service< edm::RandomNumberGenerator >
createfilelist.int
int
Definition: createfilelist.py:10
iEvent
int iEvent
Definition: GenABIO.cc:224
dedefs::LTC
Definition: DEtrait.h:40
EgHLTOffHistBins_cfi.et
et
Definition: EgHLTOffHistBins_cfi.py:8
CSCCorrelatedLCTDigi::clear
void clear()
clear this LCT
Definition: CSCCorrelatedLCTDigi.cc:50
CSCCorrelatedLCTDigiCollection
alignCSCRings.r
r
Definition: alignCSCRings.py:93
dedefs::DEnsys
const int DEnsys
Definition: DEtrait.h:38
DDAxes::phi
L1MuGMTReadoutCollection
Definition: L1MuGMTReadoutCollection.h:39
type
type
Definition: HCALResponse.h:21
eostools.move
def move(src, dest)
Definition: eostools.py:511
L1CaloRegionCollection
std::vector< L1CaloRegion > L1CaloRegionCollection
Definition: L1CaloCollections.h:11
L1DummyProducer::EBase_
double EBase_
Definition: L1DummyProducer.h:60
qcdUeDQM_cfi.quality
quality
Definition: qcdUeDQM_cfi.py:31
L1GctEmCandCollection
std::vector< L1GctEmCand > L1GctEmCandCollection
Definition: L1GctCollections.h:30
L1MuDTChambThDigi
Definition: L1MuDTChambThDigi.h:33
EcalTriggerPrimitiveDigi
Definition: EcalTriggerPrimitiveDigi.h:16
relativeConstraints.empty
bool empty
Definition: relativeConstraints.py:46
Exception
Definition: hltDiff.cc:246
HLT_2018_cff.region
region
Definition: HLT_2018_cff.py:81479
L1DummyProducer::instName
std::string instName[dedefs::DEnsys][5]
Definition: L1DummyProducer.h:58
csc::L1Track
Definition: L1Track.h:21
L1MuRegionalCandCollection
std::vector< L1MuRegionalCand > L1MuRegionalCandCollection
Definition: RPCRecHitFilter.cc:53
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
Pi
const double Pi
Definition: CosmicMuonParameters.h:18
EcalTriggerPrimitiveSample
Definition: EcalTriggerPrimitiveSample.h:12
reco::isTau
bool isTau(const Candidate &part)
Definition: pdgIdUtils.h:11
L1MuDTTrackContainer
Definition: L1MuDTTrackContainer.h:33
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
L1DummyProducer::verbose
int verbose()
Definition: L1DummyProducer.h:54
L1MuRegionalCand::ptValue
float ptValue() const
get pt-value of muon candidate in GeV
Definition: L1MuRegionalCand.cc:94
L1CaloEmCand
Level-1 Region Calorimeter Trigger EM candidate.
Definition: L1CaloEmCand.h:17
L1MuDTChambThContainer
Definition: L1MuDTChambThContainer.h:33
dedefs::RCT
Definition: DEtrait.h:40
dedefs::CTF
Definition: DEtrait.h:40
CSCCorrelatedLCTDigi
Definition: CSCCorrelatedLCTDigi.h:19
L1MuDTChambPhDigi
Definition: L1MuDTChambPhDigi.h:31
HcalTrigTowerDetId
Definition: HcalTrigTowerDetId.h:14
L1DummyProducer::m_doSys
bool m_doSys[dedefs::DEnsys]
Definition: L1DummyProducer.h:57