diff --git a/DDCore/src/segmentations/HexGrid.cpp b/DDCore/src/segmentations/HexGrid.cpp index 0e9224e52..5be6ea355 100644 --- a/DDCore/src/segmentations/HexGrid.cpp +++ b/DDCore/src/segmentations/HexGrid.cpp @@ -123,7 +123,7 @@ namespace dd4hep { double a=positive_modulo(y/(std::sqrt(3)*_sideLength),1); double b=positive_modulo(x/(3*_sideLength),1); int ix = std::floor(x/(3*_sideLength/2.))+ - (b<0.5)*(-abs(a-.5)<(b-.5)*3)+(b>0.5)*(abs(a-.5)-.5<(b-1)*3); + (b<0.5)*(-std::abs(a-.5)<(b-.5)*3)+(b>0.5)*(std::abs(a-.5)-.5<(b-1)*3); int iy=std::floor(y/(std::sqrt(3)*_sideLength/2.)); iy-=(ix+iy)&1; diff --git a/DDG4/python/DDSim/DD4hepSimulation.py b/DDG4/python/DDSim/DD4hepSimulation.py index b0af0d847..ddc7b93a5 100644 --- a/DDG4/python/DDSim/DD4hepSimulation.py +++ b/DDG4/python/DDSim/DD4hepSimulation.py @@ -277,11 +277,13 @@ def getDetectorLists(self, detectorDescription): detType = sd.type() logger.info('getDetectorLists - found active detector %s type: %s', name, detType) if any(pat.lower() in detType.lower() for pat in self.action.trackerSDTypes): + logger.info('getDetectorLists - Identified %s as a tracker', name) trackers.append(det.name()) elif any(pat.lower() in detType.lower() for pat in self.action.calorimeterSDTypes): + logger.info('getDetectorLists - Identified %s as a calorimeter', name) calos.append(det.name()) else: - logger.warning('Unknown sensitive detector type: %s', detType) + logger.warning('getDetectorLists - Unknown sensitive detector type: %s', detType) unknown.append(det.name()) return trackers, calos, unknown @@ -464,13 +466,13 @@ def run(self): # get lists of trackers and calorimeters in detectorDescription trk, cal, unk = self.getDetectorLists(detectorDescription) - - for detectors, function, defFilter, abort in [(trk, geant4.setupTracker, self.filter.tracker, False), - (cal, geant4.setupCalorimeter, self.filter.calo, False), - (unk, geant4.setupDetector, None, True), - ]: + for detectors, function, defFilter, defAction, abort in \ + [(trk, geant4.setupTracker, self.filter.tracker, self.action.tracker, False), + (cal, geant4.setupCalorimeter, self.filter.calo, self.action.calo, False), + (unk, geant4.setupDetector, None, "No Default", True), + ]: try: - self.__setupSensitiveDetectors(detectors, function, defFilter, abort) + self.__setupSensitiveDetectors(detectors, function, defFilter, defAction, abort) except Exception as e: logger.error("Failed setting up sensitive detector %s", e) raise @@ -580,7 +582,7 @@ def __checkOutputLevel(self, level): return -1 def __setupSensitiveDetectors(self, detectors, setupFunction, defaultFilter=None, - abortForMissingAction=False, + defaultAction=None, abortForMissingAction=False, ): """Attach sensitive detector actions for all subdetectors. @@ -592,7 +594,7 @@ def __setupSensitiveDetectors(self, detectors, setupFunction, defaultFilter=None :param abortForMissingAction: if true end program if there is no action found """ for det in detectors: - logger.info('Setting up SD for %s', det) + logger.info('Setting up SD for %s with %s', det, defaultAction) action = None for pattern in self.action.mapActions: if pattern.lower() in det.lower(): diff --git a/examples/CLICSiD/sim/field.xml b/examples/CLICSiD/sim/field.xml index 6ac71a42d..daee5488b 100644 --- a/examples/CLICSiD/sim/field.xml +++ b/examples/CLICSiD/sim/field.xml @@ -24,7 +24,7 @@ delta_one_step="0.001*mm" eps_min="5e-05*mm" eps_max="0.001*mm" - stepper="HelixSimpleRunge" + stepper="ClassicalRK4" equation="Mag_UsualEqRhs"> diff --git a/examples/ClientTests/src/NestedBoxReflection_geo.cpp b/examples/ClientTests/src/NestedBoxReflection_geo.cpp index e38b6b755..9c4e933f0 100644 --- a/examples/ClientTests/src/NestedBoxReflection_geo.cpp +++ b/examples/ClientTests/src/NestedBoxReflection_geo.cpp @@ -36,7 +36,7 @@ namespace { constexpr double tol = 1.0e-3; // Geant4 compatible double check = (x.Cross(y)).Dot(z); // in case of a LEFT-handed orthogonal system this must be -1 - if (abs(1. + check) > tol) { + if (std::abs(1. + check) > tol) { except("NestedBoxReflection", "+++ FAILED to construct Rotation is not LEFT-handed!"); } printout(INFO, "NestedBoxReflection", "+++ Constructed LEFT-handed reflection rotation.");