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::global::EDProducer<> edm::global::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 L1DummyProducer (const edm::ParameterSet &)
 
template<class T >
void SimpleDigi (int nevt, CLHEP::HepRandomEngine *, std::unique_ptr< T > &data, int type=0) const
 
template<>
void SimpleDigi (int, CLHEP::HepRandomEngine *engine, std::unique_ptr< EcalTrigPrimDigiCollection > &data, int type) const
 
template<>
void SimpleDigi (int, CLHEP::HepRandomEngine *engine, std::unique_ptr< HcalTrigPrimDigiCollection > &data, int type) const
 
template<>
void SimpleDigi (int nevt, CLHEP::HepRandomEngine *engine, std::unique_ptr< L1CaloEmCollection > &data, int type) const
 
template<>
void SimpleDigi (int, CLHEP::HepRandomEngine *engine, std::unique_ptr< L1CaloRegionCollection > &data, int type) const
 
template<>
void SimpleDigi (int, CLHEP::HepRandomEngine *engine, std::unique_ptr< L1GctEmCandCollection > &data, int type) const
 
template<>
void SimpleDigi (int, CLHEP::HepRandomEngine *engine, std::unique_ptr< L1GctJetCandCollection > &data, int type) const
 
template<>
void SimpleDigi (int, CLHEP::HepRandomEngine *engine, std::unique_ptr< L1MuRegionalCandCollection > &data, int type) const
 
template<>
void SimpleDigi (int nevt, CLHEP::HepRandomEngine *engine, std::unique_ptr< L1MuDTTrackContainer > &data, int type) const
 
template<>
void SimpleDigi (int, CLHEP::HepRandomEngine *engine, std::unique_ptr< L1MuDTChambPhContainer > &data, int type) const
 
template<>
void SimpleDigi (int, CLHEP::HepRandomEngine *engine, std::unique_ptr< L1MuDTChambThContainer > &data, int type) const
 
template<>
void SimpleDigi (int nevt, CLHEP::HepRandomEngine *engine, std::unique_ptr< L1MuGMTCandCollection > &data, int type) const
 
template<>
void SimpleDigi (int nevt, CLHEP::HepRandomEngine *engine, std::unique_ptr< L1MuGMTReadoutCollection > &data, int type) const
 
template<>
void SimpleDigi (int, CLHEP::HepRandomEngine *, std::unique_ptr< LTCDigiCollection > &data, int type) const
 
template<>
void SimpleDigi (int, CLHEP::HepRandomEngine *engine, std::unique_ptr< CSCCorrelatedLCTDigiCollection > &data, int type) const
 
template<>
void SimpleDigi (int nevt, CLHEP::HepRandomEngine *engine, std::unique_ptr< L1CSCTrackCollection > &data, int type) const
 
 ~L1DummyProducer () 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
 
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)
 

Private Member Functions

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

Private Attributes

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

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
 
- Static Public Member Functions inherited from edm::global::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- 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 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.

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, dqmiolumiharvest::j, dedefs::LTC, dedefs::RCT, dedefs::RPC, AlCaHLTBitMon_QueryRunRegistry::string, dedefs::SystLabel, and verbose.

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 }
bool m_doSys[dedefs::DEnsys]
const int DEnsys
Definition: DEtrait.h:38
assert(be >=bs)
std::atomic< int > nevt_
T getUntrackedParameter(std::string const &, T const &) const
std::string instName[dedefs::DEnsys][5]
const std::string SystLabel[DEnsys]
Definition: DEtrait.h:42
int verbose() const

◆ ~L1DummyProducer()

L1DummyProducer::~L1DummyProducer ( )
override

Definition at line 139 of file L1DummyProducer.cc.

139 {}

Member Function Documentation

◆ produce()

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

define the data collections

fill candidate collections

put collection

Implements edm::global::EDProducerBase.

Definition at line 141 of file L1DummyProducer.cc.

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(), nevt, dedefs::RCT, dedefs::RPC, and verbose.

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 
174  int nevt = nevt_++;
176  if (m_doSys[ETP])
177  SimpleDigi(nevt, engine, ecal_tp_data);
178  if (m_doSys[HTP])
179  SimpleDigi(nevt, engine, hcal_tp_data);
180  if (m_doSys[RCT])
181  SimpleDigi(nevt, engine, rct_em_data);
182  if (m_doSys[RCT])
183  SimpleDigi(nevt, engine, rct_rgn_data);
184  if (m_doSys[GCT])
185  SimpleDigi(nevt, engine, gct_isolaem_data, 0);
186  if (m_doSys[GCT])
187  SimpleDigi(nevt, engine, gct_noisoem_data, 1);
188  if (m_doSys[GCT])
189  SimpleDigi(nevt, engine, gct_cenjets_data, 0);
190  if (m_doSys[GCT])
191  SimpleDigi(nevt, engine, gct_forjets_data, 1);
192  if (m_doSys[GCT])
193  SimpleDigi(nevt, engine, gct_taujets_data, 2);
194  if (m_doSys[DTP])
195  SimpleDigi(nevt, engine, dtp_ph_data);
196  if (m_doSys[DTP])
197  SimpleDigi(nevt, engine, dtp_th_data);
198  if (m_doSys[DTF])
199  SimpleDigi(nevt, engine, dtf_data, 0);
200  if (m_doSys[DTF])
201  SimpleDigi(nevt, engine, dtf_trk_data);
202  if (m_doSys[CTP])
203  SimpleDigi(nevt, engine, ctp_data);
204  if (m_doSys[CTF])
205  SimpleDigi(nevt, engine, ctf_data, 2);
206  if (m_doSys[CTF])
207  SimpleDigi(nevt, engine, ctf_trk_data);
208  if (m_doSys[RPC])
209  SimpleDigi(nevt, engine, rpc_cen_data, 1);
210  if (m_doSys[RPC])
211  SimpleDigi(nevt, engine, rpc_for_data, 3);
212  if (m_doSys[LTC])
213  SimpleDigi(nevt, engine, ltc_data);
214  if (m_doSys[GMT])
215  SimpleDigi(nevt, engine, gmt_data);
216  if (m_doSys[GMT])
217  SimpleDigi(nevt, engine, gmt_rdt_data);
218  if (m_doSys[GLT])
219  SimpleDigi(nevt, engine, glt_rdt_data);
220  if (m_doSys[GLT])
221  SimpleDigi(nevt, engine, glt_evm_data);
222  if (m_doSys[GLT])
223  SimpleDigi(nevt, engine, glt_obj_data);
224 
226  if (m_doSys[ETP])
227  iEvent.put(std::move(ecal_tp_data), instName[ETP][0]);
228  if (m_doSys[HTP])
229  iEvent.put(std::move(hcal_tp_data), instName[HTP][0]);
230  if (m_doSys[RCT])
231  iEvent.put(std::move(rct_em_data), instName[RCT][0]);
232  if (m_doSys[RCT])
233  iEvent.put(std::move(rct_rgn_data), instName[RCT][0]);
234  if (m_doSys[GCT])
235  iEvent.put(std::move(gct_isolaem_data), instName[GCT][0]);
236  if (m_doSys[GCT])
237  iEvent.put(std::move(gct_noisoem_data), instName[GCT][1]);
238  if (m_doSys[GCT])
239  iEvent.put(std::move(gct_cenjets_data), instName[GCT][2]);
240  if (m_doSys[GCT])
241  iEvent.put(std::move(gct_forjets_data), instName[GCT][3]);
242  if (m_doSys[GCT])
243  iEvent.put(std::move(gct_taujets_data), instName[GCT][4]);
244  if (m_doSys[DTP])
245  iEvent.put(std::move(dtp_ph_data), instName[DTP][0]);
246  if (m_doSys[DTP])
247  iEvent.put(std::move(dtp_th_data), instName[DTP][0]);
248  if (m_doSys[DTF])
249  iEvent.put(std::move(dtf_data), instName[DTF][0]);
250  if (m_doSys[DTF])
251  iEvent.put(std::move(dtf_trk_data), instName[DTF][1]);
252  if (m_doSys[CTP])
253  iEvent.put(std::move(ctp_data), instName[CTP][0]);
254  if (m_doSys[CTF])
255  iEvent.put(std::move(ctf_data), instName[CTF][0]);
256  if (m_doSys[CTF])
257  iEvent.put(std::move(ctf_trk_data), instName[CTF][1]);
258  if (m_doSys[RPC])
259  iEvent.put(std::move(rpc_cen_data), instName[RPC][0]);
260  if (m_doSys[RPC])
261  iEvent.put(std::move(rpc_for_data), instName[RPC][1]);
262  if (m_doSys[LTC])
263  iEvent.put(std::move(ltc_data), instName[LTC][0]);
264  if (m_doSys[GMT])
265  iEvent.put(std::move(gmt_data), instName[GMT][0]);
266  if (m_doSys[GMT])
267  iEvent.put(std::move(gmt_rdt_data), instName[GMT][0]);
268  if (m_doSys[GLT])
269  iEvent.put(std::move(glt_rdt_data), instName[GLT][0]);
270  if (m_doSys[GLT])
271  iEvent.put(std::move(glt_evm_data), instName[GLT][0]);
272  if (m_doSys[GLT])
273  iEvent.put(std::move(glt_obj_data), instName[GLT][0]);
274 
275  if (verbose())
276  std::cout << "L1DummyProducer::produce end.\n" << std::flush;
277 }
std::vector< L1CaloEmCand > L1CaloEmCollection
bool m_doSys[dedefs::DEnsys]
std::vector< L1CSCTrack > L1CSCTrackCollection
virtual CLHEP::HepRandomEngine & getEngine(StreamID const &)=0
Use this engine in event methods.
std::atomic< int > nevt_
std::vector< L1GctJetCand > L1GctJetCandCollection
int iEvent
Definition: GenABIO.cc:224
std::string instName[dedefs::DEnsys][5]
std::vector< LTCDigi > LTCDigiCollection
Definition: LTCDigi.h:91
std::vector< L1MuRegionalCand > L1MuRegionalCandCollection
void SimpleDigi(int nevt, CLHEP::HepRandomEngine *, std::unique_ptr< T > &data, int type=0) const
std::vector< L1CaloRegion > L1CaloRegionCollection
int verbose() const
def move(src, dest)
Definition: eostools.py:511
std::vector< L1MuGMTCand > L1MuGMTCandCollection
Definition: DEtrait.h:99
std::vector< L1GctEmCand > L1GctEmCandCollection

◆ SimpleDigi() [1/16]

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

Definition at line 66 of file L1DummyProducer.h.

Referenced by SimpleDigi().

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

◆ SimpleDigi() [2/16]

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

Definition at line 71 of file L1DummyProducer.h.

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

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

◆ SimpleDigi() [3/16]

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

Definition at line 96 of file L1DummyProducer.h.

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

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

◆ SimpleDigi() [4/16]

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

Definition at line 119 of file L1DummyProducer.h.

References nano_mu_digi_cff::bx, gather_cfg::cout, data, EBase_, hcalRecHitTable_cff::energy, ESigm_, createfilelist::int, nevt, nano_mu_digi_cff::region, and verbose().

122  {
123  if (verbose())
124  std::cout << "L1DummyProducer::SimpleDigi<L1CaloEmCollection>....\n" << std::flush;
125  int energy = (int)(EBase_ + ESigm_ * CLHEP::RandGaussQ::shoot(engine));
126  unsigned rank = energy & 0x3f;
127  unsigned region = (engine->flat() > 0.5 ? 0 : 1);
128  unsigned card = (unsigned)(7 * engine->flat());
129  unsigned crate = (unsigned)(18 * engine->flat());
130  bool iso = (engine->flat() > 0.4);
131  uint16_t index = (unsigned)(4 * engine->flat());
132  int16_t bx = nevt;
133  L1CaloEmCand cand(rank, region, card, crate, iso, index, bx);
134  data->push_back(cand);
135  //L1CaloEmCand(unsigned rank, unsigned region, unsigned card, unsigned crate, bool iso, uint16_t index, int16_t bx);
136  if (verbose())
137  std::cout << "L1DummyProducer::SimpleDigi<L1CaloEmCollection> end.\n" << std::flush;
138 }
Level-1 Region Calorimeter Trigger EM candidate.
Definition: L1CaloEmCand.h:17
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80
int verbose() const

◆ SimpleDigi() [5/16]

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

Definition at line 141 of file L1DummyProducer.h.

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

144  {
145  if (verbose())
146  std::cout << "L1DummyProducer::SimpleDigi<L1CaloRegionCollection>....\n" << std::flush;
147  int energy = (int)(EBase_ + ESigm_ * CLHEP::RandGaussQ::shoot(engine));
148  unsigned et = energy & 0x3ff;
149  bool overFlow = false; //(engine->flat()>0.4);
150  bool tauVeto = false; //(engine->flat()>0.3);
151  bool mip = false; //(engine->flat()>0.1);
152  bool quiet = false; //(engine->flat()>0.6);
153  unsigned crate = (unsigned)(18 * engine->flat());
154  unsigned card = (unsigned)(7 * engine->flat());
155  unsigned rgn = crate % 2; //(engine->flat()>0.5?0:1);
156  L1CaloRegion cand(et, overFlow, tauVeto, mip, quiet, crate, card, rgn);
157  data->push_back(cand);
158  //L1CaloRegion(unsigned et, bool overFlow, bool tauVeto, bool mip, bool quiet, unsigned crate, unsigned card, unsigned rgn);
159  if (verbose())
160  std::cout << "L1DummyProducer::SimpleDigi<L1CaloRegionCollection> end.\n" << std::flush;
161 }
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80
A calorimeter trigger region (sum of 4x4 trigger towers)
Definition: L1CaloRegion.h:21
int verbose() const

◆ SimpleDigi() [6/16]

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

Definition at line 164 of file L1DummyProducer.h.

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

167  {
168  if (verbose())
169  std::cout << "L1DummyProducer::SimpleDigi<L1GctEmCandCollection>....\n" << std::flush;
170  bool iso; //= type==0;
171  switch (type) { // 0 iso, 1 noniso
172  case 0:
173  iso = true;
174  break;
175  case 1:
176  iso = false;
177  break;
178  default:
179  throw cms::Exception("L1DummyProducerInvalidType")
180  << "L1DummyProducer::SimpleDigi production of L1GctEmCandCollection "
181  << " invalid type: " << type << std::endl;
182  }
183  int energy = (int)(EBase_ + ESigm_ * CLHEP::RandGaussQ::shoot(engine));
184  unsigned rank = energy & 0x3f;
185  unsigned phi = (unsigned)(18 * engine->flat());
186  unsigned eta = (unsigned)(7 * engine->flat());
187  if (engine->flat() > 0.5) //-z (eta sign)
188  eta = (eta & 0x7) + (0x1 << 3);
189  L1GctEmCand cand(rank, phi, eta, iso);
190  data->push_back(cand);
191  // eta = -6 to -0, +0 to +6. Sign is bit 3, 1 means -ve Z, 0 means +ve Z
192  //L1GctEmCand(unsigned rank, unsigned phi, unsigned eta, bool iso);
193  if (verbose())
194  std::cout << "L1DummyProducer::SimpleDigi<L1GctEmCandCollection> end.\n" << std::flush;
195 }
Level-1 Trigger EM candidate at output of GCT.
Definition: L1GctEmCand.h:21
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80
int verbose() const

◆ SimpleDigi() [7/16]

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

Definition at line 198 of file L1DummyProducer.h.

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

201  {
202  if (verbose())
203  std::cout << "L1DummyProducer::SimpleDigi<L1GctJetCandCollection>....\n" << std::flush;
204  bool isFor, isTau;
205  switch (type) { // 0 cen, 1 for, 2 tau
206  case 0:
207  isFor = false;
208  isTau = false;
209  break;
210  case 1:
211  isFor = true;
212  isTau = false;
213  break;
214  case 2:
215  isFor = false;
216  isTau = true;
217  break;
218  default:
219  throw cms::Exception("L1DummyProducerInvalidType")
220  << "L1DummyProducer::SimpleDigi production of L1GctJetCandCollection "
221  << " invalid type: " << type << std::endl;
222  }
223 
224  int energy = (int)(EBase_ + ESigm_ * CLHEP::RandGaussQ::shoot(engine));
225  unsigned rank = energy & 0x3f;
226  unsigned phi = (unsigned)(18 * engine->flat());
227  unsigned eta = (unsigned)(7 * engine->flat());
228  if (engine->flat() > 0.5) //-z (eta sign)
229  eta = (eta & 0x7) + (0x1 << 3);
230  L1GctJetCand cand(rank, phi, eta, isTau, isFor);
231  data->push_back(cand);
232  //L1GctJetCand(unsigned rank, unsigned phi, unsigned eta, bool isTau, bool isFor);
233  if (verbose())
234  std::cout << "L1DummyProducer::SimpleDigi<L1GctJetCandCollection> end.\n" << std::flush;
235 }
Level-1 Trigger jet candidate.
Definition: L1GctJetCand.h:17
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80
int verbose() const
bool isTau(const Candidate &part)
Definition: pdgIdUtils.h:11

◆ SimpleDigi() [8/16]

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

Definition at line 238 of file L1DummyProducer.h.

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

241  {
242  if (verbose())
243  std::cout << "L1DummyProducer::SimpleDigi<L1MuRegionalCandCollection>....\n" << std::flush;
244  //typedef std::vector<L1MuRegionalCand> L1MuRegionalCandCollection;
245  assert(type >= 0 && type < 4);
246  unsigned type_idx = type; //tType: 0 DT, 1 bRPC, 2 CSC, 3 fRPC
247  int bx = 0;
248  unsigned phi, eta, pt, charge, ch_valid, finehalo, quality;
249  float phiv(0.), etav(0.), ptv(0.); //linear translation? 0.2pi,-2.5..2.5,0..100
250  for (int i = 0; i < 4; i++) {
251  phi = (int)(144 * engine->flat()); //8bits, 0..143
252  eta = (int)(63 * engine->flat()); //6bits code
253  phiv = phi * 2 * TMath::Pi() / 144.;
254  etav = 2.5 * (-1 + 2 * eta / 63.);
255  pt = ((int)(32 * engine->flat())) & 0x1f; //5bits: 0..31
256  ptv = 100 * (pt / 31.);
257  charge = (engine->flat() > 0.5 ? 0 : 1);
258  ;
259  ch_valid = 0;
260  finehalo = 0;
261  quality = (int)(8 * engine->flat()); //3bits: 0..7
262  L1MuRegionalCand cand(type_idx, phi, eta, pt, charge, ch_valid, finehalo, quality, bx);
263  cand.setPhiValue(phiv);
264  cand.setEtaValue(etav);
265  cand.setPtValue(ptv);
266  data->push_back(cand);
267  }
268  //L1MuRegionalCand(unsigned type_idx, unsigned phi, unsigned eta, unsigned pt,
269  //unsigned charge, unsigned ch_valid, unsigned finehalo, unsigned quality, int bx);
270  if (verbose())
271  std::cout << "L1DummyProducer::SimpleDigi<L1MuRegionalCandCollection> end.\n" << std::flush;
272 }
const double Pi
assert(be >=bs)
string quality
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80
int verbose() const

◆ SimpleDigi() [9/16]

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

Definition at line 275 of file L1DummyProducer.h.

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

278  {
279  assert(type == 0);
280  int type_idx = type; //choose data type: 0 DT, 1 bRPC, 2 CSC, 3 fRPC
281  if (verbose())
282  std::cout << "L1DummyProducer::SimpleDigi<L1MuDTTrackContainer>....\n" << std::flush;
283  std::unique_ptr<L1MuRegionalCandCollection> tracks(new L1MuRegionalCandCollection());
284  SimpleDigi(nevt, engine, tracks, type_idx);
285  typedef std::vector<L1MuDTTrackCand> L1MuDTTrackCandCollection;
286  std::unique_ptr<L1MuDTTrackCandCollection> tracksd(new L1MuDTTrackCandCollection());
287  for (L1MuRegionalCandCollection::const_iterator it = tracks->begin(); it != tracks->end(); it++) {
288  L1MuDTTrackCand* cnd = new L1MuDTTrackCand();
289  cnd->setDataWord(it->getDataWord());
290  cnd->setBx(it->bx());
291  tracksd->push_back(L1MuDTTrackCand());
292  tracksd->push_back(*cnd);
293  }
294  data->setContainer(*tracksd);
295  if (verbose())
296  std::cout << "L1DummyProducer::SimpleDigi<L1MuDTTrackContainer> end.\n" << std::flush;
297  //L1MuDTTrackCand( unsigned dataword, int bx, int uwh, int usc, int utag,
298  // int adr1, int adr2, int adr3, int adr4, int utc );
299 }
assert(be >=bs)
void setBx(int bx)
Set Bunch Crossing.
void setDataWord(unsigned dataword)
Set data word.
std::vector< L1MuRegionalCand > L1MuRegionalCandCollection
void SimpleDigi(int nevt, CLHEP::HepRandomEngine *, std::unique_ptr< T > &data, int type=0) const
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80
int verbose() const

◆ SimpleDigi() [10/16]

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

Definition at line 302 of file L1DummyProducer.h.

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

305  {
306  if (verbose())
307  std::cout << "L1DummyProducer::SimpleDigi<L1MuDTChambPhContainer>....\n" << std::flush;
308  typedef std::vector<L1MuDTChambPhDigi> Phi_Container;
309  int ntrk = 4;
310  Phi_Container tracks(ntrk);
311  int ubx, uwh, usc, ust, uphr, uphb, uqua, utag, ucnt;
312  for (int i = 0; i < ntrk; i++) {
313  ubx = 0; //bxNum() - bx
314  uwh = 0; //whNum() - wheel
315  usc = 0; //scNum() - sector
316  ust = 0; //stNum() - station
317  uphr = 0; //phi() - radialAngle
318  uphb = 0; //phiB() - bendingAngle
319  uqua = 0; //code() - qualityCode
320  utag = 0; //Ts2Tag() - Ts2TagCode
321  ucnt = 0; //BxCnt() - BxCntCode
322  uwh = (int)(-2 + 5 * engine->flat());
323  usc = (int)(12 * engine->flat());
324  ust = (int)(1. + 4 * engine->flat());
325  uqua = (int)(8 * engine->flat());
326  L1MuDTChambPhDigi cand(ubx, uwh, usc, ust, uphr, uphb, uqua, utag, ucnt);
327  tracks.push_back(cand);
328  }
329  data->setContainer(tracks);
330  //L1MuDTChambPhDigi( int ubx, int uwh, int usc, int ust,
331  // int uphr, int uphb, int uqua, int utag, int ucnt );
332  if (verbose())
333  std::cout << "L1DummyProducer::SimpleDigi<L1MuDTChambPhContainer> end.\n" << std::flush;
334 }
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80
int verbose() const

◆ SimpleDigi() [11/16]

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

Definition at line 337 of file L1DummyProducer.h.

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

340  {
341  if (verbose())
342  std::cout << "L1DummyProducer::SimpleDigi<L1MuDTChambThContainer>....\n" << std::flush;
343  typedef std::vector<L1MuDTChambThDigi> The_Container;
344  int ntrk = 4;
345  The_Container tracks(ntrk);
346  int ubx, uwh, usc, ust, uos[7], uqa[7];
347  for (int i = 0; i < ntrk; i++) {
348  ubx = 0;
349  uwh = (int)(-2 + 5 * engine->flat());
350  usc = (int)(12 * engine->flat());
351  ust = (int)(1. + 4 * engine->flat());
352  for (int j = 0; j < 7; j++) {
353  uos[j] = (engine->flat() > 0.5 ? 0 : 1);
354  uqa[j] = (engine->flat() > 0.5 ? 0 : 1);
355  }
356  L1MuDTChambThDigi cand(ubx, uwh, usc, ust, uos, uqa);
357  tracks.push_back(cand);
358  }
359  data->setContainer(tracks);
360  //L1MuDTChambThDigi( int ubx, int uwh, int usc, int ust,
361  // int* uos, [int* uqual] );
362  //"DataFormats/L1DTTrackFinder/interface/L1MuDTChambThContainer.h"
363  if (verbose())
364  std::cout << "L1DummyProducer::SimpleDigi<L1MuDTChambThContainer> end.\n" << std::flush;
365 }
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80
int verbose() const

◆ SimpleDigi() [12/16]

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

Definition at line 368 of file L1DummyProducer.h.

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

371  {
372  if (verbose())
373  std::cout << "L1DummyProducer::SimpleDigi<L1MuGMTCandCollection>....\n" << std::flush;
374  //typedef std::vector<L1MuGMTCand> L1MuGMTCandCollection;
375  L1MuGMTCand cand(0, nevt);
376  //cand.setPhiPacked();//8bits
377  //cand.setPtPacked ();//5bits
378  //cand.setQuality ();//3bits
379  //cand.setEtaPacked();//6bits
380  //cand.setIsolation();//1bit
381  //cand.setMIP ();//1bit
382  //cand.setChargePacked();//0:+, 1:-, 2:undef, 3:sync
383  //cand.setBx (nevt);
384  //set physical values
385  double eng = EBase_ + ESigm_ * CLHEP::RandGaussQ::shoot(engine);
386  double phi = 2 * TMath::Pi() * engine->flat();
387  double eta = 2.5 * (-1 + 2 * engine->flat());
388  cand.setPtValue(eng);
389  cand.setPhiValue(phi);
390  cand.setEtaValue(eta);
391  unsigned engp = (unsigned)(EBase_ + ESigm_ * CLHEP::RandGaussQ::shoot(engine));
392  unsigned phip = (unsigned)(255 * engine->flat());
393  unsigned etap = (unsigned)(63 * engine->flat());
394  cand.setPtPacked(engp & 0x1f);
395  cand.setPhiPacked(phip & 0x7f);
396  cand.setEtaPacked(etap & 0x3f);
397  double r = engine->flat();
398  cand.setIsolation(r > 0.2);
399  cand.setMIP(r > 0.7);
400  cand.setChargePacked(r > 0.5 ? 0 : 1);
401  cand.setBx(0);
402  data->push_back(cand);
403  if (verbose())
404  std::cout << "L1DummyProducer::SimpleDigi<L1MuGMTCandCollection> end.\n" << std::flush;
405 }
const double Pi
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80
int verbose() const

◆ SimpleDigi() [13/16]

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

tbd: add GMT extended cand(!)

Definition at line 408 of file L1DummyProducer.h.

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().

411  {
412  if (verbose())
413  std::cout << "L1DummyProducer::SimpleDigi<L1MuGMTReadoutCollection>....\n" << std::flush;
414  L1MuGMTReadoutRecord rec(0);
415  int bxn = nevt;
416  rec.setBxNr(bxn);
417  rec.setEvNr(bxn);
418  rec.setBxInEvent(0);
419  std::unique_ptr<L1MuRegionalCandCollection> trks_dttf(new L1MuRegionalCandCollection);
420  std::unique_ptr<L1MuRegionalCandCollection> trks_rpcb(new L1MuRegionalCandCollection);
421  std::unique_ptr<L1MuRegionalCandCollection> trks_csc(new L1MuRegionalCandCollection);
422  std::unique_ptr<L1MuRegionalCandCollection> trks_rpcf(new L1MuRegionalCandCollection);
423  SimpleDigi(nevt, engine, trks_dttf, 0);
424  SimpleDigi(nevt, engine, trks_rpcb, 1);
425  SimpleDigi(nevt, engine, trks_csc, 2);
426  SimpleDigi(nevt, engine, trks_rpcf, 3);
427  for (int i = 0; i < 4; i++) {
428  rec.setInputCand(i, trks_dttf->at(i)); //dt : 0..3
429  rec.setInputCand(i + 4, trks_rpcb->at(i)); //rpcb: 4..7
430  rec.setInputCand(i + 8, trks_csc->at(i)); //csc : 8..11
431  rec.setInputCand(i + 12, trks_rpcf->at(i)); //rpcf:12..15
432  }
433  for (int nr = 0; nr < 4; nr++) {
434  int eng = (int)(EBase_ + ESigm_ * CLHEP::RandGaussQ::shoot(engine));
435  rec.setGMTBrlCand(nr, eng & 0x11, eng & 0x11); //set GMT barrel candidate
436  rec.setGMTFwdCand(nr, eng & 0x11, eng & 0x11); //set GMT forward candidate
437  rec.setGMTCand(nr, eng & 0x11); //set GMT candidate (does not store rank)
438  int eta = (int)(14 * engine->flat()); //0..13
439  int phi = (int)(18 * engine->flat()); //0..17
440  rec.setMIPbit(eta, phi);
441  rec.setQuietbit(eta, phi);
442  }
443  data->addRecord(rec);
445  //rec.setBCERR(int bcerr);
446  //rec.setGMTBrlCand(int nr, L1MuGMTExtendedCand const& cand);
447  //rec.setGMTFwdCand(int nr, L1MuGMTExtendedCand const& cand);
448  //rec.setGMTCand (int nr, L1MuGMTExtendedCand const& cand);
449  //rec.setInputCand (int nr, L1MuRegionalCand const& cand);
450  //L1MuGMTReadoutCollection :: std::vector<L1MuGMTReadoutRecord> m_Records;
451  //L1MuGMTReadoutCollection(int nbx) { m_Records.reserve(nbx); };
452  //L1MuGMTExtendedCand(unsigned data, unsigned rank, int bx=0) : L1MuGMTCand (data, bx), m_rank(rank) {}
453  if (verbose())
454  std::cout << "L1DummyProducer::SimpleDigi<L1MuGMTReadoutCollection> end.\n" << std::flush;
455 }
std::vector< L1MuRegionalCand > L1MuRegionalCandCollection
void SimpleDigi(int nevt, CLHEP::HepRandomEngine *, std::unique_ptr< T > &data, int type=0) const
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80
int verbose() const

◆ SimpleDigi() [14/16]

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

Definition at line 458 of file L1DummyProducer.h.

References gather_cfg::cout, and verbose().

461  {
462  if (verbose())
463  std::cout << "L1DummyProducer::SimpleDigi<LTCDigiCollection>....\n" << std::flush;
464  //LTCs are FED id 816-823
465  /*
466  6 64-bit words
467  uint64_t *ld = (uint64_t*)data;
468 
469  word0: 59:56 4 bit ld[0]>>56 & 0xf trigType
470  55:32 24 bit ld[0]>>32 & 0x00ffffff eventID
471  31:20 12 bit ld[0]>>20 & 0xfff bunchNumber
472  19: 8 12 bit ld[0]>> 8 & 0x00000fff sourceID (816-823?)
473 
474  word1: 63:32 32 bit ld[1]>>32 & 0xffffffff orbitNumber
475  31:24 8 bit ld[1]>>24 & 0xff versionNumber
476  3: 0 4 bit ld[1 & 0xf daqPartition
477 
478  word2: 63:32 32 bit ld[0]>>32 & 0xffffffff runNumber
479  31: 0 32 bit ld[0] & 0xffffffff eventNumber
480 
481  word3: 63:32 32 bit ld[3]>>32 & 0xffffffff trigInhibitNumber
482  31: 0 32 bit ld[3] & 0xffffffff trigInputStat
483 
484  word4: 63:0 64 bit ld[4] bstGpsTime
485 
486  word5: (empty)
487  */
488  //need to make up something meaningfull to produce here..
489  //LTCDigi(const unsigned char* data);
490  if (verbose())
491  std::cout << "L1DummyProducer::SimpleDigi<LTCDigiCollection> end.\n" << std::flush;
492 }
int verbose() const

◆ SimpleDigi() [15/16]

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

Definition at line 495 of file L1DummyProducer.h.

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

498  {
499  if (verbose())
500  std::cout << "L1DummyProducer::SimpleDigi<CSCCorrelatedLCTDigiCollection>....\n" << std::flush;
501  //typedef MuonDigiCollection<CSCDetId,CSCCorrelatedLCTDigi> CSCCorrelatedLCTDigiCollection;
502  //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);
504  //tbd: set non-trivial random values
505  dg.clear(); // set contents to zero
506  //CSCDetId( int iendcap, int istation, int iring, int ichamber, int ilayer = 0 );
507  enum eMinNum { MIN_ENDCAP = 1, MIN_STATION = 1, MIN_RING = 1, MIN_CHAMBER = 1, MIN_LAYER = 1 };
508  enum eMaxNum { MAX_ENDCAP = 2, MAX_STATION = 4, MAX_RING = 4, MAX_CHAMBER = 36, MAX_LAYER = 6 };
509  float rnd = engine->flat();
510  int ec = (int)(MIN_ENDCAP + (MAX_ENDCAP - MIN_ENDCAP) * rnd + 1);
511  int st = (int)(MIN_STATION + (MAX_STATION - MIN_STATION) * rnd + 1);
512  int rg = (int)(MIN_RING + (MAX_RING - MIN_RING) * rnd + 1);
513  int ch = (int)(MIN_CHAMBER + (MAX_CHAMBER - MIN_CHAMBER) * rnd + 1);
514  int lr = (int)(MIN_LAYER + (MAX_LAYER - MIN_LAYER) * rnd + 1);
515  CSCDetId did = CSCDetId(ec, st, rg, ch, lr);
516  //CSCDetId did = CSCDetId(); //DetId(DetId::Muon, MuonSubdetId::CSC)
517  //MuonDigiCollection::insertDigi(const IndexType& index, const DigiType& digi)
518  data->insertDigi(did, dg);
519  if (verbose())
520  std::cout << "L1DummyProducer::SimpleDigi<CSCCorrelatedLCTDigiCollection> end.\n" << std::flush;
521 }
constexpr int MIN_ENDCAP
Definition: Common.h:45
constexpr int MAX_ENDCAP
Definition: Common.h:46
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80
void clear()
clear this LCT
int verbose() const

◆ SimpleDigi() [16/16]

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

Definition at line 524 of file L1DummyProducer.h.

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

527  {
528  if (verbose())
529  std::cout << "L1DummyProducer::SimpleDigi<L1CSCTrackCollection>...\n" << std::flush;
530  std::unique_ptr<CSCCorrelatedLCTDigiCollection> dgcoll(new CSCCorrelatedLCTDigiCollection);
531  SimpleDigi(nevt, engine, dgcoll, 0);
532  csc::L1Track l1trk = csc::L1Track();
533  std::unique_ptr<L1MuRegionalCandCollection> regcoll(new L1MuRegionalCandCollection);
534  SimpleDigi(nevt, engine, regcoll, 2);
535  L1MuRegionalCand regcand = *(regcoll->begin());
536  l1trk.setDataWord(regcand.getDataWord());
537  l1trk.setBx(regcand.bx());
538  l1trk.setPhiValue(regcand.phiValue());
539  l1trk.setEtaValue(regcand.etaValue());
540  l1trk.setPtValue(regcand.ptValue());
541  L1CSCTrack l1csctrk = std::make_pair(l1trk, *dgcoll);
542  data->push_back(l1csctrk);
543  //typedef std::vector<L1CSCTrack> L1CSCTrackCollection;
544  //typedef std::pair<csc::L1Track,CSCCorrelatedLCTDigiCollection> L1CSCTrack;
545  //L1Track() : L1MuRegionalCand(), m_name("csc::L1Track") { setType(2); setPtPacked(0); }
546  //L1MuRegionalCand(unsigned dataword = 0, int bx = 0);
547  if (verbose())
548  std::cout << "L1DummyProducer::SimpleDigi<L1CSCTrackCollection> end.\n" << std::flush;
549 }
std::pair< csc::L1Track, CSCCorrelatedLCTDigiCollection > L1CSCTrack
unsigned getDataWord() const
return data word
void setPtValue(float ptVal)
Set Pt Value.
float phiValue() const
get phi-value of muon candidate in radians (low edge of bin)
void setBx(int bx)
Set Bunch Crossing.
void setPhiValue(float phiVal)
Set Phi Value.
void setDataWord(unsigned dataword)
Set data word.
void setEtaValue(float etaVal)
Set Eta Value (need to set type, first)
std::vector< L1MuRegionalCand > L1MuRegionalCandCollection
TTTrack< Ref_Phase2TrackerDigi_ > L1Track
Definition: L1Track.h:8
void SimpleDigi(int nevt, CLHEP::HepRandomEngine *, std::unique_ptr< T > &data, int type=0) const
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80
float ptValue() const
get pt-value of muon candidate in GeV
float etaValue() const
get eta-value of muon candidate
int verbose() const
int bx() const
return bunch crossing identifier

◆ verbose()

int L1DummyProducer::verbose ( ) const
inlineprivate

Definition at line 55 of file L1DummyProducer.h.

References verbose_.

Referenced by SimpleDigi().

55 { return verbose_; }

Member Data Documentation

◆ EBase_

double L1DummyProducer::EBase_
private

Definition at line 61 of file L1DummyProducer.h.

Referenced by SimpleDigi().

◆ ESigm_

double L1DummyProducer::ESigm_
private

Definition at line 62 of file L1DummyProducer.h.

Referenced by SimpleDigi().

◆ instName

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

Definition at line 59 of file L1DummyProducer.h.

◆ m_doSys

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

Definition at line 58 of file L1DummyProducer.h.

◆ nevt_

std::atomic<int> L1DummyProducer::nevt_
mutableprivate

Definition at line 56 of file L1DummyProducer.h.

◆ verbose_

int L1DummyProducer::verbose_
private

Definition at line 54 of file L1DummyProducer.h.

Referenced by verbose().