CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Protected Member Functions | Private Attributes | Static Private Attributes
CTPPSDiamondDQMSource Class Reference
Inheritance diagram for CTPPSDiamondDQMSource:
DQMEDAnalyzer edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > > edm::stream::EDAnalyzerBase edm::EDConsumerBase

Classes

struct  ChannelPlots
 plots related to one Diamond channel More...
 
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...
 

Public Member Functions

 CTPPSDiamondDQMSource (const edm::ParameterSet &)
 
 ~CTPPSDiamondDQMSource () override
 
- Public Member Functions inherited from DQMEDAnalyzer
void beginRun (edm::Run const &, edm::EventSetup const &) final
 
void beginStream (edm::StreamID id) final
 
virtual void bookHistograms (DQMStore::IBooker &i, edm::Run const &, edm::EventSetup const &)=0
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer ()
 
void endLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
void endRunSummary (edm::Run const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
uint32_t streamId () const
 
- Public Member Functions inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::stream::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
 ~EDAnalyzerBase () 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
 
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::vector< ModuleDescription const * > &modules, 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
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Protected Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void beginLuminosityBlock (const edm::LuminosityBlock &, 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 endLuminosityBlock (const edm::LuminosityBlock &, const edm::EventSetup &) override
 
void endRun (const edm::Run &, const edm::EventSetup &) override
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
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 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)
 

Private Attributes

int centralOOT_
 
std::unordered_map< unsigned int, ChannelPlotschannelPlots_
 
int EC_difference_45_
 
int EC_difference_56_
 
bool excludeMultipleHits_
 
GlobalPlots globalPlot_
 
double maximumStripAngleForTomography_
 
double minimumStripAngleForTomography_
 
std::unordered_map< unsigned int, PlanePlotsplanePlots_
 
std::unordered_map< unsigned int, PotPlotspotPlots_
 
std::vector< std::pair< edm::EventRange, int > > runParameters_
 
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< TotemRPLocalTrack > > tokenLocalTrack_
 
edm::EDGetTokenT< edm::DetSetVector< TotemVFATStatus > > tokenStatus_
 
unsigned int verbosity_
 

Static Private Attributes

static const int CHANNEL_OF_VFAT_CLOCK = 30
 
static const int CTPPS_DIAMOND_NUM_OF_CHANNELS = 12
 
static const int CTPPS_DIAMOND_NUM_OF_PLANES = 4
 
static const int CTPPS_DIAMOND_RP_ID = 6
 
static const int CTPPS_DIAMOND_STATION_ID = 1
 
static const int CTPPS_FAR_RP_ID = 3
 
static const int CTPPS_FED_ID_45 = 583
 
static const int CTPPS_FED_ID_56 = 582
 
static const int CTPPS_NEAR_RP_ID = 2
 
static const int CTPPS_NUM_OF_ARMS = 2
 
static const double DISPLAY_RESOLUTION_FOR_HITS_MM = 0.1
 
static const double HPTDC_BIN_WIDTH_NS = 25./1024
 
static const double INV_DISPLAY_RESOLUTION_FOR_HITS_MM = 1./DISPLAY_RESOLUTION_FOR_HITS_MM
 
static const double SEC_PER_LUMI_SECTION = 23.31
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDAnalyzerBase
typedef EDAnalyzerAdaptorBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static std::shared_ptr< dqmDetails::NoCacheglobalBeginLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *)
 
static std::shared_ptr< dqmDetails::NoCacheglobalBeginRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *)
 
static void globalEndLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *, dqmDetails::NoCache *)
 
static void globalEndRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *, dqmDetails::NoCache *)
 
- Static Public Member Functions inherited from edm::stream::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Detailed Description

Definition at line 38 of file CTPPSDiamondDQMSource.cc.

Constructor & Destructor Documentation

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

Definition at line 337 of file CTPPSDiamondDQMSource.cc.

References edm::ParameterSet::getParameter(), muonDTDigis_cfi::pset, and runParameters_.

337  :
343  tokenFEDInfo_ ( consumes< std::vector<TotemFEDInfo> > ( ps.getParameter<edm::InputTag>( "tagFEDInfo" ) ) ),
344  excludeMultipleHits_ ( ps.getParameter<bool>( "excludeMultipleHits" ) ),
345  minimumStripAngleForTomography_( ps.getParameter<double>( "minimumStripAngleForTomography" ) ),
346  maximumStripAngleForTomography_( ps.getParameter<double>( "maximumStripAngleForTomography" ) ),
347  centralOOT_( -999 ),
348  verbosity_ ( ps.getUntrackedParameter<unsigned int>( "verbosity", 0 ) ),
349  EC_difference_56_( -500 ), EC_difference_45_( -500 )
350 {
351  for ( const auto& pset : ps.getParameter< std::vector<edm::ParameterSet> >( "offsetsOOT" ) ) {
352  runParameters_.emplace_back( std::make_pair( pset.getParameter<edm::EventRange>( "validityRange" ), pset.getParameter<int>( "centralOOT" ) ) );
353  }
354 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
edm::EDGetTokenT< edm::DetSetVector< CTPPSDiamondDigi > > tokenDigi_
edm::EDGetTokenT< edm::DetSetVector< TotemRPLocalTrack > > tokenLocalTrack_
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
std::vector< std::pair< edm::EventRange, int > > runParameters_
edm::EDGetTokenT< edm::DetSetVector< CTPPSDiamondLocalTrack > > tokenDiamondTrack_
edm::EDGetTokenT< edm::DetSetVector< CTPPSDiamondRecHit > > tokenDiamondHit_
edm::EDGetTokenT< std::vector< TotemFEDInfo > > tokenFEDInfo_
edm::EDGetTokenT< edm::DetSetVector< TotemVFATStatus > > tokenStatus_
CTPPSDiamondDQMSource::~CTPPSDiamondDQMSource ( )
override

Definition at line 358 of file CTPPSDiamondDQMSource.cc.

359 {}

Member Function Documentation

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

Definition at line 412 of file CTPPSDiamondDQMSource.cc.

References CTPPSDetId::arm(), edm::EventBase::bunchCrossing(), centralOOT_, CHANNEL_OF_VFAT_CLOCK, channelPlots_, CTPPS_FAR_RP_ID, CTPPS_FED_ID_45, CTPPS_FED_ID_56, TauDecayModes::dec, EC_difference_45_, EC_difference_56_, excludeMultipleHits_, MonitorElement::Fill(), HcalObjRepresent::Fill(), HPTDCErrorFlags::getErrorId(), globalPlot_, CTPPSDiamondDQMSource::GlobalPlots::h_trackCorr_hor, HPTDC_BIN_WIDTH_NS, mps_fire::i, edm::eventsetup::heterocontainer::insert(), INV_DISPLAY_RESOLUTION_FOR_HITS_MM, edm::HandleBase::isValid(), maximumStripAngleForTomography_, minimumStripAngleForTomography_, planePlots_, potPlots_, TrackInfoProducer_cfi::rechits, CTPPSDiamondDetId::setChannel(), CTPPSDiamondDetId::setPlane(), mps_update::status, tokenDiamondHit_, tokenDiamondTrack_, tokenDigi_, tokenFEDInfo_, tokenLocalTrack_, tokenStatus_, HiIsolationCommonParameters_cff::track, l1t::tracks, and verbosity_.

413 {
414  // get event data
416  event.getByToken( tokenStatus_, diamondVFATStatus );
417 
419  event.getByToken( tokenLocalTrack_, stripTracks );
420 
422  event.getByToken( tokenDigi_, diamondDigis );
423 
425  event.getByToken( tokenFEDInfo_, fedInfo );
426 
428  event.getByToken( tokenDiamondHit_, diamondRecHits );
429 
431  event.getByToken( tokenDiamondTrack_, diamondLocalTracks );
432 
433  // check validity
434  bool valid = true;
435  valid &= diamondVFATStatus.isValid();
436  valid &= diamondDigis.isValid();
437  valid &= fedInfo.isValid();
438 
439  if ( !valid ) {
440  if ( verbosity_ ) {
441  edm::LogProblem("CTPPSDiamondDQMSource")
442  << "ERROR in TotemDQMModuleRP::analyze > some of the required inputs are not valid. Skipping this event.\n"
443  << " diamondVFATStatus.isValid = " << diamondVFATStatus.isValid() << "\n"
444  << " diamondDigis.isValid = " << diamondDigis.isValid() << "\n"
445  << " fedInfo.isValid = " << fedInfo.isValid();
446  }
447 
448  return;
449  }
450 
451  //------------------------------
452  // RP Plots
453  //------------------------------
454 
455  //------------------------------
456  // Correlation Plots
457  //------------------------------
458 
459  for ( const auto& ds1 : *stripTracks ) {
460  for ( const auto& tr1 : ds1 ) {
461  if ( ! tr1.isValid() ) continue;
462 
463  CTPPSDetId rpId1( ds1.detId() );
464  unsigned int arm1 = rpId1.arm();
465  unsigned int stNum1 = rpId1.station();
466  unsigned int rpNum1 = rpId1.rp();
467  if (stNum1 != 0 || ( rpNum1 != 2 && rpNum1 != 3 ) ) continue;
468  unsigned int idx1 = arm1*3 + rpNum1-2;
469 
470  for ( const auto& ds2 : *stripTracks ) {
471  for ( const auto& tr2 : ds2 ) {
472  if ( ! tr2.isValid() ) continue;
473 
474  CTPPSDetId rpId2(ds2.detId());
475  unsigned int arm2 = rpId2.arm();
476  unsigned int stNum2 = rpId2.station();
477  unsigned int rpNum2 = rpId2.rp();
478  if (stNum2 != 0 || ( rpNum2 != 2 && rpNum2 != 3 ) ) continue;
479  unsigned int idx2 = arm2*3 + rpNum2-2;
480 
481  if ( idx1 >= idx2 ) globalPlot_.h_trackCorr_hor->Fill( 5-idx1, idx2 ); // strips-strips
482  }
483  }
484  for ( const auto& ds2 : *diamondLocalTracks ) {
485  for ( const auto& tr2 : ds2 ) {
486  if ( ! tr2.isValid() ) continue;
487  if ( centralOOT_ != -999 && tr2.getOOTIndex() != centralOOT_ ) continue;
488  if ( excludeMultipleHits_ && tr2.getMultipleHits() > 0 ) continue;
489 
490  CTPPSDetId diamId2( ds2.detId() );
491  unsigned int arm2 = diamId2.arm();
492  if ( idx1 >= arm2*3+2 )
493  globalPlot_.h_trackCorr_hor->Fill( 5-idx1, arm2*3+2 ); // strips-diamonds
494  else
495  globalPlot_.h_trackCorr_hor->Fill( 5-(arm2*3+2 ),idx1 ); // strips-diamonds
496  }
497  }
498  }
499  }
500 
501  for ( const auto& ds1 : *diamondLocalTracks ) {
502  for ( const auto& tr1 : ds1 ) {
503  if ( ! tr1.isValid() ) continue;
504  if ( excludeMultipleHits_ && tr1.getMultipleHits() > 0 ) continue;
505  if ( centralOOT_ != -999 && tr1.getOOTIndex() != centralOOT_ ) continue;
506 
507  CTPPSDetId diamId1( ds1.detId() );
508  unsigned int arm1 = diamId1.arm();
509 
510  globalPlot_.h_trackCorr_hor->Fill( 5-(arm1*3+2), arm1*3+2 ); // diamonds-diamonds
511 
512  for ( const auto& ds2 : *diamondLocalTracks ) {
513  for ( const auto& tr2 : ds2 ) {
514  if ( ! tr2.isValid() ) continue;
515  if ( excludeMultipleHits_ && tr2.getMultipleHits() > 0 ) continue;
516  if ( centralOOT_ != -999 && tr2.getOOTIndex() != centralOOT_ ) continue;
517 
518  CTPPSDetId diamId2( ds2.detId() );
519  unsigned int arm2 = diamId2.arm();
520  if ( arm1 > arm2 ) globalPlot_.h_trackCorr_hor->Fill( 5-(arm1*3+2), arm2*3+2 ); // diamonds-diamonds
521  }
522  }
523  }
524  }
525 
526 
527  // Using CTPPSDiamondDigi
528  for ( const auto& digis : *diamondDigis ) {
529  const CTPPSDiamondDetId detId( digis.detId() );
530  CTPPSDiamondDetId detId_pot( digis.detId() );
531 
532  for ( const auto& digi : digis ) {
533  detId_pot.setPlane( 0 );
534  detId_pot.setChannel( 0 );
535  if ( detId.channel() == CHANNEL_OF_VFAT_CLOCK ) continue;
536  if ( potPlots_.find( detId_pot ) == potPlots_.end() ) continue;
537  //Leading without trailing investigation
538  if ( digi.getLeadingEdge() != 0 || digi.getTrailingEdge() != 0 ) {
539  ++(potPlots_[detId_pot].HitCounter);
540  if ( digi.getLeadingEdge() != 0 && digi.getTrailingEdge() == 0 ) {
541  ++(potPlots_[detId_pot].LeadingOnlyCounter);
542  potPlots_[detId_pot].leadingEdgeCumulative_le->Fill( HPTDC_BIN_WIDTH_NS * digi.getLeadingEdge() );
543  }
544  if ( digi.getLeadingEdge() == 0 && digi.getTrailingEdge() != 0 ) {
545  ++(potPlots_[detId_pot].TrailingOnlyCounter);
546  potPlots_[detId_pot].trailingEdgeCumulative_te->Fill( HPTDC_BIN_WIDTH_NS * digi.getTrailingEdge() );
547  }
548  if ( digi.getLeadingEdge() != 0 && digi.getTrailingEdge() != 0 ) {
549  ++(potPlots_[detId_pot].CompleteCounter);
550  potPlots_[detId_pot].leadingTrailingCorrelationPot->Fill( HPTDC_BIN_WIDTH_NS * digi.getLeadingEdge(), HPTDC_BIN_WIDTH_NS * digi.getTrailingEdge() );
551  }
552  }
553 
554  // HPTDC Errors
555  const HPTDCErrorFlags hptdcErrors = digi.getHPTDCErrorFlags();
556  for ( unsigned short hptdcErrorIndex = 1; hptdcErrorIndex < 16; ++hptdcErrorIndex )
557  if ( hptdcErrors.getErrorId( hptdcErrorIndex-1 ) ) potPlots_[detId_pot].HPTDCErrorFlags_cumulative->Fill( hptdcErrorIndex );
558  if ( digi.getMultipleHit() ) ++(potPlots_[detId_pot].MHCounter);
559  }
560  }
561 
562  // EC Errors
563  for ( const auto& vfat_status : *diamondVFATStatus ) {
564  const CTPPSDiamondDetId detId( vfat_status.detId() );
565  CTPPSDiamondDetId detId_pot( vfat_status.detId() );
566  detId_pot.setPlane( 0 );
567  detId_pot.setChannel( 0 );
568  for ( const auto& status : vfat_status ) {
569  if ( !status.isOK() ) continue;
570  if ( potPlots_.find(detId_pot) == potPlots_.end() ) continue;
571 
572  // Check Event Number
573  for ( const auto& optorx : *fedInfo ) {
574  if ( detId.arm() == 1 && optorx.getFEDId() == CTPPS_FED_ID_56 ) {
575  potPlots_[detId_pot].ECCheck->Fill((int)((optorx.getLV1()& 0xFF)-((unsigned int) status.getEC() & 0xFF)) & 0xFF);
576  if ( ( static_cast<int>( ( optorx.getLV1() & 0xFF )-status.getEC() ) != EC_difference_56_ ) && ( static_cast<uint8_t>( ( optorx.getLV1() & 0xFF )-status.getEC() ) < 128 ) )
577  EC_difference_56_ = static_cast<int>( optorx.getLV1() & 0xFF )-( static_cast<unsigned int>( status.getEC() ) & 0xFF );
578  if ( EC_difference_56_ != 1 && EC_difference_56_ != -500 && EC_difference_56_ < 128 && EC_difference_56_ > -128 )
579  if (verbosity_)
580  edm::LogProblem("CTPPSDiamondDQMSource") << "FED " << CTPPS_FED_ID_56 << ": ECError at EV: 0x"<< std::hex << optorx.getLV1()
581  << "\t\tVFAT EC: 0x"<< static_cast<unsigned int>( status.getEC() )
582  << "\twith ID: " << std::dec << detId
583  << "\tdiff: " << EC_difference_56_;
584  }
585  else if ( detId.arm() == 0 && optorx.getFEDId()== CTPPS_FED_ID_45 ) {
586  potPlots_[detId_pot].ECCheck->Fill((int)((optorx.getLV1()& 0xFF)-status.getEC()) & 0xFF);
587  if ( ( static_cast<int>( ( optorx.getLV1() & 0xFF )-status.getEC() ) != EC_difference_45_ ) && ( static_cast<uint8_t>( ( optorx.getLV1() & 0xFF )-status.getEC() ) < 128 ) )
588  EC_difference_45_ = static_cast<int>( optorx.getLV1() & 0xFF )-( static_cast<unsigned int>( status.getEC() ) & 0xFF );
589  if ( EC_difference_45_ != 1 && EC_difference_45_ != -500 && EC_difference_45_ < 128 && EC_difference_45_ > -128 )
590  if (verbosity_)
591  edm::LogProblem("CTPPSDiamondDQMSource") << "FED " << CTPPS_FED_ID_45 << ": ECError at EV: 0x"<< std::hex << optorx.getLV1()
592  << "\t\tVFAT EC: 0x"<< static_cast<unsigned int>( status.getEC() )
593  << "\twith ID: " << std::dec << detId
594  << "\tdiff: " << EC_difference_45_;
595  }
596  }
597  }
598  }
599 
600  // Using CTPPSDiamondRecHit
601  std::unordered_map<unsigned int, std::set<unsigned int> > planes;
602  std::unordered_map<unsigned int, std::set<unsigned int> > planes_inclusive;
603 
604 
605  for ( const auto& rechits : *diamondRecHits ) {
606  CTPPSDiamondDetId detId_pot( rechits.detId() );
607  detId_pot.setPlane( 0 );
608  detId_pot.setChannel( 0 );
609  const CTPPSDiamondDetId detId( rechits.detId() );
610 
611  for ( const auto& rechit : rechits ) {
612  planes_inclusive[detId_pot].insert( detId.plane() );
613  if ( excludeMultipleHits_ && rechit.getMultipleHits() > 0 ) continue;
614  if ( rechit.getToT() != 0 && centralOOT_ != -999 && rechit.getOOTIndex() == centralOOT_ )
615  planes[detId_pot].insert( detId.plane() );
616 
617  if ( potPlots_.find( detId_pot ) == potPlots_.end() ) continue;
618 
619  float UFSDShift = 0.0;
620  if ( rechit.getYWidth() < 3 ) UFSDShift = 0.5; // Display trick for UFSD that have 2 pixels with same X
621 
622  if ( rechit.getToT() != 0 && centralOOT_ != -999 && rechit.getOOTIndex() == centralOOT_ ) {
623  TH2F *hitHistoTmp = potPlots_[detId_pot].hitDistribution2d->getTH2F();
624  TAxis *hitHistoTmpYAxis = hitHistoTmp->GetYaxis();
625  int startBin = hitHistoTmpYAxis->FindBin( rechit.getX() - 0.5*rechit.getXWidth() );
626  int numOfBins = rechit.getXWidth()*INV_DISPLAY_RESOLUTION_FOR_HITS_MM;
627  for ( int i=0; i<numOfBins; ++i) {
628  hitHistoTmp->Fill( detId.plane() + UFSDShift, hitHistoTmpYAxis->GetBinCenter(startBin+i) );
629  }
630 
631  hitHistoTmp = potPlots_[detId_pot].hitDistribution2d_lumisection->getTH2F();
632  hitHistoTmpYAxis = hitHistoTmp->GetYaxis();
633  startBin = hitHistoTmpYAxis->FindBin( rechit.getX() - 0.5*rechit.getXWidth() );
634  numOfBins = rechit.getXWidth()*INV_DISPLAY_RESOLUTION_FOR_HITS_MM;
635  for ( int i=0; i<numOfBins; ++i) {
636  hitHistoTmp->Fill( detId.plane() + UFSDShift, hitHistoTmpYAxis->GetBinCenter(startBin+i) );
637  }
638 
639  }
640 
641  if ( rechit.getToT() != 0 ) {
642  // Both
643  potPlots_[detId_pot].leadingEdgeCumulative_both->Fill( rechit.getT() + 25*rechit.getOOTIndex() );
644  potPlots_[detId_pot].timeOverThresholdCumulativePot->Fill( rechit.getToT() );
645 
646  TH2F *hitHistoOOTTmp = potPlots_[detId_pot].hitDistribution2dOOT->getTH2F();
647  TAxis *hitHistoOOTTmpYAxis = hitHistoOOTTmp->GetYaxis();
648  int startBin = hitHistoOOTTmpYAxis->FindBin( rechit.getX() - 0.5*rechit.getXWidth() );
649  int numOfBins = rechit.getXWidth()*INV_DISPLAY_RESOLUTION_FOR_HITS_MM;
650  for ( int i=0; i<numOfBins; ++i) {
651  hitHistoOOTTmp->Fill( detId.plane() + 0.2 * rechit.getOOTIndex(), hitHistoOOTTmpYAxis->GetBinCenter(startBin+i) );
652  }
653  }
654  else {
655  if ( rechit.getT() != 0 ) {
656  // Only leading
657  TH2F *hitHistoOOTTmp = potPlots_[detId_pot].hitDistribution2dOOT_le->getTH2F();
658  TAxis *hitHistoOOTTmpYAxis = hitHistoOOTTmp->GetYaxis();
659  int startBin = hitHistoOOTTmpYAxis->FindBin( rechit.getX() - 0.5*rechit.getXWidth() );
660  int numOfBins = rechit.getXWidth()*INV_DISPLAY_RESOLUTION_FOR_HITS_MM;
661  for ( int i=0; i<numOfBins; ++i) {
662  hitHistoOOTTmp->Fill( detId.plane() + 0.2 * rechit.getOOTIndex(), hitHistoOOTTmpYAxis->GetBinCenter(startBin+i) );
663  }
664  }
665  }
666  if ( (unsigned int) rechit.getOOTIndex() < potPlots_[detId_pot].activity_per_bx.size() )
667  potPlots_[detId_pot].activity_per_bx.at( rechit.getOOTIndex() )->Fill( event.bunchCrossing() );
668  }
669  }
670 
671  for ( const auto& plt : potPlots_ ) {
672  plt.second.activePlanes->Fill( planes[plt.first].size() );
673  plt.second.activePlanesInclusive->Fill( planes_inclusive[plt.first].size() );
674  }
675 
676  // Using CTPPSDiamondLocalTrack
677  for ( const auto& tracks : *diamondLocalTracks ) {
678  CTPPSDiamondDetId detId_pot( tracks.detId() );
679  detId_pot.setPlane( 0 );
680  detId_pot.setChannel( 0 );
681  const CTPPSDiamondDetId detId( tracks.detId() );
682 
683  for ( const auto& track : tracks ) {
684  if ( ! track.isValid() ) continue;
685  if ( excludeMultipleHits_ && track.getMultipleHits() > 0 ) continue;
686  if ( potPlots_.find( detId_pot ) == potPlots_.end() ) continue;
687 
688  TH2F *trackHistoOOTTmp = potPlots_[detId_pot].trackDistributionOOT->getTH2F();
689  TAxis *trackHistoOOTTmpYAxis = trackHistoOOTTmp->GetYaxis();
690  int startBin = trackHistoOOTTmpYAxis->FindBin( track.getX0() - track.getX0Sigma() );
691  int numOfBins = 2*track.getX0Sigma()*INV_DISPLAY_RESOLUTION_FOR_HITS_MM;
692  for ( int i=0; i<numOfBins; ++i) {
693  trackHistoOOTTmp->Fill( track.getOOTIndex(), trackHistoOOTTmpYAxis->GetBinCenter(startBin+i) );
694  }
695 
696  if ( centralOOT_ != -999 && track.getOOTIndex() == centralOOT_ ) {
697  TH1F *trackHistoInTimeTmp = potPlots_[detId_pot].trackDistribution->getTH1F();
698  int startBin = trackHistoInTimeTmp->FindBin( track.getX0() - track.getX0Sigma() );
699  int numOfBins = 2*track.getX0Sigma()*INV_DISPLAY_RESOLUTION_FOR_HITS_MM;
700  for ( int i=0; i<numOfBins; ++i) {
701  trackHistoInTimeTmp->Fill( trackHistoInTimeTmp->GetBinCenter(startBin+i) );
702  }
703  }
704  }
705  }
706 
707  // Tomography of diamonds using strips
708  for ( const auto& rechits : *diamondRecHits ) {
709  CTPPSDiamondDetId detId_pot( rechits.detId() );
710  detId_pot.setPlane( 0 );
711  detId_pot.setChannel( 0 );
712  const CTPPSDiamondDetId detId( rechits.detId() );
713 
714  for ( const auto& rechit : rechits ) {
715  if ( excludeMultipleHits_ && rechit.getMultipleHits() > 0 ) continue;
716  if ( rechit.getToT() == 0 ) continue;
717  if ( !stripTracks.isValid() ) continue;
718  if ( potPlots_.find( detId_pot ) == potPlots_.end() ) continue;
719 
720  for ( const auto& ds : *stripTracks ) {
721  const CTPPSDetId stripId( ds.detId() );
722  for ( const auto& striplt : ds ) {
723  if ( !striplt.isValid() ) continue;
724  if ( stripId.arm() != detId_pot.arm() ) continue;
725  if ( striplt.getTx() > maximumStripAngleForTomography_ || striplt.getTy() > maximumStripAngleForTomography_) continue;
726  if ( striplt.getTx() < minimumStripAngleForTomography_ || striplt.getTy() < minimumStripAngleForTomography_) continue;
727  if ( stripId.rp() == CTPPS_FAR_RP_ID ) {
728  if ( (unsigned int) rechit.getOOTIndex() < potPlots_[detId_pot].stripTomographyAllFar.size() )
729  potPlots_[detId_pot].stripTomographyAllFar.at( rechit.getOOTIndex() )->Fill( striplt.getX0() + 25*detId.plane(), striplt.getY0() );
730  }
731  }
732  }
733  }
734  }
735 
736  //------------------------------
737  // Clock Plots
738  //------------------------------
739 
740  for ( const auto& digis : *diamondDigis ) {
741  const CTPPSDiamondDetId detId( digis.detId() );
742  CTPPSDiamondDetId detId_pot( digis.detId() );
743  if ( detId.channel() == CHANNEL_OF_VFAT_CLOCK ) {
744  detId_pot.setPlane( 0 );
745  detId_pot.setChannel( 0 );
746  for ( const auto& digi : digis ) {
747  if ( digi.getLeadingEdge() != 0 ) {
748  if ( detId.plane() == 1 ) {
749  potPlots_[detId_pot].clock_Digi1_le->Fill( HPTDC_BIN_WIDTH_NS * digi.getLeadingEdge() );
750  potPlots_[detId_pot].clock_Digi1_te->Fill( HPTDC_BIN_WIDTH_NS * digi.getTrailingEdge() );
751  }
752  if ( detId.plane() == 3 ) {
753  potPlots_[detId_pot].clock_Digi3_le->Fill( HPTDC_BIN_WIDTH_NS * digi.getLeadingEdge() );
754  potPlots_[detId_pot].clock_Digi3_te->Fill( HPTDC_BIN_WIDTH_NS * digi.getTrailingEdge() );
755  }
756  }
757  }
758  }
759  }
760 
761  //------------------------------
762  // Plane Plots
763  //------------------------------
764 
765  // Using CTPPSDiamondDigi
766  std::unordered_map<unsigned int, unsigned int> channelsPerPlane;
767  for ( const auto& digis : *diamondDigis ) {
768  const CTPPSDiamondDetId detId( digis.detId() );
769  CTPPSDiamondDetId detId_plane( digis.detId() );
770  for ( const auto& digi : digis ) {
771  detId_plane.setChannel( 0 );
772  if ( detId.channel() == CHANNEL_OF_VFAT_CLOCK ) continue;
773  if ( planePlots_.find( detId_plane ) == planePlots_.end() ) continue;
774 
775  if ( digi.getLeadingEdge() != 0 ) {
776  planePlots_[detId_plane].digiProfileCumulativePerPlane->Fill( detId.channel() );
777  if ( channelsPerPlane.find(detId_plane) != channelsPerPlane.end() ) channelsPerPlane[detId_plane]++;
778  else channelsPerPlane[detId_plane] = 0;
779  }
780  }
781  }
782 
783  for ( const auto& plt : channelsPerPlane ) {
784  planePlots_[plt.first].hit_multiplicity->Fill( plt.second );
785  }
786 
787  // Using CTPPSDiamondRecHit
788  for ( const auto& rechits : *diamondRecHits ) {
789  CTPPSDiamondDetId detId_plane( rechits.detId() );
790  detId_plane.setChannel( 0 );
791  for ( const auto& rechit : rechits ) {
792  if ( excludeMultipleHits_ && rechit.getMultipleHits() > 0 ) continue;
793  if ( rechit.getToT() == 0 ) continue;
794  if ( planePlots_.find( detId_plane ) != planePlots_.end() ) {
795  if ( centralOOT_ != -999 && rechit.getOOTIndex() == centralOOT_ ) {
796  TH1F *hitHistoTmp = planePlots_[detId_plane].hitProfile->getTH1F();
797  int startBin = hitHistoTmp->FindBin( rechit.getX() - 0.5*rechit.getXWidth() );
798  int numOfBins = rechit.getXWidth()*INV_DISPLAY_RESOLUTION_FOR_HITS_MM;
799  for ( int i=0; i<numOfBins; ++i) {
800  hitHistoTmp->Fill( hitHistoTmp->GetBinCenter(startBin+i) );
801  }
802  }
803  }
804  }
805  }
806 
807  // Tomography of diamonds using strips
808  for ( const auto& rechits : *diamondRecHits ) {
809  CTPPSDiamondDetId detId_plane( rechits.detId() );
810  detId_plane.setChannel( 0 );
811  for ( const auto& rechit : rechits ) {
812  if ( excludeMultipleHits_ && rechit.getMultipleHits() > 0 ) continue;
813  if ( rechit.getToT() == 0 ) continue;
814  if ( !stripTracks.isValid() ) continue;
815  if (planePlots_.find(detId_plane) == planePlots_.end()) continue;
816 
817  for ( const auto& ds : *stripTracks ) {
818  const CTPPSDetId stripId(ds.detId());
819  for ( const auto& striplt : ds ) {
820  if (! striplt.isValid()) continue;
821  if ( stripId.arm() != detId_plane.arm() ) continue;
822  if ( striplt.getTx() > maximumStripAngleForTomography_ || striplt.getTy() > maximumStripAngleForTomography_) continue;
823  if ( striplt.getTx() < minimumStripAngleForTomography_ || striplt.getTy() < minimumStripAngleForTomography_) continue;
824  if ( stripId.rp() == CTPPS_FAR_RP_ID ) {
825  planePlots_[detId_plane].stripTomography_far->Fill( striplt.getX0() + 25*rechit.getOOTIndex() , striplt.getY0() );
826  }
827  }
828  }
829  }
830  }
831  //------------------------------
832  // Channel Plots
833  //------------------------------
834 
835  //Check Event Number
836  for ( const auto& vfat_status : *diamondVFATStatus ) {
837  const CTPPSDiamondDetId detId( vfat_status.detId() );
838  for ( const auto& status : vfat_status ) {
839  if ( !status.isOK() ) continue;
840  if ( channelPlots_.find(detId) != channelPlots_.end() ) {
841  for ( const auto& optorx : *fedInfo ) {
842  if ( ( detId.arm() == 1 && optorx.getFEDId() == CTPPS_FED_ID_56 ) || ( detId.arm() == 0 && optorx.getFEDId() == CTPPS_FED_ID_45 ) ) {
843  channelPlots_[detId].ECCheckPerChannel->Fill((int)((optorx.getLV1()& 0xFF)-((unsigned int) status.getEC() & 0xFF)) & 0xFF);
844  }
845  }
846  }
847  }
848  }
849 
850  // digi profile cumulative
851  for ( const auto& digis : *diamondDigis ) {
852  const CTPPSDiamondDetId detId( digis.detId() );
853  for ( const auto& digi : digis ) {
854  if ( detId.channel() == CHANNEL_OF_VFAT_CLOCK ) continue;
855  if ( channelPlots_.find( detId ) != channelPlots_.end() ) {
856  // HPTDC Errors
857  const HPTDCErrorFlags hptdcErrors = digi.getHPTDCErrorFlags();
858  for ( unsigned short hptdcErrorIndex = 1; hptdcErrorIndex < 16; ++hptdcErrorIndex )
859  if ( hptdcErrors.getErrorId( hptdcErrorIndex-1 ) ) channelPlots_[detId].HPTDCErrorFlags->Fill( hptdcErrorIndex );
860  if ( digi.getMultipleHit() ) ++(channelPlots_[detId].MHCounter);
861 
862  // Check dropped trailing edges
863  if ( digi.getLeadingEdge() != 0 || digi.getTrailingEdge() != 0 ) {
864  ++(channelPlots_[detId].HitCounter);
865  if ( digi.getLeadingEdge() != 0 && digi.getTrailingEdge() == 0 ) {
866  ++(channelPlots_[detId].LeadingOnlyCounter);
867  channelPlots_[detId].leadingEdgeCumulative_le->Fill( HPTDC_BIN_WIDTH_NS * digi.getLeadingEdge() );
868  }
869  if ( digi.getLeadingEdge() == 0 && digi.getTrailingEdge() != 0 ) {
870  ++(channelPlots_[detId].TrailingOnlyCounter);
871  channelPlots_[detId].trailingEdgeCumulative_te->Fill( HPTDC_BIN_WIDTH_NS * digi.getTrailingEdge() );
872  }
873  if ( digi.getLeadingEdge() != 0 && digi.getTrailingEdge() != 0 ) {
874  ++(channelPlots_[detId].CompleteCounter);
875  channelPlots_[detId].LeadingTrailingCorrelationPerChannel->Fill( HPTDC_BIN_WIDTH_NS * digi.getLeadingEdge(), HPTDC_BIN_WIDTH_NS * digi.getTrailingEdge() );
876  }
877  }
878  }
879  }
880  }
881 
882  // Using CTPPSDiamondRecHit
883  for ( const auto& rechits : *diamondRecHits ) {
884  CTPPSDiamondDetId detId( rechits.detId() );
885  for ( const auto& rechit : rechits ) {
886  if ( excludeMultipleHits_ && rechit.getMultipleHits() > 0 ) continue;
887  if ( channelPlots_.find( detId ) != channelPlots_.end() ) {
888  if ( rechit.getToT() != 0 ) {
889  channelPlots_[detId].leadingEdgeCumulative_both->Fill( rechit.getT() + 25*rechit.getOOTIndex() );
890  channelPlots_[detId].TimeOverThresholdCumulativePerChannel->Fill( rechit.getToT() );
891  }
892  ++(channelPlots_[detId].hitsCounterPerLumisection);
893  }
894 
895  if ( (unsigned int) rechit.getOOTIndex() < channelPlots_[detId].activity_per_bx.size() )
896  channelPlots_[detId].activity_per_bx.at( rechit.getOOTIndex() )->Fill( event.bunchCrossing() );
897  }
898 
899  }
900 
901  // Tomography of diamonds using strips
902  for ( const auto& rechits : *diamondRecHits ) {
903  const CTPPSDiamondDetId detId( rechits.detId() );
904  for ( const auto& rechit : rechits ) {
905  if ( excludeMultipleHits_ && rechit.getMultipleHits() > 0 ) continue;
906  if ( stripTracks.isValid() ) {
907  if (channelPlots_.find(detId) == channelPlots_.end()) continue;
908  for ( const auto& ds : *stripTracks ) {
909  for ( const auto& striplt : ds ) {
910  CTPPSDetId stripId(ds.detId());
911  if ( !striplt.isValid() ) continue;
912  if ( stripId.arm() != detId.arm() ) continue;
913  if ( striplt.getTx() > maximumStripAngleForTomography_ || striplt.getTy() > maximumStripAngleForTomography_) continue;
914  if ( striplt.getTx() < minimumStripAngleForTomography_ || striplt.getTy() < minimumStripAngleForTomography_) continue;
915  if ( stripId.rp() == CTPPS_FAR_RP_ID ) {
916  channelPlots_[detId].stripTomography_far->Fill( striplt.getX0() + 25*rechit.getOOTIndex(), striplt.getY0() );
917  }
918  }
919  }
920  }
921  }
922  }
923 }
static const int CTPPS_FED_ID_56
static const int CHANNEL_OF_VFAT_CLOCK
void setPlane(uint32_t channel)
void setChannel(uint32_t channel)
edm::EDGetTokenT< edm::DetSetVector< CTPPSDiamondDigi > > tokenDigi_
bool getErrorId(unsigned short id) const
int bunchCrossing() const
Definition: EventBase.h:66
edm::EDGetTokenT< edm::DetSetVector< TotemRPLocalTrack > > tokenLocalTrack_
void Fill(long long x)
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
std::unordered_map< unsigned int, ChannelPlots > channelPlots_
bool insert(Storage &iStorage, ItemType *iItem, const IdTag &iIdTag)
Definition: HCMethods.h:49
uint32_t arm() const
Definition: CTPPSDetId.h:52
bool isValid() const
Definition: HandleBase.h:74
edm::EDGetTokenT< edm::DetSetVector< CTPPSDiamondLocalTrack > > tokenDiamondTrack_
static const double HPTDC_BIN_WIDTH_NS
static const double INV_DISPLAY_RESOLUTION_FOR_HITS_MM
Base class for CTPPS detector IDs.
Definition: CTPPSDetId.h:32
std::unordered_map< unsigned int, PotPlots > potPlots_
edm::EDGetTokenT< edm::DetSetVector< CTPPSDiamondRecHit > > tokenDiamondHit_
static const int CTPPS_FAR_RP_ID
Detector ID class for CTPPS Timing Diamond detectors. Bits [19:31] : Assigend in CTPPSDetId Calss Bit...
std::unordered_map< unsigned int, PlanePlots > planePlots_
edm::EDGetTokenT< std::vector< TotemFEDInfo > > tokenFEDInfo_
static const int CTPPS_FED_ID_45
edm::EDGetTokenT< edm::DetSetVector< TotemVFATStatus > > tokenStatus_
void CTPPSDiamondDQMSource::beginLuminosityBlock ( const edm::LuminosityBlock ,
const edm::EventSetup  
)
overrideprotected

Definition at line 403 of file CTPPSDiamondDQMSource.cc.

References plotFactory::plot, and potPlots_.

404 {
405  for ( auto& plot : potPlots_ )
406  plot.second.hitDistribution2d_lumisection->Reset();
407 }
std::unordered_map< unsigned int, PotPlots > potPlots_
void CTPPSDiamondDQMSource::bookHistograms ( DQMStore::IBooker ibooker,
const edm::Run ,
const edm::EventSetup  
)
overrideprotected

Definition at line 378 of file CTPPSDiamondDQMSource.cc.

References DQMStore::IBooker::cd(), channelPlots_, CTPPS_DIAMOND_NUM_OF_CHANNELS, CTPPS_DIAMOND_NUM_OF_PLANES, CTPPS_DIAMOND_RP_ID, CTPPS_DIAMOND_STATION_ID, CTPPS_NUM_OF_ARMS, globalPlot_, planePlots_, potPlots_, and DQMStore::IBooker::setCurrentFolder().

379 {
380  ibooker.cd();
381  ibooker.setCurrentFolder( "CTPPS" );
382 
383  globalPlot_= GlobalPlots( ibooker );
384 
385  for ( unsigned short arm = 0; arm < CTPPS_NUM_OF_ARMS; ++arm ) {
387  potPlots_[rpId] = PotPlots( ibooker, rpId );
388  for ( unsigned short pl = 0; pl < CTPPS_DIAMOND_NUM_OF_PLANES; ++pl ) {
390  planePlots_[plId] = PlanePlots( ibooker, plId);
391  for ( unsigned short ch = 0; ch < CTPPS_DIAMOND_NUM_OF_CHANNELS; ++ch ) {
393  channelPlots_[chId] = ChannelPlots( ibooker, chId );
394  }
395  }
396  }
397 }
static const int CTPPS_DIAMOND_NUM_OF_PLANES
static const int CTPPS_NUM_OF_ARMS
static const int CTPPS_DIAMOND_NUM_OF_CHANNELS
static const int CTPPS_DIAMOND_STATION_ID
std::unordered_map< unsigned int, ChannelPlots > channelPlots_
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:279
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_
static const int CTPPS_DIAMOND_RP_ID
void CTPPSDiamondDQMSource::dqmBeginRun ( const edm::Run iRun,
const edm::EventSetup  
)
overrideprotected

Definition at line 364 of file CTPPSDiamondDQMSource.cc.

References centralOOT_, edm::contains(), edm::RunBase::run(), and runParameters_.

365 {
366  centralOOT_ = -999;
367  for ( const auto& oot : runParameters_ ) {
368  if ( edm::contains( oot.first, edm::EventID( iRun.run(), 0, 1 ) ) ) {
369  centralOOT_ = oot.second; break;
370  }
371  }
372 }
bool contains(EventRange const &lh, EventID const &rh)
Definition: EventRange.cc:38
RunNumber_t run() const
Definition: RunBase.h:40
std::vector< std::pair< edm::EventRange, int > > runParameters_
void CTPPSDiamondDQMSource::endLuminosityBlock ( const edm::LuminosityBlock ,
const edm::EventSetup  
)
overrideprotected

Definition at line 928 of file CTPPSDiamondDQMSource.cc.

References CTPPSDetId::arm(), CTPPSDiamondDetId::channel(), channelPlots_, CTPPSDiamondDetId::plane(), plotFactory::plot, potPlots_, CTPPSDetId::rp(), and SEC_PER_LUMI_SECTION.

929 {
930  for ( auto& plot : channelPlots_ ) {
931  if ( plot.second.hitsCounterPerLumisection != 0 ) {
932  plot.second.hit_rate->Fill( (double) plot.second.hitsCounterPerLumisection / SEC_PER_LUMI_SECTION );
933  }
934  plot.second.hitsCounterPerLumisection = 0;
935 
936  double HundredOverHitCounter = .0;
937  if ( plot.second.HitCounter != 0 )
938  HundredOverHitCounter = 100. / plot.second.HitCounter;
939  plot.second.HPTDCErrorFlags->setBinContent( 16, HundredOverHitCounter * plot.second.MHCounter );
940  plot.second.leadingWithoutTrailing->setBinContent(1, HundredOverHitCounter * plot.second.LeadingOnlyCounter );
941  plot.second.leadingWithoutTrailing->setBinContent(2, HundredOverHitCounter * plot.second.TrailingOnlyCounter );
942  plot.second.leadingWithoutTrailing->setBinContent(3, HundredOverHitCounter * plot.second.CompleteCounter );
943  }
944 
945  for ( auto& plot : potPlots_ ) {
946  double HundredOverHitCounterPot = 0.;
947  if ( plot.second.HitCounter !=0 )
948  HundredOverHitCounterPot = 100. / plot.second.HitCounter;
949  plot.second.HPTDCErrorFlags_cumulative->setBinContent( 16, HundredOverHitCounterPot * plot.second.MHCounter );
950  plot.second.leadingWithoutTrailingCumulativePot->setBinContent(1, HundredOverHitCounterPot * plot.second.LeadingOnlyCounter );
951  plot.second.leadingWithoutTrailingCumulativePot->setBinContent(2, HundredOverHitCounterPot * plot.second.TrailingOnlyCounter );
952  plot.second.leadingWithoutTrailingCumulativePot->setBinContent(3, HundredOverHitCounterPot * plot.second.CompleteCounter );
953 
954  plot.second.MHComprensive->Reset();
955  CTPPSDiamondDetId rpId(plot.first);
956  for ( auto& chPlot : channelPlots_ ) {
957  CTPPSDiamondDetId chId(chPlot.first);
958  if ( chId.arm() == rpId.arm() && chId.rp() == rpId.rp() ) {
959  plot.second.MHComprensive->Fill(chId.plane(), chId.channel(), chPlot.second.HPTDCErrorFlags->getBinContent( 16 ) );
960  }
961  }
962 
963  }
964 
965 }
std::unordered_map< unsigned int, ChannelPlots > channelPlots_
std::unordered_map< unsigned int, PotPlots > potPlots_
static const double SEC_PER_LUMI_SECTION
Detector ID class for CTPPS Timing Diamond detectors. Bits [19:31] : Assigend in CTPPSDetId Calss Bit...
void CTPPSDiamondDQMSource::endRun ( const edm::Run ,
const edm::EventSetup  
)
overrideprotected

Definition at line 970 of file CTPPSDiamondDQMSource.cc.

References DEFINE_FWK_MODULE.

971 {}

Member Data Documentation

int CTPPSDiamondDQMSource::centralOOT_
private

Definition at line 80 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze(), and dqmBeginRun().

const int CTPPSDiamondDQMSource::CHANNEL_OF_VFAT_CLOCK = 30
staticprivate

Definition at line 55 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze().

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

Definition at line 178 of file CTPPSDiamondDQMSource.cc.

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

const int CTPPSDiamondDQMSource::CTPPS_DIAMOND_NUM_OF_CHANNELS = 12
staticprivate

Definition at line 65 of file CTPPSDiamondDQMSource.cc.

Referenced by bookHistograms().

const int CTPPSDiamondDQMSource::CTPPS_DIAMOND_NUM_OF_PLANES = 4
staticprivate

Definition at line 64 of file CTPPSDiamondDQMSource.cc.

Referenced by bookHistograms().

const int CTPPSDiamondDQMSource::CTPPS_DIAMOND_RP_ID = 6
staticprivate

Definition at line 61 of file CTPPSDiamondDQMSource.cc.

Referenced by bookHistograms().

const int CTPPSDiamondDQMSource::CTPPS_DIAMOND_STATION_ID = 1
staticprivate

Definition at line 60 of file CTPPSDiamondDQMSource.cc.

Referenced by bookHistograms().

const int CTPPSDiamondDQMSource::CTPPS_FAR_RP_ID = 3
staticprivate

Definition at line 63 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze().

const int CTPPSDiamondDQMSource::CTPPS_FED_ID_45 = 583
staticprivate

Definition at line 66 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze().

const int CTPPSDiamondDQMSource::CTPPS_FED_ID_56 = 582
staticprivate

Definition at line 67 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze().

const int CTPPSDiamondDQMSource::CTPPS_NEAR_RP_ID = 2
staticprivate

Definition at line 62 of file CTPPSDiamondDQMSource.cc.

const int CTPPSDiamondDQMSource::CTPPS_NUM_OF_ARMS = 2
staticprivate

Definition at line 59 of file CTPPSDiamondDQMSource.cc.

Referenced by bookHistograms().

const double CTPPSDiamondDQMSource::DISPLAY_RESOLUTION_FOR_HITS_MM = 0.1
staticprivate

Definition at line 56 of file CTPPSDiamondDQMSource.cc.

int CTPPSDiamondDQMSource::EC_difference_45_
private

Definition at line 137 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze().

int CTPPSDiamondDQMSource::EC_difference_56_
private

Definition at line 137 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze().

bool CTPPSDiamondDQMSource::excludeMultipleHits_
private

Definition at line 76 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze().

GlobalPlots CTPPSDiamondDQMSource::globalPlot_
private

Definition at line 92 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze(), and bookHistograms().

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

Definition at line 58 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze().

const double CTPPSDiamondDQMSource::INV_DISPLAY_RESOLUTION_FOR_HITS_MM = 1./DISPLAY_RESOLUTION_FOR_HITS_MM
staticprivate
double CTPPSDiamondDQMSource::maximumStripAngleForTomography_
private

Definition at line 78 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze().

double CTPPSDiamondDQMSource::minimumStripAngleForTomography_
private

Definition at line 77 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze().

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

Definition at line 152 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze(), and bookHistograms().

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

Definition at line 79 of file CTPPSDiamondDQMSource.cc.

Referenced by CTPPSDiamondDQMSource(), and dqmBeginRun().

const double CTPPSDiamondDQMSource::SEC_PER_LUMI_SECTION = 23.31
staticprivate

Definition at line 54 of file CTPPSDiamondDQMSource.cc.

Referenced by endLuminosityBlock().

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

Definition at line 72 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze().

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

Definition at line 73 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze().

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

Definition at line 71 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze().

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

Definition at line 74 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze().

edm::EDGetTokenT< edm::DetSetVector<TotemRPLocalTrack> > CTPPSDiamondDQMSource::tokenLocalTrack_
private

Definition at line 70 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze().

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

Definition at line 69 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze().

unsigned int CTPPSDiamondDQMSource::verbosity_
private

Definition at line 81 of file CTPPSDiamondDQMSource.cc.

Referenced by analyze().