Skip to content

Commit

Permalink
geometry ::get single search
Browse files Browse the repository at this point in the history
  • Loading branch information
slava77devel committed Jul 24, 2024
1 parent 69debc2 commit 07e0f40
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 15 deletions.
7 changes: 2 additions & 5 deletions RecoTracker/LSTCore/src/EndcapGeometry.cc
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,6 @@ void lst::EndcapGeometry::fillGeoMapArraysExplicit() {
}

float lst::EndcapGeometry::getdxdy_slope(unsigned int detid) const {
if (dxdy_slope_.find(detid) != dxdy_slope_.end()) {
return dxdy_slope_.at(detid);
} else {
return 0;
}
auto res = dxdy_slope_.find(detid);
return res == dxdy_slope_.end() ? 0.f : res->second;
}
14 changes: 4 additions & 10 deletions RecoTracker/LSTCore/src/TiltedGeometry.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,11 @@ void lst::TiltedGeometry::load(std::string filename) {
}

float lst::TiltedGeometry::getDrDz(unsigned int detid) const {
if (drdzs_.find(detid) != drdzs_.end()) {
return drdzs_.at(detid);
} else {
return 0;
}
auto res = drdzs_.find(detid);
return res == drdzs_.end() ? 0.f : res->second;
}

float lst::TiltedGeometry::getDxDy(unsigned int detid) const {
if (dxdys_.find(detid) != dxdys_.end()) {
return dxdys_.at(detid);
} else {
return 0;
}
auto res = dxdys_.find(detid);
return res == dxdys_.end() ? 0.f : res->second;
}

0 comments on commit 07e0f40

Please sign in to comment.