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
 
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 (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 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 = 20
 

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 28 of file CTPPSCommonDQMSource.cc.

Constructor & Destructor Documentation

◆ CTPPSCommonDQMSource()

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

Definition at line 298 of file CTPPSCommonDQMSource.cc.

References currentLS, endLS, and rpstate.

299  : verbosity(ps.getUntrackedParameter<unsigned int>("verbosity", 0)),
300  ctppsRecordToken(consumes<CTPPSRecord>(ps.getUntrackedParameter<edm::InputTag>("ctppsmetadata"))),
302  consumes<vector<CTPPSLocalTrackLite>>(ps.getUntrackedParameter<edm::InputTag>("tagLocalTrackLite"))),
304  consumes<std::vector<reco::ForwardProton>>(ps.getUntrackedParameter<InputTag>("tagRecoProtons"))),
305  makeProtonRecoPlots_(ps.getParameter<bool>("makeProtonRecoPlots")),
306  perLSsaving_(ps.getUntrackedParameter<bool>("perLSsaving", false)) {
307  currentLS = 0;
308  endLS = 0;
309  rpstate.clear();
310 }
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 314 of file CTPPSCommonDQMSource.cc.

314 {}

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 330 of file CTPPSCommonDQMSource.cc.

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

330  {
333 
336 }
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 340 of file CTPPSCommonDQMSource.cc.

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

Referenced by analyze().

340  {
341  Handle<CTPPSRecord> hCTPPSRecord;
342  event.getByToken(ctppsRecordToken, hCTPPSRecord);
343 
344  if (!hCTPPSRecord.isValid()) {
345  if (verbosity)
346  LogProblem("CTPPSCommonDQMSource") << "ERROR in CTPPSCommonDQMSource::analyzeCTPPSRecord > input not available.";
347 
348  return;
349  }
350 
351  auto &rpstate = *luminosityBlockCache(event.getLuminosityBlock().index());
352  if (rpstate.empty()) {
353  rpstate.reserve(CTPPSRecord::RomanPot::Last);
354  for (uint8_t i = 0; i < CTPPSRecord::RomanPot::Last; ++i)
355  rpstate.push_back(hCTPPSRecord->status(i));
356  }
357 }
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:63
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 520 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().

520  {
521  // get event data
523  event.getByToken(tokenRecoProtons, hRecoProtons);
524 
525  // check validity
526  if (!hRecoProtons.isValid()) {
527  if (verbosity)
528  LogProblem("CTPPSCommonDQMSource") << "ERROR in CTPPSCommonDQMSource::analyzeProtons > input not available.";
529 
530  return;
531  }
532 
533  // loop over protons
534  for (auto &p : *hRecoProtons) {
535  if (!p.validFit())
536  continue;
537 
538  signed int armIndex = -1;
539  if (p.lhcSector() == reco::ForwardProton::LHCSector::sector45)
540  armIndex = 0;
541  if (p.lhcSector() == reco::ForwardProton::LHCSector::sector56)
542  armIndex = 1;
543  if (armIndex < 0)
544  continue;
545 
546  auto &plots = armPlots[armIndex];
547 
548  plots.h_proton_xi->Fill(p.xi());
549  plots.h_proton_th_x->Fill(p.thetaX());
550  plots.h_proton_th_y->Fill(p.thetaY());
551  plots.h_proton_t->Fill(fabs(p.t()));
552  plots.h_proton_time->Fill(p.time());
553  }
554 }
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 361 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().

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

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

318  {
319  // global plots
320  globalPlots.Init(ibooker);
321 
322  // loop over arms
323  for (unsigned int arm = 0; arm < 2; arm++) {
324  armPlots[arm] = ArmPlots(ibooker, arm, makeProtonRecoPlots_);
325  }
326 }
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 558 of file CTPPSCommonDQMSource.cc.

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

◆ globalEndLuminosityBlock()

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

Definition at line 565 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().

565  {
566  auto const &rpstate = *luminosityBlockCache(iLumi.index());
567  auto currentLS = iLumi.id().luminosityBlock();
568  if (!perLSsaving_) {
569  for (std::vector<int>::size_type i = 0; i < rpstate.size(); i++)
571  }
572 }
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 99 of file CTPPSCommonDQMSource.cc.

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

◆ ctppsRecordToken

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

Definition at line 49 of file CTPPSCommonDQMSource.cc.

Referenced by analyzeCTPPSRecord().

◆ currentLS

int CTPPSCommonDQMSource::currentLS
private

Definition at line 56 of file CTPPSCommonDQMSource.cc.

Referenced by CTPPSCommonDQMSource(), and globalEndLuminosityBlock().

◆ endLS

int CTPPSCommonDQMSource::endLS
private

Definition at line 57 of file CTPPSCommonDQMSource.cc.

Referenced by CTPPSCommonDQMSource().

◆ globalPlots

GlobalPlots CTPPSCommonDQMSource::globalPlots
private

Definition at line 70 of file CTPPSCommonDQMSource.cc.

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

◆ makeProtonRecoPlots_

bool CTPPSCommonDQMSource::makeProtonRecoPlots_
private

Definition at line 53 of file CTPPSCommonDQMSource.cc.

Referenced by analyze(), and bookHistograms().

◆ MAX_LUMIS

const int CTPPSCommonDQMSource::MAX_LUMIS = 6000
staticprivate

Definition at line 46 of file CTPPSCommonDQMSource.cc.

◆ MAX_VBINS

const int CTPPSCommonDQMSource::MAX_VBINS = 20
staticprivate

Definition at line 47 of file CTPPSCommonDQMSource.cc.

◆ perLSsaving_

bool CTPPSCommonDQMSource::perLSsaving_
private

Definition at line 54 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 50 of file CTPPSCommonDQMSource.cc.

Referenced by analyzeTracks().

◆ tokenRecoProtons

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

Definition at line 51 of file CTPPSCommonDQMSource.cc.

Referenced by analyzeProtons().

◆ verbosity

const unsigned int CTPPSCommonDQMSource::verbosity
private

Definition at line 45 of file CTPPSCommonDQMSource.cc.

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