Skip to content

Commit 32669d7

Browse files
committed
ITS3: Segmenatation remove member prefix from vars
Signed-off-by: Felix Schlepper <[email protected]>
1 parent db1210f commit 32669d7

File tree

11 files changed

+44
-47
lines changed

11 files changed

+44
-47
lines changed

Detectors/Upgrades/ITS3/base/include/ITS3Base/SegmentationMosaix.h

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,14 @@ class SegmentationMosaix
5959
SegmentationMosaix& operator=(SegmentationMosaix&&) = delete;
6060
constexpr SegmentationMosaix(int layer) : mLayer{layer} {}
6161

62-
static constexpr int mNCols{constants::pixelarray::nCols};
63-
static constexpr int mNRows{constants::pixelarray::nRows};
64-
static constexpr int nPixels{mNCols * mNRows};
65-
static constexpr float mLength{constants::pixelarray::length};
66-
static constexpr float mWidth{constants::pixelarray::width};
67-
static constexpr float mPitchCol{constants::pixelarray::length / static_cast<float>(mNCols)};
68-
static constexpr float mPitchRow{constants::pixelarray::width / static_cast<float>(mNRows)};
69-
static constexpr float mSensorLayerThickness{constants::thickness};
62+
static constexpr int NCols{constants::pixelarray::nCols};
63+
static constexpr int NRows{constants::pixelarray::nRows};
64+
static constexpr int NPixels{NCols * NRows};
65+
static constexpr float Length{constants::pixelarray::length};
66+
static constexpr float Width{constants::pixelarray::width};
67+
static constexpr float PitchCol{constants::pixelarray::length / static_cast<float>(NCols)};
68+
static constexpr float PitchRow{constants::pixelarray::width / static_cast<float>(NRows)};
69+
static constexpr float SensorLayerThickness{constants::thickness};
7070

7171
/// Transformation from the curved surface to a flat surface
7272
/// \param xCurved Detector local curved coordinate x in cm with respect to
@@ -82,7 +82,7 @@ class SegmentationMosaix
8282
// MUST align the flat surface with the curved surface with the original pixel array is on
8383
float dist = std::hypot(xCurved, yCurved);
8484
float phi = std::atan2(yCurved, xCurved);
85-
xFlat = (getRadius() * phi) - mWidth / 2.f;
85+
xFlat = (getRadius() * phi) - Width / 2.f;
8686
yFlat = dist - getRadius();
8787
}
8888

@@ -100,8 +100,8 @@ class SegmentationMosaix
100100
{
101101
// MUST align the flat surface with the curved surface with the original pixel array is on
102102
float dist = yFlat + getRadius();
103-
xCurved = dist * std::cos((xFlat + mWidth / 2.f) / getRadius());
104-
yCurved = dist * std::sin((xFlat + mWidth / 2.f) / getRadius());
103+
xCurved = dist * std::cos((xFlat + Width / 2.f) / getRadius());
104+
yCurved = dist * std::sin((xFlat + Width / 2.f) / getRadius());
105105
}
106106

107107
/// Transformation from Geant detector centered local coordinates (cm) to
@@ -128,8 +128,8 @@ class SegmentationMosaix
128128
// Same as localToDetector w.o. checks.
129129
void localToDetectorUnchecked(float const xRow, float const zCol, int& iRow, int& iCol) const noexcept
130130
{
131-
iRow = std::floor((mWidth / 2. - xRow) / mPitchRow);
132-
iCol = std::floor((zCol + mLength / 2.) / mPitchCol);
131+
iRow = std::floor((Width / 2. - xRow) / PitchRow);
132+
iCol = std::floor((zCol + Length / 2.) / PitchCol);
133133
}
134134

135135
/// Transformation from Detector cell coordinates to Geant detector centered
@@ -155,8 +155,8 @@ class SegmentationMosaix
155155
// We position ourself in the middle of the pixel.
156156
void detectorToLocalUnchecked(int const iRow, int const iCol, float& xRow, float& zCol) const noexcept
157157
{
158-
xRow = -(static_cast<float>(iRow) + 0.5f) * mPitchRow + mWidth / 2.f;
159-
zCol = (static_cast<float>(iCol) + 0.5f) * mPitchCol - mLength / 2.f;
158+
xRow = -(static_cast<float>(iRow) + 0.5f) * PitchRow + Width / 2.f;
159+
zCol = (static_cast<float>(iCol) + 0.5f) * PitchCol - Length / 2.f;
160160
}
161161

162162
bool detectorToLocal(int const row, int const col, math_utils::Point3D<float>& loc) const noexcept
@@ -184,7 +184,7 @@ class SegmentationMosaix
184184
namespace cp = constants::pixelarray;
185185
return !static_cast<bool>(row <= -cp::width / 2. || cp::width / 2. <= row || col <= -cp::length / 2. || cp::length / 2. <= col);
186186
} else { // compares in rows/cols
187-
return !static_cast<bool>(row < 0 || row >= static_cast<int>(mNRows) || col < 0 || col >= static_cast<int>(mNCols));
187+
return !static_cast<bool>(row < 0 || row >= static_cast<int>(NRows) || col < 0 || col >= static_cast<int>(NCols));
188188
}
189189
}
190190

Detectors/Upgrades/ITS3/macros/test/CheckClustersITS3.C

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,8 @@ void CheckClustersITS3(const std::string& clusfile = "o2clus_its.root",
185185
locC = dict.getClusterCoordinates(cluster);
186186
errX = dict.getErrX(pattID);
187187
errZ = dict.getErrZ(pattID);
188-
errX *= (isIB) ? MosaixSegmentation::mPitchRow : Segmentation::PitchRow;
189-
errZ *= (isIB) ? MosaixSegmentation::mPitchCol : Segmentation::PitchCol;
188+
errX *= (isIB) ? MosaixSegmentation::PitchRow : Segmentation::PitchRow;
189+
errZ *= (isIB) ? MosaixSegmentation::PitchCol : Segmentation::PitchCol;
190190
npix = dict.getNpixels(pattID);
191191
++cPattValid;
192192
}

Detectors/Upgrades/ITS3/macros/test/CheckDigitsDensity.C

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ void CheckDigitsDensity(int nEvents = 10000, std::string digitFileName = "it3dig
115115
std::unique_ptr<TFile> oFile(TFile::Open("checkDigitsDensity.root", "RECREATE"));
116116
checkFile(oFile);
117117
for (const auto& h : hists) {
118-
h->Scale(1. / (Mosaix::mPitchCol * Mosaix::mPitchRow * nEvents));
118+
h->Scale(1. / (Mosaix::PitchCol * Mosaix::PitchRow * nEvents));
119119
h->ProjectionX()->Write();
120120
h->Write();
121121
}

Detectors/Upgrades/ITS3/macros/test/CheckMosaixSegment.C

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ void CheckMosaixSegment(bool isTestDetectorToLocal = false,
5050
bool isTestLocalToGlobal = false)
5151
{
5252
using namespace o2::its3;
53-
static constexpr unsigned int mNCols{SegmentationMosaix::mNCols};
54-
static constexpr unsigned int mNRows{SegmentationMosaix::mNRows};
53+
static constexpr unsigned int mNCols{SegmentationMosaix::NCols};
54+
static constexpr unsigned int mNRows{SegmentationMosaix::NRows};
5555
static constexpr unsigned int nPixels{mNCols * mNRows};
5656
std::array<SegmentationMosaix, 3> mMosaixSegmentations{0, 1, 2};
5757

Detectors/Upgrades/ITS3/macros/test/CheckMosaixSegmentTrans.C

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ constexpr float PI = 3.14159274101257324e+00f;
3737
constexpr float Rad2Deg = 180.f / PI;
3838
constexpr float Deg2Rad = 1. / Rad2Deg;
3939

40-
constexpr auto nRows{SegmentationMosaix::mNRows};
41-
constexpr auto nCols{SegmentationMosaix::mNCols};
42-
constexpr auto fLength{SegmentationMosaix::mLength};
43-
constexpr auto fWidth{SegmentationMosaix::mWidth};
40+
constexpr auto nRows{SegmentationMosaix::NRows};
41+
constexpr auto nCols{SegmentationMosaix::NCols};
42+
constexpr auto fLength{SegmentationMosaix::Length};
43+
constexpr auto fWidth{SegmentationMosaix::Width};
4444
const std::array<SegmentationMosaix, 3> mMosaixSegmentations{0, 1, 2};
4545

4646
TH2* DrawReverseBins(TH2* h)

Detectors/Upgrades/ITS3/macros/test/CompareClustersAndDigits.C

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ void CompareClustersAndDigits(std::string clusfile = "o2clus_it3.root",
189189
std::vector<Data> data(nChips);
190190
for (int iChip{0}; iChip < nChips; ++iChip) {
191191
auto& dat = data[iChip];
192-
int col{o2::its3::SegmentationMosaix::mNCols}, row{o2::its3::SegmentationMosaix::mNRows};
192+
int col{o2::its3::SegmentationMosaix::NCols}, row{o2::its3::SegmentationMosaix::NRows};
193193
if (!o2::its3::constants::detID::isDetITS3(iChip)) {
194194
col = o2::itsmft::SegmentationAlpide::NCols;
195195
row = o2::itsmft::SegmentationAlpide::NRows;

Detectors/Upgrades/ITS3/macros/test/CreateDictionariesITS3.C

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,8 +281,8 @@ void CreateDictionariesITS3(bool saveDeltas = false,
281281
}
282282
dX = xyzLocM.X() - locC.X();
283283
dZ = xyzLocM.Z() - locC.Z();
284-
dX /= (isIB) ? o2::its3::SegmentationMosaix::mPitchRow : o2::itsmft::SegmentationAlpide::PitchRow;
285-
dZ /= (isIB) ? o2::its3::SegmentationMosaix::mPitchCol : o2::itsmft::SegmentationAlpide::PitchCol;
284+
dX /= (isIB) ? o2::its3::SegmentationMosaix::PitchRow : o2::itsmft::SegmentationAlpide::PitchRow;
285+
dZ /= (isIB) ? o2::its3::SegmentationMosaix::PitchCol : o2::itsmft::SegmentationAlpide::PitchCol;
286286
if (saveDeltas) {
287287
nt->Fill(topology.getHash(), dX, dZ);
288288
}

Detectors/Upgrades/ITS3/reconstruction/include/ITS3Reconstruction/IOUtils.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121

2222
namespace o2::its3::ioutils
2323
{
24-
constexpr float DefClusErrorRow = o2::its3::SegmentationMosaix::mPitchRow * 0.5;
25-
constexpr float DefClusErrorCol = o2::its3::SegmentationMosaix::mPitchCol * 0.5;
24+
constexpr float DefClusErrorRow = o2::its3::SegmentationMosaix::PitchRow * 0.5;
25+
constexpr float DefClusErrorCol = o2::its3::SegmentationMosaix::PitchCol * 0.5;
2626
constexpr float DefClusError2Row = DefClusErrorRow * DefClusErrorRow;
2727
constexpr float DefClusError2Col = DefClusErrorCol * DefClusErrorCol;
2828

Detectors/Upgrades/ITS3/reconstruction/src/Clusterer.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ void Clusterer::ClustererThread::initChip(const ChipPixelData* curChipData, uint
334334
size = itsmft::SegmentationAlpide::NRows + 2;
335335
int chipId = curChipData->getChipID();
336336
if (its3::constants::detID::isDetITS3(chipId)) {
337-
size = its3::SegmentationMosaix::mNRows + 2;
337+
size = its3::SegmentationMosaix::NRows + 2;
338338
}
339339

340340
delete[] column1;

Detectors/Upgrades/ITS3/reconstruction/src/TopologyDictionary.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,8 @@ math_utils::Point3D<T> TopologyDictionary::getClusterCoordinates(const itsmft::C
145145
} else {
146146
auto layer = its3::constants::detID::getDetID2Layer(cl.getSensorID());
147147
mIBSegmentations[layer].detectorToLocalUnchecked(cl.getRow(), cl.getCol(), locCl);
148-
locCl.SetX(locCl.X() + this->getXCOG(cl.getPatternID()) * its3::SegmentationMosaix::mPitchRow);
149-
locCl.SetZ(locCl.Z() + this->getZCOG(cl.getPatternID()) * its3::SegmentationMosaix::mPitchCol);
148+
locCl.SetX(locCl.X() + this->getXCOG(cl.getPatternID()) * its3::SegmentationMosaix::PitchRow);
149+
locCl.SetZ(locCl.Z() + this->getZCOG(cl.getPatternID()) * its3::SegmentationMosaix::PitchCol);
150150
float xCurved{0.f}, yCurved{0.f};
151151
mIBSegmentations[layer].flatToCurved(locCl.X(), locCl.Y(), xCurved, yCurved);
152152
locCl.SetXYZ(xCurved, yCurved, locCl.Z());

0 commit comments

Comments
 (0)