CMS 3D CMS Logo

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

#include <L1EmulBias.h>

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

Public Member Functions

 L1EmulBias (const edm::ParameterSet &)
 
template<class T >
void ModifyCollection (std::unique_ptr< T > &data, const edm::Handle< T > emul, CLHEP::HepRandomEngine *)
 
template<>
void ModifyCollection (std::unique_ptr< EcalTrigPrimDigiCollection > &data, const edm::Handle< EcalTrigPrimDigiCollection > emul, CLHEP::HepRandomEngine *)
 
template<>
void ModifyCollection (std::unique_ptr< HcalTrigPrimDigiCollection > &data, const edm::Handle< HcalTrigPrimDigiCollection > emul, CLHEP::HepRandomEngine *)
 
template<>
void ModifyCollection (std::unique_ptr< L1CaloEmCollection > &data, const edm::Handle< L1CaloEmCollection > emul, CLHEP::HepRandomEngine *engine)
 
template<>
void ModifyCollection (std::unique_ptr< L1CaloRegionCollection > &data, const edm::Handle< L1CaloRegionCollection > emul, CLHEP::HepRandomEngine *engine)
 
template<>
void ModifyCollection (std::unique_ptr< L1GctEmCandCollection > &data, const edm::Handle< L1GctEmCandCollection > emul, CLHEP::HepRandomEngine *engine)
 
template<>
void ModifyCollection (std::unique_ptr< L1GctJetCandCollection > &data, const edm::Handle< L1GctJetCandCollection > emul, CLHEP::HepRandomEngine *engine)
 
template<>
void ModifyCollection (std::unique_ptr< L1MuRegionalCandCollection > &data, const edm::Handle< L1MuRegionalCandCollection > emul, CLHEP::HepRandomEngine *engine)
 
template<>
void ModifyCollection (std::unique_ptr< L1MuDTTrackContainer > &data, const edm::Handle< L1MuDTTrackContainer > emul, CLHEP::HepRandomEngine *engine)
 
template<>
void ModifyCollection (std::unique_ptr< L1MuDTChambPhContainer > &data, const edm::Handle< L1MuDTChambPhContainer > emul, CLHEP::HepRandomEngine *engine)
 
template<>
void ModifyCollection (std::unique_ptr< L1MuDTChambThContainer > &data, const edm::Handle< L1MuDTChambThContainer > emul, CLHEP::HepRandomEngine *)
 
template<>
void ModifyCollection (std::unique_ptr< LTCDigiCollection > &data, const edm::Handle< LTCDigiCollection > emul, CLHEP::HepRandomEngine *)
 
template<>
void ModifyCollection (std::unique_ptr< L1MuGMTCandCollection > &data, const edm::Handle< L1MuGMTCandCollection > emul, CLHEP::HepRandomEngine *)
 
template<>
void ModifyCollection (std::unique_ptr< L1MuGMTReadoutCollection > &data, const edm::Handle< L1MuGMTReadoutCollection > emul, CLHEP::HepRandomEngine *)
 
template<>
void ModifyCollection (std::unique_ptr< CSCCorrelatedLCTDigiCollection > &data, const edm::Handle< CSCCorrelatedLCTDigiCollection > emul, CLHEP::HepRandomEngine *)
 
template<>
void ModifyCollection (std::unique_ptr< L1CSCTrackCollection > &data, const edm::Handle< L1CSCTrackCollection > emul, CLHEP::HepRandomEngine *)
 
 ~L1EmulBias () 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 const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const *> *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const *> const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Protected Member Functions

void beginJob (void) override
 
void endJob (void) override
 
void produce (edm::Event &, const edm::EventSetup &) override
 
- Protected Member Functions inherited from edm::ProducerBase
template<Transition Tr = Transition::Event>
auto produces (std::string instanceName) noexcept
 declare what type of product will make and with which optional label More...
 
template<Transition B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<BranchType B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
template<Transition Tr = Transition::Event>
auto produces () noexcept
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
void resetItemsToGetFrom (BranchType iType)
 

Private Member Functions

int verbose ()
 

Private Attributes

std::string instName [dedefs::DEnsys][5]
 
edm::InputTag m_DEsource [dedefs::DEnsys][2]
 
bool m_doSys [dedefs::DEnsys]
 
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 wantsInputProcessBlocks ()
 
static bool wantsProcessBlocks ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 

Detailed Description

Definition at line 37 of file L1EmulBias.h.

Constructor & Destructor Documentation

◆ L1EmulBias()

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

assertion/temporary

List of collections to be produced

Definition at line 9 of file L1EmulBias.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::getParameter(), edm::ParameterSet::getUntrackedParameter(), dedefs::GLT, dedefs::GMT, dedefs::HTP, mps_fire::i, dqmiolumiharvest::j, label, dedefs::LTC, dedefs::RCT, dedefs::RPC, AlCaHLTBitMon_QueryRunRegistry::string, dedefs::SystLabel, and verbose.

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

◆ ~L1EmulBias()

L1EmulBias::~L1EmulBias ( )
override

Definition at line 139 of file L1EmulBias.cc.

139 {}

Member Function Documentation

◆ beginJob()

void L1EmulBias::beginJob ( void  )
inlineoverrideprotectedvirtual

Reimplemented from edm::EDProducer.

Definition at line 43 of file L1EmulBias.h.

43 {};

◆ endJob()

void L1EmulBias::endJob ( void  )
inlineoverrideprotectedvirtual

Reimplemented from edm::EDProducer.

Definition at line 46 of file L1EmulBias.h.

46 {};

◆ ModifyCollection() [1/16]

template<class T >
void L1EmulBias::ModifyCollection ( std::unique_ptr< T > &  data,
const edm::Handle< T emul,
CLHEP::HepRandomEngine *   
)

Definition at line 68 of file L1EmulBias.h.

References data, and L1TdeGEMTPG_cfi::emul.

68  {
69  data = (std::unique_ptr<T>)(const_cast<T*>(emul.product()));
70 }
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79

◆ ModifyCollection() [2/16]

template<>
void L1EmulBias::ModifyCollection ( std::unique_ptr< EcalTrigPrimDigiCollection > &  data,
const edm::Handle< EcalTrigPrimDigiCollection emul,
CLHEP::HepRandomEngine *   
)
inline

Definition at line 73 of file L1EmulBias.h.

References cuy::col, gather_cfg::cout, data, TauDecayModes::dec, L1TdeGEMTPG_cfi::emul, LEDCalibrationChannels::iphi, reset(), alignCSCRings::s, ecalGpuTask_cfi::sample, createJobs::tmp, and verbose().

75  {
77  for (col_cit it = emul->begin(); it != emul->end(); it++) {
79  int iphi = it->id().iphi();
80  bool reset = (iphi > 18 && iphi < 39); //remove few supermodules
81  for (int s = 0; s < 5; s++) {
82  uint16_t sample = it->sample(s).raw();
83  if (sample == 0)
84  continue;
85  uint16_t tmp = reset ? 0 : sample;
86  if (reset)
87  tmp = sample >> 1;
88  col.setSampleValue(s, tmp);
89  if (verbose() && sample != 0)
90  std::cout << "[emulbias] etp " << *it << "\t sample: " << s << " " << std::hex << sample << " -> "
91  << col.sample(s).raw() << std::dec << std::endl;
92  }
93  data->push_back(col);
94  }
95 }
std::vector< T >::const_iterator const_iterator
int verbose()
Definition: L1EmulBias.h:54
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
col
Definition: cuy.py:1009
tmp
align.sh
Definition: createJobs.py:716
void reset(double vett[256])
Definition: TPedValues.cc:11

◆ ModifyCollection() [3/16]

template<>
void L1EmulBias::ModifyCollection ( std::unique_ptr< HcalTrigPrimDigiCollection > &  data,
const edm::Handle< HcalTrigPrimDigiCollection emul,
CLHEP::HepRandomEngine *   
)
inline

Definition at line 98 of file L1EmulBias.h.

References cuy::col, data, L1TdeGEMTPG_cfi::emul, LEDCalibrationChannels::iphi, reset(), alignCSCRings::s, ecalGpuTask_cfi::sample, and createJobs::tmp.

100  {
102  for (col_cit it = emul->begin(); it != emul->end(); it++) {
104  int iphi = it->id().iphi();
105  bool reset = (iphi > 18 && iphi < 27); //remove few supermodules
106  for (int s = 0; s < 5; s++) {
107  uint16_t sample = it->sample(s).raw();
108  if (sample == 0)
109  continue;
110  uint16_t tmp = reset ? 0 : sample;
111  if (reset)
112  tmp = sample >> 1;
113  col.setSample(s, tmp);
114  }
115  data->push_back(col);
116  }
117 }
std::vector< T >::const_iterator const_iterator
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
col
Definition: cuy.py:1009
tmp
align.sh
Definition: createJobs.py:716
void reset(double vett[256])
Definition: TPedValues.cc:11

◆ ModifyCollection() [4/16]

template<>
void L1EmulBias::ModifyCollection ( std::unique_ptr< L1CaloEmCollection > &  data,
const edm::Handle< L1CaloEmCollection emul,
CLHEP::HepRandomEngine *  engine 
)
inline

Definition at line 120 of file L1EmulBias.h.

References data, and L1TdeGEMTPG_cfi::emul.

122  {
123  typedef L1CaloEmCollection::const_iterator col_cit;
124  for (col_cit it = emul->begin(); it != emul->end(); it++) {
125  unsigned crate = it->rctCrate();
126  unsigned raw = it->raw();
127  bool iso = it->isolated();
128  unsigned rdata = raw;
129  if (crate < 4 * engine->flat())
130  rdata = raw >> 1;
131  L1CaloEmCand cand(rdata, crate, iso, it->index(), it->bx(), false);
132  data->push_back(cand);
133  }
134  //L1CaloEmCand(uint16_t data, unsigned crate, bool iso);
135  //L1CaloEmCand(uint16_t data, unsigned crate, bool iso, uint16_t index, int16_t bx, bool dummy);
136 }
Level-1 Region Calorimeter Trigger EM candidate.
Definition: L1CaloEmCand.h:17
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79

◆ ModifyCollection() [5/16]

template<>
void L1EmulBias::ModifyCollection ( std::unique_ptr< L1CaloRegionCollection > &  data,
const edm::Handle< L1CaloRegionCollection emul,
CLHEP::HepRandomEngine *  engine 
)
inline

Definition at line 139 of file L1EmulBias.h.

References data, and L1TdeGEMTPG_cfi::emul.

141  {
142  typedef L1CaloRegionCollection::const_iterator col_cit;
143  for (col_cit it = emul->begin(); it != emul->end(); it++) {
144  unsigned crate = it->rctCrate();
145  unsigned raw = it->et();
146  uint16_t rdata = raw;
147  if (crate < 4 * engine->flat())
148  rdata = raw >> 1;
149  L1CaloRegion cand(rdata, it->gctEta(), it->gctPhi(), it->bx());
150  data->push_back(cand);
151  }
152  //L1CaloRegion(uint16_t data, unsigned ieta, unsigned iphi, int16_t bx);
153  //Note: raw data accessor missing in dataformats!
154 }
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
A calorimeter trigger region (sum of 4x4 trigger towers)
Definition: L1CaloRegion.h:21

◆ ModifyCollection() [6/16]

template<>
void L1EmulBias::ModifyCollection ( std::unique_ptr< L1GctEmCandCollection > &  data,
const edm::Handle< L1GctEmCandCollection emul,
CLHEP::HepRandomEngine *  engine 
)
inline

Definition at line 157 of file L1EmulBias.h.

References data, and L1TdeGEMTPG_cfi::emul.

159  {
160  typedef L1GctEmCandCollection::const_iterator col_cit;
161  for (col_cit it = emul->begin(); it != emul->end(); it++) {
162  unsigned raw = it->raw();
163  uint16_t rdata = raw;
164  if (it->phiIndex() < 4 * engine->flat()) //0-17
165  rdata = raw >> 1;
166  L1GctEmCand cand(rdata, it->isolated());
167  data->push_back(cand);
168  }
169  //etaIndex(), etaSign() : -6 to -0, +0 to +6
170  //L1GctEmCand(uint16_t data, bool iso);
171 }
Level-1 Trigger EM candidate at output of GCT.
Definition: L1GctEmCand.h:21
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79

◆ ModifyCollection() [7/16]

template<>
void L1EmulBias::ModifyCollection ( std::unique_ptr< L1GctJetCandCollection > &  data,
const edm::Handle< L1GctJetCandCollection emul,
CLHEP::HepRandomEngine *  engine 
)
inline

Definition at line 174 of file L1EmulBias.h.

References data, and L1TdeGEMTPG_cfi::emul.

176  {
177  typedef L1GctJetCandCollection::const_iterator col_cit;
178  for (col_cit it = emul->begin(); it != emul->end(); it++) {
179  unsigned raw = it->raw();
180  uint16_t rdata = raw;
181  if (it->phiIndex() < 4 * engine->flat()) //0-17
182  rdata = raw >> 1;
183  L1GctJetCand cand(rdata, it->isTau(), it->isForward());
184  data->push_back(cand);
185  }
186  //L1GctJetCand(uint16_t data, bool isTau, bool isFor);
187 }
Level-1 Trigger jet candidate.
Definition: L1GctJetCand.h:17
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79

◆ ModifyCollection() [8/16]

template<>
void L1EmulBias::ModifyCollection ( std::unique_ptr< L1MuRegionalCandCollection > &  data,
const edm::Handle< L1MuRegionalCandCollection emul,
CLHEP::HepRandomEngine *  engine 
)
inline

Definition at line 190 of file L1EmulBias.h.

References data, L1TdeGEMTPG_cfi::emul, and phi.

192  {
193  typedef L1MuRegionalCandCollection::const_iterator col_cit;
194  for (col_cit it = emul->begin(); it != emul->end(); it++) {
195  L1MuRegionalCand cand(*it);
196  //unsigned raw = it->getDataWord();
197  unsigned phi = it->phi_packed();
198  if (phi > 90 && phi < 110)
199  cand.setPtPacked((it->pt_packed()) >> 1);
200  //raw = (raw>>2);
201  //L1MuRegionalCand cand(raw);
202  //cand.setType(it->type_idx());
203  data->push_back(cand);
204  }
205  /* few alternatives...
206  unsigned pt= it->pt_packed(); //0..31
207  unsigned int qua = it->quality(); //0..7
208  if(qua<4){cand.setPtPacked((pt>>2)&0x1f);cand.setQualityPacked((qua<<1)&0x07);}
209  double rnd = CLHEP::RandGaussQ::shoot(engine);
210  if(rnd>0.7) {
211  raw_=(raw>>1);
212  cand.setDataWord(raw_);
213  } else if (rnd>0.3) {
214  pt_ *= (int)(1+0.3*engine->flat());
215  cand.setPtPacked(pt_);
216  } else
217  cand.reset();
218  unsigned raw = it->getDataWord();
219  if(2.5<fabs(it->phiValue())<3.0)
220  rdata = raw>>1;
221  L1MuRegionalCand cand(rdata,it->bx());
222  */
223  //L1MuRegionalCand(unsigned dataword = 0, int bx = 0);
224  //L1MuRegionalCand(unsigned type_idx, unsigned phi, unsigned eta, unsigned pt, unsigned charge, unsigned ch_valid, unsigned finehalo, unsigned quality, int bx);
225 }
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79

◆ ModifyCollection() [9/16]

template<>
void L1EmulBias::ModifyCollection ( std::unique_ptr< L1MuDTTrackContainer > &  data,
const edm::Handle< L1MuDTTrackContainer emul,
CLHEP::HepRandomEngine *  engine 
)
inline

Definition at line 228 of file L1EmulBias.h.

References data, L1TdeGEMTPG_cfi::emul, DiDispStaMuonMonitor_cfi::pt, and tracks.

230  {
231  typedef std::vector<L1MuDTTrackCand> TrackContainer;
232  typedef TrackContainer::const_iterator col_cit;
233  TrackContainer const* tracks_in = emul->getContainer();
235  for (col_cit it = tracks_in->begin(); it != tracks_in->end(); it++) {
236  L1MuDTTrackCand cand(*it);
237  cand.setType(it->type_idx());
238  unsigned pt = it->pt_packed(); //0..31
239  unsigned qua = it->quality(); //0..7
240  if (qua < 4) {
241  cand.setPtPacked((pt >> 2) & 0x1f);
242  cand.setQualityPacked((qua << 1) & 0x07);
243  }
244  tracks.push_back(cand);
245  }
246  data->setContainer(tracks);
247  /* few alternatives...
248  unsigned phip = it->phi_packed();
249  unsigned raw = it->getDataWord();
250  uint16_t rdata = raw;
251  if(2.5<fabs(it->phiValue())<3.0)
252  rdata = raw>>1;
253  L1MuRegionalCand cand(rdata,it->bx());
254  double rnd = engine->flat();
255  */
256 }
std::vector< TrackWithHistory * > TrackContainer
Definition: TrackContainer.h:8
auto const & tracks
cannot be loose
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79

◆ ModifyCollection() [10/16]

template<>
void L1EmulBias::ModifyCollection ( std::unique_ptr< L1MuDTChambPhContainer > &  data,
const edm::Handle< L1MuDTChambPhContainer emul,
CLHEP::HepRandomEngine *  engine 
)
inline

Definition at line 259 of file L1EmulBias.h.

References data, L1TdeGEMTPG_cfi::emul, and tracks.

261  {
262  typedef std::vector<L1MuDTChambPhDigi> Phi_Container;
263  typedef Phi_Container::const_iterator col_it;
264  Phi_Container const* tracks_in = emul->getContainer();
265  Phi_Container tracks(tracks_in->size());
266  int uqua;
267  for (col_it it = tracks_in->begin(); it != tracks_in->end(); it++) {
268  uqua = it->code(); // (int)(10*engine->flat());
269  uqua = (uqua < 2 ? uqua + 1 : uqua);
271  it->bxNum(), it->whNum(), it->scNum(), it->stNum(), it->phi(), it->phiB(), uqua, it->Ts2Tag(), it->BxCnt());
272  tracks.push_back(cand);
273  }
274  data->setContainer(tracks);
275 }
auto const & tracks
cannot be loose
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79

◆ ModifyCollection() [11/16]

template<>
void L1EmulBias::ModifyCollection ( std::unique_ptr< L1MuDTChambThContainer > &  data,
const edm::Handle< L1MuDTChambThContainer emul,
CLHEP::HepRandomEngine *   
)
inline

Definition at line 278 of file L1EmulBias.h.

References data, L1TdeGEMTPG_cfi::emul, dqmiolumiharvest::j, and tracks.

280  {
281  typedef std::vector<L1MuDTChambThDigi> Thi_Container;
282  typedef Thi_Container::const_iterator col_cit;
283  Thi_Container const* tracks_in = emul->getContainer();
284  Thi_Container tracks(tracks_in->size());
285  int uos[7], uqa[7];
286  for (col_cit it = tracks_in->begin(); it != tracks_in->end(); it++) {
287  for (int j = 0; j < 7; j++) {
288  uos[j] = (it->position(j) ? 0 : 1);
289  uqa[j] = (it->quality(j) ? 0 : 1);
290  }
291  int stnum = it->stNum();
292  stnum = (stnum > 2 ? stnum - 1 : stnum);
293  L1MuDTChambThDigi cand(it->bxNum(), it->whNum(), it->scNum(), stnum, uos, uqa);
294  tracks.push_back(cand);
295  }
296  data->setContainer(tracks);
297 }
auto const & tracks
cannot be loose
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79

◆ ModifyCollection() [12/16]

template<>
void L1EmulBias::ModifyCollection ( std::unique_ptr< LTCDigiCollection > &  data,
const edm::Handle< LTCDigiCollection emul,
CLHEP::HepRandomEngine *   
)
inline

Definition at line 300 of file L1EmulBias.h.

References data, and L1TdeGEMTPG_cfi::emul.

302  {
303  typedef std::vector<LTCDigi>::const_iterator col_cit;
304  for (col_cit it = emul->begin(); it != emul->end(); it++) {
305  data->push_back(*it);
306  //note: raw data accessor missing in dataformats!
307  //data->push_back(LTCDigi(it->data()>>1));
308  }
309 }
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79

◆ ModifyCollection() [13/16]

template<>
void L1EmulBias::ModifyCollection ( std::unique_ptr< L1MuGMTCandCollection > &  data,
const edm::Handle< L1MuGMTCandCollection emul,
CLHEP::HepRandomEngine *   
)
inline

Definition at line 312 of file L1EmulBias.h.

References data, and L1TdeGEMTPG_cfi::emul.

314  {
315  //typedef std::vector<L1MuGMTCand> L1MuGMTCandCollection;
316  typedef std::vector<L1MuGMTCand>::const_iterator col_cit;
317  for (col_cit it = emul->begin(); it != emul->end(); it++) {
318  float phiv = it->phiValue();
319  unsigned dword = it->getDataWord();
320  if (phiv > 2. && phiv < 4.)
321  dword = dword >> 2;
322  L1MuGMTCand cand(dword, it->bx());
323  data->push_back(cand);
324  //cand.setPtPacked(cand.ptIndex()>>1);
325  //data->push_back(L1MuGMTCand((it->getDataWord()>>1),it->bx()));
326  }
327 }
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79

◆ ModifyCollection() [14/16]

template<>
void L1EmulBias::ModifyCollection ( std::unique_ptr< L1MuGMTReadoutCollection > &  data,
const edm::Handle< L1MuGMTReadoutCollection emul,
CLHEP::HepRandomEngine *   
)
inline

Definition at line 330 of file L1EmulBias.h.

References cuy::col, data, L1TdeGEMTPG_cfi::emul, mps_fire::i, and L1MuGMTReadoutRecord::setBxNr().

332  {
333  typedef std::vector<L1MuGMTReadoutRecord>::const_iterator col_cit;
334  std::vector<L1MuGMTReadoutRecord> col = emul->getRecords();
335  for (col_cit it = col.begin(); it != col.end(); it++) {
336  L1MuGMTReadoutRecord rec(it->getBxInEvent());
337  rec.setBxNr(it->getBxNr());
338  rec.setEvNr(it->getEvNr());
339  rec.setBCERR(it->getBCERR());
340 
341  std::unique_ptr<L1MuRegionalCandCollection> new_dttf(new L1MuRegionalCandCollection);
342  std::unique_ptr<L1MuRegionalCandCollection> new_rpcb(new L1MuRegionalCandCollection);
343  std::unique_ptr<L1MuRegionalCandCollection> new_csc(new L1MuRegionalCandCollection);
344  std::unique_ptr<L1MuRegionalCandCollection> new_rpcf(new L1MuRegionalCandCollection);
345 
346  L1MuRegionalCandCollection old_dttf = it->getDTBXCands();
347  L1MuRegionalCandCollection old_rpcb = it->getBrlRPCCands();
348  L1MuRegionalCandCollection old_csc = it->getCSCCands();
349  L1MuRegionalCandCollection old_rpcf = it->getFwdRPCCands();
350 
351  typedef L1MuRegionalCandCollection::const_iterator ait;
352  for (ait it = old_dttf.begin(); it != old_dttf.end(); it++) {
353  L1MuRegionalCand cand(*it);
354  if (it->quality() < 4)
355  cand.setPtPacked((it->pt_packed() >> 2) & 0x1f);
356  cand.setType(it->type_idx());
357  new_dttf->push_back(cand);
358  }
359  for (ait it = old_rpcb.begin(); it != old_rpcb.end(); it++) {
360  L1MuRegionalCand cand(*it);
361  if (it->quality() < 4)
362  cand.setPtPacked((it->pt_packed() >> 2) & 0x1f);
363  cand.setType(it->type_idx());
364  new_rpcb->push_back(cand);
365  }
366  for (ait it = old_csc.begin(); it != old_csc.end(); it++) {
367  L1MuRegionalCand cand(*it);
368  if (it->quality() < 4)
369  cand.setPtPacked((it->pt_packed() >> 2) & 0x1f);
370  cand.setType(it->type_idx());
371  new_csc->push_back(cand);
372  }
373  for (ait it = old_rpcf.begin(); it != old_rpcf.end(); it++) {
374  L1MuRegionalCand cand(*it);
375  if (it->quality() < 4)
376  cand.setPtPacked((it->pt_packed() >> 2) & 0x1f);
377  cand.setType(it->type_idx());
378  new_rpcf->push_back(cand);
379  }
380 
381  for (unsigned i = 0; i < old_dttf.size(); i++)
382  rec.setInputCand(i, new_dttf->at(i)); //dt : 0..3
383  for (unsigned i = 0; i < old_rpcb.size(); i++)
384  rec.setInputCand(i + 4, new_rpcb->at(i)); //rpcb: 4..7
385  for (unsigned i = 0; i < old_csc.size(); i++)
386  rec.setInputCand(i + 8, new_csc->at(i)); //csc : 8..11
387  for (unsigned i = 0; i < old_rpcf.size(); i++)
388  rec.setInputCand(i + 12, new_rpcf->at(i)); //rpcf:12..15
389 
390  data->addRecord(rec);
391  }
392  //void addRecord(L1MuGMTReadoutRecord const& rec) {
393 }
std::vector< L1MuRegionalCand > L1MuRegionalCandCollection
void setBxNr(int bxnr)
set counters
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
col
Definition: cuy.py:1009

◆ ModifyCollection() [15/16]

template<>
void L1EmulBias::ModifyCollection ( std::unique_ptr< CSCCorrelatedLCTDigiCollection > &  data,
const edm::Handle< CSCCorrelatedLCTDigiCollection emul,
CLHEP::HepRandomEngine *   
)
inline

modify digi

append digi

Definition at line 396 of file L1EmulBias.h.

References data, L1TdeGEMTPG_cfi::emul, CSCCorrelatedLCTDigi::getTrknmb(), and CSCCorrelatedLCTDigi::setTrknmb().

398  {
399  //typedef MuonDigiCollection<CSCDetId,CSCCorrelatedLCTDigi> CSCCorrelatedLCTDigiCollection;
400  typedef CSCCorrelatedLCTDigiCollection::DigiRangeIterator mapIt; //map iterator
401  typedef CSCCorrelatedLCTDigiCollection::const_iterator vecIt; //vec iterator
402  //loop over data (map<idx,vec_digi>)
403  for (mapIt mit = emul->begin(); mit != emul->end(); mit++) {
404  //get detector index
405  CSCDetId did = (*mit).first;
406  //get vec_digi range(pair) corresponding to idx of map
407  //CSCCorrelatedLCTDigiCollection::Range ctpRange = emul->get(did)
408  //loop over digi vector (ie between begin and end pointers in range)
409  //for (vecIt vit = ctpRange.first; vit != ctpRange.second; vit++) {
410  for (vecIt vit = emul->get((*mit).first).first; vit != emul->get((*mit).first).second; vit++) {
412  CSCCorrelatedLCTDigi dg = *vit;
413  //dg.clear;
414  uint16_t tn = dg.getTrknmb();
415  if (tn == 2)
416  tn--;
417  dg.setTrknmb(tn);
418  //dg.setTrknmb (dg.getTrknmb ());
419  //dg.setMPCLink (dg.getMPCLink ());
420  //dg.setWireGroup(dg.getWireGroup());
422  data->insertDigi(did, dg);
423  }
424  }
425 }
uint16_t getTrknmb() const
return track number
std::vector< DigiType >::const_iterator const_iterator
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
void setTrknmb(const uint16_t number)
Set track number (1,2) after sorting LCTs.

◆ ModifyCollection() [16/16]

template<>
void L1EmulBias::ModifyCollection ( std::unique_ptr< L1CSCTrackCollection > &  data,
const edm::Handle< L1CSCTrackCollection emul,
CLHEP::HepRandomEngine *   
)
inline

Definition at line 428 of file L1EmulBias.h.

References data, L1TdeGEMTPG_cfi::emul, CSCCorrelatedLCTDigi::getTrknmb(), L1MuRegionalCand::pt_packed(), L1MuRegionalCand::quality(), L1MuRegionalCand::setPtPacked(), CSCCorrelatedLCTDigi::setTrknmb(), L1MuRegionalCand::setType(), and L1MuRegionalCand::type_idx().

430  {
431  typedef L1CSCTrackCollection::const_iterator col_cit;
432  //typedef std::vector<L1CSCTrack> L1CSCTrackCollection;
433  //typedef std::pair<csc::L1Track,CSCCorrelatedLCTDigiCollection> L1CSCTrack;
434  //typedef MuonDigiCollection<CSCDetId,CSCCorrelatedLCTDigi> CSCCorrelatedLCTDigiCollection;
435  typedef CSCCorrelatedLCTDigiCollection::DigiRangeIterator mapIt; //map iterator
436  typedef CSCCorrelatedLCTDigiCollection::const_iterator vecIt; //vec iterator
437  CSCCorrelatedLCTDigiCollection_ ctf_trk_data_v, ctf_trk_emul_v; //vector
438  //loop over csc-tracks (ie pairs<l1track,digi_vec>)
439  for (col_cit tcit = emul->begin(); tcit != emul->end(); tcit++) {
440  csc::L1Track l1trk = tcit->first;
441  if (l1trk.quality() < 4)
442  l1trk.setPtPacked((l1trk.pt_packed() >> 2) & 0x1f);
443  l1trk.setType(l1trk.type_idx());
444  //L1MuRegionalCand reg(tcit->first.getDataWord(), tcit->first.bx());
445  std::unique_ptr<CSCCorrelatedLCTDigiCollection> dgcoll(new CSCCorrelatedLCTDigiCollection);
446  CSCCorrelatedLCTDigiCollection ldc = tcit->second; //muondigicollection=map
447  //get the lct-digi-collection (ie muon-digi-collection)
448  //loop over data (map<idx,vec_digi>)
449  for (mapIt mit = ldc.begin(); mit != ldc.end(); mit++) {
450  //get vec_digi range(pair) corresponding to idx of map
451  //loop over digi vector (ie between begin and end pointers in range)
452  //CSCCorrelatedLCTDigiCollection::Range ctpRange = ctp_lct_data_->get((*mit).first)
453  CSCDetId did = (*mit).first;
454  //for (vecIt vit = ctpRange.first; vit != ctpRange.second; vit++) {
455  for (vecIt vit = ldc.get((*mit).first).first; vit != ldc.get((*mit).first).second; vit++) {
456  CSCCorrelatedLCTDigi dg = *vit;
457  uint16_t tn = dg.getTrknmb();
458  if (tn == 2)
459  tn--;
460  dg.setTrknmb(tn);
461  dgcoll->insertDigi(did, dg);
462  }
463  }
464  L1CSCTrack l1csctrk = std::make_pair(l1trk, *dgcoll);
465  data->push_back(l1csctrk);
466  }
467 }
std::pair< csc::L1Track, CSCCorrelatedLCTDigiCollection > L1CSCTrack
unsigned pt_packed() const
return pt packed as in hardware
unsigned int quality() const
return quality
void setType(unsigned type)
Set Type: 0 DT, 1 bRPC, 2 CSC, 3 fRPC.
uint16_t getTrknmb() const
return track number
void setPtPacked(unsigned pt)
Set Pt: 0..31.
std::vector< CSCCorrelatedLCTDigi > CSCCorrelatedLCTDigiCollection_
Definition: DEtrait.h:97
std::vector< DigiType >::const_iterator const_iterator
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
void setTrknmb(const uint16_t number)
Set track number (1,2) after sorting LCTs.
unsigned type_idx() const
return type: 0 DT, 1 bRPC, 2 CSC, 3 fRPC

◆ produce()

void L1EmulBias::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprotectedvirtual

list the emulated collections

get the emulated collections

assert collection validity

declare the data collections

fill data as modified emul collections

append data into event

Implements edm::EDProducer.

Definition at line 142 of file L1EmulBias.cc.

References cms::cuda::assert(), 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, edm::HandleBase::isValid(), label, dedefs::LTC, eostools::move(), dedefs::RCT, dedefs::RPC, and verbose.

142  {
144  CLHEP::HepRandomEngine* engine = &rng->getEngine(iEvent.streamID());
145 
146  if (verbose())
147  std::cout << "L1EmulBias::produce...\n" << std::flush;
148 
154  edm::Handle<L1GctEmCandCollection> gct_isolaem_emul;
155  edm::Handle<L1GctEmCandCollection> gct_noisoem_emul;
156  edm::Handle<L1GctJetCandCollection> gct_cenjets_emul;
157  edm::Handle<L1GctJetCandCollection> gct_forjets_emul;
158  edm::Handle<L1GctJetCandCollection> gct_taujets_emul;
175 
177  if (m_doSys[ETP])
178  iEvent.getByLabel(m_DEsource[ETP][0].label(), instName[ETP][0], ecal_tp_emul);
179  if (m_doSys[HTP])
180  iEvent.getByLabel(m_DEsource[HTP][0].label(), instName[HTP][0], hcal_tp_emul);
181  if (m_doSys[RCT])
182  iEvent.getByLabel(m_DEsource[RCT][0].label(), instName[RCT][0], rct_em_emul);
183  if (m_doSys[RCT])
184  iEvent.getByLabel(m_DEsource[RCT][0].label(), instName[RCT][0], rct_rgn_emul);
185  if (m_doSys[GCT])
186  iEvent.getByLabel(m_DEsource[GCT][0].label(), instName[GCT][0], gct_isolaem_emul);
187  if (m_doSys[GCT])
188  iEvent.getByLabel(m_DEsource[GCT][0].label(), instName[GCT][1], gct_noisoem_emul);
189  if (m_doSys[GCT])
190  iEvent.getByLabel(m_DEsource[GCT][0].label(), instName[GCT][2], gct_cenjets_emul);
191  if (m_doSys[GCT])
192  iEvent.getByLabel(m_DEsource[GCT][0].label(), instName[GCT][3], gct_forjets_emul);
193  if (m_doSys[GCT])
194  iEvent.getByLabel(m_DEsource[GCT][0].label(), instName[GCT][4], gct_taujets_emul);
195  if (m_doSys[DTP])
196  iEvent.getByLabel(m_DEsource[DTP][0].label(), instName[DTP][0], dtp_ph_emul);
197  if (m_doSys[DTP])
198  iEvent.getByLabel(m_DEsource[DTP][0].label(), instName[DTP][0], dtp_th_emul);
199  if (m_doSys[DTF])
200  iEvent.getByLabel(m_DEsource[DTF][0].label(), instName[DTF][0], dtf_emul);
201  if (m_doSys[DTF])
202  iEvent.getByLabel(m_DEsource[DTF][0].label(), instName[DTF][1], dtf_trk_emul);
203  if (m_doSys[CTP])
204  iEvent.getByLabel(m_DEsource[CTP][0].label(), instName[CTP][0], ctp_emul);
205  if (m_doSys[CTF])
206  iEvent.getByLabel(m_DEsource[CTF][0].label(), instName[CTF][0], ctf_emul);
207  if (m_doSys[CTF])
208  iEvent.getByLabel(m_DEsource[CTF][1].label(), instName[CTF][1], ctf_trk_emul);
209  if (m_doSys[RPC])
210  iEvent.getByLabel(m_DEsource[RPC][0].label(), instName[RPC][0], rpc_cen_emul);
211  if (m_doSys[RPC])
212  iEvent.getByLabel(m_DEsource[RPC][0].label(), instName[RPC][1], rpc_for_emul);
213  if (m_doSys[LTC])
214  iEvent.getByLabel(m_DEsource[LTC][0].label(), instName[LTC][0], ltc_emul);
215  if (m_doSys[GMT])
216  iEvent.getByLabel(m_DEsource[GMT][0].label(), instName[GMT][0], gmt_emul);
217  if (m_doSys[GMT])
218  iEvent.getByLabel(m_DEsource[GMT][0].label(), instName[GMT][0], gmt_rdt_emul);
219  if (m_doSys[GLT])
220  iEvent.getByLabel(m_DEsource[GLT][0].label(), instName[GLT][0], glt_rdt_emul);
221  if (m_doSys[GLT])
222  iEvent.getByLabel(m_DEsource[GLT][0].label(), instName[GLT][0], glt_evm_emul);
223  if (m_doSys[GLT])
224  iEvent.getByLabel(m_DEsource[GLT][0].label(), instName[GLT][0], glt_obj_emul);
225 
227  if (m_doSys[ETP])
228  assert(ecal_tp_emul.isValid());
229  if (m_doSys[HTP])
230  assert(hcal_tp_emul.isValid());
231  if (m_doSys[RCT])
232  assert(rct_em_emul.isValid());
233  if (m_doSys[RCT])
234  assert(rct_rgn_emul.isValid());
235  if (m_doSys[GCT])
236  assert(gct_isolaem_emul.isValid());
237  if (m_doSys[GCT])
238  assert(gct_noisoem_emul.isValid());
239  if (m_doSys[GCT])
240  assert(gct_cenjets_emul.isValid());
241  if (m_doSys[GCT])
242  assert(gct_forjets_emul.isValid());
243  if (m_doSys[GCT])
244  assert(gct_taujets_emul.isValid());
245  if (m_doSys[DTP])
246  assert(dtp_ph_emul.isValid());
247  if (m_doSys[DTP])
248  assert(dtp_th_emul.isValid());
249  if (m_doSys[DTF])
250  assert(dtf_emul.isValid());
251  if (m_doSys[DTF])
252  assert(dtf_trk_emul.isValid());
253  if (m_doSys[CTP])
254  assert(ctp_emul.isValid());
255  if (m_doSys[CTF])
256  assert(ctf_emul.isValid());
257  if (m_doSys[CTF])
258  assert(ctf_trk_emul.isValid());
259  if (m_doSys[RPC])
260  assert(rpc_cen_emul.isValid());
261  if (m_doSys[RPC])
262  assert(rpc_for_emul.isValid());
263  if (m_doSys[LTC])
264  assert(ltc_emul.isValid());
265  if (m_doSys[GMT])
266  assert(gmt_emul.isValid());
267  if (m_doSys[GMT])
268  assert(gmt_rdt_emul.isValid());
269  if (m_doSys[GLT])
270  assert(glt_rdt_emul.isValid());
271  if (m_doSys[GLT])
272  assert(glt_evm_emul.isValid());
273  if (m_doSys[GLT])
274  assert(glt_obj_emul.isValid());
275 
277  std::unique_ptr<EcalTrigPrimDigiCollection> ecal_tp_data(new EcalTrigPrimDigiCollection);
278  std::unique_ptr<HcalTrigPrimDigiCollection> hcal_tp_data(new HcalTrigPrimDigiCollection);
279  std::unique_ptr<L1CaloEmCollection> rct_em_data(new L1CaloEmCollection);
280  std::unique_ptr<L1CaloRegionCollection> rct_rgn_data(new L1CaloRegionCollection);
281  std::unique_ptr<L1GctEmCandCollection> gct_isolaem_data(new L1GctEmCandCollection);
282  std::unique_ptr<L1GctEmCandCollection> gct_noisoem_data(new L1GctEmCandCollection);
283  std::unique_ptr<L1GctJetCandCollection> gct_cenjets_data(new L1GctJetCandCollection);
284  std::unique_ptr<L1GctJetCandCollection> gct_forjets_data(new L1GctJetCandCollection);
285  std::unique_ptr<L1GctJetCandCollection> gct_taujets_data(new L1GctJetCandCollection);
286  std::unique_ptr<L1MuDTChambPhContainer> dtp_ph_data(new L1MuDTChambPhContainer);
287  std::unique_ptr<L1MuDTChambThContainer> dtp_th_data(new L1MuDTChambThContainer);
288  std::unique_ptr<L1MuRegionalCandCollection> dtf_data(new L1MuRegionalCandCollection);
289  std::unique_ptr<L1MuDTTrackContainer> dtf_trk_data(new L1MuDTTrackContainer);
290  std::unique_ptr<CSCCorrelatedLCTDigiCollection> ctp_data(new CSCCorrelatedLCTDigiCollection);
291  std::unique_ptr<L1MuRegionalCandCollection> ctf_data(new L1MuRegionalCandCollection);
292  std::unique_ptr<L1CSCTrackCollection> ctf_trk_data(new L1CSCTrackCollection);
293  std::unique_ptr<L1MuRegionalCandCollection> rpc_cen_data(new L1MuRegionalCandCollection);
294  std::unique_ptr<L1MuRegionalCandCollection> rpc_for_data(new L1MuRegionalCandCollection);
295  std::unique_ptr<LTCDigiCollection> ltc_data(new LTCDigiCollection);
296  std::unique_ptr<L1MuGMTCandCollection> gmt_data(new L1MuGMTCandCollection);
297  std::unique_ptr<L1MuGMTReadoutCollection> gmt_rdt_data(new L1MuGMTReadoutCollection);
298  std::unique_ptr<L1GlobalTriggerReadoutRecord> glt_rdt_data(new L1GlobalTriggerReadoutRecord);
299  std::unique_ptr<L1GlobalTriggerEvmReadoutRecord> glt_evm_data(new L1GlobalTriggerEvmReadoutRecord);
300  std::unique_ptr<L1GlobalTriggerObjectMapRecord> glt_obj_data(new L1GlobalTriggerObjectMapRecord);
301 
302  if (verbose())
303  std::cout << "L1EmulBias::produce - modify...\n" << std::flush;
304 
306  if (m_doSys[ETP])
307  ModifyCollection(ecal_tp_data, ecal_tp_emul, engine);
308  if (m_doSys[HTP])
309  ModifyCollection(hcal_tp_data, hcal_tp_emul, engine);
310  if (m_doSys[RCT])
311  ModifyCollection(rct_em_data, rct_em_emul, engine);
312  if (m_doSys[RCT])
313  ModifyCollection(rct_rgn_data, rct_rgn_emul, engine);
314  if (m_doSys[GCT])
315  ModifyCollection(gct_isolaem_data, gct_isolaem_emul, engine);
316  if (m_doSys[GCT])
317  ModifyCollection(gct_noisoem_data, gct_noisoem_emul, engine);
318  if (m_doSys[GCT])
319  ModifyCollection(gct_cenjets_data, gct_cenjets_emul, engine);
320  if (m_doSys[GCT])
321  ModifyCollection(gct_forjets_data, gct_forjets_emul, engine);
322  if (m_doSys[GCT])
323  ModifyCollection(gct_taujets_data, gct_taujets_emul, engine);
324  if (m_doSys[DTP])
325  ModifyCollection(dtp_ph_data, dtp_ph_emul, engine);
326  if (m_doSys[DTP])
327  ModifyCollection(dtp_th_data, dtp_th_emul, engine);
328  if (m_doSys[DTF])
329  ModifyCollection(dtf_data, dtf_emul, engine);
330  if (m_doSys[DTF])
331  ModifyCollection(dtf_trk_data, dtf_trk_emul, engine);
332  if (m_doSys[CTP])
333  ModifyCollection(ctp_data, ctp_emul, engine);
334  if (m_doSys[CTF])
335  ModifyCollection(ctf_data, ctf_emul, engine);
336  if (m_doSys[CTF])
337  ModifyCollection(ctf_trk_data, ctf_trk_emul, engine);
338  if (m_doSys[RPC])
339  ModifyCollection(rpc_cen_data, rpc_cen_emul, engine);
340  if (m_doSys[RPC])
341  ModifyCollection(rpc_for_data, rpc_for_emul, engine);
342  if (m_doSys[LTC])
343  ModifyCollection(ltc_data, ltc_emul, engine);
344  if (m_doSys[GMT])
345  ModifyCollection(gmt_data, gmt_emul, engine);
346  if (m_doSys[GMT])
347  ModifyCollection(gmt_rdt_data, gmt_rdt_emul, engine);
348  if (m_doSys[GLT])
349  ModifyCollection(glt_rdt_data, glt_rdt_emul, engine);
350  if (m_doSys[GLT])
351  ModifyCollection(glt_evm_data, glt_evm_emul, engine);
352  if (m_doSys[GLT])
353  ModifyCollection(glt_obj_data, glt_obj_emul, engine);
354 
355  if (verbose())
356  std::cout << "L1EmulBias::produce - put...\n" << std::flush;
357 
359  if (m_doSys[ETP])
360  iEvent.put(std::move(ecal_tp_data), instName[ETP][0]);
361  if (m_doSys[HTP])
362  iEvent.put(std::move(hcal_tp_data), instName[HTP][0]);
363  if (m_doSys[RCT])
364  iEvent.put(std::move(rct_em_data), instName[RCT][0]);
365  if (m_doSys[RCT])
366  iEvent.put(std::move(rct_rgn_data), instName[RCT][0]);
367  if (m_doSys[GCT])
368  iEvent.put(std::move(gct_isolaem_data), instName[GCT][0]);
369  if (m_doSys[GCT])
370  iEvent.put(std::move(gct_noisoem_data), instName[GCT][1]);
371  if (m_doSys[GCT])
372  iEvent.put(std::move(gct_cenjets_data), instName[GCT][2]);
373  if (m_doSys[GCT])
374  iEvent.put(std::move(gct_forjets_data), instName[GCT][3]);
375  if (m_doSys[GCT])
376  iEvent.put(std::move(gct_taujets_data), instName[GCT][4]);
377  if (m_doSys[DTP])
378  iEvent.put(std::move(dtp_ph_data), instName[DTP][0]);
379  if (m_doSys[DTP])
380  iEvent.put(std::move(dtp_th_data), instName[DTP][0]);
381  if (m_doSys[DTF])
382  iEvent.put(std::move(dtf_data), instName[DTF][0]);
383  if (m_doSys[DTF])
384  iEvent.put(std::move(dtf_trk_data), instName[DTF][1]);
385  if (m_doSys[CTP])
386  iEvent.put(std::move(ctp_data), instName[CTP][0]);
387  if (m_doSys[CTF])
388  iEvent.put(std::move(ctf_data), instName[CTF][0]);
389  if (m_doSys[CTF])
390  iEvent.put(std::move(ctf_trk_data), instName[CTF][1]);
391  if (m_doSys[RPC])
392  iEvent.put(std::move(rpc_cen_data), instName[RPC][0]);
393  if (m_doSys[RPC])
394  iEvent.put(std::move(rpc_for_data), instName[RPC][1]);
395  if (m_doSys[LTC])
396  iEvent.put(std::move(ltc_data), instName[LTC][0]);
397  if (m_doSys[GMT])
398  iEvent.put(std::move(gmt_data), instName[GMT][0]);
399  if (m_doSys[GMT])
400  iEvent.put(std::move(gmt_rdt_data), instName[GMT][0]);
401  if (m_doSys[GLT])
402  iEvent.put(std::move(glt_rdt_data), instName[GLT][0]);
403  if (m_doSys[GLT])
404  iEvent.put(std::move(glt_evm_data), instName[GLT][0]);
405  if (m_doSys[GLT])
406  iEvent.put(std::move(glt_obj_data), instName[GLT][0]);
407 
408  if (verbose())
409  std::cout << "L1EmulBias::produce...done.\n" << std::flush;
410 }
std::vector< L1CaloEmCand > L1CaloEmCollection
void ModifyCollection(std::unique_ptr< T > &data, const edm::Handle< T > emul, CLHEP::HepRandomEngine *)
Definition: L1EmulBias.h:68
bool m_doSys[dedefs::DEnsys]
Definition: L1EmulBias.h:56
assert(be >=bs)
std::vector< L1CSCTrack > L1CSCTrackCollection
virtual CLHEP::HepRandomEngine & getEngine(StreamID const &)=0
Use this engine in event methods.
std::vector< L1GctJetCand > L1GctJetCandCollection
char const * label
int iEvent
Definition: GenABIO.cc:224
int verbose()
Definition: L1EmulBias.h:54
edm::InputTag m_DEsource[dedefs::DEnsys][2]
Definition: L1EmulBias.h:55
std::vector< LTCDigi > LTCDigiCollection
Definition: LTCDigi.h:91
std::vector< L1MuRegionalCand > L1MuRegionalCandCollection
std::string instName[dedefs::DEnsys][5]
Definition: L1EmulBias.h:57
bool isValid() const
Definition: HandleBase.h:70
std::vector< L1CaloRegion > L1CaloRegionCollection
def move(src, dest)
Definition: eostools.py:511
std::vector< L1MuGMTCand > L1MuGMTCandCollection
Definition: DEtrait.h:99
std::vector< L1GctEmCand > L1GctEmCandCollection

◆ verbose()

int L1EmulBias::verbose ( )
inlineprivate

Definition at line 54 of file L1EmulBias.h.

References verbose_.

Referenced by ModifyCollection().

54 { return verbose_; }
int verbose_
Definition: L1EmulBias.h:53

Member Data Documentation

◆ instName

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

Definition at line 57 of file L1EmulBias.h.

◆ m_DEsource

edm::InputTag L1EmulBias::m_DEsource[dedefs::DEnsys][2]
private

Definition at line 55 of file L1EmulBias.h.

◆ m_doSys

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

Definition at line 56 of file L1EmulBias.h.

◆ verbose_

int L1EmulBias::verbose_
private

Definition at line 53 of file L1EmulBias.h.

Referenced by verbose().