CMS 3D CMS Logo

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

Classes

struct  ChannelPlots
 plots related to one Diamond channel More...
 
struct  DiamondShifts
 
struct  GlobalPlots
 plots related to the whole system More...
 
struct  PlanePlots
 plots related to one Diamond plane More...
 
struct  PotPlots
 plots related to one Diamond detector package More...
 
struct  SectorPlots
 plots related to one sector More...
 

Public Member Functions

 CTPPSDiamondDQMSource (const edm::ParameterSet &)
 
- Public Member Functions inherited from DQMOneEDAnalyzer< edm::LuminosityBlockCache< dds::Cache > >
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 (const edm::Event &, const edm::EventSetup &) override
 
void bookHistograms (DQMStore::IBooker &, const edm::Run &, const edm::EventSetup &) override
 
void dqmBeginRun (const edm::Run &, const edm::EventSetup &) override
 
void dqmEndRun (edm::Run const &, edm::EventSetup const &) override
 
std::shared_ptr< dds::CacheglobalBeginLuminosityBlock (const edm::LuminosityBlock &, const edm::EventSetup &) const override
 
void globalEndLuminosityBlock (const edm::LuminosityBlock &, const edm::EventSetup &) override
 
- 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 Member Functions

void checkEventNumber (const CTPPSDiamondDetId &, const TotemFEDInfo &, const TotemVFATStatus &, PotPlots &, int &) const
 

Private Attributes

int centralOOT_
 
std::unordered_map< unsigned int, ChannelPlotschannelPlots_
 
edm::ESGetToken< CTPPSGeometry, VeryForwardRealGeometryRecordctppsGeometryEventToken_
 
edm::ESGetToken< CTPPSGeometry, VeryForwardRealGeometryRecordctppsGeometryRunToken_
 
std::unordered_map< CTPPSDetId, DiamondShiftsdiamShifts_
 
int EC_difference_45_
 
int EC_difference_56_
 
bool excludeMultipleHits_
 
const bool extract_digi_info_
 
GlobalPlots globalPlot_
 
bool perLSsaving_
 
std::unordered_map< unsigned int, PlanePlotsplanePlots_
 
const bool plotOffline_
 
const bool plotOnline_
 
std::unordered_map< unsigned int, PotPlotspotPlots_
 
std::vector< std::pair< edm::EventRange, int > > runParameters_
 
std::unordered_map< unsigned int, SectorPlotssectorPlots_
 
edm::EDGetTokenT< edm::DetSetVector< CTPPSDiamondRecHit > > tokenDiamondHit_
 
edm::EDGetTokenT< edm::DetSetVector< CTPPSDiamondLocalTrack > > tokenDiamondTrack_
 
edm::EDGetTokenT< edm::DetSetVector< CTPPSDiamondDigi > > tokenDigi_
 
edm::EDGetTokenT< std::vector< TotemFEDInfo > > tokenFEDInfo_
 
edm::EDGetTokenT< edm::DetSetVector< CTPPSPixelLocalTrack > > tokenPixelTrack_
 
edm::EDGetTokenT< edm::DetSetVector< TotemVFATStatus > > tokenStatus_
 
unsigned int trackCorrelationThreshold_
 
unsigned int verbosity_
 
unsigned int windowsNum_
 

Static Private Attributes

static constexpr unsigned short CHANNEL_OF_VFAT_CLOCK = 30
 Channel ID of the VFAT that contains clock data. More...
 
static constexpr unsigned short CTPPS_DIAMOND_NUM_OF_CHANNELS = 12
 
static constexpr unsigned short CTPPS_FAR_RP_ID = 3
 
static constexpr unsigned short CTPPS_FED_ID_45 = 583
 
static constexpr unsigned short CTPPS_FED_ID_56 = 582
 
static constexpr unsigned short CTPPS_PIXEL_STATION_ID = 2
 
static constexpr double DISPLAY_RESOLUTION_FOR_HITS_MM = 0.1
 Bin width of histograms showing hits and tracks (in mm) More...
 
static constexpr unsigned int FIRST_RUN_W_PIXELS = 300000
 Number of OOT indices monitored. More...
 
static constexpr unsigned short HPTDC_0_CHANNEL = 6
 
static constexpr unsigned short HPTDC_1_CHANNEL = 7
 
static constexpr double HPTDC_BIN_WIDTH_NS = 25. / 1024
 ns per HPTDC bin More...
 
static constexpr double INV_DISPLAY_RESOLUTION_FOR_HITS_MM = 1. / DISPLAY_RESOLUTION_FOR_HITS_MM
 
static constexpr double SEC_PER_LUMI_SECTION = 23.31
 Number of seconds per lumisection: used to compute hit rates in Hz. More...
 

Additional Inherited Members

- Public Types inherited from DQMOneEDAnalyzer< edm::LuminosityBlockCache< dds::Cache > >
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< dds::Cache > >
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Definition at line 68 of file CTPPSDiamondDQMSource.cc.

Constructor & Destructor Documentation

◆ CTPPSDiamondDQMSource()

CTPPSDiamondDQMSource::CTPPSDiamondDQMSource ( const edm::ParameterSet ps)

Definition at line 583 of file CTPPSDiamondDQMSource.cc.

References extract_digi_info_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), muonDTDigis_cfi::pset, runParameters_, tokenDigi_, tokenFEDInfo_, and tokenStatus_.

584  : perLSsaving_(ps.getUntrackedParameter<bool>("perLSsaving", false)),
586  ps.getUntrackedParameter<edm::InputTag>("tagPixelLocalTracks"))),
588  ps.getUntrackedParameter<edm::InputTag>("tagDiamondRecHits"))),
590  ps.getUntrackedParameter<edm::InputTag>("tagDiamondLocalTracks"))),
591  ctppsGeometryRunToken_(esConsumes<CTPPSGeometry, VeryForwardRealGeometryRecord, edm::Transition::BeginRun>()),
592  ctppsGeometryEventToken_(esConsumes<CTPPSGeometry, VeryForwardRealGeometryRecord>()),
593  excludeMultipleHits_(ps.getParameter<bool>("excludeMultipleHits")),
594  extract_digi_info_(ps.getParameter<bool>("extractDigiInfo")),
595  centralOOT_(-999),
596  verbosity_(ps.getUntrackedParameter<unsigned int>("verbosity", 0)),
597  plotOnline_(ps.getUntrackedParameter<bool>("plotOnline", true)),
598  plotOffline_(ps.getUntrackedParameter<bool>("plotOffline", false)),
599  windowsNum_(ps.getUntrackedParameter<unsigned int>("windowsNum", 3)),
600  trackCorrelationThreshold_(ps.getUntrackedParameter<unsigned int>("trackCorrelationThreshold", 3)),
601  EC_difference_56_(-500),
602  EC_difference_45_(-500) {
603  if (extract_digi_info_) {
604  tokenStatus_ = consumes<edm::DetSetVector<TotemVFATStatus>>(ps.getUntrackedParameter<edm::InputTag>("tagStatus"));
605  tokenFEDInfo_ = consumes<std::vector<TotemFEDInfo>>(ps.getUntrackedParameter<edm::InputTag>("tagFEDInfo"));
606  tokenDigi_ = consumes<edm::DetSetVector<CTPPSDiamondDigi>>(ps.getUntrackedParameter<edm::InputTag>("tagDigi"));
607  }
608  for (const auto& pset : ps.getParameter<std::vector<edm::ParameterSet>>("offsetsOOT")) {
609  runParameters_.emplace_back(
610  std::make_pair(pset.getParameter<edm::EventRange>("validityRange"), pset.getParameter<int>("centralOOT")));
611  }
612 }
edm::EDGetTokenT< edm::DetSetVector< CTPPSDiamondRecHit > > tokenDiamondHit_
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
edm::ESGetToken< CTPPSGeometry, VeryForwardRealGeometryRecord > ctppsGeometryRunToken_
edm::EDGetTokenT< std::vector< TotemFEDInfo > > tokenFEDInfo_
edm::ESGetToken< CTPPSGeometry, VeryForwardRealGeometryRecord > ctppsGeometryEventToken_
edm::EDGetTokenT< edm::DetSetVector< CTPPSDiamondLocalTrack > > tokenDiamondTrack_
edm::EDGetTokenT< edm::DetSetVector< CTPPSPixelLocalTrack > > tokenPixelTrack_
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getUntrackedParameter(std::string const &, T const &) const
std::vector< std::pair< edm::EventRange, int > > runParameters_
edm::EDGetTokenT< edm::DetSetVector< CTPPSDiamondDigi > > tokenDigi_
edm::EDGetTokenT< edm::DetSetVector< TotemVFATStatus > > tokenStatus_

Member Function Documentation

◆ analyze()

void CTPPSDiamondDQMSource::analyze ( const edm::Event event,
const edm::EventSetup iSetup 
)
overrideprotectedvirtual

Reimplemented from DQMOneEDAnalyzer< edm::LuminosityBlockCache< dds::Cache > >.

Definition at line 701 of file CTPPSDiamondDQMSource.cc.

References CTPPSDetId::arm(), centralOOT_, CHANNEL_OF_VFAT_CLOCK, channelAlignedWithTrack(), channelPlots_, checkEventNumber(), CTPPS_FAR_RP_ID, CTPPS_FED_ID_45, CTPPS_FED_ID_56, CTPPS_PIXEL_STATION_ID, ctppsGeometryEventToken_, hcalRecHitTable_cff::detId, diamShifts_, EC_difference_45_, EC_difference_56_, HPTDCErrorFlags::errorId(), excludeMultipleHits_, extract_digi_info_, HcalObjRepresent::Fill(), edm::EventSetup::getData(), HPTDC_0_CHANNEL, HPTDC_1_CHANNEL, HPTDC_BIN_WIDTH_NS, mps_fire::i, edm::eventsetup::heterocontainer::insert(), INV_DISPLAY_RESOLUTION_FOR_HITS_MM, edm::HandleBase::isValid(), perLSsaving_, BeamSpotProblemMonitor_cff::pixelTracks, planePlots_, plotOffline_, plotOnline_, potPlots_, HI_PhotonSkim_cff::rechits, sectorPlots_, edm::shift, mps_update::status, CTPPSDiamondRecHit::TIMESLICE_WITHOUT_LEADING, tokenDiamondHit_, tokenDiamondTrack_, tokenDigi_, tokenFEDInfo_, tokenPixelTrack_, tokenStatus_, HLT_2024v11_cff::track, trackCorrelationThreshold_, DiMuonV_cfg::tracks, validateGeometry_cfg::valid, verbosity_, windowsNum_, and y.

701  {
702  // get event data
703 
707  if (extract_digi_info_) {
708  event.getByToken(tokenStatus_, diamondVFATStatus);
709  event.getByToken(tokenDigi_, diamondDigis);
710  event.getByToken(tokenFEDInfo_, fedInfo);
711  }
712 
714  event.getByToken(tokenPixelTrack_, pixelTracks);
715 
717  event.getByToken(tokenDiamondHit_, diamondRecHits);
718 
720  event.getByToken(tokenDiamondTrack_, diamondLocalTracks);
721 
722  const CTPPSGeometry* ctppsGeometry = &iSetup.getData(ctppsGeometryEventToken_);
723 
724  // check validity
725  bool valid = true;
726  if (extract_digi_info_) { // drop DIGI-level validity checks if not monitored
727  valid &= diamondVFATStatus.isValid();
728  valid &= diamondDigis.isValid();
729  valid &= fedInfo.isValid();
730  }
731  valid &= pixelTracks.isValid();
732  valid &= diamondRecHits.isValid();
733  valid &= diamondLocalTracks.isValid();
734 
735  if (!valid) {
736  if (verbosity_)
737  edm::LogProblem("CTPPSDiamondDQMSource")
738  << "ERROR in CTPPSDiamondDQMSource::analyze > some of the required inputs are not valid. Skipping this "
739  "event.\n"
740  << " DIGI-level: (checked? " << std::boolalpha << extract_digi_info_ << ")\n"
741  << " diamondVFATStatus.isValid = " << diamondVFATStatus.isValid() << "\n"
742  << " diamondDigis.isValid = " << diamondDigis.isValid() << "\n"
743  << " fedInfo.isValid = " << fedInfo.isValid() << "\n"
744  << " RECO-level:\n"
745  << " pixelTracks.isValid = " << pixelTracks.isValid() << "\n"
746  << " diamondRecHits.isValid = " << diamondRecHits.isValid() << "\n"
747  << " diamondLocalTracks.isValid = " << diamondLocalTracks.isValid();
748  return;
749  }
750 
751  //------------------------------
752  // Sector Plots
753  //------------------------------
754  // Using CTPPSDiamondLocalTrack
755  if (plotOffline_)
756  for (const auto& tracks : *diamondLocalTracks) {
757  const CTPPSDiamondDetId detId_near(tracks.detId());
758 
759  for (const auto& track : tracks) {
760  if (!track.isValid())
761  continue;
762  if (potPlots_.count(detId_near.rpId()) == 0)
763  continue;
764  TH1F* trackHistoInTimeTmp = potPlots_[detId_near.rpId()].trackDistribution->getTH1F();
765  int startBin_near =
766  trackHistoInTimeTmp->FindBin(track.x0() - diamShifts_[detId_near.rpId()].global - track.x0Sigma());
767  int numOfBins_near = 2 * track.x0Sigma() * INV_DISPLAY_RESOLUTION_FOR_HITS_MM;
768 
769  for (const auto& tracks_far : *diamondLocalTracks) {
770  CTPPSDiamondDetId detId_far(tracks_far.detId());
771  if (detId_near.arm() != detId_far.arm() || detId_near.station() == detId_far.station())
772  continue;
773  for (const auto& track_far : tracks_far) {
774  if (!track.isValid())
775  continue;
776  if (sectorPlots_.count(detId_far.armId()) == 0)
777  continue;
778  TH2F* trackHistoTmp = sectorPlots_[detId_far.armId()].trackCorrelation->getTH2F();
779  TAxis* trackHistoTmpXAxis = trackHistoTmp->GetXaxis();
780  TAxis* trackHistoTmpYAxis = trackHistoTmp->GetYaxis();
781  int startBin_far = trackHistoTmpYAxis->FindBin(track_far.x0() - diamShifts_[detId_far.rpId()].global -
782  track_far.x0Sigma());
783  int numOfBins_far = 2 * track_far.x0Sigma() * INV_DISPLAY_RESOLUTION_FOR_HITS_MM;
784  for (int i = 0; i < numOfBins_near; ++i)
785  for (int y = 0; y < numOfBins_far; ++y) {
786  trackHistoTmp->Fill(trackHistoTmpXAxis->GetBinCenter(startBin_near + i),
787  trackHistoTmpYAxis->GetBinCenter(startBin_far + y));
788  if (tracks.size() < 3 && tracks_far.size() < trackCorrelationThreshold_)
789  sectorPlots_[detId_far.armId()].trackCorrelationLowMultiplicity->Fill(
790  trackHistoTmpXAxis->GetBinCenter(startBin_near + i),
791  trackHistoTmpYAxis->GetBinCenter(startBin_far + y));
792  }
793  }
794  }
795  }
796  }
797 
798  //------------------------------
799  // RP Plots
800  //------------------------------
801 
802  //------------------------------
803  // Correlation Plots
804  //------------------------------
805 
806  if (extract_digi_info_) {
807  // Using CTPPSDiamondDigi
808  for (const auto& digis : *diamondDigis) {
809  const CTPPSDiamondDetId detId(digis.detId()), detId_pot(detId.rpId());
810  for (const auto& digi : digis) {
811  if (detId.channel() == CHANNEL_OF_VFAT_CLOCK)
812  continue;
813  if (potPlots_.count(detId_pot) == 0)
814  continue;
815  //Leading without trailing investigation
816  if (digi.leadingEdge() != 0 || digi.trailingEdge() != 0) {
817  ++potPlots_[detId_pot].HitCounter;
818  if (digi.leadingEdge() != 0) {
819  potPlots_[detId_pot].leadingEdgeCumulative_all->Fill(HPTDC_BIN_WIDTH_NS * digi.leadingEdge());
820  }
821  if (digi.leadingEdge() != 0 && digi.trailingEdge() == 0) {
822  ++potPlots_[detId_pot].LeadingOnlyCounter;
823  potPlots_[detId_pot].leadingEdgeCumulative_le->Fill(HPTDC_BIN_WIDTH_NS * digi.leadingEdge());
824  }
825  if (digi.leadingEdge() == 0 && digi.trailingEdge() != 0) {
826  ++potPlots_[detId_pot].TrailingOnlyCounter;
827  potPlots_[detId_pot].trailingEdgeCumulative_te->Fill(HPTDC_BIN_WIDTH_NS * digi.trailingEdge());
828  }
829  if (digi.leadingEdge() != 0 && digi.trailingEdge() != 0) {
830  ++potPlots_[detId_pot].CompleteCounter;
831  // potPlots_[detId_pot].leadingTrailingCorrelationPot->Fill(HPTDC_BIN_WIDTH_NS * digi.leadingEdge(),
832  // HPTDC_BIN_WIDTH_NS * digi.trailingEdge());
833  }
834  }
835 
836  // HPTDC Errors
837  const HPTDCErrorFlags hptdcErrors = digi.hptdcErrorFlags();
838  if (detId.channel() == HPTDC_0_CHANNEL ||
839  detId.channel() == HPTDC_1_CHANNEL) { // ch6 for HPTDC 0 and ch7 for HPTDC 1
840  int verticalIndex = 2 * detId.plane() + (detId.channel() - HPTDC_0_CHANNEL);
841  for (unsigned short hptdcErrorIndex = 1; hptdcErrorIndex < 16; ++hptdcErrorIndex)
842  if (hptdcErrors.errorId(hptdcErrorIndex - 1))
843  potPlots_[detId_pot].HPTDCErrorFlags_2D->Fill(hptdcErrorIndex, verticalIndex);
844  }
845  if (digi.multipleHit())
846  ++potPlots_[detId_pot].MHCounter;
847  }
848  }
849  }
850 
851  // EC Errors
852  if (extract_digi_info_) {
853  for (const auto& vfat_status : *diamondVFATStatus) {
854  const CTPPSDiamondDetId detId(vfat_status.detId());
855  for (const auto& status : vfat_status) {
856  if (!status.isOK())
857  continue;
858  if (potPlots_.count(detId.rpId()) == 0)
859  continue;
860  if (channelPlots_.count(detId) == 0)
861  continue;
862 
863  // Check Event Number
864  for (const auto& optorx : *fedInfo) {
865  if (detId.arm() == 1 && optorx.fedId() == CTPPS_FED_ID_56)
867  else if (detId.arm() == 0 && optorx.fedId() == CTPPS_FED_ID_45)
869  }
870  }
871  }
872  }
873 
874  // Using CTPPSDiamondRecHit
875  std::unordered_map<unsigned int, std::set<unsigned int>> planes;
876  std::unordered_map<unsigned int, std::set<unsigned int>> planes_inclusive;
877 
878  auto lumiCache = luminosityBlockCache(event.getLuminosityBlock().index());
879  for (const auto& rechits : *diamondRecHits) {
880  const CTPPSDiamondDetId detId(rechits.detId()), detId_pot(detId.rpId());
881  const auto& x_shift = diamShifts_.at(detId_pot);
882 
883  for (const auto& rechit : rechits) {
884  planes_inclusive[detId_pot].insert(detId.plane());
885  if (excludeMultipleHits_ && rechit.multipleHits() > 0)
886  continue;
887  if (rechit.toT() != 0 && centralOOT_ != -999 && rechit.ootIndex() == centralOOT_)
888  planes[detId_pot].insert(detId.plane());
889 
890  if (potPlots_.count(detId_pot) == 0)
891  continue;
892 
893  potPlots_[detId_pot].recHitTime->Fill(rechit.time());
894 
895  float UFSDShift = 0.0;
896  if (rechit.yWidth() < 3)
897  UFSDShift = 0.5; // Display trick for UFSD that have 2 pixels with same X
898 
899  if (rechit.toT() != 0 && centralOOT_ != -999 && rechit.ootIndex() == centralOOT_) {
900  TH2F* hitHistoTmp = potPlots_[detId_pot].hitDistribution2d->getTH2F();
901  TAxis* hitHistoTmpYAxis = hitHistoTmp->GetYaxis();
902  int startBin = hitHistoTmpYAxis->FindBin(rechit.x() - x_shift.global - 0.5 * rechit.xWidth());
903  int numOfBins = rechit.xWidth() * INV_DISPLAY_RESOLUTION_FOR_HITS_MM;
904  for (int i = 0; i < numOfBins; ++i)
905  hitHistoTmp->Fill(detId.plane() + UFSDShift, hitHistoTmpYAxis->GetBinCenter(startBin + i));
906 
907  if (!perLSsaving_ && plotOnline_) {
908  hitHistoTmp = lumiCache->hitDistribution2dMap[detId_pot].get();
909  hitHistoTmpYAxis = hitHistoTmp->GetYaxis();
910  startBin = hitHistoTmpYAxis->FindBin(rechit.x() - x_shift.global - 0.5 * rechit.xWidth());
911  numOfBins = rechit.xWidth() * INV_DISPLAY_RESOLUTION_FOR_HITS_MM;
912  for (int i = 0; i < numOfBins; ++i)
913  hitHistoTmp->Fill(detId.plane() + UFSDShift, hitHistoTmpYAxis->GetBinCenter(startBin + i));
914  }
915  }
916 
917  if (rechit.toT() > 0) {
918  // Both
919  potPlots_[detId_pot].leadingEdgeCumulative_both->Fill(rechit.time() + 25 * rechit.ootIndex());
920  potPlots_[detId_pot].timeOverThresholdCumulativePot->Fill(rechit.toT());
921 
922  TH2F* hitHistoOOTTmp = potPlots_[detId_pot].hitDistribution2dOOT->getTH2F();
923  TAxis* hitHistoOOTTmpYAxis = hitHistoOOTTmp->GetYaxis();
924  int startBin = hitHistoOOTTmpYAxis->FindBin(rechit.x() - x_shift.global - 0.5 * rechit.xWidth());
925  int numOfBins = rechit.xWidth() * INV_DISPLAY_RESOLUTION_FOR_HITS_MM;
926  for (int i = 0; i < numOfBins; ++i)
927  hitHistoOOTTmp->Fill(detId.plane() + 1. / windowsNum_ * rechit.ootIndex(),
928  hitHistoOOTTmpYAxis->GetBinCenter(startBin + i));
929 
930  } else if (rechit.ootIndex() != CTPPSDiamondRecHit::TIMESLICE_WITHOUT_LEADING && plotOnline_) {
931  // Only leading
932  TH2F* hitHistoOOTTmp = potPlots_[detId_pot].hitDistribution2dOOT_le->getTH2F();
933  TAxis* hitHistoOOTTmpYAxis = hitHistoOOTTmp->GetYaxis();
934  int startBin = hitHistoOOTTmpYAxis->FindBin(rechit.x() - x_shift.global - 0.5 * rechit.xWidth());
935  int numOfBins = rechit.xWidth() * INV_DISPLAY_RESOLUTION_FOR_HITS_MM;
936  for (int i = 0; i < numOfBins; ++i)
937  hitHistoOOTTmp->Fill(detId.plane() + 1. / windowsNum_ * rechit.ootIndex(),
938  hitHistoOOTTmpYAxis->GetBinCenter(startBin + i));
939  }
940  if (rechit.ootIndex() != CTPPSDiamondRecHit::TIMESLICE_WITHOUT_LEADING &&
941  potPlots_[detId_pot].activity_per_bx.count(rechit.ootIndex()) > 0)
942  potPlots_[detId_pot].activity_per_bx.at(rechit.ootIndex())->Fill(event.bunchCrossing());
943 
944  // if(plotOffline_)
945  // potPlots_[detId_pot].TOTVsLS->Fill(event.luminosityBlock(),rechit.toT());
946  }
947  }
948 
949  for (const auto& plt : potPlots_) {
950  plt.second.activePlanes->Fill(planes[plt.first].size());
951  if (plotOnline_)
952  plt.second.activePlanesInclusive->Fill(planes_inclusive[plt.first].size());
953  }
954 
955  // Using CTPPSDiamondLocalTrack
956  for (const auto& tracks : *diamondLocalTracks) {
957  const CTPPSDiamondDetId detId(tracks.detId()), detId_pot(detId.rpId());
958  const auto& x_shift = diamShifts_.at(detId_pot);
959 
960  for (const auto& track : tracks) {
961  if (!track.isValid())
962  continue;
964  continue;
965  if (excludeMultipleHits_ && track.multipleHits() > 0)
966  continue;
967  if (potPlots_.count(detId_pot) == 0)
968  continue;
969 
970  TH2F* trackHistoOOTTmp = potPlots_[detId_pot].trackDistributionOOT->getTH2F();
971  TAxis* trackHistoOOTTmpYAxis = trackHistoOOTTmp->GetYaxis();
972  int startBin = trackHistoOOTTmpYAxis->FindBin(track.x0() - x_shift.global - track.x0Sigma());
973  int numOfBins = 2 * track.x0Sigma() * INV_DISPLAY_RESOLUTION_FOR_HITS_MM;
974  for (int i = 0; i < numOfBins; ++i)
975  trackHistoOOTTmp->Fill(track.ootIndex(), trackHistoOOTTmpYAxis->GetBinCenter(startBin + i));
976 
977  if (centralOOT_ != -999 && track.ootIndex() == centralOOT_) {
978  TH1F* trackHistoInTimeTmp = potPlots_[detId_pot].trackDistribution->getTH1F();
979  int startBin = trackHistoInTimeTmp->FindBin(track.x0() - x_shift.global - track.x0Sigma());
980  int numOfBins = 2 * track.x0Sigma() * INV_DISPLAY_RESOLUTION_FOR_HITS_MM;
981  for (int i = 0; i < numOfBins; ++i)
982  trackHistoInTimeTmp->Fill(trackHistoInTimeTmp->GetBinCenter(startBin + i));
983  }
984  if (plotOffline_ && !perLSsaving_) {
985  // potPlots_[detId_pot].trackTimeVsLS->Fill(event.luminosityBlock(),track.time());
986  potPlots_[detId_pot].trackTimeVsBX->Fill(event.bunchCrossing(), track.time());
987  }
988  }
989  }
990 
991  // Channel efficiency using CTPPSDiamondLocalTrack
992  for (const auto& tracks : *diamondLocalTracks) {
993  const CTPPSDiamondDetId detId(tracks.detId()), detId_pot(detId.rpId());
994  for (const auto& track : tracks) {
995  // Find hits and planes in the track
996  int numOfHits = 0;
997  std::set<int> planesInTrackSet;
998  for (const auto& vec : *diamondRecHits) {
999  const CTPPSDiamondDetId detid(vec.detId());
1000  if (detid.arm() != detId_pot.arm())
1001  continue;
1002 
1003  for (const auto& hit : vec) {
1004  // first check if the hit contributes to the track
1005  if (track.containsHit(hit)) {
1006  ++numOfHits;
1007  planesInTrackSet.insert(detid.plane());
1008  }
1009  }
1010  }
1011 
1012  if (numOfHits > 0 && numOfHits <= 10 && planesInTrackSet.size() > 2) {
1013  for (const auto& plt_vs_ch : channelPlots_) { // loop over all channels registered in geometry
1014  const CTPPSDiamondDetId detId(plt_vs_ch.first);
1015  if (detId.rpId() != detId_pot)
1016  continue;
1017  const unsigned short map_index = detId.plane() * 100 + detId.channel();
1018  if (potPlots_[detId_pot].effDoublecountingChMap.count(map_index) == 0) {
1019  potPlots_[detId_pot].effTriplecountingChMap[map_index] = 0;
1020  potPlots_[detId_pot].effDoublecountingChMap[map_index] = 0;
1021  }
1022  if (channelAlignedWithTrack(ctppsGeometry, detId, track, 0.2)) {
1023  // Channel should fire
1024  ++potPlots_[detId_pot].effDoublecountingChMap[map_index];
1025  for (const auto& rechits : *diamondRecHits) {
1026  const CTPPSDiamondDetId detId_hit(rechits.detId());
1027  if (detId_hit == detId)
1028  for (const auto& rechit : rechits)
1029  if (track.containsHit(rechit, 1)) // Channel fired
1030  ++potPlots_[detId_pot].effTriplecountingChMap[map_index];
1031  }
1032  }
1033  }
1034  }
1035  }
1036  }
1037 
1038  // Tomography of diamonds using pixel
1039  for (const auto& rechits : *diamondRecHits) {
1040  const CTPPSDiamondDetId detId(rechits.detId()), detId_pot(detId.rpId());
1041  const auto pix_shift = diamShifts_.at(detId_pot).withPixels;
1042  for (const auto& rechit : rechits) {
1043  if (excludeMultipleHits_ && rechit.multipleHits() > 0)
1044  continue;
1045  if (rechit.toT() == 0)
1046  continue;
1047  if (!pixelTracks.isValid())
1048  continue;
1049  if (potPlots_.count(detId_pot) == 0)
1050  continue;
1051 
1052  for (const auto& ds : *pixelTracks) {
1053  if (ds.size() > 1)
1054  continue;
1055  const CTPPSPixelDetId pixId(ds.detId());
1056  if (pixId.station() != CTPPS_PIXEL_STATION_ID || pixId.rp() != CTPPS_FAR_RP_ID)
1057  continue;
1058  for (const auto& lt : ds) {
1059  if (lt.isValid() && pixId.arm() == detId_pot.arm()) {
1060  if (rechit.ootIndex() != CTPPSDiamondRecHit::TIMESLICE_WITHOUT_LEADING && rechit.ootIndex() >= 0 &&
1061  potPlots_[detId_pot].pixelTomographyAll.count(rechit.ootIndex()) > 0 && lt.x0() - pix_shift < 24)
1062  potPlots_[detId_pot]
1063  .pixelTomographyAll.at(rechit.ootIndex())
1064  ->Fill(lt.x0() - pix_shift + 25 * detId.plane(), lt.y0());
1065  }
1066  }
1067  }
1068  }
1069  }
1070 
1071  //------------------------------
1072  // Clock Plots
1073  //------------------------------
1074  // Commented out to save space in the DQM files, but code should be kept
1075  // for ( const auto& digis : *diamondDigis ) {
1076  // const CTPPSDiamondDetId detId(digis.detId()), detId_pot(detId.rpId());
1077  // if ( detId.channel() == CHANNEL_OF_VFAT_CLOCK ) {
1078  // for ( const auto& digi : digis ) {
1079  // if ( digi.leadingEdge() != 0 ) {
1080  // if ( detId.plane() == 1 ) {
1081  // potPlots_[detId_pot].clock_Digi1_le->Fill( HPTDC_BIN_WIDTH_NS * digi.leadingEdge() );
1082  // potPlots_[detId_pot].clock_Digi1_te->Fill( HPTDC_BIN_WIDTH_NS * digi.trailingEdge() );
1083  // }
1084  // if ( detId.plane() == 3 ) {
1085  // potPlots_[detId_pot].clock_Digi3_le->Fill( HPTDC_BIN_WIDTH_NS * digi.leadingEdge() );
1086  // potPlots_[detId_pot].clock_Digi3_te->Fill( HPTDC_BIN_WIDTH_NS * digi.trailingEdge() );
1087  // }
1088  // }
1089  // }
1090  // }
1091  // }
1092 
1093  //------------------------------
1094  // Plane Plots
1095  //------------------------------
1096 
1097  // Using CTPPSDiamondDigi
1098  std::unordered_map<unsigned int, unsigned int> channelsPerPlane;
1099  if (extract_digi_info_) {
1100  for (const auto& digis : *diamondDigis) {
1101  const CTPPSDiamondDetId detId(digis.detId()), detId_plane(detId.planeId());
1102  for (const auto& digi : digis) {
1103  if (detId.channel() == CHANNEL_OF_VFAT_CLOCK)
1104  continue;
1105  if (planePlots_.count(detId_plane) == 0)
1106  continue;
1107 
1108  if (digi.leadingEdge() != 0) {
1109  planePlots_[detId_plane].digiProfileCumulativePerPlane->Fill(detId.channel());
1110  channelsPerPlane[detId_plane]++;
1111  }
1112  }
1113  }
1114  }
1115 
1116  for (const auto& plt : channelsPerPlane)
1117  planePlots_[plt.first].hit_multiplicity->Fill(plt.second);
1118 
1119  // Using CTPPSDiamondRecHit
1120  for (const auto& rechits : *diamondRecHits) {
1121  const CTPPSDiamondDetId detId(rechits.detId()), detId_plane(detId.planeId()), detId_pot(detId.rpId());
1122  for (const auto& rechit : rechits) {
1123  if (excludeMultipleHits_ && rechit.multipleHits() > 0)
1124  continue;
1125  if (rechit.toT() == 0)
1126  continue;
1127  if (planePlots_.count(detId_plane) != 0) {
1128  if (centralOOT_ != -999 && rechit.ootIndex() == centralOOT_) {
1129  TH1F* hitHistoTmp = planePlots_[detId_plane].hitProfile->getTH1F();
1130  int startBin = hitHistoTmp->FindBin(rechit.x() - diamShifts_.at(detId_pot).global - 0.5 * rechit.xWidth());
1131  int numOfBins = rechit.xWidth() * INV_DISPLAY_RESOLUTION_FOR_HITS_MM;
1132  for (int i = 0; i < numOfBins; ++i)
1133  hitHistoTmp->Fill(hitHistoTmp->GetBinCenter(startBin + i));
1134  }
1135  }
1136  }
1137  }
1138 
1139  //Tomography of diamonds using pixel and Efficiency WRT Pixels
1140  for (const auto& ds : *pixelTracks) {
1141  const CTPPSPixelDetId pixId(ds.detId());
1142  if (pixId.station() != CTPPS_PIXEL_STATION_ID || pixId.rp() != CTPPS_FAR_RP_ID)
1143  continue;
1144  if (ds.size() > 1)
1145  continue;
1146  for (const auto& lt : ds) {
1147  if (lt.isValid()) {
1148  for (const auto& sh_vs_id : diamShifts_) {
1149  const CTPPSDiamondDetId& detId_pot = sh_vs_id.first;
1150  const auto& shift = sh_vs_id.second;
1151  if (detId_pot.arm() == pixId.arm())
1152  // For efficieny
1153  potPlots_[detId_pot].pixelTracksMap.Fill(lt.x0() - shift.withPixels, lt.y0());
1154  }
1155 
1156  std::set<CTPPSDiamondDetId> planesWitHits_set;
1157  for (const auto& rechits : *diamondRecHits) {
1158  const CTPPSDiamondDetId detId(rechits.detId()), detId_plane(detId.planeId()), detId_pot(detId.rpId());
1159  const auto pix_shift = diamShifts_.at(detId_pot).withPixels;
1160  for (const auto& rechit : rechits) {
1161  if (excludeMultipleHits_ && rechit.multipleHits() > 0)
1162  continue;
1163  if (rechit.ootIndex() == CTPPSDiamondRecHit::TIMESLICE_WITHOUT_LEADING || rechit.toT() == 0)
1164  continue;
1165  if (planePlots_.count(detId_plane) == 0)
1166  continue;
1167  if (pixId.arm() == detId_plane.arm() && lt.x0() - pix_shift < 24) {
1168  planePlots_[detId_plane].pixelTomography_far->Fill(lt.x0() - pix_shift + 25 * rechit.ootIndex(), lt.y0());
1169  if (centralOOT_ != -999 && rechit.ootIndex() == centralOOT_)
1170  planesWitHits_set.insert(detId_plane);
1171  }
1172  }
1173  }
1174 
1175  for (auto& planeId : planesWitHits_set)
1176  planePlots_[planeId].pixelTracksMapWithDiamonds.Fill(lt.x0() - diamShifts_.at(planeId.rpId()).withPixels,
1177  lt.y0());
1178  }
1179  }
1180  }
1181 
1182  //------------------------------
1183  // Channel Plots
1184  //------------------------------
1185 
1186  // digi profile cumulative
1187  if (extract_digi_info_) {
1188  for (const auto& digis : *diamondDigis) {
1189  const CTPPSDiamondDetId detId(digis.detId());
1190  for (const auto& digi : digis) {
1191  if (detId.channel() == CHANNEL_OF_VFAT_CLOCK)
1192  continue;
1193  if (channelPlots_.count(detId) != 0) {
1194  // HPTDC Errors
1195  const HPTDCErrorFlags hptdcErrors = digi.hptdcErrorFlags();
1196  for (unsigned short hptdcErrorIndex = 1; hptdcErrorIndex < 16; ++hptdcErrorIndex)
1197  if (hptdcErrors.errorId(hptdcErrorIndex - 1))
1198  channelPlots_[detId].HPTDCErrorFlags->Fill(hptdcErrorIndex);
1199  if (digi.multipleHit())
1200  ++channelPlots_[detId].MHCounter;
1201 
1202  // Check dropped trailing edges
1203  if (digi.leadingEdge() != 0 || digi.trailingEdge() != 0) {
1204  ++channelPlots_[detId].HitCounter;
1205  if (digi.trailingEdge() == 0) {
1206  ++channelPlots_[detId].LeadingOnlyCounter;
1207  channelPlots_[detId].leadingEdgeCumulative_le->Fill(HPTDC_BIN_WIDTH_NS * digi.leadingEdge());
1208  } else if (digi.leadingEdge() == 0) {
1209  ++channelPlots_[detId].TrailingOnlyCounter;
1210  channelPlots_[detId].trailingEdgeCumulative_te->Fill(HPTDC_BIN_WIDTH_NS * digi.trailingEdge());
1211  } else {
1212  ++channelPlots_[detId].CompleteCounter;
1213  // channelPlots_[detId].LeadingTrailingCorrelationPerChannel->Fill(HPTDC_BIN_WIDTH_NS * digi.leadingEdge(),
1214  // HPTDC_BIN_WIDTH_NS * digi.trailingEdge());
1215  }
1216  }
1217  }
1218  }
1219  }
1220  }
1221 
1222  // Using CTPPSDiamondRecHit
1223 
1224  for (const auto& rechits : *diamondRecHits) {
1225  CTPPSDiamondDetId detId(rechits.detId());
1226  for (const auto& rechit : rechits) {
1227  if (excludeMultipleHits_ && rechit.multipleHits() > 0)
1228  continue;
1229  if (channelPlots_.count(detId) != 0) {
1230  channelPlots_[detId].recHitTime->Fill(rechit.time());
1231  if (rechit.ootIndex() != CTPPSDiamondRecHit::TIMESLICE_WITHOUT_LEADING && rechit.toT() != 0) {
1232  channelPlots_[detId].leadingEdgeCumulative_both->Fill(rechit.time() + 25 * rechit.ootIndex());
1233  channelPlots_[detId].TimeOverThresholdCumulativePerChannel->Fill(rechit.toT());
1234  }
1235  ++lumiCache->hitsCounterMap[detId];
1236 
1237  if (rechit.ootIndex() != CTPPSDiamondRecHit::TIMESLICE_WITHOUT_LEADING &&
1238  channelPlots_[detId].activity_per_bx.count(rechit.ootIndex()) > 0)
1239  channelPlots_[detId].activity_per_bx.at(rechit.ootIndex())->Fill(event.bunchCrossing());
1240  }
1241  }
1242  }
1243 
1244  // Tomography of diamonds using pixel
1245  for (const auto& rechits : *diamondRecHits) {
1246  const CTPPSDiamondDetId detId(rechits.detId()), detId_pot(detId.rpId());
1247  const auto shift_pix = diamShifts_.at(detId_pot).withPixels;
1248  for (const auto& rechit : rechits) {
1249  if (excludeMultipleHits_ && rechit.multipleHits() > 0)
1250  continue;
1251  if (rechit.ootIndex() == CTPPSDiamondRecHit::TIMESLICE_WITHOUT_LEADING || rechit.toT() == 0)
1252  continue;
1253  if (!pixelTracks.isValid())
1254  continue;
1255  if (channelPlots_.count(detId) == 0)
1256  continue;
1257 
1258  for (const auto& ds : *pixelTracks) {
1259  const CTPPSPixelDetId pixId(ds.detId());
1260  if (pixId.station() != CTPPS_PIXEL_STATION_ID || pixId.rp() != CTPPS_FAR_RP_ID)
1261  continue;
1262  if (ds.size() > 1)
1263  continue;
1264  for (const auto& lt : ds) {
1265  if (lt.isValid() && pixId.arm() == detId.arm() && lt.x0() - shift_pix < 24)
1266  channelPlots_[detId].pixelTomography_far->Fill(lt.x0() - shift_pix + 25 * rechit.ootIndex(), lt.y0());
1267  }
1268  }
1269  }
1270  }
1271 }
static constexpr unsigned short CTPPS_FED_ID_45
edm::EDGetTokenT< edm::DetSetVector< CTPPSDiamondRecHit > > tokenDiamondHit_
edm::EDGetTokenT< std::vector< TotemFEDInfo > > tokenFEDInfo_
std::unordered_map< CTPPSDetId, DiamondShifts > diamShifts_
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Definition: EventSetup.h:119
static constexpr unsigned short CTPPS_FAR_RP_ID
uint32_t arm() const
Definition: CTPPSDetId.h:57
static constexpr unsigned short CTPPS_PIXEL_STATION_ID
edm::ESGetToken< CTPPSGeometry, VeryForwardRealGeometryRecord > ctppsGeometryEventToken_
edm::EDGetTokenT< edm::DetSetVector< CTPPSDiamondLocalTrack > > tokenDiamondTrack_
edm::EDGetTokenT< edm::DetSetVector< CTPPSPixelLocalTrack > > tokenPixelTrack_
static constexpr unsigned short HPTDC_0_CHANNEL
edm::EDGetTokenT< edm::DetSetVector< CTPPSDiamondDigi > > tokenDigi_
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
std::unordered_map< unsigned int, ChannelPlots > channelPlots_
edm::EDGetTokenT< edm::DetSetVector< TotemVFATStatus > > tokenStatus_
static constexpr unsigned short CHANNEL_OF_VFAT_CLOCK
Channel ID of the VFAT that contains clock data.
bool errorId(unsigned short id) const
bool insert(Storage &iStorage, ItemType *iItem, const IdTag &iIdTag)
Definition: HCMethods.h:50
The manager class for TOTEM RP geometry.
Definition: CTPPSGeometry.h:30
std::unordered_map< unsigned int, SectorPlots > sectorPlots_
bool channelAlignedWithTrack(const CTPPSGeometry *geom, const CTPPSDiamondDetId &detid, const CTPPSDiamondLocalTrack &localTrack, const float tolerance=1)
bool isValid() const
Definition: HandleBase.h:70
std::unordered_map< unsigned int, PotPlots > potPlots_
static constexpr int TIMESLICE_WITHOUT_LEADING
void checkEventNumber(const CTPPSDiamondDetId &, const TotemFEDInfo &, const TotemVFATStatus &, PotPlots &, int &) const
static constexpr unsigned short CTPPS_FED_ID_56
static constexpr double HPTDC_BIN_WIDTH_NS
ns per HPTDC bin
static constexpr double INV_DISPLAY_RESOLUTION_FOR_HITS_MM
static unsigned int const shift
Detector ID class for CTPPS Timing Diamond detectors. Bits [19:31] : Assigend in CTPPSDetId Calss Bit...
std::unordered_map< unsigned int, PlanePlots > planePlots_
static constexpr unsigned short HPTDC_1_CHANNEL
Definition: event.py:1
Log< level::Error, true > LogProblem

◆ bookHistograms()

void CTPPSDiamondDQMSource::bookHistograms ( DQMStore::IBooker ibooker,
const edm::Run ,
const edm::EventSetup iSetup 
)
overrideprotectedvirtual

Implements DQMOneEDAnalyzer< edm::LuminosityBlockCache< dds::Cache > >.

Definition at line 644 of file CTPPSDiamondDQMSource.cc.

References CTPPSDetId::armId(), dqm::implementation::NavigatorBase::cd(), channelPlots_, CTPPSDiamondDetId::check(), ctppsGeometryRunToken_, relativeConstraints::geom, edm::EventSetup::getData(), globalPlot_, ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, perLSsaving_, CTPPSDiamondDetId::planeId(), planePlots_, plotOffline_, plotOnline_, potPlots_, CTPPSDetId::rpId(), sectorPlots_, dqm::implementation::NavigatorBase::setCurrentFolder(), and windowsNum_.

644  {
645  ibooker.cd();
646  ibooker.setCurrentFolder("CTPPS");
647 
648  globalPlot_ = GlobalPlots(ibooker);
649 
650  // book plots from the geometry
652  for (auto it = geom.beginSensor(); it != geom.endSensor(); ++it) {
653  if (!CTPPSDiamondDetId::check(it->first))
654  continue;
655  // per-channel plots
656  const CTPPSDiamondDetId chId(it->first);
657  if (plotOnline_ && channelPlots_.count(chId) == 0)
658  channelPlots_[chId] = ChannelPlots(ibooker, chId, windowsNum_);
659 
660  // per-plane plots
661  const CTPPSDiamondDetId plId(chId.planeId());
662  if (planePlots_.count(plId) == 0)
663  planePlots_[plId] = PlanePlots(ibooker, plId, windowsNum_);
664  // per-pot plots
665  const CTPPSDiamondDetId rpId(chId.rpId());
666  if (potPlots_.count(rpId) == 0)
667  potPlots_[rpId] = PotPlots(ibooker, rpId, windowsNum_, plotOnline_, plotOffline_, perLSsaving_);
668 
669  // per-sector plots
670  const CTPPSDiamondDetId secId(chId.armId());
671  if (plotOffline_ && sectorPlots_.count(secId) == 0)
672  sectorPlots_[secId] = SectorPlots(ibooker, secId, plotOnline_);
673  }
674 }
edm::ESGetToken< CTPPSGeometry, VeryForwardRealGeometryRecord > ctppsGeometryRunToken_
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Definition: EventSetup.h:119
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:36
std::unordered_map< unsigned int, ChannelPlots > channelPlots_
static bool check(unsigned int raw)
returns true if the raw ID is a PPS-timing one
The manager class for TOTEM RP geometry.
Definition: CTPPSGeometry.h:30
std::unordered_map< unsigned int, SectorPlots > sectorPlots_
std::unordered_map< unsigned int, PotPlots > potPlots_
Detector ID class for CTPPS Timing Diamond detectors. Bits [19:31] : Assigend in CTPPSDetId Calss Bit...
std::unordered_map< unsigned int, PlanePlots > planePlots_

◆ checkEventNumber()

void CTPPSDiamondDQMSource::checkEventNumber ( const CTPPSDiamondDetId detId,
const TotemFEDInfo optorx,
const TotemVFATStatus status,
CTPPSDiamondDQMSource::PotPlots plots,
int &  EC_difference 
) const
private

Definition at line 1348 of file CTPPSDiamondDQMSource.cc.

References funct::abs(), TauDecayModes::dec, hcalRecHitTable_cff::detId, TotemFEDInfo::fedId(), HPTDC_0_CHANNEL, HPTDC_1_CHANNEL, TotemFEDInfo::lv1(), plotOnline_, HLTObjectsMonitor_cfi::plots, mps_update::status, and verbosity_.

Referenced by analyze().

1352  {
1353  const CTPPSDiamondDetId detId_pot(detId.rpId());
1354  if (plotOnline_)
1355  plots.ECCheck->Fill((int)((optorx.lv1() & 0xFF) - ((unsigned int)status.ec() & 0xFF)) & 0xFF);
1356  if ((static_cast<int>((optorx.lv1() & 0xFF) - status.ec()) != EC_difference) &&
1357  (static_cast<uint8_t>((optorx.lv1() & 0xFF) - status.ec()) < 128))
1358  EC_difference = static_cast<int>(optorx.lv1() & 0xFF) - (static_cast<unsigned int>(status.ec()) & 0xFF);
1359  if (EC_difference != 1 && EC_difference != -500 && std::abs(EC_difference) < 127) {
1360  if (detId.channel() == HPTDC_0_CHANNEL || detId.channel() == HPTDC_1_CHANNEL)
1361  plots.HPTDCErrorFlags_2D->Fill(16, 2 * detId.plane() + (detId.channel() - HPTDC_0_CHANNEL));
1362  if (verbosity_)
1363  edm::LogProblem("CTPPSDiamondDQMSource")
1364  << "FED " << optorx.fedId() << ": ECError at EV: 0x" << std::hex << optorx.lv1() << "\t\tVFAT EC: 0x"
1365  << static_cast<unsigned int>(status.ec()) << "\twith ID: " << std::dec << detId
1366  << "\tdiff: " << EC_difference;
1367  }
1368 }
static constexpr unsigned short HPTDC_0_CHANNEL
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
int fedId() const
Definition: TotemFEDInfo.h:22
uint32_t lv1() const
Definition: TotemFEDInfo.h:26
Detector ID class for CTPPS Timing Diamond detectors. Bits [19:31] : Assigend in CTPPSDetId Calss Bit...
static constexpr unsigned short HPTDC_1_CHANNEL
Log< level::Error, true > LogProblem

◆ dqmBeginRun()

void CTPPSDiamondDQMSource::dqmBeginRun ( const edm::Run iRun,
const edm::EventSetup iSetup 
)
overrideprotectedvirtual

Reimplemented from DQMOneEDAnalyzer< edm::LuminosityBlockCache< dds::Cache > >.

Definition at line 616 of file CTPPSDiamondDQMSource.cc.

References CTPPSDetId::arm(), centralOOT_, CTPPSDiamondDetId::check(), edm::contains(), CTPPS_FAR_RP_ID, CTPPS_PIXEL_STATION_ID, ctppsGeometryRunToken_, diamShifts_, FIRST_RUN_W_PIXELS, relativeConstraints::geom, edm::EventSetup::getData(), ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, edm::RunBase::run(), and runParameters_.

616  {
617  centralOOT_ = -999;
618  for (const auto& oot : runParameters_) {
619  if (edm::contains(oot.first, edm::EventID(iRun.run(), 0, 1))) {
620  centralOOT_ = oot.second;
621  break;
622  }
623  }
624 
625  // Get detector shifts from the geometry
627  for (auto it = geom.beginRP(); it != geom.endRP(); ++it)
628  if (CTPPSDiamondDetId::check(it->first)) {
629  const CTPPSDiamondDetId diam_id(it->first);
630  const auto diam = geom.sensor(it->first);
631  diamShifts_[diam_id].global = diam->translation().x() - diam->getDiamondDimensions().xHalfWidth;
632  if (iRun.run() > FIRST_RUN_W_PIXELS) { // pixel installed
633  const CTPPSPixelDetId pixid(diam_id.arm(), CTPPS_PIXEL_STATION_ID, CTPPS_FAR_RP_ID);
634  auto pix = geom.sensor(pixid);
635  // Rough alignement of pixel detector for diamond tomography
636  diamShifts_[diam_id].withPixels =
637  pix->translation().x() - pix->getDiamondDimensions().xHalfWidth - diamShifts_[diam_id].global - 1.;
638  }
639  }
640 }
edm::ESGetToken< CTPPSGeometry, VeryForwardRealGeometryRecord > ctppsGeometryRunToken_
std::unordered_map< CTPPSDetId, DiamondShifts > diamShifts_
bool contains(EventRange const &lh, EventID const &rh)
Definition: EventRange.cc:37
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Definition: EventSetup.h:119
static constexpr unsigned short CTPPS_FAR_RP_ID
static constexpr unsigned short CTPPS_PIXEL_STATION_ID
std::vector< std::pair< edm::EventRange, int > > runParameters_
RunNumber_t run() const
Definition: RunBase.h:40
static constexpr unsigned int FIRST_RUN_W_PIXELS
Number of OOT indices monitored.
static bool check(unsigned int raw)
returns true if the raw ID is a PPS-timing one
The manager class for TOTEM RP geometry.
Definition: CTPPSGeometry.h:30
Detector ID class for CTPPS Timing Diamond detectors. Bits [19:31] : Assigend in CTPPSDetId Calss Bit...

◆ dqmEndRun()

void CTPPSDiamondDQMSource::dqmEndRun ( edm::Run const &  ,
edm::EventSetup const &   
)
overrideprotectedvirtual

Reimplemented from DQMOneEDAnalyzer< edm::LuminosityBlockCache< dds::Cache > >.

Definition at line 1372 of file CTPPSDiamondDQMSource.cc.

References perLSsaving_, plotOffline_, HLTObjectsMonitor_cfi::plots, and potPlots_.

1372  {
1373  if (plotOffline_ && !perLSsaving_)
1374  for (const auto& rpPlots : potPlots_) {
1375  auto plots = rpPlots.second;
1376  // *(plots.TOTVsLSProfile->getTProfile())=*plots.TOTVsLS->getTH2F()->ProfileX();
1377  // *(plots.trackTimeVsLSProfile->getTProfile())=*plots.trackTimeVsLS->getTH2F()->ProfileX();
1378  *(plots.trackTimeVsBXProfile->getTProfile()) = *plots.trackTimeVsBX->getTH2F()->ProfileX();
1379  // *(plots.trackTimeVsXAngleProfile->getTProfile()) = *plots.trackTimeVsXAngle->getTH2F()->ProfileX();
1380  }
1381 }
std::unordered_map< unsigned int, PotPlots > potPlots_

◆ globalBeginLuminosityBlock()

std::shared_ptr< dds::Cache > CTPPSDiamondDQMSource::globalBeginLuminosityBlock ( const edm::LuminosityBlock ,
const edm::EventSetup  
) const
overrideprotected

Definition at line 678 of file CTPPSDiamondDQMSource.cc.

References ztail::d, INV_DISPLAY_RESOLUTION_FOR_HITS_MM, perLSsaving_, plotFactory::plot, plotOnline_, potPlots_, and AlCaHLTBitMon_QueryRunRegistry::string.

679  {
680  auto d = std::make_shared<dds::Cache>();
681  d->hitDistribution2dMap.reserve(potPlots_.size());
682  if (!perLSsaving_ && plotOnline_) {
683  for (auto& plot : potPlots_) {
684  d->hitDistribution2dMap[plot.first] = std::make_unique<TH2F>(
685  "hits in planes lumisection",
686  (std::string(plot.second.hitDistribution2d_lumisection->getTH2F()->GetTitle()) + ";plane number;x (mm)")
687  .c_str(),
688  10,
689  -0.5,
690  4.5,
692  -0.5,
693  18.5);
694  }
695  }
696  return d;
697 }
d
Definition: ztail.py:151
std::unordered_map< unsigned int, PotPlots > potPlots_
static constexpr double INV_DISPLAY_RESOLUTION_FOR_HITS_MM

◆ globalEndLuminosityBlock()

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

Definition at line 1275 of file CTPPSDiamondDQMSource.cc.

References CTPPSDetId::arm(), CTPPSDiamondDetId::channel(), channelPlots_, hcalRecHitTable_cff::detId, L1TObjectsTimingClient_cff::efficiency, edm::LuminosityBlock::index(), perLSsaving_, CTPPSDiamondDetId::plane(), planePlots_, plotFactory::plot, plotOnline_, potPlots_, CTPPSDetId::rp(), SEC_PER_LUMI_SECTION, and dqmMemoryStats::total.

1275  {
1276  auto lumiCache = luminosityBlockCache(iLumi.index());
1277  if (!perLSsaving_) {
1278  if (plotOnline_)
1279  for (auto& plot : potPlots_)
1280  *(plot.second.hitDistribution2d_lumisection->getTH2F()) = *(lumiCache->hitDistribution2dMap[plot.first]);
1281 
1282  for (auto& plot : channelPlots_) {
1283  auto hitsCounterPerLumisection = lumiCache->hitsCounterMap[plot.first];
1284  if (hitsCounterPerLumisection != 0) {
1285  plot.second.hit_rate->Fill((double)hitsCounterPerLumisection / SEC_PER_LUMI_SECTION);
1286  }
1287 
1288  double HundredOverHitCounter = .0;
1289  if (plot.second.HitCounter != 0)
1290  HundredOverHitCounter = 100. / plot.second.HitCounter;
1291  plot.second.HPTDCErrorFlags->setBinContent(16, HundredOverHitCounter * plot.second.MHCounter);
1292  plot.second.leadingWithoutTrailing->setBinContent(1, HundredOverHitCounter * plot.second.LeadingOnlyCounter);
1293  plot.second.leadingWithoutTrailing->setBinContent(2, HundredOverHitCounter * plot.second.TrailingOnlyCounter);
1294  plot.second.leadingWithoutTrailing->setBinContent(3, HundredOverHitCounter * plot.second.CompleteCounter);
1295  }
1296 
1297  for (auto& plot : potPlots_) {
1298  double HundredOverHitCounterPot = 0.;
1299  if (plot.second.HitCounter != 0)
1300  HundredOverHitCounterPot = 100. / plot.second.HitCounter;
1301  plot.second.leadingWithoutTrailingCumulativePot->setBinContent(
1302  1, HundredOverHitCounterPot * plot.second.LeadingOnlyCounter);
1303  plot.second.leadingWithoutTrailingCumulativePot->setBinContent(
1304  2, HundredOverHitCounterPot * plot.second.TrailingOnlyCounter);
1305  plot.second.leadingWithoutTrailingCumulativePot->setBinContent(
1306  3, HundredOverHitCounterPot * plot.second.CompleteCounter);
1307 
1308  plot.second.MHComprensive->Reset();
1309  const CTPPSDiamondDetId rpId(plot.first);
1310  for (auto& chPlot : channelPlots_) {
1311  const CTPPSDiamondDetId chId(chPlot.first);
1312  if (chId.arm() == rpId.arm() && chId.rp() == rpId.rp()) {
1313  plot.second.MHComprensive->Fill(
1314  chId.plane(), chId.channel(), chPlot.second.HPTDCErrorFlags->getBinContent(16));
1315  }
1316  }
1317  }
1318  // Efficiencies of single channels
1319  if (plotOnline_)
1320  for (auto& plot : potPlots_) {
1321  plot.second.EfficiencyOfChannelsInPot->Reset();
1322  for (auto& element : plot.second.effTriplecountingChMap) {
1323  if (plot.second.effDoublecountingChMap[element.first] > 0) {
1324  int plane = element.first / 100;
1325  int channel = element.first % 100;
1326  double counted = element.second;
1327  double total = plot.second.effDoublecountingChMap[element.first];
1328  double efficiency = counted / total;
1329  // double error = std::sqrt( efficiency * ( 1 - efficiency ) / total );
1330 
1331  plot.second.EfficiencyOfChannelsInPot->Fill(plane, channel, 100 * efficiency);
1332  }
1333  }
1334  }
1335 
1336  // Efficeincy wrt pixels //TODO
1337  for (auto& plot : planePlots_) {
1338  TH2F* hitHistoTmp = plot.second.EfficiencyWRTPixelsInPlane->getTH2F();
1339 
1340  const CTPPSDiamondDetId detId(plot.first), detId_pot(detId.rpId());
1341  hitHistoTmp->Divide(&(plot.second.pixelTracksMapWithDiamonds), &(potPlots_[detId_pot].pixelTracksMap));
1342  }
1343  } //perLSsaving
1344 }
static constexpr double SEC_PER_LUMI_SECTION
Number of seconds per lumisection: used to compute hit rates in Hz.
std::unordered_map< unsigned int, ChannelPlots > channelPlots_
std::unordered_map< unsigned int, PotPlots > potPlots_
LuminosityBlockIndex index() const
Detector ID class for CTPPS Timing Diamond detectors. Bits [19:31] : Assigend in CTPPSDetId Calss Bit...
std::unordered_map< unsigned int, PlanePlots > planePlots_

Member Data Documentation

◆ centralOOT_

int CTPPSDiamondDQMSource::centralOOT_
private

Definition at line 228 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze(), and dqmBeginRun().

◆ CHANNEL_OF_VFAT_CLOCK

constexpr unsigned short CTPPSDiamondDQMSource::CHANNEL_OF_VFAT_CLOCK = 30
staticprivate

Channel ID of the VFAT that contains clock data.

Definition at line 86 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze().

◆ channelPlots_

std::unordered_map<unsigned int, ChannelPlots> CTPPSDiamondDQMSource::channelPlots_
private

Definition at line 239 of file CTPPSDiamondDQMSource.cc.

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

◆ CTPPS_DIAMOND_NUM_OF_CHANNELS

constexpr unsigned short CTPPSDiamondDQMSource::CTPPS_DIAMOND_NUM_OF_CHANNELS = 12
staticprivate

◆ CTPPS_FAR_RP_ID

constexpr unsigned short CTPPSDiamondDQMSource::CTPPS_FAR_RP_ID = 3
staticprivate

Definition at line 93 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze(), and dqmBeginRun().

◆ CTPPS_FED_ID_45

constexpr unsigned short CTPPSDiamondDQMSource::CTPPS_FED_ID_45 = 583
staticprivate

Definition at line 95 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze().

◆ CTPPS_FED_ID_56

constexpr unsigned short CTPPSDiamondDQMSource::CTPPS_FED_ID_56 = 582
staticprivate

Definition at line 96 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze().

◆ CTPPS_PIXEL_STATION_ID

constexpr unsigned short CTPPSDiamondDQMSource::CTPPS_PIXEL_STATION_ID = 2
staticprivate

Definition at line 92 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze(), and dqmBeginRun().

◆ ctppsGeometryEventToken_

edm::ESGetToken<CTPPSGeometry, VeryForwardRealGeometryRecord> CTPPSDiamondDQMSource::ctppsGeometryEventToken_
private

Definition at line 219 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze().

◆ ctppsGeometryRunToken_

edm::ESGetToken<CTPPSGeometry, VeryForwardRealGeometryRecord> CTPPSDiamondDQMSource::ctppsGeometryRunToken_
private

Definition at line 218 of file CTPPSDiamondDQMSource.cc.

Referenced by bookHistograms(), and dqmBeginRun().

◆ diamShifts_

std::unordered_map<CTPPSDetId, DiamondShifts> CTPPSDiamondDQMSource::diamShifts_
private

Definition at line 226 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze(), and dqmBeginRun().

◆ DISPLAY_RESOLUTION_FOR_HITS_MM

constexpr double CTPPSDiamondDQMSource::DISPLAY_RESOLUTION_FOR_HITS_MM = 0.1
staticprivate

Bin width of histograms showing hits and tracks (in mm)

Definition at line 88 of file CTPPSDiamondDQMSource.cc.

◆ EC_difference_45_

int CTPPSDiamondDQMSource::EC_difference_45_
private

Definition at line 241 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze().

◆ EC_difference_56_

int CTPPSDiamondDQMSource::EC_difference_56_
private

Definition at line 241 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze().

◆ excludeMultipleHits_

bool CTPPSDiamondDQMSource::excludeMultipleHits_
private

Definition at line 221 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze().

◆ extract_digi_info_

const bool CTPPSDiamondDQMSource::extract_digi_info_
private

Definition at line 222 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze(), and CTPPSDiamondDQMSource().

◆ FIRST_RUN_W_PIXELS

constexpr unsigned int CTPPSDiamondDQMSource::FIRST_RUN_W_PIXELS = 300000
staticprivate

Number of OOT indices monitored.

Definition at line 100 of file CTPPSDiamondDQMSource.cc.

Referenced by dqmBeginRun().

◆ globalPlot_

GlobalPlots CTPPSDiamondDQMSource::globalPlot_
private

Definition at line 235 of file CTPPSDiamondDQMSource.cc.

Referenced by bookHistograms().

◆ HPTDC_0_CHANNEL

constexpr unsigned short CTPPSDiamondDQMSource::HPTDC_0_CHANNEL = 6
staticprivate

Definition at line 97 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze(), and checkEventNumber().

◆ HPTDC_1_CHANNEL

constexpr unsigned short CTPPSDiamondDQMSource::HPTDC_1_CHANNEL = 7
staticprivate

Definition at line 98 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze(), and checkEventNumber().

◆ HPTDC_BIN_WIDTH_NS

constexpr double CTPPSDiamondDQMSource::HPTDC_BIN_WIDTH_NS = 25. / 1024
staticprivate

ns per HPTDC bin

Definition at line 91 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze().

◆ INV_DISPLAY_RESOLUTION_FOR_HITS_MM

constexpr double CTPPSDiamondDQMSource::INV_DISPLAY_RESOLUTION_FOR_HITS_MM = 1. / DISPLAY_RESOLUTION_FOR_HITS_MM
staticprivate

◆ perLSsaving_

bool CTPPSDiamondDQMSource::perLSsaving_
private

◆ planePlots_

std::unordered_map<unsigned int, PlanePlots> CTPPSDiamondDQMSource::planePlots_
private

Definition at line 238 of file CTPPSDiamondDQMSource.cc.

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

◆ plotOffline_

const bool CTPPSDiamondDQMSource::plotOffline_
private

Definition at line 231 of file CTPPSDiamondDQMSource.cc.

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

◆ plotOnline_

const bool CTPPSDiamondDQMSource::plotOnline_
private

◆ potPlots_

std::unordered_map<unsigned int, PotPlots> CTPPSDiamondDQMSource::potPlots_
private

◆ runParameters_

std::vector<std::pair<edm::EventRange, int> > CTPPSDiamondDQMSource::runParameters_
private

Definition at line 227 of file CTPPSDiamondDQMSource.cc.

Referenced by CTPPSDiamondDQMSource(), and dqmBeginRun().

◆ SEC_PER_LUMI_SECTION

constexpr double CTPPSDiamondDQMSource::SEC_PER_LUMI_SECTION = 23.31
staticprivate

Number of seconds per lumisection: used to compute hit rates in Hz.

Definition at line 84 of file CTPPSDiamondDQMSource.cc.

Referenced by globalEndLuminosityBlock().

◆ sectorPlots_

std::unordered_map<unsigned int, SectorPlots> CTPPSDiamondDQMSource::sectorPlots_
private

Definition at line 237 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze(), and bookHistograms().

◆ tokenDiamondHit_

edm::EDGetTokenT<edm::DetSetVector<CTPPSDiamondRecHit> > CTPPSDiamondDQMSource::tokenDiamondHit_
private

Definition at line 214 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze().

◆ tokenDiamondTrack_

edm::EDGetTokenT<edm::DetSetVector<CTPPSDiamondLocalTrack> > CTPPSDiamondDQMSource::tokenDiamondTrack_
private

Definition at line 215 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze().

◆ tokenDigi_

edm::EDGetTokenT<edm::DetSetVector<CTPPSDiamondDigi> > CTPPSDiamondDQMSource::tokenDigi_
private

Definition at line 213 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze(), and CTPPSDiamondDQMSource().

◆ tokenFEDInfo_

edm::EDGetTokenT<std::vector<TotemFEDInfo> > CTPPSDiamondDQMSource::tokenFEDInfo_
private

Definition at line 216 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze(), and CTPPSDiamondDQMSource().

◆ tokenPixelTrack_

edm::EDGetTokenT<edm::DetSetVector<CTPPSPixelLocalTrack> > CTPPSDiamondDQMSource::tokenPixelTrack_
private

Definition at line 212 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze().

◆ tokenStatus_

edm::EDGetTokenT<edm::DetSetVector<TotemVFATStatus> > CTPPSDiamondDQMSource::tokenStatus_
private

Definition at line 211 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze(), and CTPPSDiamondDQMSource().

◆ trackCorrelationThreshold_

unsigned int CTPPSDiamondDQMSource::trackCorrelationThreshold_
private

Definition at line 233 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze().

◆ verbosity_

unsigned int CTPPSDiamondDQMSource::verbosity_
private

Definition at line 229 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze(), and checkEventNumber().

◆ windowsNum_

unsigned int CTPPSDiamondDQMSource::windowsNum_
private

Definition at line 232 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze(), and bookHistograms().