43 std::vector<std::string> mappingTables{{
"/TABLE-IROC.txt",
"/TABLE-OROC1.txt",
"/TABLE-OROC2.txt",
"/TABLE-OROC3.txt"}};
45 std::vector<float> signTest{{-1.f, 1.f}};
50 unsigned int padRow, pad;
54 unsigned int connector, pin, partion, region;
57 unsigned int fecIndex, fecConnector, fecChannel, sampaChip, sampaChannel;
59 for (
int i = 0;
i < mappingTables.size(); ++
i) {
61 const char* aliceO2env = std::getenv(
"O2_ROOT");
62 std::string inputDir =
" ";
64 inputDir = aliceO2env;
66 inputDir +=
"/share/Detectors/TPC/files";
68 std::string
file = inputDir + mappingTables[
i];
69 std::ifstream infile(
file, std::ifstream::in);
70 while (std::getline(infile, line)) {
71 std::stringstream streamLine(line);
72 streamLine >> padIndex >> padRow >> pad >> xPos >> yPos >> connector >> pin >> partion >> region >> fecIndex >> fecConnector >> fecChannel >> sampaChip >> sampaChannel;
74 const float localX = xPos / 10.f;
75 const float localY = yPos / 10.f;
78 for (
int j = 0;
j < signTest.size(); ++
j) {
109 BOOST_CHECK_CLOSE(posLoc.X(),
pos.Y(), 1E-12);
110 BOOST_CHECK_CLOSE(posLoc.Y(), signTest[
j] *
pos.X(), 1E-12);
117 BOOST_CHECK_CLOSE((-1.f) * signTest[
j] *
pos.X(), posGlob.X(), 1E-12);
118 BOOST_CHECK_CLOSE(
pos.Y(), posGlob.Y(), 1E-12);