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

Constructor & Destructor Documentation

◆ ~topolInfo()

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

Definition at line 670 of file SiPixelPayloadInspectorHelper.h.

670 {}

Member Function Documentation

◆ fillGeometryInfo()

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

Definition at line 704 of file SiPixelPayloadInspectorHelper.h.

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

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

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

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

684  {
685  m_rawid = 0;
686  m_subdetid = -1;
687  m_layer = -1;
688  m_side = -1;
689  m_ring = -1;
690  m_isInternal = false;
691  };

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

◆ printAll()

void SiPixelPI::topolInfo::printAll ( )

Definition at line 674 of file SiPixelPayloadInspectorHelper.h.

676  {
677  std::cout << " detId:" << m_rawid << " subdetid: " << m_subdetid << " layer: " << m_layer << " side: " << m_side
678  << " ring: " << m_ring << " isInternal:" << m_isInternal << std::endl;
679  }

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

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

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

Referenced by fillGeometryInfo(), and filterThePartition().

◆ m_rawid

uint32_t SiPixelPI::topolInfo::m_rawid
private

Definition at line 656 of file SiPixelPayloadInspectorHelper.h.

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

◆ m_ring

int SiPixelPI::topolInfo::m_ring
private

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