CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Protected Member Functions | Private Attributes | Static Private Attributes
CTPPSCommonDQMSource Class Reference
Inheritance diagram for CTPPSCommonDQMSource:
DQMOneEDAnalyzer< edm::LuminosityBlockCache< std::vector< int > > > edm::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::Accumulator, Args... > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Classes

struct  ArmPlots
 plots related to one arm More...
 
struct  GlobalPlots
 plots related to the whole system More...
 

Public Member Functions

 CTPPSCommonDQMSource (const edm::ParameterSet &ps)
 
 ~CTPPSCommonDQMSource () override
 
- Public Member Functions inherited from DQMOneEDAnalyzer< edm::LuminosityBlockCache< std::vector< int > > >
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
 
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
 
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)
 

Protected Member Functions

void analyze (edm::Event const &e, edm::EventSetup const &eSetup) override
 
void analyzeCTPPSRecord (edm::Event const &event, edm::EventSetup const &eventSetup)
 
void analyzeProtons (edm::Event const &event, edm::EventSetup const &eventSetup)
 
void analyzeTracks (edm::Event const &event, edm::EventSetup const &eventSetup)
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
std::shared_ptr< std::vector< int > > globalBeginLuminosityBlock (const edm::LuminosityBlock &iLumi, const edm::EventSetup &c) const override
 
void globalEndLuminosityBlock (const edm::LuminosityBlock &iLumi, const edm::EventSetup &c) override
 
- Protected Member Functions inherited from DQMOneEDAnalyzer< edm::LuminosityBlockCache< std::vector< int > > >
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
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 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 ()
 
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 Attributes

std::map< unsigned int, ArmPlotsarmPlots
 
const edm::EDGetTokenT< CTPPSRecordctppsRecordToken
 
int currentLS
 
int endLS
 
GlobalPlots globalPlots
 
bool makeProtonRecoPlots_
 
bool perLSsaving_
 
std::vector< int > rpstate
 
const edm::EDGetTokenT< std::vector< CTPPSLocalTrackLite > > tokenLocalTrackLite
 
const edm::EDGetTokenT< std::vector< reco::ForwardProton > > tokenRecoProtons
 
const unsigned int verbosity
 

Static Private Attributes

static constexpr int MAX_LUMIS = 6000
 
static constexpr int MAX_VBINS = 18
 

Additional Inherited Members

- Public Types inherited from DQMOneEDAnalyzer< edm::LuminosityBlockCache< std::vector< int > > >
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::LuminosityBlockCache< std::vector< int > > >
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Definition at line 29 of file CTPPSCommonDQMSource.cc.

Constructor & Destructor Documentation

◆ CTPPSCommonDQMSource()

CTPPSCommonDQMSource::CTPPSCommonDQMSource ( const edm::ParameterSet ps)

Definition at line 297 of file CTPPSCommonDQMSource.cc.

References currentLS, endLS, and rpstate.

298  : verbosity(ps.getUntrackedParameter<unsigned int>("verbosity", 0)),
299  ctppsRecordToken(consumes<CTPPSRecord>(ps.getUntrackedParameter<edm::InputTag>("ctppsmetadata"))),
301  consumes<vector<CTPPSLocalTrackLite>>(ps.getUntrackedParameter<edm::InputTag>("tagLocalTrackLite"))),
303  consumes<std::vector<reco::ForwardProton>>(ps.getUntrackedParameter<InputTag>("tagRecoProtons"))),
304  makeProtonRecoPlots_(ps.getParameter<bool>("makeProtonRecoPlots")),
305  perLSsaving_(ps.getUntrackedParameter<bool>("perLSsaving", false)) {
306  currentLS = 0;
307  endLS = 0;
308  rpstate.clear();
309 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
const unsigned int verbosity
std::vector< int > rpstate
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getUntrackedParameter(std::string const &, T const &) const
const edm::EDGetTokenT< std::vector< reco::ForwardProton > > tokenRecoProtons
const edm::EDGetTokenT< std::vector< CTPPSLocalTrackLite > > tokenLocalTrackLite
const edm::EDGetTokenT< CTPPSRecord > ctppsRecordToken

◆ ~CTPPSCommonDQMSource()

CTPPSCommonDQMSource::~CTPPSCommonDQMSource ( )
override

Definition at line 313 of file CTPPSCommonDQMSource.cc.

313 {}

Member Function Documentation

◆ analyze()

void CTPPSCommonDQMSource::analyze ( edm::Event const &  e,
edm::EventSetup const &  eSetup 
)
overrideprotectedvirtual

Reimplemented from DQMOneEDAnalyzer< edm::LuminosityBlockCache< std::vector< int > > >.

Definition at line 329 of file CTPPSCommonDQMSource.cc.

References analyzeCTPPSRecord(), analyzeProtons(), analyzeTracks(), options_cfi::eventSetup, and makeProtonRecoPlots_.

329  {
332 
335 }
void analyzeTracks(edm::Event const &event, edm::EventSetup const &eventSetup)
void analyzeProtons(edm::Event const &event, edm::EventSetup const &eventSetup)
void analyzeCTPPSRecord(edm::Event const &event, edm::EventSetup const &eventSetup)
Definition: event.py:1

◆ analyzeCTPPSRecord()

void CTPPSCommonDQMSource::analyzeCTPPSRecord ( edm::Event const &  event,
edm::EventSetup const &  eventSetup 
)
protected

Definition at line 339 of file CTPPSCommonDQMSource.cc.

References ctppsRecordToken, mps_fire::i, edm::HandleBase::isValid(), rpstate, CTPPSRecord::status(), and verbosity.

Referenced by analyze().

339  {
340  Handle<CTPPSRecord> hCTPPSRecord;
341  event.getByToken(ctppsRecordToken, hCTPPSRecord);
342 
343  if (!hCTPPSRecord.isValid()) {
344  if (verbosity)
345  LogProblem("CTPPSCommonDQMSource") << "ERROR in CTPPSCommonDQMSource::analyzeCTPPSRecord > input not available.";
346 
347  return;
348  }
349 
350  auto &rpstate = *luminosityBlockCache(event.getLuminosityBlock().index());
351  if (rpstate.empty()) {
352  rpstate.reserve(CTPPSRecord::RomanPot::Last);
353  for (uint8_t i = 0; i < CTPPSRecord::RomanPot::Last; ++i)
354  rpstate.push_back(hCTPPSRecord->status(i));
355  }
356 }
const unsigned int verbosity
std::vector< int > rpstate
bool isValid() const
Definition: HandleBase.h:70
const edm::EDGetTokenT< CTPPSRecord > ctppsRecordToken
Status status(const uint8_t rp) const
Return the status of the given roman pot.
Definition: CTPPSRecord.h:61
Definition: event.py:1
Log< level::Error, true > LogProblem

◆ analyzeProtons()

void CTPPSCommonDQMSource::analyzeProtons ( edm::Event const &  event,
edm::EventSetup const &  eventSetup 
)
protected

Definition at line 519 of file CTPPSCommonDQMSource.cc.

References armPlots, edm::HandleBase::isValid(), AlCaHLTBitMon_ParallelJobs::p, HLTObjectsMonitor_cfi::plots, reco::ForwardProton::sector45, reco::ForwardProton::sector56, tokenRecoProtons, and verbosity.

Referenced by analyze().

519  {
520  // get event data
522  event.getByToken(tokenRecoProtons, hRecoProtons);
523 
524  // check validity
525  if (!hRecoProtons.isValid()) {
526  if (verbosity)
527  LogProblem("CTPPSCommonDQMSource") << "ERROR in CTPPSCommonDQMSource::analyzeProtons > input not available.";
528 
529  return;
530  }
531 
532  // loop over protons
533  for (auto &p : *hRecoProtons) {
534  if (!p.validFit())
535  continue;
536 
537  signed int armIndex = -1;
538  if (p.lhcSector() == reco::ForwardProton::LHCSector::sector45)
539  armIndex = 0;
540  if (p.lhcSector() == reco::ForwardProton::LHCSector::sector56)
541  armIndex = 1;
542  if (armIndex < 0)
543  continue;
544 
545  auto &plots = armPlots[armIndex];
546 
547  plots.h_proton_xi->Fill(p.xi());
548  plots.h_proton_th_x->Fill(p.thetaX());
549  plots.h_proton_th_y->Fill(p.thetaY());
550  plots.h_proton_t->Fill(fabs(p.t()));
551  plots.h_proton_time->Fill(p.time());
552  }
553 }
const unsigned int verbosity
std::map< unsigned int, ArmPlots > armPlots
const edm::EDGetTokenT< std::vector< reco::ForwardProton > > tokenRecoProtons
bool isValid() const
Definition: HandleBase.h:70
Log< level::Error, true > LogProblem

◆ analyzeTracks()

void CTPPSCommonDQMSource::analyzeTracks ( edm::Event const &  event,
edm::EventSetup const &  eventSetup 
)
protected

Definition at line 360 of file CTPPSCommonDQMSource.cc.

References protons_cff::arm, armPlots, CTPPSCommonDQMSource::GlobalPlots::events_per_bx, CTPPSCommonDQMSource::GlobalPlots::events_per_bx_short, dqm::impl::MonitorElement::Fill(), globalPlots, CTPPSCommonDQMSource::GlobalPlots::h_trackCorr_hor, CTPPSCommonDQMSource::GlobalPlots::h_trackCorr_vert, heavyIonCSV_trainingSettings::idx, edm::HandleBase::isValid(), TtSemiLepHitFitProducer_Electrons_cfi::mTop, AlCaHLTBitMon_ParallelJobs::p, HLTObjectsMonitor_cfi::plots, CTPPSDetId::rp(), tokenLocalTrackLite, and verbosity.

Referenced by analyze().

360  {
361  // get event data
363  event.getByToken(tokenLocalTrackLite, hTracks);
364 
365  // check validity
366  if (!hTracks.isValid()) {
367  if (verbosity)
368  LogProblem("CTPPSCommonDQMSource") << "ERROR in CTPPSCommonDQMSource::analyzeTracks > input not available.";
369 
370  return;
371  }
372 
373  //------------------------------
374  // collect indeces of RP with tracks, for each correlation plot
375  set<signed int> s_rp_idx_global_hor, s_rp_idx_global_vert;
376  map<unsigned int, set<signed int>> ms_rp_idx_arm;
377 
378  for (auto &tr : *hTracks) {
379  const CTPPSDetId rpId(tr.rpId());
380  const unsigned int arm = rpId.arm();
381  const unsigned int stNum = rpId.station();
382  const unsigned int rpNum = rpId.rp();
383  const unsigned int stRPNum = stNum * 10 + rpNum;
384 
385  {
386  signed int idx = -1;
387  if (stRPNum == 3)
388  idx = 0;
389  if (stRPNum == 22)
390  idx = 1;
391  if (stRPNum == 16)
392  idx = 2;
393  if (stRPNum == 23)
394  idx = 3;
395 
396  if (idx >= 0)
397  s_rp_idx_global_hor.insert(4 * arm + idx);
398  }
399 
400  {
401  signed int idx = -1;
402  if (stRPNum == 4)
403  idx = 0;
404  if (stRPNum == 5)
405  idx = 1;
406  if (stRPNum == 24)
407  idx = 2;
408  if (stRPNum == 25)
409  idx = 3;
410 
411  if (idx >= 0)
412  s_rp_idx_global_vert.insert(4 * arm + idx);
413  }
414 
415  {
416  signed int idx = -1;
417  if (stRPNum == 3)
418  idx = 0;
419  if (stRPNum == 4)
420  idx = 1;
421  if (stRPNum == 5)
422  idx = 2;
423  if (stRPNum == 22)
424  idx = 3;
425  if (stRPNum == 16)
426  idx = 4;
427  if (stRPNum == 23)
428  idx = 5;
429  if (stRPNum == 24)
430  idx = 6;
431  if (stRPNum == 25)
432  idx = 7;
433 
434  const signed int hor = ((rpNum == 2) || (rpNum == 3) || (rpNum == 6)) ? 1 : 0;
435 
436  if (idx >= 0)
437  ms_rp_idx_arm[arm].insert(idx * 10 + hor);
438  }
439  }
440 
441  //------------------------------
442  // Global Plots
443 
444  globalPlots.events_per_bx->Fill(event.bunchCrossing());
445  globalPlots.events_per_bx_short->Fill(event.bunchCrossing());
446 
447  for (const auto &idx1 : s_rp_idx_global_hor)
448  for (const auto &idx2 : s_rp_idx_global_hor)
449  globalPlots.h_trackCorr_hor->Fill(idx1, idx2);
450 
451  for (const auto &idx1 : s_rp_idx_global_vert)
452  for (const auto &idx2 : s_rp_idx_global_vert)
453  globalPlots.h_trackCorr_vert->Fill(idx1, idx2);
454 
455  //------------------------------
456  // Arm Plots
457 
458  map<unsigned int, set<unsigned int>> mTop, mHor, mBot;
459 
460  for (auto &tr : *hTracks) {
461  CTPPSDetId rpId(tr.rpId());
462  const unsigned int rpNum = rpId.rp();
463  const unsigned int armIdx = rpId.arm();
464 
465  if (rpNum == 0 || rpNum == 4)
466  mTop[armIdx].insert(rpId);
467  if (rpNum == 2 || rpNum == 3 || rpNum == 6)
468  mHor[armIdx].insert(rpId);
469  if (rpNum == 1 || rpNum == 5)
470  mBot[armIdx].insert(rpId);
471 
472  auto &ap = armPlots[rpId.arm()];
473  unsigned int rpDecId = rpId.arm() * 100 + rpId.station() * 10 + rpId.rp();
474 
475  // fill in reference tracking-RP plots
476  {
477  auto it = ap.trackingRPPlots.find(rpDecId);
478  if (it != ap.trackingRPPlots.end()) {
479  it->second.h_x->Fill(tr.x());
480  it->second.h_y->Fill(tr.y());
481  }
482  }
483 
484  // fill in reference timing-RP plots
485  {
486  auto it = ap.timingRPPlots.find(rpDecId);
487  if (it != ap.timingRPPlots.end()) {
488  it->second.h_x->Fill(tr.x());
489  it->second.h_time->Fill(tr.time());
490  }
491  }
492  }
493 
494  for (auto &p : armPlots) {
495  p.second.h_numRPWithTrack_top->Fill(mTop[p.first].size());
496  p.second.h_numRPWithTrack_hor->Fill(mHor[p.first].size());
497  p.second.h_numRPWithTrack_bot->Fill(mBot[p.first].size());
498  }
499 
500  //------------------------------
501  // Correlation plots
502 
503  for (const auto &ap : ms_rp_idx_arm) {
504  auto &plots = armPlots[ap.first];
505 
506  for (const auto &idx1 : ap.second) {
507  for (const auto &idx2 : ap.second) {
508  plots.h_trackCorr->Fill(idx1 / 10, idx2 / 10);
509 
510  if ((idx1 % 10) != (idx2 % 10))
511  plots.h_trackCorr_overlap->Fill(idx1 / 10, idx2 / 10);
512  }
513  }
514  }
515 }
const unsigned int verbosity
std::map< unsigned int, ArmPlots > armPlots
void Fill(long long x)
uint32_t rp() const
Definition: CTPPSDetId.h:71
bool isValid() const
Definition: HandleBase.h:70
Base class for CTPPS detector IDs.
Definition: CTPPSDetId.h:32
const edm::EDGetTokenT< std::vector< CTPPSLocalTrackLite > > tokenLocalTrackLite
Definition: event.py:1
Log< level::Error, true > LogProblem

◆ bookHistograms()

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

Implements DQMOneEDAnalyzer< edm::LuminosityBlockCache< std::vector< int > > >.

Definition at line 317 of file CTPPSCommonDQMSource.cc.

References protons_cff::arm, armPlots, globalPlots, CTPPSCommonDQMSource::GlobalPlots::Init(), and makeProtonRecoPlots_.

317  {
318  // global plots
319  globalPlots.Init(ibooker);
320 
321  // loop over arms
322  for (unsigned int arm = 0; arm < 2; arm++) {
323  armPlots[arm] = ArmPlots(ibooker, arm, makeProtonRecoPlots_);
324  }
325 }
std::map< unsigned int, ArmPlots > armPlots
void Init(DQMStore::IBooker &ibooker)

◆ globalBeginLuminosityBlock()

std::shared_ptr< std::vector< int > > CTPPSCommonDQMSource::globalBeginLuminosityBlock ( const edm::LuminosityBlock iLumi,
const edm::EventSetup c 
) const
overrideprotected

Definition at line 557 of file CTPPSCommonDQMSource.cc.

558  {
559  return std::make_shared<std::vector<int>>();
560 }

◆ globalEndLuminosityBlock()

void CTPPSCommonDQMSource::globalEndLuminosityBlock ( const edm::LuminosityBlock iLumi,
const edm::EventSetup c 
)
overrideprotected

Definition at line 564 of file CTPPSCommonDQMSource.cc.

References currentLS, globalPlots, mps_fire::i, edm::LuminosityBlockBase::id(), edm::LuminosityBlock::index(), edm::LuminosityBlockID::luminosityBlock(), perLSsaving_, rpstate, CTPPSCommonDQMSource::GlobalPlots::RPState, and dqm::impl::MonitorElement::setBinContent().

564  {
565  auto const &rpstate = *luminosityBlockCache(iLumi.index());
566  auto currentLS = iLumi.id().luminosityBlock();
567  if (!perLSsaving_) {
568  for (std::vector<int>::size_type i = 0; i < rpstate.size(); i++)
570  }
571 }
LuminosityBlockNumber_t luminosityBlock() const
uint16_t size_type
std::vector< int > rpstate
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
LuminosityBlockID id() const
LuminosityBlockIndex index() const

Member Data Documentation

◆ armPlots

std::map<unsigned int, ArmPlots> CTPPSCommonDQMSource::armPlots
private

Definition at line 100 of file CTPPSCommonDQMSource.cc.

Referenced by analyzeProtons(), analyzeTracks(), and bookHistograms().

◆ ctppsRecordToken

const edm::EDGetTokenT<CTPPSRecord> CTPPSCommonDQMSource::ctppsRecordToken
private

Definition at line 50 of file CTPPSCommonDQMSource.cc.

Referenced by analyzeCTPPSRecord().

◆ currentLS

int CTPPSCommonDQMSource::currentLS
private

Definition at line 57 of file CTPPSCommonDQMSource.cc.

Referenced by CTPPSCommonDQMSource(), and globalEndLuminosityBlock().

◆ endLS

int CTPPSCommonDQMSource::endLS
private

Definition at line 58 of file CTPPSCommonDQMSource.cc.

Referenced by CTPPSCommonDQMSource().

◆ globalPlots

GlobalPlots CTPPSCommonDQMSource::globalPlots
private

Definition at line 71 of file CTPPSCommonDQMSource.cc.

Referenced by analyzeTracks(), bookHistograms(), and globalEndLuminosityBlock().

◆ makeProtonRecoPlots_

bool CTPPSCommonDQMSource::makeProtonRecoPlots_
private

Definition at line 54 of file CTPPSCommonDQMSource.cc.

Referenced by analyze(), and bookHistograms().

◆ MAX_LUMIS

const int CTPPSCommonDQMSource::MAX_LUMIS = 6000
staticprivate

Definition at line 47 of file CTPPSCommonDQMSource.cc.

◆ MAX_VBINS

const int CTPPSCommonDQMSource::MAX_VBINS = 18
staticprivate

Definition at line 48 of file CTPPSCommonDQMSource.cc.

◆ perLSsaving_

bool CTPPSCommonDQMSource::perLSsaving_
private

Definition at line 55 of file CTPPSCommonDQMSource.cc.

Referenced by globalEndLuminosityBlock().

◆ rpstate

std::vector<int> CTPPSCommonDQMSource::rpstate
private

◆ tokenLocalTrackLite

const edm::EDGetTokenT<std::vector<CTPPSLocalTrackLite> > CTPPSCommonDQMSource::tokenLocalTrackLite
private

Definition at line 51 of file CTPPSCommonDQMSource.cc.

Referenced by analyzeTracks().

◆ tokenRecoProtons

const edm::EDGetTokenT<std::vector<reco::ForwardProton> > CTPPSCommonDQMSource::tokenRecoProtons
private

Definition at line 52 of file CTPPSCommonDQMSource.cc.

Referenced by analyzeProtons().

◆ verbosity

const unsigned int CTPPSCommonDQMSource::verbosity
private

Definition at line 46 of file CTPPSCommonDQMSource.cc.

Referenced by analyzeCTPPSRecord(), analyzeProtons(), and analyzeTracks().