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 341 of file AlignmentPayloadInspectorHelper.h.

Constructor & Destructor Documentation

◆ ~topolInfo()

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

Definition at line 358 of file AlignmentPayloadInspectorHelper.h.

358 {}

Member Function Documentation

◆ fillGeometryInfo()

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

Definition at line 395 of file AlignmentPayloadInspectorHelper.h.

References 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(), DetId::rawId(), DetId::subdetId(), 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().

397  {
398  unsigned int subdetId = static_cast<unsigned int>(detId.subdetId());
399 
400  m_rawid = detId.rawId();
401  m_subdetid = subdetId;
402 
403  if (subdetId == StripSubdetector::TIB) {
404  m_layer = tTopo.tibLayer(detId.rawId());
405  m_side = tTopo.tibSide(detId.rawId());
406  m_isRphi = tTopo.isRPhi(detId.rawId());
407  m_isDoubleSide = tTopo.tibIsDoubleSide(detId.rawId());
408  m_isInternal = tTopo.tibIsInternalString(detId.rawId());
409  } else if (subdetId == StripSubdetector::TOB) {
410  m_layer = tTopo.tobLayer(detId.rawId());
411  m_side = tTopo.tobSide(detId.rawId());
412  m_isRphi = tTopo.isRPhi(detId.rawId());
413  m_isDoubleSide = tTopo.tobIsDoubleSide(detId.rawId());
414  m_isInternal = tTopo.tobModule(detId.rawId()) % 2;
415  } else if (subdetId == StripSubdetector::TID) {
416  m_layer = tTopo.tidWheel(detId.rawId());
417  m_side = tTopo.tidSide(detId.rawId());
418  m_isRphi = tTopo.isRPhi(detId.rawId());
419  m_ring = tTopo.tidRing(detId.rawId());
420  m_isDoubleSide = tTopo.tidIsDoubleSide(detId.rawId());
421  m_isInternal = tTopo.tidModuleInfo(detId.rawId())[0];
422  } else if (subdetId == StripSubdetector::TEC) {
423  m_layer = tTopo.tecWheel(detId.rawId());
424  m_side = tTopo.tecSide(detId.rawId());
425  m_isRphi = tTopo.isRPhi(detId.rawId());
426  m_ring = tTopo.tecRing(detId.rawId());
427  m_isDoubleSide = tTopo.tecIsDoubleSide(detId.rawId());
428  m_isInternal = tTopo.tecPetalInfo(detId.rawId())[0];
429  } else if (subdetId == PixelSubdetector::PixelBarrel) {
430  m_layer = tTopo.pxbLayer(detId.rawId());
431  m_isInternal = !AlignmentPI::isBPixOuterLadder(detId, tTopo, isPhase0);
432  } else if (subdetId == PixelSubdetector::PixelEndcap) {
433  m_layer = tTopo.pxfDisk(detId.rawId());
434  m_side = tTopo.pxfSide(detId.rawId());
435  } else
436  edm::LogWarning("LogicError") << "Unknown subdetid: " << subdetId;
437  }
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
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:48
static constexpr auto TOB
unsigned int pxfSide(const DetId &id) const
static constexpr auto TIB
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
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 442 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.

444  {
446 
447  if (m_isDoubleSide) {
449  }
450 
451  // BPix
452  if (m_subdetid == 1) {
453  switch (m_layer) {
454  case 1:
456  break;
457  case 2:
459  break;
460  case 3:
462  break;
463  case 4:
465  break;
466  default:
467  edm::LogWarning("LogicError") << "Unknow BPix layer: " << m_layer;
468  break;
469  }
470  // FPix
471  } else if (m_subdetid == 2) {
472  switch (m_layer) {
473  case 1:
475  break;
476  case 2:
478  break;
479  case 3:
481  break;
482  default:
483  edm::LogWarning("LogicError") << "Unknow FPix disk: " << m_layer;
484  break;
485  }
486  // TIB
487  } else if (m_subdetid == 3) {
488  switch (m_layer) {
489  case 1:
490  if (m_isRphi) {
492  } else {
494  }
495  break;
496  case 2:
497  if (m_isRphi) {
499  } else {
501  }
502  break;
503  case 3:
505  break;
506  case 4:
508  break;
509  default:
510  edm::LogWarning("LogicError") << "Unknow TIB layer: " << m_layer;
511  break;
512  }
513  // TID
514  } else if (m_subdetid == 4) {
515  switch (m_ring) {
516  case 1:
517  if (m_isRphi) {
519  } else {
521  }
522  break;
523  case 2:
524  if (m_isRphi) {
526  } else {
528  }
529  break;
530  case 3:
532  break;
533  default:
534  edm::LogWarning("LogicError") << "Unknow TID wheel: " << m_layer;
535  break;
536  }
537  // TOB
538  } else if (m_subdetid == 5) {
539  switch (m_layer) {
540  case 1:
541  if (m_isRphi) {
543  } else {
545  }
546  break;
547  case 2:
548  if (m_isRphi) {
550  } else {
552  }
553  break;
554  case 3:
556  break;
557  case 4:
559  break;
560  case 5:
562  break;
563  case 6:
565  break;
566  default:
567  edm::LogWarning("LogicError") << "Unknow TOB layer: " << m_layer;
568  break;
569  }
570  // TEC
571  } else if (m_subdetid == 6) {
572  switch (m_ring) {
573  case 1:
574  if (m_isRphi) {
576  } else {
578  }
579  break;
580  case 2:
581  if (m_isRphi) {
583  } else {
585  }
586  break;
587  case 3:
589  break;
590  case 4:
592  break;
593  case 5:
595  break;
596  case 6:
598  break;
599  case 7:
601  break;
602  default:
603  edm::LogWarning("LogicError") << "Unknow TEC ring: " << m_ring;
604  break;
605  }
606  }
607 
608  return ret;
609  }
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 385 of file AlignmentPayloadInspectorHelper.h.

References m_layer, and m_subdetid.

387  {
388  if (m_layer == 0 || (m_subdetid == 1 && m_layer > 4) || (m_subdetid == 2 && m_layer > 3)) {
389  return false;
390  } else {
391  return true;
392  }
393  }

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 343 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