CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | Static Private Attributes
L1TGT Class Reference

#include <L1TGT.h>

Inheritance diagram for L1TGT:
DQMOneEDAnalyzer< edm::one::WatchLuminosityBlocks > edm::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::Accumulator, Args... > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 L1TGT (const edm::ParameterSet &ps)
 
 ~L1TGT () override
 
- Public Member Functions inherited from DQMOneEDAnalyzer< edm::one::WatchLuminosityBlocks >
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 noexcept final
 
bool wantsGlobalRuns () const noexcept final
 
bool wantsInputProcessBlocks () const noexcept final
 
bool wantsProcessBlocks () const noexcept final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const noexcept
 
bool wantsStreamRuns () const noexcept
 
 ~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
 
std::vector< bool > const & recordProvenanceList () 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)
 
TypeLabelList const & typeLabelList () const
 used by the fwk to register the list of products of this module More...
 
 ~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
 
ESResolverIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESResolverIndex > 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
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProductResolverIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Protected Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void beginLuminosityBlock (const edm::LuminosityBlock &, const edm::EventSetup &) final
 end section More...
 
void bookHistograms (DQMStore::IBooker &ibooker, edm::Run const &, edm::EventSetup const &) override
 
void dqmBeginRun (const edm::Run &, const edm::EventSetup &) override
 
void endLuminosityBlock (const edm::LuminosityBlock &, const edm::EventSetup &) override
 
- Protected Member Functions inherited from DQMOneEDAnalyzer< edm::one::WatchLuminosityBlocks >
virtual void dqmEndRun (edm::Run const &, edm::EventSetup const &)
 
- Protected Member Functions inherited from edm::ProducerBase
template<Transition Tr = Transition::Event>
auto produces (std::string instanceName) noexcept
 declare what type of product will make and with which optional label More...
 
template<Transition B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<BranchType B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
template<Transition Tr = Transition::Event>
auto produces () noexcept
 
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< Bconsumes (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 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 ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
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)
 

Private Types

enum  activeDAQ {
  FDL = 0, PSB9, PSB13, PSB14,
  PSB15, PSB19, PSB20, PSB21,
  GMT
}
 
enum  activeEVM { TCS, FDLEVM }
 
typedef std::vector< std::pair< int, int > >::const_iterator CItVecPair
 

Private Member Functions

void countPfsIndicesPerLs ()
 
bool isActive (int word, int bit)
 book all histograms for the module More...
 

Private Attributes

MonitorElementalgo_bits
 
MonitorElementalgo_bits_corr
 
MonitorElementalgo_bits_lumi
 
MonitorElementalgo_tt_bits_corr
 
std::string algoBitToName [128]
 
MonitorElementBST_beamMode
 
MonitorElementBST_beamMomentum
 
MonitorElementBST_intensityBeam1
 
MonitorElementBST_intensityBeam2
 
MonitorElementBST_lhcFillNumber
 
MonitorElementBST_MasterStatus
 
MonitorElementBST_turnCountNumber
 
MonitorElementdbx_module
 
MonitorElementevent_lumi
 
MonitorElementevent_number
 
MonitorElementevent_type
 
MonitorElementevnum_trignum_lumi
 
MonitorElementgpsfreq
 
MonitorElementgpsfreqlum
 
MonitorElementgpsfreqwide
 
edm::EDGetTokenT< L1GlobalTriggerEvmReadoutRecordgtEvmSource_
 input tag for L1 GT EVM readout record More...
 
MonitorElementgtfe_bx
 
edm::EDGetTokenT< L1GlobalTriggerReadoutRecordgtSource_L1GT_
 input parameters More...
 
edm::EDGetTokenT< L1MuGMTReadoutCollectiongtSource_L1MuGMT_
 
MonitorElementh_L1AlgoBX1
 
MonitorElementh_L1AlgoBX2
 
MonitorElementh_L1AlgoBX3
 
MonitorElementh_L1AlgoBX4
 
MonitorElementh_L1TechBX
 
edm::ESGetToken< L1GtTriggerMenu, L1GtTriggerMenuRcdl1gtTrigmenuToken_
 
std::map< std::string, bool > l1TechTriggerDecision
 
std::map< std::string, bool > l1TriggerDecision
 
std::string m_histFolder
 histogram folder for L1 GT plots More...
 
MonitorElementm_monL1PfIndicesPerLs
 
MonitorElementm_monL1PrescaleFactorSet
 
MonitorElementm_monLsNrDiffTcsFdlEvm
 
MonitorElementm_monLsNrDiffTcsFdlEvmLs
 
MonitorElementm_monOrbitNrDiffTcsFdlEvm
 
MonitorElementm_monOrbitNrDiffTcsFdlEvmLs
 
int m_nrEvJob
 number of events processed More...
 
int m_nrEvRun
 
std::vector< std::pair< int, int > > m_pairLsNumberPfIndex
 
bool m_runInEndLumi
 
bool m_runInEventLoop
 switches to choose the running of various methods More...
 
MonitorElementorbit_lumi
 
uint64_t preGps_
 
uint64_t preOrb_
 
MonitorElementsetupversion_lumi
 
std::string techBitToName [64]
 
std::map< std::string, bool >::iterator trig_iter
 
MonitorElementtrigger_lumi
 
MonitorElementtrigger_number
 
MonitorElementtt_bits
 
MonitorElementtt_bits_corr
 
MonitorElementtt_bits_lumi
 
bool verbose_
 verbosity switch More...
 

Static Private Attributes

static const int MaxLsNrDiffTcsFdlEvm = 24
 
static const int MaxOrbitNrDiffTcsFdlEvm = 24
 

Additional Inherited Members

- Public Types inherited from DQMOneEDAnalyzer< edm::one::WatchLuminosityBlocks >
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
template<typename T >
using BranchAliasSetterT = ProductRegistryHelper::BranchAliasSetterT< T >
 
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 Attributes inherited from DQMOneEDAnalyzer< edm::one::WatchLuminosityBlocks >
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Description: DQM for L1 Global Trigger.

Author
J. Berryhill, I. Mikulec
Vasile Mihai Ghete - HEPHY Vienna

Definition at line 48 of file L1TGT.h.

Member Typedef Documentation

◆ CItVecPair

typedef std::vector<std::pair<int, int> >::const_iterator L1TGT::CItVecPair
private

Definition at line 183 of file L1TGT.h.

Member Enumeration Documentation

◆ activeDAQ

enum L1TGT::activeDAQ
private
Enumerator
FDL 
PSB9 
PSB13 
PSB14 
PSB15 
PSB19 
PSB20 
PSB21 
GMT 

Definition at line 80 of file L1TGT.h.

◆ activeEVM

enum L1TGT::activeEVM
private
Enumerator
TCS 
FDLEVM 

Definition at line 84 of file L1TGT.h.

84 { TCS, FDLEVM };

Constructor & Destructor Documentation

◆ L1TGT()

L1TGT::L1TGT ( const edm::ParameterSet ps)

Definition at line 18 of file L1TGT.cc.

References edm::ParameterSet::getUntrackedParameter(), l1gtTrigmenuToken_, m_histFolder, and AlCaHLTBitMon_QueryRunRegistry::string.

19  : gtSource_L1GT_(consumes<L1GlobalTriggerReadoutRecord>(ps.getParameter<edm::InputTag>("gtSource"))),
20  gtSource_L1MuGMT_(consumes<L1MuGMTReadoutCollection>(ps.getParameter<edm::InputTag>("gtSource"))),
21  gtEvmSource_(consumes<L1GlobalTriggerEvmReadoutRecord>(ps.getParameter<edm::InputTag>("gtEvmSource"))),
22  m_runInEventLoop(ps.getUntrackedParameter<bool>("runInEventLoop", false)),
23  m_runInEndLumi(ps.getUntrackedParameter<bool>("runInEndLumi", false)),
24  verbose_(ps.getUntrackedParameter<bool>("verbose", false)),
25  m_nrEvJob(0),
26  m_nrEvRun(0),
27  preGps_(0ULL),
28  preOrb_(0ULL) {
29  m_histFolder = ps.getUntrackedParameter<std::string>("HistFolder", "L1T/L1TGT");
30  l1gtTrigmenuToken_ = esConsumes<edm::Transition::BeginRun>();
31 }
int m_nrEvRun
Definition: L1TGT.h:169
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
bool verbose_
verbosity switch
Definition: L1TGT.h:106
bool m_runInEventLoop
switches to choose the running of various methods
Definition: L1TGT.h:102
T getUntrackedParameter(std::string const &, T const &) const
uint64_t preGps_
Definition: L1TGT.h:174
edm::EDGetTokenT< L1GlobalTriggerEvmReadoutRecord > gtEvmSource_
input tag for L1 GT EVM readout record
Definition: L1TGT.h:98
std::string m_histFolder
histogram folder for L1 GT plots
Definition: L1TGT.h:172
bool m_runInEndLumi
Definition: L1TGT.h:103
uint64_t preOrb_
Definition: L1TGT.h:175
int m_nrEvJob
number of events processed
Definition: L1TGT.h:168
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > gtSource_L1GT_
input parameters
Definition: L1TGT.h:94
edm::ESGetToken< L1GtTriggerMenu, L1GtTriggerMenuRcd > l1gtTrigmenuToken_
Definition: L1TGT.h:99
edm::EDGetTokenT< L1MuGMTReadoutCollection > gtSource_L1MuGMT_
Definition: L1TGT.h:95

◆ ~L1TGT()

L1TGT::~L1TGT ( )
override

Definition at line 33 of file L1TGT.cc.

33  {
34  // empty
35 }

Member Function Documentation

◆ analyze()

void L1TGT::analyze ( const edm::Event iEvent,
const edm::EventSetup evSetup 
)
overrideprotectedvirtual

get Global Trigger algo and technical trigger bit statistics

Reimplemented from DQMOneEDAnalyzer< edm::one::WatchLuminosityBlocks >.

Definition at line 331 of file L1TGT.cc.

References accept(), L1GtfeWord::activeBoards(), algo_bits, algo_bits_corr, algo_bits_lumi, algo_tt_bits_corr, algoBitToName, EcalCondDBWriter_cfi::beam, L1GtfeExtWord::beamMode(), L1GtfeExtWord::beamMomentum(), BST_beamMode, BST_beamMomentum, BST_intensityBeam1, BST_intensityBeam2, BST_lhcFillNumber, BST_MasterStatus, BST_turnCountNumber, L1GtfeExtWord::bstMasterStatus(), L1TcsWord::bxNr(), L1GtPsbWord::bxNr(), L1GtFdlWord::bxNr(), L1GtfeWord::bxNr(), dbx_module, TauDecayModes::dec, L1GlobalTriggerReadoutRecord::decisionWord(), event_lumi, event_number, event_type, L1TcsWord::eventNr(), evnum_trignum_lumi, FDL, dqm::impl::MonitorElement::Fill(), spr::find(), L1MuGMTReadoutRecord::getBxNr(), L1MuGMTReadoutCollection::getRecord(), GMT, gpsfreq, gpsfreqlum, gpsfreqwide, L1GtfeExtWord::gpsTime(), gtEvmSource_, L1GlobalTriggerReadoutRecord::gtFdlVector(), L1GlobalTriggerEvmReadoutRecord::gtFdlWord(), L1GlobalTriggerReadoutRecord::gtFdlWord(), gtfe_bx, L1GlobalTriggerEvmReadoutRecord::gtfeWord(), L1GlobalTriggerReadoutRecord::gtfeWord(), L1GtFdlWord::gtPrescaleFactorIndexAlgo(), L1GlobalTriggerReadoutRecord::gtPsbWord(), gtSource_L1GT_, gtSource_L1MuGMT_, h_L1AlgoBX1, h_L1AlgoBX2, h_L1AlgoBX3, h_L1AlgoBX4, h_L1TechBX, mps_fire::i, iEvent, isActive(), edm::HandleBase::isValid(), dqmiolumiharvest::j, l1TechTriggerDecision, l1TriggerDecision, L1GtfeExtWord::lhcFillNumber(), L1GtPsbWord::localBxNr(), L1GtFdlWord::localBxNr(), L1TcsWord::luminositySegmentNr(), L1GtFdlWord::lumiSegmentNr(), m_monL1PrescaleFactorSet, m_monLsNrDiffTcsFdlEvm, m_monLsNrDiffTcsFdlEvmLs, m_monOrbitNrDiffTcsFdlEvm, m_monOrbitNrDiffTcsFdlEvmLs, m_nrEvJob, m_pairLsNumberPfIndex, volumeBasedMagneticField_160812_cfi::master, MaxLsNrDiffTcsFdlEvm, MaxOrbitNrDiffTcsFdlEvm, orbit_lumi, L1TcsWord::orbitNr(), L1GtFdlWord::orbitNr(), L1TcsWord::partTrigNr(), preGps_, preOrb_, PSB9, L1GtfeWord::setupVersion(), setupversion_lumi, TCS, L1GlobalTriggerEvmReadoutRecord::tcsWord(), techBitToName, L1GlobalTriggerReadoutRecord::technicalTriggerWord(), L1GtfeExtWord::totalIntensityBeam1(), L1GtfeExtWord::totalIntensityBeam2(), trig_iter, trigger_lumi, trigger_number, L1TcsWord::triggerType(), tt_bits, tt_bits_corr, tt_bits_lumi, L1GtfeExtWord::turnCountNumber(), and verbose_.

331  {
332  m_nrEvJob++;
333 
334  if (verbose_) {
335  edm::LogInfo("L1TGT") << "L1TGT: analyze...." << std::endl;
336  }
337 
338  // initialize Bx, orbit number, luminosity segment number to invalid value
339  int tcsBx = -1;
340  int gtfeEvmBx = -1;
341 
342  long long int orbitTcs = -1;
343  int orbitEvmFdl = -1;
344 
345  int lsTcs = -1;
346  int lsEvmFdl = -1;
347 
348  // get once only the LS block number, to be used in many histograms
349  const int lsNumber = iEvent.luminosityBlock();
350 
351  // open EVM readout record if available
353  iEvent.getByToken(gtEvmSource_, gtEvmReadoutRecord);
354 
355  if (!gtEvmReadoutRecord.isValid()) {
356  edm::LogInfo("L1TGT") << "can't find L1GlobalTriggerEvmReadoutRecord";
357  } else {
358  // get all info from the EVM record if available and fill the histograms
359 
360  const L1GtfeWord& gtfeEvmWord = gtEvmReadoutRecord->gtfeWord();
361  const L1GtfeExtWord& gtfeEvmExtWord = gtEvmReadoutRecord->gtfeWord();
362 
363  gtfeEvmBx = gtfeEvmWord.bxNr();
364  int gtfeEvmActiveBoards = gtfeEvmWord.activeBoards();
365 
366  if (isActive(gtfeEvmActiveBoards, TCS)) {
367  // if TCS present in the record
368 
369  const L1TcsWord& tcsWord = gtEvmReadoutRecord->tcsWord();
370 
371  tcsBx = tcsWord.bxNr();
372  orbitTcs = tcsWord.orbitNr();
373  lsTcs = tcsWord.luminositySegmentNr();
374 
375  event_type->Fill(tcsWord.triggerType());
376  orbit_lumi->Fill(lsNumber, orbitTcs);
377 
378  trigger_number->Fill(tcsWord.partTrigNr());
379  event_number->Fill(tcsWord.eventNr());
380 
381  trigger_lumi->Fill(lsNumber, tcsWord.partTrigNr());
382  event_lumi->Fill(lsNumber, tcsWord.eventNr());
383  evnum_trignum_lumi->Fill(lsNumber,
384  static_cast<double>(tcsWord.eventNr()) / static_cast<double>(tcsWord.partTrigNr()));
385 
386  uint16_t master = gtfeEvmExtWord.bstMasterStatus();
387  uint32_t turnCount = gtfeEvmExtWord.turnCountNumber();
388  uint32_t lhcFill = gtfeEvmExtWord.lhcFillNumber();
389  uint16_t beam = gtfeEvmExtWord.beamMode();
390  uint16_t momentum = gtfeEvmExtWord.beamMomentum();
391  uint32_t intensity1 = gtfeEvmExtWord.totalIntensityBeam1();
392  uint32_t intensity2 = gtfeEvmExtWord.totalIntensityBeam2();
393 
394  BST_MasterStatus->Fill(lsNumber, static_cast<double>(master));
395  BST_turnCountNumber->Fill(lsNumber, static_cast<double>(turnCount));
396  BST_lhcFillNumber->Fill(static_cast<double>(lhcFill % 1000));
397  BST_beamMode->Fill(lsNumber, static_cast<double>(beam));
398 
399  BST_beamMomentum->Fill(lsNumber, static_cast<double>(momentum));
400  BST_intensityBeam1->Fill(lsNumber, static_cast<double>(intensity1));
401  BST_intensityBeam2->Fill(lsNumber, static_cast<double>(intensity2));
402 
403  if (verbose_) {
404  edm::LogInfo("L1TGT") << " check mode = " << beam << " momentum " << momentum << " int2 " << intensity2
405  << std::endl;
406  }
407 
408  uint64_t gpsr = gtfeEvmExtWord.gpsTime();
409  uint64_t gpshi = (gpsr >> 32) & 0xffffffff;
410  uint64_t gpslo = gpsr & 0xffffffff;
411  uint64_t gps = gpshi * 1000000 + gpslo;
412  // edm::LogInfo("L1TGT") << " gpsr = " << std::hex << gpsr << " hi=" << gpshi << " lo=" << gpslo << " gps=" << gps << std::endl;
413 
414  Long64_t delorb = orbitTcs - preOrb_;
415  Long64_t delgps = gps - preGps_;
416  Double_t freq = -1.;
417 
418  if (delgps > 0) {
419  freq = ((Double_t)(delorb)) * 3564. / ((Double_t)(delgps));
420  }
421 
422  if (delorb > 0) {
423  gpsfreq->Fill(freq);
424  gpsfreqwide->Fill(freq);
425  gpsfreqlum->Fill(lsNumber, freq);
426  if (verbose_) {
427  if (freq > 200.) {
428  edm::LogInfo("L1TGT") << " preOrb_ = " << preOrb_ << " orbitTcs=" << orbitTcs << " delorb=" << delorb
429  << std::hex << " preGps_=" << preGps_ << " gps=" << gps << std::dec
430  << " delgps=" << delgps << " freq=" << freq << std::endl;
431  }
432  }
433  }
434 
435  preGps_ = gps;
436  preOrb_ = orbitTcs;
437  }
438 
439  // get info from FDL if active
440  if (isActive(gtfeEvmActiveBoards, FDL)) {
441  const L1GtFdlWord& fdlWord = gtEvmReadoutRecord->gtFdlWord();
442 
443  orbitEvmFdl = fdlWord.orbitNr();
444  lsEvmFdl = fdlWord.lumiSegmentNr();
445  }
446 
447  if ((orbitTcs >= 0) && (orbitEvmFdl >= 0)) {
448  int diffOrbit = static_cast<float>(orbitTcs - orbitEvmFdl);
449  edm::LogInfo("L1TGT") << "\n orbitTcs = " << orbitTcs << " orbitEvmFdl = " << orbitEvmFdl
450  << " diffOrbit = " << diffOrbit << " orbitEvent = " << iEvent.orbitNumber() << std::endl;
451 
452  if (diffOrbit >= MaxOrbitNrDiffTcsFdlEvm) {
454 
455  } else if (diffOrbit <= -MaxOrbitNrDiffTcsFdlEvm) {
457 
458  } else {
459  m_monOrbitNrDiffTcsFdlEvm->Fill(diffOrbit);
460  m_monOrbitNrDiffTcsFdlEvmLs->Fill(lsNumber, diffOrbit);
461  }
462 
463  } else {
464  if (orbitTcs >= 0) {
465  // EVM_FDL error
467  } else if (orbitEvmFdl >= 0) {
468  // TCS error
470 
471  } else {
472  // TCS and EVM_FDL error
475  }
476  }
477 
478  if ((lsTcs >= 0) && (lsEvmFdl >= 0)) {
479  int diffLs = static_cast<float>(lsTcs - lsEvmFdl);
480  edm::LogInfo("L1TGT") << "\n lsTcs = " << lsTcs << " lsEvmFdl = " << lsEvmFdl << " diffLs = " << diffLs
481  << " lsEvent = " << lsNumber << std::endl;
482 
483  if (diffLs >= MaxLsNrDiffTcsFdlEvm) {
485 
486  } else if (diffLs <= -MaxLsNrDiffTcsFdlEvm) {
488 
489  } else {
490  m_monLsNrDiffTcsFdlEvm->Fill(diffLs);
491  m_monLsNrDiffTcsFdlEvmLs->Fill(lsNumber, diffLs);
492  }
493 
494  } else {
495  if (lsTcs >= 0) {
496  // EVM_FDL error
498  } else if (lsEvmFdl >= 0) {
499  // TCS error
501 
502  } else {
503  // TCS and EVM_FDL error
506  }
507  }
508  }
509 
510  // open GT DAQ readout record - exit if failed
512  iEvent.getByToken(gtSource_L1GT_, gtReadoutRecord);
513 
514  //edm::ESHandle<L1GtTriggerMenu> menuRcd;
515  //evSetup.get<L1GtTriggerMenuRcd>().get(menuRcd);
516 
517  //const L1GtTriggerMenu* menu = menuRcd.product();
518 
519  if (!gtReadoutRecord.isValid()) {
520  edm::LogInfo("L1TGT") << "can't find L1GlobalTriggerReadoutRecord";
521  return;
522  }
523 
524  if (gtReadoutRecord.isValid()) {
525  unsigned int NmaxL1AlgoBit = gtReadoutRecord->decisionWord().size();
526  unsigned int NmaxL1TechBit = gtReadoutRecord->technicalTriggerWord().size();
527 
528  const DecisionWord dWord = gtReadoutRecord->decisionWord();
529  const TechnicalTriggerWord technicalTriggerWordBeforeMask = gtReadoutRecord->technicalTriggerWord();
530 
531  const std::vector<L1GtFdlWord>& m_gtFdlWord(gtReadoutRecord->gtFdlVector());
532  int numberBxInEvent = m_gtFdlWord.size();
533  int minBxInEvent = (numberBxInEvent + 1) / 2 - numberBxInEvent;
534 
535  for (unsigned int iBit = 0; iBit < NmaxL1AlgoBit; ++iBit) {
536  bool accept = dWord[iBit];
537 
540  if (trig_iter == l1TriggerDecision.end()) {
541  l1TriggerDecision.insert(valType(algoBitToName[iBit], accept));
542  } else {
543  trig_iter->second = accept;
544  }
545 
546  int ibx = 0;
547  for (std::vector<L1GtFdlWord>::const_iterator itBx = m_gtFdlWord.begin(); itBx != m_gtFdlWord.end(); ++itBx) {
548  const DecisionWord dWordBX = (*itBx).gtDecisionWord();
549  bool accept = dWordBX[iBit];
550  if (accept) {
551  if (iBit < 32)
552  h_L1AlgoBX1->Fill(iBit, minBxInEvent + ibx);
553  else if (iBit < 64)
554  h_L1AlgoBX2->Fill(iBit, minBxInEvent + ibx);
555  else if (iBit < 96)
556  h_L1AlgoBX3->Fill(iBit, minBxInEvent + ibx);
557  else if (iBit < 128)
558  h_L1AlgoBX4->Fill(iBit, minBxInEvent + ibx);
559  }
560  ibx++;
561  }
562  }
563 
564  for (unsigned int iBit = 0; iBit < NmaxL1TechBit; ++iBit) {
565  bool accept = technicalTriggerWordBeforeMask[iBit];
566 
569  if (trig_iter == l1TechTriggerDecision.end())
570  l1TechTriggerDecision.insert(valType(techBitToName[iBit], accept));
571  else
572  trig_iter->second = accept;
573 
574  int ibx = 0;
575  for (std::vector<L1GtFdlWord>::const_iterator itBx = m_gtFdlWord.begin(); itBx != m_gtFdlWord.end(); ++itBx) {
576  const DecisionWord dWordBX = (*itBx).gtTechnicalTriggerWord();
577  bool accept = dWordBX[iBit];
578  if (accept)
579  h_L1TechBX->Fill(iBit, minBxInEvent + ibx);
580  ibx++;
581  }
582  }
583  }
584 
585  // initialize bx's to invalid value
586  int gtfeBx = -1;
587  int fdlBx[2] = {-1, -1};
588  int psbBx[2][7] = {{-1, -1, -1, -1, -1, -1, -1}, {-1, -1, -1, -1, -1, -1, -1}};
589  int gmtBx = -1;
590 
591  // get info from GTFE DAQ record
592  const L1GtfeWord& gtfeWord = gtReadoutRecord->gtfeWord();
593  gtfeBx = gtfeWord.bxNr();
594  gtfe_bx->Fill(gtfeBx);
595  setupversion_lumi->Fill(lsNumber, gtfeWord.setupVersion());
596  int gtfeActiveBoards = gtfeWord.activeBoards();
597 
598  // look for GMT readout collection from the same source if GMT active
599  if (isActive(gtfeActiveBoards, GMT)) {
600  edm::Handle<L1MuGMTReadoutCollection> gmtReadoutCollection;
601  iEvent.getByToken(gtSource_L1MuGMT_, gmtReadoutCollection);
602 
603  if (gmtReadoutCollection.isValid()) {
604  gmtBx = gmtReadoutCollection->getRecord().getBxNr();
605  }
606  }
607 
608  // get info from FDL if active (including decision word)
609  if (isActive(gtfeActiveBoards, FDL)) {
610  const L1GtFdlWord& fdlWord = gtReadoutRecord->gtFdlWord();
611  fdlBx[0] = fdlWord.bxNr();
612  fdlBx[1] = fdlWord.localBxNr();
613 
615  const DecisionWord& gtDecisionWord = gtReadoutRecord->decisionWord();
616  const TechnicalTriggerWord& gtTTWord = gtReadoutRecord->technicalTriggerWord();
617 
618  int dbitNumber = 0;
619  DecisionWord::const_iterator GTdbitItr;
620  algo_bits->Fill(-1.); // fill underflow to normalize
621  for (GTdbitItr = gtDecisionWord.begin(); GTdbitItr != gtDecisionWord.end(); GTdbitItr++) {
622  if (*GTdbitItr) {
623  algo_bits->Fill(dbitNumber);
624  algo_bits_lumi->Fill(lsNumber, dbitNumber);
625  int dbitNumber1 = 0;
626  DecisionWord::const_iterator GTdbitItr1;
627  for (GTdbitItr1 = gtDecisionWord.begin(); GTdbitItr1 != gtDecisionWord.end(); GTdbitItr1++) {
628  if (*GTdbitItr1)
629  algo_bits_corr->Fill(dbitNumber, dbitNumber1);
630  dbitNumber1++;
631  }
632  int tbitNumber1 = 0;
633  TechnicalTriggerWord::const_iterator GTtbitItr1;
634  for (GTtbitItr1 = gtTTWord.begin(); GTtbitItr1 != gtTTWord.end(); GTtbitItr1++) {
635  if (*GTtbitItr1)
636  algo_tt_bits_corr->Fill(dbitNumber, tbitNumber1);
637  tbitNumber1++;
638  }
639  }
640  dbitNumber++;
641  }
642 
643  int tbitNumber = 0;
644  TechnicalTriggerWord::const_iterator GTtbitItr;
645  tt_bits->Fill(-1.); // fill underflow to normalize
646  for (GTtbitItr = gtTTWord.begin(); GTtbitItr != gtTTWord.end(); GTtbitItr++) {
647  if (*GTtbitItr) {
648  tt_bits->Fill(tbitNumber);
649  tt_bits_lumi->Fill(lsNumber, tbitNumber);
650  int tbitNumber1 = 0;
651  TechnicalTriggerWord::const_iterator GTtbitItr1;
652  for (GTtbitItr1 = gtTTWord.begin(); GTtbitItr1 != gtTTWord.end(); GTtbitItr1++) {
653  if (*GTtbitItr1)
654  tt_bits_corr->Fill(tbitNumber, tbitNumber1);
655  tbitNumber1++;
656  }
657  }
658  tbitNumber++;
659  }
660 
661  // fill the index of actual prescale factor set
662  // the index for technical triggers and algorithm trigger is the same (constraint in L1 GT TS)
663  // so we read only pfIndexAlgoTrig (uint16_t)
664 
665  const int pfIndexAlgoTrig = fdlWord.gtPrescaleFactorIndexAlgo();
666  m_monL1PrescaleFactorSet->Fill(lsNumber, static_cast<float>(pfIndexAlgoTrig));
667 
668  //
669 
670  // check that the combination (lsNumber, pfIndex) is not already included
671  // to avoid fake entries due to different event order
672 
673  std::pair<int, int> pairLsPfi = std::make_pair(lsNumber, pfIndexAlgoTrig);
674 
675  CItVecPair cIt = find(m_pairLsNumberPfIndex.begin(), m_pairLsNumberPfIndex.end(), pairLsPfi);
676 
677  if (cIt == m_pairLsNumberPfIndex.end()) {
678  m_pairLsNumberPfIndex.push_back(pairLsPfi);
679  }
680  }
681 
682  // get info from active PSB's
683  int ibit = PSB9; // first psb
684  // for now hardcode psb id's - TODO - get them from Vasile's board maps...
685  int psbID[7] = {0xbb09, 0xbb0d, 0xbb0e, 0xbb0f, 0xbb13, 0xbb14, 0xbb15};
686  for (int i = 0; i < 7; i++) {
687  if (isActive(gtfeActiveBoards, ibit)) {
688  L1GtPsbWord psbWord = gtReadoutRecord->gtPsbWord(psbID[i]);
689  psbBx[0][i] = psbWord.bxNr();
690  psbBx[1][i] = psbWord.localBxNr();
691  }
692  ibit++;
693  }
694 
695  //fill the dbx histo
696  if (gtfeEvmBx > -1)
697  dbx_module->Fill(0., gtfeEvmBx - gtfeBx);
698  if (tcsBx > -1)
699  dbx_module->Fill(1., tcsBx - gtfeBx);
700  for (int i = 0; i < 2; i++) {
701  if (fdlBx[i] > -1)
702  dbx_module->Fill(2. + i, fdlBx[i] - gtfeBx);
703  }
704  for (int j = 0; j < 7; j++) {
705  for (int i = 0; i < 2; i++) {
706  if (psbBx[i][j] > -1)
707  dbx_module->Fill(4. + i + 2 * j, psbBx[i][j] - gtfeBx);
708  }
709  }
710  if (gmtBx > -1)
711  dbx_module->Fill(18., gmtBx - gtfeBx);
712 }
MonitorElement * m_monL1PrescaleFactorSet
Definition: L1TGT.h:140
const cms_uint32_t orbitNr() const
get/set orbit number
Definition: L1GtFdlWord.h:235
MonitorElement * h_L1AlgoBX1
Definition: L1TGT.h:158
MonitorElement * gpsfreqwide
Definition: L1TGT.h:137
const cms_uint16_t gtPrescaleFactorIndexAlgo() const
Definition: L1GtFdlWord.h:195
const cms_uint16_t beamMode() const
std::map< std::string, bool > l1TriggerDecision
Definition: L1TGT.h:179
const cms_uint64_t orbitNr() const
get/set orbit number since start of run
Definition: L1TcsWord.h:185
MonitorElement * m_monLsNrDiffTcsFdlEvmLs
Definition: L1TGT.h:156
const L1GtFdlWord gtFdlWord(int bxInEvent) const
get / set FDL word (record) in the GT readout record
std::vector< std::pair< int, int > >::const_iterator CItVecPair
Definition: L1TGT.h:183
const cms_uint32_t setupVersion() const
get/set setup version
Definition: L1GtfeWord.h:104
const L1GtfeExtWord gtfeWord() const
get / set GTFE word (record) in the GT readout record
const cms_uint16_t luminositySegmentNr() const
get/set luminosity segment number
Definition: L1TcsWord.h:121
const DecisionWord & decisionWord(int bxInEventValue) const
const L1GtfeWord gtfeWord() const
get / set GTFE word (record) in the GT readout record
MonitorElement * BST_intensityBeam1
Definition: L1TGT.h:134
static const int MaxOrbitNrDiffTcsFdlEvm
Definition: L1TGT.h:152
MonitorElement * algo_bits_corr
Definition: L1TGT.h:110
MonitorElement * tt_bits
Definition: L1TGT.h:111
bool verbose_
verbosity switch
Definition: L1TGT.h:106
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
Definition: TopDQMHelpers.h:31
const L1GtFdlWord gtFdlWord(int bxInEventValue) const
get / set FDL word (record) in the GT readout record
const cms_uint16_t localBxNr() const
get/set local bunch cross number of the actual bx
Definition: L1GtFdlWord.h:259
MonitorElement * gtfe_bx
Definition: L1TGT.h:126
MonitorElement * BST_beamMode
Definition: L1TGT.h:132
MonitorElement * BST_MasterStatus
Definition: L1TGT.h:129
const cms_uint16_t bxNr() const
get/set bunch cross number as counted in the TCS chip
Definition: L1TcsWord.h:73
const cms_uint16_t bxNr() const
get/set bunch cross number of the actual bx
Definition: L1GtPsbWord.h:84
void Fill(long long x)
MonitorElement * BST_intensityBeam2
Definition: L1TGT.h:135
MonitorElement * h_L1TechBX
Definition: L1TGT.h:162
const cms_uint16_t bstMasterStatus() const
int iEvent
Definition: GenABIO.cc:224
MonitorElement * event_number
Definition: L1TGT.h:118
const std::vector< L1GtFdlWord > gtFdlVector() const
get the vector of L1GtFdlWord
const cms_uint32_t eventNr() const
get/set event number since last L1 reset generated in TCS chip
Definition: L1TcsWord.h:173
const cms_uint32_t turnCountNumber() const
MonitorElement * h_L1AlgoBX3
Definition: L1TGT.h:160
const cms_uint32_t lhcFillNumber() const
std::vector< bool > DecisionWord
typedefs
static const int MaxLsNrDiffTcsFdlEvm
Definition: L1TGT.h:153
uint64_t preGps_
Definition: L1TGT.h:174
edm::EDGetTokenT< L1GlobalTriggerEvmReadoutRecord > gtEvmSource_
input tag for L1 GT EVM readout record
Definition: L1TGT.h:98
MonitorElement * orbit_lumi
Definition: L1TGT.h:123
MonitorElement * h_L1AlgoBX4
Definition: L1TGT.h:161
std::vector< bool > TechnicalTriggerWord
technical trigger bits (64 bits)
int getBxNr() const
get counters
const TechnicalTriggerWord & technicalTriggerWord(int bxInEventValue) const
MonitorElement * algo_bits_lumi
Definition: L1TGT.h:114
MonitorElement * m_monLsNrDiffTcsFdlEvm
Definition: L1TGT.h:144
MonitorElement * gpsfreq
Definition: L1TGT.h:136
std::string algoBitToName[128]
Definition: L1TGT.h:177
const cms_uint16_t lumiSegmentNr() const
get/set luminosity segment number of the actual bx
Definition: L1GtFdlWord.h:247
MonitorElement * algo_bits
Definition: L1TGT.h:109
Log< level::Info, false > LogInfo
MonitorElement * event_type
Definition: L1TGT.h:116
MonitorElement * m_monOrbitNrDiffTcsFdlEvmLs
Definition: L1TGT.h:155
MonitorElement * dbx_module
Definition: L1TGT.h:127
const cms_uint64_t gpsTime() const
LHC-BOB-ES-0001 (EDMS 638899)
unsigned long long uint64_t
Definition: Time.h:13
const cms_uint16_t bxNr() const
get/set bunch cross number as counted in the GTFE board
Definition: L1GtfeWord.h:93
const L1GtPsbWord gtPsbWord(cms_uint16_t boardIdValue, int bxInEventValue) const
get / set PSB word (record) in the GT readout record
MonitorElement * tt_bits_corr
Definition: L1TGT.h:112
bool isActive(int word, int bit)
book all histograms for the module
Definition: L1TGT.cc:722
const cms_uint16_t beamMomentum() const
const cms_uint16_t bxNr() const
get/set BxNr - bunch cross number of the actual bx
Definition: L1GtFdlWord.h:88
uint64_t preOrb_
Definition: L1TGT.h:175
MonitorElement * gpsfreqlum
Definition: L1TGT.h:138
int m_nrEvJob
number of events processed
Definition: L1TGT.h:168
const cms_uint32_t partTrigNr() const
get/set total number of L1A sent since start of the run to this DAQ partition
Definition: L1TcsWord.h:161
bool isValid() const
Definition: HandleBase.h:70
const L1TcsWord tcsWord() const
get / set TCS word (record) in the GT readout record
const cms_uint16_t localBxNr() const
get/set local bunch cross number of the actual bx
Definition: L1GtPsbWord.h:134
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > gtSource_L1GT_
input parameters
Definition: L1TGT.h:94
MonitorElement * h_L1AlgoBX2
Definition: L1TGT.h:159
std::map< std::string, bool >::iterator trig_iter
Definition: L1TGT.h:180
MonitorElement * trigger_number
Definition: L1TGT.h:120
std::vector< std::pair< int, int > > m_pairLsNumberPfIndex
Definition: L1TGT.h:182
L1MuGMTReadoutRecord const & getRecord(int bx=0) const
const cms_uint32_t totalIntensityBeam2() const
MonitorElement * BST_beamMomentum
Definition: L1TGT.h:133
MonitorElement * BST_lhcFillNumber
Definition: L1TGT.h:131
MonitorElement * setupversion_lumi
Definition: L1TGT.h:124
const cms_uint16_t activeBoards() const
get/set boards contributing to EVM respectively DAQ record
Definition: L1GtfeWord.h:119
MonitorElement * BST_turnCountNumber
Definition: L1TGT.h:130
std::map< std::string, bool > l1TechTriggerDecision
Definition: L1TGT.h:179
MonitorElement * event_lumi
Definition: L1TGT.h:119
MonitorElement * tt_bits_lumi
Definition: L1TGT.h:115
MonitorElement * trigger_lumi
Definition: L1TGT.h:121
MonitorElement * evnum_trignum_lumi
Definition: L1TGT.h:122
const cms_uint32_t totalIntensityBeam1() const
const cms_uint16_t triggerType() const
get/set trigger type, identical with event type in CMS header
Definition: L1TcsWord.h:97
MonitorElement * algo_tt_bits_corr
Definition: L1TGT.h:113
std::string techBitToName[64]
Definition: L1TGT.h:178
MonitorElement * m_monOrbitNrDiffTcsFdlEvm
Definition: L1TGT.h:143
edm::EDGetTokenT< L1MuGMTReadoutCollection > gtSource_L1MuGMT_
Definition: L1TGT.h:95

◆ beginLuminosityBlock()

void L1TGT::beginLuminosityBlock ( const edm::LuminosityBlock ,
const edm::EventSetup  
)
inlinefinalprotected

end section

Definition at line 63 of file L1TGT.h.

63 {}

◆ bookHistograms()

void L1TGT::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  ,
edm::EventSetup const &  evSetup 
)
overrideprotectedvirtual

Implements DQMOneEDAnalyzer< edm::one::WatchLuminosityBlocks >.

Definition at line 37 of file L1TGT.cc.

References algo_bits, algo_bits_corr, algo_bits_lumi, algo_tt_bits_corr, dqm::implementation::IBooker::book1D(), dqm::implementation::IBooker::book2D(), dqm::implementation::IBooker::bookProfile(), BST_beamMode, BST_beamMomentum, BST_intensityBeam1, BST_intensityBeam2, BST_lhcFillNumber, BST_MasterStatus, BST_turnCountNumber, dbx_module, event_lumi, event_number, event_type, evnum_trignum_lumi, edm::EventSetup::getData(), gpsfreq, gpsfreqlum, gpsfreqwide, gtfe_bx, h_L1AlgoBX1, h_L1AlgoBX2, h_L1AlgoBX3, h_L1AlgoBX4, h_L1TechBX, l1gtTrigmenuToken_, m_histFolder, m_monL1PfIndicesPerLs, m_monL1PrescaleFactorSet, m_monLsNrDiffTcsFdlEvm, m_monLsNrDiffTcsFdlEvmLs, m_monOrbitNrDiffTcsFdlEvm, m_monOrbitNrDiffTcsFdlEvmLs, m_pairLsNumberPfIndex, MaxLsNrDiffTcsFdlEvm, MaxOrbitNrDiffTcsFdlEvm, prototype_2023_v1_0_0::menu, orbit_lumi, dqm::impl::MonitorElement::setAxisTitle(), dqm::impl::MonitorElement::setBinLabel(), dqm::implementation::NavigatorBase::setCurrentFolder(), setupversion_lumi, to_string(), trigger_lumi, trigger_number, tt_bits, tt_bits_corr, and tt_bits_lumi.

37  {
39 
40  // book histograms
41  const int TotalNrBinsLs = 1000;
42  const double totalNrBinsLs = static_cast<double>(TotalNrBinsLs);
43 
45 
46  algo_bits = ibooker.book1D("algo_bits", "GT algorithm trigger bits", 128, -0.5, 127.5);
47  algo_bits->setAxisTitle("Algorithm trigger bits", 1);
48 
50  ibooker.book2D("algo_bits_corr", "GT algorithm trigger bit correlation", 128, -0.5, 127.5, 128, -0.5, 127.5);
51  algo_bits_corr->setAxisTitle("Algorithm trigger bits", 1);
52  algo_bits_corr->setAxisTitle("Algorithm trigger bits", 2);
53 
54  tt_bits = ibooker.book1D("tt_bits", "GT technical trigger bits", 64, -0.5, 63.5);
55  tt_bits->setAxisTitle("Technical trigger bits", 1);
56 
57  tt_bits_corr = ibooker.book2D("tt_bits_corr", "GT technical trigger bit correlation", 64, -0.5, 63.5, 64, -0.5, 63.5);
58  tt_bits_corr->setAxisTitle("Technical trigger bits", 1);
59  tt_bits_corr->setAxisTitle("Technical trigger bits", 2);
60 
61  algo_tt_bits_corr = ibooker.book2D(
62  "algo_tt_bits_corr", "GT algorithm - technical trigger bit correlation", 128, -0.5, 127.5, 64, -0.5, 63.5);
63  algo_tt_bits_corr->setAxisTitle("Algorithm trigger bits", 1);
64  algo_tt_bits_corr->setAxisTitle("Technical trigger bits", 2);
65 
66  algo_bits_lumi = ibooker.book2D(
67  "algo_bits_lumi", "GT algorithm trigger bit rate per LS", TotalNrBinsLs, 0., totalNrBinsLs, 128, -0.5, 127.5);
68  algo_bits_lumi->setAxisTitle("Luminosity segment", 1);
69  algo_bits_lumi->setAxisTitle("Algorithm trigger bits", 2);
70 
71  tt_bits_lumi = ibooker.book2D(
72  "tt_bits_lumi", "GT technical trigger bit rate per LS", TotalNrBinsLs, 0., totalNrBinsLs, 64, -0.5, 63.5);
73  tt_bits_lumi->setAxisTitle("Luminosity segment", 1);
74  tt_bits_lumi->setAxisTitle("Technical trigger bits", 2);
75 
76  event_type = ibooker.book1D("event_type", "GT event type", 10, -0.5, 9.5);
77  event_type->setAxisTitle("Event type", 1);
78  event_type->setBinLabel(2, "Physics", 1);
79  event_type->setBinLabel(3, "Calibration", 1);
80  event_type->setBinLabel(4, "Random", 1);
81  event_type->setBinLabel(6, "Traced", 1);
82  event_type->setBinLabel(7, "Test", 1);
83  event_type->setBinLabel(8, "Error", 1);
84 
85  event_number = ibooker.book1D("event_number", "GT event number (from last resync)", 100, 0., 50000.);
86  event_number->setAxisTitle("Event number", 1);
87 
88  event_lumi = ibooker.bookProfile(
89  "event_lumi", "GT event number (from last resync) vs LS", TotalNrBinsLs, 0., totalNrBinsLs, 100, -0.1, 1.e15, "s");
90  event_lumi->setAxisTitle("Luminosity segment", 1);
91  event_lumi->setAxisTitle("Event number", 2);
92 
93  trigger_number = ibooker.book1D("trigger_number", "GT trigger number (from start run)", 100, 0., 50000.);
94  trigger_number->setAxisTitle("Trigger number", 1);
95 
96  trigger_lumi = ibooker.bookProfile("trigger_lumi",
97  "GT trigger number (from start run) vs LS",
98  TotalNrBinsLs,
99  0.,
100  totalNrBinsLs,
101  100,
102  -0.1,
103  1.e15,
104  "s");
105  trigger_lumi->setAxisTitle("Luminosity segment", 1);
106  trigger_lumi->setAxisTitle("Trigger number", 2);
107 
109  "evnum_trignum_lumi", "GT event/trigger number ratio vs LS", TotalNrBinsLs, 0., totalNrBinsLs, 100, -0.1, 2., "s");
110  evnum_trignum_lumi->setAxisTitle("Luminosity segment", 1);
111  evnum_trignum_lumi->setAxisTitle("Event/trigger number ratio", 2);
112 
113  orbit_lumi = ibooker.bookProfile(
114  "orbit_lumi", "GT orbit number vs LS", TotalNrBinsLs, 0., totalNrBinsLs, 100, -0.1, 1.e15, "s");
115  orbit_lumi->setAxisTitle("Luminosity segment", 1);
116  orbit_lumi->setAxisTitle("Orbit number", 2);
117 
118  setupversion_lumi = ibooker.bookProfile(
119  "setupversion_lumi", "GT setup version vs LS", TotalNrBinsLs, 0., totalNrBinsLs, 100, -0.1, 1.e10, "i");
120  setupversion_lumi->setAxisTitle("Luminosity segment", 1);
121  setupversion_lumi->setAxisTitle("Setup version", 2);
122 
123  gtfe_bx = ibooker.book1D("gtfe_bx", "GTFE Bx number", 3600, 0., 3600.);
124  gtfe_bx->setAxisTitle("GTFE BX number", 1);
125 
126  dbx_module =
127  ibooker.bookProfile("dbx_module", "delta Bx of GT modules wrt GTFE", 20, 0., 20., 100, -4000., 4000., "i");
128  dbx_module->setAxisTitle("GT crate module", 1);
129  dbx_module->setAxisTitle("Module Bx - GTFE Bx", 2);
130  dbx_module->setBinLabel(1, "GTFEevm", 1);
131  dbx_module->setBinLabel(2, "TCS", 1);
132  dbx_module->setBinLabel(3, "FDL", 1);
133  dbx_module->setBinLabel(4, "FDLloc", 1);
134  dbx_module->setBinLabel(5, "PSB9", 1);
135  dbx_module->setBinLabel(6, "PSB9loc", 1);
136  dbx_module->setBinLabel(7, "PSB13", 1);
137  dbx_module->setBinLabel(8, "PSB13loc", 1);
138  dbx_module->setBinLabel(9, "PSB14", 1);
139  dbx_module->setBinLabel(10, "PSB14loc", 1);
140  dbx_module->setBinLabel(11, "PSB15", 1);
141  dbx_module->setBinLabel(12, "PSB15loc", 1);
142  dbx_module->setBinLabel(13, "PSB19", 1);
143  dbx_module->setBinLabel(14, "PSB19loc", 1);
144  dbx_module->setBinLabel(15, "PSB20", 1);
145  dbx_module->setBinLabel(16, "PSB20loc", 1);
146  dbx_module->setBinLabel(17, "PSB21", 1);
147  dbx_module->setBinLabel(18, "PSB21loc", 1);
148  dbx_module->setBinLabel(19, "GMT", 1);
149 
151  ibooker.book2D("BST_MasterStatus", "BST master status over LS", TotalNrBinsLs, 0., totalNrBinsLs, 6, -1., 5.);
152  BST_MasterStatus->setAxisTitle("Luminosity segment", 1);
153  BST_MasterStatus->setAxisTitle("BST master status", 2);
154  BST_MasterStatus->setBinLabel(2, "Master Beam 1", 2);
155  BST_MasterStatus->setBinLabel(3, "Master Beam 2", 2);
156 
158  ibooker.book2D("BST_turnCountNumber", "BST turn count over LS", TotalNrBinsLs, 0., totalNrBinsLs, 250, 0., 4.3e9);
159  BST_turnCountNumber->setAxisTitle("Luminosity segment", 1);
160  BST_turnCountNumber->setAxisTitle("BST turn count number", 2);
161 
162  BST_lhcFillNumber = ibooker.book1D("BST_lhcFillNumber", "BST LHC fill number % 1000", 1000, 0., 1000.);
163  BST_lhcFillNumber->setAxisTitle("BST LHC fill number modulo 1000");
164 
165  BST_beamMode = ibooker.book2D("BST_beamMode", "BST beam mode over LS", TotalNrBinsLs, 0., totalNrBinsLs, 25, 1., 26.);
166  BST_beamMode->setAxisTitle("Luminosity segment", 1);
167  BST_beamMode->setAxisTitle("Mode", 2);
168  BST_beamMode->setBinLabel(1, "No mode", 2);
169  BST_beamMode->setBinLabel(2, "Setup", 2);
170  BST_beamMode->setBinLabel(3, "Inj pilot", 2);
171  BST_beamMode->setBinLabel(4, "Inj intr", 2);
172  BST_beamMode->setBinLabel(5, "Inj nomn", 2);
173  BST_beamMode->setBinLabel(6, "Pre ramp", 2);
174  BST_beamMode->setBinLabel(7, "Ramp", 2);
175  BST_beamMode->setBinLabel(8, "Flat top", 2);
176  BST_beamMode->setBinLabel(9, "Squeeze", 2);
177  BST_beamMode->setBinLabel(10, "Adjust", 2);
178  BST_beamMode->setBinLabel(11, "Stable", 2);
179  BST_beamMode->setBinLabel(12, "Unstable", 2);
180  BST_beamMode->setBinLabel(13, "Beam dump", 2);
181  BST_beamMode->setBinLabel(14, "Ramp down", 2);
182  BST_beamMode->setBinLabel(15, "Recovery", 2);
183  BST_beamMode->setBinLabel(16, "Inj dump", 2);
184  BST_beamMode->setBinLabel(17, "Circ dump", 2);
185  BST_beamMode->setBinLabel(18, "Abort", 2);
186  BST_beamMode->setBinLabel(19, "Cycling", 2);
187  BST_beamMode->setBinLabel(20, "Warn beam dump", 2);
188  BST_beamMode->setBinLabel(21, "No beam", 2);
189 
191  ibooker.book2D("BST_beamMomentum", "BST beam momentum", TotalNrBinsLs, 0., totalNrBinsLs, 100, 0., 7200.);
192  BST_beamMomentum->setAxisTitle("Luminosity segment", 1);
193  BST_beamMomentum->setAxisTitle("Beam momentum", 2);
194 
195  gpsfreq = ibooker.book1D("gpsfreq", "Clock frequency measured by GPS", 1000, 39.95, 40.2);
196  gpsfreq->setAxisTitle("CMS clock frequency (MHz)");
197 
198  gpsfreqwide = ibooker.book1D("gpsfreqwide", "Clock frequency measured by GPS", 1000, -2., 200.);
199  gpsfreqwide->setAxisTitle("CMS clock frequency (MHz)");
200 
201  gpsfreqlum = ibooker.book2D(
202  "gpsfreqlum", "Clock frequency measured by GPS", TotalNrBinsLs, 0., totalNrBinsLs, 100, 39.95, 40.2);
203  gpsfreqlum->setAxisTitle("Luminosity segment", 1);
204  gpsfreqlum->setAxisTitle("CMS clock frequency (MHz)", 2);
205 
207  ibooker.book2D("BST_intensityBeam1", "Intensity beam 1", TotalNrBinsLs, 0., totalNrBinsLs, 1000, 0., 5000.);
208  BST_intensityBeam1->setAxisTitle("Luminosity segment", 1);
209  BST_intensityBeam1->setAxisTitle("Beam intensity", 2);
210 
212  ibooker.book2D("BST_intensityBeam2", "Intensity beam 2", TotalNrBinsLs, 0., totalNrBinsLs, 1000, 0., 5000.);
213  BST_intensityBeam2->setAxisTitle("Luminosity segment", 1);
214  BST_intensityBeam2->setAxisTitle("Beam intensity", 2);
215 
216  // prescale factor index monitoring
217 
219  "L1PrescaleFactorSet", "Index of L1 prescale factor set", TotalNrBinsLs, 0., totalNrBinsLs, 25, 0., 25.);
220  m_monL1PrescaleFactorSet->setAxisTitle("Luminosity segment", 1);
221  m_monL1PrescaleFactorSet->setAxisTitle("L1 PF set index", 2);
223  ibooker.book1D("L1PfIndicesPerLs", "Number of prescale factor indices used per LS", 10, 0., 10.);
224  m_monL1PfIndicesPerLs->setAxisTitle("Number of PF indices used per LS", 1);
225  m_monL1PfIndicesPerLs->setAxisTitle("Entries", 2);
226 
227  // TCS vs FDL common quantity monitoring
228 
229  ibooker.setCurrentFolder(m_histFolder + "/TCSvsEvmFDL");
230 
231  // orbit number
232  m_monOrbitNrDiffTcsFdlEvm = ibooker.book1D("OrbitNrDiffTcsFdlEvm",
233  "Orbit number difference (TCS - EVM_FDL)",
234  2 * MaxOrbitNrDiffTcsFdlEvm + 1,
235  static_cast<float>(-(MaxOrbitNrDiffTcsFdlEvm + 1)),
236  static_cast<float>(MaxOrbitNrDiffTcsFdlEvm + 1));
237  m_monOrbitNrDiffTcsFdlEvm->setAxisTitle("Orbit number difference", 1);
238  m_monOrbitNrDiffTcsFdlEvm->setAxisTitle("Entries/run", 2);
239  m_monLsNrDiffTcsFdlEvm = ibooker.book1D("LsNrDiffTcsFdlEvm",
240  "LS number difference (TCS - EVM_FDL)",
241  2 * MaxLsNrDiffTcsFdlEvm + 1,
242  static_cast<float>(-(MaxLsNrDiffTcsFdlEvm + 1)),
243  static_cast<float>(MaxLsNrDiffTcsFdlEvm + 1));
244  m_monLsNrDiffTcsFdlEvm->setAxisTitle("LS number difference", 1);
245  m_monLsNrDiffTcsFdlEvm->setAxisTitle("Entries/run", 2);
246 
247  // LS number
248  m_monOrbitNrDiffTcsFdlEvmLs = ibooker.book2D("OrbitNrDiffTcsFdlEvmLs",
249  "Orbit number difference (TCS - EVM_FDL)",
250  TotalNrBinsLs,
251  0.,
252  totalNrBinsLs,
253  2 * MaxOrbitNrDiffTcsFdlEvm + 1,
254  static_cast<float>(-(MaxOrbitNrDiffTcsFdlEvm + 1)),
255  static_cast<float>(MaxOrbitNrDiffTcsFdlEvm + 1));
256  m_monOrbitNrDiffTcsFdlEvmLs->setAxisTitle("Luminosity segment", 1);
257  m_monOrbitNrDiffTcsFdlEvmLs->setAxisTitle("Orbit number difference (TCS - EVM_FDL)", 2);
258 
259  m_monLsNrDiffTcsFdlEvmLs = ibooker.book2D("LsNrDiffTcsFdlEvmLs",
260  "LS number difference (TCS - EVM_FDL)",
261  TotalNrBinsLs,
262  0.,
263  totalNrBinsLs,
264  2 * MaxLsNrDiffTcsFdlEvm + 1,
265  static_cast<float>(-(MaxLsNrDiffTcsFdlEvm + 1)),
266  static_cast<float>(MaxLsNrDiffTcsFdlEvm + 1));
267  m_monLsNrDiffTcsFdlEvmLs->setAxisTitle("Luminosity segment", 1);
268  m_monLsNrDiffTcsFdlEvmLs->setAxisTitle("LS number difference (TCS - EVM_FDL)", 2);
269 
271  // clear bookkeeping for prescale factor change
272  m_pairLsNumberPfIndex.clear();
273 
274  ibooker.setCurrentFolder(m_histFolder + "/PlotTrigsBx");
275 
276  //--------book AlgoBits/TechBits vs Bx Histogram-----------
277 
278  //edm::ESHandle<L1GtTriggerMenu> menuRcd;
279  //evSetup.get<L1GtTriggerMenuRcd>().get(menuRcd);
280  //menuRcd.product();
281  const L1GtTriggerMenu* menu = &evSetup.getData(l1gtTrigmenuToken_);
282 
283  h_L1AlgoBX1 = ibooker.book2D("h_L1AlgoBX1", "L1 Algo Trigger BX (algo bit 0 to 31)", 32, -0.5, 31.5, 5, -2.5, 2.5);
284  h_L1AlgoBX2 = ibooker.book2D("h_L1AlgoBX2", "L1 Algo Trigger BX (algo bit 32 to 63)", 32, 31.5, 63.5, 5, -2.5, 2.5);
285  h_L1AlgoBX3 = ibooker.book2D("h_L1AlgoBX3", "L1 Algo Trigger BX (algo bit 64 to 95)", 32, 63.5, 95.5, 5, -2.5, 2.5);
286  h_L1AlgoBX4 = ibooker.book2D("h_L1AlgoBX4", "L1 Algo Trigger BX (algo bit 96 to 127)", 32, 95.5, 127.5, 5, -2.5, 2.5);
287  h_L1TechBX = ibooker.book2D("h_L1TechBX", "L1 Tech Trigger BX", 64, -0.5, 63.5, 5, -2.5, 2.5);
288 
289  for (CItAlgo algo = menu->gtAlgorithmMap().begin(); algo != menu->gtAlgorithmMap().end(); ++algo) {
290  int itrig = (algo->second).algoBitNumber();
291  //algoBitToName[itrig] = TString( (algo->second).algoName() );
292  //const char* trigName = (algo->second).algoName().c_str();
293  if (itrig < 32) {
294  //h_L1AlgoBX1->setBinLabel(itrig+1,trigName);
295  h_L1AlgoBX1->setBinLabel(itrig + 1, std::to_string(itrig));
296  h_L1AlgoBX1->setAxisTitle("Algorithm trigger bits", 1);
297  h_L1AlgoBX1->setAxisTitle("BX (0=L1A)", 2);
298  } else if (itrig < 64) {
299  //h_L1AlgoBX2->setBinLabel(itrig+1-32,trigName);
300  h_L1AlgoBX2->setBinLabel(itrig + 1 - 32, std::to_string(itrig));
301  h_L1AlgoBX2->setAxisTitle("Algorithm trigger bits", 1);
302  h_L1AlgoBX2->setAxisTitle("BX (0=L1A)", 2);
303  } else if (itrig < 96) {
304  //h_L1AlgoBX3->setBinLabel(itrig+1-64,trigName);
305  h_L1AlgoBX3->setBinLabel(itrig + 1 - 64, std::to_string(itrig));
306  h_L1AlgoBX3->setAxisTitle("Algorithm trigger bits", 1);
307  h_L1AlgoBX3->setAxisTitle("BX (0=L1A)", 2);
308  } else if (itrig < 128) {
309  //h_L1AlgoBX4->setBinLabel(itrig+1-96,trigName);
310  h_L1AlgoBX4->setBinLabel(itrig + 1 - 96, std::to_string(itrig));
311  h_L1AlgoBX4->setAxisTitle("Algorithm trigger bits", 1);
312  h_L1AlgoBX4->setAxisTitle("BX (0=L1A)", 2);
313  }
314  }
315 
316  // technical trigger bits
317  for (CItAlgo techTrig = menu->gtTechnicalTriggerMap().begin(); techTrig != menu->gtTechnicalTriggerMap().end();
318  ++techTrig) {
319  int itrig = (techTrig->second).algoBitNumber();
320  //techBitToName[itrig] = TString( (techTrig->second).algoName() );
321  //const char* trigName = (techTrig->second).algoName().c_str();
322  h_L1TechBX->setBinLabel(itrig + 1, std::to_string(itrig));
323  h_L1TechBX->setAxisTitle("Technical trigger bits", 1);
324  h_L1TechBX->setAxisTitle("BX (0=L1A)", 2);
325  }
326 }
MonitorElement * m_monL1PrescaleFactorSet
Definition: L1TGT.h:140
MonitorElement * h_L1AlgoBX1
Definition: L1TGT.h:158
MonitorElement * gpsfreqwide
Definition: L1TGT.h:137
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:36
MonitorElement * m_monLsNrDiffTcsFdlEvmLs
Definition: L1TGT.h:156
MonitorElement * BST_intensityBeam1
Definition: L1TGT.h:134
static const int MaxOrbitNrDiffTcsFdlEvm
Definition: L1TGT.h:152
MonitorElement * algo_bits_corr
Definition: L1TGT.h:110
MonitorElement * tt_bits
Definition: L1TGT.h:111
MonitorElement * gtfe_bx
Definition: L1TGT.h:126
static std::string to_string(const XMLCh *ch)
MonitorElement * BST_beamMode
Definition: L1TGT.h:132
MonitorElement * BST_MasterStatus
Definition: L1TGT.h:129
AlgorithmMap::const_iterator CItAlgo
iterators through map containing the algorithms
MonitorElement * BST_intensityBeam2
Definition: L1TGT.h:135
MonitorElement * h_L1TechBX
Definition: L1TGT.h:162
MonitorElement * event_number
Definition: L1TGT.h:118
MonitorElement * h_L1AlgoBX3
Definition: L1TGT.h:160
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double lowX, double highX, int, double lowY, double highY, char const *option="s", FUNC onbooking=NOOP())
Definition: DQMStore.h:408
static const int MaxLsNrDiffTcsFdlEvm
Definition: L1TGT.h:153
MonitorElement * orbit_lumi
Definition: L1TGT.h:123
MonitorElement * h_L1AlgoBX4
Definition: L1TGT.h:161
std::string m_histFolder
histogram folder for L1 GT plots
Definition: L1TGT.h:172
MonitorElement * algo_bits_lumi
Definition: L1TGT.h:114
virtual void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
MonitorElement * m_monLsNrDiffTcsFdlEvm
Definition: L1TGT.h:144
MonitorElement * gpsfreq
Definition: L1TGT.h:136
MonitorElement * algo_bits
Definition: L1TGT.h:109
MonitorElement * event_type
Definition: L1TGT.h:116
MonitorElement * m_monOrbitNrDiffTcsFdlEvmLs
Definition: L1TGT.h:155
MonitorElement * dbx_module
Definition: L1TGT.h:127
MonitorElement * tt_bits_corr
Definition: L1TGT.h:112
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:221
MonitorElement * gpsfreqlum
Definition: L1TGT.h:138
MonitorElement * h_L1AlgoBX2
Definition: L1TGT.h:159
MonitorElement * m_monL1PfIndicesPerLs
Definition: L1TGT.h:141
MonitorElement * trigger_number
Definition: L1TGT.h:120
std::vector< std::pair< int, int > > m_pairLsNumberPfIndex
Definition: L1TGT.h:182
MonitorElement * BST_beamMomentum
Definition: L1TGT.h:133
MonitorElement * BST_lhcFillNumber
Definition: L1TGT.h:131
MonitorElement * setupversion_lumi
Definition: L1TGT.h:124
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 * BST_turnCountNumber
Definition: L1TGT.h:130
MonitorElement * event_lumi
Definition: L1TGT.h:119
MonitorElement * tt_bits_lumi
Definition: L1TGT.h:115
MonitorElement * trigger_lumi
Definition: L1TGT.h:121
MonitorElement * evnum_trignum_lumi
Definition: L1TGT.h:122
MonitorElement * algo_tt_bits_corr
Definition: L1TGT.h:113
edm::ESGetToken< L1GtTriggerMenu, L1GtTriggerMenuRcd > l1gtTrigmenuToken_
Definition: L1TGT.h:99
MonitorElement * m_monOrbitNrDiffTcsFdlEvm
Definition: L1TGT.h:143
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)

◆ countPfsIndicesPerLs()

void L1TGT::countPfsIndicesPerLs ( )
private

Definition at line 728 of file L1TGT.cc.

References dqm::impl::MonitorElement::Fill(), m_monL1PfIndicesPerLs, m_pairLsNumberPfIndex, dqm::impl::MonitorElement::Reset(), jetUpdater_cfi::sort, and verbose_.

Referenced by endLuminosityBlock().

728  {
729  if (verbose_) {
730  edm::LogInfo("L1TGT") << "\n Prescale factor indices used in a LS " << std::endl;
731 
732  for (CItVecPair cIt = m_pairLsNumberPfIndex.begin(); cIt != m_pairLsNumberPfIndex.end(); ++cIt) {
733  edm::LogVerbatim("L1TGT") << " lsNumber = " << (*cIt).first << " pfIndex = " << (*cIt).second << std::endl;
734  }
735  edm::LogVerbatim("L1TGT") << std::endl;
736  }
737 
738  // reset the histogram...
740 
741  // sort the vector (for pairs: sort after first argument, then after the second argument)
743 
744  int previousLsNumber = -1;
745  int previousPfsIndex = -1;
746 
747  // count the number of pairs (lsNumber, pfIndex) per Ls
748  // there are no duplicate entries, and pairs are sorted after both members
749  // ... and fill again the histogram
750  int pfsIndicesPerLs = 1;
751  for (CItVecPair cIt = m_pairLsNumberPfIndex.begin(); cIt != m_pairLsNumberPfIndex.end(); ++cIt) {
752  if ((*cIt).first == previousLsNumber) {
753  if ((*cIt).second != previousPfsIndex) {
754  previousPfsIndex = (*cIt).second;
755  pfsIndicesPerLs++;
756  }
757 
758  } else {
759  // fill the histogram with the number of PF indices for the previous Ls
760  if (previousLsNumber != -1) {
761  m_monL1PfIndicesPerLs->Fill(pfsIndicesPerLs);
762  }
763 
764  // new Ls
765  previousLsNumber = (*cIt).first;
766  previousPfsIndex = (*cIt).second;
767  pfsIndicesPerLs = 1;
768  }
769  }
770 }
Log< level::Info, true > LogVerbatim
std::vector< std::pair< int, int > >::const_iterator CItVecPair
Definition: L1TGT.h:183
bool verbose_
verbosity switch
Definition: L1TGT.h:106
void Fill(long long x)
virtual void Reset()
Remove all data from the ME, keept the empty histogram with all its settings.
Log< level::Info, false > LogInfo
MonitorElement * m_monL1PfIndicesPerLs
Definition: L1TGT.h:141
std::vector< std::pair< int, int > > m_pairLsNumberPfIndex
Definition: L1TGT.h:182

◆ dqmBeginRun()

void L1TGT::dqmBeginRun ( const edm::Run iRrun,
const edm::EventSetup evSetup 
)
overrideprotectedvirtual

Reimplemented from DQMOneEDAnalyzer< edm::one::WatchLuminosityBlocks >.

Definition at line 328 of file L1TGT.cc.

References m_nrEvRun.

328 { m_nrEvRun = 0; }
int m_nrEvRun
Definition: L1TGT.h:169

◆ endLuminosityBlock()

void L1TGT::endLuminosityBlock ( const edm::LuminosityBlock iLumi,
const edm::EventSetup evSetup 
)
overrideprotected

Definition at line 715 of file L1TGT.cc.

References countPfsIndicesPerLs(), and m_runInEndLumi.

715  {
716  if (m_runInEndLumi) {
718  }
719 }
bool m_runInEndLumi
Definition: L1TGT.h:103
void countPfsIndicesPerLs()
Definition: L1TGT.cc:728

◆ isActive()

bool L1TGT::isActive ( int  word,
int  bit 
)
private

book all histograms for the module

Definition at line 722 of file L1TGT.cc.

References triggerObjects_cff::bit.

Referenced by analyze().

722  {
723  if (word & (1 << bit))
724  return true;
725  return false;
726 }
uint64_t word

Member Data Documentation

◆ algo_bits

MonitorElement* L1TGT::algo_bits
private

Definition at line 109 of file L1TGT.h.

Referenced by analyze(), and bookHistograms().

◆ algo_bits_corr

MonitorElement* L1TGT::algo_bits_corr
private

Definition at line 110 of file L1TGT.h.

Referenced by analyze(), and bookHistograms().

◆ algo_bits_lumi

MonitorElement* L1TGT::algo_bits_lumi
private

Definition at line 114 of file L1TGT.h.

Referenced by analyze(), and bookHistograms().

◆ algo_tt_bits_corr

MonitorElement* L1TGT::algo_tt_bits_corr
private

Definition at line 113 of file L1TGT.h.

Referenced by analyze(), and bookHistograms().

◆ algoBitToName

std::string L1TGT::algoBitToName[128]
private

Definition at line 177 of file L1TGT.h.

Referenced by analyze().

◆ BST_beamMode

MonitorElement* L1TGT::BST_beamMode
private

Definition at line 132 of file L1TGT.h.

Referenced by analyze(), and bookHistograms().

◆ BST_beamMomentum

MonitorElement* L1TGT::BST_beamMomentum
private

Definition at line 133 of file L1TGT.h.

Referenced by analyze(), and bookHistograms().

◆ BST_intensityBeam1

MonitorElement* L1TGT::BST_intensityBeam1
private

Definition at line 134 of file L1TGT.h.

Referenced by analyze(), and bookHistograms().

◆ BST_intensityBeam2

MonitorElement* L1TGT::BST_intensityBeam2
private

Definition at line 135 of file L1TGT.h.

Referenced by analyze(), and bookHistograms().

◆ BST_lhcFillNumber

MonitorElement* L1TGT::BST_lhcFillNumber
private

Definition at line 131 of file L1TGT.h.

Referenced by analyze(), and bookHistograms().

◆ BST_MasterStatus

MonitorElement* L1TGT::BST_MasterStatus
private

Definition at line 129 of file L1TGT.h.

Referenced by analyze(), and bookHistograms().

◆ BST_turnCountNumber

MonitorElement* L1TGT::BST_turnCountNumber
private

Definition at line 130 of file L1TGT.h.

Referenced by analyze(), and bookHistograms().

◆ dbx_module

MonitorElement* L1TGT::dbx_module
private

Definition at line 127 of file L1TGT.h.

Referenced by analyze(), and bookHistograms().

◆ event_lumi

MonitorElement* L1TGT::event_lumi
private

Definition at line 119 of file L1TGT.h.

Referenced by analyze(), and bookHistograms().

◆ event_number

MonitorElement* L1TGT::event_number
private

Definition at line 118 of file L1TGT.h.

Referenced by analyze(), and bookHistograms().

◆ event_type

MonitorElement* L1TGT::event_type
private

Definition at line 116 of file L1TGT.h.

Referenced by analyze(), and bookHistograms().

◆ evnum_trignum_lumi

MonitorElement* L1TGT::evnum_trignum_lumi
private

Definition at line 122 of file L1TGT.h.

Referenced by analyze(), and bookHistograms().

◆ gpsfreq

MonitorElement* L1TGT::gpsfreq
private

Definition at line 136 of file L1TGT.h.

Referenced by analyze(), and bookHistograms().

◆ gpsfreqlum

MonitorElement* L1TGT::gpsfreqlum
private

Definition at line 138 of file L1TGT.h.

Referenced by analyze(), and bookHistograms().

◆ gpsfreqwide

MonitorElement* L1TGT::gpsfreqwide
private

Definition at line 137 of file L1TGT.h.

Referenced by analyze(), and bookHistograms().

◆ gtEvmSource_

edm::EDGetTokenT<L1GlobalTriggerEvmReadoutRecord> L1TGT::gtEvmSource_
private

input tag for L1 GT EVM readout record

Definition at line 98 of file L1TGT.h.

Referenced by analyze().

◆ gtfe_bx

MonitorElement* L1TGT::gtfe_bx
private

Definition at line 126 of file L1TGT.h.

Referenced by analyze(), and bookHistograms().

◆ gtSource_L1GT_

edm::EDGetTokenT<L1GlobalTriggerReadoutRecord> L1TGT::gtSource_L1GT_
private

input parameters

input tag for L1 GT DAQ readout record

Definition at line 94 of file L1TGT.h.

Referenced by analyze().

◆ gtSource_L1MuGMT_

edm::EDGetTokenT<L1MuGMTReadoutCollection> L1TGT::gtSource_L1MuGMT_
private

Definition at line 95 of file L1TGT.h.

Referenced by analyze().

◆ h_L1AlgoBX1

MonitorElement* L1TGT::h_L1AlgoBX1
private

Definition at line 158 of file L1TGT.h.

Referenced by analyze(), and bookHistograms().

◆ h_L1AlgoBX2

MonitorElement* L1TGT::h_L1AlgoBX2
private

Definition at line 159 of file L1TGT.h.

Referenced by analyze(), and bookHistograms().

◆ h_L1AlgoBX3

MonitorElement* L1TGT::h_L1AlgoBX3
private

Definition at line 160 of file L1TGT.h.

Referenced by analyze(), and bookHistograms().

◆ h_L1AlgoBX4

MonitorElement* L1TGT::h_L1AlgoBX4
private

Definition at line 161 of file L1TGT.h.

Referenced by analyze(), and bookHistograms().

◆ h_L1TechBX

MonitorElement* L1TGT::h_L1TechBX
private

Definition at line 162 of file L1TGT.h.

Referenced by analyze(), and bookHistograms().

◆ l1gtTrigmenuToken_

edm::ESGetToken<L1GtTriggerMenu, L1GtTriggerMenuRcd> L1TGT::l1gtTrigmenuToken_
private

Definition at line 99 of file L1TGT.h.

Referenced by bookHistograms(), and L1TGT().

◆ l1TechTriggerDecision

std::map<std::string, bool> L1TGT::l1TechTriggerDecision
private

Definition at line 179 of file L1TGT.h.

Referenced by analyze().

◆ l1TriggerDecision

std::map<std::string, bool> L1TGT::l1TriggerDecision
private

Definition at line 179 of file L1TGT.h.

Referenced by analyze().

◆ m_histFolder

std::string L1TGT::m_histFolder
private

histogram folder for L1 GT plots

Definition at line 172 of file L1TGT.h.

Referenced by bookHistograms(), and L1TGT().

◆ m_monL1PfIndicesPerLs

MonitorElement* L1TGT::m_monL1PfIndicesPerLs
private

Definition at line 141 of file L1TGT.h.

Referenced by bookHistograms(), and countPfsIndicesPerLs().

◆ m_monL1PrescaleFactorSet

MonitorElement* L1TGT::m_monL1PrescaleFactorSet
private

Definition at line 140 of file L1TGT.h.

Referenced by analyze(), and bookHistograms().

◆ m_monLsNrDiffTcsFdlEvm

MonitorElement* L1TGT::m_monLsNrDiffTcsFdlEvm
private

Definition at line 144 of file L1TGT.h.

Referenced by analyze(), and bookHistograms().

◆ m_monLsNrDiffTcsFdlEvmLs

MonitorElement* L1TGT::m_monLsNrDiffTcsFdlEvmLs
private

Definition at line 156 of file L1TGT.h.

Referenced by analyze(), and bookHistograms().

◆ m_monOrbitNrDiffTcsFdlEvm

MonitorElement* L1TGT::m_monOrbitNrDiffTcsFdlEvm
private

Definition at line 143 of file L1TGT.h.

Referenced by analyze(), and bookHistograms().

◆ m_monOrbitNrDiffTcsFdlEvmLs

MonitorElement* L1TGT::m_monOrbitNrDiffTcsFdlEvmLs
private

Definition at line 155 of file L1TGT.h.

Referenced by analyze(), and bookHistograms().

◆ m_nrEvJob

int L1TGT::m_nrEvJob
private

number of events processed

Definition at line 168 of file L1TGT.h.

Referenced by analyze().

◆ m_nrEvRun

int L1TGT::m_nrEvRun
private

Definition at line 169 of file L1TGT.h.

Referenced by dqmBeginRun().

◆ m_pairLsNumberPfIndex

std::vector<std::pair<int, int> > L1TGT::m_pairLsNumberPfIndex
private

Definition at line 182 of file L1TGT.h.

Referenced by analyze(), bookHistograms(), and countPfsIndicesPerLs().

◆ m_runInEndLumi

bool L1TGT::m_runInEndLumi
private

Definition at line 103 of file L1TGT.h.

Referenced by endLuminosityBlock().

◆ m_runInEventLoop

bool L1TGT::m_runInEventLoop
private

switches to choose the running of various methods

Definition at line 102 of file L1TGT.h.

◆ MaxLsNrDiffTcsFdlEvm

const int L1TGT::MaxLsNrDiffTcsFdlEvm = 24
staticprivate

Definition at line 153 of file L1TGT.h.

Referenced by analyze(), and bookHistograms().

◆ MaxOrbitNrDiffTcsFdlEvm

const int L1TGT::MaxOrbitNrDiffTcsFdlEvm = 24
staticprivate

Definition at line 152 of file L1TGT.h.

Referenced by analyze(), and bookHistograms().

◆ orbit_lumi

MonitorElement* L1TGT::orbit_lumi
private

Definition at line 123 of file L1TGT.h.

Referenced by analyze(), and bookHistograms().

◆ preGps_

uint64_t L1TGT::preGps_
private

Definition at line 174 of file L1TGT.h.

Referenced by analyze().

◆ preOrb_

uint64_t L1TGT::preOrb_
private

Definition at line 175 of file L1TGT.h.

Referenced by analyze().

◆ setupversion_lumi

MonitorElement* L1TGT::setupversion_lumi
private

Definition at line 124 of file L1TGT.h.

Referenced by analyze(), and bookHistograms().

◆ techBitToName

std::string L1TGT::techBitToName[64]
private

Definition at line 178 of file L1TGT.h.

Referenced by analyze().

◆ trig_iter

std::map<std::string, bool>::iterator L1TGT::trig_iter
private

Definition at line 180 of file L1TGT.h.

Referenced by analyze().

◆ trigger_lumi

MonitorElement* L1TGT::trigger_lumi
private

Definition at line 121 of file L1TGT.h.

Referenced by analyze(), and bookHistograms().

◆ trigger_number

MonitorElement* L1TGT::trigger_number
private

Definition at line 120 of file L1TGT.h.

Referenced by analyze(), and bookHistograms().

◆ tt_bits

MonitorElement* L1TGT::tt_bits
private

Definition at line 111 of file L1TGT.h.

Referenced by analyze(), and bookHistograms().

◆ tt_bits_corr

MonitorElement* L1TGT::tt_bits_corr
private

Definition at line 112 of file L1TGT.h.

Referenced by analyze(), and bookHistograms().

◆ tt_bits_lumi

MonitorElement* L1TGT::tt_bits_lumi
private

Definition at line 115 of file L1TGT.h.

Referenced by analyze(), and bookHistograms().

◆ verbose_

bool L1TGT::verbose_
private

verbosity switch

Definition at line 106 of file L1TGT.h.

Referenced by analyze(), and countPfsIndicesPerLs().