CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
sipixelobjects::PixelROC Class Reference

#include <PixelROC.h>

Public Member Functions

unsigned int idInDetUnit () const
 id of this ROC in DetUnit etermined by token path More...
 
unsigned int idInLink () const
 id of this ROC in parent Link. More...
 
const PixelROCoperator= (const PixelROC &)
 
 PixelROC ()
 dummy More...
 
 PixelROC (const PixelROC &o)
 
 PixelROC (uint32_t du, int idInDU, int idLk)
 
std::string print (int depth=0) const
 printout for debug More...
 
uint32_t rawId () const
 return the DetUnit to which this ROC belongs to. More...
 
void swap (PixelROC &)
 
GlobalPixel toGlobal (const LocalPixel &loc) const
 
LocalPixel toLocal (const GlobalPixel &gp) const
 
 ~PixelROC ()
 

Private Member Functions

void initFrameConversion () const
 

Private Attributes

uint32_t theDetUnit
 
const FrameConversiontheFrameConverter
 
unsigned int theIdDU
 
unsigned int theIdLk
 

Detailed Description

Definition at line 21 of file PixelROC.h.

Constructor & Destructor Documentation

sipixelobjects::PixelROC::PixelROC ( )
inline

dummy

Definition at line 25 of file PixelROC.h.

25 : theDetUnit(0), theIdDU(0), theIdLk(0), theFrameConverter(0) {}
unsigned int theIdLk
Definition: PixelROC.h:65
unsigned int theIdDU
Definition: PixelROC.h:65
const FrameConversion * theFrameConverter
Definition: PixelROC.h:66
PixelROC::~PixelROC ( )

Definition at line 22 of file PixelROC.cc.

References theFrameConverter.

23 {
24  delete theFrameConverter;
25 }
const FrameConversion * theFrameConverter
Definition: PixelROC.h:66
PixelROC::PixelROC ( const PixelROC o)

Definition at line 16 of file PixelROC.cc.

References sipixelobjects::FrameConversion::clone(), and theFrameConverter.

18 {
20 }
unsigned int theIdLk
Definition: PixelROC.h:65
unsigned int theIdDU
Definition: PixelROC.h:65
FrameConversion * clone() const
const FrameConversion * theFrameConverter
Definition: PixelROC.h:66
PixelROC::PixelROC ( uint32_t  du,
int  idInDU,
int  idLk 
)

ctor with DetUnit id, ROC number in DU (given by token passage), ROC number in Link (given by token passage),

Definition at line 12 of file PixelROC.cc.

13  : theDetUnit(du), theIdDU(idDU), theIdLk(idLk), theFrameConverter(0)
14 {}
unsigned int theIdLk
Definition: PixelROC.h:65
unsigned int theIdDU
Definition: PixelROC.h:65
const FrameConversion * theFrameConverter
Definition: PixelROC.h:66

Member Function Documentation

unsigned int sipixelobjects::PixelROC::idInDetUnit ( ) const
inline
unsigned int sipixelobjects::PixelROC::idInLink ( ) const
inline
void PixelROC::initFrameConversion ( ) const
private

Definition at line 64 of file PixelROC.cc.

References PixelModuleName::isBarrel(), theDetUnit, theFrameConverter, and theIdDU.

Referenced by print(), toGlobal(), and toLocal().

65 {
67  PixelBarrelName barrelName(theDetUnit);
68  theFrameConverter = new FrameConversion(barrelName, theIdDU);
69  } else {
70  PixelEndcapName endcapName(theDetUnit);
71  theFrameConverter = new FrameConversion(endcapName, theIdDU);
72  }
73 }
unsigned int theIdDU
Definition: PixelROC.h:65
virtual bool isBarrel() const
true for barrel modules
const FrameConversion * theFrameConverter
Definition: PixelROC.h:66
const PixelROC & PixelROC::operator= ( const PixelROC iRHS)

Definition at line 28 of file PixelROC.cc.

References swap(), and groupFilesInBlocks::temp.

29 {
30  PixelROC temp(iRHS);
31  this->swap(temp);
32  return *this;
33 }
void swap(PixelROC &)
Definition: PixelROC.cc:36
string PixelROC::print ( int  depth = 0) const

printout for debug

Definition at line 75 of file PixelROC.cc.

References Reference_intrackfit_cff::barrel, initFrameConversion(), PixelModuleName::isBarrel(), PixelBarrelName::name(), PixelEndcapName::name(), dbtoconf::out, theDetUnit, theFrameConverter, theIdDU, and theIdLk.

76 {
78 
79  ostringstream out;
81  DetId detId(theDetUnit);
82  if (depth-- >=0 ) {
83  out <<"======== PixelROC ";
84  out <<" unit: ";
85  if (barrel) out << PixelBarrelName(detId).name();
86  else out << PixelEndcapName(detId).name();
87  out <<" ("<<theDetUnit<<")"
88  <<" idInDU: "<<theIdDU
89  <<" idInLk: "<<theIdLk
90 // <<" frame: "<<theRowOffset<<","<<theRowSlopeSign<<","<<theColOffset<<","<<theColSlopeSign
91 // <<" frame: "<<*theFrameConverter
92  <<endl;
93  }
94  return out.str();
95 }
unsigned int theIdLk
Definition: PixelROC.h:65
unsigned int theIdDU
Definition: PixelROC.h:65
tuple out
Definition: dbtoconf.py:99
virtual bool isBarrel() const
true for barrel modules
Definition: DetId.h:18
virtual std::string name() const
from base class
const FrameConversion * theFrameConverter
Definition: PixelROC.h:66
virtual std::string name() const
from base class
void initFrameConversion() const
Definition: PixelROC.cc:64
uint32_t sipixelobjects::PixelROC::rawId ( ) const
inline

return the DetUnit to which this ROC belongs to.

Definition at line 40 of file PixelROC.h.

References theDetUnit.

Referenced by SiPixelFedCablingTree::pathToDetUnit(), SiPixelFrameConverter::toCabling(), SiPixelFrameReverter::toCabling(), and SiPixelFrameConverter::toDetector().

40 { return theDetUnit; }
void PixelROC::swap ( PixelROC iOther)

Definition at line 36 of file PixelROC.cc.

References std::swap(), theDetUnit, theFrameConverter, theIdDU, and theIdLk.

Referenced by operator=().

37 {
39  std::swap(theIdDU,iOther.theIdDU);
40  std::swap(theIdLk,iOther.theIdLk);
42 }
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
unsigned int theIdLk
Definition: PixelROC.h:65
unsigned int theIdDU
Definition: PixelROC.h:65
const FrameConversion * theFrameConverter
Definition: PixelROC.h:66
GlobalPixel PixelROC::toGlobal ( const LocalPixel loc) const

converts LocalPixel in ROC to DU coordinates. LocalPixel must be inside ROC. Otherwise result is meaningless

Definition at line 44 of file PixelROC.cc.

References sipixelobjects::GlobalPixel::col, sipixelobjects::FrameConversion::collumn(), sipixelobjects::LinearConversion::convert(), initFrameConversion(), query::result, sipixelobjects::LocalPixel::rocCol(), sipixelobjects::LocalPixel::rocRow(), sipixelobjects::GlobalPixel::row, sipixelobjects::FrameConversion::row(), and theFrameConverter.

Referenced by SiPixelQuality::getBadRocPositions(), SiPixelDigitizerAlgorithm::module_killing_DB(), and SiPixelFrameConverter::toDetector().

45 {
48  result.col = theFrameConverter->collumn().convert(loc.rocCol());
49  result.row = theFrameConverter->row().convert(loc.rocRow());
50  return result;
51 }
const sipixelobjects::LinearConversion & row() const
global coordinates (row and column in DetUnit, as in PixelDigi)
Definition: GlobalPixel.h:6
const sipixelobjects::LinearConversion & collumn() const
tuple result
Definition: query.py:137
const FrameConversion * theFrameConverter
Definition: PixelROC.h:66
void initFrameConversion() const
Definition: PixelROC.cc:64
LocalPixel PixelROC::toLocal ( const GlobalPixel gp) const

converts DU position to local. If GlobalPixel is outside ROC the resulting LocalPixel is not inside ROC. (call to inside(..) recommended)

Definition at line 54 of file PixelROC.cc.

References sipixelobjects::GlobalPixel::col, sipixelobjects::FrameConversion::collumn(), initFrameConversion(), sipixelobjects::LinearConversion::inverse(), sipixelobjects::GlobalPixel::row, sipixelobjects::FrameConversion::row(), and theFrameConverter.

Referenced by SiPixelFrameReverter::findLinkInFed(), SiPixelFrameReverter::findPixelInRoc(), SiPixelFrameReverter::findRocInDet(), SiPixelFrameReverter::findRocInLink(), SiPixelFrameConverter::toCabling(), and SiPixelFrameReverter::toCabling().

55 {
57  int rocRow = theFrameConverter->row().inverse(glo.row);
58  int rocCol = theFrameConverter->collumn().inverse(glo.col);
59 
60  LocalPixel::RocRowCol rocRowCol = {rocRow, rocCol};
61  return LocalPixel(rocRowCol);
62 }
const sipixelobjects::LinearConversion & row() const
identify pixel inside single ROC
Definition: LocalPixel.h:7
const sipixelobjects::LinearConversion & collumn() const
const FrameConversion * theFrameConverter
Definition: PixelROC.h:66
row and collumn in ROC representation
Definition: LocalPixel.h:15
void initFrameConversion() const
Definition: PixelROC.cc:64

Member Data Documentation

uint32_t sipixelobjects::PixelROC::theDetUnit
private

Definition at line 64 of file PixelROC.h.

Referenced by initFrameConversion(), print(), rawId(), and swap().

const FrameConversion* sipixelobjects::PixelROC::theFrameConverter
mutableprivate

Definition at line 66 of file PixelROC.h.

Referenced by initFrameConversion(), PixelROC(), print(), swap(), toGlobal(), toLocal(), and ~PixelROC().

unsigned int sipixelobjects::PixelROC::theIdDU
private

Definition at line 65 of file PixelROC.h.

Referenced by idInDetUnit(), initFrameConversion(), print(), and swap().

unsigned int sipixelobjects::PixelROC::theIdLk
private

Definition at line 65 of file PixelROC.h.

Referenced by idInLink(), print(), and swap().