Skip to content

Commit c8d0251

Browse files
committed
Improve treatment of the MID cluster size in adjacent columns in the BP
1 parent 98cd61e commit c8d0251

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
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: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -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
//______________________________________________________________________________
6868
bool 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

Comments
 (0)