CMS 3D CMS Logo

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

#include <AlignmentPayloadInspectorHelper.h>

Public Member Functions

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

Private Attributes

bool m_isDoubleSide
 
bool m_isInternal
 
bool m_isRphi
 
int m_layer
 
uint32_t m_rawid
 
int m_ring
 
int m_side
 
int m_subdetid
 

Detailed Description

Definition at line 380 of file AlignmentPayloadInspectorHelper.h.

Constructor & Destructor Documentation

◆ ~topolInfo()

virtual AlignmentPI::topolInfo::~topolInfo ( )
inlinevirtual

Definition at line 397 of file AlignmentPayloadInspectorHelper.h.

397 {}

Member Function Documentation

◆ fillGeometryInfo()

void AlignmentPI::topolInfo::fillGeometryInfo ( const DetId detId,
const TrackerTopology tTopo,
bool  isPhase0 
)
inline

Definition at line 434 of file AlignmentPayloadInspectorHelper.h.

References hcalRecHitTable_cff::detId, AlignmentPI::isBPixOuterLadder(), TrackerTopology::isRPhi(), m_isDoubleSide, m_isInternal, m_isRphi, m_layer, m_rawid, m_ring, m_side, m_subdetid, PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, TrackerTopology::pxbLayer(), TrackerTopology::pxfDisk(), TrackerTopology::pxfSide(), StripSubdetector::TEC, TrackerTopology::tecIsDoubleSide(), TrackerTopology::tecPetalInfo(), TrackerTopology::tecRing(), TrackerTopology::tecSide(), TrackerTopology::tecWheel(), StripSubdetector::TIB, TrackerTopology::tibIsDoubleSide(), TrackerTopology::tibIsInternalString(), TrackerTopology::tibLayer(), TrackerTopology::tibSide(), StripSubdetector::TID, TrackerTopology::tidIsDoubleSide(), TrackerTopology::tidModuleInfo(), TrackerTopology::tidRing(), TrackerTopology::tidSide(), TrackerTopology::tidWheel(), StripSubdetector::TOB, TrackerTopology::tobIsDoubleSide(), TrackerTopology::tobLayer(), TrackerTopology::tobModule(), and TrackerTopology::tobSide().

436  {
437  unsigned int subdetId = static_cast<unsigned int>(detId.subdetId());
438 
439  m_rawid = detId.rawId();
440  m_subdetid = subdetId;
441 
442  if (subdetId == StripSubdetector::TIB) {
443  m_layer = tTopo.tibLayer(detId.rawId());
444  m_side = tTopo.tibSide(detId.rawId());
445  m_isRphi = tTopo.isRPhi(detId.rawId());
446  m_isDoubleSide = tTopo.tibIsDoubleSide(detId.rawId());
447  m_isInternal = tTopo.tibIsInternalString(detId.rawId());
448  } else if (subdetId == StripSubdetector::TOB) {
449  m_layer = tTopo.tobLayer(detId.rawId());
450  m_side = tTopo.tobSide(detId.rawId());
451  m_isRphi = tTopo.isRPhi(detId.rawId());
452  m_isDoubleSide = tTopo.tobIsDoubleSide(detId.rawId());
453  m_isInternal = tTopo.tobModule(detId.rawId()) % 2;
454  } else if (subdetId == StripSubdetector::TID) {
455  m_layer = tTopo.tidWheel(detId.rawId());
456  m_side = tTopo.tidSide(detId.rawId());
457  m_isRphi = tTopo.isRPhi(detId.rawId());
458  m_ring = tTopo.tidRing(detId.rawId());
459  m_isDoubleSide = tTopo.tidIsDoubleSide(detId.rawId());
460  m_isInternal = tTopo.tidModuleInfo(detId.rawId())[0];
461  } else if (subdetId == StripSubdetector::TEC) {
462  m_layer = tTopo.tecWheel(detId.rawId());
463  m_side = tTopo.tecSide(detId.rawId());
464  m_isRphi = tTopo.isRPhi(detId.rawId());
465  m_ring = tTopo.tecRing(detId.rawId());
466  m_isDoubleSide = tTopo.tecIsDoubleSide(detId.rawId());
467  m_isInternal = tTopo.tecPetalInfo(detId.rawId())[0];
468  } else if (subdetId == PixelSubdetector::PixelBarrel) {
469  m_layer = tTopo.pxbLayer(detId.rawId());
471  } else if (subdetId == PixelSubdetector::PixelEndcap) {
472  m_layer = tTopo.pxfDisk(detId.rawId());
473  m_side = tTopo.pxfSide(detId.rawId());
474  } else
475  edm::LogWarning("LogicError") << "Unknown subdetid: " << subdetId;
476  }
static constexpr auto TEC
bool tibIsDoubleSide(const DetId &id) const
bool tecIsDoubleSide(const DetId &id) const
bool tidIsDoubleSide(const DetId &id) const
unsigned int tobLayer(const DetId &id) const
unsigned int pxbLayer(const DetId &id) const
unsigned int tibSide(const DetId &id) const
unsigned int tobSide(const DetId &id) const
std::vector< unsigned int > tidModuleInfo(const DetId &id) const
unsigned int tidSide(const DetId &id) const
std::vector< unsigned int > tecPetalInfo(const DetId &id) const
unsigned int tidWheel(const DetId &id) const
unsigned int tecWheel(const DetId &id) const
bool isBPixOuterLadder(const DetId &detid, const TrackerTopology &tTopo, bool isPhase0)
bool isRPhi(const DetId &id) const
unsigned int tecRing(const DetId &id) const
ring id
bool tobIsDoubleSide(const DetId &id) const
unsigned int tecSide(const DetId &id) const
unsigned int pxfDisk(const DetId &id) const
static constexpr auto TOB
unsigned int pxfSide(const DetId &id) const
static constexpr auto TIB
bool tibIsInternalString(const DetId &id) const
unsigned int tidRing(const DetId &id) const
unsigned int tibLayer(const DetId &id) const
unsigned int tobModule(const DetId &id) const
Log< level::Warning, false > LogWarning
static constexpr auto TID

◆ filterThePartition()

AlignmentPI::regions AlignmentPI::topolInfo::filterThePartition ( )
inline

Definition at line 481 of file AlignmentPayloadInspectorHelper.h.

References AlignmentPI::BPixL1i, AlignmentPI::BPixL1o, AlignmentPI::BPixL2i, AlignmentPI::BPixL2o, AlignmentPI::BPixL3i, AlignmentPI::BPixL3o, AlignmentPI::BPixL4i, AlignmentPI::BPixL4o, AlignmentPI::FPixmL1, AlignmentPI::FPixmL2, AlignmentPI::FPixmL3, AlignmentPI::FPixpL1, AlignmentPI::FPixpL2, AlignmentPI::FPixpL3, m_isDoubleSide, m_isInternal, m_isRphi, m_layer, m_ring, m_side, m_subdetid, AlignmentPI::NUM_OF_REGIONS, runTheMatrix::ret, AlignmentPI::StripDoubleSide, AlignmentPI::TECmR1R, AlignmentPI::TECmR1S, AlignmentPI::TECmR2R, AlignmentPI::TECmR2S, AlignmentPI::TECmR3, AlignmentPI::TECmR4, AlignmentPI::TECmR5, AlignmentPI::TECmR6, AlignmentPI::TECmR7, AlignmentPI::TECpR1R, AlignmentPI::TECpR1S, AlignmentPI::TECpR2R, AlignmentPI::TECpR2S, AlignmentPI::TECpR3, AlignmentPI::TECpR4, AlignmentPI::TECpR5, AlignmentPI::TECpR6, AlignmentPI::TECpR7, AlignmentPI::TIBL1Ri, AlignmentPI::TIBL1Ro, AlignmentPI::TIBL1Si, AlignmentPI::TIBL1So, AlignmentPI::TIBL2Ri, AlignmentPI::TIBL2Ro, AlignmentPI::TIBL2Si, AlignmentPI::TIBL2So, AlignmentPI::TIBL3i, AlignmentPI::TIBL3o, AlignmentPI::TIBL4i, AlignmentPI::TIBL4o, AlignmentPI::TIDmR1R, AlignmentPI::TIDmR1S, AlignmentPI::TIDmR2R, AlignmentPI::TIDmR2S, AlignmentPI::TIDmR3, AlignmentPI::TIDpR1R, AlignmentPI::TIDpR1S, AlignmentPI::TIDpR2R, AlignmentPI::TIDpR2S, AlignmentPI::TIDpR3, AlignmentPI::TOBL1Ri, AlignmentPI::TOBL1Ro, AlignmentPI::TOBL1Si, AlignmentPI::TOBL1So, AlignmentPI::TOBL2Ri, AlignmentPI::TOBL2Ro, AlignmentPI::TOBL2Si, AlignmentPI::TOBL2So, AlignmentPI::TOBL3i, AlignmentPI::TOBL3o, AlignmentPI::TOBL4i, AlignmentPI::TOBL4o, AlignmentPI::TOBL5i, AlignmentPI::TOBL5o, AlignmentPI::TOBL6i, and AlignmentPI::TOBL6o.

483  {
485 
486  if (m_isDoubleSide) {
488  }
489 
490  // BPix
491  if (m_subdetid == 1) {
492  switch (m_layer) {
493  case 1:
495  break;
496  case 2:
498  break;
499  case 3:
501  break;
502  case 4:
504  break;
505  default:
506  edm::LogWarning("LogicError") << "Unknow BPix layer: " << m_layer;
507  break;
508  }
509  // FPix
510  } else if (m_subdetid == 2) {
511  switch (m_layer) {
512  case 1:
514  break;
515  case 2:
517  break;
518  case 3:
520  break;
521  default:
522  edm::LogWarning("LogicError") << "Unknow FPix disk: " << m_layer;
523  break;
524  }
525  // TIB
526  } else if (m_subdetid == 3) {
527  switch (m_layer) {
528  case 1:
529  if (m_isRphi) {
531  } else {
533  }
534  break;
535  case 2:
536  if (m_isRphi) {
538  } else {
540  }
541  break;
542  case 3:
544  break;
545  case 4:
547  break;
548  default:
549  edm::LogWarning("LogicError") << "Unknow TIB layer: " << m_layer;
550  break;
551  }
552  // TID
553  } else if (m_subdetid == 4) {
554  switch (m_ring) {
555  case 1:
556  if (m_isRphi) {
558  } else {
560  }
561  break;
562  case 2:
563  if (m_isRphi) {
565  } else {
567  }
568  break;
569  case 3:
571  break;
572  default:
573  edm::LogWarning("LogicError") << "Unknow TID wheel: " << m_layer;
574  break;
575  }
576  // TOB
577  } else if (m_subdetid == 5) {
578  switch (m_layer) {
579  case 1:
580  if (m_isRphi) {
582  } else {
584  }
585  break;
586  case 2:
587  if (m_isRphi) {
589  } else {
591  }
592  break;
593  case 3:
595  break;
596  case 4:
598  break;
599  case 5:
601  break;
602  case 6:
604  break;
605  default:
606  edm::LogWarning("LogicError") << "Unknow TOB layer: " << m_layer;
607  break;
608  }
609  // TEC
610  } else if (m_subdetid == 6) {
611  switch (m_ring) {
612  case 1:
613  if (m_isRphi) {
615  } else {
617  }
618  break;
619  case 2:
620  if (m_isRphi) {
622  } else {
624  }
625  break;
626  case 3:
628  break;
629  case 4:
631  break;
632  case 5:
634  break;
635  case 6:
637  break;
638  case 7:
640  break;
641  default:
642  edm::LogWarning("LogicError") << "Unknow TEC ring: " << m_ring;
643  break;
644  }
645  }
646 
647  return ret;
648  }
ret
prodAgent to be discontinued
Log< level::Warning, false > LogWarning

◆ init()

void AlignmentPI::topolInfo::init ( void  )
inline

◆ printAll()

void AlignmentPI::topolInfo::printAll ( )
inline

◆ sanityCheck()

bool AlignmentPI::topolInfo::sanityCheck ( )
inline

Definition at line 424 of file AlignmentPayloadInspectorHelper.h.

References m_layer, and m_subdetid.

426  {
427  if (m_layer == 0 || (m_subdetid == 1 && m_layer > 4) || (m_subdetid == 2 && m_layer > 3)) {
428  return false;
429  } else {
430  return true;
431  }
432  }

Member Data Documentation

◆ m_isDoubleSide

bool AlignmentPI::topolInfo::m_isDoubleSide
private

◆ m_isInternal

bool AlignmentPI::topolInfo::m_isInternal
private

◆ m_isRphi

bool AlignmentPI::topolInfo::m_isRphi
private

◆ m_layer

int AlignmentPI::topolInfo::m_layer
private

◆ m_rawid

uint32_t AlignmentPI::topolInfo::m_rawid
private

Definition at line 382 of file AlignmentPayloadInspectorHelper.h.

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

◆ m_ring

int AlignmentPI::topolInfo::m_ring
private

◆ m_side

int AlignmentPI::topolInfo::m_side
private

◆ m_subdetid

int AlignmentPI::topolInfo::m_subdetid
private