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 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...
 
void initFrameConversion ()
 
 PixelROC ()
 dummy More...
 
 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...
 
GlobalPixel toGlobal (const LocalPixel &loc) const
 
LocalPixel toLocal (const GlobalPixel &glo) const
 

Private Attributes

 COND_SERIALIZABLE
 
FrameConversion theFrameConverter COND_TRANSIENT
 
uint32_t theDetUnit
 
unsigned int theIdDU
 
unsigned int theIdLk
 

Detailed Description

Definition at line 23 of file PixelROC.h.

Constructor & Destructor Documentation

sipixelobjects::PixelROC::PixelROC ( )
inline

dummy

Definition at line 27 of file PixelROC.h.

27 : theDetUnit(0), theIdDU(0), theIdLk(0) {}
unsigned int theIdLk
Definition: PixelROC.h:72
unsigned int theIdDU
Definition: PixelROC.h:72
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.

References initFrameConversion().

13  : theDetUnit(du), theIdDU(idDU), theIdLk(idLk)
unsigned int theIdLk
Definition: PixelROC.h:72
unsigned int theIdDU
Definition: PixelROC.h:72

Member Function Documentation

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

Definition at line 16 of file PixelROC.cc.

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

Referenced by PixelROC().

17 {
19  PixelBarrelName barrelName(theDetUnit);
20  theFrameConverter = FrameConversion(barrelName, theIdDU);
21  } else {
22  PixelEndcapName endcapName(theDetUnit);
23  theFrameConverter = FrameConversion(endcapName, theIdDU);
24  }
25 }
unsigned int theIdDU
Definition: PixelROC.h:72
virtual bool isBarrel() const
true for barrel modules
string PixelROC::print ( int  depth = 0) const

printout for debug

Definition at line 27 of file PixelROC.cc.

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

28 {
29 
30  ostringstream out;
32  DetId detId(theDetUnit);
33  if (depth-- >=0 ) {
34  out <<"======== PixelROC ";
35  out <<" unit: ";
36  if (barrel) out << PixelBarrelName(detId).name();
37  else out << PixelEndcapName(detId).name();
38  out <<" ("<<theDetUnit<<")"
39  <<" idInDU: "<<theIdDU
40  <<" idInLk: "<<theIdLk
41 // <<" frame: "<<theRowOffset<<","<<theRowSlopeSign<<","<<theColOffset<<","<<theColSlopeSign
42 // <<" frame: "<<*theFrameConverter
43  <<endl;
44  }
45  return out.str();
46 }
unsigned int theIdLk
Definition: PixelROC.h:72
unsigned int theIdDU
Definition: PixelROC.h:72
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
virtual std::string name() const
from base class
uint32_t sipixelobjects::PixelROC::rawId ( ) const
inline

return the DetUnit to which this ROC belongs to.

Definition at line 36 of file PixelROC.h.

References theDetUnit.

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

36 { return theDetUnit; }
GlobalPixel sipixelobjects::PixelROC::toGlobal ( const LocalPixel loc) const
inline

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

Definition at line 58 of file PixelROC.h.

References sipixelobjects::GlobalPixel::col, query::result, sipixelobjects::LocalPixel::rocCol(), sipixelobjects::LocalPixel::rocRow(), and sipixelobjects::GlobalPixel::row.

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

58  {
59  GlobalPixel result;
60  result.col = theFrameConverter.collumn().convert(loc.rocCol());
61  result.row = theFrameConverter.row().convert(loc.rocRow());
62  return result;
63  }
tuple result
Definition: query.py:137
LocalPixel sipixelobjects::PixelROC::toLocal ( const GlobalPixel glo) const
inline

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

Definition at line 47 of file PixelROC.h.

References sipixelobjects::GlobalPixel::col, and sipixelobjects::GlobalPixel::row.

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

47  {
48  int rocRow = theFrameConverter.row().inverse(glo.row);
49  int rocCol = theFrameConverter.collumn().inverse(glo.col);
50 
51  LocalPixel::RocRowCol rocRowCol = {rocRow, rocCol};
52  return LocalPixel(rocRowCol);
53 
54  }

Member Data Documentation

sipixelobjects::PixelROC::COND_SERIALIZABLE
private

Definition at line 76 of file PixelROC.h.

FrameConversion theFrameConverter sipixelobjects::PixelROC::COND_TRANSIENT
private

Definition at line 73 of file PixelROC.h.

uint32_t sipixelobjects::PixelROC::theDetUnit
private

Definition at line 71 of file PixelROC.h.

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

unsigned int sipixelobjects::PixelROC::theIdDU
private

Definition at line 72 of file PixelROC.h.

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

unsigned int sipixelobjects::PixelROC::theIdLk
private

Definition at line 72 of file PixelROC.h.

Referenced by idInLink(), and print().