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 657 of file SiPixelPayloadInspectorHelper.h.

Constructor & Destructor Documentation

◆ ~topolInfo()

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

Definition at line 673 of file SiPixelPayloadInspectorHelper.h.

673 {}

Member Function Documentation

◆ fillGeometryInfo()

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

Definition at line 707 of file SiPixelPayloadInspectorHelper.h.

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

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 ( )

Definition at line 729 of file SiPixelPayloadInspectorHelper.h.

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

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  )

Definition at line 685 of file SiPixelPayloadInspectorHelper.h.

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

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

◆ printAll()

void SiPixelPI::topolInfo::printAll ( )

Definition at line 677 of file SiPixelPayloadInspectorHelper.h.

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

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

◆ sanityCheck()

bool SiPixelPI::topolInfo::sanityCheck ( )

Definition at line 697 of file SiPixelPayloadInspectorHelper.h.

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

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 665 of file SiPixelPayloadInspectorHelper.h.

Referenced by fillGeometryInfo(), and filterThePartition().

◆ m_rawid

uint32_t SiPixelPI::topolInfo::m_rawid
private

Definition at line 659 of file SiPixelPayloadInspectorHelper.h.

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

◆ m_ring

int SiPixelPI::topolInfo::m_ring
private

Definition at line 663 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:542
SiPixelPI::topolInfo::m_subdetid
int m_subdetid
Definition: SiPixelPayloadInspectorHelper.h:660
PixelSubdetector::PixelEndcap
Definition: PixelSubdetector.h:11
PixelSubdetector::PixelBarrel
Definition: PixelSubdetector.h:11
SiPixelPI::BPixL4i
Definition: SiPixelPayloadInspectorHelper.h:584
TrackerTopology::pxfSide
unsigned int pxfSide(const DetId &id) const
Definition: TrackerTopology.h:192
SiPixelPI::topolInfo::m_layer
int m_layer
Definition: SiPixelPayloadInspectorHelper.h:661
SiPixelPI::topolInfo::m_isInternal
bool m_isInternal
Definition: SiPixelPayloadInspectorHelper.h:664
SiPixelPI::topolInfo::m_Phase
SiPixelPI::phase * m_Phase
Definition: SiPixelPayloadInspectorHelper.h:665
gather_cfg.cout
cout
Definition: gather_cfg.py:144
SiPixelPI::FPixpL3
Definition: SiPixelPayloadInspectorHelper.h:590
SiPixelPI::BPixL1i
Definition: SiPixelPayloadInspectorHelper.h:578
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:582
SiPixelPI::BPixL3o
Definition: SiPixelPayloadInspectorHelper.h:581
SiPixelPI::isBPixOuterLadder
bool isBPixOuterLadder(const DetId &detid, const TrackerTopology &tTopo, bool isPhase0)
Definition: SiPixelPayloadInspectorHelper.h:634
SiPixelPI::topolInfo::m_rawid
uint32_t m_rawid
Definition: SiPixelPayloadInspectorHelper.h:659
SiPixelPI::BPixL1o
Definition: SiPixelPayloadInspectorHelper.h:577
SiPixelPI::FPixmL1
Definition: SiPixelPayloadInspectorHelper.h:585
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:588
SiPixelPI::FPixpL2
Definition: SiPixelPayloadInspectorHelper.h:589
SiPixelPI::FPixmL2
Definition: SiPixelPayloadInspectorHelper.h:586
SiPixelPI::BPixL4o
Definition: SiPixelPayloadInspectorHelper.h:583
TrackerTopology::pxfDisk
unsigned int pxfDisk(const DetId &id) const
Definition: TrackerTopology.h:446
SiPixelPI::regions
regions
Definition: SiPixelPayloadInspectorHelper.h:576
SiPixelPI::NUM_OF_REGIONS
Definition: SiPixelPayloadInspectorHelper.h:591
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:587
SiPixelPI::topolInfo::m_side
int m_side
Definition: SiPixelPayloadInspectorHelper.h:662
SiPixelPI::BPixL2i
Definition: SiPixelPayloadInspectorHelper.h:580
SiPixelPI::topolInfo::m_ring
int m_ring
Definition: SiPixelPayloadInspectorHelper.h:663
SiPixelPI::BPixL2o
Definition: SiPixelPayloadInspectorHelper.h:579