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::global::EDProducer<> edm::global::EDProducerBase 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 *) const
 
template<>
void ModifyCollection (std::unique_ptr< EcalTrigPrimDigiCollection > &data, const edm::Handle< EcalTrigPrimDigiCollection > emul, CLHEP::HepRandomEngine *) const
 
template<>
void ModifyCollection (std::unique_ptr< HcalTrigPrimDigiCollection > &data, const edm::Handle< HcalTrigPrimDigiCollection > emul, CLHEP::HepRandomEngine *) const
 
template<>
void ModifyCollection (std::unique_ptr< L1CaloEmCollection > &data, const edm::Handle< L1CaloEmCollection > emul, CLHEP::HepRandomEngine *engine) const
 
template<>
void ModifyCollection (std::unique_ptr< L1CaloRegionCollection > &data, const edm::Handle< L1CaloRegionCollection > emul, CLHEP::HepRandomEngine *engine) const
 
template<>
void ModifyCollection (std::unique_ptr< L1GctEmCandCollection > &data, const edm::Handle< L1GctEmCandCollection > emul, CLHEP::HepRandomEngine *engine) const
 
template<>
void ModifyCollection (std::unique_ptr< L1GctJetCandCollection > &data, const edm::Handle< L1GctJetCandCollection > emul, CLHEP::HepRandomEngine *engine) const
 
template<>
void ModifyCollection (std::unique_ptr< L1MuRegionalCandCollection > &data, const edm::Handle< L1MuRegionalCandCollection > emul, CLHEP::HepRandomEngine *engine) const
 
template<>
void ModifyCollection (std::unique_ptr< L1MuDTTrackContainer > &data, const edm::Handle< L1MuDTTrackContainer > emul, CLHEP::HepRandomEngine *engine) const
 
template<>
void ModifyCollection (std::unique_ptr< L1MuDTChambPhContainer > &data, const edm::Handle< L1MuDTChambPhContainer > emul, CLHEP::HepRandomEngine *engine) const
 
template<>
void ModifyCollection (std::unique_ptr< L1MuDTChambThContainer > &data, const edm::Handle< L1MuDTChambThContainer > emul, CLHEP::HepRandomEngine *) const
 
template<>
void ModifyCollection (std::unique_ptr< LTCDigiCollection > &data, const edm::Handle< LTCDigiCollection > emul, CLHEP::HepRandomEngine *) const
 
template<>
void ModifyCollection (std::unique_ptr< L1MuGMTCandCollection > &data, const edm::Handle< L1MuGMTCandCollection > emul, CLHEP::HepRandomEngine *) const
 
template<>
void ModifyCollection (std::unique_ptr< L1MuGMTReadoutCollection > &data, const edm::Handle< L1MuGMTReadoutCollection > emul, CLHEP::HepRandomEngine *) const
 
template<>
void ModifyCollection (std::unique_ptr< CSCCorrelatedLCTDigiCollection > &data, const edm::Handle< CSCCorrelatedLCTDigiCollection > emul, CLHEP::HepRandomEngine *) const
 
template<>
void ModifyCollection (std::unique_ptr< L1CSCTrackCollection > &data, const edm::Handle< L1CSCTrackCollection > emul, CLHEP::HepRandomEngine *) const
 
 ~L1EmulBias () override
 
- Public Member Functions inherited from edm::global::EDProducer<>
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
EDProduceroperator= (const EDProducer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
bool wantsStreamLuminosityBlocks () const final
 
bool wantsStreamRuns () const final
 
- Public Member Functions inherited from edm::global::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
std::vector< bool > const & recordProvenanceList () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
TypeLabelList const & typeLabelList () const
 used by the fwk to register the list of products of this module More...
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const *> *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const *> const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Protected Member Functions

void produce (edm::StreamID, edm::Event &, const edm::EventSetup &) const 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 () const
 

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::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)
 

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:54
assert(be >=bs)
T getUntrackedParameter(std::string const &, T const &) const
char const * label
edm::InputTag m_DEsource[dedefs::DEnsys][2]
Definition: L1EmulBias.h:53
int verbose() const
Definition: L1EmulBias.h:52
std::string instName[dedefs::DEnsys][5]
Definition: L1EmulBias.h:55
int verbose_
Definition: L1EmulBias.h:51
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

◆ ModifyCollection() [1/16]

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

Definition at line 66 of file L1EmulBias.h.

References data, and L1TdeGEMTPG_cfi::emul.

66  {
67  data = (std::unique_ptr<T>)(const_cast<T*>(emul.product()));
68 }
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 *   
) const
inline

Definition at line 71 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().

73  {
75  for (col_cit it = emul->begin(); it != emul->end(); it++) {
77  int iphi = it->id().iphi();
78  bool reset = (iphi > 18 && iphi < 39); //remove few supermodules
79  for (int s = 0; s < 5; s++) {
80  uint16_t sample = it->sample(s).raw();
81  if (sample == 0)
82  continue;
83  uint16_t tmp = reset ? 0 : sample;
84  if (reset)
85  tmp = sample >> 1;
86  col.setSampleValue(s, tmp);
87  if (verbose() && sample != 0)
88  std::cout << "[emulbias] etp " << *it << "\t sample: " << s << " " << std::hex << sample << " -> "
89  << col.sample(s).raw() << std::dec << std::endl;
90  }
91  data->push_back(col);
92  }
93 }
std::vector< T >::const_iterator const_iterator
int verbose() const
Definition: L1EmulBias.h:52
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 *   
) const
inline

Definition at line 96 of file L1EmulBias.h.

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

98  {
100  for (col_cit it = emul->begin(); it != emul->end(); it++) {
102  int iphi = it->id().iphi();
103  bool reset = (iphi > 18 && iphi < 27); //remove few supermodules
104  for (int s = 0; s < 5; s++) {
105  uint16_t sample = it->sample(s).raw();
106  if (sample == 0)
107  continue;
108  uint16_t tmp = reset ? 0 : sample;
109  if (reset)
110  tmp = sample >> 1;
111  col.setSample(s, tmp);
112  }
113  data->push_back(col);
114  }
115 }
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 
) const
inline

Definition at line 118 of file L1EmulBias.h.

References data, and L1TdeGEMTPG_cfi::emul.

120  {
121  typedef L1CaloEmCollection::const_iterator col_cit;
122  for (col_cit it = emul->begin(); it != emul->end(); it++) {
123  unsigned crate = it->rctCrate();
124  unsigned raw = it->raw();
125  bool iso = it->isolated();
126  unsigned rdata = raw;
127  if (crate < 4 * engine->flat())
128  rdata = raw >> 1;
129  L1CaloEmCand cand(rdata, crate, iso, it->index(), it->bx(), false);
130  data->push_back(cand);
131  }
132  //L1CaloEmCand(uint16_t data, unsigned crate, bool iso);
133  //L1CaloEmCand(uint16_t data, unsigned crate, bool iso, uint16_t index, int16_t bx, bool dummy);
134 }
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 
) const
inline

Definition at line 137 of file L1EmulBias.h.

References data, and L1TdeGEMTPG_cfi::emul.

139  {
140  typedef L1CaloRegionCollection::const_iterator col_cit;
141  for (col_cit it = emul->begin(); it != emul->end(); it++) {
142  unsigned crate = it->rctCrate();
143  unsigned raw = it->et();
144  uint16_t rdata = raw;
145  if (crate < 4 * engine->flat())
146  rdata = raw >> 1;
147  L1CaloRegion cand(rdata, it->gctEta(), it->gctPhi(), it->bx());
148  data->push_back(cand);
149  }
150  //L1CaloRegion(uint16_t data, unsigned ieta, unsigned iphi, int16_t bx);
151  //Note: raw data accessor missing in dataformats!
152 }
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 
) const
inline

Definition at line 155 of file L1EmulBias.h.

References data, and L1TdeGEMTPG_cfi::emul.

157  {
158  typedef L1GctEmCandCollection::const_iterator col_cit;
159  for (col_cit it = emul->begin(); it != emul->end(); it++) {
160  unsigned raw = it->raw();
161  uint16_t rdata = raw;
162  if (it->phiIndex() < 4 * engine->flat()) //0-17
163  rdata = raw >> 1;
164  L1GctEmCand cand(rdata, it->isolated());
165  data->push_back(cand);
166  }
167  //etaIndex(), etaSign() : -6 to -0, +0 to +6
168  //L1GctEmCand(uint16_t data, bool iso);
169 }
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 
) const
inline

Definition at line 172 of file L1EmulBias.h.

References data, and L1TdeGEMTPG_cfi::emul.

174  {
175  typedef L1GctJetCandCollection::const_iterator col_cit;
176  for (col_cit it = emul->begin(); it != emul->end(); it++) {
177  unsigned raw = it->raw();
178  uint16_t rdata = raw;
179  if (it->phiIndex() < 4 * engine->flat()) //0-17
180  rdata = raw >> 1;
181  L1GctJetCand cand(rdata, it->isTau(), it->isForward());
182  data->push_back(cand);
183  }
184  //L1GctJetCand(uint16_t data, bool isTau, bool isFor);
185 }
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 
) const
inline

Definition at line 188 of file L1EmulBias.h.

References data, L1TdeGEMTPG_cfi::emul, and phi.

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

Definition at line 226 of file L1EmulBias.h.

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

228  {
229  typedef std::vector<L1MuDTTrackCand> TrackContainer;
230  typedef TrackContainer::const_iterator col_cit;
231  TrackContainer const* tracks_in = emul->getContainer();
233  for (col_cit it = tracks_in->begin(); it != tracks_in->end(); it++) {
234  L1MuDTTrackCand cand(*it);
235  cand.setType(it->type_idx());
236  unsigned pt = it->pt_packed(); //0..31
237  unsigned qua = it->quality(); //0..7
238  if (qua < 4) {
239  cand.setPtPacked((pt >> 2) & 0x1f);
240  cand.setQualityPacked((qua << 1) & 0x07);
241  }
242  tracks.push_back(cand);
243  }
244  data->setContainer(tracks);
245  /* few alternatives...
246  unsigned phip = it->phi_packed();
247  unsigned raw = it->getDataWord();
248  uint16_t rdata = raw;
249  if(2.5<fabs(it->phiValue())<3.0)
250  rdata = raw>>1;
251  L1MuRegionalCand cand(rdata,it->bx());
252  double rnd = engine->flat();
253  */
254 }
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 
) const
inline

Definition at line 257 of file L1EmulBias.h.

References data, L1TdeGEMTPG_cfi::emul, and tracks.

259  {
260  typedef std::vector<L1MuDTChambPhDigi> Phi_Container;
261  typedef Phi_Container::const_iterator col_it;
262  Phi_Container const* tracks_in = emul->getContainer();
263  Phi_Container tracks(tracks_in->size());
264  int uqua;
265  for (col_it it = tracks_in->begin(); it != tracks_in->end(); it++) {
266  uqua = it->code(); // (int)(10*engine->flat());
267  uqua = (uqua < 2 ? uqua + 1 : uqua);
269  it->bxNum(), it->whNum(), it->scNum(), it->stNum(), it->phi(), it->phiB(), uqua, it->Ts2Tag(), it->BxCnt());
270  tracks.push_back(cand);
271  }
272  data->setContainer(tracks);
273 }
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 *   
) const
inline

Definition at line 276 of file L1EmulBias.h.

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

278  {
279  typedef std::vector<L1MuDTChambThDigi> Thi_Container;
280  typedef Thi_Container::const_iterator col_cit;
281  Thi_Container const* tracks_in = emul->getContainer();
282  Thi_Container tracks(tracks_in->size());
283  int uos[7], uqa[7];
284  for (col_cit it = tracks_in->begin(); it != tracks_in->end(); it++) {
285  for (int j = 0; j < 7; j++) {
286  uos[j] = (it->position(j) ? 0 : 1);
287  uqa[j] = (it->quality(j) ? 0 : 1);
288  }
289  int stnum = it->stNum();
290  stnum = (stnum > 2 ? stnum - 1 : stnum);
291  L1MuDTChambThDigi cand(it->bxNum(), it->whNum(), it->scNum(), stnum, uos, uqa);
292  tracks.push_back(cand);
293  }
294  data->setContainer(tracks);
295 }
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 *   
) const
inline

Definition at line 298 of file L1EmulBias.h.

References data, and L1TdeGEMTPG_cfi::emul.

300  {
301  typedef std::vector<LTCDigi>::const_iterator col_cit;
302  for (col_cit it = emul->begin(); it != emul->end(); it++) {
303  data->push_back(*it);
304  //note: raw data accessor missing in dataformats!
305  //data->push_back(LTCDigi(it->data()>>1));
306  }
307 }
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 *   
) const
inline

Definition at line 310 of file L1EmulBias.h.

References data, and L1TdeGEMTPG_cfi::emul.

312  {
313  //typedef std::vector<L1MuGMTCand> L1MuGMTCandCollection;
314  typedef std::vector<L1MuGMTCand>::const_iterator col_cit;
315  for (col_cit it = emul->begin(); it != emul->end(); it++) {
316  float phiv = it->phiValue();
317  unsigned dword = it->getDataWord();
318  if (phiv > 2. && phiv < 4.)
319  dword = dword >> 2;
320  L1MuGMTCand cand(dword, it->bx());
321  data->push_back(cand);
322  //cand.setPtPacked(cand.ptIndex()>>1);
323  //data->push_back(L1MuGMTCand((it->getDataWord()>>1),it->bx()));
324  }
325 }
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 *   
) const
inline

Definition at line 328 of file L1EmulBias.h.

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

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

modify digi

append digi

Definition at line 394 of file L1EmulBias.h.

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

396  {
397  //typedef MuonDigiCollection<CSCDetId,CSCCorrelatedLCTDigi> CSCCorrelatedLCTDigiCollection;
398  typedef CSCCorrelatedLCTDigiCollection::DigiRangeIterator mapIt; //map iterator
399  typedef CSCCorrelatedLCTDigiCollection::const_iterator vecIt; //vec iterator
400  //loop over data (map<idx,vec_digi>)
401  for (mapIt mit = emul->begin(); mit != emul->end(); mit++) {
402  //get detector index
403  CSCDetId did = (*mit).first;
404  //get vec_digi range(pair) corresponding to idx of map
405  //CSCCorrelatedLCTDigiCollection::Range ctpRange = emul->get(did)
406  //loop over digi vector (ie between begin and end pointers in range)
407  //for (vecIt vit = ctpRange.first; vit != ctpRange.second; vit++) {
408  for (vecIt vit = emul->get((*mit).first).first; vit != emul->get((*mit).first).second; vit++) {
410  CSCCorrelatedLCTDigi dg = *vit;
411  //dg.clear;
412  uint16_t tn = dg.getTrknmb();
413  if (tn == 2)
414  tn--;
415  dg.setTrknmb(tn);
416  //dg.setTrknmb (dg.getTrknmb ());
417  //dg.setMPCLink (dg.getMPCLink ());
418  //dg.setWireGroup(dg.getWireGroup());
420  data->insertDigi(did, dg);
421  }
422  }
423 }
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 *   
) const
inline

Definition at line 426 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().

428  {
429  typedef L1CSCTrackCollection::const_iterator col_cit;
430  //typedef std::vector<L1CSCTrack> L1CSCTrackCollection;
431  //typedef std::pair<csc::L1Track,CSCCorrelatedLCTDigiCollection> L1CSCTrack;
432  //typedef MuonDigiCollection<CSCDetId,CSCCorrelatedLCTDigi> CSCCorrelatedLCTDigiCollection;
433  typedef CSCCorrelatedLCTDigiCollection::DigiRangeIterator mapIt; //map iterator
434  typedef CSCCorrelatedLCTDigiCollection::const_iterator vecIt; //vec iterator
435  CSCCorrelatedLCTDigiCollection_ ctf_trk_data_v, ctf_trk_emul_v; //vector
436  //loop over csc-tracks (ie pairs<l1track,digi_vec>)
437  for (col_cit tcit = emul->begin(); tcit != emul->end(); tcit++) {
438  csc::L1Track l1trk = tcit->first;
439  if (l1trk.quality() < 4)
440  l1trk.setPtPacked((l1trk.pt_packed() >> 2) & 0x1f);
441  l1trk.setType(l1trk.type_idx());
442  //L1MuRegionalCand reg(tcit->first.getDataWord(), tcit->first.bx());
443  std::unique_ptr<CSCCorrelatedLCTDigiCollection> dgcoll(new CSCCorrelatedLCTDigiCollection);
444  CSCCorrelatedLCTDigiCollection ldc = tcit->second; //muondigicollection=map
445  //get the lct-digi-collection (ie muon-digi-collection)
446  //loop over data (map<idx,vec_digi>)
447  for (mapIt mit = ldc.begin(); mit != ldc.end(); mit++) {
448  //get vec_digi range(pair) corresponding to idx of map
449  //loop over digi vector (ie between begin and end pointers in range)
450  //CSCCorrelatedLCTDigiCollection::Range ctpRange = ctp_lct_data_->get((*mit).first)
451  CSCDetId did = (*mit).first;
452  //for (vecIt vit = ctpRange.first; vit != ctpRange.second; vit++) {
453  for (vecIt vit = ldc.get((*mit).first).first; vit != ldc.get((*mit).first).second; vit++) {
454  CSCCorrelatedLCTDigi dg = *vit;
455  uint16_t tn = dg.getTrknmb();
456  if (tn == 2)
457  tn--;
458  dg.setTrknmb(tn);
459  dgcoll->insertDigi(did, dg);
460  }
461  }
462  L1CSCTrack l1csctrk = std::make_pair(l1trk, *dgcoll);
463  data->push_back(l1csctrk);
464  }
465 }
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::StreamID  ,
edm::Event iEvent,
const edm::EventSetup iSetup 
) const
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::global::EDProducerBase.

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
bool m_doSys[dedefs::DEnsys]
Definition: L1EmulBias.h:54
void ModifyCollection(std::unique_ptr< T > &data, const edm::Handle< T > emul, CLHEP::HepRandomEngine *) const
Definition: L1EmulBias.h:66
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
edm::InputTag m_DEsource[dedefs::DEnsys][2]
Definition: L1EmulBias.h:53
int verbose() const
Definition: L1EmulBias.h:52
std::vector< LTCDigi > LTCDigiCollection
Definition: LTCDigi.h:91
std::vector< L1MuRegionalCand > L1MuRegionalCandCollection
std::string instName[dedefs::DEnsys][5]
Definition: L1EmulBias.h:55
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 ( ) const
inlineprivate

Definition at line 52 of file L1EmulBias.h.

References verbose_.

Referenced by ModifyCollection().

52 { return verbose_; }
int verbose_
Definition: L1EmulBias.h:51

Member Data Documentation

◆ instName

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

Definition at line 55 of file L1EmulBias.h.

◆ m_DEsource

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

Definition at line 53 of file L1EmulBias.h.

◆ m_doSys

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

Definition at line 54 of file L1EmulBias.h.

◆ verbose_

int L1EmulBias::verbose_
private

Definition at line 51 of file L1EmulBias.h.

Referenced by verbose().