1 #ifndef CTPPS_PIXELINDICES_H 2 #define CTPPS_PIXELINDICES_H 126 inline static int convertDcolToCol(
const int dcol,
const int pix,
int& colROC,
int& rowROC) {
129 edm::LogError(
"RPix") <<
"CTPPSPixelIndices: wrong dcol or pix " << dcol <<
" " << pix;
137 int colEvenOdd = pix % 2;
139 colROC = dcol * 2 + colEvenOdd;
140 rowROC =
abs(
int(pix / 2) - 80);
144 edm::LogError(
"RPix") <<
"CTPPSPixelIndices: wrong col or row " << colROC <<
" " << rowROC <<
" " << dcol <<
" " 163 edm::LogError(
"RPix") <<
"CTPPSPixelIndices: wrong index " << colROC <<
" " << rowROC;
169 if (rocId >= 0 && rocId < 3) {
173 }
else if (rocId >= 3 && rocId < 6) {
178 edm::LogError(
"RPix") <<
"CTPPSPixelIndices: wrong ROC ID " << rocId;
184 edm::LogError(
"RPix") <<
"CTPPSPixelIndices: wrong index " <<
col <<
" " << row;
200 edm::LogError(
"RPix") <<
"CTPPSPixelIndices: wrong index 3 ";
212 edm::LogError(
"RPix") <<
"CTPPSPixelIndices: wrong roc index " << rocId;
220 colROC = 51 - colROC;
221 rowROC = 79 - rowROC;
226 edm::LogError(
"RPix") <<
"CTPPSPixelIndices: wrong index " << colROC <<
" " << rowROC;
254 edm::LogError(
"RPix") <<
"CTPPSPixelIndices: wrong roc index " << rocId;
273 inline static int rocIndex(
const int chipX,
const int chipY) {
276 if (chipX < 0 || chipX >= 2 || chipY < 0 || chipY >= 3) {
277 edm::LogError(
"RPix") <<
"PixelChipIndices: wrong index " << chipX <<
" " << chipY;
288 edm::LogError(
"RPix") <<
"CTPPSPixelIndices: Error in ROC index " << rocId;
298 int dColumnId = (colROC) / 2;
300 if (dColumnId < 0 || dColumnId >= 26) {
301 edm::LogError(
"RPix") <<
"CTPPSPixelIndices: wrong dcol index " << dColumnId <<
" " << colROC;
311 int dcolInMod = dcol + chipIndex * 26;
318 return (rowROC << 6) | colROC;
321 int rowROC = (
chan >> 6) & 0x7F;
322 int colROC =
chan & 0x3F;
323 return std::pair<int, int>(rowROC, colROC);
static int convertDcolToCol(const int dcol, const int pix, int &colROC, int &rowROC)
bool isOnEdge(const int col, const int row) const
int numberOfROCsInY(void)
CTPPSPixelIndices(const int colsInDet, const int rowsInDet)
Log< level::Error, false > LogError
static int pixelToChannelROC(const int rowROC, const int colROC)
static int rocIndex(const int chipX, const int chipY)
static std::pair< int, int > channelToPixelROC(const int chan)
Abs< T >::type abs(const T &t)
int getDefaultRowDetSize() const
int transformToROC(const int col, const int row, int &rocId, int &colROC, int &rowROC) const
Log< level::Info, false > LogInfo
constexpr int defaultDetSizeInX
static int DColumnInModule(const int dcol, const int chipIndex)
constexpr int defaultDetSizeInY
chan
lumi = TPaveText(lowX+0.38, lowY+0.061, lowX+0.45, lowY+0.161, "NDC") lumi.SetBorderSize( 0 ) lumi...
int getROCId(const int col, const int row) const
constexpr bool CTPPS_CHECK_LIMITS
int transformToModule(const int colROC, const int rowROC, const int rocId, int &col, int &row) const
constexpr int DColsPerROC
int getDefaultColDetSize() const
int numberOfROCsInX(void)
static int DColumn(const int colROC)