@@ -46,9 +46,10 @@ bool Digitizer::addBPStrips(double xPos, double yPos, int deId, double prob, dou
4646 // / Checks the BP strips in the neighbour columns
4747
4848 // The offset is used to check the strips in the bending plane
49- // placed in the board close to the fired one
50- // 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)) {
49+ // placed in the column close to the fired one
50+ // For this case, we switch off the cross talk parameter,
51+ // so that the function goes to 0 at infinity.
52+ if (!mResponse .isFired (prob, std::abs (xOffset), 1 , deId, false )) {
5253 return false ;
5354 }
5455
@@ -60,23 +61,22 @@ bool Digitizer::addBPStrips(double xPos, double yPos, int deId, double prob, dou
6061 addStrip (stripIndex, 0 , deId);
6162 MpArea area = mMapping .stripByLocation (stripIndex.strip , 0 , stripIndex.line , stripIndex.column , deId);
6263 std::array<double , 2 > dist = {area.getYmax () - yPos, yPos - area.getYmin ()};
63- addNeighbours (stripIndex, 0 , deId, prob, dist, xOffset );
64+ addNeighbours (stripIndex, 0 , deId, prob, dist);
6465 return true ;
6566}
6667
6768// ______________________________________________________________________________
6869bool Digitizer::addNeighbours (const Mapping::MpStripIndex& stripIndex, int cathode, int deId, double prob,
69- const std::array<double , 2 >& initialDist, double xOffset )
70+ const std::array<double , 2 >& initialDist)
7071{
7172 // / Add neighbour strips
7273
73- double xOffset2 = xOffset * xOffset;
7474 for (int idir = 0 ; idir < 2 ; ++idir) {
7575 // Search for neighbours in the two directions
7676 // up and down for the BP, right and left for the NBP
7777 double dist = initialDist[idir];
7878 Mapping::MpStripIndex neigh = mMapping .nextStrip (stripIndex, cathode, deId, idir);
79- while (neigh.isValid () && mResponse .isFired (prob, std::sqrt ( dist * dist + xOffset2) , cathode, deId)) {
79+ while (neigh.isValid () && mResponse .isFired (prob, dist, cathode, deId)) {
8080 addStrip (neigh, cathode, deId);
8181 dist += mMapping .getStripSize (neigh.strip , cathode, neigh.column , deId);
8282 neigh = mMapping .nextStrip (neigh, cathode, deId, idir);
0 commit comments