Skip to content

Commit

Permalink
move some printout before the assert to easier debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
giovannimarchiori committed Oct 6, 2023
1 parent e8f9d97 commit 91fa521
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Detector/DetFCChhECalInclined/src/ECalBarrelInclined_geo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,11 @@ static dd4hep::detail::Ref_t createECalBarrelInclined(dd4hep::Detector& aLcdd,
uint numPlanes =
round(M_PI / asin((passiveThickness + activeThickness + readoutThickness) / (2. * caloDim.rmin() * cos(angle))));

double dPhi = 2. * M_PI / numPlanes;
lLog << MSG::INFO << "number of passive plates = " << numPlanes << " azim. angle difference = " << dPhi << endmsg;
lLog << MSG::INFO << " distance at inner radius (cm) = " << 2. * M_PI * caloDim.rmin() / numPlanes << "\n"
<< " distance at outer radius (cm) = " << 2. * M_PI * caloDim.rmax() / numPlanes << endmsg;

// The following code checks if the xml geometry file contains a constant defining
// the number of planes in the barrel. In that case, it makes the program abort
// if the number of planes in the xml is different from the one calculated from
Expand All @@ -227,10 +232,6 @@ static dd4hep::detail::Ref_t createECalBarrelInclined(dd4hep::Detector& aLcdd,
// make the code crash (incidentSvc does not work)
assert(nModules == numPlanes);
}
double dPhi = 2. * M_PI / numPlanes;
lLog << MSG::INFO << "number of passive plates = " << numPlanes << " azim. angle difference = " << dPhi << endmsg;
lLog << MSG::INFO << " distance at inner radius (cm) = " << 2. * M_PI * caloDim.rmin() / numPlanes << "\n"
<< " distance at outer radius (cm) = " << 2. * M_PI * caloDim.rmax() / numPlanes << endmsg;
// Readout is in the middle between two passive planes
double offsetPassivePhi = caloDim.offset() + dPhi / 2.;
double offsetReadoutPhi = caloDim.offset() + 0;
Expand Down

0 comments on commit 91fa521

Please sign in to comment.