diff --git a/CMakeLists.txt b/CMakeLists.txt index b590d01..1f6b830 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,7 +33,6 @@ find_package(k4FWCore REQUIRED) find_package(Gaudi REQUIRED) find_package(DD4hep REQUIRED) find_package(k4SimGeant4 REQUIRED) -find_package(k4geo REQUIRED) include(GNUInstallDirs) diff --git a/k4Reco/DDPlanarDigi/components/DDPlanarDigi.cpp b/k4Reco/DDPlanarDigi/components/DDPlanarDigi.cpp index ea5fe5d..9a444bf 100644 --- a/k4Reco/DDPlanarDigi/components/DDPlanarDigi.cpp +++ b/k4Reco/DDPlanarDigi/components/DDPlanarDigi.cpp @@ -37,7 +37,6 @@ #include #include -enum { hu = 0, hv, hT, hitE, hitsAccepted, diffu, diffv, diffT, hSize }; DDPlanarDigi::DDPlanarDigi(const std::string& name, ISvcLocator* svcLoc) : MultiTransformer(name, svcLoc, @@ -59,8 +58,6 @@ DDPlanarDigi::DDPlanarDigi(const std::string& name, ISvcLocator* svcLoc) throw std::runtime_error("DDPlanarDigi: Inconsistent number of resolutions given for U and V coordinate"); } - m_histograms.resize(hSize); - m_histograms[hu].reset(new Gaudi::Accumulators::Histogram<1>{this, "hu", "smearing u", {50, -5., +5.}}); m_histograms[hv].reset(new Gaudi::Accumulators::Histogram<1>{this, "hv", "smearing v", {50, -5., +5.}}); m_histograms[hT].reset(new Gaudi::Accumulators::Histogram<1>{this, "hT", "smearing time", {50, -5., +5.}}); diff --git a/k4Reco/DDPlanarDigi/components/DDPlanarDigi.h b/k4Reco/DDPlanarDigi/components/DDPlanarDigi.h index 3e8b808..763fc38 100644 --- a/k4Reco/DDPlanarDigi/components/DDPlanarDigi.h +++ b/k4Reco/DDPlanarDigi/components/DDPlanarDigi.h @@ -70,22 +70,21 @@ * Originally in https://github.com/iLCSoft/MarlinTrkProcessors/blob/master/source/Digitisers/include/DDPlanarDigi.h */ -using SimTrackerHitCollection = edm4hep::SimTrackerHitCollection; -using Header = edm4hep::EventHeaderCollection; - -using TrackerHitPlaneColl = edm4hep::TrackerHitPlaneCollection; -using Association = edm4hep::MCRecoTrackerHitPlaneAssociationCollection; +enum { hu = 0, hv, hT, hitE, hitsAccepted, diffu, diffv, diffT, hSize }; struct DDPlanarDigi final : Gaudi::Functional::MultiTransformer< - std::tuple(const SimTrackerHitCollection&, const Header&), BaseClass_t> { + std::tuple( + const edm4hep::SimTrackerHitCollection&, const edm4hep::EventHeaderCollection&), + BaseClass_t> { DDPlanarDigi(const std::string& name, ISvcLocator* svcLoc); StatusCode initialize() override; StatusCode finalize() override; - std::tuple operator()(const SimTrackerHitCollection& simTrackerHits, - const Header& headers) const override; + std::tuple operator()( + const edm4hep::SimTrackerHitCollection& simTrackerHits, + const edm4hep::EventHeaderCollection& headers) const override; private: Gaudi::Property m_subDetName{this, "SubDetectorName", "VXD", "Name of the subdetector"}; @@ -120,14 +119,13 @@ struct DDPlanarDigi final Gaudi::Property m_geoSvcName{this, "GeoSvcName", "GeoSvc", "The name of the GeoSvc instance"}; Gaudi::Property m_maxTries{this, "MaxTries", 10, "Maximum number of tries to find a valid surface for a hit"}; - Gaudi::Property m_outputFileName{this, "OutputFileName", "planar_digi_histograms.root", "Output file name for the histograms"}; + Gaudi::Property m_outputFileName{this, "OutputFileName", "planar_digi_histograms.root", + "Output file name for the histograms"}; - const dd4hep::rec::SurfaceMap* surfaceMap; - // std::vector>> m_histograms; - std::vector>> m_histograms; - std::string m_collName; + const dd4hep::rec::SurfaceMap* surfaceMap; + std::array>, hSize> m_histograms; + std::string m_collName; - // inline static thread_local std::mt19937 m_engine; inline static thread_local std::mt19937 m_engine; SmartIF m_geoSvc; SmartIF m_uidSvc; diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 88ec644..42c98cf 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -17,3 +17,5 @@ See the License for the specific language governing permissions and limitations under the License. ]] + +find_package(k4geo REQUIRED)