CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
SiPixelPI::topolInfo Struct Reference

#include <SiPixelPayloadInspectorHelper.h>

Public Member Functions

void fillGeometryInfo (const DetId &detId, const TrackerTopology &tTopo, const SiPixelPI::phase &ph)
 
SiPixelPI::regions filterThePartition ()
 
void init ()
 
void printAll ()
 
bool sanityCheck ()
 
virtual ~topolInfo ()
 

Private Attributes

bool m_isInternal
 
int m_layer
 
SiPixelPI::phasem_Phase
 
uint32_t m_rawid
 
int m_ring
 
int m_side
 
int m_subdetid
 

Detailed Description

Definition at line 658 of file SiPixelPayloadInspectorHelper.h.

Constructor & Destructor Documentation

◆ ~topolInfo()

virtual SiPixelPI::topolInfo::~topolInfo ( )
inlinevirtual

Definition at line 674 of file SiPixelPayloadInspectorHelper.h.

674 {}

Member Function Documentation

◆ fillGeometryInfo()

void SiPixelPI::topolInfo::fillGeometryInfo ( const DetId detId,
const TrackerTopology tTopo,
const SiPixelPI::phase ph 
)
inline

Definition at line 708 of file SiPixelPayloadInspectorHelper.h.

710  {
711  // set the phase
712  m_Phase = const_cast<SiPixelPI::phase*>(&ph);
713  unsigned int subdetId = static_cast<unsigned int>(detId.subdetId());
714 
715  m_rawid = detId.rawId();
716  m_subdetid = subdetId;
717  if (subdetId == PixelSubdetector::PixelBarrel) {
718  m_layer = tTopo.pxbLayer(detId.rawId());
720  } else if (subdetId == PixelSubdetector::PixelEndcap) {
721  m_layer = tTopo.pxfDisk(detId.rawId());
722  m_side = tTopo.pxfSide(detId.rawId());
723  } else
724  edm::LogWarning("LogicError") << "Unknown subdetid: " << subdetId;
725  }

References SiPixelPI::isBPixOuterLadder(), m_isInternal, m_layer, m_Phase, m_rawid, m_side, m_subdetid, PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, TrackerTopology::pxbLayer(), TrackerTopology::pxfDisk(), TrackerTopology::pxfSide(), DetId::rawId(), DetId::subdetId(), and SiPixelPI::zero.

◆ filterThePartition()

SiPixelPI::regions SiPixelPI::topolInfo::filterThePartition ( )
inline

Definition at line 730 of file SiPixelPayloadInspectorHelper.h.

732  {
734 
735  if (m_Phase == nullptr) {
736  throw cms::Exception("LogicError") << "Cannot call filterThePartition BEFORE filling the geometry info!";
737  }
738 
739  // BPix
740  if (m_subdetid == 1) {
741  switch (m_layer) {
742  case 1:
744  break;
745  case 2:
747  break;
748  case 3:
750  break;
751  case 4:
753  break;
754  default:
755  edm::LogWarning("LogicError") << "Unknow BPix layer: " << m_layer;
756  break;
757  }
758  // FPix
759  } else if (m_subdetid == 2) {
760  switch (m_layer) {
761  case 1:
763  break;
764  case 2:
766  break;
767  case 3:
769  break;
770  default:
772  // warning message only if the phase2 is < 2
773  edm::LogWarning("LogicError") << "Unknow FPix disk: " << m_layer;
774  }
775  break;
776  }
777  }
778  return ret;
779  }

References SiPixelPI::BPixL1i, SiPixelPI::BPixL1o, SiPixelPI::BPixL2i, SiPixelPI::BPixL2o, SiPixelPI::BPixL3i, SiPixelPI::BPixL3o, SiPixelPI::BPixL4i, SiPixelPI::BPixL4o, Exception, SiPixelPI::FPixmL1, SiPixelPI::FPixmL2, SiPixelPI::FPixmL3, SiPixelPI::FPixpL1, SiPixelPI::FPixpL2, SiPixelPI::FPixpL3, m_isInternal, m_layer, m_Phase, m_side, m_subdetid, SiPixelPI::NUM_OF_REGIONS, runTheMatrix::ret, and SiPixelPI::two.

◆ init()

void SiPixelPI::topolInfo::init ( void  )
inline

Definition at line 686 of file SiPixelPayloadInspectorHelper.h.

688  {
689  m_rawid = 0;
690  m_subdetid = -1;
691  m_layer = -1;
692  m_side = -1;
693  m_ring = -1;
694  m_isInternal = false;
695  };

References m_isInternal, m_layer, m_rawid, m_ring, m_side, and m_subdetid.

◆ printAll()

void SiPixelPI::topolInfo::printAll ( )
inline

Definition at line 678 of file SiPixelPayloadInspectorHelper.h.

680  {
681  std::cout << " detId:" << m_rawid << " subdetid: " << m_subdetid << " layer: " << m_layer << " side: " << m_side
682  << " ring: " << m_ring << " isInternal:" << m_isInternal << std::endl;
683  }

References gather_cfg::cout, m_isInternal, m_layer, m_rawid, m_ring, m_side, and m_subdetid.

◆ sanityCheck()

bool SiPixelPI::topolInfo::sanityCheck ( )
inline

Definition at line 698 of file SiPixelPayloadInspectorHelper.h.

700  {
701  if (m_layer == 0 || (m_subdetid == 1 && m_layer > 4) || (m_subdetid == 2 && m_layer > 3)) {
702  return false;
703  } else {
704  return true;
705  }
706  }

References m_layer, and m_subdetid.

Member Data Documentation

◆ m_isInternal

bool SiPixelPI::topolInfo::m_isInternal
private

◆ m_layer

int SiPixelPI::topolInfo::m_layer
private

◆ m_Phase

SiPixelPI::phase* SiPixelPI::topolInfo::m_Phase
private

Definition at line 666 of file SiPixelPayloadInspectorHelper.h.

Referenced by fillGeometryInfo(), and filterThePartition().

◆ m_rawid

uint32_t SiPixelPI::topolInfo::m_rawid
private

Definition at line 660 of file SiPixelPayloadInspectorHelper.h.

Referenced by fillGeometryInfo(), init(), and printAll().

◆ m_ring

int SiPixelPI::topolInfo::m_ring
private

Definition at line 664 of file SiPixelPayloadInspectorHelper.h.

Referenced by init(), and printAll().

◆ m_side

int SiPixelPI::topolInfo::m_side
private

◆ m_subdetid

int SiPixelPI::topolInfo::m_subdetid
private
runTheMatrix.ret
ret
prodAgent to be discontinued
Definition: runTheMatrix.py:543
SiPixelPI::topolInfo::m_subdetid
int m_subdetid
Definition: SiPixelPayloadInspectorHelper.h:661
PixelSubdetector::PixelEndcap
Definition: PixelSubdetector.h:11
PixelSubdetector::PixelBarrel
Definition: PixelSubdetector.h:11
SiPixelPI::BPixL4i
Definition: SiPixelPayloadInspectorHelper.h:585
TrackerTopology::pxfSide
unsigned int pxfSide(const DetId &id) const
Definition: TrackerTopology.h:192
SiPixelPI::topolInfo::m_layer
int m_layer
Definition: SiPixelPayloadInspectorHelper.h:662
SiPixelPI::topolInfo::m_isInternal
bool m_isInternal
Definition: SiPixelPayloadInspectorHelper.h:665
SiPixelPI::topolInfo::m_Phase
SiPixelPI::phase * m_Phase
Definition: SiPixelPayloadInspectorHelper.h:666
gather_cfg.cout
cout
Definition: gather_cfg.py:144
SiPixelPI::FPixpL3
Definition: SiPixelPayloadInspectorHelper.h:591
SiPixelPI::BPixL1i
Definition: SiPixelPayloadInspectorHelper.h:579
SiPixelPI::zero
Definition: SiPixelPayloadInspectorHelper.h:39
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
TrackerTopology::pxbLayer
unsigned int pxbLayer(const DetId &id) const
Definition: TrackerTopology.h:144
SiPixelPI::BPixL3i
Definition: SiPixelPayloadInspectorHelper.h:583
SiPixelPI::BPixL3o
Definition: SiPixelPayloadInspectorHelper.h:582
SiPixelPI::isBPixOuterLadder
bool isBPixOuterLadder(const DetId &detid, const TrackerTopology &tTopo, bool isPhase0)
Definition: SiPixelPayloadInspectorHelper.h:635
SiPixelPI::topolInfo::m_rawid
uint32_t m_rawid
Definition: SiPixelPayloadInspectorHelper.h:660
SiPixelPI::BPixL1o
Definition: SiPixelPayloadInspectorHelper.h:578
SiPixelPI::FPixmL1
Definition: SiPixelPayloadInspectorHelper.h:586
DetId::subdetId
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum)
Definition: DetId.h:48
SiPixelPI::FPixpL1
Definition: SiPixelPayloadInspectorHelper.h:589
SiPixelPI::FPixpL2
Definition: SiPixelPayloadInspectorHelper.h:590
SiPixelPI::FPixmL2
Definition: SiPixelPayloadInspectorHelper.h:587
SiPixelPI::BPixL4o
Definition: SiPixelPayloadInspectorHelper.h:584
TrackerTopology::pxfDisk
unsigned int pxfDisk(const DetId &id) const
Definition: TrackerTopology.h:446
SiPixelPI::regions
regions
Definition: SiPixelPayloadInspectorHelper.h:577
SiPixelPI::NUM_OF_REGIONS
Definition: SiPixelPayloadInspectorHelper.h:592
SiPixelPI::two
Definition: SiPixelPayloadInspectorHelper.h:39
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
Exception
Definition: hltDiff.cc:245
SiPixelPI::FPixmL3
Definition: SiPixelPayloadInspectorHelper.h:588
SiPixelPI::topolInfo::m_side
int m_side
Definition: SiPixelPayloadInspectorHelper.h:663
SiPixelPI::BPixL2i
Definition: SiPixelPayloadInspectorHelper.h:581
SiPixelPI::topolInfo::m_ring
int m_ring
Definition: SiPixelPayloadInspectorHelper.h:664
SiPixelPI::BPixL2o
Definition: SiPixelPayloadInspectorHelper.h:580