CMS 3D CMS Logo

sipixelobjects::PixelROC Class Reference

#include <CondFormats/SiPixelObjects/interface/PixelROC.h>

List of all members.

Public Member Functions

unsigned int idInDetUnit () const
 id of this ROC in DetUnit etermined by token path
unsigned int idInLink () const
 id of this ROC in parent Link.
 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),
 PixelROC (const PixelROC &o)
 PixelROC ()
 dummy
std::string print (int depth=0) const
 printout for debug
uint32_t rawId () const
 return the DetUnit to which this ROC belongs to.
GlobalPixel toGlobal (const LocalPixel &loc) const
 converts LocalPixel in ROC to DU coordinates.
LocalPixel toLocal (const GlobalPixel &gp) const
 converts DU position to local.
 ~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.

00025 : theDetUnit(0), theIdDU(0), theIdLk(0), theFrameConverter(0) {} 

PixelROC::~PixelROC (  ) 

Definition at line 21 of file PixelROC.cc.

References theFrameConverter.

00022 {
00023   delete theFrameConverter;
00024 }

PixelROC::PixelROC ( const PixelROC o  ) 

Definition at line 15 of file PixelROC.cc.

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

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 11 of file PixelROC.cc.

00012   : theDetUnit(du), theIdDU(idDU), theIdLk(idLk), theFrameConverter(0)
00013 { }


Member Function Documentation

unsigned int sipixelobjects::PixelROC::idInDetUnit (  )  const [inline]

id of this ROC in DetUnit etermined by token path

Definition at line 40 of file PixelROC.h.

References theIdDU.

Referenced by SiPixelInformationExtractor::findNoisyPixels(), and SiPixelSCurveCalibrationAnalysis::makeThresholdSummary().

00040 { return theIdDU; }

unsigned int sipixelobjects::PixelROC::idInLink (  )  const [inline]

id of this ROC in parent Link.

Definition at line 43 of file PixelROC.h.

References theIdLk.

Referenced by sipixelobjects::PixelFEDLink::addItem().

00043 { return theIdLk; }

void PixelROC::initFrameConversion (  )  const [private]

Definition at line 46 of file PixelROC.cc.

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

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

00047 {
00048   if ( PixelModuleName::isBarrel(theDetUnit) ) {
00049     PixelBarrelName barrelName(theDetUnit); 
00050     theFrameConverter = new FrameConversion(barrelName, theIdDU);
00051   } else {
00052     PixelEndcapName endcapName(theDetUnit);
00053     theFrameConverter = new FrameConversion(endcapName, theIdDU); 
00054   }
00055 }

string PixelROC::print ( int  depth = 0  )  const

printout for debug

Definition at line 57 of file PixelROC.cc.

References GeomDetEnumerators::barrel, detId, lat::endl(), initFrameConversion(), PixelModuleName::isBarrel(), out, theDetUnit, theFrameConverter, theIdDU, and theIdLk.

00058 {
00059   if (!theFrameConverter) initFrameConversion();
00060 
00061   ostringstream out;
00062   bool barrel = PixelModuleName::isBarrel(theDetUnit);
00063   DetId detId(theDetUnit);
00064   if (depth-- >=0 ) {
00065     out <<"======== PixelROC ";
00066     out <<" unit: ";
00067     if (barrel) out << PixelBarrelName(detId).name();
00068     else        out << PixelEndcapName(detId).name(); 
00069     out <<" ("<<theDetUnit<<")"
00070         <<" idInDU: "<<theIdDU
00071         <<" idInLk: "<<theIdLk
00072 //        <<" frame: "<<theRowOffset<<","<<theRowSlopeSign<<","<<theColOffset<<","<<theColSlopeSign
00073 //        <<" frame: "<<*theFrameConverter
00074         <<endl;
00075   }
00076   return out.str();
00077 }

uint32_t sipixelobjects::PixelROC::rawId (  )  const [inline]

return the DetUnit to which this ROC belongs to.

Definition at line 37 of file PixelROC.h.

References theDetUnit.

Referenced by SiPixelFrameConverter::hasDetUnit(), SiPixelFrameConverter::toCabling(), and SiPixelFrameConverter::toDetector().

00037 { return theDetUnit; }

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 26 of file PixelROC.cc.

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

Referenced by SiPixelFrameConverter::toDetector().

00027 {
00028   GlobalPixel result;
00029   if (!theFrameConverter) initFrameConversion();
00030   result.col    = theFrameConverter->collumn().convert(loc.rocCol());
00031   result.row    = theFrameConverter->row().convert(loc.rocRow());
00032   return result;
00033 }

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 36 of file PixelROC.cc.

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

Referenced by SiPixelFrameConverter::toCabling().

00037 {
00038   if (!theFrameConverter) initFrameConversion();
00039   int rocRow = theFrameConverter->row().inverse(glo.row);
00040   int rocCol = theFrameConverter->collumn().inverse(glo.col);
00041 
00042   LocalPixel::RocRowCol rocRowCol = {rocRow, rocCol};
00043   return LocalPixel(rocRowCol);
00044 }


Member Data Documentation

uint32_t sipixelobjects::PixelROC::theDetUnit [private]

Definition at line 61 of file PixelROC.h.

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

const FrameConversion* sipixelobjects::PixelROC::theFrameConverter [mutable, private]

Definition at line 63 of file PixelROC.h.

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

unsigned int sipixelobjects::PixelROC::theIdDU [private]

Definition at line 62 of file PixelROC.h.

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

unsigned int sipixelobjects::PixelROC::theIdLk [private]

Definition at line 62 of file PixelROC.h.

Referenced by idInLink(), and print().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:52:34 2009 for CMSSW by  doxygen 1.5.4