Skip to content

Commit

Permalink
add protection against negative values
Browse files Browse the repository at this point in the history
  • Loading branch information
atolosadelgado committed Nov 14, 2024
1 parent ff8d593 commit 04ce16a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions DCHdigi/src/DCHdigi_v01.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,12 @@ StatusCode DCHdigi_v01::initialize() {
if (!m_uidSvc)
ThrowException("Unable to get UniqueIDGenSvc");

if( 0 > m_z_resolution.value() )
ThrowException("Z resolution input value can not be negative!");
m_gauss_z_cm = std::normal_distribution<double>(0., m_z_resolution.value() * MM_TO_CM);

if( 0 > m_xy_resolution.value() )
ThrowException("Radial (XY) resolution input value can not be negative!");
m_gauss_xy_cm = std::normal_distribution<double>(0., m_xy_resolution.value() * MM_TO_CM);

//-----------------
Expand Down

0 comments on commit 04ce16a

Please sign in to comment.