CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
 
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)
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex >
const & 
esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector
< ProductResolverIndexAndSkipBit >
const & 
itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const * > *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Protected Member Functions

void analyze (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
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
void resetItemsToGetFrom (BranchType iType)
 

Private Member Functions

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

Private Attributes

int centralOOT_
 
std::unordered_map< unsigned
int, ChannelPlots
channelPlots_
 
edm::ESGetToken< CTPPSGeometry,
VeryForwardRealGeometryRecord
ctppsGeometryEventToken_
 
edm::ESGetToken< CTPPSGeometry,
VeryForwardRealGeometryRecord
ctppsGeometryRunToken_
 
std::unordered_map< CTPPSDetId,
DiamondShifts
diamShifts_
 
int EC_difference_45_
 
int EC_difference_56_
 
bool excludeMultipleHits_
 
const bool extract_digi_info_
 
GlobalPlots globalPlot_
 
bool perLSsaving_
 
std::unordered_map< unsigned
int, PlanePlots
planePlots_
 
const bool plotOffline_
 
const bool plotOnline_
 
std::unordered_map< unsigned
int, PotPlots
potPlots_
 
std::vector< std::pair
< edm::EventRange, int > > 
runParameters_
 
std::unordered_map< unsigned
int, SectorPlots
sectorPlots_
 
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
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 72 of file CTPPSDiamondDQMSource.cc.

Constructor & Destructor Documentation

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

Definition at line 588 of file CTPPSDiamondDQMSource.cc.

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

589  : perLSsaving_(ps.getUntrackedParameter<bool>("perLSsaving", false)),
596  ctppsGeometryRunToken_(esConsumes<CTPPSGeometry, VeryForwardRealGeometryRecord, edm::Transition::BeginRun>()),
597  ctppsGeometryEventToken_(esConsumes<CTPPSGeometry, VeryForwardRealGeometryRecord>()),
598  // ctppsLhcInfoToken_(esConsumes<LHCInfo, LHCInfoRcd>()),
599  excludeMultipleHits_(ps.getParameter<bool>("excludeMultipleHits")),
600  extract_digi_info_(ps.getParameter<bool>("extractDigiInfo")),
601  centralOOT_(-999),
602  verbosity_(ps.getUntrackedParameter<unsigned int>("verbosity", 0)),
603  plotOnline_(ps.getUntrackedParameter<bool>("plotOnline", true)),
604  plotOffline_(ps.getUntrackedParameter<bool>("plotOffline", false)),
605  windowsNum_(ps.getUntrackedParameter<unsigned int>("windowsNum", 3)),
606  trackCorrelationThreshold_(ps.getUntrackedParameter<unsigned int>("trackCorrelationThreshold", 3)),
607  EC_difference_56_(-500),
608  EC_difference_45_(-500) {
609  if (extract_digi_info_) {
610  tokenStatus_ = consumes<edm::DetSetVector<TotemVFATStatus>>(ps.getParameter<edm::InputTag>("tagStatus"));
611  tokenFEDInfo_ = consumes<std::vector<TotemFEDInfo>>(ps.getParameter<edm::InputTag>("tagFEDInfo"));
612  tokenDigi_ = consumes<edm::DetSetVector<CTPPSDiamondDigi>>(ps.getParameter<edm::InputTag>("tagDigi"));
613  }
614  for (const auto& pset : ps.getParameter<std::vector<edm::ParameterSet>>("offsetsOOT")) {
615  runParameters_.emplace_back(
616  std::make_pair(pset.getParameter<edm::EventRange>("validityRange"), pset.getParameter<int>("centralOOT")));
617  }
618 }
T getUntrackedParameter(std::string const &, T const &) const
edm::EDGetTokenT< edm::DetSetVector< CTPPSDiamondRecHit > > tokenDiamondHit_
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)
std::vector< std::pair< edm::EventRange, int > > runParameters_
edm::EDGetTokenT< edm::DetSetVector< CTPPSDiamondDigi > > tokenDigi_
edm::EDGetTokenT< edm::DetSetVector< TotemVFATStatus > > tokenStatus_
T getParameter(std::string const &) const
Definition: ParameterSet.h:303

Member Function Documentation

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

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

Definition at line 698 of file CTPPSDiamondDQMSource.cc.

References CTPPSDetId::arm(), edm::EventBase::bunchCrossing(), centralOOT_, CTPPSDiamondDetId::channel(), CHANNEL_OF_VFAT_CLOCK, channelAlignedWithTrack(), channelPlots_, checkEventNumber(), CTPPS_FAR_RP_ID, CTPPS_FED_ID_45, CTPPS_FED_ID_56, CTPPS_PIXEL_STATION_ID, ctppsGeometryEventToken_, diamShifts_, EC_difference_45_, EC_difference_56_, HPTDCErrorFlags::errorId(), excludeMultipleHits_, extract_digi_info_, HcalObjRepresent::Fill(), edm::EventSetup::getData(), edm::Event::getLuminosityBlock(), HPTDC_0_CHANNEL, HPTDC_1_CHANNEL, HPTDC_BIN_WIDTH_NS, mps_fire::i, edm::LuminosityBlock::index(), edm::eventsetup::heterocontainer::insert(), INV_DISPLAY_RESOLUTION_FOR_HITS_MM, edm::HandleBase::isValid(), lt, perLSsaving_, HLT_FULL_cff::pixelTracks, CTPPSDiamondDetId::plane(), planePlots_, plotOffline_, plotOnline_, potPlots_, HI_PhotonSkim_cff::rechits, CTPPSDetId::rpId(), sectorPlots_, edm::shift, mps_update::status, CTPPSDiamondRecHit::TIMESLICE_WITHOUT_LEADING, tokenDiamondHit_, tokenDiamondTrack_, tokenDigi_, tokenFEDInfo_, tokenPixelTrack_, tokenStatus_, HLT_FULL_cff::track, trackCorrelationThreshold_, tracks, verbosity_, and y.

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

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

Definition at line 650 of file CTPPSDiamondDQMSource.cc.

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

650  {
651  ibooker.cd();
652  ibooker.setCurrentFolder("CTPPS");
653 
654  globalPlot_ = GlobalPlots(ibooker);
655 
656  // book plots from the geometry
658  for (auto it = geom.beginSensor(); it != geom.endSensor(); ++it) {
659  if (!CTPPSDiamondDetId::check(it->first))
660  continue;
661  // per-channel plots
662  const CTPPSDiamondDetId chId(it->first);
663  if (plotOnline_ && channelPlots_.count(chId) == 0)
664  channelPlots_[chId] = ChannelPlots(ibooker, chId, windowsNum_);
665 
666  // per-plane plots
667  const CTPPSDiamondDetId plId(chId.planeId());
668  if (planePlots_.count(plId) == 0)
669  planePlots_[plId] = PlanePlots(ibooker, plId, windowsNum_);
670  // per-pot plots
671  const CTPPSDiamondDetId rpId(chId.rpId());
672  if (potPlots_.count(rpId) == 0)
673  potPlots_[rpId] = PotPlots(ibooker, rpId, windowsNum_, plotOnline_, plotOffline_, perLSsaving_);
674 
675  // per-sector plots
676  const CTPPSDiamondDetId secId(chId.armId());
677  if (plotOffline_ && sectorPlots_.count(secId) == 0)
678  sectorPlots_[secId] = SectorPlots(ibooker, secId, plotOnline_);
679  }
680 }
edm::ESGetToken< CTPPSGeometry, VeryForwardRealGeometryRecord > ctppsGeometryRunToken_
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
mapType::const_iterator beginSensor() const
begin iterator over sensors
Definition: CTPPSGeometry.h:67
bool getData(T &iHolder) const
Definition: EventSetup.h:122
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_
mapType::const_iterator endSensor() const
end iterator over sensors
Definition: CTPPSGeometry.h:69
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_
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(), CTPPSDiamondDetId::channel(), TauDecayModes::dec, TotemVFATStatus::ec(), CTPPSDiamondDQMSource::PotPlots::ECCheck, TotemFEDInfo::fedId(), dqm::impl::MonitorElement::Fill(), HPTDC_0_CHANNEL, HPTDC_1_CHANNEL, CTPPSDiamondDQMSource::PotPlots::HPTDCErrorFlags_2D, TotemFEDInfo::lv1(), CTPPSDiamondDetId::plane(), plotOnline_, CTPPSDetId::rpId(), 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
CTPPSDetId rpId() const
Definition: CTPPSDetId.h:78
void Fill(long long x)
uint32_t lv1() const
Definition: TotemFEDInfo.h:26
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
uint32_t plane() const
int fedId() const
Definition: TotemFEDInfo.h:22
uint32_t channel() const
Detector ID class for CTPPS Timing Diamond detectors. Bits [19:31] : Assigend in CTPPSDetId Calss Bit...
static constexpr unsigned short HPTDC_1_CHANNEL
uint8_t ec() const
event Counter
Log< level::Error, true > LogProblem
void CTPPSDiamondDQMSource::dqmBeginRun ( const edm::Run iRun,
const edm::EventSetup iSetup 
)
overrideprotectedvirtual

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

Definition at line 622 of file CTPPSDiamondDQMSource.cc.

References CTPPSDetId::arm(), CTPPSGeometry::beginRP(), centralOOT_, CTPPSDiamondDetId::check(), edm::contains(), CTPPS_FAR_RP_ID, CTPPS_PIXEL_STATION_ID, ctppsGeometryRunToken_, diamShifts_, CTPPSGeometry::endRP(), FIRST_RUN_W_PIXELS, relativeConstraints::geom, edm::EventSetup::getData(), edm::RunBase::run(), runParameters_, and CTPPSGeometry::sensor().

622  {
623  centralOOT_ = -999;
624  for (const auto& oot : runParameters_) {
625  if (edm::contains(oot.first, edm::EventID(iRun.run(), 0, 1))) {
626  centralOOT_ = oot.second;
627  break;
628  }
629  }
630 
631  // Get detector shifts from the geometry
633  for (auto it = geom.beginRP(); it != geom.endRP(); ++it)
634  if (CTPPSDiamondDetId::check(it->first)) {
635  const CTPPSDiamondDetId diam_id(it->first);
636  const auto diam = geom.sensor(it->first);
637  diamShifts_[diam_id].global = diam->translation().x() - diam->getDiamondDimensions().xHalfWidth;
638  if (iRun.run() > FIRST_RUN_W_PIXELS) { // pixel installed
639  const CTPPSPixelDetId pixid(diam_id.arm(), CTPPS_PIXEL_STATION_ID, CTPPS_FAR_RP_ID);
640  auto pix = geom.sensor(pixid);
641  // Rough alignement of pixel detector for diamond tomography
642  diamShifts_[diam_id].withPixels =
643  pix->translation().x() - pix->getDiamondDimensions().xHalfWidth - diamShifts_[diam_id].global - 1.;
644  }
645  }
646 }
edm::ESGetToken< CTPPSGeometry, VeryForwardRealGeometryRecord > ctppsGeometryRunToken_
std::unordered_map< CTPPSDetId, DiamondShifts > diamShifts_
bool contains(EventRange const &lh, EventID const &rh)
Definition: EventRange.cc:37
RunNumber_t run() const
Definition: RunBase.h:40
static constexpr unsigned short CTPPS_FAR_RP_ID
static constexpr unsigned short CTPPS_PIXEL_STATION_ID
bool getData(T &iHolder) const
Definition: EventSetup.h:122
std::vector< std::pair< edm::EventRange, int > > runParameters_
RPDeviceMapType::const_iterator beginRP() const
begin iterator over RPs
Definition: CTPPSGeometry.h:72
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
const DetGeomDesc * sensor(unsigned int id) const
returns geometry of a detector performs necessary checks, returns NULL if fails
RPDeviceMapType::const_iterator endRP() const
end iterator over RPs
Definition: CTPPSGeometry.h:74
Detector ID class for CTPPS Timing Diamond detectors. Bits [19:31] : Assigend in CTPPSDetId Calss Bit...
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_, L1TEGammaDiff_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_
std::shared_ptr< dds::Cache > CTPPSDiamondDQMSource::globalBeginLuminosityBlock ( const edm::LuminosityBlock ,
const edm::EventSetup  
) const
overrideprotected

Definition at line 684 of file CTPPSDiamondDQMSource.cc.

References ztail::d, perLSsaving_, bigModule::plot(), plotOnline_, and potPlots_.

685  {
686  auto d = std::make_shared<dds::Cache>();
687  d->hitDistribution2dMap.reserve(potPlots_.size());
688  if (!perLSsaving_ && plotOnline_) {
689  for (auto& plot : potPlots_)
690  d->hitDistribution2dMap[plot.first] =
691  std::unique_ptr<TH2F>(static_cast<TH2F*>(plot.second.hitDistribution2d_lumisection->getTH2F()->Clone()));
692  }
693  return d;
694 }
tuple d
Definition: ztail.py:151
def plot
Definition: bigModule.py:18
std::unordered_map< unsigned int, PotPlots > potPlots_
void CTPPSDiamondDQMSource::globalEndLuminosityBlock ( const edm::LuminosityBlock iLumi,
const edm::EventSetup  
)
overrideprotected

Definition at line 1274 of file CTPPSDiamondDQMSource.cc.

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

1274  {
1275  auto lumiCache = luminosityBlockCache(iLumi.index());
1276  if (!perLSsaving_) {
1277  if (plotOnline_)
1278  for (auto& plot : potPlots_) {
1279  *(plot.second.hitDistribution2d_lumisection->getTH2F()) = *(lumiCache->hitDistribution2dMap[plot.first]);
1280  }
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.
LuminosityBlockIndex index() const
def plot
Definition: bigModule.py:18
std::unordered_map< unsigned int, ChannelPlots > channelPlots_
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_

Member Data Documentation

int CTPPSDiamondDQMSource::centralOOT_
private

Definition at line 233 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze(), and dqmBeginRun().

constexpr unsigned short CTPPSDiamondDQMSource::CHANNEL_OF_VFAT_CLOCK = 30
staticprivate

Channel ID of the VFAT that contains clock data.

Definition at line 90 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze().

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

Definition at line 244 of file CTPPSDiamondDQMSource.cc.

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

constexpr unsigned short CTPPSDiamondDQMSource::CTPPS_DIAMOND_NUM_OF_CHANNELS = 12
staticprivate
constexpr unsigned short CTPPSDiamondDQMSource::CTPPS_FAR_RP_ID = 3
staticprivate

Definition at line 97 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze(), and dqmBeginRun().

constexpr unsigned short CTPPSDiamondDQMSource::CTPPS_FED_ID_45 = 583
staticprivate

Definition at line 99 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze().

constexpr unsigned short CTPPSDiamondDQMSource::CTPPS_FED_ID_56 = 582
staticprivate

Definition at line 100 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze().

constexpr unsigned short CTPPSDiamondDQMSource::CTPPS_PIXEL_STATION_ID = 2
staticprivate

Definition at line 96 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze(), and dqmBeginRun().

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

Definition at line 223 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze().

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

Definition at line 222 of file CTPPSDiamondDQMSource.cc.

Referenced by bookHistograms(), and dqmBeginRun().

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

Definition at line 231 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze(), and dqmBeginRun().

constexpr double CTPPSDiamondDQMSource::DISPLAY_RESOLUTION_FOR_HITS_MM = 0.1
staticprivate

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

Definition at line 92 of file CTPPSDiamondDQMSource.cc.

int CTPPSDiamondDQMSource::EC_difference_45_
private

Definition at line 246 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze().

int CTPPSDiamondDQMSource::EC_difference_56_
private

Definition at line 246 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze().

bool CTPPSDiamondDQMSource::excludeMultipleHits_
private

Definition at line 226 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze().

const bool CTPPSDiamondDQMSource::extract_digi_info_
private

Definition at line 227 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze(), and CTPPSDiamondDQMSource().

constexpr unsigned int CTPPSDiamondDQMSource::FIRST_RUN_W_PIXELS = 300000
staticprivate

Number of OOT indices monitored.

Definition at line 104 of file CTPPSDiamondDQMSource.cc.

Referenced by dqmBeginRun().

GlobalPlots CTPPSDiamondDQMSource::globalPlot_
private

Definition at line 240 of file CTPPSDiamondDQMSource.cc.

Referenced by bookHistograms().

constexpr unsigned short CTPPSDiamondDQMSource::HPTDC_0_CHANNEL = 6
staticprivate

Definition at line 101 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze(), and checkEventNumber().

constexpr unsigned short CTPPSDiamondDQMSource::HPTDC_1_CHANNEL = 7
staticprivate

Definition at line 102 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze(), and checkEventNumber().

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

ns per HPTDC bin

Definition at line 95 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze().

constexpr double CTPPSDiamondDQMSource::INV_DISPLAY_RESOLUTION_FOR_HITS_MM = 1. / DISPLAY_RESOLUTION_FOR_HITS_MM
staticprivate
bool CTPPSDiamondDQMSource::perLSsaving_
private
std::unordered_map<unsigned int, PlanePlots> CTPPSDiamondDQMSource::planePlots_
private

Definition at line 243 of file CTPPSDiamondDQMSource.cc.

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

const bool CTPPSDiamondDQMSource::plotOffline_
private

Definition at line 236 of file CTPPSDiamondDQMSource.cc.

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

const bool CTPPSDiamondDQMSource::plotOnline_
private
std::unordered_map<unsigned int, PotPlots> CTPPSDiamondDQMSource::potPlots_
private
std::vector<std::pair<edm::EventRange, int> > CTPPSDiamondDQMSource::runParameters_
private

Definition at line 232 of file CTPPSDiamondDQMSource.cc.

Referenced by CTPPSDiamondDQMSource(), and dqmBeginRun().

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

Referenced by globalEndLuminosityBlock().

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

Definition at line 242 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze(), and bookHistograms().

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

Definition at line 218 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze().

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

Definition at line 219 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze().

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

Definition at line 217 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze(), and CTPPSDiamondDQMSource().

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

Definition at line 220 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze(), and CTPPSDiamondDQMSource().

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

Definition at line 216 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze().

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

Definition at line 215 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze(), and CTPPSDiamondDQMSource().

unsigned int CTPPSDiamondDQMSource::trackCorrelationThreshold_
private

Definition at line 238 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze().

unsigned int CTPPSDiamondDQMSource::verbosity_
private

Definition at line 234 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze(), and checkEventNumber().

unsigned int CTPPSDiamondDQMSource::windowsNum_
private

Definition at line 237 of file CTPPSDiamondDQMSource.cc.

Referenced by bookHistograms().