Skip to content

Commit 3cdf7a6

Browse files
committed
Improve treatment of the MID cluster size in adjacent columns in the BP
1 parent 08c9ef0 commit 3cdf7a6

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

Detectors/MUON/MID/Simulation/include/MIDSimulation/Digitizer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ class Digitizer
6767
void addStrip(const Mapping::MpStripIndex& stripIndex, int cathode, int deId);
6868
bool addBPStrips(double xPos, double yPos, int deId, double prob, double xOffset);
6969
bool addNeighbours(const Mapping::MpStripIndex& stripIndex, int cathode, int deId, double prob,
70-
const std::array<double, 2>& initialDist, double xOffset = 0.);
70+
const std::array<double, 2>& initialDist);
7171
bool hitToDigits(const Hit& hit);
7272
bool getLabelLimits(int cathode, const ColumnData& col, int& firstStrip, int& lastStrip) const;
7373

Detectors/MUON/MID/Simulation/src/Digitizer.cxx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -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
//______________________________________________________________________________
6869
bool 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

Comments
 (0)