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

Constructor & Destructor Documentation

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

Definition at line 246 of file AlignmentPayloadInspectorHelper.h.

246 {}

Member Function Documentation

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

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

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

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

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

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

Definition at line 280 of file AlignmentPayloadInspectorHelper.h.

References m_layer, and m_subdetid.

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

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