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

Constructor & Destructor Documentation

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

Definition at line 249 of file AlignmentPayloadInspectorHelper.h.

249 {}

Member Function Documentation

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

Definition at line 296 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().

298  {
299 
300  unsigned int subdetId = static_cast<unsigned int>(detId.subdetId());
301 
302  m_rawid = detId.rawId();
303  m_subdetid = subdetId;
304 
305  if ( subdetId == StripSubdetector::TIB) {
306  m_layer = tTopo.tibLayer(detId.rawId());
307  m_side = tTopo.tibSide(detId.rawId());
308  m_isRphi = tTopo.isRPhi(detId.rawId());
309  m_isDoubleSide = tTopo.tibIsDoubleSide(detId.rawId());
310  m_isInternal = tTopo.tibIsInternalString(detId.rawId());
311  }
312  else if ( subdetId == StripSubdetector::TOB ){
313  m_layer = tTopo.tobLayer(detId.rawId());
314  m_side = tTopo.tobSide(detId.rawId());
315  m_isRphi = tTopo.isRPhi(detId.rawId());
316  m_isDoubleSide = tTopo.tobIsDoubleSide(detId.rawId());
317  m_isInternal = tTopo.tobModule(detId.rawId())%2;
318  }
319  else if ( subdetId == StripSubdetector::TID) {
320  m_layer = tTopo.tidWheel(detId.rawId());
321  m_side = tTopo.tidSide(detId.rawId());
322  m_isRphi = tTopo.isRPhi(detId.rawId());
323  m_ring = tTopo.tidRing(detId.rawId());
324  m_isDoubleSide = tTopo.tidIsDoubleSide(detId.rawId());
325  m_isInternal = tTopo.tidModuleInfo(detId.rawId())[0];
326  }
327  else if ( subdetId == StripSubdetector::TEC ){
328  m_layer = tTopo.tecWheel(detId.rawId());
329  m_side = tTopo.tecSide(detId.rawId());
330  m_isRphi = tTopo.isRPhi(detId.rawId());
331  m_ring = tTopo.tecRing(detId.rawId());
332  m_isDoubleSide = tTopo.tecIsDoubleSide(detId.rawId());
333  m_isInternal = tTopo.tecPetalInfo(detId.rawId())[0];
334  }
335  else if ( subdetId == PixelSubdetector::PixelBarrel ) {
336  m_layer = tTopo.pxbLayer(detId.rawId());
337  m_isInternal = !AlignmentPI::isBPixOuterLadder(detId,tTopo,isPhase0);
338  }
339  else if ( subdetId == PixelSubdetector::PixelEndcap ) {
340  m_layer = tTopo.pxfDisk(detId.rawId());
341  m_side = tTopo.pxfSide(detId.rawId());
342  }
343  else
344  edm::LogWarning("LogicError") << "Unknown subdetid: " << subdetId;
345  }
bool tecIsDoubleSide(const DetId &id) const
bool tobIsDoubleSide(const DetId &id) const
bool tibIsDoubleSide(const DetId &id) const
unsigned int tibLayer(const DetId &id) const
unsigned int tidRing(const DetId &id) const
std::vector< unsigned int > tidModuleInfo(const DetId &id) const
unsigned int pxfDisk(const DetId &id) const
unsigned int tecRing(const DetId &id) const
ring id
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:50
unsigned int tidWheel(const DetId &id) const
bool isBPixOuterLadder(const DetId &detid, const TrackerTopology &tTopo, bool isPhase0)
unsigned int tibSide(const DetId &id) const
std::vector< unsigned int > tecPetalInfo(const DetId &id) const
unsigned int tidSide(const DetId &id) const
unsigned int tobSide(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:41
unsigned int pxbLayer(const DetId &id) const
bool tidIsDoubleSide(const DetId &id) const
unsigned int tobModule(const DetId &id) const
unsigned int pxfSide(const DetId &id) const
bool isRPhi(const DetId &id) const
bool tibIsInternalString(const DetId &id) const
unsigned int tecWheel(const DetId &id) const
unsigned int tobLayer(const DetId &id) const
unsigned int tecSide(const DetId &id) const
AlignmentPI::regions AlignmentPI::topolInfo::filterThePartition ( )

Definition at line 350 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, 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.

352  {
353 
355 
356  if(m_isDoubleSide){
358  }
359 
360  // BPix
361  if(m_subdetid==1){
362  switch(m_layer)
363  {
364  case 1:
366  break;
367  case 2:
369  break;
370  case 3:
372  break;
373  case 4:
375  break;
376  default:
377  edm::LogWarning("LogicError") << "Unknow BPix layer: " << m_layer;
378  break;
379  }
380  // FPix
381  } else if (m_subdetid==2) {
382  switch(m_layer)
383  {
384  case 1:
385  m_side > 1 ? ret = AlignmentPI::FPixpL1 : ret = AlignmentPI::FPixmL1;
386  break;
387  case 2:
388  m_side > 1 ? ret = AlignmentPI::FPixpL2 : ret = AlignmentPI::FPixmL2;
389  break;
390  case 3:
391  m_side > 1 ? ret = AlignmentPI::FPixpL3 : ret = AlignmentPI::FPixmL3;
392  break;
393  default:
394  edm::LogWarning("LogicError") << "Unknow FPix disk: " << m_layer;
395  break;
396  }
397  // TIB
398  } else if (m_subdetid==3) {
399  switch(m_layer)
400  {
401  case 1:
402  if(m_isRphi){
404  } else {
406  }
407  break;
408  case 2:
409  if(m_isRphi){
411  } else {
413  }
414  break;
415  case 3:
417  break;
418  case 4:
420  break;
421  default:
422  edm::LogWarning("LogicError") << "Unknow TIB layer: " << m_layer;
423  break;
424  }
425  // TID
426  } else if (m_subdetid==4) {
427  switch(m_ring)
428  {
429  case 1:
430  if(m_isRphi){
432  } else {
434  }
435  break;
436  case 2:
437  if(m_isRphi){
439  } else {
441  }
442  break;
443  case 3:
444  m_side > 1 ? ret = AlignmentPI::TIDpR3 : ret = AlignmentPI::TIDmR3;
445  break;
446  default:
447  edm::LogWarning("LogicError") << "Unknow TID wheel: " << m_layer;
448  break;
449  }
450  // TOB
451  } else if (m_subdetid==5) {
452  switch(m_layer)
453  {
454  case 1:
455  if(m_isRphi){
457  } else {
459  }
460  break;
461  case 2:
462  if(m_isRphi){
464  } else {
466  }
467  break;
468  case 3:
470  break;
471  case 4:
473  break;
474  case 5:
476  break;
477  case 6:
479  break;
480  default:
481  edm::LogWarning("LogicError") << "Unknow TOB layer: " << m_layer;
482  break;
483  }
484  // TEC
485  } else if (m_subdetid==6) {
486  switch(m_ring)
487  {
488  case 1:
489  if(m_isRphi){
491  } else {
493  }
494  break;
495  case 2:
496  if(m_isRphi){
498  } else {
500  }
501  break;
502  case 3:
503  m_side > 1 ? ret = AlignmentPI::TECpR3 : ret = AlignmentPI::TECmR3;
504  break;
505  case 4:
506  m_side > 1 ? ret = AlignmentPI::TECpR4 : ret = AlignmentPI::TECmR4;
507  break;
508  case 5:
509  m_side > 1 ? ret = AlignmentPI::TECpR5 : ret = AlignmentPI::TECmR5;
510  break;
511  case 6:
512  m_side > 1 ? ret = AlignmentPI::TECpR6 : ret = AlignmentPI::TECmR6;
513  break;
514  case 7:
515  m_side > 1 ? ret = AlignmentPI::TECpR7 : ret = AlignmentPI::TECmR7;
516  break;
517  default:
518  edm::LogWarning("LogicError") << "Unknow TEC ring: " << m_ring;
519  break;
520  }
521  }
522 
523  return ret;
524 
525  }
void AlignmentPI::topolInfo::init ( void  )
void AlignmentPI::topolInfo::printAll ( )

Definition at line 253 of file AlignmentPayloadInspectorHelper.h.

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

255  {
256 
257  std::cout<<" detId:" << m_rawid
258  <<" subdetid: " << m_subdetid
259  <<" layer: " << m_layer
260  <<" side: " << m_side
261  <<" ring: " << m_ring
262  <<" isRphi:" << m_isRphi
263  <<" isDoubleSide:"<< m_isDoubleSide
264  <<" isInternal:" << m_isInternal
265  << std::endl;
266  }
bool AlignmentPI::topolInfo::sanityCheck ( )

Definition at line 283 of file AlignmentPayloadInspectorHelper.h.

References m_layer, and m_subdetid.

285  {
286  if(m_layer==0 ||
287  (m_subdetid==1 && m_layer>4) ||
288  (m_subdetid==2 && m_layer>3)
289  ){
290  return false;
291  } else{
292  return true;
293  }
294  }

Member Data Documentation

bool AlignmentPI::topolInfo::m_isDoubleSide
private
bool AlignmentPI::topolInfo::m_isInternal
private
bool AlignmentPI::topolInfo::m_isRphi
private
int AlignmentPI::topolInfo::m_layer
private
uint32_t AlignmentPI::topolInfo::m_rawid
private

Definition at line 234 of file AlignmentPayloadInspectorHelper.h.

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

int AlignmentPI::topolInfo::m_ring
private
int AlignmentPI::topolInfo::m_side
private
int AlignmentPI::topolInfo::m_subdetid
private