CMS 3D CMS Logo

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

#include <L1Scalers.h>

Inheritance diagram for L1Scalers:
DQMOneEDAnalyzer< edm::LuminosityBlockCache< l1s::Empty > > edm::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::Accumulator, Args...> edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

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
 
std::shared_ptr< l1s::EmptyglobalBeginLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c) const final
 DQM Client Diagnostic should be performed here: More...
 
void globalEndLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c) override
 
 L1Scalers (const edm::ParameterSet &ps)
 
 ~L1Scalers () override
 
- Public Member Functions inherited from DQMOneEDAnalyzer< edm::LuminosityBlockCache< l1s::Empty > >
void accumulate (edm::Event const &event, edm::EventSetup const &setup) override
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
 DQMOneEDAnalyzer ()
 
void endRun (edm::Run const &, edm::EventSetup const &) final
 
void endRunProduce (edm::Run &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::Accumulator, Args...>
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector
< edm::ProductResolverIndex >
const & 
indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector
< edm::ProductResolverIndex >
const & 
putTokenIndexToProductResolverIndex () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription
const &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex >
const & 
esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector
< ProductResolverIndexAndSkipBit >
const & 
itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const * > *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, 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 selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
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 DQMOneEDAnalyzer< edm::LuminosityBlockCache< l1s::Empty > >
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex >>
 
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from DQMOneEDAnalyzer< edm::LuminosityBlockCache< l1s::Empty > >
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
virtual void dqmEndRun (edm::Run const &, edm::EventSetup const &)
 
- Protected Member Functions inherited from edm::ProducerBase
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
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)
 
void resetItemsToGetFrom (BranchType iType)
 
- Protected Attributes inherited from DQMOneEDAnalyzer< edm::LuminosityBlockCache< l1s::Empty > >
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Definition at line 19 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)),
47  ps.getUntrackedParameter<std::vector<unsigned int> >("algoMonitorBits", std::vector<unsigned int>())),
49  ps.getUntrackedParameter<std::vector<unsigned int> >("techMonitorBits", std::vector<unsigned int>())),
50  folderName_(ps.getUntrackedParameter<std::string>("dqmFolder", std::string("L1T/L1Scalers_EvF"))),
51  l1scalers_(nullptr),
52  l1techScalers_(nullptr),
53  l1Correlations_(nullptr),
54  bxNum_(nullptr),
55  l1scalersBx_(nullptr),
56  l1techScalersBx_(nullptr),
57  nLumiBlock_(nullptr),
58  l1AlgoCounter_(nullptr),
59  l1TtCounter_(nullptr),
60  fedStart_(ps.getUntrackedParameter<unsigned int>("firstFED", 0)),
61  fedStop_(ps.getUntrackedParameter<unsigned int>("lastFED", 931)),
63  rateTtCounter_(0),
64  fedRawCollection_(ps.getParameter<edm::InputTag>("fedRawData")),
65  maskedList_(ps.getUntrackedParameter<std::vector<int> >("maskedChannels",
66  std::vector<int>())), // this is using the ashed index
67  HcalRecHitCollection_(ps.getParameter<edm::InputTag>("HFRecHitCollection")) {
68  LogDebug("Status") << "constructor";
69 }
T getUntrackedParameter(std::string const &, T const &) const
bool tfIsTech_
Definition: L1Scalers.h:39
MonitorElement * l1scalers_
Definition: L1Scalers.h:45
bool verbose_
Definition: L1Scalers.h:33
std::string folderName_
Definition: L1Scalers.h:44
unsigned int fedStop_
Definition: L1Scalers.h:75
edm::InputTag HcalRecHitCollection_
Definition: L1Scalers.h:83
edm::InputTag fedRawCollection_
Definition: L1Scalers.h:80
bool denomIsTech_
Definition: L1Scalers.h:37
MonitorElement * l1techScalers_
Definition: L1Scalers.h:46
MonitorElement * l1scalersBx_
Definition: L1Scalers.h:51
int nev_
Definition: L1Scalers.h:31
unsigned int fedStart_
Definition: L1Scalers.h:75
MonitorElement * l1TtCounter_
Definition: L1Scalers.h:57
std::vector< unsigned int > algoSelected_
Definition: L1Scalers.h:41
std::vector< int > maskedList_
Definition: L1Scalers.h:82
MonitorElement * l1Correlations_
Definition: L1Scalers.h:47
std::vector< unsigned int > techSelected_
Definition: L1Scalers.h:42
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > l1GtDataSource_
Definition: L1Scalers.h:34
unsigned int rateAlgoCounter_
Definition: L1Scalers.h:77
edm::EDGetTokenT< L1MuGMTReadoutCollection > l1GmtDataSource_
Definition: L1Scalers.h:35
MonitorElement * nLumiBlock_
Definition: L1Scalers.h:55
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
unsigned int tfBit_
Definition: L1Scalers.h:40
MonitorElement * bxNum_
Definition: L1Scalers.h:48
MonitorElement * l1techScalersBx_
Definition: L1Scalers.h:52
MonitorElement * l1AlgoCounter_
Definition: L1Scalers.h:56
unsigned int denomBit_
Definition: L1Scalers.h:38
unsigned int rateTtCounter_
Definition: L1Scalers.h:78
#define LogDebug(id)
L1Scalers::~L1Scalers ( )
inlineoverride

Definition at line 22 of file L1Scalers.h.

22 {};

Member Function Documentation

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

empty DecisionWord

Reimplemented from DQMOneEDAnalyzer< edm::LuminosityBlockCache< l1s::Empty > >.

Definition at line 193 of file L1Scalers.cc.

References algoBxDiff_, algoBxDiffLumi_, algoSelected_, SplitLinear::begin, L1GtfeWord::bxNr(), bxNum_, cscBxDiff_, cscBxDiffLumi_, denomBit_, denomIsTech_, change_name::diff, dtBxDiff_, dtBxDiffLumi_, earliestAlgo_, earliestDenom_, earliestTech_, dqm::impl::MonitorElement::Fill(), edm::Event::getByToken(), L1MuGMTReadoutCollection::getRecords(), mps_fire::i, edm::HandleBase::isValid(), dqmiolumiharvest::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_, submitPVValidationJobs::t, techBxDiff_, techBxDiffLumi_, techSelected_, tfBit_, tfIsTech_, and parallelization::uint().

193  {
194  nev_++;
195 
196  LogDebug("Status") << "L1Scalers::analyze event " << nev_;
197 
198  // int myGTFEbx = -1;
199  // get Global Trigger decision and the decision word
200  // these are locally derived
202  bool t = e.getByToken(l1GtDataSource_, gtRecord);
203 
204  if (!t) {
205  LogDebug("Product") << "can't find L1GlobalTriggerReadoutRecord";
206  } else {
207  L1GtfeWord gtfeWord = gtRecord->gtfeWord();
208  int gtfeBx = gtfeWord.bxNr();
209  bxNum_->Fill(gtfeBx);
210 
211  bool tfBitGood = false;
212 
213  // First, the default
214  // vector of bool
215  for (int iebx = 0; iebx <= 4; iebx++) {
216  // Algorithm Bits
217  DecisionWord gtDecisionWord = gtRecord->decisionWord(iebx - 2);
218  // DecisionWord gtDecisionWord = gtRecord->decisionWord();
219  if (!gtDecisionWord.empty()) { // if board not there this is zero
220  // loop over dec. bit to get total rate (no overlap)
221  for (uint i = 0; i < gtDecisionWord.size(); ++i) {
222  if (gtDecisionWord[i]) {
225  break;
226  }
227  }
228  // loop over decision bits
229  for (uint i = 0; i < gtDecisionWord.size(); ++i) {
230  if (gtDecisionWord[i]) {
231  l1scalers_->Fill(i);
232  l1scalersBx_->Fill(gtfeBx - 2 + iebx, i);
233  for (uint j = i + 1; j < gtDecisionWord.size(); ++j) {
234  if (gtDecisionWord[j]) {
235  l1Correlations_->Fill(i, j);
236  l1Correlations_->Fill(j, i);
237  }
238  }
239  }
240  }
241  }
242 
243  // loop over technical triggers
244  // vector of bool again.
245  TechnicalTriggerWord tw = gtRecord->technicalTriggerWord(iebx - 2);
246  // TechnicalTriggerWord tw = gtRecord->technicalTriggerWord();
247  if (!tw.empty()) {
248  // loop over dec. bit to get total rate (no overlap)
249  for (uint i = 0; i < tw.size(); ++i) {
250  if (tw[i]) {
251  rateTtCounter_++;
253  break;
254  }
255  }
256  for (uint i = 0; i < tw.size(); ++i) {
257  if (tw[i]) {
258  l1techScalers_->Fill(i);
259  l1techScalersBx_->Fill(gtfeBx - 2 + iebx, i);
260  }
261  }
262 
263  // check if bit used to filter timing plots fired in this event
264  // (anywhere in the bx window)
265  if (tfIsTech_) {
266  if (tfBit_ < tw.size()) {
267  if (tw[tfBit_])
268  tfBitGood = true;
269  }
270  }
271  } // ! tw.empty
272 
273  } // bx
274 
275  // timing plots
276  earliestDenom_ = 9;
277  earliestAlgo_.clear();
278  earliestTech_.clear();
279  for (uint i = 0; i < techSelected_.size(); i++)
280  earliestTech_.push_back(9);
281  for (uint i = 0; i < algoSelected_.size(); i++)
282  earliestAlgo_.push_back(9);
283 
284  // GMT information
286  e.getByToken(l1GmtDataSource_, gmtCollection);
287 
288  if (!gmtCollection.isValid()) {
289  edm::LogInfo("DataNotFound") << "can't find L1MuGMTReadoutCollection with label";
290  }
291 
292  // remember the bx of 1st candidate of each system (9=none)
293  int bx1st[4] = {9, 9, 9, 9};
294 
295  if (tfBitGood) { // to avoid single BSC hits
296 
297  for (int iebx = 0; iebx <= 4; iebx++) {
298  TechnicalTriggerWord tw = gtRecord->technicalTriggerWord(iebx - 2);
299  DecisionWord gtDecisionWord = gtRecord->decisionWord(iebx - 2);
300 
301  bool denomBitGood = false;
302 
303  // check if reference bit is valid
304  if (denomIsTech_) {
305  if (!tw.empty()) {
306  if (denomBit_ < tw.size()) {
307  denomBitGood = true;
308  if (tw[denomBit_] && earliestDenom_ == 9)
309  earliestDenom_ = iebx;
310  }
311  }
312  } else {
313  if (!gtDecisionWord.empty()) {
314  if (denomBit_ < gtDecisionWord.size()) {
315  denomBitGood = true;
316  if (gtDecisionWord[denomBit_] && earliestDenom_ == 9)
317  earliestDenom_ = iebx;
318  }
319  }
320  }
321 
322  if (denomBitGood) {
323  // get earliest tech bx's
324  if (!tw.empty()) {
325  for (uint ibit = 0; ibit < techSelected_.size(); ibit++) {
326  if (techSelected_[ibit] < tw.size()) {
327  if (tw[techSelected_[ibit]] && earliestTech_[ibit] == 9)
328  earliestTech_[ibit] = iebx;
329  }
330  }
331  }
332 
333  // get earliest algo bx's
334  if (!gtDecisionWord.empty()) {
335  for (uint ibit = 0; ibit < algoSelected_.size(); ibit++) {
336  if (algoSelected_[ibit] < gtDecisionWord.size()) {
337  if (gtDecisionWord[algoSelected_[ibit]] && earliestAlgo_[ibit] == 9)
338  earliestAlgo_[ibit] = iebx;
339  }
340  }
341  }
342  } // denomBitGood
343  } // bx
344 
345  // get earliest single muon trigger system bx's
346  if (gmtCollection.isValid()) {
347  // get GMT readout collection
348  L1MuGMTReadoutCollection const* gmtrc = gmtCollection.product();
349  // get record vector
350  std::vector<L1MuGMTReadoutRecord> gmt_records = gmtrc->getRecords();
351  // loop over records of individual bx's
352  std::vector<L1MuGMTReadoutRecord>::const_iterator RRItr;
353 
354  for (RRItr = gmt_records.begin(); RRItr != gmt_records.end(); RRItr++) { // loop from BX=-2 to BX=2
355  std::vector<L1MuRegionalCand> INPCands[4] = {
356  RRItr->getDTBXCands(), RRItr->getBrlRPCCands(), RRItr->getCSCCands(), RRItr->getFwdRPCCands()};
357  std::vector<L1MuRegionalCand>::const_iterator INPItr;
358  int BxInEvent = RRItr->getBxInEvent();
359 
360  // find the first non-empty candidate in this bx
361  for (int i = 0; i < 4; i++) { // for each single muon trigger system
362  for (INPItr = INPCands[i].begin(); INPItr != INPCands[i].end(); ++INPItr) {
363  if (!INPItr->empty()) {
364  if (bx1st[i] == 9)
365  bx1st[i] = BxInEvent + 2; // must go from 0 to 4 (consistent with above)
366  }
367  }
368  }
369  }
370  } // gmtCollection.isValid
371  // calculated bx difference
372  if (earliestDenom_ != 9) {
373  for (uint ibit = 0; ibit < techSelected_.size(); ibit++) {
374  if (earliestTech_[ibit] != 9) {
375  int diff = earliestTech_[ibit] - earliestDenom_;
376  techBxDiff_[ibit]->Fill(diff);
377  techBxDiffLumi_[ibit]->Fill(e.luminosityBlock(), diff);
378  }
379  }
380  for (uint ibit = 0; ibit < algoSelected_.size(); ibit++) {
381  if (earliestAlgo_[ibit] != 9) {
382  int diff = earliestAlgo_[ibit] - earliestDenom_;
383  algoBxDiff_[ibit]->Fill(diff);
384  algoBxDiffLumi_[ibit]->Fill(e.luminosityBlock(), diff);
385  }
386  }
387 
388  if (bx1st[0] != 9) {
389  int diff = bx1st[0] - earliestDenom_;
390  dtBxDiff_->Fill(diff);
392  }
393  if (bx1st[1] != 9) {
394  int diff = bx1st[1] - earliestDenom_;
395  rpcbBxDiff_->Fill(diff);
397  }
398  if (bx1st[2] != 9) {
399  int diff = bx1st[2] - earliestDenom_;
400  cscBxDiff_->Fill(diff);
402  }
403  if (bx1st[3] != 9) {
404  int diff = bx1st[3] - earliestDenom_;
405  rpcfBxDiff_->Fill(diff);
407  }
408  }
409  } // tt41Good
410  }
411  return;
412 }
bool tfIsTech_
Definition: L1Scalers.h:39
MonitorElement * l1scalers_
Definition: L1Scalers.h:45
std::vector< MonitorElement * > techBxDiff_
Definition: L1Scalers.h:61
std::vector< MonitorElement * > algoBxDiffLumi_
Definition: L1Scalers.h:62
std::vector< MonitorElement * > algoBxDiff_
Definition: L1Scalers.h:60
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:539
MonitorElement * rpcfBxDiffLumi_
Definition: L1Scalers.h:71
edm::LuminosityBlockNumber_t luminosityBlock() const
Definition: EventBase.h:61
MonitorElement * rpcbBxDiffLumi_
Definition: L1Scalers.h:69
MonitorElement * dtBxDiffLumi_
Definition: L1Scalers.h:65
std::vector< int > earliestTech_
Definition: L1Scalers.h:86
bool denomIsTech_
Definition: L1Scalers.h:37
void Fill(long long x)
MonitorElement * cscBxDiff_
Definition: L1Scalers.h:66
MonitorElement * l1techScalers_
Definition: L1Scalers.h:46
std::vector< bool > DecisionWord
typedefs
MonitorElement * l1scalersBx_
Definition: L1Scalers.h:51
int nev_
Definition: L1Scalers.h:31
MonitorElement * l1TtCounter_
Definition: L1Scalers.h:57
std::vector< bool > TechnicalTriggerWord
technical trigger bits (64 bits)
std::vector< MonitorElement * > techBxDiffLumi_
Definition: L1Scalers.h:63
bool isValid() const
Definition: HandleBase.h:70
std::vector< unsigned int > algoSelected_
Definition: L1Scalers.h:41
const cms_uint16_t bxNr() const
get/set bunch cross number as counted in the GTFE board
Definition: L1GtfeWord.h:93
MonitorElement * l1Correlations_
Definition: L1Scalers.h:47
std::vector< unsigned int > techSelected_
Definition: L1Scalers.h:42
MonitorElement * rpcbBxDiff_
Definition: L1Scalers.h:68
Log< level::Info, false > LogInfo
MonitorElement * dtBxDiff_
Definition: L1Scalers.h:64
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > l1GtDataSource_
Definition: L1Scalers.h:34
T const * product() const
Definition: Handle.h:70
unsigned int rateAlgoCounter_
Definition: L1Scalers.h:77
std::vector< int > earliestAlgo_
Definition: L1Scalers.h:87
edm::EDGetTokenT< L1MuGMTReadoutCollection > l1GmtDataSource_
Definition: L1Scalers.h:35
int earliestDenom_
Definition: L1Scalers.h:85
unsigned int tfBit_
Definition: L1Scalers.h:40
MonitorElement * bxNum_
Definition: L1Scalers.h:48
MonitorElement * l1techScalersBx_
Definition: L1Scalers.h:52
std::vector< L1MuGMTReadoutRecord > const & getRecords() const
MonitorElement * l1AlgoCounter_
Definition: L1Scalers.h:56
unsigned int denomBit_
Definition: L1Scalers.h:38
MonitorElement * rpcfBxDiff_
Definition: L1Scalers.h:70
unsigned int rateTtCounter_
Definition: L1Scalers.h:78
#define LogDebug(id)
MonitorElement * cscBxDiffLumi_
Definition: L1Scalers.h:67
void L1Scalers::bookHistograms ( DQMStore::IBooker iBooker,
edm::Run const &  ,
edm::EventSetup const &   
)
overridevirtual

Implements DQMOneEDAnalyzer< edm::LuminosityBlockCache< l1s::Empty > >.

Definition at line 71 of file L1Scalers.cc.

References algoBxDiff_, algoBxDiffLumi_, algoSelected_, dqm::implementation::IBooker::book1D(), dqm::implementation::IBooker::book2D(), dqm::implementation::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_, dqm::implementation::NavigatorBase::setCurrentFolder(), contentValuesCheck::ss, techBxDiff_, techBxDiffLumi_, techSelected_, and parallelization::uint().

71  {
73  l1scalers_ = iBooker.book1D("l1AlgoBits", "L1 Algorithm Bits", 128, -0.5, 127.5);
74  l1scalersBx_ = iBooker.book2D("l1AlgoBits_Vs_Bx",
75  "L1 Algorithm Bits vs "
76  "Bunch Number",
77  3600,
78  -0.5,
79  3599.5,
80  128,
81  -0.5,
82  127.5);
83  l1Correlations_ = iBooker.book2D("l1Correlations",
84  "L1 Algorithm Bits "
85  "Correlations",
86  128,
87  -0.5,
88  127.5,
89  128,
90  -0.5,
91  127.5);
92  l1techScalers_ = iBooker.book1D("l1TechBits", "L1 Tech. Trigger Bits", 64, -0.5, 63.5);
93  l1techScalersBx_ = iBooker.book2D("l1TechBits_Vs_Bx",
94  "L1 Technical "
95  "Trigger "
96  "Bits vs Bunch Number",
97  3600,
98  -0.5,
99  3599.5,
100  64,
101  -0.5,
102  63.5);
103  bxNum_ = iBooker.book1D("bxNum", "Bunch number from GTFE", 3600, -0.5, 3599.5);
104 
105  nLumiBlock_ = iBooker.bookInt("nLumiBlock");
106 
107  // l1 total rate
108  l1AlgoCounter_ = iBooker.bookInt("l1AlgoCounter");
109  l1TtCounter_ = iBooker.bookInt("l1TtCounter");
110 
111  // timing plots
112  std::stringstream sdenom;
113  if (denomIsTech_)
114  sdenom << "tech";
115  else
116  sdenom << "algo";
117 
118  iBooker.setCurrentFolder(folderName_ + "/Synch");
119  algoBxDiff_.clear();
120  algoBxDiff_.clear();
121  algoBxDiffLumi_.clear();
122  techBxDiffLumi_.clear();
123  for (uint ibit = 0; ibit < algoSelected_.size(); ibit++) {
124  std::stringstream ss;
125  ss << algoSelected_[ibit] << "_" << sdenom.str() << denomBit_;
126  algoBxDiff_.push_back(iBooker.book1D("BX_diff_algo" + ss.str(), "BX_diff_algo" + ss.str(), 9, -4, 5));
127  algoBxDiffLumi_.push_back(iBooker.book2D("BX_diffvslumi_algo" + ss.str(),
128  "BX_diff_algo" + ss.str(),
129  MAX_LUMI_BIN,
130  -0.5,
131  double(MAX_LUMI_SEG) - 0.5,
132  9,
133  -4,
134  5));
135  // algoBxDiffLumi_[ibit]->setAxisTitle("Lumi Section", 1);
136  }
137  for (uint ibit = 0; ibit < techSelected_.size(); ibit++) {
138  std::stringstream ss;
139  ss << techSelected_[ibit] << "_" << sdenom.str() << denomBit_;
140  techBxDiff_.push_back(iBooker.book1D("BX_diff_tech" + ss.str(), "BX_diff_tech" + ss.str(), 9, -4, 5));
141  techBxDiffLumi_.push_back(iBooker.book2D("BX_diffvslumi_tech" + ss.str(),
142  "BX_diff_tech" + ss.str(),
143  MAX_LUMI_BIN,
144  -0.5,
145  double(MAX_LUMI_SEG) - 0.5,
146  9,
147  -4,
148  5));
149  // techBxDiffLumi_[ibit]->setAxisTitle("Lumi Section", 1);
150  }
151 
152  // GMT timing plots
153  std::stringstream ss1;
154  ss1 << "_" << sdenom.str() << denomBit_;
155  dtBxDiff_ = iBooker.book1D("BX_diff_DT" + ss1.str(), "BX_diff_DT" + ss1.str(), 9, -4, 5);
156  dtBxDiffLumi_ = iBooker.book2D("BX_diffvslumi_DT" + ss1.str(),
157  "BX_diffvslumi_DT" + ss1.str(),
158  MAX_LUMI_BIN,
159  -0.5,
160  double(MAX_LUMI_SEG) - 0.5,
161  9,
162  -4,
163  5);
164  cscBxDiff_ = iBooker.book1D("BX_diff_CSC" + ss1.str(), "BX_diff_CSC" + ss1.str(), 9, -4, 5);
165  cscBxDiffLumi_ = iBooker.book2D("BX_diffvslumi_CSC" + ss1.str(),
166  "BX_diffvslumi_CSC" + ss1.str(),
167  MAX_LUMI_BIN,
168  -0.5,
169  double(MAX_LUMI_SEG) - 0.5,
170  9,
171  -4,
172  5);
173  rpcbBxDiff_ = iBooker.book1D("BX_diff_RPCb" + ss1.str(), "BX_diff_RPCb" + ss1.str(), 9, -4, 5);
174  rpcbBxDiffLumi_ = iBooker.book2D("BX_diffvslumi_RPCb" + ss1.str(),
175  "BX_diffvslumi_RPCb" + ss1.str(),
176  MAX_LUMI_BIN,
177  -0.5,
178  double(MAX_LUMI_SEG) - 0.5,
179  9,
180  -4,
181  5);
182  rpcfBxDiff_ = iBooker.book1D("BX_diff_RPCf" + ss1.str(), "BX_diff_RPCf" + ss1.str(), 9, -4, 5);
183  rpcfBxDiffLumi_ = iBooker.book2D("BX_diffvslumi_RPCf" + ss1.str(),
184  "BX_diffvslumi_RPCf" + ss1.str(),
185  MAX_LUMI_BIN,
186  -0.5,
187  double(MAX_LUMI_SEG) - 0.5,
188  9,
189  -4,
190  5);
191 }
MonitorElement * l1scalers_
Definition: L1Scalers.h:45
std::vector< MonitorElement * > techBxDiff_
Definition: L1Scalers.h:61
std::vector< MonitorElement * > algoBxDiffLumi_
Definition: L1Scalers.h:62
std::vector< MonitorElement * > algoBxDiff_
Definition: L1Scalers.h:60
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
std::string folderName_
Definition: L1Scalers.h:44
MonitorElement * rpcfBxDiffLumi_
Definition: L1Scalers.h:71
MonitorElement * rpcbBxDiffLumi_
Definition: L1Scalers.h:69
MonitorElement * dtBxDiffLumi_
Definition: L1Scalers.h:65
bool denomIsTech_
Definition: L1Scalers.h:37
#define MAX_LUMI_SEG
Definition: L1Scalers.h:13
MonitorElement * cscBxDiff_
Definition: L1Scalers.h:66
MonitorElement * l1techScalers_
Definition: L1Scalers.h:46
MonitorElement * l1scalersBx_
Definition: L1Scalers.h:51
#define MAX_LUMI_BIN
Definition: L1Scalers.h:14
MonitorElement * l1TtCounter_
Definition: L1Scalers.h:57
std::vector< MonitorElement * > techBxDiffLumi_
Definition: L1Scalers.h:63
std::vector< unsigned int > algoSelected_
Definition: L1Scalers.h:41
MonitorElement * l1Correlations_
Definition: L1Scalers.h:47
std::vector< unsigned int > techSelected_
Definition: L1Scalers.h:42
MonitorElement * rpcbBxDiff_
Definition: L1Scalers.h:68
MonitorElement * dtBxDiff_
Definition: L1Scalers.h:64
MonitorElement * nLumiBlock_
Definition: L1Scalers.h:55
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:177
MonitorElement * bookInt(TString const &name, FUNC onbooking=NOOP())
Definition: DQMStore.h:73
MonitorElement * bxNum_
Definition: L1Scalers.h:48
MonitorElement * l1techScalersBx_
Definition: L1Scalers.h:52
MonitorElement * l1AlgoCounter_
Definition: L1Scalers.h:56
unsigned int denomBit_
Definition: L1Scalers.h:38
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
MonitorElement * rpcfBxDiff_
Definition: L1Scalers.h:70
MonitorElement * cscBxDiffLumi_
Definition: L1Scalers.h:67
std::shared_ptr< l1s::Empty > L1Scalers::globalBeginLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup c 
) const
final

DQM Client Diagnostic should be performed here:

Definition at line 414 of file L1Scalers.cc.

415  {
416  return std::shared_ptr<l1s::Empty>();
417 }
void L1Scalers::globalEndLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup c 
)
override

Definition at line 419 of file L1Scalers.cc.

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

419  {
420  nLumiBlock_->Fill(lumiSeg.id().luminosityBlock());
421 }
LuminosityBlockID id() const
void Fill(long long x)
MonitorElement * nLumiBlock_
Definition: L1Scalers.h:55
LuminosityBlockNumber_t luminosityBlock() const

Member Data Documentation

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

Definition at line 60 of file L1Scalers.h.

Referenced by analyze(), and bookHistograms().

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

Definition at line 62 of file L1Scalers.h.

Referenced by analyze(), and bookHistograms().

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

Definition at line 41 of file L1Scalers.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1Scalers::bxNum_
private

Definition at line 48 of file L1Scalers.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1Scalers::cscBxDiff_
private

Definition at line 66 of file L1Scalers.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1Scalers::cscBxDiffLumi_
private

Definition at line 67 of file L1Scalers.h.

Referenced by analyze(), and bookHistograms().

unsigned int L1Scalers::denomBit_
private

Definition at line 38 of file L1Scalers.h.

Referenced by analyze(), and bookHistograms().

bool L1Scalers::denomIsTech_
private

Definition at line 37 of file L1Scalers.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1Scalers::dtBxDiff_
private

Definition at line 64 of file L1Scalers.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1Scalers::dtBxDiffLumi_
private

Definition at line 65 of file L1Scalers.h.

Referenced by analyze(), and bookHistograms().

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

Definition at line 87 of file L1Scalers.h.

Referenced by analyze().

int L1Scalers::earliestDenom_
private

Definition at line 85 of file L1Scalers.h.

Referenced by analyze().

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

Definition at line 86 of file L1Scalers.h.

Referenced by analyze().

edm::InputTag L1Scalers::fedRawCollection_
private

Definition at line 80 of file L1Scalers.h.

unsigned int L1Scalers::fedStart_
private

Definition at line 75 of file L1Scalers.h.

unsigned int L1Scalers::fedStop_
private

Definition at line 75 of file L1Scalers.h.

std::string L1Scalers::folderName_
private

Definition at line 44 of file L1Scalers.h.

Referenced by bookHistograms().

edm::InputTag L1Scalers::HcalRecHitCollection_
private

Definition at line 83 of file L1Scalers.h.

MonitorElement* L1Scalers::l1AlgoCounter_
private

Definition at line 56 of file L1Scalers.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1Scalers::l1Correlations_
private

Definition at line 47 of file L1Scalers.h.

Referenced by analyze(), and bookHistograms().

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

Definition at line 35 of file L1Scalers.h.

Referenced by analyze().

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

Definition at line 34 of file L1Scalers.h.

Referenced by analyze().

MonitorElement* L1Scalers::l1scalers_
private

Definition at line 45 of file L1Scalers.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1Scalers::l1scalersBx_
private

Definition at line 51 of file L1Scalers.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1Scalers::l1techScalers_
private

Definition at line 46 of file L1Scalers.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1Scalers::l1techScalersBx_
private

Definition at line 52 of file L1Scalers.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1Scalers::l1TtCounter_
private

Definition at line 57 of file L1Scalers.h.

Referenced by analyze(), and bookHistograms().

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

Definition at line 82 of file L1Scalers.h.

int L1Scalers::nev_
private

Definition at line 31 of file L1Scalers.h.

Referenced by analyze().

MonitorElement* L1Scalers::nLumiBlock_
private

Definition at line 55 of file L1Scalers.h.

Referenced by bookHistograms(), and globalEndLuminosityBlock().

unsigned int L1Scalers::rateAlgoCounter_
private

Definition at line 77 of file L1Scalers.h.

Referenced by analyze().

unsigned int L1Scalers::rateTtCounter_
private

Definition at line 78 of file L1Scalers.h.

Referenced by analyze().

MonitorElement* L1Scalers::rpcbBxDiff_
private

Definition at line 68 of file L1Scalers.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1Scalers::rpcbBxDiffLumi_
private

Definition at line 69 of file L1Scalers.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1Scalers::rpcfBxDiff_
private

Definition at line 70 of file L1Scalers.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1Scalers::rpcfBxDiffLumi_
private

Definition at line 71 of file L1Scalers.h.

Referenced by analyze(), and bookHistograms().

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

Definition at line 61 of file L1Scalers.h.

Referenced by analyze(), and bookHistograms().

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

Definition at line 63 of file L1Scalers.h.

Referenced by analyze(), and bookHistograms().

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

Definition at line 42 of file L1Scalers.h.

Referenced by analyze(), and bookHistograms().

unsigned int L1Scalers::tfBit_
private

Definition at line 40 of file L1Scalers.h.

Referenced by analyze().

bool L1Scalers::tfIsTech_
private

Definition at line 39 of file L1Scalers.h.

Referenced by analyze().

unsigned int L1Scalers::threshold_
private

Definition at line 74 of file L1Scalers.h.

bool L1Scalers::verbose_
private

Definition at line 33 of file L1Scalers.h.