#include <CondFormats/SiPixelObjects/interface/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. | |
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 FrameConversion * | theFrameConverter |
unsigned int | theIdDU |
unsigned int | theIdLk |
Definition at line 21 of file PixelROC.h.
sipixelobjects::PixelROC::PixelROC | ( | ) | [inline] |
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.
00016 : theDetUnit(o.theDetUnit), theIdDU(o.theIdDU), theIdLk(o.theIdLk),theFrameConverter(0) 00017 { 00018 if(o.theFrameConverter) theFrameConverter = o.theFrameConverter->clone(); 00019 }
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 { }
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 }
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] |