CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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::ProductRegistryHelper

Public Member Functions

 L1EmulBias (const edm::ParameterSet &)
 
template<class T >
void ModifyCollection (std::auto_ptr< T > &data, const edm::Handle< T > emul)
 
template<>
void ModifyCollection (std::auto_ptr< EcalTrigPrimDigiCollection > &data, const edm::Handle< EcalTrigPrimDigiCollection > emul)
 
template<>
void ModifyCollection (std::auto_ptr< HcalTrigPrimDigiCollection > &data, const edm::Handle< HcalTrigPrimDigiCollection > emul)
 
template<>
void ModifyCollection (std::auto_ptr< L1CaloEmCollection > &data, const edm::Handle< L1CaloEmCollection > emul)
 
template<>
void ModifyCollection (std::auto_ptr< L1CaloRegionCollection > &data, const edm::Handle< L1CaloRegionCollection > emul)
 
template<>
void ModifyCollection (std::auto_ptr< L1GctEmCandCollection > &data, const edm::Handle< L1GctEmCandCollection >emul)
 
template<>
void ModifyCollection (std::auto_ptr< L1GctJetCandCollection > &data, const edm::Handle< L1GctJetCandCollection > emul)
 
template<>
void ModifyCollection (std::auto_ptr< L1MuRegionalCandCollection > &data, const edm::Handle< L1MuRegionalCandCollection > emul)
 
template<>
void ModifyCollection (std::auto_ptr< L1MuDTTrackContainer > &data, const edm::Handle< L1MuDTTrackContainer > emul)
 
template<>
void ModifyCollection (std::auto_ptr< L1MuDTChambPhContainer > &data, const edm::Handle< L1MuDTChambPhContainer > emul)
 
template<>
void ModifyCollection (std::auto_ptr< L1MuDTChambThContainer > &data, const edm::Handle< L1MuDTChambThContainer > emul)
 
template<>
void ModifyCollection (std::auto_ptr< LTCDigiCollection > &data, const edm::Handle< LTCDigiCollection > emul)
 
template<>
void ModifyCollection (std::auto_ptr< L1MuGMTCandCollection > &data, const edm::Handle< L1MuGMTCandCollection > emul)
 
template<>
void ModifyCollection (std::auto_ptr< L1MuGMTReadoutCollection > &data, const edm::Handle< L1MuGMTReadoutCollection > emul)
 
template<>
void ModifyCollection (std::auto_ptr< CSCCorrelatedLCTDigiCollection > &data, const edm::Handle< CSCCorrelatedLCTDigiCollection > emul)
 
template<>
void ModifyCollection (std::auto_ptr< L1CSCTrackCollection > &data, const edm::Handle< L1CSCTrackCollection > emul)
 
 ~L1EmulBias ()
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
boost::function< void(const
BranchDescription &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 

Protected Member Functions

virtual void beginJob (void)
 
virtual void endJob (void)
 
virtual void produce (edm::Event &, const edm::EventSetup &)
 
- Protected Member Functions inherited from edm::EDProducer
CurrentProcessingContext const * currentContext () const
 
- Protected Member Functions inherited from edm::ProducerBase
template<class TProducer , class TMethod >
void callWhenNewProductsRegistered (TProducer *iProd, TMethod iMethod)
 

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]
 
CLHEP::RandFlat * rndFlat_
 
CLHEP::RandGaussQ * rndGaus_
 
int verbose_
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
typedef WorkerT< EDProducerWorkerType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Detailed Description

Definition at line 38 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 5 of file L1EmulBias.cc.

References gather_cfg::cout, dedefs::CTF, dedefs::CTP, dedefs::DEnsys, dedefs::DTF, dedefs::DTP, dedefs::ETP, dedefs::GCT, edm::RandomNumberGenerator::getEngine(), edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), dedefs::GLT, dedefs::GMT, dedefs::HTP, i, j, diffTwoXMLs::label, dedefs::LTC, dedefs::RCT, dedefs::RPC, dedefs::SystLabel, and validate_alignment_devdb10_cfg::verbose.

5  {
6 
7  verbose_ = iConfig.getUntrackedParameter<int>("VerboseFlag",0);
8 
9  for(int sys=0; sys<DEnsys; sys++) {
10  std::string label = SystLabel[sys] + "source";
11  m_DEsource[sys][0] = iConfig.getParameter<edm::InputTag>(label);
12  if(sys==CTF) {
13  std::string label = "CTTsource";
14  m_DEsource[sys][1] = iConfig.getParameter<edm::InputTag>(label);
15  }
16  }
17 
18  std::vector<unsigned int> compColls
19  = iConfig.getUntrackedParameter<std::vector<unsigned int> >("DO_SYSTEM");
20  for(int i=0; i<DEnsys; i++)
21  m_doSys[i] = compColls[i];
22 
23  if(verbose()) {
24  std::cout << "[L1EmulBias] do sys? ";
25  for(int i=0; i<DEnsys; i++)
26  std::cout << m_doSys[i];
27  std::cout << "\n\t";
28  for(int i=0; i<DEnsys; i++)
29  if(m_doSys[i])
30  std::cout << SystLabel[i] << " ";
31  std::cout << std::endl;
32  }
33 
34  std::string CollInstName[DEnsys][5];
35  for(int i=0; i<DEnsys; i++)
36  for(int j=0; j<5; j++)
37  CollInstName[i][j]=std::string("");
38 
39  CollInstName[GCT][0]+="isoEm" ;
40  CollInstName[GCT][1]+="nonIsoEm";
41  CollInstName[GCT][2]+="cenJets" ;
42  CollInstName[GCT][3]+="forJets" ;
43  CollInstName[GCT][4]+="tauJets" ;
44  CollInstName[DTF][0]+="DT" ;
45  CollInstName[DTF][1]+="DTTF" ;
46  CollInstName[CTF][0]+="CSC" ;
47  CollInstName[CTF][1]+="" ;
48  CollInstName[RPC][0]+="RPCb" ;
49  CollInstName[RPC][1]+="RPCf" ;
50 
51  for(int i=0; i<DEnsys; i++)
52  for(int j=0; j<5; j++)
53  instName[i][j] = CollInstName[i][j];
54 
55  if(verbose())
56  for(int i=0; i<DEnsys; i++)
57  for(int j=0; j<5; j++)
58  if(instName[i][j] != "")
59  std::cout << "[emulbias] " << i << " " << SystLabel[i]
60  << " " << j << " " << instName[i][j]
61  << std::endl;
62 
64  assert(ETP==0); assert(HTP==1); assert(RCT== 2); assert(GCT== 3);
65  assert(DTP==4); assert(DTF==5); assert(CTP== 6); assert(CTF== 7);
66  assert(RPC==8); assert(LTC==9); assert(GMT==10); assert(GLT==11);
67 
69  if(m_doSys[ETP]) produces<EcalTrigPrimDigiCollection> (instName[ETP][0]);
70  if(m_doSys[HTP]) produces<HcalTrigPrimDigiCollection> (instName[HTP][0]);
71  if(m_doSys[RCT]) produces<L1CaloEmCollection> (instName[RCT][0]);
72  if(m_doSys[RCT]) produces<L1CaloRegionCollection> (instName[RCT][0]);
73  if(m_doSys[GCT]) produces<L1GctEmCandCollection> (instName[GCT][0]);
74  if(m_doSys[GCT]) produces<L1GctEmCandCollection> (instName[GCT][1]);
75  if(m_doSys[GCT]) produces<L1GctJetCandCollection> (instName[GCT][2]);
76  if(m_doSys[GCT]) produces<L1GctJetCandCollection> (instName[GCT][3]);
77  if(m_doSys[GCT]) produces<L1GctJetCandCollection> (instName[GCT][4]);
78  if(m_doSys[DTP]) produces<L1MuDTChambPhContainer> (instName[DTP][0]);
79  if(m_doSys[DTP]) produces<L1MuDTChambThContainer> (instName[DTP][0]);
80  if(m_doSys[DTF]) produces<L1MuRegionalCandCollection> (instName[DTF][0]);
81  if(m_doSys[DTF]) produces<L1MuDTTrackContainer> (instName[DTF][1]);
82  if(m_doSys[CTP]) produces<CSCCorrelatedLCTDigiCollection> (instName[CTP][0]);
83  if(m_doSys[CTF]) produces<L1MuRegionalCandCollection> (instName[CTF][0]);
84  if(m_doSys[CTF]) produces<L1CSCTrackCollection> (instName[CTF][1]);
85  if(m_doSys[RPC]) produces<L1MuRegionalCandCollection> (instName[RPC][0]);
86  if(m_doSys[RPC]) produces<L1MuRegionalCandCollection> (instName[RPC][1]);
87  if(m_doSys[LTC]) produces<LTCDigiCollection> (instName[LTC][0]);
88  if(m_doSys[GMT]) produces<L1MuGMTCandCollection> (instName[GMT][0]);
89  if(m_doSys[GMT]) produces<L1MuGMTReadoutCollection> (instName[GMT][0]);
90  if(m_doSys[GLT]) produces<L1GlobalTriggerReadoutRecord> (instName[GLT][0]);
91  if(m_doSys[GLT]) produces<L1GlobalTriggerEvmReadoutRecord>(instName[GLT][0]);
92  if(m_doSys[GLT]) produces<L1GlobalTriggerObjectMapRecord> (instName[GLT][0]);
93 
95  CLHEP::HepRandomEngine& engine = rng->getEngine();
96  rndFlat_ = new CLHEP::RandFlat (engine, 0., 1.);
97  rndGaus_ = new CLHEP::RandGaussQ(engine, 0., 1.);
98 
99  if(verbose())
100  std::cout << "L1EmulBias::L1EmulBias()... done." << std::endl;
101 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
int i
Definition: DBlmapReader.cc:9
const int DEnsys
Definition: DEtrait.h:38
bool m_doSys[dedefs::DEnsys]
Definition: L1EmulBias.h:58
CLHEP::RandFlat * rndFlat_
Definition: L1EmulBias.h:60
int verbose()
Definition: L1EmulBias.h:56
CLHEP::RandGaussQ * rndGaus_
Definition: L1EmulBias.h:61
int j
Definition: DBlmapReader.cc:9
virtual CLHEP::HepRandomEngine & getEngine() const =0
Use this to get the random number engine, this is the only function most users should call...
edm::InputTag m_DEsource[dedefs::DEnsys][2]
Definition: L1EmulBias.h:57
std::string instName[dedefs::DEnsys][5]
Definition: L1EmulBias.h:59
int verbose_
Definition: L1EmulBias.h:55
const std::string SystLabel[DEnsys]
Definition: DEtrait.h:45
tuple cout
Definition: gather_cfg.py:121
L1EmulBias::~L1EmulBias ( )

Definition at line 103 of file L1EmulBias.cc.

103  {
104  delete rndFlat_;
105  delete rndGaus_;
106 }
CLHEP::RandFlat * rndFlat_
Definition: L1EmulBias.h:60
CLHEP::RandGaussQ * rndGaus_
Definition: L1EmulBias.h:61

Member Function Documentation

virtual void L1EmulBias::beginJob ( void  )
inlineprotectedvirtual

Reimplemented from edm::EDProducer.

Definition at line 45 of file L1EmulBias.h.

45 {};
virtual void L1EmulBias::endJob ( void  )
inlineprotectedvirtual

Reimplemented from edm::EDProducer.

Definition at line 48 of file L1EmulBias.h.

48 {};
template<class T >
void L1EmulBias::ModifyCollection ( std::auto_ptr< T > &  data,
const edm::Handle< T emul 
)

Definition at line 73 of file L1EmulBias.h.

References edm::Handle< T >::product().

73  {
74  data = (std::auto_ptr<T>)(const_cast<T*>(emul.product()));
75 }
T const * product() const
Definition: Handle.h:74
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
template<>
void L1EmulBias::ModifyCollection ( std::auto_ptr< EcalTrigPrimDigiCollection > &  data,
const edm::Handle< EcalTrigPrimDigiCollection emul 
)
inline

Definition at line 78 of file L1EmulBias.h.

References gather_cfg::cout, EcalTriggerPrimitiveSample::raw(), reset(), alignCSCRings::s, compare_using_db::sample, EcalTriggerPrimitiveDigi::sample(), EcalTriggerPrimitiveDigi::setSampleValue(), tmp, and verbose().

79  {
81  for(col_cit it = emul->begin(); it!=emul->end(); it++) {
82  EcalTriggerPrimitiveDigi col(*it);
83  int iphi = it->id().iphi();
84  bool reset = (iphi>18 && iphi<39);//remove few supermodules
85  for(int s=0; s<5; s++) {
86  uint16_t sample = it->sample(s).raw();
87  if(sample==0) continue;
88  uint16_t tmp = reset?0:sample;
89  if(reset)
90  tmp = sample>>1;
91  col.setSampleValue(s,tmp);
92  if(verbose() && sample!=0)
93  std::cout << "[emulbias] etp " << *it << "\t sample: " << s << " "
94  << std::hex << sample << " -> " << col.sample(s).raw()
95  << std::dec << std::endl;
96  }
97  data->push_back(col);
98  }
99 }
std::vector< T >::const_iterator const_iterator
int verbose()
Definition: L1EmulBias.h:56
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
tuple cout
Definition: gather_cfg.py:121
void reset(double vett[256])
Definition: TPedValues.cc:11
template<>
void L1EmulBias::ModifyCollection ( std::auto_ptr< HcalTrigPrimDigiCollection > &  data,
const edm::Handle< HcalTrigPrimDigiCollection emul 
)
inline

Definition at line 102 of file L1EmulBias.h.

References reset(), alignCSCRings::s, compare_using_db::sample, HcalTriggerPrimitiveDigi::setSample(), and tmp.

103  {
105  for(col_cit it = emul->begin(); it!=emul->end(); it++) {
106  HcalTriggerPrimitiveDigi col(*it);
107  int iphi = it->id().iphi();
108  bool reset = (iphi>18 && iphi<27);//remove few supermodules
109  for(int s=0; s<5; s++) {
110  uint16_t sample = it->sample(s).raw();
111  if(sample==0) continue;
112  uint16_t tmp = reset?0:sample;
113  if(reset)
114  tmp = sample>>1;
115  col.setSample(s,tmp);
116  }
117  data->push_back(col);
118  }
119 }
std::vector< T >::const_iterator const_iterator
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
void reset(double vett[256])
Definition: TPedValues.cc:11
template<>
void L1EmulBias::ModifyCollection ( std::auto_ptr< L1CaloEmCollection > &  data,
const edm::Handle< L1CaloEmCollection emul 
)
inline

Definition at line 122 of file L1EmulBias.h.

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

Definition at line 141 of file L1EmulBias.h.

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

Definition at line 158 of file L1EmulBias.h.

References rndFlat_.

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*rndFlat_->fire()) //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 }
CLHEP::RandFlat * rndFlat_
Definition: L1EmulBias.h:60
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::auto_ptr< L1GctJetCandCollection > &  data,
const edm::Handle< L1GctJetCandCollection emul 
)
inline

Definition at line 174 of file L1EmulBias.h.

References rndFlat_.

175  {
176  typedef L1GctJetCandCollection::const_iterator col_cit;
177  for(col_cit it = emul->begin(); it!=emul->end(); it++) {
178  unsigned raw = it->raw();
179  uint16_t rdata = raw;
180  if(it->phiIndex()<4*rndFlat_->fire()) //0-17
181  rdata = raw>>1;
182  L1GctJetCand cand(rdata,it->isTau(),it->isForward());
183  data->push_back(cand);
184  }
185  //L1GctJetCand(uint16_t data, bool isTau, bool isFor);
186 }
Level-1 Trigger jet candidate.
Definition: L1GctJetCand.h:18
CLHEP::RandFlat * rndFlat_
Definition: L1EmulBias.h:60
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
template<>
void L1EmulBias::ModifyCollection ( std::auto_ptr< L1MuRegionalCandCollection > &  data,
const edm::Handle< L1MuRegionalCandCollection emul 
)
inline

Definition at line 189 of file L1EmulBias.h.

References phi, and L1MuRegionalCand::setPtPacked().

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 = rndGaus_->fire();
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*rndFlat_->fire());
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:82
Definition: DDAxes.h:10
template<>
void L1EmulBias::ModifyCollection ( std::auto_ptr< L1MuDTTrackContainer > &  data,
const edm::Handle< L1MuDTTrackContainer emul 
)
inline

Definition at line 226 of file L1EmulBias.h.

References L1MuRegionalCand::setPtPacked(), L1MuRegionalCand::setQualityPacked(), L1MuRegionalCand::setType(), and testEve_cfg::tracks.

227  {
228  typedef std::vector<L1MuDTTrackCand> TrackContainer;
229  typedef TrackContainer::const_iterator col_cit;
230  TrackContainer* tracks_in = emul->getContainer();
231  TrackContainer tracks;
232  for(col_cit it = tracks_in->begin(); it!=tracks_in->end(); it++) {
233  L1MuDTTrackCand cand(*it);
234  cand.setType(it->type_idx());
235  unsigned pt = it->pt_packed(); //0..31
236  unsigned qua = it->quality(); //0..7
237  if(qua<4) {
238  cand.setPtPacked((pt>>2)&0x1f);
239  cand.setQualityPacked((qua<<1)&0x07);
240  }
241  tracks.push_back(cand);
242  }
243  data->setContainer(tracks);
244  /* few alternatives...
245  unsigned phip = it->phi_packed();
246  unsigned raw = it->getDataWord();
247  uint16_t rdata = raw;
248  if(2.5<fabs(it->phiValue())<3.0)
249  rdata = raw>>1;
250  L1MuRegionalCand cand(rdata,it->bx());
251  double rnd = rndFlat_->fire();
252  */
253 }
std::vector< TrackWithHistory * > TrackContainer
Definition: TrackContainer.h:8
tuple tracks
Definition: testEve_cfg.py:39
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
template<>
void L1EmulBias::ModifyCollection ( std::auto_ptr< L1MuDTChambPhContainer > &  data,
const edm::Handle< L1MuDTChambPhContainer emul 
)
inline

Definition at line 256 of file L1EmulBias.h.

References testEve_cfg::tracks.

257  {
258  typedef std::vector<L1MuDTChambPhDigi> Phi_Container;
259  typedef Phi_Container::const_iterator col_it;
260  Phi_Container* tracks_in = emul->getContainer();
261  Phi_Container tracks(tracks_in->size());
262  int uqua;
263  for(col_it it=tracks_in->begin(); it!=tracks_in->end(); it++) {
264  uqua = it->code(); // (int)(10*rndFlat_->fire());
265  uqua = (uqua<2?uqua+1:uqua);
267  cand(it->bxNum(),it->whNum(),it->scNum(),it->stNum(),
268  it->phi(),it->phiB(),uqua,it->Ts2Tag(),it->BxCnt() );
269  tracks.push_back(cand);
270  }
271  data->setContainer(tracks);
272 }
tuple tracks
Definition: testEve_cfg.py:39
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
template<>
void L1EmulBias::ModifyCollection ( std::auto_ptr< L1MuDTChambThContainer > &  data,
const edm::Handle< L1MuDTChambThContainer emul 
)
inline

Definition at line 275 of file L1EmulBias.h.

References j, and testEve_cfg::tracks.

276  {
277  typedef std::vector<L1MuDTChambThDigi> Thi_Container;
278  typedef Thi_Container::const_iterator col_cit;
279  Thi_Container* tracks_in = emul->getContainer();
280  Thi_Container tracks(tracks_in->size());
281  int uos[7],uqa[7];
282  for(col_cit it=tracks_in->begin(); it!=tracks_in->end(); it++) {
283  for(int j=0; j<7; j++) {
284  uos[j]=(it->position(j)?0:1);
285  uqa[j]=(it->quality (j)?0:1);
286  }
287  int stnum = it->stNum();
288  stnum = (stnum>2?stnum-1:stnum);
290  cand(it->bxNum(),it->whNum(),it->scNum(),stnum,uos,uqa);
291  tracks.push_back(cand);
292  }
293  data->setContainer(tracks);
294 }
int j
Definition: DBlmapReader.cc:9
tuple tracks
Definition: testEve_cfg.py:39
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
template<>
void L1EmulBias::ModifyCollection ( std::auto_ptr< LTCDigiCollection > &  data,
const edm::Handle< LTCDigiCollection emul 
)
inline

Definition at line 297 of file L1EmulBias.h.

298  {
299  typedef std::vector<LTCDigi>::const_iterator col_cit;
300  for(col_cit it=emul->begin(); it!=emul->end(); it++) {
301  data->push_back(*it);
302  //note: raw data accessor missing in dataformats!
303  //data->push_back(LTCDigi(it->data()>>1));
304  }
305 }
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
template<>
void L1EmulBias::ModifyCollection ( std::auto_ptr< L1MuGMTCandCollection > &  data,
const edm::Handle< L1MuGMTCandCollection emul 
)
inline

Definition at line 308 of file L1EmulBias.h.

309  {
310  //typedef std::vector<L1MuGMTCand> L1MuGMTCandCollection;
311  typedef std::vector<L1MuGMTCand>::const_iterator col_cit;
312  for(col_cit it=emul->begin(); it!=emul->end(); it++) {
313  float phiv = it->phiValue();
314  unsigned dword = it->getDataWord();
315  if(phiv>2. && phiv<4.)
316  dword = dword>>2;
317  L1MuGMTCand cand(dword,it->bx());
318  data->push_back(cand);
319  //cand.setPtPacked(cand.ptIndex()>>1);
320  //data->push_back(L1MuGMTCand((it->getDataWord()>>1),it->bx()));
321  }
322 }
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
template<>
void L1EmulBias::ModifyCollection ( std::auto_ptr< L1MuGMTReadoutCollection > &  data,
const edm::Handle< L1MuGMTReadoutCollection emul 
)
inline

Definition at line 325 of file L1EmulBias.h.

References i, L1MuGMTReadoutRecord::setBxNr(), L1MuRegionalCand::setPtPacked(), and L1MuRegionalCand::setType().

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

modify digi

append digi

Definition at line 390 of file L1EmulBias.h.

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

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

Definition at line 420 of file L1EmulBias.h.

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

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

list the emulated collections

get the emulated collections

assert collection validity

declare the data collections

fill data as modified emul collections

append data into event

Implements edm::EDProducer.

Definition at line 110 of file L1EmulBias.cc.

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

110  {
111 
112  if(verbose())
113  std::cout << "L1EmulBias::produce...\n" << std::flush;
114 
120  edm::Handle<L1GctEmCandCollection> gct_isolaem_emul;
121  edm::Handle<L1GctEmCandCollection> gct_noisoem_emul;
122  edm::Handle<L1GctJetCandCollection> gct_cenjets_emul;
123  edm::Handle<L1GctJetCandCollection> gct_forjets_emul;
124  edm::Handle<L1GctJetCandCollection> gct_taujets_emul;
141 
143  if(m_doSys[ETP]) iEvent.getByLabel(m_DEsource[ETP][0].label(),instName[ETP][0], ecal_tp_emul);
144  if(m_doSys[HTP]) iEvent.getByLabel(m_DEsource[HTP][0].label(),instName[HTP][0], hcal_tp_emul);
145  if(m_doSys[RCT]) iEvent.getByLabel(m_DEsource[RCT][0].label(),instName[RCT][0], rct_em_emul);
146  if(m_doSys[RCT]) iEvent.getByLabel(m_DEsource[RCT][0].label(),instName[RCT][0], rct_rgn_emul);
147  if(m_doSys[GCT]) iEvent.getByLabel(m_DEsource[GCT][0].label(),instName[GCT][0],gct_isolaem_emul);
148  if(m_doSys[GCT]) iEvent.getByLabel(m_DEsource[GCT][0].label(),instName[GCT][1],gct_noisoem_emul);
149  if(m_doSys[GCT]) iEvent.getByLabel(m_DEsource[GCT][0].label(),instName[GCT][2],gct_cenjets_emul);
150  if(m_doSys[GCT]) iEvent.getByLabel(m_DEsource[GCT][0].label(),instName[GCT][3],gct_forjets_emul);
151  if(m_doSys[GCT]) iEvent.getByLabel(m_DEsource[GCT][0].label(),instName[GCT][4],gct_taujets_emul);
152  if(m_doSys[DTP]) iEvent.getByLabel(m_DEsource[DTP][0].label(),instName[DTP][0], dtp_ph_emul);
153  if(m_doSys[DTP]) iEvent.getByLabel(m_DEsource[DTP][0].label(),instName[DTP][0], dtp_th_emul);
154  if(m_doSys[DTF]) iEvent.getByLabel(m_DEsource[DTF][0].label(),instName[DTF][0], dtf_emul);
155  if(m_doSys[DTF]) iEvent.getByLabel(m_DEsource[DTF][0].label(),instName[DTF][1], dtf_trk_emul);
156  if(m_doSys[CTP]) iEvent.getByLabel(m_DEsource[CTP][0].label(),instName[CTP][0], ctp_emul);
157  if(m_doSys[CTF]) iEvent.getByLabel(m_DEsource[CTF][0].label(),instName[CTF][0], ctf_emul);
158  if(m_doSys[CTF]) iEvent.getByLabel(m_DEsource[CTF][1].label(),instName[CTF][1], ctf_trk_emul);
159  if(m_doSys[RPC]) iEvent.getByLabel(m_DEsource[RPC][0].label(),instName[RPC][0], rpc_cen_emul);
160  if(m_doSys[RPC]) iEvent.getByLabel(m_DEsource[RPC][0].label(),instName[RPC][1], rpc_for_emul);
161  if(m_doSys[LTC]) iEvent.getByLabel(m_DEsource[LTC][0].label(),instName[LTC][0], ltc_emul);
162  if(m_doSys[GMT]) iEvent.getByLabel(m_DEsource[GMT][0].label(),instName[GMT][0], gmt_emul);
163  if(m_doSys[GMT]) iEvent.getByLabel(m_DEsource[GMT][0].label(),instName[GMT][0], gmt_rdt_emul);
164  if(m_doSys[GLT]) iEvent.getByLabel(m_DEsource[GLT][0].label(),instName[GLT][0], glt_rdt_emul);
165  if(m_doSys[GLT]) iEvent.getByLabel(m_DEsource[GLT][0].label(),instName[GLT][0], glt_evm_emul);
166  if(m_doSys[GLT]) iEvent.getByLabel(m_DEsource[GLT][0].label(),instName[GLT][0], glt_obj_emul);
167 
169  if(m_doSys[ETP]) assert( ecal_tp_emul.isValid());
170  if(m_doSys[HTP]) assert( hcal_tp_emul.isValid());
171  if(m_doSys[RCT]) assert( rct_em_emul.isValid());
172  if(m_doSys[RCT]) assert( rct_rgn_emul.isValid());
173  if(m_doSys[GCT]) assert(gct_isolaem_emul.isValid());
174  if(m_doSys[GCT]) assert(gct_noisoem_emul.isValid());
175  if(m_doSys[GCT]) assert(gct_cenjets_emul.isValid());
176  if(m_doSys[GCT]) assert(gct_forjets_emul.isValid());
177  if(m_doSys[GCT]) assert(gct_taujets_emul.isValid());
178  if(m_doSys[DTP]) assert( dtp_ph_emul.isValid());
179  if(m_doSys[DTP]) assert( dtp_th_emul.isValid());
180  if(m_doSys[DTF]) assert( dtf_emul.isValid());
181  if(m_doSys[DTF]) assert( dtf_trk_emul.isValid());
182  if(m_doSys[CTP]) assert( ctp_emul.isValid());
183  if(m_doSys[CTF]) assert( ctf_emul.isValid());
184  if(m_doSys[CTF]) assert( ctf_trk_emul.isValid());
185  if(m_doSys[RPC]) assert( rpc_cen_emul.isValid());
186  if(m_doSys[RPC]) assert( rpc_for_emul.isValid());
187  if(m_doSys[LTC]) assert( ltc_emul.isValid());
188  if(m_doSys[GMT]) assert( gmt_emul.isValid());
189  if(m_doSys[GMT]) assert( gmt_rdt_emul.isValid());
190  if(m_doSys[GLT]) assert( glt_rdt_emul.isValid());
191  if(m_doSys[GLT]) assert( glt_evm_emul.isValid());
192  if(m_doSys[GLT]) assert( glt_obj_emul.isValid());
193 
195  std::auto_ptr<EcalTrigPrimDigiCollection> ecal_tp_data(new EcalTrigPrimDigiCollection );
196  std::auto_ptr<HcalTrigPrimDigiCollection> hcal_tp_data(new HcalTrigPrimDigiCollection );
197  std::auto_ptr<L1CaloEmCollection> rct_em_data(new L1CaloEmCollection );
198  std::auto_ptr<L1CaloRegionCollection> rct_rgn_data(new L1CaloRegionCollection );
199  std::auto_ptr<L1GctEmCandCollection> gct_isolaem_data(new L1GctEmCandCollection );
200  std::auto_ptr<L1GctEmCandCollection> gct_noisoem_data(new L1GctEmCandCollection );
201  std::auto_ptr<L1GctJetCandCollection> gct_cenjets_data(new L1GctJetCandCollection );
202  std::auto_ptr<L1GctJetCandCollection> gct_forjets_data(new L1GctJetCandCollection );
203  std::auto_ptr<L1GctJetCandCollection> gct_taujets_data(new L1GctJetCandCollection );
204  std::auto_ptr<L1MuDTChambPhContainer> dtp_ph_data(new L1MuDTChambPhContainer );
205  std::auto_ptr<L1MuDTChambThContainer> dtp_th_data(new L1MuDTChambThContainer );
206  std::auto_ptr<L1MuRegionalCandCollection> dtf_data(new L1MuRegionalCandCollection );
207  std::auto_ptr<L1MuDTTrackContainer> dtf_trk_data(new L1MuDTTrackContainer );
208  std::auto_ptr<CSCCorrelatedLCTDigiCollection> ctp_data(new CSCCorrelatedLCTDigiCollection );
209  std::auto_ptr<L1MuRegionalCandCollection> ctf_data(new L1MuRegionalCandCollection );
210  std::auto_ptr<L1CSCTrackCollection> ctf_trk_data(new L1CSCTrackCollection );
211  std::auto_ptr<L1MuRegionalCandCollection> rpc_cen_data(new L1MuRegionalCandCollection );
212  std::auto_ptr<L1MuRegionalCandCollection> rpc_for_data(new L1MuRegionalCandCollection );
213  std::auto_ptr<LTCDigiCollection> ltc_data(new LTCDigiCollection );
214  std::auto_ptr<L1MuGMTCandCollection> gmt_data(new L1MuGMTCandCollection );
215  std::auto_ptr<L1MuGMTReadoutCollection> gmt_rdt_data(new L1MuGMTReadoutCollection );
216  std::auto_ptr<L1GlobalTriggerReadoutRecord> glt_rdt_data(new L1GlobalTriggerReadoutRecord );
217  std::auto_ptr<L1GlobalTriggerEvmReadoutRecord> glt_evm_data(new L1GlobalTriggerEvmReadoutRecord);
218  std::auto_ptr<L1GlobalTriggerObjectMapRecord> glt_obj_data(new L1GlobalTriggerObjectMapRecord );
219 
220  if(verbose())
221  std::cout << "L1EmulBias::produce - modify...\n" << std::flush;
222 
224  if(m_doSys[ETP]) ModifyCollection( ecal_tp_data, ecal_tp_emul);
225  if(m_doSys[HTP]) ModifyCollection( hcal_tp_data, hcal_tp_emul);
226  if(m_doSys[RCT]) ModifyCollection( rct_em_data, rct_em_emul);
227  if(m_doSys[RCT]) ModifyCollection( rct_rgn_data, rct_rgn_emul);
228  if(m_doSys[GCT]) ModifyCollection(gct_isolaem_data,gct_isolaem_emul);
229  if(m_doSys[GCT]) ModifyCollection(gct_noisoem_data,gct_noisoem_emul);
230  if(m_doSys[GCT]) ModifyCollection(gct_cenjets_data,gct_cenjets_emul);
231  if(m_doSys[GCT]) ModifyCollection(gct_forjets_data,gct_forjets_emul);
232  if(m_doSys[GCT]) ModifyCollection(gct_taujets_data,gct_taujets_emul);
233  if(m_doSys[DTP]) ModifyCollection( dtp_ph_data, dtp_ph_emul);
234  if(m_doSys[DTP]) ModifyCollection( dtp_th_data, dtp_th_emul);
235  if(m_doSys[DTF]) ModifyCollection( dtf_data, dtf_emul);
236  if(m_doSys[DTF]) ModifyCollection( dtf_trk_data, dtf_trk_emul);
237  if(m_doSys[CTP]) ModifyCollection( ctp_data, ctp_emul);
238  if(m_doSys[CTF]) ModifyCollection( ctf_data, ctf_emul);
239  if(m_doSys[CTF]) ModifyCollection( ctf_trk_data, ctf_trk_emul);
240  if(m_doSys[RPC]) ModifyCollection( rpc_cen_data, rpc_cen_emul);
241  if(m_doSys[RPC]) ModifyCollection( rpc_for_data, rpc_for_emul);
242  if(m_doSys[LTC]) ModifyCollection( ltc_data, ltc_emul);
243  if(m_doSys[GMT]) ModifyCollection( gmt_data, gmt_emul);
244  if(m_doSys[GMT]) ModifyCollection( gmt_rdt_data, gmt_rdt_emul);
245  if(m_doSys[GLT]) ModifyCollection( glt_rdt_data, glt_rdt_emul);
246  if(m_doSys[GLT]) ModifyCollection( glt_evm_data, glt_evm_emul);
247  if(m_doSys[GLT]) ModifyCollection( glt_obj_data, glt_obj_emul);
248 
249  if(verbose())
250  std::cout << "L1EmulBias::produce - put...\n" << std::flush;
251 
253  if(m_doSys[ETP]) iEvent.put( ecal_tp_data, instName[ETP][0]);
254  if(m_doSys[HTP]) iEvent.put( hcal_tp_data, instName[HTP][0]);
255  if(m_doSys[RCT]) iEvent.put( rct_em_data, instName[RCT][0]);
256  if(m_doSys[RCT]) iEvent.put( rct_rgn_data, instName[RCT][0]);
257  if(m_doSys[GCT]) iEvent.put(gct_isolaem_data, instName[GCT][0]);
258  if(m_doSys[GCT]) iEvent.put(gct_noisoem_data, instName[GCT][1]);
259  if(m_doSys[GCT]) iEvent.put(gct_cenjets_data, instName[GCT][2]);
260  if(m_doSys[GCT]) iEvent.put(gct_forjets_data, instName[GCT][3]);
261  if(m_doSys[GCT]) iEvent.put(gct_taujets_data, instName[GCT][4]);
262  if(m_doSys[DTP]) iEvent.put( dtp_ph_data, instName[DTP][0]);
263  if(m_doSys[DTP]) iEvent.put( dtp_th_data, instName[DTP][0]);
264  if(m_doSys[DTF]) iEvent.put( dtf_data, instName[DTF][0]);
265  if(m_doSys[DTF]) iEvent.put( dtf_trk_data, instName[DTF][1]);
266  if(m_doSys[CTP]) iEvent.put( ctp_data, instName[CTP][0]);
267  if(m_doSys[CTF]) iEvent.put( ctf_data, instName[CTF][0]);
268  if(m_doSys[CTF]) iEvent.put( ctf_trk_data, instName[CTF][1]);
269  if(m_doSys[RPC]) iEvent.put( rpc_cen_data, instName[RPC][0]);
270  if(m_doSys[RPC]) iEvent.put( rpc_for_data, instName[RPC][1]);
271  if(m_doSys[LTC]) iEvent.put( ltc_data, instName[LTC][0]);
272  if(m_doSys[GMT]) iEvent.put( gmt_data, instName[GMT][0]);
273  if(m_doSys[GMT]) iEvent.put( gmt_rdt_data, instName[GMT][0]);
274  if(m_doSys[GLT]) iEvent.put( glt_rdt_data, instName[GLT][0]);
275  if(m_doSys[GLT]) iEvent.put( glt_evm_data, instName[GLT][0]);
276  if(m_doSys[GLT]) iEvent.put( glt_obj_data, instName[GLT][0]);
277 
278  if(verbose())
279  std::cout << "L1EmulBias::produce...done.\n" << std::flush;
280 
281 }
std::vector< L1CaloEmCand > L1CaloEmCollection
bool m_doSys[dedefs::DEnsys]
Definition: L1EmulBias.h:58
void ModifyCollection(std::auto_ptr< T > &data, const edm::Handle< T > emul)
Definition: L1EmulBias.h:73
std::vector< L1CSCTrack > L1CSCTrackCollection
std::vector< L1GctJetCand > L1GctJetCandCollection
int verbose()
Definition: L1EmulBias.h:56
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:85
edm::InputTag m_DEsource[dedefs::DEnsys][2]
Definition: L1EmulBias.h:57
bool isValid() const
Definition: HandleBase.h:76
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
std::vector< LTCDigi > LTCDigiCollection
Definition: LTCDigi.h:107
std::vector< L1MuRegionalCand > L1MuRegionalCandCollection
std::string instName[dedefs::DEnsys][5]
Definition: L1EmulBias.h:59
tuple cout
Definition: gather_cfg.py:121
std::vector< L1CaloRegion > L1CaloRegionCollection
std::vector< L1MuGMTCand > L1MuGMTCandCollection
Definition: DEtrait.h:77
std::vector< L1GctEmCand > L1GctEmCandCollection
int L1EmulBias::verbose ( )
inlineprivate

Definition at line 56 of file L1EmulBias.h.

References verbose_.

Referenced by ModifyCollection().

56 {return verbose_;}
int verbose_
Definition: L1EmulBias.h:55

Member Data Documentation

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

Definition at line 59 of file L1EmulBias.h.

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

Definition at line 57 of file L1EmulBias.h.

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

Definition at line 58 of file L1EmulBias.h.

CLHEP::RandFlat* L1EmulBias::rndFlat_
private

Definition at line 60 of file L1EmulBias.h.

Referenced by ModifyCollection().

CLHEP::RandGaussQ* L1EmulBias::rndGaus_
private

Definition at line 61 of file L1EmulBias.h.

int L1EmulBias::verbose_
private

Definition at line 55 of file L1EmulBias.h.

Referenced by verbose().