test
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 | Friends
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 Member Functions

template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Private Attributes

uint32_t theDetUnit
 
FrameConversion theFrameConverter
 
unsigned int theIdDU
 
unsigned int theIdLk
 

Friends

class boost::serialization::access
 
template<typename CondSerializationT , typename Enabled >
struct cond::serialization::access
 

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, theFrameConverter, and theIdDU.

Referenced by PixelROC().

17 {
19  PixelBarrelName barrelName(theDetUnit);
21  } else {
22  PixelEndcapName endcapName(theDetUnit);
24  }
25 }
FrameConversion theFrameConverter
Definition: PixelROC.h:73
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(), PixelEndcapName::name(), PixelBarrelName::name(), GenerateHcalLaserBadRunList::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
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; }
template<class Archive >
void sipixelobjects::PixelROC::serialize ( Archive &  ar,
const unsigned int  version 
)
private
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, sipixelobjects::FrameConversion::collumn(), sipixelobjects::LinearConversion::convert(), mps_fire::result, sipixelobjects::LocalPixel::rocCol(), sipixelobjects::LocalPixel::rocRow(), sipixelobjects::GlobalPixel::row, sipixelobjects::FrameConversion::row(), and theFrameConverter.

Referenced by 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  }
const sipixelobjects::LinearConversion & row() const
tuple result
Definition: mps_fire.py:83
const sipixelobjects::LinearConversion & collumn() const
FrameConversion theFrameConverter
Definition: PixelROC.h:73
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, sipixelobjects::FrameConversion::collumn(), sipixelobjects::LinearConversion::inverse(), sipixelobjects::GlobalPixel::row, sipixelobjects::FrameConversion::row(), and theFrameConverter.

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  }
const sipixelobjects::LinearConversion & row() const
const sipixelobjects::LinearConversion & collumn() const
FrameConversion theFrameConverter
Definition: PixelROC.h:73

Friends And Related Function Documentation

friend class boost::serialization::access
friend

Definition at line 76 of file PixelROC.h.

template<typename CondSerializationT , typename Enabled >
friend struct cond::serialization::access
friend

Definition at line 76 of file PixelROC.h.

Member Data Documentation

uint32_t sipixelobjects::PixelROC::theDetUnit
private

Definition at line 71 of file PixelROC.h.

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

FrameConversion sipixelobjects::PixelROC::theFrameConverter
private

Definition at line 73 of file PixelROC.h.

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

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().