60 const std::vector<Mapping::MpStripIndex>& neighbours,
const Mapping& mapping)
63 float delta = checkUpDown ? 0.1 : 0;
76 if (!
areEqual(refStrip, upRef, cathode)) {
87 const Mapping& mapping,
int cathode,
int deId)
90 mapping.stripByLocation(stripIndex.
strip, cathode, stripIndex.
line, stripIndex.
column, deId,
false);
93 ss <<
"Strip " << stripIndex.
strip <<
" cathode " << cathode <<
" line " << stripIndex.
line <<
" column "
102 bool checkUpDown =
false;
103 for (
int ix = 0; ix < 3; ++ix) {
104 for (
int iy = 0; iy < 3; ++iy) {
105 if ((ix - 1) * (iy - 1) != 0 || ix == iy) {
109 checkUpDown = (ix == 1) ?
false :
true;
110 }
else if (iy != 1) {
114 int nFound =
findInNeighbours(xPos[ix], yPos[iy], cathode, deId, checkUpDown, neighbours, mapping);
116 ss <<
" err: (" << ix - 1 <<
", " << iy - 1 <<
")";
124 if (nMatched != neighbours.size()) {
126 ss <<
" matched " << nMatched <<
" != " << neighbours.size();
130 std::cerr << ss.str() <<
". Neighbours: " << std::endl;
131 for (
auto const& neigh : neighbours) {
132 std::cerr <<
" strip " << neigh.strip <<
" line " << neigh.line <<
" column " << neigh.column << std::endl;
142 for (
int icolumn = mapping.getFirstColumn(deId); icolumn < 7; ++icolumn) {
143 int firstLineBP = mapping.getFirstBoardBP(icolumn, deId);
144 int lastLineBP = mapping.getLastBoardBP(icolumn, deId);
145 for (
int icathode = 0; icathode < 2; ++icathode) {
146 int firstLine = firstLineBP;
147 int lastLine = lastLineBP;
157 firstLine = lastLine = (firstLine + lastLine) / 2;
159 int nStrips = (icathode == 0) ? 16 : mapping.getNStripsNBP(icolumn, deId);
160 for (
int iline = firstLine; iline <= lastLine; ++iline) {
161 for (
int istrip = 0; istrip < nStrips; ++istrip) {
162 Mapping::MpStripIndex stripIndex;
163 stripIndex.column = icolumn;
164 stripIndex.line = iline;
165 stripIndex.strip = istrip;
166 std::vector<Mapping::MpStripIndex> neighbours = mapping.getNeighbours(stripIndex, icathode, deId);
bool areNeighboursOk(const Mapping::MpStripIndex &stripIndex, const std::vector< Mapping::MpStripIndex > &neighbours, const Mapping &mapping, int cathode, int deId)