test
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:
DQMEDAnalyzer edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > > edm::stream::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
void endLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c) override
 DQM Client Diagnostic should be performed here: More...
 
 L1Scalers (const edm::ParameterSet &ps)
 
virtual ~L1Scalers ()
 
- Public Member Functions inherited from DQMEDAnalyzer
virtual void beginRun (edm::Run const &, edm::EventSetup const &) final
 
virtual void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer (void)
 
virtual void endLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
virtual void endRunSummary (edm::Run const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
uint32_t streamId () const
 
- Public Member Functions inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::stream::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector
< ProductResolverIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Attributes

std::vector< MonitorElement * > algoBxDiff_
 
std::vector< MonitorElement * > algoBxDiffLumi_
 
std::vector< unsigned int > algoSelected_
 
MonitorElementbxNum_
 
MonitorElementcscBxDiff_
 
MonitorElementcscBxDiffLumi_
 
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::EDGetTokenT
< L1MuGMTReadoutCollection
l1GmtDataSource_
 
edm::EDGetTokenT
< L1GlobalTriggerReadoutRecord
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::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
typedef CacheContexts< T...> CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T...> HasAbility
 
typedef
CacheTypes::LuminosityBlockCache 
LuminosityBlockCache
 
typedef
LuminosityBlockContextT
< LuminosityBlockCache,
RunCache, GlobalCache
LuminosityBlockContext
 
typedef
CacheTypes::LuminosityBlockSummaryCache 
LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache,
GlobalCache
RunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDAnalyzerBase
typedef EDAnalyzerAdaptorBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static std::shared_ptr
< dqmDetails::NoCache
globalBeginLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *)
 
static std::shared_ptr
< dqmDetails::NoCache
globalBeginRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *)
 
static void globalEndLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *, dqmDetails::NoCache *)
 
static void globalEndRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *, dqmDetails::NoCache *)
 
- Static Public Member Functions inherited from edm::stream::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- 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)

Definition at line 37 of file L1Scalers.cc.

References LogDebug.

38  : nev_(0),
39  verbose_(ps.getUntrackedParameter<bool>("verbose", false)),
40  l1GtDataSource_(consumes<L1GlobalTriggerReadoutRecord>(ps.getParameter<edm::InputTag>("l1GtData"))),
41  l1GmtDataSource_(consumes<L1MuGMTReadoutCollection>(ps.getParameter<edm::InputTag>("l1GtData"))),
42  denomIsTech_(ps.getUntrackedParameter<bool>("denomIsTech", true)),
43  denomBit_(ps.getUntrackedParameter<unsigned int>("denomBit", 40)),
44  tfIsTech_(ps.getUntrackedParameter<bool>("tfIsTech", true)),
45  tfBit_(ps.getUntrackedParameter<unsigned int>("tfBit", 41)),
46  algoSelected_(ps.getUntrackedParameter<std::vector<unsigned int> >(
47  "algoMonitorBits", std::vector<unsigned int>())),
48  techSelected_(ps.getUntrackedParameter<std::vector<unsigned int> >(
49  "techMonitorBits", std::vector<unsigned int>())),
51  "dqmFolder", std::string("L1T/L1Scalers_EvF"))),
52  l1scalers_(0),
53  l1techScalers_(0),
54  l1Correlations_(0),
55  bxNum_(0),
56  l1scalersBx_(0),
58  nLumiBlock_(0),
59  l1AlgoCounter_(0),
60  l1TtCounter_(0),
61  fedStart_(ps.getUntrackedParameter<unsigned int>("firstFED", 0)),
62  fedStop_(ps.getUntrackedParameter<unsigned int>("lastFED", 931)),
64  rateTtCounter_(0),
65  fedRawCollection_(ps.getParameter<edm::InputTag>("fedRawData")),
66  maskedList_(ps.getUntrackedParameter<std::vector<int> >(
67  "maskedChannels",
68  std::vector<int>())), // this is using the ashed index
70  ps.getParameter<edm::InputTag>("HFRecHitCollection")) {
71  LogDebug("Status") << "constructor";
72 }
#define LogDebug(id)
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
bool tfIsTech_
Definition: L1Scalers.h:37
MonitorElement * l1scalers_
Definition: L1Scalers.h:43
bool verbose_
Definition: L1Scalers.h:31
std::string folderName_
Definition: L1Scalers.h:42
unsigned int fedStop_
Definition: L1Scalers.h:73
edm::InputTag HcalRecHitCollection_
Definition: L1Scalers.h:81
edm::InputTag fedRawCollection_
Definition: L1Scalers.h:78
bool denomIsTech_
Definition: L1Scalers.h:35
MonitorElement * l1techScalers_
Definition: L1Scalers.h:44
MonitorElement * l1scalersBx_
Definition: L1Scalers.h:49
int nev_
Definition: L1Scalers.h:29
unsigned int fedStart_
Definition: L1Scalers.h:73
MonitorElement * l1TtCounter_
Definition: L1Scalers.h:55
std::vector< unsigned int > algoSelected_
Definition: L1Scalers.h:39
std::vector< int > maskedList_
Definition: L1Scalers.h:80
MonitorElement * l1Correlations_
Definition: L1Scalers.h:45
std::vector< unsigned int > techSelected_
Definition: L1Scalers.h:40
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > l1GtDataSource_
Definition: L1Scalers.h:32
unsigned int rateAlgoCounter_
Definition: L1Scalers.h:75
edm::EDGetTokenT< L1MuGMTReadoutCollection > l1GmtDataSource_
Definition: L1Scalers.h:33
MonitorElement * nLumiBlock_
Definition: L1Scalers.h:53
unsigned int tfBit_
Definition: L1Scalers.h:38
MonitorElement * bxNum_
Definition: L1Scalers.h:46
MonitorElement * l1techScalersBx_
Definition: L1Scalers.h:50
MonitorElement * l1AlgoCounter_
Definition: L1Scalers.h:54
unsigned int denomBit_
Definition: L1Scalers.h:36
unsigned int rateTtCounter_
Definition: L1Scalers.h:76
virtual L1Scalers::~L1Scalers ( )
inlinevirtual

Definition at line 20 of file L1Scalers.h.

20 {};

Member Function Documentation

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

empty DecisionWord

Implements edm::stream::EDAnalyzerBase.

Definition at line 160 of file L1Scalers.cc.

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

160  {
161  nev_++;
162 
163  LogDebug("Status") << "L1Scalers::analyze event " << nev_;
164 
165  // int myGTFEbx = -1;
166  // get Global Trigger decision and the decision word
167  // these are locally derived
169  bool t = e.getByToken(l1GtDataSource_, gtRecord);
170 
171  if (!t) {
172  LogDebug("Product") << "can't find L1GlobalTriggerReadoutRecord";
173  } else {
174  L1GtfeWord gtfeWord = gtRecord->gtfeWord();
175  int gtfeBx = gtfeWord.bxNr();
176  bxNum_->Fill(gtfeBx);
177 
178  bool tfBitGood = false;
179 
180  // First, the default
181  // vector of bool
182  for (int iebx = 0; iebx <= 4; iebx++) {
183  // Algorithm Bits
184  DecisionWord gtDecisionWord = gtRecord->decisionWord(iebx - 2);
185  // DecisionWord gtDecisionWord = gtRecord->decisionWord();
186  if (!gtDecisionWord.empty()) { // if board not there this is zero
187  // loop over dec. bit to get total rate (no overlap)
188  for (uint i = 0; i < gtDecisionWord.size(); ++i) {
189  if (gtDecisionWord[i]) {
192  break;
193  }
194  }
195  // loop over decision bits
196  for (uint i = 0; i < gtDecisionWord.size(); ++i) {
197  if (gtDecisionWord[i]) {
198  l1scalers_->Fill(i);
199  l1scalersBx_->Fill(gtfeBx - 2 + iebx, i);
200  for (uint j = i + 1; j < gtDecisionWord.size(); ++j) {
201  if (gtDecisionWord[j]) {
202  l1Correlations_->Fill(i, j);
203  l1Correlations_->Fill(j, i);
204  }
205  }
206  }
207  }
208  }
209 
210  // loop over technical triggers
211  // vector of bool again.
212  TechnicalTriggerWord tw = gtRecord->technicalTriggerWord(iebx - 2);
213  // TechnicalTriggerWord tw = gtRecord->technicalTriggerWord();
214  if (!tw.empty()) {
215  // loop over dec. bit to get total rate (no overlap)
216  for (uint i = 0; i < tw.size(); ++i) {
217  if (tw[i]) {
218  rateTtCounter_++;
220  break;
221  }
222  }
223  for (uint i = 0; i < tw.size(); ++i) {
224  if (tw[i]) {
225  l1techScalers_->Fill(i);
226  l1techScalersBx_->Fill(gtfeBx - 2 + iebx, i);
227  }
228  }
229 
230  // check if bit used to filter timing plots fired in this event
231  // (anywhere in the bx window)
232  if (tfIsTech_) {
233  if (tfBit_ < tw.size()) {
234  if (tw[tfBit_]) tfBitGood = true;
235  }
236  }
237  } // ! tw.empty
238 
239  } // bx
240 
241  // timing plots
242  earliestDenom_ = 9;
243  earliestAlgo_.clear();
244  earliestTech_.clear();
245  for (uint i = 0; i < techSelected_.size(); i++) earliestTech_.push_back(9);
246  for (uint i = 0; i < algoSelected_.size(); i++) earliestAlgo_.push_back(9);
247 
248  // GMT information
250  e.getByToken(l1GmtDataSource_, gmtCollection);
251 
252  if (!gmtCollection.isValid()) {
253  edm::LogInfo("DataNotFound")
254  << "can't find L1MuGMTReadoutCollection with label";
255  }
256 
257  // remember the bx of 1st candidate of each system (9=none)
258  int bx1st[4] = {9, 9, 9, 9};
259 
260  if (tfBitGood) { // to avoid single BSC hits
261 
262  for (int iebx = 0; iebx <= 4; iebx++) {
263  TechnicalTriggerWord tw = gtRecord->technicalTriggerWord(iebx - 2);
264  DecisionWord gtDecisionWord = gtRecord->decisionWord(iebx - 2);
265 
266  bool denomBitGood = false;
267 
268  // check if reference bit is valid
269  if (denomIsTech_) {
270  if (!tw.empty()) {
271  if (denomBit_ < tw.size()) {
272  denomBitGood = true;
273  if (tw[denomBit_] && earliestDenom_ == 9) earliestDenom_ = iebx;
274  }
275  }
276  } else {
277  if (!gtDecisionWord.empty()) {
278  if (denomBit_ < gtDecisionWord.size()) {
279  denomBitGood = true;
280  if (gtDecisionWord[denomBit_] && earliestDenom_ == 9)
281  earliestDenom_ = iebx;
282  }
283  }
284  }
285 
286  if (denomBitGood) {
287  // get earliest tech bx's
288  if (!tw.empty()) {
289  for (uint ibit = 0; ibit < techSelected_.size(); ibit++) {
290  if (techSelected_[ibit] < tw.size()) {
291  if (tw[techSelected_[ibit]] && earliestTech_[ibit] == 9)
292  earliestTech_[ibit] = iebx;
293  }
294  }
295  }
296 
297  // get earliest algo bx's
298  if (!gtDecisionWord.empty()) {
299  for (uint ibit = 0; ibit < algoSelected_.size(); ibit++) {
300  if (algoSelected_[ibit] < gtDecisionWord.size()) {
301  if (gtDecisionWord[algoSelected_[ibit]] &&
302  earliestAlgo_[ibit] == 9)
303  earliestAlgo_[ibit] = iebx;
304  }
305  }
306  }
307  } // denomBitGood
308  } // bx
309 
310  // get earliest single muon trigger system bx's
311  if (gmtCollection.isValid()) {
312  // get GMT readout collection
313  L1MuGMTReadoutCollection const* gmtrc = gmtCollection.product();
314  // get record vector
315  std::vector<L1MuGMTReadoutRecord> gmt_records = gmtrc->getRecords();
316  // loop over records of individual bx's
317  std::vector<L1MuGMTReadoutRecord>::const_iterator RRItr;
318 
319  for (RRItr = gmt_records.begin(); RRItr != gmt_records.end();
320  RRItr++) { // loop from BX=-2 to BX=2
321  std::vector<L1MuRegionalCand> INPCands[4] = {
322  RRItr->getDTBXCands(), RRItr->getBrlRPCCands(),
323  RRItr->getCSCCands(), RRItr->getFwdRPCCands()};
324  std::vector<L1MuRegionalCand>::const_iterator INPItr;
325  int BxInEvent = RRItr->getBxInEvent();
326 
327  // find the first non-empty candidate in this bx
328  for (int i = 0; i < 4; i++) { // for each single muon trigger system
329  for (INPItr = INPCands[i].begin(); INPItr != INPCands[i].end();
330  ++INPItr) {
331  if (!INPItr->empty()) {
332  if (bx1st[i] == 9)
333  bx1st[i] = BxInEvent +
334  2; // must go from 0 to 4 (consistent with above)
335  }
336  }
337  }
338  }
339  } // gmtCollection.isValid
340  // calculated bx difference
341  if (earliestDenom_ != 9) {
342  for (uint ibit = 0; ibit < techSelected_.size(); ibit++) {
343  if (earliestTech_[ibit] != 9) {
344  int diff = earliestTech_[ibit] - earliestDenom_;
345  techBxDiff_[ibit]->Fill(diff);
346  techBxDiffLumi_[ibit]->Fill(e.luminosityBlock(), diff);
347  }
348  }
349  for (uint ibit = 0; ibit < algoSelected_.size(); ibit++) {
350  if (earliestAlgo_[ibit] != 9) {
351  int diff = earliestAlgo_[ibit] - earliestDenom_;
352  algoBxDiff_[ibit]->Fill(diff);
353  algoBxDiffLumi_[ibit]->Fill(e.luminosityBlock(), diff);
354  }
355  }
356 
357  if (bx1st[0] != 9) {
358  int diff = bx1st[0] - earliestDenom_;
359  dtBxDiff_->Fill(diff);
361  }
362  if (bx1st[1] != 9) {
363  int diff = bx1st[1] - earliestDenom_;
364  rpcbBxDiff_->Fill(diff);
366  }
367  if (bx1st[2] != 9) {
368  int diff = bx1st[2] - earliestDenom_;
369  cscBxDiff_->Fill(diff);
371  }
372  if (bx1st[3] != 9) {
373  int diff = bx1st[3] - earliestDenom_;
374  rpcfBxDiff_->Fill(diff);
376  }
377  }
378  } // tt41Good
379  }
380  return;
381 }
#define LogDebug(id)
int i
Definition: DBlmapReader.cc:9
bool tfIsTech_
Definition: L1Scalers.h:37
MonitorElement * l1scalers_
Definition: L1Scalers.h:43
std::vector< MonitorElement * > techBxDiff_
Definition: L1Scalers.h:59
std::vector< MonitorElement * > algoBxDiffLumi_
Definition: L1Scalers.h:60
std::vector< MonitorElement * > algoBxDiff_
Definition: L1Scalers.h:58
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:457
MonitorElement * rpcfBxDiffLumi_
Definition: L1Scalers.h:69
edm::LuminosityBlockNumber_t luminosityBlock() const
Definition: EventBase.h:61
MonitorElement * rpcbBxDiffLumi_
Definition: L1Scalers.h:67
MonitorElement * dtBxDiffLumi_
Definition: L1Scalers.h:63
list diff
Definition: mps_update.py:85
std::vector< int > earliestTech_
Definition: L1Scalers.h:84
void Fill(long long x)
bool denomIsTech_
Definition: L1Scalers.h:35
MonitorElement * cscBxDiff_
Definition: L1Scalers.h:64
MonitorElement * l1techScalers_
Definition: L1Scalers.h:44
std::vector< bool > DecisionWord
typedefs
MonitorElement * l1scalersBx_
Definition: L1Scalers.h:49
int nev_
Definition: L1Scalers.h:29
int j
Definition: DBlmapReader.cc:9
MonitorElement * l1TtCounter_
Definition: L1Scalers.h:55
std::vector< bool > TechnicalTriggerWord
technical trigger bits (64 bits)
std::vector< MonitorElement * > techBxDiffLumi_
Definition: L1Scalers.h:61
bool isValid() const
Definition: HandleBase.h:75
std::vector< unsigned int > algoSelected_
Definition: L1Scalers.h:39
const cms_uint16_t bxNr() const
get/set bunch cross number as counted in the GTFE board
Definition: L1GtfeWord.h:122
MonitorElement * l1Correlations_
Definition: L1Scalers.h:45
std::vector< unsigned int > techSelected_
Definition: L1Scalers.h:40
MonitorElement * rpcbBxDiff_
Definition: L1Scalers.h:66
MonitorElement * dtBxDiff_
Definition: L1Scalers.h:62
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > l1GtDataSource_
Definition: L1Scalers.h:32
T const * product() const
Definition: Handle.h:81
unsigned int rateAlgoCounter_
Definition: L1Scalers.h:75
std::vector< int > earliestAlgo_
Definition: L1Scalers.h:85
edm::EDGetTokenT< L1MuGMTReadoutCollection > l1GmtDataSource_
Definition: L1Scalers.h:33
int earliestDenom_
Definition: L1Scalers.h:83
unsigned int tfBit_
Definition: L1Scalers.h:38
MonitorElement * bxNum_
Definition: L1Scalers.h:46
MonitorElement * l1techScalersBx_
Definition: L1Scalers.h:50
#define begin
Definition: vmac.h:30
std::vector< L1MuGMTReadoutRecord > const & getRecords() const
MonitorElement * l1AlgoCounter_
Definition: L1Scalers.h:54
unsigned int denomBit_
Definition: L1Scalers.h:36
MonitorElement * rpcfBxDiff_
Definition: L1Scalers.h:68
unsigned int rateTtCounter_
Definition: L1Scalers.h:76
MonitorElement * cscBxDiffLumi_
Definition: L1Scalers.h:65
void L1Scalers::bookHistograms ( DQMStore::IBooker iBooker,
edm::Run const &  ,
edm::EventSetup const &   
)
overridevirtual

Implements DQMEDAnalyzer.

Definition at line 74 of file L1Scalers.cc.

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

75  {
77  l1scalers_ =
78  iBooker.book1D("l1AlgoBits", "L1 Algorithm Bits", 128, -0.5, 127.5);
79  l1scalersBx_ = iBooker.book2D("l1AlgoBits_Vs_Bx",
80  "L1 Algorithm Bits vs "
81  "Bunch Number",
82  3600, -0.5, 3599.5, 128, -0.5, 127.5);
83  l1Correlations_ = iBooker.book2D("l1Correlations",
84  "L1 Algorithm Bits "
85  "Correlations",
86  128, -0.5, 127.5, 128, -0.5, 127.5);
88  iBooker.book1D("l1TechBits", "L1 Tech. Trigger Bits", 64, -0.5, 63.5);
89  l1techScalersBx_ = iBooker.book2D("l1TechBits_Vs_Bx",
90  "L1 Technical "
91  "Trigger "
92  "Bits vs Bunch Number",
93  3600, -0.5, 3599.5, 64, -0.5, 63.5);
94  bxNum_ = iBooker.book1D("bxNum", "Bunch number from GTFE", 3600, -0.5, 3599.5);
95 
96  nLumiBlock_ = iBooker.bookInt("nLumiBlock");
97 
98  // l1 total rate
99  l1AlgoCounter_ = iBooker.bookInt("l1AlgoCounter");
100  l1TtCounter_ = iBooker.bookInt("l1TtCounter");
101 
102  // timing plots
103  std::stringstream sdenom;
104  if (denomIsTech_)
105  sdenom << "tech";
106  else
107  sdenom << "algo";
108 
109  iBooker.setCurrentFolder(folderName_ + "/Synch");
110  algoBxDiff_.clear();
111  algoBxDiff_.clear();
112  algoBxDiffLumi_.clear();
113  techBxDiffLumi_.clear();
114  for (uint ibit = 0; ibit < algoSelected_.size(); ibit++) {
115  std::stringstream ss;
116  ss << algoSelected_[ibit] << "_" << sdenom.str() << denomBit_;
117  algoBxDiff_.push_back(iBooker.book1D("BX_diff_algo" + ss.str(),
118  "BX_diff_algo" + ss.str(), 9, -4, 5));
119  algoBxDiffLumi_.push_back(
120  iBooker.book2D("BX_diffvslumi_algo" + ss.str(), "BX_diff_algo" + ss.str(),
121  MAX_LUMI_BIN, -0.5, double(MAX_LUMI_SEG) - 0.5, 9, -4, 5));
122  // algoBxDiffLumi_[ibit]->setAxisTitle("Lumi Section", 1);
123  }
124  for (uint ibit = 0; ibit < techSelected_.size(); ibit++) {
125  std::stringstream ss;
126  ss << techSelected_[ibit] << "_" << sdenom.str() << denomBit_;
127  techBxDiff_.push_back(iBooker.book1D("BX_diff_tech" + ss.str(),
128  "BX_diff_tech" + ss.str(), 9, -4, 5));
129  techBxDiffLumi_.push_back(
130  iBooker.book2D("BX_diffvslumi_tech" + ss.str(), "BX_diff_tech" + ss.str(),
131  MAX_LUMI_BIN, -0.5, double(MAX_LUMI_SEG) - 0.5, 9, -4, 5));
132  // techBxDiffLumi_[ibit]->setAxisTitle("Lumi Section", 1);
133  }
134 
135  // GMT timing plots
136  std::stringstream ss1;
137  ss1 << "_" << sdenom.str() << denomBit_;
138  dtBxDiff_ = iBooker.book1D("BX_diff_DT" + ss1.str(), "BX_diff_DT" + ss1.str(),
139  9, -4, 5);
140  dtBxDiffLumi_ = iBooker.book2D("BX_diffvslumi_DT" + ss1.str(),
141  "BX_diffvslumi_DT" + ss1.str(), MAX_LUMI_BIN,
142  -0.5, double(MAX_LUMI_SEG) - 0.5, 9, -4, 5);
143  cscBxDiff_ = iBooker.book1D("BX_diff_CSC" + ss1.str(),
144  "BX_diff_CSC" + ss1.str(), 9, -4, 5);
145  cscBxDiffLumi_ = iBooker.book2D("BX_diffvslumi_CSC" + ss1.str(),
146  "BX_diffvslumi_CSC" + ss1.str(), MAX_LUMI_BIN,
147  -0.5, double(MAX_LUMI_SEG) - 0.5, 9, -4, 5);
148  rpcbBxDiff_ = iBooker.book1D("BX_diff_RPCb" + ss1.str(),
149  "BX_diff_RPCb" + ss1.str(), 9, -4, 5);
150  rpcbBxDiffLumi_ = iBooker.book2D("BX_diffvslumi_RPCb" + ss1.str(),
151  "BX_diffvslumi_RPCb" + ss1.str(), MAX_LUMI_BIN,
152  -0.5, double(MAX_LUMI_SEG) - 0.5, 9, -4, 5);
153  rpcfBxDiff_ = iBooker.book1D("BX_diff_RPCf" + ss1.str(),
154  "BX_diff_RPCf" + ss1.str(), 9, -4, 5);
155  rpcfBxDiffLumi_ = iBooker.book2D("BX_diffvslumi_RPCf" + ss1.str(),
156  "BX_diffvslumi_RPCf" + ss1.str(), MAX_LUMI_BIN,
157  -0.5, double(MAX_LUMI_SEG) - 0.5, 9, -4, 5);
158 }
MonitorElement * l1scalers_
Definition: L1Scalers.h:43
std::vector< MonitorElement * > techBxDiff_
Definition: L1Scalers.h:59
std::vector< MonitorElement * > algoBxDiffLumi_
Definition: L1Scalers.h:60
std::vector< MonitorElement * > algoBxDiff_
Definition: L1Scalers.h:58
std::string folderName_
Definition: L1Scalers.h:42
MonitorElement * rpcfBxDiffLumi_
Definition: L1Scalers.h:69
MonitorElement * bookInt(Args &&...args)
Definition: DQMStore.h:103
MonitorElement * rpcbBxDiffLumi_
Definition: L1Scalers.h:67
MonitorElement * dtBxDiffLumi_
Definition: L1Scalers.h:63
bool denomIsTech_
Definition: L1Scalers.h:35
#define MAX_LUMI_SEG
Definition: L1Scalers.h:14
MonitorElement * cscBxDiff_
Definition: L1Scalers.h:64
MonitorElement * l1techScalers_
Definition: L1Scalers.h:44
MonitorElement * l1scalersBx_
Definition: L1Scalers.h:49
#define MAX_LUMI_BIN
Definition: L1Scalers.h:15
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
MonitorElement * l1TtCounter_
Definition: L1Scalers.h:55
std::vector< MonitorElement * > techBxDiffLumi_
Definition: L1Scalers.h:61
std::vector< unsigned int > algoSelected_
Definition: L1Scalers.h:39
MonitorElement * l1Correlations_
Definition: L1Scalers.h:45
std::vector< unsigned int > techSelected_
Definition: L1Scalers.h:40
MonitorElement * rpcbBxDiff_
Definition: L1Scalers.h:66
MonitorElement * dtBxDiff_
Definition: L1Scalers.h:62
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:277
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:133
MonitorElement * nLumiBlock_
Definition: L1Scalers.h:53
MonitorElement * bxNum_
Definition: L1Scalers.h:46
MonitorElement * l1techScalersBx_
Definition: L1Scalers.h:50
MonitorElement * l1AlgoCounter_
Definition: L1Scalers.h:54
unsigned int denomBit_
Definition: L1Scalers.h:36
MonitorElement * rpcfBxDiff_
Definition: L1Scalers.h:68
MonitorElement * cscBxDiffLumi_
Definition: L1Scalers.h:65
void L1Scalers::endLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup c 
)
overridevirtual

DQM Client Diagnostic should be performed here:

Reimplemented from edm::stream::EDAnalyzerBase.

Definition at line 383 of file L1Scalers.cc.

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

384  {
385  nLumiBlock_->Fill(lumiSeg.id().luminosityBlock());
386 }
LuminosityBlockID id() const
void Fill(long long x)
MonitorElement * nLumiBlock_
Definition: L1Scalers.h:53
LuminosityBlockNumber_t luminosityBlock() const

Member Data Documentation

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

Definition at line 58 of file L1Scalers.h.

Referenced by analyze(), and bookHistograms().

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

Definition at line 60 of file L1Scalers.h.

Referenced by analyze(), and bookHistograms().

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

Definition at line 39 of file L1Scalers.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1Scalers::bxNum_
private

Definition at line 46 of file L1Scalers.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1Scalers::cscBxDiff_
private

Definition at line 64 of file L1Scalers.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1Scalers::cscBxDiffLumi_
private

Definition at line 65 of file L1Scalers.h.

Referenced by analyze(), and bookHistograms().

unsigned int L1Scalers::denomBit_
private

Definition at line 36 of file L1Scalers.h.

Referenced by analyze(), and bookHistograms().

bool L1Scalers::denomIsTech_
private

Definition at line 35 of file L1Scalers.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1Scalers::dtBxDiff_
private

Definition at line 62 of file L1Scalers.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1Scalers::dtBxDiffLumi_
private

Definition at line 63 of file L1Scalers.h.

Referenced by analyze(), and bookHistograms().

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

Definition at line 85 of file L1Scalers.h.

Referenced by analyze().

int L1Scalers::earliestDenom_
private

Definition at line 83 of file L1Scalers.h.

Referenced by analyze().

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

Definition at line 84 of file L1Scalers.h.

Referenced by analyze().

edm::InputTag L1Scalers::fedRawCollection_
private

Definition at line 78 of file L1Scalers.h.

unsigned int L1Scalers::fedStart_
private

Definition at line 73 of file L1Scalers.h.

unsigned int L1Scalers::fedStop_
private

Definition at line 73 of file L1Scalers.h.

std::string L1Scalers::folderName_
private

Definition at line 42 of file L1Scalers.h.

Referenced by bookHistograms().

edm::InputTag L1Scalers::HcalRecHitCollection_
private

Definition at line 81 of file L1Scalers.h.

MonitorElement* L1Scalers::l1AlgoCounter_
private

Definition at line 54 of file L1Scalers.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1Scalers::l1Correlations_
private

Definition at line 45 of file L1Scalers.h.

Referenced by analyze(), and bookHistograms().

edm::EDGetTokenT<L1MuGMTReadoutCollection> L1Scalers::l1GmtDataSource_
private

Definition at line 33 of file L1Scalers.h.

Referenced by analyze().

edm::EDGetTokenT<L1GlobalTriggerReadoutRecord> L1Scalers::l1GtDataSource_
private

Definition at line 32 of file L1Scalers.h.

Referenced by analyze().

MonitorElement* L1Scalers::l1scalers_
private

Definition at line 43 of file L1Scalers.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1Scalers::l1scalersBx_
private

Definition at line 49 of file L1Scalers.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1Scalers::l1techScalers_
private

Definition at line 44 of file L1Scalers.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1Scalers::l1techScalersBx_
private

Definition at line 50 of file L1Scalers.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1Scalers::l1TtCounter_
private

Definition at line 55 of file L1Scalers.h.

Referenced by analyze(), and bookHistograms().

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

Definition at line 80 of file L1Scalers.h.

int L1Scalers::nev_
private

Definition at line 29 of file L1Scalers.h.

Referenced by analyze().

MonitorElement* L1Scalers::nLumiBlock_
private

Definition at line 53 of file L1Scalers.h.

Referenced by bookHistograms(), and endLuminosityBlock().

unsigned int L1Scalers::rateAlgoCounter_
private

Definition at line 75 of file L1Scalers.h.

Referenced by analyze().

unsigned int L1Scalers::rateTtCounter_
private

Definition at line 76 of file L1Scalers.h.

Referenced by analyze().

MonitorElement* L1Scalers::rpcbBxDiff_
private

Definition at line 66 of file L1Scalers.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1Scalers::rpcbBxDiffLumi_
private

Definition at line 67 of file L1Scalers.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1Scalers::rpcfBxDiff_
private

Definition at line 68 of file L1Scalers.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1Scalers::rpcfBxDiffLumi_
private

Definition at line 69 of file L1Scalers.h.

Referenced by analyze(), and bookHistograms().

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

Definition at line 59 of file L1Scalers.h.

Referenced by analyze(), and bookHistograms().

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

Definition at line 61 of file L1Scalers.h.

Referenced by analyze(), and bookHistograms().

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

Definition at line 40 of file L1Scalers.h.

Referenced by analyze(), and bookHistograms().

unsigned int L1Scalers::tfBit_
private

Definition at line 38 of file L1Scalers.h.

Referenced by analyze().

bool L1Scalers::tfIsTech_
private

Definition at line 37 of file L1Scalers.h.

Referenced by analyze().

unsigned int L1Scalers::threshold_
private

Definition at line 72 of file L1Scalers.h.

bool L1Scalers::verbose_
private

Definition at line 31 of file L1Scalers.h.