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_CYL_RP_ID = 6
 
static constexpr unsigned short CTPPS_DIAMOND_CYL_STATION_ID = 1
 
static constexpr unsigned short CTPPS_DIAMOND_NUM_OF_CHANNELS = 12
 
static constexpr unsigned short CTPPS_FED_ID_45 = 583
 
static constexpr unsigned short CTPPS_FED_ID_56 = 582
 
static constexpr unsigned short CTPPS_PIXEL_FAR_RP_ID = 3
 
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 615 of file CTPPSDiamondDQMSource.cc.

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

616  : perLSsaving_(ps.getUntrackedParameter<bool>("perLSsaving", false)),
618  ps.getUntrackedParameter<edm::InputTag>("tagPixelLocalTracks"))),
620  ps.getUntrackedParameter<edm::InputTag>("tagDiamondRecHits"))),
622  ps.getUntrackedParameter<edm::InputTag>("tagDiamondLocalTracks"))),
623  ctppsGeometryRunToken_(esConsumes<CTPPSGeometry, VeryForwardRealGeometryRecord, edm::Transition::BeginRun>()),
624  ctppsGeometryEventToken_(esConsumes<CTPPSGeometry, VeryForwardRealGeometryRecord>()),
625  excludeMultipleHits_(ps.getParameter<bool>("excludeMultipleHits")),
626  extract_digi_info_(ps.getParameter<bool>("extractDigiInfo")),
627  centralOOT_(-999),
628  verbosity_(ps.getUntrackedParameter<unsigned int>("verbosity", 0)),
629  plotOnline_(ps.getUntrackedParameter<bool>("plotOnline", true)),
630  plotOffline_(ps.getUntrackedParameter<bool>("plotOffline", false)),
631  windowsNum_(ps.getUntrackedParameter<unsigned int>("windowsNum", 3)),
632  trackCorrelationThreshold_(ps.getUntrackedParameter<unsigned int>("trackCorrelationThreshold", 3)),
633  EC_difference_56_(-500),
634  EC_difference_45_(-500) {
635  if (extract_digi_info_) {
636  tokenStatus_ = consumes<edm::DetSetVector<TotemVFATStatus>>(ps.getUntrackedParameter<edm::InputTag>("tagStatus"));
637  tokenFEDInfo_ = consumes<std::vector<TotemFEDInfo>>(ps.getUntrackedParameter<edm::InputTag>("tagFEDInfo"));
638  tokenDigi_ = consumes<edm::DetSetVector<CTPPSDiamondDigi>>(ps.getUntrackedParameter<edm::InputTag>("tagDigi"));
639  }
640  for (const auto& pset : ps.getParameter<std::vector<edm::ParameterSet>>("offsetsOOT")) {
641  runParameters_.emplace_back(
642  std::make_pair(pset.getParameter<edm::EventRange>("validityRange"), pset.getParameter<int>("centralOOT")));
643  }
644 }
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 733 of file CTPPSDiamondDQMSource.cc.

References CTPPSDetId::arm(), centralOOT_, CHANNEL_OF_VFAT_CLOCK, channelAlignedWithTrack(), channelPlots_, checkEventNumber(), CTPPS_DIAMOND_CYL_RP_ID, CTPPS_DIAMOND_CYL_STATION_ID, CTPPS_FED_ID_45, CTPPS_FED_ID_56, CTPPS_PIXEL_FAR_RP_ID, 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_2024v12_cff::track, trackCorrelationThreshold_, DiMuonV_cfg::tracks, validateGeometry_cfg::valid, verbosity_, windowsNum_, and y.

733  {
734  // get event data
735 
739  if (extract_digi_info_) {
740  event.getByToken(tokenStatus_, diamondVFATStatus);
741  event.getByToken(tokenDigi_, diamondDigis);
742  event.getByToken(tokenFEDInfo_, fedInfo);
743  }
744 
746  event.getByToken(tokenPixelTrack_, pixelTracks);
747 
749  event.getByToken(tokenDiamondHit_, diamondRecHits);
750 
752  event.getByToken(tokenDiamondTrack_, diamondLocalTracks);
753 
754  const CTPPSGeometry* ctppsGeometry = &iSetup.getData(ctppsGeometryEventToken_);
755 
756  // check validity
757  bool valid = true;
758  if (extract_digi_info_) { // drop DIGI-level validity checks if not monitored
759  valid &= diamondVFATStatus.isValid();
760  valid &= diamondDigis.isValid();
761  valid &= fedInfo.isValid();
762  }
763  valid &= pixelTracks.isValid();
764  valid &= diamondRecHits.isValid();
765  valid &= diamondLocalTracks.isValid();
766 
767  if (!valid) {
768  if (verbosity_)
769  edm::LogProblem("CTPPSDiamondDQMSource")
770  << "ERROR in CTPPSDiamondDQMSource::analyze > some of the required inputs are not valid. Skipping this "
771  "event.\n"
772  << " DIGI-level: (checked? " << std::boolalpha << extract_digi_info_ << ")\n"
773  << " diamondVFATStatus.isValid = " << diamondVFATStatus.isValid() << "\n"
774  << " diamondDigis.isValid = " << diamondDigis.isValid() << "\n"
775  << " fedInfo.isValid = " << fedInfo.isValid() << "\n"
776  << " RECO-level:\n"
777  << " pixelTracks.isValid = " << pixelTracks.isValid() << "\n"
778  << " diamondRecHits.isValid = " << diamondRecHits.isValid() << "\n"
779  << " diamondLocalTracks.isValid = " << diamondLocalTracks.isValid();
780  return;
781  }
782 
783  //------------------------------
784  // Sector Plots
785  //------------------------------
786  // Using CTPPSDiamondLocalTrack
787  if (plotOffline_)
788 
789  // diamond timing detectors are located in:
790  // - 220cyl: "cylindrical pot" station (id=1), in horizontal Roman Pot with id=6 ("far")
791  // - 220nr_hr: "220m" station (id=2), in horizontal Roman Pot with id=2 ("near horizontal")
792 
793  for (const auto& tracks_220nr_hr : *diamondLocalTracks) {
794  // to preprare correlation plot, we need to select tracks from nr_hr pot in 220m station
795  const CTPPSDiamondDetId detId_220nr_hr(tracks_220nr_hr.detId());
796 
797  // selecting only tracks from 220nr station, realised as skipping tracks from 220cyl station
798  if ((detId_220nr_hr.rp() == CTPPS_DIAMOND_CYL_RP_ID) &&
799  (detId_220nr_hr.station() == CTPPS_DIAMOND_CYL_STATION_ID))
800  continue;
801 
802  if (potPlots_.count(detId_220nr_hr.rpId()) == 0)
803  continue;
804  TH1F* trackHistoInTimeTmp = potPlots_[detId_220nr_hr.rpId()].trackDistribution->getTH1F();
805 
806  for (const auto& track_220nr_hr : tracks_220nr_hr) {
807  if (!track_220nr_hr.isValid())
808  continue;
809 
810  // get the bins from per-pot plots
811  int startBin_220nr_hr = trackHistoInTimeTmp->FindBin(
812  track_220nr_hr.x0() - diamShifts_[detId_220nr_hr.rpId()].global - track_220nr_hr.x0Sigma());
813  int numOfBins_220nr_hr = 2 * track_220nr_hr.x0Sigma() * INV_DISPLAY_RESOLUTION_FOR_HITS_MM;
814 
815  for (const auto& tracks_220cyl : *diamondLocalTracks) {
816  CTPPSDiamondDetId detId_220cyl(tracks_220cyl.detId());
817 
818  // select tracks in the same arm, but belonging to the cylindrical pot
819  // that means skipping tracks from the opposite arm (skip if 220nr_hr.arm != 220cyl.arm)
820  // and skipping tracks from the 220nr_hr pot (skip if 220nr_hr == 220cyl.station)
821  if (detId_220nr_hr.arm() != detId_220cyl.arm() || detId_220nr_hr.station() == detId_220cyl.station())
822  continue;
823 
824  if (sectorPlots_.count(detId_220cyl.armId()) == 0)
825  continue;
826 
827  TH2F* trackHistoTmp = sectorPlots_[detId_220cyl.armId()].trackCorrelation->getTH2F();
828  TAxis* trackHistoTmpXAxis = trackHistoTmp->GetXaxis();
829  TAxis* trackHistoTmpYAxis = trackHistoTmp->GetYaxis();
830 
831  for (const auto& track_220cyl : tracks_220cyl) {
832  if (!track_220cyl.isValid())
833  continue;
834  int startBin_220cyl = trackHistoTmpYAxis->FindBin(
835  track_220cyl.x0() - diamShifts_[detId_220cyl.rpId()].global - track_220cyl.x0Sigma());
836  int numOfBins_220cyl = 2 * track_220cyl.x0Sigma() * INV_DISPLAY_RESOLUTION_FOR_HITS_MM;
837 
838  // fill the correlation plot
839  for (int i = 0; i < numOfBins_220nr_hr; ++i)
840  for (int y = 0; y < numOfBins_220cyl; ++y) {
841  float track_220nr_hr_x = trackHistoTmpXAxis->GetBinCenter(startBin_220nr_hr + i);
842  float track_220cyl_x = trackHistoTmpYAxis->GetBinCenter(startBin_220cyl + y);
843  trackHistoTmp->Fill(track_220nr_hr_x, track_220cyl_x);
844  // fill low multiplicity histogram
845  if (tracks_220nr_hr.size() < 3 && tracks_220cyl.size() < trackCorrelationThreshold_)
846  sectorPlots_[detId_220cyl.armId()].trackCorrelationLowMultiplicity->Fill(track_220nr_hr_x,
847  track_220cyl_x);
848  }
849  }
850  }
851  }
852  }
853 
854  //------------------------------
855  // RP Plots
856  //------------------------------
857 
858  //------------------------------
859  // Correlation Plots
860  //------------------------------
861 
862  if (extract_digi_info_) {
863  // Using CTPPSDiamondDigi
864  for (const auto& digis : *diamondDigis) {
865  const CTPPSDiamondDetId detId(digis.detId()), detId_pot(detId.rpId());
866  for (const auto& digi : digis) {
867  if (detId.channel() == CHANNEL_OF_VFAT_CLOCK)
868  continue;
869  if (potPlots_.count(detId_pot) == 0)
870  continue;
871  //Leading without trailing investigation
872  if (digi.leadingEdge() != 0 || digi.trailingEdge() != 0) {
873  ++potPlots_[detId_pot].HitCounter;
874  if (digi.leadingEdge() != 0) {
875  potPlots_[detId_pot].leadingEdgeCumulative_all->Fill(HPTDC_BIN_WIDTH_NS * digi.leadingEdge());
876  }
877  if (digi.leadingEdge() != 0 && digi.trailingEdge() == 0) {
878  ++potPlots_[detId_pot].LeadingOnlyCounter;
879  potPlots_[detId_pot].leadingEdgeCumulative_le->Fill(HPTDC_BIN_WIDTH_NS * digi.leadingEdge());
880  }
881  if (digi.leadingEdge() == 0 && digi.trailingEdge() != 0) {
882  ++potPlots_[detId_pot].TrailingOnlyCounter;
883  potPlots_[detId_pot].trailingEdgeCumulative_te->Fill(HPTDC_BIN_WIDTH_NS * digi.trailingEdge());
884  }
885  if (digi.leadingEdge() != 0 && digi.trailingEdge() != 0) {
886  ++potPlots_[detId_pot].CompleteCounter;
887  // potPlots_[detId_pot].leadingTrailingCorrelationPot->Fill(HPTDC_BIN_WIDTH_NS * digi.leadingEdge(),
888  // HPTDC_BIN_WIDTH_NS * digi.trailingEdge());
889  }
890  }
891 
892  // HPTDC Errors
893  const HPTDCErrorFlags hptdcErrors = digi.hptdcErrorFlags();
894  if (detId.channel() == HPTDC_0_CHANNEL ||
895  detId.channel() == HPTDC_1_CHANNEL) { // ch6 for HPTDC 0 and ch7 for HPTDC 1
896  int verticalIndex = 2 * detId.plane() + (detId.channel() - HPTDC_0_CHANNEL);
897  for (unsigned short hptdcErrorIndex = 1; hptdcErrorIndex < 16; ++hptdcErrorIndex)
898  if (hptdcErrors.errorId(hptdcErrorIndex - 1))
899  potPlots_[detId_pot].HPTDCErrorFlags_2D->Fill(hptdcErrorIndex, verticalIndex);
900  }
901  if (digi.multipleHit())
902  ++potPlots_[detId_pot].MHCounter;
903  }
904  }
905  }
906 
907  // EC Errors
908  if (extract_digi_info_) {
909  for (const auto& vfat_status : *diamondVFATStatus) {
910  const CTPPSDiamondDetId detId(vfat_status.detId());
911  for (const auto& status : vfat_status) {
912  if (!status.isOK())
913  continue;
914  if (potPlots_.count(detId.rpId()) == 0)
915  continue;
916  if (channelPlots_.count(detId) == 0)
917  continue;
918 
919  // Check Event Number
920  for (const auto& optorx : *fedInfo) {
921  if (detId.arm() == 1 && optorx.fedId() == CTPPS_FED_ID_56)
923  else if (detId.arm() == 0 && optorx.fedId() == CTPPS_FED_ID_45)
925  }
926  }
927  }
928  }
929 
930  // Using CTPPSDiamondRecHit
931  std::unordered_map<unsigned int, std::set<unsigned int>> planes;
932  std::unordered_map<unsigned int, std::set<unsigned int>> planes_inclusive;
933 
934  auto lumiCache = luminosityBlockCache(event.getLuminosityBlock().index());
935  for (const auto& rechits : *diamondRecHits) {
936  const CTPPSDiamondDetId detId(rechits.detId()), detId_pot(detId.rpId());
937  const auto& x_shift = diamShifts_.at(detId_pot);
938 
939  for (const auto& rechit : rechits) {
940  planes_inclusive[detId_pot].insert(detId.plane());
941  if (excludeMultipleHits_ && rechit.multipleHits() > 0)
942  continue;
943  if (rechit.toT() != 0 && centralOOT_ != -999 && rechit.ootIndex() == centralOOT_)
944  planes[detId_pot].insert(detId.plane());
945 
946  if (potPlots_.count(detId_pot) == 0)
947  continue;
948 
949  potPlots_[detId_pot].recHitTime->Fill(rechit.time());
950 
951  float UFSDShift = 0.0;
952  if (rechit.yWidth() < 3)
953  UFSDShift = 0.5; // Display trick for UFSD that have 2 pixels with same X
954 
955  if (rechit.toT() != 0 && centralOOT_ != -999 && rechit.ootIndex() == centralOOT_) {
956  TH2F* hitHistoTmp = potPlots_[detId_pot].hitDistribution2d->getTH2F();
957  TAxis* hitHistoTmpYAxis = hitHistoTmp->GetYaxis();
958  int startBin = hitHistoTmpYAxis->FindBin(rechit.x() - x_shift.global - 0.5 * rechit.xWidth());
959  int numOfBins = rechit.xWidth() * INV_DISPLAY_RESOLUTION_FOR_HITS_MM;
960  for (int i = 0; i < numOfBins; ++i)
961  hitHistoTmp->Fill(detId.plane() + UFSDShift, hitHistoTmpYAxis->GetBinCenter(startBin + i));
962 
963  if (!perLSsaving_ && plotOnline_) {
964  hitHistoTmp = lumiCache->hitDistribution2dMap[detId_pot].get();
965  hitHistoTmpYAxis = hitHistoTmp->GetYaxis();
966  startBin = hitHistoTmpYAxis->FindBin(rechit.x() - x_shift.global - 0.5 * rechit.xWidth());
967  numOfBins = rechit.xWidth() * INV_DISPLAY_RESOLUTION_FOR_HITS_MM;
968  for (int i = 0; i < numOfBins; ++i)
969  hitHistoTmp->Fill(detId.plane() + UFSDShift, hitHistoTmpYAxis->GetBinCenter(startBin + i));
970  }
971  }
972 
973  if (rechit.toT() > 0) {
974  // Both
975  potPlots_[detId_pot].leadingEdgeCumulative_both->Fill(rechit.time() + 25 * rechit.ootIndex());
976  potPlots_[detId_pot].timeOverThresholdCumulativePot->Fill(rechit.toT());
977 
978  TH2F* hitHistoOOTTmp = potPlots_[detId_pot].hitDistribution2dOOT->getTH2F();
979  TAxis* hitHistoOOTTmpYAxis = hitHistoOOTTmp->GetYaxis();
980  int startBin = hitHistoOOTTmpYAxis->FindBin(rechit.x() - x_shift.global - 0.5 * rechit.xWidth());
981  int numOfBins = rechit.xWidth() * INV_DISPLAY_RESOLUTION_FOR_HITS_MM;
982  for (int i = 0; i < numOfBins; ++i)
983  hitHistoOOTTmp->Fill(detId.plane() + 1. / windowsNum_ * rechit.ootIndex(),
984  hitHistoOOTTmpYAxis->GetBinCenter(startBin + i));
985 
986  } else if (rechit.ootIndex() != CTPPSDiamondRecHit::TIMESLICE_WITHOUT_LEADING && plotOnline_) {
987  // Only leading
988  TH2F* hitHistoOOTTmp = potPlots_[detId_pot].hitDistribution2dOOT_le->getTH2F();
989  TAxis* hitHistoOOTTmpYAxis = hitHistoOOTTmp->GetYaxis();
990  int startBin = hitHistoOOTTmpYAxis->FindBin(rechit.x() - x_shift.global - 0.5 * rechit.xWidth());
991  int numOfBins = rechit.xWidth() * INV_DISPLAY_RESOLUTION_FOR_HITS_MM;
992  for (int i = 0; i < numOfBins; ++i)
993  hitHistoOOTTmp->Fill(detId.plane() + 1. / windowsNum_ * rechit.ootIndex(),
994  hitHistoOOTTmpYAxis->GetBinCenter(startBin + i));
995  }
996  if (rechit.ootIndex() != CTPPSDiamondRecHit::TIMESLICE_WITHOUT_LEADING &&
997  potPlots_[detId_pot].activity_per_bx.count(rechit.ootIndex()) > 0)
998  potPlots_[detId_pot].activity_per_bx.at(rechit.ootIndex())->Fill(event.bunchCrossing());
999 
1000  // if(plotOffline_)
1001  // potPlots_[detId_pot].TOTVsLS->Fill(event.luminosityBlock(),rechit.toT());
1002  }
1003  }
1004 
1005  for (const auto& plt : potPlots_) {
1006  plt.second.activePlanes->Fill(planes[plt.first].size());
1007  if (plotOnline_)
1008  plt.second.activePlanesInclusive->Fill(planes_inclusive[plt.first].size());
1009  }
1010 
1011  // Using CTPPSDiamondLocalTrack
1012  for (const auto& tracks : *diamondLocalTracks) {
1013  const CTPPSDiamondDetId detId(tracks.detId()), detId_pot(detId.rpId());
1014  const auto& x_shift = diamShifts_.at(detId_pot);
1015 
1016  for (const auto& track : tracks) {
1017  if (!track.isValid())
1018  continue;
1020  continue;
1021  if (excludeMultipleHits_ && track.multipleHits() > 0)
1022  continue;
1023  if (potPlots_.count(detId_pot) == 0)
1024  continue;
1025 
1026  TH2F* trackHistoOOTTmp = potPlots_[detId_pot].trackDistributionOOT->getTH2F();
1027  TAxis* trackHistoOOTTmpYAxis = trackHistoOOTTmp->GetYaxis();
1028  int startBin = trackHistoOOTTmpYAxis->FindBin(track.x0() - x_shift.global - track.x0Sigma());
1029  int numOfBins = 2 * track.x0Sigma() * INV_DISPLAY_RESOLUTION_FOR_HITS_MM;
1030  for (int i = 0; i < numOfBins; ++i)
1031  trackHistoOOTTmp->Fill(track.ootIndex(), trackHistoOOTTmpYAxis->GetBinCenter(startBin + i));
1032 
1033  if (centralOOT_ != -999 && track.ootIndex() == centralOOT_) {
1034  TH1F* trackHistoInTimeTmp = potPlots_[detId_pot].trackDistribution->getTH1F();
1035  int startBin = trackHistoInTimeTmp->FindBin(track.x0() - x_shift.global - track.x0Sigma());
1036  int numOfBins = 2 * track.x0Sigma() * INV_DISPLAY_RESOLUTION_FOR_HITS_MM;
1037  for (int i = 0; i < numOfBins; ++i)
1038  trackHistoInTimeTmp->Fill(trackHistoInTimeTmp->GetBinCenter(startBin + i));
1039  }
1040  if (plotOffline_ && !perLSsaving_) {
1041  // potPlots_[detId_pot].trackTimeVsLS->Fill(event.luminosityBlock(),track.time());
1042  potPlots_[detId_pot].trackTimeVsBX->Fill(event.bunchCrossing(), track.time());
1043  }
1044  }
1045  }
1046 
1047  // Channel efficiency using CTPPSDiamondLocalTrack
1048  for (const auto& tracks : *diamondLocalTracks) {
1049  const CTPPSDiamondDetId detId(tracks.detId()), detId_pot(detId.rpId());
1050  for (const auto& track : tracks) {
1051  // Find hits and planes in the track
1052  int numOfHits = 0;
1053  std::set<int> planesInTrackSet;
1054  for (const auto& vec : *diamondRecHits) {
1055  const CTPPSDiamondDetId detid(vec.detId());
1056  if (detid.arm() != detId_pot.arm())
1057  continue;
1058 
1059  for (const auto& hit : vec) {
1060  // first check if the hit contributes to the track
1061  if (track.containsHit(hit)) {
1062  ++numOfHits;
1063  planesInTrackSet.insert(detid.plane());
1064  }
1065  }
1066  }
1067 
1068  if (numOfHits > 0 && numOfHits <= 10 && planesInTrackSet.size() > 2) {
1069  for (const auto& plt_vs_ch : channelPlots_) { // loop over all channels registered in geometry
1070  const CTPPSDiamondDetId detId(plt_vs_ch.first);
1071  if (detId.rpId() != detId_pot)
1072  continue;
1073  const unsigned short map_index = detId.plane() * 100 + detId.channel();
1074  if (potPlots_[detId_pot].effDoublecountingChMap.count(map_index) == 0) {
1075  potPlots_[detId_pot].effTriplecountingChMap[map_index] = 0;
1076  potPlots_[detId_pot].effDoublecountingChMap[map_index] = 0;
1077  }
1078  if (channelAlignedWithTrack(ctppsGeometry, detId, track, 0.2)) {
1079  // Channel should fire
1080  ++potPlots_[detId_pot].effDoublecountingChMap[map_index];
1081  for (const auto& rechits : *diamondRecHits) {
1082  const CTPPSDiamondDetId detId_hit(rechits.detId());
1083  if (detId_hit == detId)
1084  for (const auto& rechit : rechits)
1085  if (track.containsHit(rechit, 1)) // Channel fired
1086  ++potPlots_[detId_pot].effTriplecountingChMap[map_index];
1087  }
1088  }
1089  }
1090  }
1091  }
1092  }
1093 
1094  // Tomography of diamonds using pixel
1095  for (const auto& rechits : *diamondRecHits) {
1096  const CTPPSDiamondDetId detId(rechits.detId()), detId_pot(detId.rpId());
1097  const auto pix_shift = diamShifts_.at(detId_pot).withPixels;
1098  for (const auto& rechit : rechits) {
1099  if (excludeMultipleHits_ && rechit.multipleHits() > 0)
1100  continue;
1101  if (rechit.toT() == 0)
1102  continue;
1103  if (!pixelTracks.isValid())
1104  continue;
1105  if (potPlots_.count(detId_pot) == 0)
1106  continue;
1107 
1108  for (const auto& ds : *pixelTracks) {
1109  if (ds.size() > 1)
1110  continue;
1111  const CTPPSPixelDetId pixId(ds.detId());
1112  if (pixId.station() != CTPPS_PIXEL_STATION_ID || pixId.rp() != CTPPS_PIXEL_FAR_RP_ID)
1113  continue;
1114  for (const auto& lt : ds) {
1115  if (lt.isValid() && pixId.arm() == detId_pot.arm()) {
1116  if (rechit.ootIndex() != CTPPSDiamondRecHit::TIMESLICE_WITHOUT_LEADING && rechit.ootIndex() >= 0 &&
1117  potPlots_[detId_pot].pixelTomographyAll.count(rechit.ootIndex()) > 0 && lt.x0() - pix_shift < 24)
1118  potPlots_[detId_pot]
1119  .pixelTomographyAll.at(rechit.ootIndex())
1120  ->Fill(lt.x0() - pix_shift + 25 * detId.plane(), lt.y0());
1121  }
1122  }
1123  }
1124  }
1125  }
1126 
1127  //------------------------------
1128  // Clock Plots
1129  //------------------------------
1130  // Commented out to save space in the DQM files, but code should be kept
1131  // for ( const auto& digis : *diamondDigis ) {
1132  // const CTPPSDiamondDetId detId(digis.detId()), detId_pot(detId.rpId());
1133  // if ( detId.channel() == CHANNEL_OF_VFAT_CLOCK ) {
1134  // for ( const auto& digi : digis ) {
1135  // if ( digi.leadingEdge() != 0 ) {
1136  // if ( detId.plane() == 1 ) {
1137  // potPlots_[detId_pot].clock_Digi1_le->Fill( HPTDC_BIN_WIDTH_NS * digi.leadingEdge() );
1138  // potPlots_[detId_pot].clock_Digi1_te->Fill( HPTDC_BIN_WIDTH_NS * digi.trailingEdge() );
1139  // }
1140  // if ( detId.plane() == 3 ) {
1141  // potPlots_[detId_pot].clock_Digi3_le->Fill( HPTDC_BIN_WIDTH_NS * digi.leadingEdge() );
1142  // potPlots_[detId_pot].clock_Digi3_te->Fill( HPTDC_BIN_WIDTH_NS * digi.trailingEdge() );
1143  // }
1144  // }
1145  // }
1146  // }
1147  // }
1148 
1149  //------------------------------
1150  // Plane Plots
1151  //------------------------------
1152 
1153  // Using CTPPSDiamondDigi
1154  std::unordered_map<unsigned int, unsigned int> channelsPerPlane;
1155  if (extract_digi_info_) {
1156  for (const auto& digis : *diamondDigis) {
1157  const CTPPSDiamondDetId detId(digis.detId()), detId_plane(detId.planeId());
1158  for (const auto& digi : digis) {
1159  if (detId.channel() == CHANNEL_OF_VFAT_CLOCK)
1160  continue;
1161  if (planePlots_.count(detId_plane) == 0)
1162  continue;
1163 
1164  if (digi.leadingEdge() != 0) {
1165  planePlots_[detId_plane].digiProfileCumulativePerPlane->Fill(detId.channel());
1166  channelsPerPlane[detId_plane]++;
1167  }
1168 
1169  // Check dropped trailing edges
1170  if ((digi.trailingEdge() == 0) && (digi.leadingEdge() != 0)) {
1171  planePlots_[detId_plane].leadingEdgeCumulativePerPlane_le->Fill(HPTDC_BIN_WIDTH_NS * digi.leadingEdge());
1172  } else if ((digi.leadingEdge() == 0 && (digi.trailingEdge() != 0))) { // check dropped leading edges
1173  planePlots_[detId_plane].trailingEdgeCumulativePerPlane_te->Fill(HPTDC_BIN_WIDTH_NS * digi.trailingEdge());
1174  }
1175  }
1176  }
1177  }
1178 
1179  for (const auto& plt : channelsPerPlane)
1180  planePlots_[plt.first].hit_multiplicity->Fill(plt.second);
1181 
1182  // Using CTPPSDiamondRecHit
1183  for (const auto& rechits : *diamondRecHits) {
1184  const CTPPSDiamondDetId detId(rechits.detId()), detId_plane(detId.planeId()), detId_pot(detId.rpId());
1185  for (const auto& rechit : rechits) {
1186  if (excludeMultipleHits_ && rechit.multipleHits() > 0)
1187  continue;
1188  if (rechit.toT() == 0)
1189  continue;
1190 
1191  if (rechit.ootIndex() != CTPPSDiamondRecHit::TIMESLICE_WITHOUT_LEADING) {
1192  planePlots_[detId_plane].leadingEdgeCumulativePerPlane_both->Fill(rechit.time() + 25 * rechit.ootIndex());
1193  planePlots_[detId_plane].TimeOverThresholdCumulativePerPlane->Fill(rechit.toT());
1194  }
1195  if (planePlots_.count(detId_plane) != 0) {
1196  if (centralOOT_ != -999 && rechit.ootIndex() == centralOOT_) {
1197  TH1F* hitHistoTmp = planePlots_[detId_plane].hitProfile->getTH1F();
1198  int startBin = hitHistoTmp->FindBin(rechit.x() - diamShifts_.at(detId_pot).global - 0.5 * rechit.xWidth());
1199  int numOfBins = rechit.xWidth() * INV_DISPLAY_RESOLUTION_FOR_HITS_MM;
1200  for (int i = 0; i < numOfBins; ++i)
1201  hitHistoTmp->Fill(hitHistoTmp->GetBinCenter(startBin + i));
1202  }
1203  }
1204  }
1205  }
1206 
1207  //Tomography of diamonds using pixel and Efficiency WRT Pixels
1208  for (const auto& ds : *pixelTracks) {
1209  const CTPPSPixelDetId pixId(ds.detId());
1210  if (pixId.station() != CTPPS_PIXEL_STATION_ID || pixId.rp() != CTPPS_PIXEL_FAR_RP_ID)
1211  continue;
1212  if (ds.size() > 1)
1213  continue;
1214  for (const auto& lt : ds) {
1215  if (lt.isValid()) {
1216  for (const auto& sh_vs_id : diamShifts_) {
1217  const CTPPSDiamondDetId& detId_pot = sh_vs_id.first;
1218  const auto& shift = sh_vs_id.second;
1219  if (detId_pot.arm() == pixId.arm())
1220  // For efficieny
1221  potPlots_[detId_pot].pixelTracksMap.Fill(lt.x0() - shift.withPixels, lt.y0());
1222  }
1223 
1224  std::set<CTPPSDiamondDetId> planesWitHits_set;
1225  for (const auto& rechits : *diamondRecHits) {
1226  const CTPPSDiamondDetId detId(rechits.detId()), detId_plane(detId.planeId()), detId_pot(detId.rpId());
1227  const auto pix_shift = diamShifts_.at(detId_pot).withPixels;
1228  for (const auto& rechit : rechits) {
1229  if (excludeMultipleHits_ && rechit.multipleHits() > 0)
1230  continue;
1231  if (rechit.ootIndex() == CTPPSDiamondRecHit::TIMESLICE_WITHOUT_LEADING || rechit.toT() == 0)
1232  continue;
1233  if (planePlots_.count(detId_plane) == 0)
1234  continue;
1235  if (pixId.arm() == detId_plane.arm() && lt.x0() - pix_shift < 24) {
1236  planePlots_[detId_plane].pixelTomography_far->Fill(lt.x0() - pix_shift + 25 * rechit.ootIndex(), lt.y0());
1237  if (centralOOT_ != -999 && rechit.ootIndex() == centralOOT_)
1238  planesWitHits_set.insert(detId_plane);
1239  }
1240  }
1241  }
1242 
1243  for (auto& planeId : planesWitHits_set)
1244  planePlots_[planeId].pixelTracksMapWithDiamonds.Fill(lt.x0() - diamShifts_.at(planeId.rpId()).withPixels,
1245  lt.y0());
1246  }
1247  }
1248  }
1249 
1250  //------------------------------
1251  // Channel Plots
1252  //------------------------------
1253 
1254  // digi profile cumulative
1255  if (extract_digi_info_) {
1256  for (const auto& digis : *diamondDigis) {
1257  const CTPPSDiamondDetId detId(digis.detId());
1258  for (const auto& digi : digis) {
1259  if (detId.channel() == CHANNEL_OF_VFAT_CLOCK)
1260  continue;
1261  if (channelPlots_.count(detId) != 0) {
1262  // HPTDC Errors
1263  const HPTDCErrorFlags hptdcErrors = digi.hptdcErrorFlags();
1264  for (unsigned short hptdcErrorIndex = 1; hptdcErrorIndex < 16; ++hptdcErrorIndex)
1265  if (hptdcErrors.errorId(hptdcErrorIndex - 1))
1266  channelPlots_[detId].HPTDCErrorFlags->Fill(hptdcErrorIndex);
1267  if (digi.multipleHit())
1268  ++channelPlots_[detId].MHCounter;
1269 
1270  // Check dropped trailing edges
1271  if (digi.leadingEdge() != 0 || digi.trailingEdge() != 0) {
1272  ++channelPlots_[detId].HitCounter;
1273  if (digi.trailingEdge() == 0) {
1274  ++channelPlots_[detId].LeadingOnlyCounter;
1275  channelPlots_[detId].leadingEdgeCumulative_le->Fill(HPTDC_BIN_WIDTH_NS * digi.leadingEdge());
1276  } else if (digi.leadingEdge() == 0) {
1277  ++channelPlots_[detId].TrailingOnlyCounter;
1278  channelPlots_[detId].trailingEdgeCumulative_te->Fill(HPTDC_BIN_WIDTH_NS * digi.trailingEdge());
1279  } else {
1280  ++channelPlots_[detId].CompleteCounter;
1281  // channelPlots_[detId].LeadingTrailingCorrelationPerChannel->Fill(HPTDC_BIN_WIDTH_NS * digi.leadingEdge(),
1282  // HPTDC_BIN_WIDTH_NS * digi.trailingEdge());
1283  }
1284  }
1285  }
1286  }
1287  }
1288  }
1289 
1290  // Using CTPPSDiamondRecHit
1291 
1292  for (const auto& rechits : *diamondRecHits) {
1293  CTPPSDiamondDetId detId(rechits.detId());
1294  for (const auto& rechit : rechits) {
1295  if (excludeMultipleHits_ && rechit.multipleHits() > 0)
1296  continue;
1297  if (channelPlots_.count(detId) != 0) {
1298  channelPlots_[detId].recHitTime->Fill(rechit.time());
1299  if (rechit.ootIndex() != CTPPSDiamondRecHit::TIMESLICE_WITHOUT_LEADING && rechit.toT() != 0) {
1300  channelPlots_[detId].leadingEdgeCumulative_both->Fill(rechit.time() + 25 * rechit.ootIndex());
1301  channelPlots_[detId].TimeOverThresholdCumulativePerChannel->Fill(rechit.toT());
1302  }
1303  ++lumiCache->hitsCounterMap[detId];
1304 
1305  if (rechit.ootIndex() != CTPPSDiamondRecHit::TIMESLICE_WITHOUT_LEADING &&
1306  channelPlots_[detId].activity_per_bx.count(rechit.ootIndex()) > 0)
1307  channelPlots_[detId].activity_per_bx.at(rechit.ootIndex())->Fill(event.bunchCrossing());
1308  }
1309  }
1310  }
1311 
1312  // Tomography of diamonds using pixel
1313  for (const auto& rechits : *diamondRecHits) {
1314  const CTPPSDiamondDetId detId(rechits.detId()), detId_pot(detId.rpId());
1315  const auto shift_pix = diamShifts_.at(detId_pot).withPixels;
1316  for (const auto& rechit : rechits) {
1317  if (excludeMultipleHits_ && rechit.multipleHits() > 0)
1318  continue;
1319  if (rechit.ootIndex() == CTPPSDiamondRecHit::TIMESLICE_WITHOUT_LEADING || rechit.toT() == 0)
1320  continue;
1321  if (!pixelTracks.isValid())
1322  continue;
1323  if (channelPlots_.count(detId) == 0)
1324  continue;
1325 
1326  for (const auto& ds : *pixelTracks) {
1327  const CTPPSPixelDetId pixId(ds.detId());
1328  if (pixId.station() != CTPPS_PIXEL_STATION_ID || pixId.rp() != CTPPS_PIXEL_FAR_RP_ID)
1329  continue;
1330  if (ds.size() > 1)
1331  continue;
1332  for (const auto& lt : ds) {
1333  if (lt.isValid() && pixId.arm() == detId.arm() && lt.x0() - shift_pix < 24)
1334  channelPlots_[detId].pixelTomography_far->Fill(lt.x0() - shift_pix + 25 * rechit.ootIndex(), lt.y0());
1335  }
1336  }
1337  }
1338  }
1339 }
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_DIAMOND_CYL_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
static constexpr unsigned short CTPPS_DIAMOND_CYL_STATION_ID
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 CTPPS_PIXEL_FAR_RP_ID
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 676 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_.

676  {
677  ibooker.cd();
678  ibooker.setCurrentFolder("CTPPS");
679 
680  globalPlot_ = GlobalPlots(ibooker);
681 
682  // book plots from the geometry
684  for (auto it = geom.beginSensor(); it != geom.endSensor(); ++it) {
685  if (!CTPPSDiamondDetId::check(it->first))
686  continue;
687  // per-channel plots
688  const CTPPSDiamondDetId chId(it->first);
689  if (plotOnline_ && channelPlots_.count(chId) == 0)
690  channelPlots_[chId] = ChannelPlots(ibooker, chId, windowsNum_);
691 
692  // per-plane plots
693  const CTPPSDiamondDetId plId(chId.planeId());
694  if (planePlots_.count(plId) == 0)
695  planePlots_[plId] = PlanePlots(ibooker, plId, windowsNum_);
696  // per-pot plots
697  const CTPPSDiamondDetId rpId(chId.rpId());
698  if (potPlots_.count(rpId) == 0)
699  potPlots_[rpId] = PotPlots(ibooker, rpId, windowsNum_, plotOnline_, plotOffline_, perLSsaving_);
700 
701  // per-sector plots
702  const CTPPSDiamondDetId secId(chId.armId());
703  if (plotOffline_ && sectorPlots_.count(secId) == 0)
704  sectorPlots_[secId] = SectorPlots(ibooker, secId, plotOnline_);
705  }
706 }
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 1416 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().

1420  {
1421  const CTPPSDiamondDetId detId_pot(detId.rpId());
1422  if (plotOnline_)
1423  plots.ECCheck->Fill((int)((optorx.lv1() & 0xFF) - ((unsigned int)status.ec() & 0xFF)) & 0xFF);
1424  if ((static_cast<int>((optorx.lv1() & 0xFF) - status.ec()) != EC_difference) &&
1425  (static_cast<uint8_t>((optorx.lv1() & 0xFF) - status.ec()) < 128))
1426  EC_difference = static_cast<int>(optorx.lv1() & 0xFF) - (static_cast<unsigned int>(status.ec()) & 0xFF);
1427  if (EC_difference != 1 && EC_difference != -500 && std::abs(EC_difference) < 127) {
1428  if (detId.channel() == HPTDC_0_CHANNEL || detId.channel() == HPTDC_1_CHANNEL)
1429  plots.HPTDCErrorFlags_2D->Fill(16, 2 * detId.plane() + (detId.channel() - HPTDC_0_CHANNEL));
1430  if (verbosity_)
1431  edm::LogProblem("CTPPSDiamondDQMSource")
1432  << "FED " << optorx.fedId() << ": ECError at EV: 0x" << std::hex << optorx.lv1() << "\t\tVFAT EC: 0x"
1433  << static_cast<unsigned int>(status.ec()) << "\twith ID: " << std::dec << detId
1434  << "\tdiff: " << EC_difference;
1435  }
1436 }
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 648 of file CTPPSDiamondDQMSource.cc.

References CTPPSDetId::arm(), centralOOT_, CTPPSDiamondDetId::check(), edm::contains(), CTPPS_PIXEL_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_.

648  {
649  centralOOT_ = -999;
650  for (const auto& oot : runParameters_) {
651  if (edm::contains(oot.first, edm::EventID(iRun.run(), 0, 1))) {
652  centralOOT_ = oot.second;
653  break;
654  }
655  }
656 
657  // Get detector shifts from the geometry
659  for (auto it = geom.beginRP(); it != geom.endRP(); ++it)
660  if (CTPPSDiamondDetId::check(it->first)) {
661  const CTPPSDiamondDetId diam_id(it->first);
662  const auto diam = geom.sensor(it->first);
663  diamShifts_[diam_id].global = diam->translation().x() - diam->getDiamondDimensions().xHalfWidth;
664  if (iRun.run() > FIRST_RUN_W_PIXELS) { // pixel installed
665  const CTPPSPixelDetId pixid(diam_id.arm(), CTPPS_PIXEL_STATION_ID, CTPPS_PIXEL_FAR_RP_ID);
666  auto pix = geom.sensor(pixid);
667  // Rough alignement of pixel detector for diamond tomography
668  diamShifts_[diam_id].withPixels =
669  pix->translation().x() - pix->getDiamondDimensions().xHalfWidth - diamShifts_[diam_id].global - 1.;
670  }
671  }
672 }
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_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...
static constexpr unsigned short CTPPS_PIXEL_FAR_RP_ID

◆ dqmEndRun()

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

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

Definition at line 1440 of file CTPPSDiamondDQMSource.cc.

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

1440  {
1441  if (plotOffline_ && !perLSsaving_)
1442  for (const auto& rpPlots : potPlots_) {
1443  auto plots = rpPlots.second;
1444  // *(plots.TOTVsLSProfile->getTProfile())=*plots.TOTVsLS->getTH2F()->ProfileX();
1445  // *(plots.trackTimeVsLSProfile->getTProfile())=*plots.trackTimeVsLS->getTH2F()->ProfileX();
1446  *(plots.trackTimeVsBXProfile->getTProfile()) = *plots.trackTimeVsBX->getTH2F()->ProfileX();
1447  // *(plots.trackTimeVsXAngleProfile->getTProfile()) = *plots.trackTimeVsXAngle->getTH2F()->ProfileX();
1448  }
1449 }
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 710 of file CTPPSDiamondDQMSource.cc.

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

711  {
712  auto d = std::make_shared<dds::Cache>();
713  d->hitDistribution2dMap.reserve(potPlots_.size());
714  if (!perLSsaving_ && plotOnline_) {
715  for (auto& plot : potPlots_) {
716  d->hitDistribution2dMap[plot.first] = std::make_unique<TH2F>(
717  "hits in planes lumisection",
718  (std::string(plot.second.hitDistribution2d_lumisection->getTH2F()->GetTitle()) + ";plane number;x (mm)")
719  .c_str(),
720  10,
721  -0.5,
722  4.5,
724  -0.5,
725  18.5);
726  }
727  }
728  return d;
729 }
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 1343 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.

1343  {
1344  auto lumiCache = luminosityBlockCache(iLumi.index());
1345  if (!perLSsaving_) {
1346  if (plotOnline_)
1347  for (auto& plot : potPlots_)
1348  *(plot.second.hitDistribution2d_lumisection->getTH2F()) = *(lumiCache->hitDistribution2dMap[plot.first]);
1349 
1350  for (auto& plot : channelPlots_) {
1351  auto hitsCounterPerLumisection = lumiCache->hitsCounterMap[plot.first];
1352  if (hitsCounterPerLumisection != 0) {
1353  plot.second.hit_rate->Fill((double)hitsCounterPerLumisection / SEC_PER_LUMI_SECTION);
1354  }
1355 
1356  double HundredOverHitCounter = .0;
1357  if (plot.second.HitCounter != 0)
1358  HundredOverHitCounter = 100. / plot.second.HitCounter;
1359  plot.second.HPTDCErrorFlags->setBinContent(16, HundredOverHitCounter * plot.second.MHCounter);
1360  plot.second.leadingWithoutTrailing->setBinContent(1, HundredOverHitCounter * plot.second.LeadingOnlyCounter);
1361  plot.second.leadingWithoutTrailing->setBinContent(2, HundredOverHitCounter * plot.second.TrailingOnlyCounter);
1362  plot.second.leadingWithoutTrailing->setBinContent(3, HundredOverHitCounter * plot.second.CompleteCounter);
1363  }
1364 
1365  for (auto& plot : potPlots_) {
1366  double HundredOverHitCounterPot = 0.;
1367  if (plot.second.HitCounter != 0)
1368  HundredOverHitCounterPot = 100. / plot.second.HitCounter;
1369  plot.second.leadingWithoutTrailingCumulativePot->setBinContent(
1370  1, HundredOverHitCounterPot * plot.second.LeadingOnlyCounter);
1371  plot.second.leadingWithoutTrailingCumulativePot->setBinContent(
1372  2, HundredOverHitCounterPot * plot.second.TrailingOnlyCounter);
1373  plot.second.leadingWithoutTrailingCumulativePot->setBinContent(
1374  3, HundredOverHitCounterPot * plot.second.CompleteCounter);
1375 
1376  plot.second.MHComprensive->Reset();
1377  const CTPPSDiamondDetId rpId(plot.first);
1378  for (auto& chPlot : channelPlots_) {
1379  const CTPPSDiamondDetId chId(chPlot.first);
1380  if (chId.arm() == rpId.arm() && chId.rp() == rpId.rp()) {
1381  plot.second.MHComprensive->Fill(
1382  chId.plane(), chId.channel(), chPlot.second.HPTDCErrorFlags->getBinContent(16));
1383  }
1384  }
1385  }
1386  // Efficiencies of single channels
1387  if (plotOnline_)
1388  for (auto& plot : potPlots_) {
1389  plot.second.EfficiencyOfChannelsInPot->Reset();
1390  for (auto& element : plot.second.effTriplecountingChMap) {
1391  if (plot.second.effDoublecountingChMap[element.first] > 0) {
1392  int plane = element.first / 100;
1393  int channel = element.first % 100;
1394  double counted = element.second;
1395  double total = plot.second.effDoublecountingChMap[element.first];
1396  double efficiency = counted / total;
1397  // double error = std::sqrt( efficiency * ( 1 - efficiency ) / total );
1398 
1399  plot.second.EfficiencyOfChannelsInPot->Fill(plane, channel, 100 * efficiency);
1400  }
1401  }
1402  }
1403 
1404  // Efficeincy wrt pixels //TODO
1405  for (auto& plot : planePlots_) {
1406  TH2F* hitHistoTmp = plot.second.EfficiencyWRTPixelsInPlane->getTH2F();
1407 
1408  const CTPPSDiamondDetId detId(plot.first), detId_pot(detId.rpId());
1409  hitHistoTmp->Divide(&(plot.second.pixelTracksMapWithDiamonds), &(potPlots_[detId_pot].pixelTracksMap));
1410  }
1411  } //perLSsaving
1412 }
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 233 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 244 of file CTPPSDiamondDQMSource.cc.

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

◆ CTPPS_DIAMOND_CYL_RP_ID

constexpr unsigned short CTPPSDiamondDQMSource::CTPPS_DIAMOND_CYL_RP_ID = 6
staticprivate

Definition at line 95 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze().

◆ CTPPS_DIAMOND_CYL_STATION_ID

constexpr unsigned short CTPPSDiamondDQMSource::CTPPS_DIAMOND_CYL_STATION_ID = 1
staticprivate

Definition at line 94 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze().

◆ CTPPS_DIAMOND_NUM_OF_CHANNELS

constexpr unsigned short CTPPSDiamondDQMSource::CTPPS_DIAMOND_NUM_OF_CHANNELS = 12
staticprivate

◆ CTPPS_FED_ID_45

constexpr unsigned short CTPPSDiamondDQMSource::CTPPS_FED_ID_45 = 583
staticprivate

Definition at line 97 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze().

◆ CTPPS_FED_ID_56

constexpr unsigned short CTPPSDiamondDQMSource::CTPPS_FED_ID_56 = 582
staticprivate

Definition at line 98 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze().

◆ CTPPS_PIXEL_FAR_RP_ID

constexpr unsigned short CTPPSDiamondDQMSource::CTPPS_PIXEL_FAR_RP_ID = 3
staticprivate

Definition at line 93 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze(), and dqmBeginRun().

◆ 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 224 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze().

◆ ctppsGeometryRunToken_

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

Definition at line 223 of file CTPPSDiamondDQMSource.cc.

Referenced by bookHistograms(), and dqmBeginRun().

◆ diamShifts_

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

Definition at line 231 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 246 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze().

◆ EC_difference_56_

int CTPPSDiamondDQMSource::EC_difference_56_
private

Definition at line 246 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze().

◆ excludeMultipleHits_

bool CTPPSDiamondDQMSource::excludeMultipleHits_
private

Definition at line 226 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze().

◆ extract_digi_info_

const bool CTPPSDiamondDQMSource::extract_digi_info_
private

Definition at line 227 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 102 of file CTPPSDiamondDQMSource.cc.

Referenced by dqmBeginRun().

◆ globalPlot_

GlobalPlots CTPPSDiamondDQMSource::globalPlot_
private

Definition at line 240 of file CTPPSDiamondDQMSource.cc.

Referenced by bookHistograms().

◆ HPTDC_0_CHANNEL

constexpr unsigned short CTPPSDiamondDQMSource::HPTDC_0_CHANNEL = 6
staticprivate

Definition at line 99 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze(), and checkEventNumber().

◆ HPTDC_1_CHANNEL

constexpr unsigned short CTPPSDiamondDQMSource::HPTDC_1_CHANNEL = 7
staticprivate

Definition at line 100 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 243 of file CTPPSDiamondDQMSource.cc.

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

◆ plotOffline_

const bool CTPPSDiamondDQMSource::plotOffline_
private

Definition at line 236 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 232 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 242 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze(), and bookHistograms().

◆ tokenDiamondHit_

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

Definition at line 219 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze().

◆ tokenDiamondTrack_

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

Definition at line 220 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze().

◆ tokenDigi_

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

Definition at line 218 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze(), and CTPPSDiamondDQMSource().

◆ tokenFEDInfo_

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

Definition at line 221 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze(), and CTPPSDiamondDQMSource().

◆ tokenPixelTrack_

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

Definition at line 217 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze().

◆ tokenStatus_

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

Definition at line 216 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze(), and CTPPSDiamondDQMSource().

◆ trackCorrelationThreshold_

unsigned int CTPPSDiamondDQMSource::trackCorrelationThreshold_
private

Definition at line 238 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze().

◆ verbosity_

unsigned int CTPPSDiamondDQMSource::verbosity_
private

Definition at line 234 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze(), and checkEventNumber().

◆ windowsNum_

unsigned int CTPPSDiamondDQMSource::windowsNum_
private

Definition at line 237 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze(), and bookHistograms().