@@ -48,7 +48,7 @@ bool Digitizer::addBPStrips(double xPos, double yPos, int deId, double prob, dou
4848 // The offset is used to check the strips in the bending plane
4949 // placed in the board close to the fired one
5050 // If the response says that the strip is too far away, there is no need to check further
51- if (!mResponse .isFired (prob, std::abs (xOffset), 0 , deId)) {
51+ if (!mResponse .isFired (prob, std::abs (xOffset), 1 , deId)) {
5252 return false ;
5353 }
5454
@@ -60,23 +60,22 @@ bool Digitizer::addBPStrips(double xPos, double yPos, int deId, double prob, dou
6060 addStrip (stripIndex, 0 , deId);
6161 MpArea area = mMapping .stripByLocation (stripIndex.strip , 0 , stripIndex.line , stripIndex.column , deId);
6262 std::array<double , 2 > dist = {area.getYmax () - yPos, yPos - area.getYmin ()};
63- addNeighbours (stripIndex, 0 , deId, prob, dist, xOffset );
63+ addNeighbours (stripIndex, 0 , deId, prob, dist);
6464 return true ;
6565}
6666
6767// ______________________________________________________________________________
6868bool Digitizer::addNeighbours (const Mapping::MpStripIndex& stripIndex, int cathode, int deId, double prob,
69- const std::array<double , 2 >& initialDist, double xOffset )
69+ const std::array<double , 2 >& initialDist)
7070{
7171 // / Add neighbour strips
7272
73- double xOffset2 = xOffset * xOffset;
7473 for (int idir = 0 ; idir < 2 ; ++idir) {
7574 // Search for neighbours in the two directions
7675 // up and down for the BP, right and left for the NBP
7776 double dist = initialDist[idir];
7877 Mapping::MpStripIndex neigh = mMapping .nextStrip (stripIndex, cathode, deId, idir);
79- while (neigh.isValid () && mResponse .isFired (prob, std::sqrt ( dist * dist + xOffset2) , cathode, deId)) {
78+ while (neigh.isValid () && mResponse .isFired (prob, dist, cathode, deId)) {
8079 addStrip (neigh, cathode, deId);
8180 dist += mMapping .getStripSize (neigh.strip , cathode, neigh.column , deId);
8281 neigh = mMapping .nextStrip (neigh, cathode, deId, idir);
0 commit comments