CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
L1DummyProducer Class Reference

#include <L1DummyProducer.h>

Inheritance diagram for L1DummyProducer:
edm::EDProducer edm::ProducerBase edm::ProductRegistryHelper

Public Member Functions

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

Private Member Functions

virtual void beginJob (void)
 
virtual void endJob ()
 
virtual void produce (edm::Event &, const edm::EventSetup &)
 
int verbose ()
 

Private Attributes

double EBase_
 
double ESigm_
 
std::string instName [dedefs::DEnsys][5]
 
bool m_doSys [dedefs::DEnsys]
 
int nevt_
 
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)
 
- 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)
 

Detailed Description

Definition at line 40 of file L1DummyProducer.h.

Constructor & Destructor Documentation

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

assertions/temporary

list of collections to be produced

rnd # settings

Definition at line 5 of file L1DummyProducer.cc.

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

Definition at line 103 of file L1DummyProducer.cc.

103  {
104  delete rndFlat_;
105  delete rndGaus_;
106 }
CLHEP::RandFlat * rndFlat_
CLHEP::RandGaussQ * rndGaus_

Member Function Documentation

virtual void L1DummyProducer::beginJob ( void  )
inlineprivatevirtual

Reimplemented from edm::EDProducer.

Definition at line 49 of file L1DummyProducer.h.

49 {};
virtual void L1DummyProducer::endJob ( void  )
inlineprivatevirtual

Reimplemented from edm::EDProducer.

Definition at line 52 of file L1DummyProducer.h.

52 {};
void L1DummyProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
privatevirtual

define the data collections

fill candidate collections

put collection

Implements edm::EDProducer.

Definition at line 109 of file L1DummyProducer.cc.

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

109  {
110 
111  if(verbose())
112  std::cout << "L1DummyProducer::produce...\n" << std::flush;
113 
115  std::auto_ptr<EcalTrigPrimDigiCollection> ecal_tp_data(new EcalTrigPrimDigiCollection );
116  std::auto_ptr<HcalTrigPrimDigiCollection> hcal_tp_data(new HcalTrigPrimDigiCollection );
117  std::auto_ptr<L1CaloEmCollection> rct_em_data(new L1CaloEmCollection );
118  std::auto_ptr<L1CaloRegionCollection> rct_rgn_data(new L1CaloRegionCollection );
119  std::auto_ptr<L1GctEmCandCollection> gct_isolaem_data(new L1GctEmCandCollection );
120  std::auto_ptr<L1GctEmCandCollection> gct_noisoem_data(new L1GctEmCandCollection );
121  std::auto_ptr<L1GctJetCandCollection> gct_cenjets_data(new L1GctJetCandCollection );
122  std::auto_ptr<L1GctJetCandCollection> gct_forjets_data(new L1GctJetCandCollection );
123  std::auto_ptr<L1GctJetCandCollection> gct_taujets_data(new L1GctJetCandCollection );
124  std::auto_ptr<L1MuDTChambPhContainer> dtp_ph_data(new L1MuDTChambPhContainer );
125  std::auto_ptr<L1MuDTChambThContainer> dtp_th_data(new L1MuDTChambThContainer );
126  std::auto_ptr<L1MuRegionalCandCollection> dtf_data(new L1MuRegionalCandCollection );
127  std::auto_ptr<L1MuDTTrackContainer> dtf_trk_data(new L1MuDTTrackContainer );
128  std::auto_ptr<CSCCorrelatedLCTDigiCollection> ctp_data(new CSCCorrelatedLCTDigiCollection );
129  std::auto_ptr<L1MuRegionalCandCollection> ctf_data(new L1MuRegionalCandCollection );
130  std::auto_ptr<L1CSCTrackCollection> ctf_trk_data(new L1CSCTrackCollection );
131  std::auto_ptr<L1MuRegionalCandCollection> rpc_cen_data(new L1MuRegionalCandCollection );
132  std::auto_ptr<L1MuRegionalCandCollection> rpc_for_data(new L1MuRegionalCandCollection );
133  std::auto_ptr<LTCDigiCollection> ltc_data(new LTCDigiCollection );
134  std::auto_ptr<L1MuGMTCandCollection> gmt_data(new L1MuGMTCandCollection );
135  std::auto_ptr<L1MuGMTReadoutCollection> gmt_rdt_data(new L1MuGMTReadoutCollection );
136  std::auto_ptr<L1GlobalTriggerReadoutRecord> glt_rdt_data(new L1GlobalTriggerReadoutRecord );
137  std::auto_ptr<L1GlobalTriggerEvmReadoutRecord> glt_evm_data(new L1GlobalTriggerEvmReadoutRecord);
138  std::auto_ptr<L1GlobalTriggerObjectMapRecord> glt_obj_data(new L1GlobalTriggerObjectMapRecord );
139 
141  if(m_doSys[ETP]) SimpleDigi( ecal_tp_data );
142  if(m_doSys[HTP]) SimpleDigi( hcal_tp_data );
143  if(m_doSys[RCT]) SimpleDigi( rct_em_data );
144  if(m_doSys[RCT]) SimpleDigi( rct_rgn_data );
145  if(m_doSys[GCT]) SimpleDigi(gct_isolaem_data,0);
146  if(m_doSys[GCT]) SimpleDigi(gct_noisoem_data,1);
147  if(m_doSys[GCT]) SimpleDigi(gct_cenjets_data,0);
148  if(m_doSys[GCT]) SimpleDigi(gct_forjets_data,1);
149  if(m_doSys[GCT]) SimpleDigi(gct_taujets_data,2);
150  if(m_doSys[DTP]) SimpleDigi( dtp_ph_data );
151  if(m_doSys[DTP]) SimpleDigi( dtp_th_data );
152  if(m_doSys[DTF]) SimpleDigi( dtf_data,0);
153  if(m_doSys[DTF]) SimpleDigi( dtf_trk_data );
154  if(m_doSys[CTP]) SimpleDigi( ctp_data );
155  if(m_doSys[CTF]) SimpleDigi( ctf_data,2);
156  if(m_doSys[CTF]) SimpleDigi( ctf_trk_data );
157  if(m_doSys[RPC]) SimpleDigi( rpc_cen_data,1);
158  if(m_doSys[RPC]) SimpleDigi( rpc_for_data,3);
159  if(m_doSys[LTC]) SimpleDigi( ltc_data );
160  if(m_doSys[GMT]) SimpleDigi( gmt_data );
161  if(m_doSys[GMT]) SimpleDigi( gmt_rdt_data );
162  if(m_doSys[GLT]) SimpleDigi( glt_rdt_data );
163  if(m_doSys[GLT]) SimpleDigi( glt_evm_data );
164  if(m_doSys[GLT]) SimpleDigi( glt_obj_data );
165 
167  if(m_doSys[ETP]) iEvent.put( ecal_tp_data,instName[ETP][0]);
168  if(m_doSys[HTP]) iEvent.put( hcal_tp_data,instName[HTP][0]);
169  if(m_doSys[RCT]) iEvent.put( rct_em_data,instName[RCT][0]);
170  if(m_doSys[RCT]) iEvent.put( rct_rgn_data,instName[RCT][0]);
171  if(m_doSys[GCT]) iEvent.put(gct_isolaem_data,instName[GCT][0]);
172  if(m_doSys[GCT]) iEvent.put(gct_noisoem_data,instName[GCT][1]);
173  if(m_doSys[GCT]) iEvent.put(gct_cenjets_data,instName[GCT][2]);
174  if(m_doSys[GCT]) iEvent.put(gct_forjets_data,instName[GCT][3]);
175  if(m_doSys[GCT]) iEvent.put(gct_taujets_data,instName[GCT][4]);
176  if(m_doSys[DTP]) iEvent.put( dtp_ph_data,instName[DTP][0]);
177  if(m_doSys[DTP]) iEvent.put( dtp_th_data,instName[DTP][0]);
178  if(m_doSys[DTF]) iEvent.put( dtf_data,instName[DTF][0]);
179  if(m_doSys[DTF]) iEvent.put( dtf_trk_data,instName[DTF][1]);
180  if(m_doSys[CTP]) iEvent.put( ctp_data,instName[CTP][0]);
181  if(m_doSys[CTF]) iEvent.put( ctf_data,instName[CTF][0]);
182  if(m_doSys[CTF]) iEvent.put( ctf_trk_data,instName[CTF][1]);
183  if(m_doSys[RPC]) iEvent.put( rpc_cen_data,instName[RPC][0]);
184  if(m_doSys[RPC]) iEvent.put( rpc_for_data,instName[RPC][1]);
185  if(m_doSys[LTC]) iEvent.put( ltc_data,instName[LTC][0]);
186  if(m_doSys[GMT]) iEvent.put( gmt_data,instName[GMT][0]);
187  if(m_doSys[GMT]) iEvent.put( gmt_rdt_data,instName[GMT][0]);
188  if(m_doSys[GLT]) iEvent.put( glt_rdt_data,instName[GLT][0]);
189  if(m_doSys[GLT]) iEvent.put( glt_evm_data,instName[GLT][0]);
190  if(m_doSys[GLT]) iEvent.put( glt_obj_data,instName[GLT][0]);
191 
192  nevt_++;
193 
194  if(verbose())
195  std::cout << "L1DummyProducer::produce end.\n" << std::flush;
196 
197 }
std::vector< L1CaloEmCand > L1CaloEmCollection
bool m_doSys[dedefs::DEnsys]
std::vector< L1CSCTrack > L1CSCTrackCollection
std::vector< L1GctJetCand > L1GctJetCandCollection
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:85
std::string instName[dedefs::DEnsys][5]
std::vector< LTCDigi > LTCDigiCollection
Definition: LTCDigi.h:107
std::vector< L1MuRegionalCand > L1MuRegionalCandCollection
void SimpleDigi(std::auto_ptr< T > &data, int type=0)
tuple cout
Definition: gather_cfg.py:121
std::vector< L1CaloRegion > L1CaloRegionCollection
std::vector< L1MuGMTCand > L1MuGMTCandCollection
Definition: DEtrait.h:77
std::vector< L1GctEmCand > L1GctEmCandCollection
template<class T >
void L1DummyProducer::SimpleDigi ( std::auto_ptr< T > &  data,
int  type = 0 
)

Definition at line 77 of file L1DummyProducer.h.

Referenced by SimpleDigi().

77  {
78  /*collections generated in specializations below*/
79 }
template<>
void L1DummyProducer::SimpleDigi ( std::auto_ptr< EcalTrigPrimDigiCollection > &  data,
int  type 
)
inline

Definition at line 82 of file L1DummyProducer.h.

References gather_cfg::cout, EBase_, EcalBarrel, relval_parameters_module::energy, ESigm_, rndFlat_, rndGaus_, EcalTriggerPrimitiveDigi::setSample(), EcalTriggerPrimitiveDigi::setSize(), and verbose().

83  {
84  if(verbose())
85  std::cout << "L1DummyProducer::SimpleDigi<EcalTrigPrimDigiCollection>....\n" << std::flush;
86  int side = (rndFlat_->fire()>0.5)?-1:1;
87  int ieta = (int) (1 + 17*rndFlat_->fire()); //1-17
88  int iphi = (int) (1 + 72*rndFlat_->fire()); //1-72
89  const EcalTrigTowerDetId e_id( side , EcalBarrel, ieta, iphi, 0);
90  EcalTriggerPrimitiveDigi e_digi(e_id);
91  int energy = (int) (EBase_ + ESigm_*rndGaus_->fire());
92  bool fg = (rndFlat_->fire()>0.5);
93  int ttf = (int)(8*rndFlat_->fire()); //0-7
94  EcalTriggerPrimitiveSample e_sample(energy, fg, ttf);
95  e_digi.setSize(1); //set sampleOfInterest to 0
96  e_digi.setSample(0,e_sample);
97  data->push_back(e_digi);
98  //EcalTriggerPrimitiveSample(int encodedEt, bool finegrain, int triggerFlag);
99  //const EcalTrigTowerDetId e_id( zside , EcalBarrel, etaTT, phiTT, 0);
100  if(verbose())
101  std::cout << "L1DummyProducer::SimpleDigi<EcalTrigPrimDigiCollection> end.\n" << std::flush;
102 }
CLHEP::RandFlat * rndFlat_
CLHEP::RandGaussQ * rndGaus_
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
tuple cout
Definition: gather_cfg.py:121
template<>
void L1DummyProducer::SimpleDigi ( std::auto_ptr< HcalTrigPrimDigiCollection > &  data,
int  type 
)
inline

Definition at line 105 of file L1DummyProducer.h.

References gather_cfg::cout, EBase_, relval_parameters_module::energy, ESigm_, rndFlat_, rndGaus_, HcalTriggerPrimitiveDigi::setSample(), HcalTriggerPrimitiveDigi::setSize(), and verbose().

106  {
107  if(verbose())
108  std::cout << "L1DummyProducer::SimpleDigi<HcalTrigPrimDigiCollection>....\n" << std::flush;
109  int side = (rndFlat_->fire()>0.5)?-1:1;
110  int ieta = (int) (1 + 17*rndFlat_->fire());
111  int iphi = (int) (1 + 72*rndFlat_->fire());
112  const HcalTrigTowerDetId h_id(side*ieta, iphi);
113  HcalTriggerPrimitiveDigi h_digi(h_id);
114  int energy = (int) (EBase_ + ESigm_*rndGaus_->fire());
115  HcalTriggerPrimitiveSample h_sample(energy, 0, 0, 0);
116  h_digi.setSize(1); //set sampleOfInterest to 0
117  h_digi.setSample(0,h_sample);
118  data->push_back(h_digi);
119  //HcalTriggerPrimitiveSample(int encodedEt, bool finegrain, int slb, int slbchan);
120  //HcalTrigTowerDetId(int ieta, int iphi);
121  if(verbose())
122  std::cout << "L1DummyProducer::SimpleDigi<HcalTrigPrimDigiCollection> end.\n" << std::flush;
123 }
CLHEP::RandFlat * rndFlat_
CLHEP::RandGaussQ * rndGaus_
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
tuple cout
Definition: gather_cfg.py:121
template<>
void L1DummyProducer::SimpleDigi ( std::auto_ptr< L1CaloEmCollection > &  data,
int  type 
)
inline

Definition at line 126 of file L1DummyProducer.h.

References gather_cfg::cout, EBase_, relval_parameters_module::energy, ESigm_, getHLTprescales::index, nevt_, rndFlat_, rndGaus_, and verbose().

127  {
128  if(verbose())
129  std::cout << "L1DummyProducer::SimpleDigi<L1CaloEmCollection>....\n" << std::flush;
130  int energy= (int) (EBase_ + ESigm_*rndGaus_->fire());
131  unsigned rank = energy & 0x3f;
132  unsigned region= (rndFlat_->fire()>0.5?0:1);
133  unsigned card = (unsigned)(7*rndFlat_->fire());
134  unsigned crate = (unsigned)(18*rndFlat_->fire());
135  bool iso = (rndFlat_->fire()>0.4);
136  uint16_t index = (unsigned)(4*rndFlat_->fire());
137  int16_t bx = nevt_;
138  L1CaloEmCand cand(rank, region, card, crate, iso, index, bx);
139  data->push_back(cand);
140  //L1CaloEmCand(unsigned rank, unsigned region, unsigned card, unsigned crate, bool iso, uint16_t index, int16_t bx);
141  if(verbose())
142  std::cout << "L1DummyProducer::SimpleDigi<L1CaloEmCollection> end.\n" << std::flush;
143  }
Level-1 Region Calorimeter Trigger EM candidate.
Definition: L1CaloEmCand.h:18
CLHEP::RandFlat * rndFlat_
CLHEP::RandGaussQ * rndGaus_
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
tuple cout
Definition: gather_cfg.py:121
template<>
void L1DummyProducer::SimpleDigi ( std::auto_ptr< L1CaloRegionCollection > &  data,
int  type 
)
inline

Definition at line 146 of file L1DummyProducer.h.

References gather_cfg::cout, EBase_, relval_parameters_module::energy, ESigm_, rndFlat_, rndGaus_, and verbose().

147  {
148  if(verbose())
149  std::cout << "L1DummyProducer::SimpleDigi<L1CaloRegionCollection>....\n" << std::flush;
150  int energy= (int) (EBase_ + ESigm_*rndGaus_->fire());
151  unsigned et = energy & 0x3ff;
152  bool overFlow = 0; //(rndFlat_->fire()>0.4);
153  bool tauVeto = 0; //(rndFlat_->fire()>0.3);
154  bool mip = 0; //(rndFlat_->fire()>0.1);
155  bool quiet = 0; //(rndFlat_->fire()>0.6);
156  unsigned crate= (unsigned)(18*rndFlat_->fire());
157  unsigned card = (unsigned)(7*rndFlat_->fire());
158  unsigned rgn = crate%2; //(rndFlat_->fire()>0.5?0:1);
159  L1CaloRegion cand( et, overFlow, tauVeto, mip, quiet, crate, card, rgn );
160  data->push_back(cand);
161  //L1CaloRegion(unsigned et, bool overFlow, bool tauVeto, bool mip, bool quiet, unsigned crate, unsigned card, unsigned rgn);
162  if(verbose())
163  std::cout << "L1DummyProducer::SimpleDigi<L1CaloRegionCollection> end.\n" << std::flush;
164 }
CLHEP::RandFlat * rndFlat_
CLHEP::RandGaussQ * rndGaus_
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
A calorimeter trigger region (sum of 4x4 trigger towers)
Definition: L1CaloRegion.h:22
tuple cout
Definition: gather_cfg.py:121
template<>
void L1DummyProducer::SimpleDigi ( std::auto_ptr< L1GctEmCandCollection > &  data,
int  type 
)
inline

Definition at line 167 of file L1DummyProducer.h.

References gather_cfg::cout, EBase_, relval_parameters_module::energy, ESigm_, eta(), edm::hlt::Exception, phi, rndFlat_, rndGaus_, and verbose().

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

Definition at line 199 of file L1DummyProducer.h.

References gather_cfg::cout, EBase_, relval_parameters_module::energy, ESigm_, eta(), edm::hlt::Exception, reco::isTau(), phi, rndFlat_, rndGaus_, and verbose().

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

Definition at line 237 of file L1DummyProducer.h.

References DeDxDiscriminatorTools::charge(), gather_cfg::cout, eta(), i, phi, Pi, rndFlat_, L1MuRegionalCand::setEtaValue(), L1MuRegionalCand::setPhiValue(), L1MuRegionalCand::setPtValue(), and verbose().

238  {
239  if(verbose())
240  std::cout << "L1DummyProducer::SimpleDigi<L1MuRegionalCandCollection>....\n" << std::flush;
241  //typedef std::vector<L1MuRegionalCand> L1MuRegionalCandCollection;
242  assert(type>=0 && type<4);
243  unsigned type_idx=type; //tType: 0 DT, 1 bRPC, 2 CSC, 3 fRPC
244  int bx = 0;
245  unsigned phi, eta, pt, charge, ch_valid, finehalo, quality;
246  float phiv(0.), etav(0.), ptv(0.); //linear translation? 0.2pi,-2.5..2.5,0..100
247  for(int i=0; i<4; i++) {
248  phi = (int)(144*rndFlat_->fire()); //8bits, 0..143
249  eta = (int)( 63*rndFlat_->fire()); //6bits code
250  phiv = phi*2*TMath::Pi()/144.;
251  etav = 2.5*(-1+2*eta/63.);
252  pt = ((int)(32*rndFlat_->fire())) & 0x1f; //5bits: 0..31
253  ptv = 100*(pt/31.);
254  charge = (rndFlat_->fire()>0.5?0:1);;
255  ch_valid=0;
256  finehalo=0;
257  quality = (int)(8*rndFlat_->fire()); //3bits: 0..7
258  L1MuRegionalCand cand(type_idx, phi, eta, pt, charge,
259  ch_valid, finehalo, quality, bx);
260  cand.setPhiValue(phiv);
261  cand.setEtaValue(etav);
262  cand.setPtValue (ptv);
263  data->push_back(cand);
264  }
265  //L1MuRegionalCand(unsigned type_idx, unsigned phi, unsigned eta, unsigned pt,
266  //unsigned charge, unsigned ch_valid, unsigned finehalo, unsigned quality, int bx);
267  if(verbose())
268  std::cout << "L1DummyProducer::SimpleDigi<L1MuRegionalCandCollection> end.\n" << std::flush;
269 }
const double Pi
type
Definition: HCALResponse.h:22
int i
Definition: DBlmapReader.cc:9
T eta() const
double charge(const std::vector< uint8_t > &Ampls)
CLHEP::RandFlat * rndFlat_
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
tuple cout
Definition: gather_cfg.py:121
Definition: DDAxes.h:10
template<>
void L1DummyProducer::SimpleDigi ( std::auto_ptr< L1MuDTTrackContainer > &  data,
int  type 
)
inline

Definition at line 272 of file L1DummyProducer.h.

References gather_cfg::cout, L1MuRegionalCand::setBx(), L1MuRegionalCand::setDataWord(), SimpleDigi(), testEve_cfg::tracks, and verbose().

273  {
274  assert(type==0);
275  int type_idx = type; //choose data type: 0 DT, 1 bRPC, 2 CSC, 3 fRPC
276  if(verbose())
277  std::cout << "L1DummyProducer::SimpleDigi<L1MuDTTrackContainer>....\n" << std::flush;
278  std::auto_ptr<L1MuRegionalCandCollection> tracks(new L1MuRegionalCandCollection());
279  SimpleDigi(tracks, type_idx);
280  typedef std::vector<L1MuDTTrackCand> L1MuDTTrackCandCollection;
281  std::auto_ptr<L1MuDTTrackCandCollection> tracksd (new L1MuDTTrackCandCollection());
282  for(L1MuRegionalCandCollection::const_iterator it=tracks->begin(); it!=tracks->end(); it++) {
283  L1MuDTTrackCand * cnd = new L1MuDTTrackCand();
284  cnd->setDataWord(it->getDataWord());
285  cnd->setBx(it->bx());
286  tracksd->push_back(L1MuDTTrackCand());
287  tracksd->push_back(*cnd);
288  }
289  data->setContainer(*tracksd);
290  if(verbose())
291  std::cout << "L1DummyProducer::SimpleDigi<L1MuDTTrackContainer> end.\n" << std::flush;
292  //L1MuDTTrackCand( unsigned dataword, int bx, int uwh, int usc, int utag,
293  // int adr1, int adr2, int adr3, int adr4, int utc );
294 
295 }
type
Definition: HCALResponse.h:22
void setBx(int bx)
Set Bunch Crossing.
void setDataWord(unsigned dataword)
Set data word.
std::vector< L1MuRegionalCand > L1MuRegionalCandCollection
void SimpleDigi(std::auto_ptr< T > &data, int type=0)
tuple tracks
Definition: testEve_cfg.py:39
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
tuple cout
Definition: gather_cfg.py:121
template<>
void L1DummyProducer::SimpleDigi ( std::auto_ptr< L1MuDTChambPhContainer > &  data,
int  type 
)
inline

Definition at line 298 of file L1DummyProducer.h.

References gather_cfg::cout, i, rndFlat_, testEve_cfg::tracks, and verbose().

299  {
300  if(verbose())
301  std::cout << "L1DummyProducer::SimpleDigi<L1MuDTChambPhContainer>....\n" << std::flush;
302  typedef std::vector<L1MuDTChambPhDigi> Phi_Container;
303  int ntrk = 4;
304  Phi_Container tracks(ntrk);
305  int ubx, uwh, usc, ust,uphr, uphb, uqua, utag, ucnt;
306  for (int i=0; i<ntrk; i++) {
307  ubx = 0; //bxNum() - bx
308  uwh = 0; //whNum() - wheel
309  usc = 0; //scNum() - sector
310  ust = 0; //stNum() - station
311  uphr = 0; //phi() - radialAngle
312  uphb = 0; //phiB() - bendingAngle
313  uqua = 0; //code() - qualityCode
314  utag = 0; //Ts2Tag() - Ts2TagCode
315  ucnt = 0; //BxCnt() - BxCntCode
316  uwh = (int)(-2+5*rndFlat_->fire());
317  usc = (int)( 12*rndFlat_->fire());
318  ust = (int)(1.+4*rndFlat_->fire());
319  uqua= (int)( 8*rndFlat_->fire());
320  L1MuDTChambPhDigi cand(ubx, uwh, usc, ust, uphr, uphb, uqua, utag, ucnt);
321  tracks.push_back(cand);
322  }
323  data->setContainer(tracks);
324  //L1MuDTChambPhDigi( int ubx, int uwh, int usc, int ust,
325  // int uphr, int uphb, int uqua, int utag, int ucnt );
326  if(verbose())
327  std::cout << "L1DummyProducer::SimpleDigi<L1MuDTChambPhContainer> end.\n" << std::flush;
328 }
int i
Definition: DBlmapReader.cc:9
CLHEP::RandFlat * rndFlat_
tuple tracks
Definition: testEve_cfg.py:39
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
tuple cout
Definition: gather_cfg.py:121
template<>
void L1DummyProducer::SimpleDigi ( std::auto_ptr< L1MuDTChambThContainer > &  data,
int  type 
)
inline

Definition at line 331 of file L1DummyProducer.h.

References gather_cfg::cout, i, j, rndFlat_, testEve_cfg::tracks, and verbose().

332  {
333  if(verbose())
334  std::cout << "L1DummyProducer::SimpleDigi<L1MuDTChambThContainer>....\n" << std::flush;
335  typedef std::vector<L1MuDTChambThDigi> The_Container;
336  int ntrk = 4;
337  The_Container tracks(ntrk);
338  int ubx, uwh, usc, ust, uos[7], uqa[7];
339  for (int i=0; i<ntrk; i++) {
340  ubx = 0;
341  uwh = (int)(-2+5*rndFlat_->fire());
342  usc = (int)( 12*rndFlat_->fire());
343  ust = (int)(1.+4*rndFlat_->fire());
344  for(int j=0; j<7; j++) {
345  uos[j]=(rndFlat_->fire()>0.5?0:1);
346  uqa[j]=(rndFlat_->fire()>0.5?0:1);
347  }
348  L1MuDTChambThDigi cand(ubx, uwh, usc, ust, uos, uqa);
349  tracks.push_back(cand);
350  }
351  data->setContainer(tracks);
352  //L1MuDTChambThDigi( int ubx, int uwh, int usc, int ust,
353  // int* uos, [int* uqual] );
354  //"DataFormats/L1DTTrackFinder/interface/L1MuDTChambThContainer.h"
355  if(verbose())
356  std::cout << "L1DummyProducer::SimpleDigi<L1MuDTChambThContainer> end.\n" << std::flush;
357 }
int i
Definition: DBlmapReader.cc:9
CLHEP::RandFlat * rndFlat_
int j
Definition: DBlmapReader.cc:9
tuple tracks
Definition: testEve_cfg.py:39
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
tuple cout
Definition: gather_cfg.py:121
template<>
void L1DummyProducer::SimpleDigi ( std::auto_ptr< L1MuGMTCandCollection > &  data,
int  type 
)
inline

Definition at line 360 of file L1DummyProducer.h.

References gather_cfg::cout, EBase_, ESigm_, eta(), nevt_, phi, Pi, alignCSCRings::r, rndFlat_, rndGaus_, L1MuGMTCand::setBx(), L1MuGMTCand::setChargePacked(), L1MuGMTCand::setEtaPacked(), L1MuGMTCand::setEtaValue(), L1MuGMTCand::setIsolation(), L1MuGMTCand::setMIP(), L1MuGMTCand::setPhiPacked(), L1MuGMTCand::setPhiValue(), L1MuGMTCand::setPtPacked(), L1MuGMTCand::setPtValue(), and verbose().

361  {
362  if(verbose())
363  std::cout << "L1DummyProducer::SimpleDigi<L1MuGMTCandCollection>....\n" << std::flush;
364  //typedef std::vector<L1MuGMTCand> L1MuGMTCandCollection;
365  L1MuGMTCand cand(0,nevt_);
366  //cand.setPhiPacked();//8bits
367  //cand.setPtPacked ();//5bits
368  //cand.setQuality ();//3bits
369  //cand.setEtaPacked();//6bits
370  //cand.setIsolation();//1bit
371  //cand.setMIP ();//1bit
372  //cand.setChargePacked();//0:+, 1:-, 2:undef, 3:sync
373  //cand.setBx (nevt_);
374  //set physical values
375  double eng = EBase_+ESigm_*rndGaus_->fire();
376  double phi = 2*TMath::Pi()*rndFlat_->fire();
377  double eta = 2.5*(-1+2*rndFlat_->fire());
378  cand.setPtValue (eng);
379  cand.setPhiValue(phi);
380  cand.setEtaValue(eta);
381  unsigned engp = (unsigned)(EBase_ + ESigm_*rndGaus_->fire());
382  unsigned phip = (unsigned)(255*rndFlat_->fire());
383  unsigned etap = (unsigned)( 63*rndFlat_->fire());
384  cand.setPtPacked (engp&0x1f);
385  cand.setPhiPacked(phip&0x7f);
386  cand.setEtaPacked(etap&0x3f);
387  double r = rndFlat_->fire();
388  cand.setIsolation(r>0.2);
389  cand.setMIP(r>0.7);
390  cand.setChargePacked(r>0.5?0:1);
391  cand.setBx(0);
392  data->push_back(cand);
393  if(verbose())
394  std::cout << "L1DummyProducer::SimpleDigi<L1MuGMTCandCollection> end.\n" << std::flush;
395 
396 }
const double Pi
T eta() const
CLHEP::RandFlat * rndFlat_
CLHEP::RandGaussQ * rndGaus_
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
tuple cout
Definition: gather_cfg.py:121
Definition: DDAxes.h:10
template<>
void L1DummyProducer::SimpleDigi ( std::auto_ptr< L1MuGMTReadoutCollection > &  data,
int  type 
)
inline

tbd: add GMT extended cand(!)

Definition at line 399 of file L1DummyProducer.h.

References asciidump::at, gather_cfg::cout, EBase_, ESigm_, eta(), i, nevt_, phi, rndFlat_, rndGaus_, L1MuGMTReadoutRecord::setBxInEvent(), L1MuGMTReadoutRecord::setBxNr(), L1MuGMTReadoutRecord::setEvNr(), L1MuGMTReadoutRecord::setGMTBrlCand(), L1MuGMTReadoutRecord::setGMTCand(), L1MuGMTReadoutRecord::setGMTFwdCand(), L1MuGMTReadoutRecord::setInputCand(), L1MuGMTReadoutRecord::setMIPbit(), L1MuGMTReadoutRecord::setQuietbit(), SimpleDigi(), and verbose().

400  {
401  if(verbose())
402  std::cout << "L1DummyProducer::SimpleDigi<L1MuGMTReadoutCollection>....\n" << std::flush;
403  L1MuGMTReadoutRecord rec(0);
404  int bxn = nevt_;
405  rec.setBxNr(bxn);
406  rec.setEvNr(bxn);
407  rec.setBxInEvent(0);
408  std::auto_ptr<L1MuRegionalCandCollection> trks_dttf(new L1MuRegionalCandCollection);
409  std::auto_ptr<L1MuRegionalCandCollection> trks_rpcb(new L1MuRegionalCandCollection);
410  std::auto_ptr<L1MuRegionalCandCollection> trks_csc (new L1MuRegionalCandCollection);
411  std::auto_ptr<L1MuRegionalCandCollection> trks_rpcf(new L1MuRegionalCandCollection);
412  SimpleDigi(trks_dttf,0);
413  SimpleDigi(trks_rpcb,1);
414  SimpleDigi(trks_csc ,2);
415  SimpleDigi(trks_rpcf,3);
416  for(int i=0; i<4; i++) {
417  rec.setInputCand(i ,trks_dttf->at(i));//dt : 0..3
418  rec.setInputCand(i+ 4,trks_rpcb->at(i));//rpcb: 4..7
419  rec.setInputCand(i+ 8,trks_csc ->at(i));//csc : 8..11
420  rec.setInputCand(i+12,trks_rpcf->at(i));//rpcf:12..15
421  }
422  for(int nr=0; nr<4; nr++) {
423  int eng = (int)(EBase_ + ESigm_*rndGaus_->fire());
424  rec.setGMTBrlCand(nr, eng&0x11, eng&0x11); //set GMT barrel candidate
425  rec.setGMTFwdCand(nr, eng&0x11, eng&0x11); //set GMT forward candidate
426  rec.setGMTCand (nr, eng&0x11); //set GMT candidate (does not store rank)
427  int eta = (int)(14*rndFlat_->fire()); //0..13
428  int phi = (int)(18*rndFlat_->fire()); //0..17
429  rec.setMIPbit (eta, phi);
430  rec.setQuietbit(eta, phi);
431  }
432  data->addRecord(rec);
434  //rec.setBCERR(int bcerr);
435  //rec.setGMTBrlCand(int nr, L1MuGMTExtendedCand const& cand);
436  //rec.setGMTFwdCand(int nr, L1MuGMTExtendedCand const& cand);
437  //rec.setGMTCand (int nr, L1MuGMTExtendedCand const& cand);
438  //rec.setInputCand (int nr, L1MuRegionalCand const& cand);
439  //L1MuGMTReadoutCollection :: std::vector<L1MuGMTReadoutRecord> m_Records;
440  //L1MuGMTReadoutCollection(int nbx) { m_Records.reserve(nbx); };
441  //L1MuGMTExtendedCand(unsigned data, unsigned rank, int bx=0) : L1MuGMTCand (data, bx), m_rank(rank) {}
442  if(verbose())
443  std::cout << "L1DummyProducer::SimpleDigi<L1MuGMTReadoutCollection> end.\n" << std::flush;
444 }
int i
Definition: DBlmapReader.cc:9
T eta() const
CLHEP::RandFlat * rndFlat_
CLHEP::RandGaussQ * rndGaus_
std::vector< L1MuRegionalCand > L1MuRegionalCandCollection
void SimpleDigi(std::auto_ptr< T > &data, int type=0)
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
tuple cout
Definition: gather_cfg.py:121
list at
Definition: asciidump.py:428
Definition: DDAxes.h:10
template<>
void L1DummyProducer::SimpleDigi ( std::auto_ptr< LTCDigiCollection > &  data,
int  type 
)
inline

Definition at line 447 of file L1DummyProducer.h.

References gather_cfg::cout, and verbose().

448  {
449  if(verbose())
450  std::cout << "L1DummyProducer::SimpleDigi<LTCDigiCollection>....\n" << std::flush;
451  //LTCs are FED id 816-823
452  /*
453  6 64-bit words
454  uint64_t *ld = (uint64_t*)data;
455 
456  word0: 59:56 4 bit ld[0]>>56 & 0xf trigType
457  55:32 24 bit ld[0]>>32 & 0x00ffffff eventID
458  31:20 12 bit ld[0]>>20 & 0xfff bunchNumber
459  19: 8 12 bit ld[0]>> 8 & 0x00000fff sourceID (816-823?)
460 
461  word1: 63:32 32 bit ld[1]>>32 & 0xffffffff orbitNumber
462  31:24 8 bit ld[1]>>24 & 0xff versionNumber
463  3: 0 4 bit ld[1 & 0xf daqPartition
464 
465  word2: 63:32 32 bit ld[0]>>32 & 0xffffffff runNumber
466  31: 0 32 bit ld[0] & 0xffffffff eventNumber
467 
468  word3: 63:32 32 bit ld[3]>>32 & 0xffffffff trigInhibitNumber
469  31: 0 32 bit ld[3] & 0xffffffff trigInputStat
470 
471  word4: 63:0 64 bit ld[4] bstGpsTime
472 
473  word5: (empty)
474  */
475  //need to make up something meaningfull to produce here..
476  //LTCDigi(const unsigned char* data);
477  if(verbose())
478  std::cout << "L1DummyProducer::SimpleDigi<LTCDigiCollection> end.\n" << std::flush;
479 }
tuple cout
Definition: gather_cfg.py:121
template<>
void L1DummyProducer::SimpleDigi ( std::auto_ptr< CSCCorrelatedLCTDigiCollection > &  data,
int  type 
)
inline

Definition at line 481 of file L1DummyProducer.h.

References CSCCorrelatedLCTDigi::clear(), gather_cfg::cout, CSCDetId, rndFlat_, and verbose().

482  {
483  if(verbose())
484  std::cout << "L1DummyProducer::SimpleDigi<CSCCorrelatedLCTDigiCollection>....\n" << std::flush;
485  //typedef MuonDigiCollection<CSCDetId,CSCCorrelatedLCTDigi> CSCCorrelatedLCTDigiCollection;
486  //CSCCorrelatedLCTDigi(const int trknmb, const int valid, const int quality, const int keywire, const int strip, const int clct_pattern, const int bend, const int bx, const int& mpclink = 0, const uint16_t & bx0=0, const uint16_t & syncErr = 0, const uint16_t & cscID=0);
488  //tbd: set non-trivial random values
489  dg.clear(); // set contents to zero
490  //CSCDetId( int iendcap, int istation, int iring, int ichamber, int ilayer = 0 );
491  enum eMinNum{ MIN_ENDCAP=1, MIN_STATION=1, MIN_RING=1, MIN_CHAMBER= 1, MIN_LAYER=1 };
492  enum eMaxNum{ MAX_ENDCAP=2, MAX_STATION=4, MAX_RING=4, MAX_CHAMBER=36, MAX_LAYER=6 };
493  float rnd = rndFlat_->fire();
494  int ec = (int)( MIN_ENDCAP + (MAX_ENDCAP -MIN_ENDCAP )*rnd +1);
495  int st = (int)( MIN_STATION + (MAX_STATION-MIN_STATION)*rnd +1);
496  int rg = (int)( MIN_RING + (MAX_RING -MIN_RING )*rnd +1);
497  int ch = (int)( MIN_CHAMBER + (MAX_CHAMBER-MIN_CHAMBER)*rnd +1);
498  int lr = (int)( MIN_LAYER + (MAX_LAYER -MIN_LAYER )*rnd +1);
499  CSCDetId did = CSCDetId(ec,st,rg,ch,lr);
500  //CSCDetId did = CSCDetId(); //DetId(DetId::Muon, MuonSubdetId::CSC)
501  //MuonDigiCollection::insertDigi(const IndexType& index, const DigiType& digi)
502  data->insertDigi(did,dg);
503  if(verbose())
504  std::cout << "L1DummyProducer::SimpleDigi<CSCCorrelatedLCTDigiCollection> end.\n" << std::flush;
505 }
CLHEP::RandFlat * rndFlat_
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
tuple cout
Definition: gather_cfg.py:121
template<>
void L1DummyProducer::SimpleDigi ( std::auto_ptr< L1CSCTrackCollection > &  data,
int  type 
)
inline

Definition at line 507 of file L1DummyProducer.h.

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

508  {
509  if(verbose())
510  std::cout << "L1DummyProducer::SimpleDigi<L1CSCTrackCollection>...\n" << std::flush;
511  std::auto_ptr<CSCCorrelatedLCTDigiCollection> dgcoll(new CSCCorrelatedLCTDigiCollection);
512  SimpleDigi(dgcoll,0);
513  csc::L1Track l1trk = csc::L1Track();
514  std::auto_ptr<L1MuRegionalCandCollection> regcoll(new L1MuRegionalCandCollection);
515  SimpleDigi(regcoll,2);
516  L1MuRegionalCand regcand = *(regcoll->begin());
517  l1trk.setDataWord(regcand.getDataWord());
518  l1trk.setBx(regcand.bx());
519  l1trk.setPhiValue(regcand.phiValue());
520  l1trk.setEtaValue(regcand.etaValue());
521  l1trk.setPtValue (regcand.ptValue());
522  L1CSCTrack l1csctrk = std::make_pair(l1trk,*dgcoll);
523  data->push_back(l1csctrk);
524  //typedef std::vector<L1CSCTrack> L1CSCTrackCollection;
525  //typedef std::pair<csc::L1Track,CSCCorrelatedLCTDigiCollection> L1CSCTrack;
526  //L1Track() : L1MuRegionalCand(), m_name("csc::L1Track") { setType(2); setPtPacked(0); }
527  //L1MuRegionalCand(unsigned dataword = 0, int bx = 0);
528  if(verbose())
529  std::cout << "L1DummyProducer::SimpleDigi<L1CSCTrackCollection> end.\n" << std::flush;
530  }
float etaValue() const
get eta-value of muon candidate
void setPtValue(float ptVal)
Set Pt Value.
void setBx(int bx)
Set Bunch Crossing.
float ptValue() const
get pt-value of muon candidate in GeV
void setPhiValue(float phiVal)
Set Phi Value.
void setDataWord(unsigned dataword)
Set data word.
unsigned getDataWord() const
return data word
void setEtaValue(float etaVal)
Set Eta Value (need to set type, first)
float phiValue() const
get phi-value of muon candidate in radians (low edge of bin)
std::vector< L1MuRegionalCand > L1MuRegionalCandCollection
void SimpleDigi(std::auto_ptr< T > &data, int type=0)
int bx() const
return bunch crossing identifier
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
std::pair< csc::L1Track, CSCCorrelatedLCTDigiCollection > L1CSCTrack
tuple cout
Definition: gather_cfg.py:121
int L1DummyProducer::verbose ( )
inlineprivate

Definition at line 62 of file L1DummyProducer.h.

References verbose_.

Referenced by SimpleDigi().

62 {return verbose_;}

Member Data Documentation

double L1DummyProducer::EBase_
private

Definition at line 70 of file L1DummyProducer.h.

Referenced by SimpleDigi().

double L1DummyProducer::ESigm_
private

Definition at line 71 of file L1DummyProducer.h.

Referenced by SimpleDigi().

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

Definition at line 66 of file L1DummyProducer.h.

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

Definition at line 65 of file L1DummyProducer.h.

int L1DummyProducer::nevt_
private

Definition at line 63 of file L1DummyProducer.h.

Referenced by SimpleDigi().

CLHEP::RandFlat* L1DummyProducer::rndFlat_
private

Definition at line 68 of file L1DummyProducer.h.

Referenced by SimpleDigi().

CLHEP::RandGaussQ* L1DummyProducer::rndGaus_
private

Definition at line 69 of file L1DummyProducer.h.

Referenced by SimpleDigi().

int L1DummyProducer::verbose_
private

Definition at line 61 of file L1DummyProducer.h.

Referenced by verbose().