Skip to content

Commit

Permalink
Merge pull request #502 from bonventre/strawelecbug
Browse files Browse the repository at this point in the history
Fixed bug accessing electronics tmax out of range
  • Loading branch information
kutschke authored Jun 23, 2021
2 parents e8a59dc + 106ec1a commit 50e389c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions TrackerConditions/src/StrawElectronics.cc
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ namespace mu2e {
distIndex = i;
}
double distFrac = 1 - (distance - _wPoints[distIndex]._distance)/(_wPoints[distIndex+1]._distance - _wPoints[distIndex]._distance);
double p0 = _wPoints[distIndex]._tmax[ipath][sid.uniqueStraw()];
double p1 = _wPoints[distIndex + 1]._tmax[ipath][sid.uniqueStraw()];
double p0 = _wPoints[distIndex]._tmax[ipath][sid.getStraw()];
double p1 = _wPoints[distIndex + 1]._tmax[ipath][sid.getStraw()];

return p0 * distFrac + p1 * (1 - distFrac);
}
Expand All @@ -145,8 +145,8 @@ namespace mu2e {
distIndex = i;
}
double distFrac = 1 - (distance - _wPoints[distIndex]._distance)/(_wPoints[distIndex+1]._distance - _wPoints[distIndex]._distance);
double p0 = _wPoints[distIndex]._linmax[ipath][sid.uniqueStraw()];
double p1 = _wPoints[distIndex + 1]._linmax[ipath][sid.uniqueStraw()];
double p0 = _wPoints[distIndex]._linmax[ipath][sid.getStraw()];
double p1 = _wPoints[distIndex + 1]._linmax[ipath][sid.getStraw()];

return charge * (p0 * distFrac + p1 * (1 - distFrac)) * _dVdI[ipath][sid.uniqueStraw()];
}
Expand Down

0 comments on commit 50e389c

Please sign in to comment.