Skip to content

Commit

Permalink
check errors
Browse files Browse the repository at this point in the history
  • Loading branch information
pkurash committed Jan 29, 2025
1 parent e4cee5d commit e02c8b4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Detectors/Upgrades/ALICE3/FD/base/src/GeometryTGeo.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ GeometryTGeo::GeometryTGeo(bool build, int loadTrans) : DetMatrixCache()
}
}

GeometryTGeo::~GeometryTGeo() {}
GeometryTGeo::~GeometryTGeo() = default;

GeometryTGeo* GeometryTGeo::Instance()
{
Expand Down
10 changes: 7 additions & 3 deletions Detectors/Upgrades/ALICE3/FD/simulation/src/Detector.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -365,8 +365,10 @@ void Detector::defineSensitiveVolumes()
int Detector::getChannelId(TVector3 vec)
{
float phi = vec.Phi();
if (phi < 0)
if (phi < 0) {
phi += TMath::TwoPi();
}

float r = vec.Perp();
float z = vec.Z();

Expand All @@ -378,10 +380,12 @@ int Detector::getChannelId(TVector3 vec)
int ir = 0;

for (int i = 1; i < rd.size(); i++) {
if (r < rd[i])
if (r < rd[i]) {
break;
else
}
else {
ir++;
}
}

return ir * mNumberOfSectors + isect + noff;
Expand Down

0 comments on commit e02c8b4

Please sign in to comment.