CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 659 of file SiPixelPayloadInspectorHelper.h.

Constructor & Destructor Documentation

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

Definition at line 675 of file SiPixelPayloadInspectorHelper.h.

675 {}

Member Function Documentation

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

Definition at line 709 of file SiPixelPayloadInspectorHelper.h.

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.

Referenced by gainCalibHelper::SiPixelGainCalibrationByRegionComparisonBase< myType, PayloadType, nIOVs, ntags >::fill().

711  {
712  // set the phase
713  m_Phase = const_cast<SiPixelPI::phase*>(&ph);
714  unsigned int subdetId = static_cast<unsigned int>(detId.subdetId());
715 
716  m_rawid = detId.rawId();
717  m_subdetid = subdetId;
718  if (subdetId == PixelSubdetector::PixelBarrel) {
719  m_layer = tTopo.pxbLayer(detId.rawId());
721  } else if (subdetId == PixelSubdetector::PixelEndcap) {
722  m_layer = tTopo.pxfDisk(detId.rawId());
723  m_side = tTopo.pxfSide(detId.rawId());
724  } else
725  edm::LogWarning("LogicError") << "Unknown subdetid: " << subdetId;
726  }
unsigned int pxfDisk(const DetId &id) const
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:48
unsigned int pxbLayer(const DetId &id) const
bool isBPixOuterLadder(const DetId &detid, const TrackerTopology &tTopo, bool isPhase0)
unsigned int pxfSide(const DetId &id) const
Log< level::Warning, false > LogWarning
SiPixelPI::regions SiPixelPI::topolInfo::filterThePartition ( )
inline

Definition at line 731 of file SiPixelPayloadInspectorHelper.h.

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.

Referenced by gainCalibHelper::SiPixelGainCalibrationByRegionComparisonBase< myType, PayloadType, nIOVs, ntags >::fill().

733  {
735 
736  if (m_Phase == nullptr) {
737  throw cms::Exception("LogicError") << "Cannot call filterThePartition BEFORE filling the geometry info!";
738  }
739 
740  // BPix
741  if (m_subdetid == 1) {
742  switch (m_layer) {
743  case 1:
745  break;
746  case 2:
748  break;
749  case 3:
751  break;
752  case 4:
754  break;
755  default:
756  edm::LogWarning("LogicError") << "Unknow BPix layer: " << m_layer;
757  break;
758  }
759  // FPix
760  } else if (m_subdetid == 2) {
761  switch (m_layer) {
762  case 1:
763  m_side > 1 ? ret = SiPixelPI::FPixpL1 : ret = SiPixelPI::FPixmL1;
764  break;
765  case 2:
766  m_side > 1 ? ret = SiPixelPI::FPixpL2 : ret = SiPixelPI::FPixmL2;
767  break;
768  case 3:
769  m_side > 1 ? ret = SiPixelPI::FPixpL3 : ret = SiPixelPI::FPixmL3;
770  break;
771  default:
773  // warning message only if the phase2 is < 2
774  edm::LogWarning("LogicError") << "Unknow FPix disk: " << m_layer;
775  }
776  break;
777  }
778  }
779  return ret;
780  }
tuple ret
prodAgent to be discontinued
Log< level::Warning, false > LogWarning
void SiPixelPI::topolInfo::init ( void  )
inline
void SiPixelPI::topolInfo::printAll ( )
inline

Definition at line 679 of file SiPixelPayloadInspectorHelper.h.

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

681  {
682  std::cout << " detId:" << m_rawid << " subdetid: " << m_subdetid << " layer: " << m_layer << " side: " << m_side
683  << " ring: " << m_ring << " isInternal:" << m_isInternal << std::endl;
684  }
tuple cout
Definition: gather_cfg.py:144
bool SiPixelPI::topolInfo::sanityCheck ( )
inline

Definition at line 699 of file SiPixelPayloadInspectorHelper.h.

References m_layer, and m_subdetid.

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

Member Data Documentation

bool SiPixelPI::topolInfo::m_isInternal
private
int SiPixelPI::topolInfo::m_layer
private
SiPixelPI::phase* SiPixelPI::topolInfo::m_Phase
private

Definition at line 667 of file SiPixelPayloadInspectorHelper.h.

Referenced by fillGeometryInfo(), and filterThePartition().

uint32_t SiPixelPI::topolInfo::m_rawid
private

Definition at line 661 of file SiPixelPayloadInspectorHelper.h.

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

int SiPixelPI::topolInfo::m_ring
private

Definition at line 665 of file SiPixelPayloadInspectorHelper.h.

Referenced by init(), and printAll().

int SiPixelPI::topolInfo::m_side
private
int SiPixelPI::topolInfo::m_subdetid
private