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 Attributes
L1Scalers Class Reference

#include <L1Scalers.h>

Inheritance diagram for L1Scalers:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c)
 
void beginJob (void)
 BeginJob. More...
 
void beginRun (const edm::Run &run, const edm::EventSetup &c)
 BeginRun. More...
 
void endJob (void)
 
void endLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
 
void endRun (const edm::Run &run, const edm::EventSetup &c)
 EndRun. More...
 
 L1Scalers (const edm::ParameterSet &ps)
 Constructors. More...
 
virtual ~L1Scalers ()
 Destructor. More...
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndex indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Attributes

std::vector< MonitorElement * > algoBxDiff_
 
std::vector< MonitorElement * > algoBxDiffLumi_
 
std::vector< unsigned int > algoSelected_
 
MonitorElementbxNum_
 
MonitorElementcscBxDiff_
 
MonitorElementcscBxDiffLumi_
 
DQMStoredbe_
 
unsigned int denomBit_
 
bool denomIsTech_
 
MonitorElementdtBxDiff_
 
MonitorElementdtBxDiffLumi_
 
std::vector< int > earliestAlgo_
 
int earliestDenom_
 
std::vector< int > earliestTech_
 
edm::InputTag fedRawCollection_
 
unsigned int fedStart_
 
unsigned int fedStop_
 
std::string folderName_
 
edm::InputTag HcalRecHitCollection_
 
MonitorElementl1AlgoCounter_
 
MonitorElementl1Correlations_
 
edm::InputTag l1GtDataSource_
 
MonitorElementl1scalers_
 
MonitorElementl1scalersBx_
 
MonitorElementl1techScalers_
 
MonitorElementl1techScalersBx_
 
MonitorElementl1TtCounter_
 
std::vector< int > maskedList_
 
int nev_
 
MonitorElementnLumiBlock_
 
unsigned int rateAlgoCounter_
 
unsigned int rateTtCounter_
 
MonitorElementrpcbBxDiff_
 
MonitorElementrpcbBxDiffLumi_
 
MonitorElementrpcfBxDiff_
 
MonitorElementrpcfBxDiffLumi_
 
std::vector< MonitorElement * > techBxDiff_
 
std::vector< MonitorElement * > techBxDiffLumi_
 
std::vector< unsigned int > techSelected_
 
unsigned int tfBit_
 
bool tfIsTech_
 
unsigned int threshold_
 
bool verbose_
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
CurrentProcessingContext const * currentContext () const
 
- 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 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)
 

Detailed Description

Definition at line 17 of file L1Scalers.h.

Constructor & Destructor Documentation

L1Scalers::L1Scalers ( const edm::ParameterSet ps)

Constructors.

Definition at line 43 of file L1Scalers.cc.

References LogDebug.

43  :
44  dbe_(0), nev_(0),
45  verbose_(ps.getUntrackedParameter < bool > ("verbose", false)),
46  l1GtDataSource_( ps.getParameter< edm::InputTag >("l1GtData")),
47  denomIsTech_(ps.getUntrackedParameter <bool> ("denomIsTech", true)),
48  denomBit_(ps.getUntrackedParameter <unsigned int> ("denomBit", 40)),
49  tfIsTech_(ps.getUntrackedParameter <bool> ("tfIsTech", true)),
50  tfBit_(ps.getUntrackedParameter <unsigned int> ("tfBit", 41)),
51  algoSelected_(ps.getUntrackedParameter<std::vector<unsigned int> >("algoMonitorBits", std::vector<unsigned int>())),
52  techSelected_(ps.getUntrackedParameter<std::vector<unsigned int> >("techMonitorBits", std::vector<unsigned int>())),
54  std::string("L1T/L1Scalers_EvF"))),
55  l1scalers_(0),
56  l1techScalers_(0),
57  l1Correlations_(0),
58  bxNum_(0),
59  l1scalersBx_(0),
61 // pixFedSizeBx_(0),
62 // hfEnergyMaxTowerBx_(0),
63  nLumiBlock_(0),
64  l1AlgoCounter_(0),
65  l1TtCounter_(0),
66 // pixFedSize_(0),
67 // hfEnergy_(0),
68  fedStart_(ps.getUntrackedParameter<unsigned int>("firstFED", 0)),
69  fedStop_(ps.getUntrackedParameter<unsigned int>("lastFED", 931)),
70  rateAlgoCounter_(0),
71  rateTtCounter_(0),
72  fedRawCollection_(ps.getParameter<edm::InputTag>("fedRawData")),
73  maskedList_(ps.getUntrackedParameter<std::vector<int> >("maskedChannels", std::vector<int>())), //this is using the ashed index
74  HcalRecHitCollection_(ps.getParameter<edm::InputTag>("HFRecHitCollection"))
75 {
76  LogDebug("Status") << "constructor" ;
77 }
#define LogDebug(id)
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
bool tfIsTech_
Definition: L1Scalers.h:57
MonitorElement * l1scalers_
Definition: L1Scalers.h:63
bool verbose_
Definition: L1Scalers.h:52
edm::InputTag l1GtDataSource_
Definition: L1Scalers.h:53
std::string folderName_
Definition: L1Scalers.h:62
unsigned int fedStop_
Definition: L1Scalers.h:99
edm::InputTag HcalRecHitCollection_
Definition: L1Scalers.h:108
edm::InputTag fedRawCollection_
Definition: L1Scalers.h:105
bool denomIsTech_
Definition: L1Scalers.h:55
MonitorElement * l1techScalers_
Definition: L1Scalers.h:64
MonitorElement * l1scalersBx_
Definition: L1Scalers.h:70
int nev_
Definition: L1Scalers.h:50
unsigned int fedStart_
Definition: L1Scalers.h:99
MonitorElement * l1TtCounter_
Definition: L1Scalers.h:78
DQMStore * dbe_
Definition: L1Scalers.h:49
std::vector< unsigned int > algoSelected_
Definition: L1Scalers.h:59
std::vector< int > maskedList_
Definition: L1Scalers.h:107
MonitorElement * l1Correlations_
Definition: L1Scalers.h:65
std::vector< unsigned int > techSelected_
Definition: L1Scalers.h:60
unsigned int rateAlgoCounter_
Definition: L1Scalers.h:101
MonitorElement * nLumiBlock_
Definition: L1Scalers.h:76
unsigned int tfBit_
Definition: L1Scalers.h:58
MonitorElement * bxNum_
Definition: L1Scalers.h:66
MonitorElement * l1techScalersBx_
Definition: L1Scalers.h:71
MonitorElement * l1AlgoCounter_
Definition: L1Scalers.h:77
unsigned int denomBit_
Definition: L1Scalers.h:56
unsigned int rateTtCounter_
Definition: L1Scalers.h:102
virtual L1Scalers::~L1Scalers ( )
inlinevirtual

Destructor.

Definition at line 24 of file L1Scalers.h.

24 {};

Member Function Documentation

void L1Scalers::analyze ( const edm::Event e,
const edm::EventSetup c 
)
virtual

empty DecisionWord

Implements edm::EDAnalyzer.

Definition at line 184 of file L1Scalers.cc.

References algoBxDiff_, algoBxDiffLumi_, algoSelected_, begin, L1GtfeWord::bxNr(), bxNum_, cscBxDiff_, cscBxDiffLumi_, denomBit_, denomIsTech_, diffTreeTool::diff, dtBxDiff_, dtBxDiffLumi_, earliestAlgo_, earliestDenom_, earliestTech_, MonitorElement::Fill(), edm::Event::getByLabel(), L1MuGMTReadoutCollection::getRecords(), i, edm::HandleBase::isValid(), j, l1AlgoCounter_, l1Correlations_, l1GtDataSource_, l1scalers_, l1scalersBx_, l1techScalers_, l1techScalersBx_, l1TtCounter_, edm::InputTag::label(), LogDebug, edm::EventBase::luminosityBlock(), nev_, edm::Handle< T >::product(), rateAlgoCounter_, rateTtCounter_, rpcbBxDiff_, rpcbBxDiffLumi_, rpcfBxDiff_, rpcfBxDiffLumi_, lumiQTWidget::t, techBxDiff_, techBxDiffLumi_, techSelected_, tfBit_, and tfIsTech_.

185 {
186  nev_++;
187 
188  LogDebug("Status") << "L1Scalers::analyze event " << nev_ ;
189 
190  // int myGTFEbx = -1;
191  // get Global Trigger decision and the decision word
192  // these are locally derived
194  bool t = e.getByLabel(l1GtDataSource_,gtRecord);
195 
196  if ( ! t ) {
197  LogDebug("Product") << "can't find L1GlobalTriggerReadoutRecord "
198  << "with label " << l1GtDataSource_.label() ;
199  }
200  else {
201 
202  // DEBUG
203  //gtRecord->print(std::cout);
204  // DEBUG
205 
206  L1GtfeWord gtfeWord = gtRecord->gtfeWord();
207  int gtfeBx = gtfeWord.bxNr();
208  bxNum_->Fill(gtfeBx);
209  // myGTFEbx = gtfeBx;
210 
211  bool tfBitGood = false;
212 
213  // First, the default
214  // vector of bool
215  for(int iebx=0; iebx<=4; iebx++) {
216 
217  //Algorithm Bits
218  DecisionWord gtDecisionWord = gtRecord->decisionWord(iebx-2);
219  // DecisionWord gtDecisionWord = gtRecord->decisionWord();
220  if ( ! gtDecisionWord.empty() ) { // if board not there this is zero
221  // loop over dec. bit to get total rate (no overlap)
222  for ( uint i = 0; i < gtDecisionWord.size(); ++i ) {
223  if ( gtDecisionWord[i] ) {
226  break;
227  }
228  }
229  // loop over decision bits
230  for ( uint i = 0; i < gtDecisionWord.size(); ++i ) {
231  if ( gtDecisionWord[i] ) {
232  l1scalers_->Fill(i);
233  l1scalersBx_->Fill(gtfeBx-2+iebx,i);
234  for ( uint j = i + 1; j < gtDecisionWord.size(); ++j ) {
235  if ( gtDecisionWord[j] ) {
236  l1Correlations_->Fill(i,j);
237  l1Correlations_->Fill(j,i);
238  }
239  }
240  }
241  }
242  }
243 
244 
245  // loop over technical triggers
246  // vector of bool again.
247  TechnicalTriggerWord tw = gtRecord->technicalTriggerWord(iebx-2);
248  // TechnicalTriggerWord tw = gtRecord->technicalTriggerWord();
249  if ( ! tw.empty() ) {
250  // loop over dec. bit to get total rate (no overlap)
251  for ( uint i = 0; i < tw.size(); ++i ) {
252  if ( tw[i] ) {
253  rateTtCounter_++;
255  break;
256  }
257  }
258  for ( uint i = 0; i < tw.size(); ++i ) {
259  if ( tw[i] ) {
260  l1techScalers_->Fill(i);
261  l1techScalersBx_->Fill(gtfeBx-2+iebx, i);
262  }
263  }
264 
265  // check if bit used to filter timing plots fired in this event
266  // (anywhere in the bx window)
267  if(tfIsTech_){
268  if(tfBit_ < tw.size()){
269  if( tw[tfBit_] ) tfBitGood = true;
270  }
271  }
272  } // ! tw.empty
273 
274  }//bx
275 
276 
277  //timing plots
278  earliestDenom_ = 9;
279  earliestAlgo_.clear();
280  earliestTech_.clear();
281  for(uint i=0; i < techSelected_.size(); i++) earliestTech_.push_back(9);
282  for(uint i=0; i < algoSelected_.size(); i++) earliestAlgo_.push_back(9);
283 
284  //GMT information
286  e.getByLabel(l1GtDataSource_,gmtCollection);
287 
288 
289  if (!gmtCollection.isValid()) {
290  edm::LogInfo("DataNotFound") << "can't find L1MuGMTReadoutCollection with label "
291  << l1GtDataSource_.label() ;
292  }
293 
294  // remember the bx of 1st candidate of each system (9=none)
295  int bx1st[4] = {9, 9, 9, 9};
296 
297  if(tfBitGood){//to avoid single BSC hits
298 
299  for(int iebx=0; iebx<=4; iebx++) {
300  TechnicalTriggerWord tw = gtRecord->technicalTriggerWord(iebx-2);
301  DecisionWord gtDecisionWord = gtRecord->decisionWord(iebx-2);
302 
303  bool denomBitGood = false;
304 
305  //check if reference bit is valid
306  if(denomIsTech_){
307  if ( ! tw.empty() ) {
308  if( denomBit_ < tw.size() ){
309  denomBitGood = true;
310  if( tw[denomBit_] && earliestDenom_==9 ) earliestDenom_ = iebx;
311  }
312  }
313  }
314  else{
315  if ( ! gtDecisionWord.empty() ) {
316  if( denomBit_ < gtDecisionWord.size() ){
317  denomBitGood = true;
318  if( gtDecisionWord[denomBit_] && earliestDenom_==9 ) earliestDenom_ = iebx;
319  }
320  }
321  }
322 
323  if(denomBitGood){
324 
325  //get earliest tech bx's
326  if ( ! tw.empty() ) {
327  for(uint ibit = 0; ibit < techSelected_.size(); ibit++){
328  if(techSelected_[ibit] < tw.size()){
329  if(tw[techSelected_[ibit]] && earliestTech_[ibit] == 9) earliestTech_[ibit] = iebx;
330  }
331  }
332  }
333 
334  //get earliest algo bx's
335  if(!gtDecisionWord.empty()){
336  for(uint ibit = 0; ibit < algoSelected_.size(); ibit++){
337  if(algoSelected_[ibit] < gtDecisionWord.size()){
338  if(gtDecisionWord[algoSelected_[ibit]] && earliestAlgo_[ibit] == 9) earliestAlgo_[ibit] = iebx;
339  }
340  }
341  }
342 
343  }//denomBitGood
344 
345  }//bx
346 
347 
348  //get earliest single muon trigger system bx's
349  if (gmtCollection.isValid()) {
350 
351  // get GMT readout collection
352  L1MuGMTReadoutCollection const* gmtrc = gmtCollection.product();
353  // get record vector
354  std::vector<L1MuGMTReadoutRecord> gmt_records = gmtrc->getRecords();
355  // loop over records of individual bx's
356  std::vector<L1MuGMTReadoutRecord>::const_iterator RRItr;
357 
358  for( RRItr = gmt_records.begin(); RRItr != gmt_records.end(); RRItr++ ) {//loop from BX=-2 to BX=2
359  std::vector<L1MuRegionalCand> INPCands[4] = {
360  RRItr->getDTBXCands(),
361  RRItr->getBrlRPCCands(),
362  RRItr->getCSCCands(),
363  RRItr->getFwdRPCCands()
364  };
365  std::vector<L1MuRegionalCand>::const_iterator INPItr;
366  int BxInEvent = RRItr->getBxInEvent();
367 
368  // find the first non-empty candidate in this bx
369  for(int i=0; i<4; i++) {//for each single muon trigger system
370  for( INPItr = INPCands[i].begin(); INPItr != INPCands[i].end(); ++INPItr ) {
371  if(!INPItr->empty()) {
372  if(bx1st[i]==9) bx1st[i]=BxInEvent+2;//must go from 0 to 4 (consistent with above)
373  }
374  }
375  }
376  //for(int i=0; i<4; i++)
377  // std::cout << "bx1st[" << i << "] = " << bx1st[i];
378  //std::cout << std::endl;
379  }
380 
381  }//gmtCollection.isValid
382 
383 
384  //calculated bx difference
385  if(earliestDenom_ != 9){
386  for(uint ibit = 0; ibit < techSelected_.size(); ibit++){
387  if(earliestTech_[ibit] != 9){
388  int diff = earliestTech_[ibit] - earliestDenom_ ;
389  techBxDiff_[ibit]->Fill(diff);
390  techBxDiffLumi_[ibit]->Fill(e.luminosityBlock(), diff);
391  }
392  }
393  for(uint ibit = 0; ibit < algoSelected_.size(); ibit++){
394  if(earliestAlgo_[ibit] != 9){
395  int diff = earliestAlgo_[ibit] - earliestDenom_ ;
396  algoBxDiff_[ibit]->Fill(diff);
397  algoBxDiffLumi_[ibit]->Fill(e.luminosityBlock(), diff);
398  }
399  }
400 
401  if(bx1st[0] != 9){
402  int diff = bx1st[0] - earliestDenom_;
403  dtBxDiff_->Fill(diff);
405  }
406  if(bx1st[1] != 9){
407  int diff = bx1st[1] - earliestDenom_;
408  rpcbBxDiff_->Fill(diff);
410  }
411  if(bx1st[2] != 9){
412  int diff = bx1st[2] - earliestDenom_;
413  cscBxDiff_->Fill(diff);
415  }
416  if(bx1st[3] != 9){
417  int diff = bx1st[3] - earliestDenom_;
418  rpcfBxDiff_->Fill(diff);
420  }
421 
422  }
423 
424  }//tt41Good
425 
426  } // getbylabel succeeded
427 
428 
429 // // HACK
430 // // getting very basic uncalRH
431 // edm::Handle<FEDRawDataCollection> theRaw;
432 // bool getFed = e.getByLabel(fedRawCollection_, theRaw);
433 // if ( ! getFed ) {
434 // edm::LogInfo("FEDSizeFilter") << fedRawCollection_ << " not available";
435 // }
436 // else { // got the fed raw data
437 // unsigned int totalFEDsize = 0 ;
438 // for (unsigned int i=fedStart_; i<=fedStop_; ++i) {
439 // LogDebug("Parameter") << "Examining fed " << i << " with size "
440 // << theRaw->FEDData(i).size() ;
441 // totalFEDsize += theRaw->FEDData(i).size() ;
442 // }
443 // pixFedSize_->Fill(totalFEDsize);
444 // if( (myGTFEbx!=-1) ) pixFedSizeBx_->Fill(myGTFEbx,totalFEDsize);
445 
446 // LogDebug("Parameter") << "Total FED size: " << totalFEDsize;
447 // }
448 
449 // // HF - stolen from HLTrigger/special
450 // // getting very basic uncalRH
451 // double maxHFenergy = -1;
452 // edm::Handle<HFRecHitCollection> crudeHits;
453 // bool getHF = e.getByLabel(HcalRecHitCollection_, crudeHits);
454 // if ( ! getHF ) {
455 // LogDebug("Status") << HcalRecHitCollection_ << " not available";
456 // }
457 // else {
458 
459 // LogDebug("Status") << "Filtering, with " << crudeHits->size()
460 // << " recHits to consider" ;
461 // for ( HFRecHitCollection::const_iterator hitItr = crudeHits->begin();
462 // hitItr != crudeHits->end(); ++hitItr ) {
463 // HFRecHit hit = (*hitItr);
464 
465 // // masking noisy channels
466 // std::vector<int>::iterator result;
467 // result = std::find( maskedList_.begin(), maskedList_.end(),
468 // HcalDetId(hit.id()).hashed_index() );
469 // if (result != maskedList_.end())
470 // continue;
471 // hfEnergy_->Fill(hit.energy());
472 // if( (hit.energy()>maxHFenergy) ) maxHFenergy = hit.energy();
473 // }
474 // }
475 
476 // if( (maxHFenergy!=-1 && myGTFEbx!=-1) ) hfEnergyMaxTowerBx_->Fill(myGTFEbx,maxHFenergy);
477 // // END HACK
478 
479  return;
480 
481 }
#define LogDebug(id)
int i
Definition: DBlmapReader.cc:9
bool tfIsTech_
Definition: L1Scalers.h:57
MonitorElement * l1scalers_
Definition: L1Scalers.h:63
edm::InputTag l1GtDataSource_
Definition: L1Scalers.h:53
MonitorElement * rpcfBxDiffLumi_
Definition: L1Scalers.h:92
edm::LuminosityBlockNumber_t luminosityBlock() const
Definition: EventBase.h:59
MonitorElement * rpcbBxDiffLumi_
Definition: L1Scalers.h:90
MonitorElement * dtBxDiffLumi_
Definition: L1Scalers.h:86
std::vector< int > earliestTech_
Definition: L1Scalers.h:112
void Fill(long long x)
bool denomIsTech_
Definition: L1Scalers.h:55
std::vector< MonitorElement * > algoBxDiff_
Definition: L1Scalers.h:81
MonitorElement * cscBxDiff_
Definition: L1Scalers.h:87
MonitorElement * l1techScalers_
Definition: L1Scalers.h:64
std::vector< bool > DecisionWord
typedefs
MonitorElement * l1scalersBx_
Definition: L1Scalers.h:70
int nev_
Definition: L1Scalers.h:50
int j
Definition: DBlmapReader.cc:9
MonitorElement * l1TtCounter_
Definition: L1Scalers.h:78
std::vector< bool > TechnicalTriggerWord
technical trigger bits (64 bits)
std::vector< MonitorElement * > techBxDiff_
Definition: L1Scalers.h:82
bool isValid() const
Definition: HandleBase.h:76
std::vector< MonitorElement * > techBxDiffLumi_
Definition: L1Scalers.h:84
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:361
std::vector< unsigned int > algoSelected_
Definition: L1Scalers.h:59
const cms_uint16_t bxNr() const
get/set bunch cross number as counted in the GTFE board
Definition: L1GtfeWord.h:124
MonitorElement * l1Correlations_
Definition: L1Scalers.h:65
std::vector< unsigned int > techSelected_
Definition: L1Scalers.h:60
MonitorElement * rpcbBxDiff_
Definition: L1Scalers.h:89
MonitorElement * dtBxDiff_
Definition: L1Scalers.h:85
unsigned int rateAlgoCounter_
Definition: L1Scalers.h:101
std::vector< int > earliestAlgo_
Definition: L1Scalers.h:113
int earliestDenom_
Definition: L1Scalers.h:111
unsigned int tfBit_
Definition: L1Scalers.h:58
MonitorElement * bxNum_
Definition: L1Scalers.h:66
T const * product() const
Definition: Handle.h:74
MonitorElement * l1techScalersBx_
Definition: L1Scalers.h:71
std::string const & label() const
Definition: InputTag.h:42
std::vector< MonitorElement * > algoBxDiffLumi_
Definition: L1Scalers.h:83
#define begin
Definition: vmac.h:31
std::vector< L1MuGMTReadoutRecord > const & getRecords() const
MonitorElement * l1AlgoCounter_
Definition: L1Scalers.h:77
unsigned int denomBit_
Definition: L1Scalers.h:56
MonitorElement * rpcfBxDiff_
Definition: L1Scalers.h:91
unsigned int rateTtCounter_
Definition: L1Scalers.h:102
MonitorElement * cscBxDiffLumi_
Definition: L1Scalers.h:88
void L1Scalers::beginJob ( void  )
virtual

BeginJob.

Reimplemented from edm::EDAnalyzer.

Definition at line 82 of file L1Scalers.cc.

References algoBxDiff_, algoBxDiffLumi_, algoSelected_, DQMStore::book1D(), DQMStore::book2D(), DQMStore::bookInt(), bxNum_, cscBxDiff_, cscBxDiffLumi_, dbe_, denomBit_, denomIsTech_, dtBxDiff_, dtBxDiffLumi_, folderName_, l1AlgoCounter_, l1Correlations_, l1scalers_, l1scalersBx_, l1techScalers_, l1techScalersBx_, l1TtCounter_, LogDebug, MAX_LUMI_BIN, MAX_LUMI_SEG, nLumiBlock_, cppFunctionSkipper::operator, rpcbBxDiff_, rpcbBxDiffLumi_, rpcfBxDiff_, rpcfBxDiffLumi_, DQMStore::setCurrentFolder(), DQMStore::setVerbose(), techBxDiff_, techBxDiffLumi_, and techSelected_.

83 {
84  LogDebug("Status") << "L1Scalers::beginJob()...";
85 
87  if (dbe_ ) {
88  dbe_->setVerbose(0);
90 
91 
92  l1scalers_ = dbe_->book1D("l1AlgoBits", "L1 Algorithm Bits",
93  128, -0.5, 127.5);
94  l1scalersBx_ = dbe_->book2D("l1AlgoBits_Vs_Bx", "L1 Algorithm Bits vs "
95  "Bunch Number",
96  3600, -0.5, 3599.5,
97  128, -0.5, 127.5);
98  l1Correlations_ = dbe_->book2D("l1Correlations", "L1 Algorithm Bits "
99  "Correlations",
100  128, -0.5, 127.5,
101  128, -0.5, 127.5);
102  l1techScalers_ = dbe_->book1D("l1TechBits", "L1 Tech. Trigger Bits",
103  64, -0.5, 63.5);
104  l1techScalersBx_ = dbe_->book2D("l1TechBits_Vs_Bx", "L1 Technical "
105  "Trigger "
106  "Bits vs Bunch Number",
107  3600, -0.5, 3599.5, 64, -0.5, 63.5);
108 // pixFedSizeBx_ = dbe_->book2D("pixFedSize_Vs_Bx", "Size of Pixel FED data vs "
109 // "Bunch Number",
110 // 3600, -0.5, 3599.5,
111 // 200, 0., 20000.);
112 // hfEnergyMaxTowerBx_ = dbe_->book2D("hfEnergyMaxTower_Vs_Bx", "HF Energy Max Tower vs "
113 // "Bunch Number",
114 // 3600, -0.5, 3599.5,
115 // 100, 0., 500.);
116  bxNum_ = dbe_->book1D("bxNum", "Bunch number from GTFE",
117  3600, -0.5, 3599.5);
118 
119  nLumiBlock_ = dbe_->bookInt("nLumiBlock");
120 
121 // l1 total rate
122 
123  l1AlgoCounter_ = dbe_->bookInt("l1AlgoCounter");
124  l1TtCounter_ = dbe_->bookInt("l1TtCounter");
125 
126 
127  //int maxNbins = 200;
128  //int maxLumi = 2000;
129 
130  //timing plots
131  std::stringstream sdenom;
132  if(denomIsTech_) sdenom << "tech" ;
133  else sdenom << "algo" ;
134 
135  dbe_->setCurrentFolder(folderName_ + "/Synch");
136  algoBxDiff_.clear();
137  algoBxDiff_.clear();
138  algoBxDiffLumi_.clear();
139  techBxDiffLumi_.clear();
140  for(uint ibit = 0; ibit < algoSelected_.size(); ibit++){
141  std::stringstream ss;
142  ss << algoSelected_[ibit] << "_" << sdenom.str() << denomBit_;
143  algoBxDiff_.push_back(dbe_->book1D("BX_diff_algo"+ ss.str(),"BX_diff_algo"+ ss.str(),9,-4,5));
144  algoBxDiffLumi_.push_back(dbe_->book2D("BX_diffvslumi_algo"+ ss.str(),"BX_diff_algo"+ss.str(),MAX_LUMI_BIN,-0.5,double(MAX_LUMI_SEG)-0.5,9,-4,5));
145  //algoBxDiffLumi_[ibit]->setAxisTitle("Lumi Section", 1);
146  }
147  for(uint ibit = 0; ibit < techSelected_.size(); ibit++){
148  std::stringstream ss;
149  ss << techSelected_[ibit] << "_" << sdenom.str() << denomBit_;
150  techBxDiff_.push_back(dbe_->book1D("BX_diff_tech"+ ss.str(),"BX_diff_tech"+ ss.str(),9,-4,5));
151  techBxDiffLumi_.push_back(dbe_->book2D("BX_diffvslumi_tech"+ ss.str(),"BX_diff_tech"+ss.str(),MAX_LUMI_BIN,-0.5,double(MAX_LUMI_SEG)-0.5,9,-4,5));
152  //techBxDiffLumi_[ibit]->setAxisTitle("Lumi Section", 1);
153  }
154 
155  //GMT timing plots
156  std::stringstream ss1;
157  ss1 << "_" << sdenom.str() << denomBit_;
158  dtBxDiff_ = dbe_->book1D("BX_diff_DT" + ss1.str(),"BX_diff_DT" + ss1.str(),9,-4,5);
159  dtBxDiffLumi_ = dbe_->book2D("BX_diffvslumi_DT" + ss1.str(),"BX_diffvslumi_DT" + ss1.str(),MAX_LUMI_BIN,-0.5,double(MAX_LUMI_SEG)-0.5,9,-4,5);
160  cscBxDiff_ = dbe_->book1D("BX_diff_CSC" + ss1.str(),"BX_diff_CSC" + ss1.str(),9,-4,5);
161  cscBxDiffLumi_ = dbe_->book2D("BX_diffvslumi_CSC" + ss1.str(),"BX_diffvslumi_CSC" + ss1.str(),MAX_LUMI_BIN,-0.5,double(MAX_LUMI_SEG)-0.5,9,-4,5);
162  rpcbBxDiff_ = dbe_->book1D("BX_diff_RPCb" + ss1.str(),"BX_diff_RPCb" + ss1.str(),9,-4,5);
163  rpcbBxDiffLumi_ = dbe_->book2D("BX_diffvslumi_RPCb" + ss1.str(),"BX_diffvslumi_RPCb" + ss1.str(),MAX_LUMI_BIN,-0.5,double(MAX_LUMI_SEG)-0.5,9,-4,5);
164  rpcfBxDiff_ = dbe_->book1D("BX_diff_RPCf" + ss1.str(),"BX_diff_RPCf" + ss1.str(),9,-4,5);
165  rpcfBxDiffLumi_ = dbe_->book2D("BX_diffvslumi_RPCf" + ss1.str(),"BX_diffvslumi_RPCf" + ss1.str(),MAX_LUMI_BIN,-0.5,double(MAX_LUMI_SEG)-0.5,9,-4,5);
166 
167 
168  // early triggers
169 // pixFedSize_ = dbe_->book1D("pixFedSize", "Size of Pixel FED data",
170 // 200, 0., 20000.);
171 // hfEnergy_ = dbe_->book1D("hfEnergy", "HF energy",
172 // 100, 0., 500.);
173 
174  }
175 
176 
177  return;
178 }
#define LogDebug(id)
MonitorElement * l1scalers_
Definition: L1Scalers.h:63
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:722
std::string folderName_
Definition: L1Scalers.h:62
MonitorElement * rpcfBxDiffLumi_
Definition: L1Scalers.h:92
MonitorElement * rpcbBxDiffLumi_
Definition: L1Scalers.h:90
MonitorElement * dtBxDiffLumi_
Definition: L1Scalers.h:86
bool denomIsTech_
Definition: L1Scalers.h:55
#define MAX_LUMI_SEG
Definition: L1Scalers.h:14
std::vector< MonitorElement * > algoBxDiff_
Definition: L1Scalers.h:81
MonitorElement * cscBxDiff_
Definition: L1Scalers.h:87
MonitorElement * l1techScalers_
Definition: L1Scalers.h:64
MonitorElement * l1scalersBx_
Definition: L1Scalers.h:70
#define MAX_LUMI_BIN
Definition: L1Scalers.h:15
MonitorElement * l1TtCounter_
Definition: L1Scalers.h:78
void setVerbose(unsigned level)
Definition: DQMStore.cc:398
std::vector< MonitorElement * > techBxDiff_
Definition: L1Scalers.h:82
std::vector< MonitorElement * > techBxDiffLumi_
Definition: L1Scalers.h:84
DQMStore * dbe_
Definition: L1Scalers.h:49
std::vector< unsigned int > algoSelected_
Definition: L1Scalers.h:59
MonitorElement * l1Correlations_
Definition: L1Scalers.h:65
std::vector< unsigned int > techSelected_
Definition: L1Scalers.h:60
MonitorElement * rpcbBxDiff_
Definition: L1Scalers.h:89
MonitorElement * dtBxDiff_
Definition: L1Scalers.h:85
MonitorElement * nLumiBlock_
Definition: L1Scalers.h:76
MonitorElement * bxNum_
Definition: L1Scalers.h:66
MonitorElement * l1techScalersBx_
Definition: L1Scalers.h:71
std::vector< MonitorElement * > algoBxDiffLumi_
Definition: L1Scalers.h:83
MonitorElement * l1AlgoCounter_
Definition: L1Scalers.h:77
unsigned int denomBit_
Definition: L1Scalers.h:56
MonitorElement * bookInt(const char *name)
Book int.
Definition: DQMStore.cc:629
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:850
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:434
MonitorElement * rpcfBxDiff_
Definition: L1Scalers.h:91
MonitorElement * cscBxDiffLumi_
Definition: L1Scalers.h:88
void L1Scalers::beginRun ( const edm::Run run,
const edm::EventSetup c 
)
virtual

BeginRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 492 of file L1Scalers.cc.

493 {
494 }
void L1Scalers::endJob ( void  )
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 180 of file L1Scalers.cc.

181 {
182 }
void L1Scalers::endLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup c 
)
virtual

End LumiBlock DQM Client Diagnostic should be performed here

Reimplemented from edm::EDAnalyzer.

Definition at line 483 of file L1Scalers.cc.

References MonitorElement::Fill(), edm::LuminosityBlockBase::id(), edm::LuminosityBlockID::luminosityBlock(), and nLumiBlock_.

485 {
486  nLumiBlock_->Fill(lumiSeg.id().luminosityBlock());
487 
488 }
LuminosityBlockID id() const
void Fill(long long x)
MonitorElement * nLumiBlock_
Definition: L1Scalers.h:76
LuminosityBlockNumber_t luminosityBlock() const
void L1Scalers::endRun ( const edm::Run run,
const edm::EventSetup c 
)
virtual

EndRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 497 of file L1Scalers.cc.

498 {
499 }

Member Data Documentation

std::vector<MonitorElement* > L1Scalers::algoBxDiff_
private

Definition at line 81 of file L1Scalers.h.

Referenced by analyze(), and beginJob().

std::vector<MonitorElement* > L1Scalers::algoBxDiffLumi_
private

Definition at line 83 of file L1Scalers.h.

Referenced by analyze(), and beginJob().

std::vector<unsigned int> L1Scalers::algoSelected_
private

Definition at line 59 of file L1Scalers.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1Scalers::bxNum_
private

Definition at line 66 of file L1Scalers.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1Scalers::cscBxDiff_
private

Definition at line 87 of file L1Scalers.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1Scalers::cscBxDiffLumi_
private

Definition at line 88 of file L1Scalers.h.

Referenced by analyze(), and beginJob().

DQMStore* L1Scalers::dbe_
private

Definition at line 49 of file L1Scalers.h.

Referenced by beginJob().

unsigned int L1Scalers::denomBit_
private

Definition at line 56 of file L1Scalers.h.

Referenced by analyze(), and beginJob().

bool L1Scalers::denomIsTech_
private

Definition at line 55 of file L1Scalers.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1Scalers::dtBxDiff_
private

Definition at line 85 of file L1Scalers.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1Scalers::dtBxDiffLumi_
private

Definition at line 86 of file L1Scalers.h.

Referenced by analyze(), and beginJob().

std::vector<int> L1Scalers::earliestAlgo_
private

Definition at line 113 of file L1Scalers.h.

Referenced by analyze().

int L1Scalers::earliestDenom_
private

Definition at line 111 of file L1Scalers.h.

Referenced by analyze().

std::vector<int> L1Scalers::earliestTech_
private

Definition at line 112 of file L1Scalers.h.

Referenced by analyze().

edm::InputTag L1Scalers::fedRawCollection_
private

Definition at line 105 of file L1Scalers.h.

unsigned int L1Scalers::fedStart_
private

Definition at line 99 of file L1Scalers.h.

unsigned int L1Scalers::fedStop_
private

Definition at line 99 of file L1Scalers.h.

std::string L1Scalers::folderName_
private

Definition at line 62 of file L1Scalers.h.

Referenced by beginJob().

edm::InputTag L1Scalers::HcalRecHitCollection_
private

Definition at line 108 of file L1Scalers.h.

MonitorElement* L1Scalers::l1AlgoCounter_
private

Definition at line 77 of file L1Scalers.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1Scalers::l1Correlations_
private

Definition at line 65 of file L1Scalers.h.

Referenced by analyze(), and beginJob().

edm::InputTag L1Scalers::l1GtDataSource_
private

Definition at line 53 of file L1Scalers.h.

Referenced by analyze().

MonitorElement* L1Scalers::l1scalers_
private

Definition at line 63 of file L1Scalers.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1Scalers::l1scalersBx_
private

Definition at line 70 of file L1Scalers.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1Scalers::l1techScalers_
private

Definition at line 64 of file L1Scalers.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1Scalers::l1techScalersBx_
private

Definition at line 71 of file L1Scalers.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1Scalers::l1TtCounter_
private

Definition at line 78 of file L1Scalers.h.

Referenced by analyze(), and beginJob().

std::vector<int> L1Scalers::maskedList_
private

Definition at line 107 of file L1Scalers.h.

int L1Scalers::nev_
private

Definition at line 50 of file L1Scalers.h.

Referenced by analyze().

MonitorElement* L1Scalers::nLumiBlock_
private

Definition at line 76 of file L1Scalers.h.

Referenced by beginJob(), and endLuminosityBlock().

unsigned int L1Scalers::rateAlgoCounter_
private

Definition at line 101 of file L1Scalers.h.

Referenced by analyze().

unsigned int L1Scalers::rateTtCounter_
private

Definition at line 102 of file L1Scalers.h.

Referenced by analyze().

MonitorElement* L1Scalers::rpcbBxDiff_
private

Definition at line 89 of file L1Scalers.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1Scalers::rpcbBxDiffLumi_
private

Definition at line 90 of file L1Scalers.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1Scalers::rpcfBxDiff_
private

Definition at line 91 of file L1Scalers.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1Scalers::rpcfBxDiffLumi_
private

Definition at line 92 of file L1Scalers.h.

Referenced by analyze(), and beginJob().

std::vector<MonitorElement* > L1Scalers::techBxDiff_
private

Definition at line 82 of file L1Scalers.h.

Referenced by analyze(), and beginJob().

std::vector<MonitorElement* > L1Scalers::techBxDiffLumi_
private

Definition at line 84 of file L1Scalers.h.

Referenced by analyze(), and beginJob().

std::vector<unsigned int> L1Scalers::techSelected_
private

Definition at line 60 of file L1Scalers.h.

Referenced by analyze(), and beginJob().

unsigned int L1Scalers::tfBit_
private

Definition at line 58 of file L1Scalers.h.

Referenced by analyze().

bool L1Scalers::tfIsTech_
private

Definition at line 57 of file L1Scalers.h.

Referenced by analyze().

unsigned int L1Scalers::threshold_
private

Definition at line 98 of file L1Scalers.h.

bool L1Scalers::verbose_
private

Definition at line 52 of file L1Scalers.h.