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
 
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)
 
 ~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
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

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::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
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<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)
 

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 wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 

Detailed Description

Definition at line 36 of file L1EmulBias.h.

Constructor & Destructor Documentation

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

assertion/temporary

List of collections to be produced

Definition at line 9 of file L1EmulBias.cc.

References gather_cfg::cout, dedefs::CTF, dedefs::CTP, dedefs::DEnsys, dedefs::DTF, dedefs::DTP, dedefs::ETP, Exception, dedefs::GCT, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), dedefs::GLT, dedefs::GMT, dedefs::HTP, mps_fire::i, label, dedefs::LTC, dedefs::RCT, dedefs::RPC, AlCaHLTBitMon_QueryRunRegistry::string, dedefs::SystLabel, and verbose.

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

Definition at line 110 of file L1EmulBias.cc.

110  {
111 }

Member Function Documentation

void L1EmulBias::beginJob ( void  )
inlineoverrideprotectedvirtual

Reimplemented from edm::EDProducer.

Definition at line 43 of file L1EmulBias.h.

References produce().

43 {};
void L1EmulBias::endJob ( void  )
inlineoverrideprotectedvirtual

Reimplemented from edm::EDProducer.

Definition at line 46 of file L1EmulBias.h.

References data, and ModifyCollection().

46 {};
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 edm::Handle< T >::product().

Referenced by endJob().

68  {
69  data = (std::unique_ptr<T>)(const_cast<T*>(emul.product()));
70 }
T const * product() const
Definition: Handle.h:74
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
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 edm::SortedCollection< T, SORT >::begin(), cuy::col, gather_cfg::cout, TauDecayModes::dec, edm::SortedCollection< T, SORT >::end(), EcalTriggerPrimitiveSample::raw(), reset(), alignCSCRings::s, simplePhotonAnalyzer_cfi::sample, EcalTriggerPrimitiveDigi::sample(), EcalTriggerPrimitiveDigi::setSampleValue(), 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) continue;
84  uint16_t tmp = reset?0:sample;
85  if(reset)
86  tmp = sample>>1;
87  col.setSampleValue(s,tmp);
88  if(verbose() && sample!=0)
89  std::cout << "[emulbias] etp " << *it << "\t sample: " << s << " "
90  << std::hex << sample << " -> " << col.sample(s).raw()
91  << 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
const_iterator end() const
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
col
Definition: cuy.py:1010
void reset(double vett[256])
Definition: TPedValues.cc:11
const_iterator begin() const
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 edm::SortedCollection< T, SORT >::begin(), cuy::col, edm::SortedCollection< T, SORT >::end(), reset(), alignCSCRings::s, simplePhotonAnalyzer_cfi::sample, HcalTriggerPrimitiveDigi::setSample(), and 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) continue;
109  uint16_t tmp = reset?0:sample;
110  if(reset)
111  tmp = sample>>1;
112  col.setSample(s,tmp);
113  }
114  data->push_back(col);
115  }
116 }
std::vector< T >::const_iterator const_iterator
const_iterator end() const
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
col
Definition: cuy.py:1010
void reset(double vett[256])
Definition: TPedValues.cc:11
const_iterator begin() const
template<>
void L1EmulBias::ModifyCollection ( std::unique_ptr< L1CaloEmCollection > &  data,
const edm::Handle< L1CaloEmCollection emul,
CLHEP::HepRandomEngine *  engine 
)
inline

Definition at line 119 of file L1EmulBias.h.

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

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:82
A calorimeter trigger region (sum of 4x4 trigger towers)
Definition: L1CaloRegion.h:22
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.

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:22
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
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.

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:18
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
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 phi, and L1MuRegionalCand::setPtPacked().

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:82
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 L1MuDTTrackContainer::getContainer(), EnergyCorrector::pt, L1MuRegionalCand::setPtPacked(), L1MuRegionalCand::setQualityPacked(), L1MuRegionalCand::setType(), and l1t::tracks.

230  {
231  typedef std::vector<L1MuDTTrackCand> TrackContainer;
232  typedef TrackContainer::const_iterator col_cit;
233  TrackContainer const* tracks_in = emul->getContainer();
234  TrackContainer tracks;
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
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
TrackContainer const * getContainer() const
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 L1MuDTChambPhContainer::getContainer(), and l1t::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  cand(it->bxNum(),it->whNum(),it->scNum(),it->stNum(),
272  it->phi(),it->phiB(),uqua,it->Ts2Tag(),it->BxCnt() );
273  tracks.push_back(cand);
274  }
275  data->setContainer(tracks);
276 }
Phi_Container const * getContainer() const
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
template<>
void L1EmulBias::ModifyCollection ( std::unique_ptr< L1MuDTChambThContainer > &  data,
const edm::Handle< L1MuDTChambThContainer emul,
CLHEP::HepRandomEngine *   
)
inline

Definition at line 279 of file L1EmulBias.h.

References L1MuDTChambThContainer::getContainer(), and l1t::tracks.

281  {
282  typedef std::vector<L1MuDTChambThDigi> Thi_Container;
283  typedef Thi_Container::const_iterator col_cit;
284  Thi_Container const* tracks_in = emul->getContainer();
285  Thi_Container tracks(tracks_in->size());
286  int uos[7],uqa[7];
287  for(col_cit it=tracks_in->begin(); it!=tracks_in->end(); it++) {
288  for(int j=0; j<7; j++) {
289  uos[j]=(it->position(j)?0:1);
290  uqa[j]=(it->quality (j)?0:1);
291  }
292  int stnum = it->stNum();
293  stnum = (stnum>2?stnum-1:stnum);
295  cand(it->bxNum(),it->whNum(),it->scNum(),stnum,uos,uqa);
296  tracks.push_back(cand);
297  }
298  data->setContainer(tracks);
299 }
The_Container const * getContainer() const
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
template<>
void L1EmulBias::ModifyCollection ( std::unique_ptr< LTCDigiCollection > &  data,
const edm::Handle< LTCDigiCollection emul,
CLHEP::HepRandomEngine *   
)
inline

Definition at line 302 of file L1EmulBias.h.

304  {
305  typedef std::vector<LTCDigi>::const_iterator col_cit;
306  for(col_cit it=emul->begin(); it!=emul->end(); it++) {
307  data->push_back(*it);
308  //note: raw data accessor missing in dataformats!
309  //data->push_back(LTCDigi(it->data()>>1));
310  }
311 }
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
template<>
void L1EmulBias::ModifyCollection ( std::unique_ptr< L1MuGMTCandCollection > &  data,
const edm::Handle< L1MuGMTCandCollection emul,
CLHEP::HepRandomEngine *   
)
inline

Definition at line 314 of file L1EmulBias.h.

316  {
317  //typedef std::vector<L1MuGMTCand> L1MuGMTCandCollection;
318  typedef std::vector<L1MuGMTCand>::const_iterator col_cit;
319  for(col_cit it=emul->begin(); it!=emul->end(); it++) {
320  float phiv = it->phiValue();
321  unsigned dword = it->getDataWord();
322  if(phiv>2. && phiv<4.)
323  dword = dword>>2;
324  L1MuGMTCand cand(dword,it->bx());
325  data->push_back(cand);
326  //cand.setPtPacked(cand.ptIndex()>>1);
327  //data->push_back(L1MuGMTCand((it->getDataWord()>>1),it->bx()));
328  }
329 }
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
template<>
void L1EmulBias::ModifyCollection ( std::unique_ptr< L1MuGMTReadoutCollection > &  data,
const edm::Handle< L1MuGMTReadoutCollection emul,
CLHEP::HepRandomEngine *   
)
inline

Definition at line 332 of file L1EmulBias.h.

References cuy::col, L1MuGMTReadoutCollection::getRecords(), mps_fire::i, L1MuGMTReadoutRecord::setBxNr(), L1MuRegionalCand::setPtPacked(), and L1MuRegionalCand::setType().

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

modify digi

append digi

Definition at line 398 of file L1EmulBias.h.

References CSCCorrelatedLCTDigi::getTrknmb(), and CSCCorrelatedLCTDigi::setTrknmb().

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

Definition at line 429 of file L1EmulBias.h.

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

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

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

Definition at line 115 of file L1EmulBias.cc.

References gather_cfg::cout, dedefs::CTF, dedefs::CTP, dedefs::DTF, dedefs::DTP, dedefs::ETP, dedefs::GCT, edm::Event::getByLabel(), edm::RandomNumberGenerator::getEngine(), dedefs::GLT, dedefs::GMT, dedefs::HTP, edm::HandleBase::isValid(), label, dedefs::LTC, eostools::move(), edm::Event::put(), dedefs::RCT, dedefs::RPC, edm::Event::streamID(), and verbose.

Referenced by beginJob().

115  {
116 
118  CLHEP::HepRandomEngine* engine = &rng->getEngine(iEvent.streamID());
119 
120  if(verbose())
121  std::cout << "L1EmulBias::produce...\n" << std::flush;
122 
128  edm::Handle<L1GctEmCandCollection> gct_isolaem_emul;
129  edm::Handle<L1GctEmCandCollection> gct_noisoem_emul;
130  edm::Handle<L1GctJetCandCollection> gct_cenjets_emul;
131  edm::Handle<L1GctJetCandCollection> gct_forjets_emul;
132  edm::Handle<L1GctJetCandCollection> gct_taujets_emul;
149 
151  if(m_doSys[ETP]) iEvent.getByLabel(m_DEsource[ETP][0].label(),instName[ETP][0], ecal_tp_emul);
152  if(m_doSys[HTP]) iEvent.getByLabel(m_DEsource[HTP][0].label(),instName[HTP][0], hcal_tp_emul);
153  if(m_doSys[RCT]) iEvent.getByLabel(m_DEsource[RCT][0].label(),instName[RCT][0], rct_em_emul);
154  if(m_doSys[RCT]) iEvent.getByLabel(m_DEsource[RCT][0].label(),instName[RCT][0], rct_rgn_emul);
155  if(m_doSys[GCT]) iEvent.getByLabel(m_DEsource[GCT][0].label(),instName[GCT][0],gct_isolaem_emul);
156  if(m_doSys[GCT]) iEvent.getByLabel(m_DEsource[GCT][0].label(),instName[GCT][1],gct_noisoem_emul);
157  if(m_doSys[GCT]) iEvent.getByLabel(m_DEsource[GCT][0].label(),instName[GCT][2],gct_cenjets_emul);
158  if(m_doSys[GCT]) iEvent.getByLabel(m_DEsource[GCT][0].label(),instName[GCT][3],gct_forjets_emul);
159  if(m_doSys[GCT]) iEvent.getByLabel(m_DEsource[GCT][0].label(),instName[GCT][4],gct_taujets_emul);
160  if(m_doSys[DTP]) iEvent.getByLabel(m_DEsource[DTP][0].label(),instName[DTP][0], dtp_ph_emul);
161  if(m_doSys[DTP]) iEvent.getByLabel(m_DEsource[DTP][0].label(),instName[DTP][0], dtp_th_emul);
162  if(m_doSys[DTF]) iEvent.getByLabel(m_DEsource[DTF][0].label(),instName[DTF][0], dtf_emul);
163  if(m_doSys[DTF]) iEvent.getByLabel(m_DEsource[DTF][0].label(),instName[DTF][1], dtf_trk_emul);
164  if(m_doSys[CTP]) iEvent.getByLabel(m_DEsource[CTP][0].label(),instName[CTP][0], ctp_emul);
165  if(m_doSys[CTF]) iEvent.getByLabel(m_DEsource[CTF][0].label(),instName[CTF][0], ctf_emul);
166  if(m_doSys[CTF]) iEvent.getByLabel(m_DEsource[CTF][1].label(),instName[CTF][1], ctf_trk_emul);
167  if(m_doSys[RPC]) iEvent.getByLabel(m_DEsource[RPC][0].label(),instName[RPC][0], rpc_cen_emul);
168  if(m_doSys[RPC]) iEvent.getByLabel(m_DEsource[RPC][0].label(),instName[RPC][1], rpc_for_emul);
169  if(m_doSys[LTC]) iEvent.getByLabel(m_DEsource[LTC][0].label(),instName[LTC][0], ltc_emul);
170  if(m_doSys[GMT]) iEvent.getByLabel(m_DEsource[GMT][0].label(),instName[GMT][0], gmt_emul);
171  if(m_doSys[GMT]) iEvent.getByLabel(m_DEsource[GMT][0].label(),instName[GMT][0], gmt_rdt_emul);
172  if(m_doSys[GLT]) iEvent.getByLabel(m_DEsource[GLT][0].label(),instName[GLT][0], glt_rdt_emul);
173  if(m_doSys[GLT]) iEvent.getByLabel(m_DEsource[GLT][0].label(),instName[GLT][0], glt_evm_emul);
174  if(m_doSys[GLT]) iEvent.getByLabel(m_DEsource[GLT][0].label(),instName[GLT][0], glt_obj_emul);
175 
177  if(m_doSys[ETP]) assert( ecal_tp_emul.isValid());
178  if(m_doSys[HTP]) assert( hcal_tp_emul.isValid());
179  if(m_doSys[RCT]) assert( rct_em_emul.isValid());
180  if(m_doSys[RCT]) assert( rct_rgn_emul.isValid());
181  if(m_doSys[GCT]) assert(gct_isolaem_emul.isValid());
182  if(m_doSys[GCT]) assert(gct_noisoem_emul.isValid());
183  if(m_doSys[GCT]) assert(gct_cenjets_emul.isValid());
184  if(m_doSys[GCT]) assert(gct_forjets_emul.isValid());
185  if(m_doSys[GCT]) assert(gct_taujets_emul.isValid());
186  if(m_doSys[DTP]) assert( dtp_ph_emul.isValid());
187  if(m_doSys[DTP]) assert( dtp_th_emul.isValid());
188  if(m_doSys[DTF]) assert( dtf_emul.isValid());
189  if(m_doSys[DTF]) assert( dtf_trk_emul.isValid());
190  if(m_doSys[CTP]) assert( ctp_emul.isValid());
191  if(m_doSys[CTF]) assert( ctf_emul.isValid());
192  if(m_doSys[CTF]) assert( ctf_trk_emul.isValid());
193  if(m_doSys[RPC]) assert( rpc_cen_emul.isValid());
194  if(m_doSys[RPC]) assert( rpc_for_emul.isValid());
195  if(m_doSys[LTC]) assert( ltc_emul.isValid());
196  if(m_doSys[GMT]) assert( gmt_emul.isValid());
197  if(m_doSys[GMT]) assert( gmt_rdt_emul.isValid());
198  if(m_doSys[GLT]) assert( glt_rdt_emul.isValid());
199  if(m_doSys[GLT]) assert( glt_evm_emul.isValid());
200  if(m_doSys[GLT]) assert( glt_obj_emul.isValid());
201 
203  std::unique_ptr<EcalTrigPrimDigiCollection> ecal_tp_data(new EcalTrigPrimDigiCollection );
204  std::unique_ptr<HcalTrigPrimDigiCollection> hcal_tp_data(new HcalTrigPrimDigiCollection );
205  std::unique_ptr<L1CaloEmCollection> rct_em_data(new L1CaloEmCollection );
206  std::unique_ptr<L1CaloRegionCollection> rct_rgn_data(new L1CaloRegionCollection );
207  std::unique_ptr<L1GctEmCandCollection> gct_isolaem_data(new L1GctEmCandCollection );
208  std::unique_ptr<L1GctEmCandCollection> gct_noisoem_data(new L1GctEmCandCollection );
209  std::unique_ptr<L1GctJetCandCollection> gct_cenjets_data(new L1GctJetCandCollection );
210  std::unique_ptr<L1GctJetCandCollection> gct_forjets_data(new L1GctJetCandCollection );
211  std::unique_ptr<L1GctJetCandCollection> gct_taujets_data(new L1GctJetCandCollection );
212  std::unique_ptr<L1MuDTChambPhContainer> dtp_ph_data(new L1MuDTChambPhContainer );
213  std::unique_ptr<L1MuDTChambThContainer> dtp_th_data(new L1MuDTChambThContainer );
214  std::unique_ptr<L1MuRegionalCandCollection> dtf_data(new L1MuRegionalCandCollection );
215  std::unique_ptr<L1MuDTTrackContainer> dtf_trk_data(new L1MuDTTrackContainer );
216  std::unique_ptr<CSCCorrelatedLCTDigiCollection> ctp_data(new CSCCorrelatedLCTDigiCollection );
217  std::unique_ptr<L1MuRegionalCandCollection> ctf_data(new L1MuRegionalCandCollection );
218  std::unique_ptr<L1CSCTrackCollection> ctf_trk_data(new L1CSCTrackCollection );
219  std::unique_ptr<L1MuRegionalCandCollection> rpc_cen_data(new L1MuRegionalCandCollection );
220  std::unique_ptr<L1MuRegionalCandCollection> rpc_for_data(new L1MuRegionalCandCollection );
221  std::unique_ptr<LTCDigiCollection> ltc_data(new LTCDigiCollection );
222  std::unique_ptr<L1MuGMTCandCollection> gmt_data(new L1MuGMTCandCollection );
223  std::unique_ptr<L1MuGMTReadoutCollection> gmt_rdt_data(new L1MuGMTReadoutCollection );
224  std::unique_ptr<L1GlobalTriggerReadoutRecord> glt_rdt_data(new L1GlobalTriggerReadoutRecord );
225  std::unique_ptr<L1GlobalTriggerEvmReadoutRecord> glt_evm_data(new L1GlobalTriggerEvmReadoutRecord);
226  std::unique_ptr<L1GlobalTriggerObjectMapRecord> glt_obj_data(new L1GlobalTriggerObjectMapRecord );
227 
228  if(verbose())
229  std::cout << "L1EmulBias::produce - modify...\n" << std::flush;
230 
232  if(m_doSys[ETP]) ModifyCollection( ecal_tp_data, ecal_tp_emul, engine);
233  if(m_doSys[HTP]) ModifyCollection( hcal_tp_data, hcal_tp_emul, engine);
234  if(m_doSys[RCT]) ModifyCollection( rct_em_data, rct_em_emul, engine);
235  if(m_doSys[RCT]) ModifyCollection( rct_rgn_data, rct_rgn_emul, engine);
236  if(m_doSys[GCT]) ModifyCollection(gct_isolaem_data,gct_isolaem_emul, engine);
237  if(m_doSys[GCT]) ModifyCollection(gct_noisoem_data,gct_noisoem_emul, engine);
238  if(m_doSys[GCT]) ModifyCollection(gct_cenjets_data,gct_cenjets_emul, engine);
239  if(m_doSys[GCT]) ModifyCollection(gct_forjets_data,gct_forjets_emul, engine);
240  if(m_doSys[GCT]) ModifyCollection(gct_taujets_data,gct_taujets_emul, engine);
241  if(m_doSys[DTP]) ModifyCollection( dtp_ph_data, dtp_ph_emul, engine);
242  if(m_doSys[DTP]) ModifyCollection( dtp_th_data, dtp_th_emul, engine);
243  if(m_doSys[DTF]) ModifyCollection( dtf_data, dtf_emul, engine);
244  if(m_doSys[DTF]) ModifyCollection( dtf_trk_data, dtf_trk_emul, engine);
245  if(m_doSys[CTP]) ModifyCollection( ctp_data, ctp_emul, engine);
246  if(m_doSys[CTF]) ModifyCollection( ctf_data, ctf_emul, engine);
247  if(m_doSys[CTF]) ModifyCollection( ctf_trk_data, ctf_trk_emul, engine);
248  if(m_doSys[RPC]) ModifyCollection( rpc_cen_data, rpc_cen_emul, engine);
249  if(m_doSys[RPC]) ModifyCollection( rpc_for_data, rpc_for_emul, engine);
250  if(m_doSys[LTC]) ModifyCollection( ltc_data, ltc_emul, engine);
251  if(m_doSys[GMT]) ModifyCollection( gmt_data, gmt_emul, engine);
252  if(m_doSys[GMT]) ModifyCollection( gmt_rdt_data, gmt_rdt_emul, engine);
253  if(m_doSys[GLT]) ModifyCollection( glt_rdt_data, glt_rdt_emul, engine);
254  if(m_doSys[GLT]) ModifyCollection( glt_evm_data, glt_evm_emul, engine);
255  if(m_doSys[GLT]) ModifyCollection( glt_obj_data, glt_obj_emul, engine);
256 
257  if(verbose())
258  std::cout << "L1EmulBias::produce - put...\n" << std::flush;
259 
261  if(m_doSys[ETP]) iEvent.put(std::move( ecal_tp_data), instName[ETP][0]);
262  if(m_doSys[HTP]) iEvent.put(std::move( hcal_tp_data), instName[HTP][0]);
263  if(m_doSys[RCT]) iEvent.put(std::move( rct_em_data), instName[RCT][0]);
264  if(m_doSys[RCT]) iEvent.put(std::move( rct_rgn_data), instName[RCT][0]);
265  if(m_doSys[GCT]) iEvent.put(std::move(gct_isolaem_data), instName[GCT][0]);
266  if(m_doSys[GCT]) iEvent.put(std::move(gct_noisoem_data), instName[GCT][1]);
267  if(m_doSys[GCT]) iEvent.put(std::move(gct_cenjets_data), instName[GCT][2]);
268  if(m_doSys[GCT]) iEvent.put(std::move(gct_forjets_data), instName[GCT][3]);
269  if(m_doSys[GCT]) iEvent.put(std::move(gct_taujets_data), instName[GCT][4]);
270  if(m_doSys[DTP]) iEvent.put(std::move( dtp_ph_data), instName[DTP][0]);
271  if(m_doSys[DTP]) iEvent.put(std::move( dtp_th_data), instName[DTP][0]);
272  if(m_doSys[DTF]) iEvent.put(std::move( dtf_data), instName[DTF][0]);
273  if(m_doSys[DTF]) iEvent.put(std::move( dtf_trk_data), instName[DTF][1]);
274  if(m_doSys[CTP]) iEvent.put(std::move( ctp_data), instName[CTP][0]);
275  if(m_doSys[CTF]) iEvent.put(std::move( ctf_data), instName[CTF][0]);
276  if(m_doSys[CTF]) iEvent.put(std::move( ctf_trk_data), instName[CTF][1]);
277  if(m_doSys[RPC]) iEvent.put(std::move( rpc_cen_data), instName[RPC][0]);
278  if(m_doSys[RPC]) iEvent.put(std::move( rpc_for_data), instName[RPC][1]);
279  if(m_doSys[LTC]) iEvent.put(std::move( ltc_data), instName[LTC][0]);
280  if(m_doSys[GMT]) iEvent.put(std::move( gmt_data), instName[GMT][0]);
281  if(m_doSys[GMT]) iEvent.put(std::move( gmt_rdt_data), instName[GMT][0]);
282  if(m_doSys[GLT]) iEvent.put(std::move( glt_rdt_data), instName[GLT][0]);
283  if(m_doSys[GLT]) iEvent.put(std::move( glt_evm_data), instName[GLT][0]);
284  if(m_doSys[GLT]) iEvent.put(std::move( glt_obj_data), instName[GLT][0]);
285 
286  if(verbose())
287  std::cout << "L1EmulBias::produce...done.\n" << std::flush;
288 
289 }
std::vector< L1CaloEmCand > L1CaloEmCollection
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:125
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
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 verbose()
Definition: L1EmulBias.h:54
edm::InputTag m_DEsource[dedefs::DEnsys][2]
Definition: L1EmulBias.h:55
bool isValid() const
Definition: HandleBase.h:74
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:480
std::vector< LTCDigi > LTCDigiCollection
Definition: LTCDigi.h:106
std::vector< L1MuRegionalCand > L1MuRegionalCandCollection
std::string instName[dedefs::DEnsys][5]
Definition: L1EmulBias.h:57
StreamID streamID() const
Definition: Event.h:95
std::vector< L1CaloRegion > L1CaloRegionCollection
def move(src, dest)
Definition: eostools.py:511
std::vector< L1MuGMTCand > L1MuGMTCandCollection
Definition: DEtrait.h:78
std::vector< L1GctEmCand > L1GctEmCandCollection
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

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

Definition at line 57 of file L1EmulBias.h.

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

Definition at line 55 of file L1EmulBias.h.

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

Definition at line 56 of file L1EmulBias.h.

int L1EmulBias::verbose_
private

Definition at line 53 of file L1EmulBias.h.

Referenced by verbose().