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

Constructor & Destructor Documentation

◆ CTPPSCommonDQMSource()

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

Definition at line 299 of file CTPPSCommonDQMSource.cc.

References currentLS, endLS, and rpstate.

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

315 {}

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

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

331  {
334 
337 }
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 341 of file CTPPSCommonDQMSource.cc.

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

Referenced by analyze().

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

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

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

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

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

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

◆ globalEndLuminosityBlock()

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

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

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