#include <PixelROC.h>
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. | |
const PixelROC & | operator= (const PixelROC &) |
PixelROC () | |
dummy | |
PixelROC (const PixelROC &o) | |
PixelROC (uint32_t du, int idInDU, int idLk) | |
std::string | print (int depth=0) const |
printout for debug | |
uint32_t | rawId () const |
return the DetUnit to which this ROC belongs to. | |
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 FrameConversion * | theFrameConverter |
unsigned int | theIdDU |
unsigned int | theIdLk |
Definition at line 21 of file PixelROC.h.
sipixelobjects::PixelROC::PixelROC | ( | ) | [inline] |
dummy
Definition at line 25 of file PixelROC.h.
: theDetUnit(0), theIdDU(0), theIdLk(0), theFrameConverter(0) {}
PixelROC::~PixelROC | ( | ) |
Definition at line 22 of file PixelROC.cc.
References theFrameConverter.
{ delete theFrameConverter; }
PixelROC::PixelROC | ( | const PixelROC & | o | ) |
Definition at line 16 of file PixelROC.cc.
References sipixelobjects::FrameConversion::clone(), and theFrameConverter.
: theDetUnit(o.theDetUnit), theIdDU(o.theIdDU), theIdLk(o.theIdLk),theFrameConverter(0) { if(o.theFrameConverter) theFrameConverter = o.theFrameConverter->clone(); }
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.
: theDetUnit(du), theIdDU(idDU), theIdLk(idLk), theFrameConverter(0) {}
unsigned int sipixelobjects::PixelROC::idInDetUnit | ( | ) | const [inline] |
id of this ROC in DetUnit etermined by token path
Definition at line 43 of file PixelROC.h.
References theIdDU.
Referenced by SiPixelInformationExtractor::findNoisyPixels(), SiPixelFrameReverter::findRocInDet(), SiPixelQuality::getBadRocPositions(), SiPixelSCurveCalibrationAnalysis::makeThresholdSummary(), SiPixelDigitizerAlgorithm::module_killing_DB(), and PixelDataFormatter::word2digi().
{ return theIdDU; }
unsigned int sipixelobjects::PixelROC::idInLink | ( | ) | const [inline] |
id of this ROC in parent Link.
Definition at line 46 of file PixelROC.h.
References theIdLk.
Referenced by sipixelobjects::PixelFEDLink::addItem(), SiPixelFrameReverter::findRocInLink(), SiPixelFedCablingTree::pathToDetUnit(), and SiPixelFedCablingMap::SiPixelFedCablingMap().
{ return theIdLk; }
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().
{ if ( PixelModuleName::isBarrel(theDetUnit) ) { PixelBarrelName barrelName(theDetUnit); theFrameConverter = new FrameConversion(barrelName, theIdDU); } else { PixelEndcapName endcapName(theDetUnit); theFrameConverter = new FrameConversion(endcapName, theIdDU); } }
Definition at line 28 of file PixelROC.cc.
References swap(), and groupFilesInBlocks::temp.
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(), PixelEndcapName::name(), PixelBarrelName::name(), dbtoconf::out, theDetUnit, theFrameConverter, theIdDU, and theIdLk.
{ if (!theFrameConverter) initFrameConversion(); ostringstream out; bool barrel = PixelModuleName::isBarrel(theDetUnit); DetId detId(theDetUnit); if (depth-- >=0 ) { out <<"======== PixelROC "; out <<" unit: "; if (barrel) out << PixelBarrelName(detId).name(); else out << PixelEndcapName(detId).name(); out <<" ("<<theDetUnit<<")" <<" idInDU: "<<theIdDU <<" idInLk: "<<theIdLk // <<" frame: "<<theRowOffset<<","<<theRowSlopeSign<<","<<theColOffset<<","<<theColSlopeSign // <<" frame: "<<*theFrameConverter <<endl; } return out.str(); }
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(), SiPixelFrameReverter::toCabling(), SiPixelFrameConverter::toCabling(), and SiPixelFrameConverter::toDetector().
{ return theDetUnit; }
void PixelROC::swap | ( | PixelROC & | iOther | ) |
Definition at line 36 of file PixelROC.cc.
References theDetUnit, theFrameConverter, theIdDU, and theIdLk.
Referenced by operator=().
{ std::swap(theDetUnit,iOther.theDetUnit); std::swap(theIdDU,iOther.theIdDU); std::swap(theIdLk,iOther.theIdLk); std::swap(theFrameConverter,iOther.theFrameConverter); }
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::FrameConversion::row(), sipixelobjects::GlobalPixel::row, and theFrameConverter.
Referenced by SiPixelQuality::getBadRocPositions(), SiPixelDigitizerAlgorithm::module_killing_DB(), and SiPixelFrameConverter::toDetector().
{ GlobalPixel result; if (!theFrameConverter) initFrameConversion(); result.col = theFrameConverter->collumn().convert(loc.rocCol()); result.row = theFrameConverter->row().convert(loc.rocRow()); return result; }
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::FrameConversion::row(), sipixelobjects::GlobalPixel::row, and theFrameConverter.
Referenced by SiPixelFrameReverter::findLinkInFed(), SiPixelFrameReverter::findPixelInRoc(), SiPixelFrameReverter::findRocInDet(), SiPixelFrameReverter::findRocInLink(), SiPixelFrameReverter::toCabling(), and SiPixelFrameConverter::toCabling().
{ if (!theFrameConverter) initFrameConversion(); int rocRow = theFrameConverter->row().inverse(glo.row); int rocCol = theFrameConverter->collumn().inverse(glo.col); LocalPixel::RocRowCol rocRowCol = {rocRow, rocCol}; return LocalPixel(rocRowCol); }
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 [mutable, private] |
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().