CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
TriggerBxVsOrbitMonitor Class Reference
Inheritance diagram for TriggerBxVsOrbitMonitor:
DQMGlobalEDAnalyzer< RunBasedHistograms > DQMGlobalEDAnalyzerBase< RunBasedHistograms, Args... > edm::global::EDProducer< edm::RunCache< RunBasedHistograms >, edm::EndRunProducer, edm::Accumulator, Args... > edm::global::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 TriggerBxVsOrbitMonitor (edm::ParameterSet const &)
 
 ~TriggerBxVsOrbitMonitor () override=default
 
- Public Member Functions inherited from DQMGlobalEDAnalyzer< RunBasedHistograms >
virtual void dqmEndRun (edm::Run const &, edm::EventSetup const &, RunBasedHistograms const &) const
 
void globalEndRunProduce (edm::Run &run, edm::EventSetup const &setup) const final
 
- Public Member Functions inherited from DQMGlobalEDAnalyzerBase< RunBasedHistograms, Args... >
void accumulate (edm::StreamID id, edm::Event const &event, edm::EventSetup const &setup) const final
 
 DQMGlobalEDAnalyzerBase ()
 
std::shared_ptr< RunBasedHistograms > globalBeginRun (edm::Run const &run, edm::EventSetup const &setup) const final
 
void globalEndRun (edm::Run const &, edm::EventSetup const &) const final
 
- Public Member Functions inherited from edm::global::EDProducer< edm::RunCache< RunBasedHistograms >, edm::EndRunProducer, edm::Accumulator, Args... >
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
EDProduceroperator= (const EDProducer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
bool wantsStreamLuminosityBlocks () const final
 
bool wantsStreamRuns () const final
 
- Public Member Functions inherited from edm::global::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () 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
 
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 &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
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::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::global::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Private Member Functions

void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &, RunBasedHistograms &) const override
 
void dqmAnalyze (edm::Event const &, edm::EventSetup const &, RunBasedHistograms const &) const override
 
void dqmBeginRun (edm::Run const &, edm::EventSetup const &, RunBasedHistograms &) const override
 

Private Attributes

const std::string m_dqm_path
 
const edm::EDGetTokenT< edm::TriggerResultsm_hlt_results
 
const edm::EDGetTokenT< GlobalAlgBlkBxCollectionm_l1t_results
 
const int m_maxBX
 
const int m_maxLS
 
const int m_minBX
 
const int m_minLS
 

Static Private Attributes

static const unsigned int s_bx_range = 3564
 
static const unsigned int s_orbit_range = 262144
 
static constexpr const char *const s_tcds_trigger_types []
 

Additional Inherited Members

- Public Types inherited from DQMGlobalEDAnalyzerBase< RunBasedHistograms, Args... >
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::global::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
 
- Protected Member Functions inherited from DQMGlobalEDAnalyzerBase< RunBasedHistograms, Args... >
uint64_t meId (edm::Run const &run) const
 
- Protected Member Functions inherited from edm::ProducerBase
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 declare what type of product will make and with which optional label More...
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
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)
 
template<Transition B>
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 (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
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<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
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...
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
- Protected Attributes inherited from DQMGlobalEDAnalyzerBase< RunBasedHistograms, Args... >
DQMStoredqmstore_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Definition at line 39 of file TriggerBxVsOrbitMonitor.cc.

Constructor & Destructor Documentation

◆ TriggerBxVsOrbitMonitor()

TriggerBxVsOrbitMonitor::TriggerBxVsOrbitMonitor ( edm::ParameterSet const &  config)
explicit

Definition at line 101 of file TriggerBxVsOrbitMonitor.cc.

102  : // module configuration
103  m_l1t_results(consumes<GlobalAlgBlkBxCollection>(config.getUntrackedParameter<edm::InputTag>("l1tResults"))),
104  m_hlt_results(consumes<edm::TriggerResults>(config.getUntrackedParameter<edm::InputTag>("hltResults"))),
105  m_dqm_path(config.getUntrackedParameter<std::string>("dqmPath")),
106  m_minLS(config.getUntrackedParameter<int>("minLS")),
107  m_maxLS(config.getUntrackedParameter<int>("maxLS")),
108  m_minBX(config.getUntrackedParameter<int>("minBX")),
109  m_maxBX(config.getUntrackedParameter<int>("maxBX")) {}

◆ ~TriggerBxVsOrbitMonitor()

TriggerBxVsOrbitMonitor::~TriggerBxVsOrbitMonitor ( )
overridedefault

Member Function Documentation

◆ bookHistograms()

void TriggerBxVsOrbitMonitor::bookHistograms ( DQMStore::IBooker booker,
edm::Run const &  run,
edm::EventSetup const &  setup,
RunBasedHistograms &  histograms 
) const
overrideprivatevirtual

Implements DQMGlobalEDAnalyzerBase< RunBasedHistograms, Args... >.

Definition at line 123 of file TriggerBxVsOrbitMonitor.cc.

126  {
127  // TCDS trigger type plots
129  size_t nLS = m_maxLS - m_minLS + 1;
130  size_t nBX = m_maxBX - m_minBX + 1;
131 
132  // book 2D histogram to monitor all TCDS trigger types in a single plot
133  booker.setCurrentFolder(m_dqm_path + "/orbitVsBX");
134  histograms.orbit_bx_all = booker.book2D("OrbitVsBX",
135  "Event orbits vs. bunch crossing",
136  nBX,
137  m_minBX - 0.5,
138  m_maxBX + 0.5,
139  s_orbit_range + 1,
140  -0.5,
141  s_orbit_range + 0.5);
142  histograms.orbit_bx_all->setXTitle("BX");
143  histograms.orbit_bx_all->setYTitle("orbit");
144 
145  for (unsigned int i = 0; i < nLS; ++i) {
146  std::string iname = std::to_string(i);
147  histograms.orbit_bx_all_byLS[i] = booker.book2D("OrbitVsBX_LS" + iname,
148  "Event orbits vs. bunch crossing, for lumisection " + iname,
149  nBX,
150  m_minBX - 0.5,
151  m_maxBX + 0.5,
152  s_orbit_range + 1,
153  -0.5,
154  s_orbit_range + 0.5);
155  histograms.orbit_bx_all_byLS[i]->setXTitle("BX");
156  histograms.orbit_bx_all_byLS[i]->setYTitle("orbit");
157  }
158 
159  booker.setCurrentFolder(m_dqm_path + "/orbitVsBX/TCDS");
160  for (unsigned int i = 0; i < size; ++i) {
161  if (s_tcds_trigger_types[i]) {
162  histograms.orbit_bx[i] = booker.book2D("OrbitVsBX_" + std::string(s_tcds_trigger_types[i]),
163  "Event orbits vs. bunch crossing " + std::string(s_tcds_trigger_types[i]),
164  nBX,
165  m_minBX - 0.5,
166  m_maxBX + 0.5,
167  s_orbit_range + 1,
168  -0.5,
169  s_orbit_range + 0.5);
170  histograms.orbit_bx[i]->setXTitle("BX");
171  histograms.orbit_bx[i]->setYTitle("orbit");
172  }
173  }
174 }

References dqm::implementation::IBooker::book2D(), mps_fire::i, m_dqm_path, m_maxBX, m_maxLS, m_minBX, m_minLS, s_orbit_range, s_tcds_trigger_types, dqm::implementation::NavigatorBase::setCurrentFolder(), findQualityFiles::size, and AlCaHLTBitMon_QueryRunRegistry::string.

◆ dqmAnalyze()

void TriggerBxVsOrbitMonitor::dqmAnalyze ( edm::Event const &  event,
edm::EventSetup const &  setup,
RunBasedHistograms const &  histograms 
) const
overrideprivatevirtual

Implements DQMGlobalEDAnalyzerBase< RunBasedHistograms, Args... >.

Definition at line 176 of file TriggerBxVsOrbitMonitor.cc.

178  {
179  unsigned int type = event.experimentType();
180  unsigned int ls = event.id().luminosityBlock();
181  unsigned int orbit = event.orbitNumber() % s_orbit_range;
182  unsigned int bx = event.bunchCrossing();
183  histograms.orbit_bx_all->Fill(bx, orbit);
184 
185  int iLS = ls - m_minLS;
186  if (iLS >= 0 and iLS < int(histograms.orbit_bx_all_byLS.size()))
187  histograms.orbit_bx_all_byLS[iLS]->Fill(bx, orbit);
188 
189  // monitor the bx distribution for the TCDS trigger types
191  if (type < size and histograms.orbit_bx[type]) {
192  histograms.orbit_bx[type]->Fill(bx, orbit);
193  }
194 }

References l1GtPatternGenerator_cfi::bx, eostools::ls(), m_minLS, s_orbit_range, s_tcds_trigger_types, and findQualityFiles::size.

◆ dqmBeginRun()

void TriggerBxVsOrbitMonitor::dqmBeginRun ( edm::Run const &  run,
edm::EventSetup const &  setup,
RunBasedHistograms &  histograms 
) const
overrideprivatevirtual

Reimplemented from DQMGlobalEDAnalyzerBase< RunBasedHistograms, Args... >.

Definition at line 111 of file TriggerBxVsOrbitMonitor.cc.

113  {
114  size_t nLS = m_maxLS - m_minLS + 1;
115 
116  histograms.orbit_bx_all_byLS.clear();
117  histograms.orbit_bx_all_byLS.resize(nLS);
118 
119  histograms.orbit_bx.clear();
120  histograms.orbit_bx.resize(std::size(s_tcds_trigger_types));
121 }

References m_maxLS, m_minLS, s_tcds_trigger_types, and findQualityFiles::size.

◆ fillDescriptions()

void TriggerBxVsOrbitMonitor::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 89 of file TriggerBxVsOrbitMonitor.cc.

89  {
91  desc.addUntracked<edm::InputTag>("l1tResults", edm::InputTag("gtStage2Digis"));
92  desc.addUntracked<edm::InputTag>("hltResults", edm::InputTag("TriggerResults"));
93  desc.addUntracked<std::string>("dqmPath", "HLT/TriggerBx");
94  desc.addUntracked<int>("minLS", 134);
95  desc.addUntracked<int>("maxLS", 136);
96  desc.addUntracked<int>("minBX", 894);
97  desc.addUntracked<int>("maxBX", 912);
98  descriptions.add("triggerBxVsOrbitMonitor", desc);
99 }

References edm::ConfigurationDescriptions::add(), submitPVResolutionJobs::desc, HLT_FULL_cff::InputTag, and AlCaHLTBitMon_QueryRunRegistry::string.

Member Data Documentation

◆ m_dqm_path

const std::string TriggerBxVsOrbitMonitor::m_dqm_path
private

Definition at line 79 of file TriggerBxVsOrbitMonitor.cc.

Referenced by bookHistograms().

◆ m_hlt_results

const edm::EDGetTokenT<edm::TriggerResults> TriggerBxVsOrbitMonitor::m_hlt_results
private

Definition at line 78 of file TriggerBxVsOrbitMonitor.cc.

◆ m_l1t_results

const edm::EDGetTokenT<GlobalAlgBlkBxCollection> TriggerBxVsOrbitMonitor::m_l1t_results
private

Definition at line 77 of file TriggerBxVsOrbitMonitor.cc.

◆ m_maxBX

const int TriggerBxVsOrbitMonitor::m_maxBX
private

Definition at line 83 of file TriggerBxVsOrbitMonitor.cc.

Referenced by bookHistograms().

◆ m_maxLS

const int TriggerBxVsOrbitMonitor::m_maxLS
private

Definition at line 81 of file TriggerBxVsOrbitMonitor.cc.

Referenced by bookHistograms(), and dqmBeginRun().

◆ m_minBX

const int TriggerBxVsOrbitMonitor::m_minBX
private

Definition at line 82 of file TriggerBxVsOrbitMonitor.cc.

Referenced by bookHistograms().

◆ m_minLS

const int TriggerBxVsOrbitMonitor::m_minLS
private

Definition at line 80 of file TriggerBxVsOrbitMonitor.cc.

Referenced by bookHistograms(), dqmAnalyze(), and dqmBeginRun().

◆ s_bx_range

const unsigned int TriggerBxVsOrbitMonitor::s_bx_range = 3564
staticprivate

Definition at line 52 of file TriggerBxVsOrbitMonitor.cc.

◆ s_orbit_range

const unsigned int TriggerBxVsOrbitMonitor::s_orbit_range = 262144
staticprivate

Definition at line 53 of file TriggerBxVsOrbitMonitor.cc.

Referenced by bookHistograms(), and dqmAnalyze().

◆ s_tcds_trigger_types

constexpr const char *const TriggerBxVsOrbitMonitor::s_tcds_trigger_types
staticconstexprprivate
Initial value:
= {
"Empty",
"Physics",
"Calibration",
"Random",
"Auxiliary",
nullptr,
nullptr,
nullptr,
"Cyclic",
"Bunch-pattern",
"Software",
"TTS",
nullptr,
nullptr,
nullptr,
nullptr
}

Definition at line 57 of file TriggerBxVsOrbitMonitor.cc.

Referenced by bookHistograms(), dqmAnalyze(), and dqmBeginRun().

TriggerBxVsOrbitMonitor::m_dqm_path
const std::string m_dqm_path
Definition: TriggerBxVsOrbitMonitor.cc:79
eostools.ls
def ls(path, rec=False)
Definition: eostools.py:349
mps_fire.i
i
Definition: mps_fire.py:428
TriggerBxVsOrbitMonitor::m_minBX
const int m_minBX
Definition: TriggerBxVsOrbitMonitor.cc:82
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89353
l1GtPatternGenerator_cfi.bx
bx
Definition: l1GtPatternGenerator_cfi.py:18
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
config
Definition: config.py:1
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
type
type
Definition: SiPixelVCal_PayloadInspector.cc:37
gainCalibHelper::gainCalibPI::type
type
Definition: SiPixelGainCalibHelper.h:39
TriggerBxVsOrbitMonitor::s_tcds_trigger_types
static constexpr const char *const s_tcds_trigger_types[]
Definition: TriggerBxVsOrbitMonitor.cc:57
histograms
Definition: histograms.py:1
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
TriggerBxVsOrbitMonitor::m_maxLS
const int m_maxLS
Definition: TriggerBxVsOrbitMonitor.cc:81
dqm::implementation::IBooker::book2D
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
TriggerBxVsOrbitMonitor::m_l1t_results
const edm::EDGetTokenT< GlobalAlgBlkBxCollection > m_l1t_results
Definition: TriggerBxVsOrbitMonitor.cc:77
TriggerBxVsOrbitMonitor::m_minLS
const int m_minLS
Definition: TriggerBxVsOrbitMonitor.cc:80
TriggerBxVsOrbitMonitor::m_maxBX
const int m_maxBX
Definition: TriggerBxVsOrbitMonitor.cc:83
TriggerBxVsOrbitMonitor::s_orbit_range
static const unsigned int s_orbit_range
Definition: TriggerBxVsOrbitMonitor.cc:53
TriggerBxVsOrbitMonitor::m_hlt_results
const edm::EDGetTokenT< edm::TriggerResults > m_hlt_results
Definition: TriggerBxVsOrbitMonitor.cc:78
edm::InputTag
Definition: InputTag.h:15
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443