From 5d406f3ba9e2290a7ebf07d334f1d825c6165100 Mon Sep 17 00:00:00 2001 From: Juan Miguel Carceller <22276694+jmcarcell@users.noreply.github.com> Date: Sat, 27 Jul 2024 23:35:46 +0200 Subject: [PATCH 01/14] Do not use GaudiAlg (#25) * Do not use GaudiAlg * Change `execute()` to `execute(EventContext&) const` * Add mutable to _map --------- Co-authored-by: jmcarcell --- ARCdigi/CMakeLists.txt | 1 - ARCdigi/include/ARCdigitizer.h | 10 ++++----- ARCdigi/src/ARCdigitizer.cpp | 4 ++-- DCHdigi/CMakeLists.txt | 1 - DCHdigi/include/DCHsimpleDigitizer.h | 10 ++++----- .../include/DCHsimpleDigitizerExtendedEdm.h | 22 +++++++++---------- DCHdigi/src/DCHsimpleDigitizer.cpp | 4 ++-- DCHdigi/src/DCHsimpleDigitizerExtendedEdm.cpp | 4 ++-- Tracking/CMakeLists.txt | 1 - Tracking/include/GenFitter.h | 10 ++++----- Tracking/src/GenFitter.cpp | 4 ++-- VTXdigi/CMakeLists.txt | 1 - VTXdigi/include/VTXdigitizer.h | 12 +++++----- VTXdigi/src/VTXdigitizer.cpp | 4 ++-- 14 files changed, 42 insertions(+), 46 deletions(-) diff --git a/ARCdigi/CMakeLists.txt b/ARCdigi/CMakeLists.txt index 8ab4570..541b67f 100644 --- a/ARCdigi/CMakeLists.txt +++ b/ARCdigi/CMakeLists.txt @@ -14,7 +14,6 @@ file(GLOB headers gaudi_add_module(${PackageName} SOURCES ${sources} LINK - Gaudi::GaudiAlgLib Gaudi::GaudiKernel EDM4HEP::edm4hep k4FWCore::k4FWCore diff --git a/ARCdigi/include/ARCdigitizer.h b/ARCdigi/include/ARCdigitizer.h index 9d70b27..a771c70 100644 --- a/ARCdigi/include/ARCdigitizer.h +++ b/ARCdigi/include/ARCdigitizer.h @@ -2,7 +2,7 @@ // GAUDI #include "Gaudi/Property.h" -#include "GaudiAlg/GaudiAlgorithm.h" +#include "Gaudi/Algorithm.h" #include "GaudiKernel/IRndmGenSvc.h" #include "GaudiKernel/RndmGenerators.h" @@ -33,7 +33,7 @@ namespace edm4hep { * */ -class ARCdigitizer : public GaudiAlgorithm { +class ARCdigitizer : public Gaudi::Algorithm { public: explicit ARCdigitizer(const std::string&, ISvcLocator*); virtual ~ARCdigitizer(); @@ -44,7 +44,7 @@ class ARCdigitizer : public GaudiAlgorithm { /** Execute. * @return status code */ - virtual StatusCode execute() final; + virtual StatusCode execute(const EventContext&) const final; /** Finalize. * @return status code */ @@ -52,9 +52,9 @@ class ARCdigitizer : public GaudiAlgorithm { private: // Input sim tracker hit collection name - DataHandle m_input_sim_hits{"inputSimHits", Gaudi::DataHandle::Reader, this}; + mutable DataHandle m_input_sim_hits{"inputSimHits", Gaudi::DataHandle::Reader, this}; // Output digitized tracker hit collection name - DataHandle m_output_digi_hits{"outputDigiHits", Gaudi::DataHandle::Writer, this}; + mutable DataHandle m_output_digi_hits{"outputDigiHits", Gaudi::DataHandle::Writer, this}; // Flat value for SiPM efficiency FloatProperty m_flat_SiPM_effi{this, "flatSiPMEfficiency", -1.0, "Flat value for SiPM quantum efficiency (<0 := disabled)"}; // Apply the SiPM efficiency to digitized hits instead of simulated hits diff --git a/ARCdigi/src/ARCdigitizer.cpp b/ARCdigi/src/ARCdigitizer.cpp index 6758cd9..5f4a3ba 100644 --- a/ARCdigi/src/ARCdigitizer.cpp +++ b/ARCdigi/src/ARCdigitizer.cpp @@ -12,7 +12,7 @@ DECLARE_COMPONENT(ARCdigitizer) -ARCdigitizer::ARCdigitizer(const std::string& aName, ISvcLocator* aSvcLoc) : GaudiAlgorithm(aName, aSvcLoc) { +ARCdigitizer::ARCdigitizer(const std::string& aName, ISvcLocator* aSvcLoc) : Gaudi::Algorithm(aName, aSvcLoc) { declareProperty("inputSimHits", m_input_sim_hits, "Input sim tracker hit collection name"); declareProperty("outputDigiHits", m_output_digi_hits, "Output digitized tracker hit collection name"); } @@ -43,7 +43,7 @@ StatusCode ARCdigitizer::initialize() { return StatusCode::SUCCESS; } -StatusCode ARCdigitizer::execute() { +StatusCode ARCdigitizer::execute(const EventContext&) const { // Get the input collection with Geant4 hits const edm4hep::SimTrackerHitCollection* input_sim_hits = m_input_sim_hits.get(); verbose() << "Input Sim Hit collection size: " << input_sim_hits->size() << endmsg; diff --git a/DCHdigi/CMakeLists.txt b/DCHdigi/CMakeLists.txt index f39f545..b753c26 100644 --- a/DCHdigi/CMakeLists.txt +++ b/DCHdigi/CMakeLists.txt @@ -45,7 +45,6 @@ file(GLOB headers gaudi_add_module(${PackageName} SOURCES ${sources} LINK - Gaudi::GaudiAlgLib Gaudi::GaudiKernel EDM4HEP::edm4hep extensionDict diff --git a/DCHdigi/include/DCHsimpleDigitizer.h b/DCHdigi/include/DCHsimpleDigitizer.h index e958045..76b2573 100644 --- a/DCHdigi/include/DCHsimpleDigitizer.h +++ b/DCHdigi/include/DCHsimpleDigitizer.h @@ -2,7 +2,7 @@ // GAUDI #include "Gaudi/Property.h" -#include "GaudiAlg/GaudiAlgorithm.h" +#include "Gaudi/Algorithm.h" #include "GaudiKernel/IRndmGenSvc.h" #include "GaudiKernel/RndmGenerators.h" @@ -36,7 +36,7 @@ namespace edm4hep { * */ -class DCHsimpleDigitizer : public GaudiAlgorithm { +class DCHsimpleDigitizer : public Gaudi::Algorithm { public: explicit DCHsimpleDigitizer(const std::string&, ISvcLocator*); virtual ~DCHsimpleDigitizer(); @@ -47,7 +47,7 @@ class DCHsimpleDigitizer : public GaudiAlgorithm { /** Execute. * @return status code */ - virtual StatusCode execute() final; + virtual StatusCode execute(const EventContext&) const final; /** Finalize. * @return status code */ @@ -55,9 +55,9 @@ class DCHsimpleDigitizer : public GaudiAlgorithm { private: // Input sim tracker hit collection name - DataHandle m_input_sim_hits{"inputSimHits", Gaudi::DataHandle::Reader, this}; + mutable DataHandle m_input_sim_hits{"inputSimHits", Gaudi::DataHandle::Reader, this}; // Output digitized tracker hit collection name - DataHandle m_output_digi_hits{"outputDigiHits", Gaudi::DataHandle::Writer, this}; + mutable DataHandle m_output_digi_hits{"outputDigiHits", Gaudi::DataHandle::Writer, this}; // Detector readout name Gaudi::Property m_readoutName{this, "readoutName", "CDCHHits", "Name of the detector readout"}; diff --git a/DCHdigi/include/DCHsimpleDigitizerExtendedEdm.h b/DCHdigi/include/DCHsimpleDigitizerExtendedEdm.h index 86a1dce..38a1e72 100644 --- a/DCHdigi/include/DCHsimpleDigitizerExtendedEdm.h +++ b/DCHdigi/include/DCHsimpleDigitizerExtendedEdm.h @@ -2,7 +2,7 @@ // GAUDI #include "Gaudi/Property.h" -#include "GaudiAlg/GaudiAlgorithm.h" +#include "Gaudi/Algorithm.h" #include "GaudiKernel/IRndmGenSvc.h" #include "GaudiKernel/RndmGenerators.h" @@ -33,7 +33,7 @@ * */ -class DCHsimpleDigitizerExtendedEdm : public GaudiAlgorithm { +class DCHsimpleDigitizerExtendedEdm : public Gaudi::Algorithm { public: explicit DCHsimpleDigitizerExtendedEdm(const std::string&, ISvcLocator*); virtual ~DCHsimpleDigitizerExtendedEdm(); @@ -44,7 +44,7 @@ class DCHsimpleDigitizerExtendedEdm : public GaudiAlgorithm { /** Execute. * @return status code */ - virtual StatusCode execute() final; + virtual StatusCode execute(const EventContext&) const final; /** Finalize. * @return status code */ @@ -52,13 +52,13 @@ class DCHsimpleDigitizerExtendedEdm : public GaudiAlgorithm { private: // Input sim tracker hit collection name - DataHandle m_input_sim_hits{"inputSimHits", Gaudi::DataHandle::Reader, this}; + mutable DataHandle m_input_sim_hits{"inputSimHits", Gaudi::DataHandle::Reader, this}; // Output digitized tracker hit collection name - DataHandle m_output_digi_hits{"outputDigiHits", Gaudi::DataHandle::Writer, this}; + mutable DataHandle m_output_digi_hits{"outputDigiHits", Gaudi::DataHandle::Writer, this}; // Output association between digitized and simulated hit collections - DataHandle m_output_sim_digi_association{"outputSimDigiAssociation", Gaudi::DataHandle::Writer, this}; + mutable DataHandle m_output_sim_digi_association{"outputSimDigiAssociation", Gaudi::DataHandle::Writer, this}; // Output digitized tracker hit in local coordinates collection name. Only filled in debug mode - DataHandle m_output_digi_local_hits{"outputDigiLocalHits", Gaudi::DataHandle::Writer, this}; + mutable DataHandle m_output_digi_local_hits{"outputDigiLocalHits", Gaudi::DataHandle::Writer, this}; // Detector readout name Gaudi::Property m_readoutName{this, "readoutName", "CDCHHits", "Name of the detector readout"}; @@ -77,10 +77,10 @@ class DCHsimpleDigitizerExtendedEdm : public GaudiAlgorithm { // Flag to produce debugging distributions Gaudi::Property m_debugMode{this, "debugMode", false, "Flag to produce debugging distributions"}; // Declaration of debugging distributions - DataHandle> m_leftHitSimHitDeltaDistToWire{"leftHitSimHitDeltaDistToWire", Gaudi::DataHandle::Writer, this}; // mm - DataHandle> m_leftHitSimHitDeltaLocalZ{"leftHitSimHitDeltaLocalZ", Gaudi::DataHandle::Writer, this}; // mm - DataHandle> m_rightHitSimHitDeltaDistToWire{"rightHitSimHitDeltaDistToWire", Gaudi::DataHandle::Writer, this}; // mm - DataHandle> m_rightHitSimHitDeltaLocalZ{"rightHitSimHitDeltaLocalZ", Gaudi::DataHandle::Writer, this}; // mm + mutable DataHandle> m_leftHitSimHitDeltaDistToWire{"leftHitSimHitDeltaDistToWire", Gaudi::DataHandle::Writer, this}; // mm + mutable DataHandle> m_leftHitSimHitDeltaLocalZ{"leftHitSimHitDeltaLocalZ", Gaudi::DataHandle::Writer, this}; // mm + mutable DataHandle> m_rightHitSimHitDeltaDistToWire{"rightHitSimHitDeltaDistToWire", Gaudi::DataHandle::Writer, this}; // mm + mutable DataHandle> m_rightHitSimHitDeltaLocalZ{"rightHitSimHitDeltaLocalZ", Gaudi::DataHandle::Writer, this}; // mm // Random Number Service IRndmGenSvc* m_randSvc; diff --git a/DCHdigi/src/DCHsimpleDigitizer.cpp b/DCHdigi/src/DCHsimpleDigitizer.cpp index f538dfd..f45930e 100644 --- a/DCHdigi/src/DCHsimpleDigitizer.cpp +++ b/DCHdigi/src/DCHsimpleDigitizer.cpp @@ -10,7 +10,7 @@ DECLARE_COMPONENT(DCHsimpleDigitizer) DCHsimpleDigitizer::DCHsimpleDigitizer(const std::string& aName, ISvcLocator* aSvcLoc) - : GaudiAlgorithm(aName, aSvcLoc), m_geoSvc("GeoSvc", "DCHsimpleDigitizer") { + : Gaudi::Algorithm(aName, aSvcLoc), m_geoSvc("GeoSvc", "DCHsimpleDigitizer") { declareProperty("inputSimHits", m_input_sim_hits, "Input sim tracker hit collection name"); declareProperty("outputDigiHits", m_output_digi_hits, "Output digitized tracker hit collection name"); } @@ -45,7 +45,7 @@ StatusCode DCHsimpleDigitizer::initialize() { return StatusCode::SUCCESS; } -StatusCode DCHsimpleDigitizer::execute() { +StatusCode DCHsimpleDigitizer::execute(const EventContext&) const { // Get the input collection with Geant4 hits const edm4hep::SimTrackerHitCollection* input_sim_hits = m_input_sim_hits.get(); debug() << "Input Sim Hit collection size: " << input_sim_hits->size() << endmsg; diff --git a/DCHdigi/src/DCHsimpleDigitizerExtendedEdm.cpp b/DCHdigi/src/DCHsimpleDigitizerExtendedEdm.cpp index 5f5e827..6c9d0b9 100644 --- a/DCHdigi/src/DCHsimpleDigitizerExtendedEdm.cpp +++ b/DCHdigi/src/DCHsimpleDigitizerExtendedEdm.cpp @@ -10,7 +10,7 @@ DECLARE_COMPONENT(DCHsimpleDigitizerExtendedEdm) DCHsimpleDigitizerExtendedEdm::DCHsimpleDigitizerExtendedEdm(const std::string& aName, ISvcLocator* aSvcLoc) - : GaudiAlgorithm(aName, aSvcLoc), m_geoSvc("GeoSvc", "DCHsimpleDigitizerExtendedEdm") { + : Gaudi::Algorithm(aName, aSvcLoc), m_geoSvc("GeoSvc", "DCHsimpleDigitizerExtendedEdm") { declareProperty("inputSimHits", m_input_sim_hits, "Input sim tracker hit collection name"); declareProperty("outputDigiHits", m_output_digi_hits, "Output digitized tracker hit collection name"); declareProperty("outputSimDigiAssociation", m_output_sim_digi_association, "Output name for the association between digitized and simulated hit collections"); @@ -46,7 +46,7 @@ StatusCode DCHsimpleDigitizerExtendedEdm::initialize() { return StatusCode::SUCCESS; } -StatusCode DCHsimpleDigitizerExtendedEdm::execute() { +StatusCode DCHsimpleDigitizerExtendedEdm::execute(const EventContext&) const { // Get the input collection with Geant4 hits const edm4hep::SimTrackerHitCollection* input_sim_hits = m_input_sim_hits.get(); debug() << "Input Sim Hit collection size: " << input_sim_hits->size() << endmsg; diff --git a/Tracking/CMakeLists.txt b/Tracking/CMakeLists.txt index cc00040..f441d5c 100644 --- a/Tracking/CMakeLists.txt +++ b/Tracking/CMakeLists.txt @@ -17,7 +17,6 @@ file(GLOB headers gaudi_add_module(${PackageName} SOURCES ${sources} LINK - Gaudi::GaudiAlgLib Gaudi::GaudiKernel EDM4HEP::edm4hep k4FWCore::k4FWCore diff --git a/Tracking/include/GenFitter.h b/Tracking/include/GenFitter.h index 4826a63..4caa6bb 100644 --- a/Tracking/include/GenFitter.h +++ b/Tracking/include/GenFitter.h @@ -2,7 +2,7 @@ // GAUDI #include "Gaudi/Property.h" -#include "GaudiAlg/GaudiAlgorithm.h" +#include "Gaudi/Algorithm.h" // K4FWCORE #include "k4FWCore/DataHandle.h" @@ -30,7 +30,7 @@ namespace edm4hep { * */ -class GenFitter : public GaudiAlgorithm { +class GenFitter : public Gaudi::Algorithm { public: explicit GenFitter(const std::string&, ISvcLocator*); virtual ~GenFitter(); @@ -41,7 +41,7 @@ class GenFitter : public GaudiAlgorithm { /** Execute. * @return status code */ - virtual StatusCode execute() final; + virtual StatusCode execute(const EventContext&) const final; /** Finalize. * @return status code */ @@ -49,9 +49,9 @@ class GenFitter : public GaudiAlgorithm { private: // Input tracker hit collection name - DataHandle m_input_hits{"inputHits", Gaudi::DataHandle::Reader, this}; + mutable DataHandle m_input_hits{"inputHits", Gaudi::DataHandle::Reader, this}; // Output track collection name - DataHandle m_output_tracks{"outputTracks", Gaudi::DataHandle::Writer, this}; + mutable DataHandle m_output_tracks{"outputTracks", Gaudi::DataHandle::Writer, this}; // Transient genfit measurements used internally by genfit to run the tracking //std::vector m_wire_measurements; }; diff --git a/Tracking/src/GenFitter.cpp b/Tracking/src/GenFitter.cpp index 23df287..cc1ac6c 100644 --- a/Tracking/src/GenFitter.cpp +++ b/Tracking/src/GenFitter.cpp @@ -2,7 +2,7 @@ DECLARE_COMPONENT(GenFitter) -GenFitter::GenFitter(const std::string& aName, ISvcLocator* aSvcLoc) : GaudiAlgorithm(aName, aSvcLoc) { +GenFitter::GenFitter(const std::string& aName, ISvcLocator* aSvcLoc) : Gaudi::Algorithm(aName, aSvcLoc) { declareProperty("inputHits", m_input_hits, "Input tracker hit collection name"); declareProperty("outputTracks", m_output_tracks, "Output track collection name"); } @@ -11,7 +11,7 @@ GenFitter::~GenFitter() {} StatusCode GenFitter::initialize() { return StatusCode::SUCCESS; } -StatusCode GenFitter::execute() { +StatusCode GenFitter::execute(const EventContext&) const { // Get the input collection with tracker hits const edm4hep::TrackerHit3DCollection* input_hits = m_input_hits.get(); verbose() << "Input Hit collection size: " << input_hits->size() << endmsg; diff --git a/VTXdigi/CMakeLists.txt b/VTXdigi/CMakeLists.txt index 8b88d1a..58ace97 100644 --- a/VTXdigi/CMakeLists.txt +++ b/VTXdigi/CMakeLists.txt @@ -13,7 +13,6 @@ file(GLOB headers gaudi_add_module(${PackageName} SOURCES ${sources} LINK - Gaudi::GaudiAlgLib Gaudi::GaudiKernel EDM4HEP::edm4hep k4FWCore::k4FWCore diff --git a/VTXdigi/include/VTXdigitizer.h b/VTXdigi/include/VTXdigitizer.h index b0dcd75..7e91170 100644 --- a/VTXdigi/include/VTXdigitizer.h +++ b/VTXdigi/include/VTXdigitizer.h @@ -2,7 +2,7 @@ // GAUDI #include "Gaudi/Property.h" -#include "GaudiAlg/GaudiAlgorithm.h" +#include "Gaudi/Algorithm.h" #include "GaudiKernel/IRndmGenSvc.h" #include "GaudiKernel/RndmGenerators.h" @@ -38,7 +38,7 @@ namespace edm4hep { * */ -class VTXdigitizer : public GaudiAlgorithm { +class VTXdigitizer : public Gaudi::Algorithm { public: explicit VTXdigitizer(const std::string&, ISvcLocator*); virtual ~VTXdigitizer(); @@ -49,7 +49,7 @@ class VTXdigitizer : public GaudiAlgorithm { /** Execute. * @return status code */ - virtual StatusCode execute() final; + virtual StatusCode execute(const EventContext&) const final; /** Finalize. * @return status code */ @@ -57,9 +57,9 @@ class VTXdigitizer : public GaudiAlgorithm { private: // Input sim vertex hit collection name - DataHandle m_input_sim_hits{"inputSimHits", Gaudi::DataHandle::Reader, this}; + mutable DataHandle m_input_sim_hits{"inputSimHits", Gaudi::DataHandle::Reader, this}; // Output digitized vertex hit collection name - DataHandle m_output_digi_hits{"outputDigiHits", Gaudi::DataHandle::Writer, this}; + mutable DataHandle m_output_digi_hits{"outputDigiHits", Gaudi::DataHandle::Writer, this}; // Detector name Gaudi::Property m_detectorName{this, "detectorName", "Vertex", "Name of the detector (default: Vertex)"}; @@ -82,7 +82,7 @@ class VTXdigitizer : public GaudiAlgorithm { FloatProperty m_t_resolution{this, "tResolution", 0.1, "Time resolution [ns]"}; // Surface manager used to project hits onto sensitive surface with forceHitsOntoSurface argument - const dd4hep::rec::SurfaceMap* _map; + mutable const dd4hep::rec::SurfaceMap* _map; // Option to force hits onto sensitive surface BooleanProperty m_forceHitsOntoSurface{this, "forceHitsOntoSurface", false, "Project hits onto the surface in case they are not yet on the surface (default: false"}; diff --git a/VTXdigi/src/VTXdigitizer.cpp b/VTXdigi/src/VTXdigitizer.cpp index 2e610c3..a6e5ac0 100644 --- a/VTXdigi/src/VTXdigitizer.cpp +++ b/VTXdigi/src/VTXdigitizer.cpp @@ -3,7 +3,7 @@ DECLARE_COMPONENT(VTXdigitizer) VTXdigitizer::VTXdigitizer(const std::string& aName, ISvcLocator* aSvcLoc) - : GaudiAlgorithm(aName, aSvcLoc), m_geoSvc("GeoSvc", "VTXdigitizer") { + : Gaudi::Algorithm(aName, aSvcLoc), m_geoSvc("GeoSvc", "VTXdigitizer") { declareProperty("inputSimHits", m_input_sim_hits, "Input sim vertex hit collection name"); declareProperty("outputDigiHits", m_output_digi_hits, "Output digitized vertex hit collection name"); } @@ -44,7 +44,7 @@ StatusCode VTXdigitizer::initialize() { return StatusCode::SUCCESS; } -StatusCode VTXdigitizer::execute() { +StatusCode VTXdigitizer::execute(const EventContext&) const { // Get the input collection with Geant4 hits const edm4hep::SimTrackerHitCollection* input_sim_hits = m_input_sim_hits.get(); verbose() << "Input Sim Hit collection size: " << input_sim_hits->size() << endmsg; From bf6415860a98b59a4b470ef9cdf8927de187601e Mon Sep 17 00:00:00 2001 From: Juan Miguel Carceller <22276694+jmcarcell@users.noreply.github.com> Date: Sat, 27 Jul 2024 23:41:08 +0200 Subject: [PATCH 02/14] Minor fixes: add missing k4FWCore::k4Interface when linking and fix warning about an unused variable (#26) * Add missing k4FWCore::k4Interface when linking * Fix warning about an unused variable --------- Co-authored-by: jmcarcell --- DCHdigi/CMakeLists.txt | 1 + VTXdigi/CMakeLists.txt | 1 + VTXdigi/src/VTXdigitizer.cpp | 4 ---- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/DCHdigi/CMakeLists.txt b/DCHdigi/CMakeLists.txt index b753c26..e378554 100644 --- a/DCHdigi/CMakeLists.txt +++ b/DCHdigi/CMakeLists.txt @@ -49,6 +49,7 @@ gaudi_add_module(${PackageName} EDM4HEP::edm4hep extensionDict k4FWCore::k4FWCore + k4FWCore::k4Interface DD4hep::DDRec ) diff --git a/VTXdigi/CMakeLists.txt b/VTXdigi/CMakeLists.txt index 58ace97..0beeb15 100644 --- a/VTXdigi/CMakeLists.txt +++ b/VTXdigi/CMakeLists.txt @@ -16,6 +16,7 @@ gaudi_add_module(${PackageName} Gaudi::GaudiKernel EDM4HEP::edm4hep k4FWCore::k4FWCore + k4FWCore::k4Interface DD4hep::DDRec ) diff --git a/VTXdigi/src/VTXdigitizer.cpp b/VTXdigi/src/VTXdigitizer.cpp index a6e5ac0..1011d00 100644 --- a/VTXdigi/src/VTXdigitizer.cpp +++ b/VTXdigi/src/VTXdigitizer.cpp @@ -49,8 +49,6 @@ StatusCode VTXdigitizer::execute(const EventContext&) const { const edm4hep::SimTrackerHitCollection* input_sim_hits = m_input_sim_hits.get(); verbose() << "Input Sim Hit collection size: " << input_sim_hits->size() << endmsg; - unsigned nDismissedHits=0; - // Digitize the sim hits edm4hep::TrackerHit3DCollection* output_digi_hits = m_output_digi_hits.createAndPut(); for (const auto& input_sim_hit : *input_sim_hits) { @@ -105,8 +103,6 @@ StatusCode VTXdigitizer::execute(const EventContext&) const { simHitGlobalPositionVector = oldPosOnSurf ; } - else - ++nDismissedHits; } } From a999d24ad1a9a65f82c93a84a11d1db553f932a8 Mon Sep 17 00:00:00 2001 From: Brieuc Francois Date: Thu, 8 Aug 2024 09:42:11 +0200 Subject: [PATCH 03/14] Transformer to create tracks from gen particles (#21) * Transformer to create tracks from gen particles * Move away from BaseClass_t * Adapt to the new way Transformer work * Migrate to IOSvc * [PlotTrackHitResiduals] Remove overflow bin and use RootHistSvc * [TracksFromGenParticles] Fix tests * [PlotTrackHitResiduals] Set histogram name * Fix tests following removal of GaudiAlg * Fix tests following removal of GaudiAlg --- ARCdigi/test/runARCdigitizer.py | 5 -- DCHdigi/test/runDCHsimpleDigitizer.py | 5 -- .../test/runDCHsimpleDigitizerExtendedEdm.py | 5 -- Tracking/CMakeLists.txt | 8 ++ Tracking/components/PlotTrackHitResiduals.cpp | 81 +++++++++++++++++ .../components/TracksFromGenParticles.cpp | 90 +++++++++++++++++++ ...nGenFitTrackingOnSimplifiedDriftChamber.py | 5 -- Tracking/test/runTracksFromGenParticles.py | 50 +++++++++++ VTXdigi/test/runVTXdigitizer.py | 6 -- 9 files changed, 229 insertions(+), 26 deletions(-) create mode 100644 Tracking/components/PlotTrackHitResiduals.cpp create mode 100644 Tracking/components/TracksFromGenParticles.cpp create mode 100644 Tracking/test/runTracksFromGenParticles.py diff --git a/ARCdigi/test/runARCdigitizer.py b/ARCdigi/test/runARCdigitizer.py index 712a3bb..9ecc734 100644 --- a/ARCdigi/test/runARCdigitizer.py +++ b/ARCdigi/test/runARCdigitizer.py @@ -34,13 +34,8 @@ arc_digitizer.AuditExecute = True podiooutput.AuditExecute = True -from Configurables import EventCounter -event_counter = EventCounter('event_counter') -event_counter.Frequency = 1 - ApplicationMgr( TopAlg = [ - event_counter, podioinput, arc_digitizer, podiooutput diff --git a/DCHdigi/test/runDCHsimpleDigitizer.py b/DCHdigi/test/runDCHsimpleDigitizer.py index e16b382..d310c90 100644 --- a/DCHdigi/test/runDCHsimpleDigitizer.py +++ b/DCHdigi/test/runDCHsimpleDigitizer.py @@ -129,14 +129,9 @@ geantsim.AuditExecute = True out.AuditExecute = True -from Configurables import EventCounter -event_counter = EventCounter('event_counter') -event_counter.Frequency = 1 - from Configurables import ApplicationMgr ApplicationMgr( TopAlg = [ - event_counter, genAlg, hepmc_converter, geantsim, diff --git a/DCHdigi/test/runDCHsimpleDigitizerExtendedEdm.py b/DCHdigi/test/runDCHsimpleDigitizerExtendedEdm.py index 3d30271..4990c46 100644 --- a/DCHdigi/test/runDCHsimpleDigitizerExtendedEdm.py +++ b/DCHdigi/test/runDCHsimpleDigitizerExtendedEdm.py @@ -162,14 +162,9 @@ geantsim.AuditExecute = True out.AuditExecute = True -from Configurables import EventCounter -event_counter = EventCounter('event_counter') -event_counter.Frequency = 1 - from Configurables import ApplicationMgr ApplicationMgr( TopAlg = [ - event_counter, genAlg, hepmc_converter, geantsim, diff --git a/Tracking/CMakeLists.txt b/Tracking/CMakeLists.txt index f441d5c..617d1eb 100644 --- a/Tracking/CMakeLists.txt +++ b/Tracking/CMakeLists.txt @@ -3,11 +3,13 @@ set(PackageName Tracking) project(${PackageName}) #find_package(GenFit) +FIND_PACKAGE(MarlinUtil) #if (GenFit_FOUND) file(GLOB sources ${PROJECT_SOURCE_DIR}/src/*.cpp + ${PROJECT_SOURCE_DIR}/components/*.cpp ) file(GLOB headers @@ -26,6 +28,7 @@ gaudi_add_module(${PackageName} target_include_directories(${PackageName} PUBLIC $ $ + ${MarlinUtil_INCLUDE_DIRS} ) set_target_properties(${PackageName} PROPERTIES PUBLIC_HEADER "${headers}") @@ -44,4 +47,9 @@ install(TARGETS ${PackageName} ) install(FILES ${scripts} DESTINATION test) + +SET(test_name "test_TracksFromGenParticles") +ADD_TEST(NAME ${test_name} COMMAND k4run test/runTracksFromGenParticles.py) +set_test_env(${test_name}) + #endif() diff --git a/Tracking/components/PlotTrackHitResiduals.cpp b/Tracking/components/PlotTrackHitResiduals.cpp new file mode 100644 index 0000000..a32e6b9 --- /dev/null +++ b/Tracking/components/PlotTrackHitResiduals.cpp @@ -0,0 +1,81 @@ +// Gaudi +#include "Gaudi/Property.h" +#include "Gaudi/Accumulators/RootHistogram.h" +#include "Gaudi/Histograming/Sink/Utils.h" + +// edm4hep +#include "edm4hep/MCParticleCollection.h" +#include "edm4hep/TrackCollection.h" +#include "edm4hep/MCRecoTrackParticleAssociationCollection.h" +#include "edm4hep/SimTrackerHitCollection.h" + +// marlin +#include + +// ROOT +#include "TH1D.h" + +// k4FWCore +#include "k4FWCore/Consumer.h" + +#include + +/** @class PlotTrackHitDistances + * + * Gaudi consumer that generates a residual distribution (mm) by comparing the helix from Track AtIP and simHit position. + * This is intended to be used on tracks produced from gen particles i.e. which do not have real hits attached to them. + * + * @author Brieuc Francois + */ + +struct PlotTrackHitDistances final + : k4FWCore::Consumer { + PlotTrackHitDistances(const std::string& name, ISvcLocator* svcLoc) + : Consumer( + name, svcLoc, + { + KeyValues("InputSimTrackerHits", {"DCHCollection"}), + KeyValues("InputTracksFromGenParticlesAssociation", {"TracksFromGenParticlesAssociation"}), + }) {} + + void operator()(const edm4hep::SimTrackerHitCollection& simTrackerHits, const edm4hep::MCRecoTrackParticleAssociationCollection& trackParticleAssociations) const override { + + for (const auto& trackParticleAssociation : trackParticleAssociations) { + auto genParticle = trackParticleAssociation.getSim(); + auto track = trackParticleAssociation.getRec(); + edm4hep::TrackState trackStateAtIP; + bool found_trackStateAtIP = false; + for (const auto& trackState : track.getTrackStates()) { + if (trackState.location == edm4hep::TrackState::AtIP) { + trackStateAtIP = trackState; + found_trackStateAtIP = true; + break; + } + } + if (!found_trackStateAtIP) + throw std::runtime_error("No track state defined AtIP, exiting!"); + + // Build an helix out of the trackState + auto helixFromTrack = HelixClass_double(); + helixFromTrack.Initialize_Canonical(trackStateAtIP.phi, trackStateAtIP.D0, trackStateAtIP.Z0, trackStateAtIP.omega, trackStateAtIP.tanLambda, m_Bz); + + // Fill the histogram with residuals for hits attached to the same gen particle + for (const auto& simTrackerHit : simTrackerHits) { + auto simTrackerHitgenParticle = simTrackerHit.getParticle(); + if (simTrackerHitgenParticle.getObjectID() == genParticle.getObjectID()) { + double simTrackerHitPosition[] = {simTrackerHit.x(), simTrackerHit.y(), simTrackerHit.z()}; + double distances[3]; + helixFromTrack.getDistanceToPoint(simTrackerHitPosition, distances); + // Distance[0] - distance in R-Phi plane, Distance[1] - distance along Z axis, Distance[2] - 3D distance + ++m_residualHist[distances[2]]; + } + } + } + return; + } + Gaudi::Property m_Bz{this, "Bz", 2., "Z component of the (assumed constant) magnetic field in Tesla."}; + mutable Gaudi::Accumulators::Histogram<1> m_residualHist{this, "track_hits_distance_closest_approach", "Track-hit Distances", {100, 0, 1, "Distance [mm];Entries"}}; + +}; + +DECLARE_COMPONENT(PlotTrackHitDistances) diff --git a/Tracking/components/TracksFromGenParticles.cpp b/Tracking/components/TracksFromGenParticles.cpp new file mode 100644 index 0000000..af03cb8 --- /dev/null +++ b/Tracking/components/TracksFromGenParticles.cpp @@ -0,0 +1,90 @@ +#include "Gaudi/Property.h" + +// edm4hep +#include "edm4hep/MCParticleCollection.h" +#include "edm4hep/TrackCollection.h" +#include "edm4hep/MCRecoTrackParticleAssociationCollection.h" + +// marlin +#include + +// k4FWCore +#include "k4FWCore/Transformer.h" + +#include + +/** @class TracksFromGenParticles + * + * Gaudi transformer that builds an edm4hep::TrackCollection out of an edm4hep::MCParticleCollection. + * It just builds an helix out of the genParticle position, momentum, charge and user defined z component of the (constant) magnetic field. + * From this helix, different edm4hep::TrackStates (AtIP, AtFirstHit, AtLastHit and AtCalorimeter) are defined. #FIXME for now these trackstates are dummy (copies of the same helix parameters) + * This is meant to enable technical development needing edm4hep::Track and performance studies where having generator based trackis is a reasonable approximation. + * Possible inprovement: + * - Retrieve magnetic field from geometry: const DD4hep::Field::MagneticField& magneticField = detector.field(); DD4hep::DDRec::Vector3D field = magneticField.magneticField(point); + * - Properly define different trackStates + * + * @author Brieuc Francois + */ + +struct TracksFromGenParticles final + : k4FWCore::MultiTransformer(const edm4hep::MCParticleCollection&)> { + TracksFromGenParticles(const std::string& name, ISvcLocator* svcLoc) + : MultiTransformer( + name, svcLoc, + {KeyValues("InputGenParticles", {"MCParticles"})}, + {KeyValues("OutputTracks", {"TracksFromGenParticles"}), + KeyValues("OutputMCRecoTrackParticleAssociation", {"TracksFromGenParticlesAssociation"})}) { + } + +std::tuple operator()(const edm4hep::MCParticleCollection& genParticleColl) const override { + + auto outputTrackCollection = edm4hep::TrackCollection(); + auto MCRecoTrackParticleAssociationCollection = edm4hep::MCRecoTrackParticleAssociationCollection(); + + for (const auto& genParticle : genParticleColl) { + debug() << "Particle decayed in tracker: " << genParticle.isDecayedInTracker() << endmsg; + debug() << genParticle << endmsg; + + // Building an helix out of MCParticle properties and B field + auto helixFromGenParticle = HelixClass_double(); + double genParticleVertex[] = {genParticle.getVertex().x, genParticle.getVertex().y, genParticle.getVertex().z}; + double genParticleMomentum[] = {genParticle.getMomentum().x, genParticle.getMomentum().y, genParticle.getMomentum().z}; + helixFromGenParticle.Initialize_VP(genParticleVertex, genParticleMomentum, genParticle.getCharge(), m_Bz); + + // Setting the track and trackStates properties + // #FIXME for now, the different trackStates are dummy + auto trackFromGen = edm4hep::MutableTrack(); + auto trackState_IP = edm4hep::TrackState {}; + trackState_IP.location = edm4hep::TrackState::AtIP; + trackState_IP.D0 = helixFromGenParticle.getD0(); + trackState_IP.phi = helixFromGenParticle.getPhi0(); + trackState_IP.omega = helixFromGenParticle.getOmega(); + trackState_IP.Z0 = helixFromGenParticle.getZ0(); + trackState_IP.tanLambda = helixFromGenParticle.getTanLambda(); + trackFromGen.addToTrackStates(trackState_IP); + auto trackState_AtFirstHit = edm4hep::TrackState(trackState_IP); + trackState_AtFirstHit.location = edm4hep::TrackState::AtFirstHit; + trackFromGen.addToTrackStates(trackState_AtFirstHit); + auto trackState_AtLastHit = edm4hep::TrackState(trackState_IP); + trackState_AtFirstHit.location = edm4hep::TrackState::AtLastHit; + trackFromGen.addToTrackStates(trackState_AtLastHit); + auto trackState_AtCalorimeter = edm4hep::TrackState(trackState_IP); + trackState_AtFirstHit.location = edm4hep::TrackState::AtCalorimeter; + trackFromGen.addToTrackStates(trackState_AtCalorimeter); + + //debug() << trackFromGen << endmsg; + outputTrackCollection.push_back(trackFromGen); + + // Building the association between tracks and genParticles + auto MCRecoTrackParticleAssociation = edm4hep::MutableMCRecoTrackParticleAssociation(); + MCRecoTrackParticleAssociation.setRec(trackFromGen); + MCRecoTrackParticleAssociation.setSim(genParticle); + MCRecoTrackParticleAssociationCollection.push_back(MCRecoTrackParticleAssociation); + } + return std::make_tuple(std::move(outputTrackCollection), std::move(MCRecoTrackParticleAssociationCollection)); + } + + Gaudi::Property m_Bz{this, "Bz", 2., "Z component of the (assumed constant) magnetic field in Tesla."}; +}; + +DECLARE_COMPONENT(TracksFromGenParticles) diff --git a/Tracking/test/runGenFitTrackingOnSimplifiedDriftChamber.py b/Tracking/test/runGenFitTrackingOnSimplifiedDriftChamber.py index e726835..1427308 100644 --- a/Tracking/test/runGenFitTrackingOnSimplifiedDriftChamber.py +++ b/Tracking/test/runGenFitTrackingOnSimplifiedDriftChamber.py @@ -163,14 +163,9 @@ geantsim.AuditExecute = True out.AuditExecute = True -from Configurables import EventCounter -event_counter = EventCounter('event_counter') -event_counter.Frequency = 1 - from Configurables import ApplicationMgr ApplicationMgr( TopAlg = [ - event_counter, genAlg, hepmc_converter, geantsim, diff --git a/Tracking/test/runTracksFromGenParticles.py b/Tracking/test/runTracksFromGenParticles.py new file mode 100644 index 0000000..8044b80 --- /dev/null +++ b/Tracking/test/runTracksFromGenParticles.py @@ -0,0 +1,50 @@ +from k4FWCore import ApplicationMgr +from Gaudi.Configuration import INFO, WARNING, DEBUG +import os + +if not os.path.isfile("ddsim_output_edm4hep.root"): + os.system("ddsim --enableGun --gun.distribution uniform --gun.energy '10*GeV' --gun.particle e- --numberOfEvents 100 --outputFile ddsim_output_edm4hep.root --random.enableEventSeed --random.seed 42 --compactFile $K4GEO/FCCee/IDEA/compact/IDEA_o1_v02/IDEA_o1_v02.xml") + +# Loading the output of the SIM step +from k4FWCore import IOSvc +io_svc = IOSvc("IOSvc") +io_svc.input = "ddsim_output_edm4hep.root" +io_svc.output = "tracks_from_genParticle_output.root" + +# Calling TracksFromGenParticles +from Configurables import TracksFromGenParticles +tracksFromGenParticles = TracksFromGenParticles("TracksFromGenParticles", + InputGenParticles = ["MCParticles"], + OutputTracks = ["TracksFromGenParticles"], + OutputMCRecoTrackParticleAssociation = ["TracksFromGenParticlesAssociation"], + Bz = 2.0, + OutputLevel = INFO) + +# produce a TH1 with distances between tracks and simTrackerHits +from Configurables import PlotTrackHitDistances, RootHistSvc +from Configurables import Gaudi__Histograming__Sink__Root as RootHistoSink +plotTrackHitDistances = PlotTrackHitDistances("PlotTrackHitDistances", + InputSimTrackerHits = ["CDCHHits"], + InputTracksFromGenParticlesAssociation = tracksFromGenParticles.OutputMCRecoTrackParticleAssociation, + Bz = 2.0) + +hps = RootHistSvc("HistogramPersistencySvc") +root_hist_svc = RootHistoSink("RootHistoSink") +root_hist_svc.FileName = "TrackHitDistances.root" + +# Set auditor service +from Configurables import AuditorSvc, ChronoAuditor +chra = ChronoAuditor() +audsvc = AuditorSvc() +audsvc.Auditors = [chra] +tracksFromGenParticles.AuditExecute = True +plotTrackHitDistances.AuditExecute = True + +from Configurables import EventDataSvc +ApplicationMgr( + TopAlg= [tracksFromGenParticles, plotTrackHitDistances], + EvtSel='NONE', + EvtMax=-1, + ExtSvc=[root_hist_svc, EventDataSvc("EventDataSvc"), audsvc], + StopOnSignal=True, +) diff --git a/VTXdigi/test/runVTXdigitizer.py b/VTXdigi/test/runVTXdigitizer.py index b217704..49d2031 100644 --- a/VTXdigi/test/runVTXdigitizer.py +++ b/VTXdigi/test/runVTXdigitizer.py @@ -268,16 +268,11 @@ geantsim.AuditExecute = True out.AuditExecute = True -from Configurables import EventCounter -event_counter = EventCounter('event_counter') -event_counter.Frequency = 1 - from Configurables import ApplicationMgr # # CLD # ApplicationMgr( # TopAlg = [ -# event_counter, # genAlg, # hepmc_converter, # geantsim, @@ -293,7 +288,6 @@ # IDEA ApplicationMgr( TopAlg = [ - event_counter, genAlg, hepmc_converter, geantsim, From 916e7fb09e66393ea4a221ea2c8ee707229ea930 Mon Sep 17 00:00:00 2001 From: Brieuc Francois Date: Thu, 8 Aug 2024 10:12:12 +0200 Subject: [PATCH 04/14] Vtx sim digi link (#28) * Add a Digi Sim link for VTX * Update VTX tests to IDEA v03 * Update VTX tests to IDEA v03 --- VTXdigi/include/VTXdigitizer.h | 3 +++ VTXdigi/src/VTXdigitizer.cpp | 8 ++++++++ VTXdigi/test/runVTXdigitizer.py | 7 ++++++- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/VTXdigi/include/VTXdigitizer.h b/VTXdigi/include/VTXdigitizer.h index 7e91170..e0cf0de 100644 --- a/VTXdigi/include/VTXdigitizer.h +++ b/VTXdigi/include/VTXdigitizer.h @@ -21,6 +21,7 @@ namespace edm4hep { using TrackerHit3DCollection = edm4hep::TrackerHitCollection; } // namespace edm4hep #endif +#include "edm4hep/TrackerHitSimTrackerHitLinkCollection.h" // DD4HEP #include "DD4hep/Detector.h" // for dd4hep::VolumeManager @@ -60,6 +61,8 @@ class VTXdigitizer : public Gaudi::Algorithm { mutable DataHandle m_input_sim_hits{"inputSimHits", Gaudi::DataHandle::Reader, this}; // Output digitized vertex hit collection name mutable DataHandle m_output_digi_hits{"outputDigiHits", Gaudi::DataHandle::Writer, this}; + // Output link between sim hits and digitized hits + mutable DataHandle m_output_sim_digi_link{"outputSimDigiAssociation", Gaudi::DataHandle::Writer, this}; // Detector name Gaudi::Property m_detectorName{this, "detectorName", "Vertex", "Name of the detector (default: Vertex)"}; diff --git a/VTXdigi/src/VTXdigitizer.cpp b/VTXdigi/src/VTXdigitizer.cpp index 1011d00..94b04d0 100644 --- a/VTXdigi/src/VTXdigitizer.cpp +++ b/VTXdigi/src/VTXdigitizer.cpp @@ -6,6 +6,7 @@ VTXdigitizer::VTXdigitizer(const std::string& aName, ISvcLocator* aSvcLoc) : Gaudi::Algorithm(aName, aSvcLoc), m_geoSvc("GeoSvc", "VTXdigitizer") { declareProperty("inputSimHits", m_input_sim_hits, "Input sim vertex hit collection name"); declareProperty("outputDigiHits", m_output_digi_hits, "Output digitized vertex hit collection name"); + declareProperty("outputSimDigiAssociation", m_output_sim_digi_link, "Output link between sim hits and digitized hits"); } VTXdigitizer::~VTXdigitizer() {} @@ -51,8 +52,10 @@ StatusCode VTXdigitizer::execute(const EventContext&) const { // Digitize the sim hits edm4hep::TrackerHit3DCollection* output_digi_hits = m_output_digi_hits.createAndPut(); + edm4hep::TrackerHitSimTrackerHitLinkCollection* output_sim_digi_link_col = m_output_sim_digi_link.createAndPut(); for (const auto& input_sim_hit : *input_sim_hits) { auto output_digi_hit = output_digi_hits->create(); + auto output_sim_digi_link = output_sim_digi_link_col->create(); // smear the hit position: need to go in the local frame of the silicon sensor to smear in the direction along/perpendicular to the stave @@ -167,6 +170,11 @@ StatusCode VTXdigitizer::execute(const EventContext&) const { output_digi_hit.setTime(input_sim_hit.getTime() + m_gauss_time.shoot()); output_digi_hit.setCellID(cellID); + + // Set the link between sim and digi hit + output_sim_digi_link.setFrom(output_digi_hit); + output_sim_digi_link.setTo(input_sim_hit); + } return StatusCode::SUCCESS; } diff --git a/VTXdigi/test/runVTXdigitizer.py b/VTXdigi/test/runVTXdigitizer.py index 49d2031..943542e 100644 --- a/VTXdigi/test/runVTXdigitizer.py +++ b/VTXdigi/test/runVTXdigitizer.py @@ -66,7 +66,7 @@ path_to_detector = os.environ.get("K4GEO", "") # Previously used "FCCDETECTORS" print(path_to_detector) detectors_to_use=[ - 'FCCee/IDEA/compact/IDEA_o1_v02/IDEA_o1_v02.xml', + 'FCCee/IDEA/compact/IDEA_o1_v03/IDEA_o1_v03.xml', # 'FCCee/CLD/compact/CLD_o2_v05/CLD_o2_v05.xml', ] # prefix all xmls with path_to_detector @@ -162,6 +162,7 @@ vtxb_digitizer = VTXdigitizer("VTXBdigitizer", inputSimHits = SimG4SaveTrackerHitsB.SimTrackHits.Path, outputDigiHits = SimG4SaveTrackerHitsB.SimTrackHits.Path.replace("sim", "digi"), + outputSimDigiAssociation = SimG4SaveTrackerHitsB.SimTrackHits.Path.replace("simTrackerHits", "simDigiAssociation"), detectorName = "Vertex", readoutName = "VertexBarrelCollection", xResolution = vertexBarrelResolution_x, @@ -174,6 +175,7 @@ vtxe_digitizer = VTXdigitizer("VTXEdigitizer", inputSimHits = SimG4SaveTrackerHitsE.SimTrackHits.Path, outputDigiHits = SimG4SaveTrackerHitsE.SimTrackHits.Path.replace("sim", "digi"), + outputSimDigiAssociation = SimG4SaveTrackerHitsE.SimTrackHits.Path.replace("simTrackerHits", "simDigiAssociation"), detectorName = "Vertex", readoutName = "VertexEndcapCollection", xResolution = vertexEndcapResolution_x, @@ -188,6 +190,7 @@ vtxib_digitizer = VTXdigitizer("VTXIBdigitizer", inputSimHits = SimG4SaveTrackerHitsIB.SimTrackHits.Path, outputDigiHits = SimG4SaveTrackerHitsIB.SimTrackHits.Path.replace("sim", "digi"), + outputSimDigiAssociation = SimG4SaveTrackerHitsIB.SimTrackHits.Path.replace("simTrackerHits", "simDigiAssociation"), detectorName = "Vertex", readoutName = "VTXIBCollection", xResolution = innerVertexResolution_x, # mm, r-phi direction @@ -200,6 +203,7 @@ vtxob_digitizer = VTXdigitizer("VTXOBdigitizer", inputSimHits = SimG4SaveTrackerHitsOB.SimTrackHits.Path, outputDigiHits = SimG4SaveTrackerHitsOB.SimTrackHits.Path.replace("sim", "digi"), + outputSimDigiAssociation = SimG4SaveTrackerHitsOB.SimTrackHits.Path.replace("simTrackerHits", "simDigiAssociation"), detectorName = "Vertex", readoutName = "VTXOBCollection", xResolution = outerVertexResolution_x, # mm, r-phi direction @@ -212,6 +216,7 @@ vtxd_digitizer = VTXdigitizer("VTXDdigitizer", inputSimHits = SimG4SaveTrackerHitsD.SimTrackHits.Path, outputDigiHits = SimG4SaveTrackerHitsD.SimTrackHits.Path.replace("sim", "digi"), + outputSimDigiAssociation = SimG4SaveTrackerHitsD.SimTrackHits.Path.replace("simTrackerHits", "simDigiAssociation"), detectorName = "Vertex", readoutName = "VTXDCollection", xResolution = outerVertexResolution_x, # mm, r direction From a2cd39e07eeb3520fb17902d674ba700a786d593 Mon Sep 17 00:00:00 2001 From: jmcarcell Date: Fri, 6 Sep 2024 22:14:25 +0200 Subject: [PATCH 05/14] Add a Key4hepConfig file --- cmake/Key4hepConfig.cmake | 84 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 cmake/Key4hepConfig.cmake diff --git a/cmake/Key4hepConfig.cmake b/cmake/Key4hepConfig.cmake new file mode 100644 index 0000000..1309ed9 --- /dev/null +++ b/cmake/Key4hepConfig.cmake @@ -0,0 +1,84 @@ +macro(key4hep_set_compiler_flags) + if (DEFINED KEY4HEP_SET_COMPILER_FLAGS AND NOT KEY4HEP_SET_COMPILER_FLAGS) + return() + endif() + + set(COMPILER_FLAGS "-fPIC -Wall -Wextra -Wpedantic -Wshadow -Wdeprecated") + + if(CMAKE_CXX_COMPILER_ID MATCHES "^(Apple)?Clang$") + set(COMPILER_FLAGS "${COMPILER_FLAGS} -Winconsistent-missing-override -Wheader-hygiene -fcolor-diagnostics") + elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") + set(COMPILER_FLAGS "${COMPILER_FLAGS} -fdiagnostics-color=always") + endif() + + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMPILER_FLAGS}") + +endmacro() + +macro(key4hep_set_build_type) + + # For ccmake and cmake-gui + set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS + "None" "Debug" "Release" "MinSizeRel" "RelWithDebInfo") + + if(NOT CMAKE_CONFIGURATION_TYPES) + if(NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE RelWithDebInfo + CACHE STRING "Choose the type of build, options are: None, Release, MinSizeRel, Debug, RelWithDebInfo (default)" + FORCE + ) + else() + set(CMAKE_BUILD_TYPE "${CMAKE_BUILD_TYPE}" + CACHE STRING "Choose the type of build, options are: None, Release, MinSizeRel, Debug, RelWithDebInfo (default)" + FORCE + ) + endif() + endif() +endmacro() + +macro(key4hep_set_cxx_standard_and_extensions) + set(CMAKE_CXX_STANDARD 20 CACHE STRING "") + + if(NOT CMAKE_CXX_STANDARD MATCHES "20|23") + message(FATAL_ERROR "Unsupported C++ standard: ${CMAKE_CXX_STANDARD}, supported values are 20 and 23") + endif() + + set(CMAKE_CXX_STANDARD_REQUIRED ON) + set(CMAKE_CXX_EXTENSIONS OFF) + +endmacro() + +macro(key4hep_set_rpath) + # When building, don't use the install RPATH already (but later on when installing) + set(CMAKE_SKIP_BUILD_RPATH FALSE) # don't skip the full RPATH for the build tree + set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE) # use always the build RPATH for the build tree + set(CMAKE_MACOSX_RPATH TRUE) # use RPATH for MacOSX + set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) # point to directories outside the build tree to the install RPATH + + # Check whether to add RPATH to the installation (the build tree always has the RPATH enabled) + if(APPLE) + set(CMAKE_INSTALL_NAME_DIR "@rpath") + set(CMAKE_INSTALL_RPATH "@loader_path/../lib") # self relative LIBDIR + # the RPATH to be used when installing, but only if it's not a system directory + list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib" isSystemDir) + if("${isSystemDir}" STREQUAL "-1") + set(CMAKE_INSTALL_RPATH "@loader_path/../lib") + endif() + elseif(DEFINED KEY4HEP_SET_RPATH AND NOT KEY4HEP_SET_RPATH) + set(CMAKE_SKIP_INSTALL_RPATH TRUE) # skip the full RPATH for the install tree + else() + set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${LIBDIR}") # install LIBDIR + # the RPATH to be used when installing, but only if it's not a system directory + list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib" isSystemDir) + if("${isSystemDir}" STREQUAL "-1") + set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${LIBDIR}") + endif() + endif() +endmacro() + +################################################### + +key4hep_set_compiler_flags() +key4hep_set_build_type() +key4hep_set_cxx_standard_and_extensions() +key4hep_set_rpath() From 3558244bf8bc6386e76512f35ebdcd6006ba1475 Mon Sep 17 00:00:00 2001 From: Juan Miguel Carceller <22276694+jmcarcell@users.noreply.github.com> Date: Sat, 7 Sep 2024 09:11:05 +0200 Subject: [PATCH 06/14] Remove the old key4hep nightlies workflow (#30) --- .github/workflows/test.yml | 43 -------------------------------------- 1 file changed, 43 deletions(-) delete mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index 661a1f9..0000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: linux - -on: [push, pull_request] - -jobs: - test: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - SETUP: ['/cvmfs/sw-nightlies.hsf.org/key4hep/setup.sh'] - steps: - - uses: actions/checkout@v2 - - uses: cvmfs-contrib/github-action-cvmfs@v2 - - name: Start container - run: | - docker run -it --name CI_container -v ${GITHUB_WORKSPACE}:/Package -v /cvmfs:/cvmfs:shared -d ghcr.io/aidasoft/centos7:latest /bin/bash - - name: CMake Configure - run: | - docker exec CI_container /bin/bash -c 'cd Package;\ - mkdir -p build install;\ - source ${{ matrix.SETUP }};\ - cd build;\ - cmake -DCMAKE_INSTALL_PREFIX=../install -DCMAKE_CXX_STANDARD=17 -DCMAKE_CXX_FLAGS=" -fdiagnostics-color=always " -G Ninja ..;' - - name: Compile - run: | - docker exec CI_container /bin/bash -c 'cd ./Package;\ - source ${{ matrix.SETUP }};\ - cd build;\ - ninja -k0;' - - name: Install - run: | - docker exec CI_container /bin/bash -c 'cd ./Package;\ - source ${{ matrix.SETUP }};\ - cd build;\ - ninja -k0 install;' - - name: Test - run: | - docker exec CI_container /bin/bash -c 'cd ./Package;\ - source ${{ matrix.SETUP }};\ - cd build;\ - ninja -k0 && ctest --output-on-failure;' - From dc0307b475a70ee9e811f2ae93198543e046a721 Mon Sep 17 00:00:00 2001 From: jmcarcell Date: Mon, 9 Sep 2024 21:57:44 +0200 Subject: [PATCH 07/14] Update Key4hepConfig.cmake with fixes from https://github.com/key4hep/key4hep-dev-utils/pull/7 --- cmake/Key4hepConfig.cmake | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/cmake/Key4hepConfig.cmake b/cmake/Key4hepConfig.cmake index 1309ed9..6dd524a 100644 --- a/cmake/Key4hepConfig.cmake +++ b/cmake/Key4hepConfig.cmake @@ -1,7 +1,8 @@ +# Do not edit this file, it will be overwritten! +# The template file can be found in +# https://github.com/key4hep/key4hep-dev-utils/blob/main/defaults/cmake/Key4hepConfig.cmake + macro(key4hep_set_compiler_flags) - if (DEFINED KEY4HEP_SET_COMPILER_FLAGS AND NOT KEY4HEP_SET_COMPILER_FLAGS) - return() - endif() set(COMPILER_FLAGS "-fPIC -Wall -Wextra -Wpedantic -Wshadow -Wdeprecated") @@ -11,7 +12,10 @@ macro(key4hep_set_compiler_flags) set(COMPILER_FLAGS "${COMPILER_FLAGS} -fdiagnostics-color=always") endif() - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMPILER_FLAGS}") + if (DEFINED KEY4HEP_SET_COMPILER_FLAGS AND NOT KEY4HEP_SET_COMPILER_FLAGS) + else() + set(CMAKE_CXX_FLAGS "${COMPILER_FLAGS} ${CMAKE_CXX_FLAGS}") + endif() endmacro() From 68176ff5ff9b114d71a013d954a40d24cae3f61c Mon Sep 17 00:00:00 2001 From: Juan Miguel Carceller <22276694+jmcarcell@users.noreply.github.com> Date: Tue, 10 Sep 2024 20:46:17 +0200 Subject: [PATCH 08/14] Use the Key4hepConfig flag to set the standard, compiler flags and rpath magic (#32) --- CMakeLists.txt | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 368451e..81c9bc2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,35 +23,9 @@ find_package(k4FWCore) find_package(Gaudi) #--------------------------------------------------------------- +include(cmake/Key4hepConfig.cmake) include(GNUInstallDirs) -# Set up C++ Standard -# ``-DCMAKE_CXX_STANDARD=`` when invoking CMake -set(CMAKE_CXX_STANDARD 17 CACHE STRING "") - -if(NOT CMAKE_CXX_STANDARD MATCHES "14|17|20") - message(FATAL_ERROR "Unsupported C++ standard: ${CMAKE_CXX_STANDARD}") -endif() - -# use, i.e. don't skip the full RPATH for the build tree -set(CMAKE_SKIP_BUILD_RPATH FALSE) - -# when building, don't use the install RPATH already -# (but later on when installing) -set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE) - -set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib") - -# add the automatically determined parts of the RPATH -# which point to directories outside the build tree to the install RPATH -set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) - -# the RPATH to be used when installing, but only if it's not a system directory -list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib" isSystemDir) -if("${isSystemDir}" STREQUAL "-1") - set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib") -endif("${isSystemDir}" STREQUAL "-1") - include(CTest) function(set_test_env _testname) set_property(TEST ${test_name} APPEND PROPERTY ENVIRONMENT "ROOT_INCLUDE_PATH=$<$:$/../include>:$<$:$/../include>:$ENV{ROOT_INCLUDE_PATH}") From e15a14feaef892b6a6eec2408598ed0b112e2d64 Mon Sep 17 00:00:00 2001 From: Armin Ilg Date: Tue, 24 Sep 2024 11:44:05 +0200 Subject: [PATCH 09/14] Update to IDEA_o1_v03 vertex and ability to specify resolution per layer (#33) * Update to IDEA_o1_v03 vertex and ability to specify resolution per layer * Add check that cellID encoder field contains layer id, add silicon wrapper for IDEA --- VTXdigi/include/VTXdigitizer.h | 16 +-- VTXdigi/src/VTXdigitizer.cpp | 58 +++++++---- VTXdigi/test/runVTXdigitizer.py | 174 +++++++++++++++----------------- 3 files changed, 127 insertions(+), 121 deletions(-) diff --git a/VTXdigi/include/VTXdigitizer.h b/VTXdigi/include/VTXdigitizer.h index e0cf0de..84515e5 100644 --- a/VTXdigi/include/VTXdigitizer.h +++ b/VTXdigi/include/VTXdigitizer.h @@ -30,11 +30,13 @@ namespace edm4hep { #include "DDSegmentation/BitFieldCoder.h" +#include + /** @class VTXdigitizer * * Algorithm for creating digitized (meaning 'reconstructed' for now) vertex detector hits (edm4hep::TrackerHit3D) from Geant4 hits (edm4hep::SimTrackerHit). * - * @author Brieuc Francois + * @author Brieuc Francois, Armin Ilg * @date 2023-03 * */ @@ -76,13 +78,13 @@ class VTXdigitizer : public Gaudi::Algorithm { dd4hep::VolumeManager m_volman; // x resolution in um - FloatProperty m_x_resolution{this, "xResolution", 0.1, "Spatial resolution in the x direction [um] (r-phi direction in barrel, z direction in disks)"}; + Gaudi::Property> m_x_resolution{this, "xResolution", {0.1}, "Spatial resolutions in the x direction per layer [um] (r-phi direction in barrel, z direction in disks)"}; // y resolution in um - FloatProperty m_y_resolution{this, "yResolution", 0.1, "Spatial resolution in the y direction [um] (r direction in barrel, r-phi direction in disks)"}; + Gaudi::Property> m_y_resolution{this, "yResolution", {0.1}, "Spatial resolutions in the y direction per layer [um] (r direction in barrel, r-phi direction in disks)"}; // t resolution in ns - FloatProperty m_t_resolution{this, "tResolution", 0.1, "Time resolution [ns]"}; + Gaudi::Property> m_t_resolution{this, "tResolution", {0.1}, "Time resolutions per layer [ns]"}; // Surface manager used to project hits onto sensitive surface with forceHitsOntoSurface argument mutable const dd4hep::rec::SurfaceMap* _map; @@ -94,7 +96,7 @@ class VTXdigitizer : public Gaudi::Algorithm { IRndmGenSvc* m_randSvc; // Gaussian random number generator used for smearing - Rndm::Numbers m_gauss_x; - Rndm::Numbers m_gauss_y; - Rndm::Numbers m_gauss_time; + std::vector m_gauss_x_vec; + std::vector m_gauss_y_vec; + std::vector m_gauss_t_vec; }; diff --git a/VTXdigi/src/VTXdigitizer.cpp b/VTXdigi/src/VTXdigitizer.cpp index 94b04d0..ff6d35a 100644 --- a/VTXdigi/src/VTXdigitizer.cpp +++ b/VTXdigi/src/VTXdigitizer.cpp @@ -17,17 +17,29 @@ StatusCode VTXdigitizer::initialize() { error() << "Couldn't get RndmGenSvc!" << endmsg; return StatusCode::FAILURE; } - if (m_gauss_x.initialize(m_randSvc, Rndm::Gauss(0., m_x_resolution)).isFailure()) { - error() << "Couldn't initialize RndmGenSvc!" << endmsg; - return StatusCode::FAILURE; + + m_gauss_x_vec.resize(m_x_resolution.size()); + for (size_t i = 0; i < m_x_resolution.size(); ++i) { + if (m_gauss_x_vec[i].initialize(m_randSvc, Rndm::Gauss(0., m_x_resolution[i])).isFailure()) { + error() << "Couldn't initialize RndmGenSvc!" << endmsg; + return StatusCode::FAILURE; + } } - if (m_gauss_y.initialize(m_randSvc, Rndm::Gauss(0., m_y_resolution)).isFailure()) { - error() << "Couldn't initialize RndmGenSvc!" << endmsg; - return StatusCode::FAILURE; + + m_gauss_y_vec.resize(m_y_resolution.size()); + for (size_t i = 0; i < m_y_resolution.size(); ++i) { + if (m_gauss_y_vec[i].initialize(m_randSvc, Rndm::Gauss(0., m_y_resolution[i])).isFailure()) { + error() << "Couldn't initialize RndmGenSvc!" << endmsg; + return StatusCode::FAILURE; + } } - if (m_gauss_time.initialize(m_randSvc, Rndm::Gauss(0., m_t_resolution)).isFailure()) { - error() << "Couldn't initialize RndmGenSvc!" << endmsg; - return StatusCode::FAILURE; + + m_gauss_t_vec.resize(m_t_resolution.size()); + for (size_t i = 0; i < m_t_resolution.size(); ++i) { + if (m_gauss_t_vec[i].initialize(m_randSvc, Rndm::Gauss(0., m_t_resolution[i])).isFailure()) { + error() << "Couldn't initialize RndmGenSvc!" << endmsg; + return StatusCode::FAILURE; + } } // check if readout exists @@ -39,6 +51,13 @@ StatusCode VTXdigitizer::initialize() { // set the cellID decoder m_decoder = m_geoSvc->getDetector()->readout(m_readoutName).idSpec().decoder(); // Can be used to access e.g. layer index: m_decoder->get(cellID, "layer"), + if (m_decoder->fieldDescription().find("layer") == std::string::npos){ + error() + << " Readout " << m_readoutName << " does not contain layer id!" + << endmsg; + return StatusCode::FAILURE; + } + // retrieve the volume manager m_volman = m_geoSvc->getDetector()->volumeManager(); @@ -126,22 +145,21 @@ StatusCode VTXdigitizer::execute(const EventContext&) const { // Smear the hit in the local sensor coordinates double digiHitLocalPosition[3]; - if (m_readoutName == "VTXIBCollection" || - m_readoutName == "VTXOBCollection" || - m_readoutName == "VertexBarrelCollection" || + int iLayer = m_decoder->get(cellID, "layer"); + debug() << "readout: " << m_readoutName << ", layer id: " << iLayer << endmsg; + if (m_readoutName == "VertexBarrelCollection" || m_readoutName == "SiWrBCollection") { // In barrel, the sensor box is along y-z digiHitLocalPosition[0] = simHitLocalPositionVector.x(); - digiHitLocalPosition[1] = simHitLocalPositionVector.y() + m_gauss_x.shoot() * dd4hep::mm; - digiHitLocalPosition[2] = simHitLocalPositionVector.z() + m_gauss_y.shoot() * dd4hep::mm; - } else if (m_readoutName == "VTXDCollection" || - m_readoutName == "VertexEndcapCollection" || + digiHitLocalPosition[1] = simHitLocalPositionVector.y() + m_gauss_x_vec[iLayer].shoot() * dd4hep::mm; + digiHitLocalPosition[2] = simHitLocalPositionVector.z() + m_gauss_y_vec[iLayer].shoot() * dd4hep::mm; + } else if (m_readoutName == "VertexEndcapCollection" || m_readoutName == "SiWrDCollection") { // In the disks, the sensor box is already in x-y - digiHitLocalPosition[0] = simHitLocalPositionVector.x() + m_gauss_x.shoot() * dd4hep::mm; - digiHitLocalPosition[1] = simHitLocalPositionVector.y() + m_gauss_y.shoot() * dd4hep::mm; + digiHitLocalPosition[0] = simHitLocalPositionVector.x() + m_gauss_x_vec[iLayer].shoot() * dd4hep::mm; + digiHitLocalPosition[1] = simHitLocalPositionVector.y() + m_gauss_y_vec[iLayer].shoot() * dd4hep::mm; digiHitLocalPosition[2] = simHitLocalPositionVector.z(); } else { error() - << "VTX readout name (m_readoutName) unknown!" + << "VTX readout name (m_readoutName) unknown or xResolution/yResolution/tResolution not defining all detector layer resolutions!" << endmsg; return StatusCode::FAILURE; } @@ -167,7 +185,7 @@ StatusCode VTXdigitizer::execute(const EventContext&) const { output_digi_hit.setPosition(digiHitGlobalPositionVector); // Apply time smearing - output_digi_hit.setTime(input_sim_hit.getTime() + m_gauss_time.shoot()); + output_digi_hit.setTime(input_sim_hit.getTime() + m_gauss_t_vec[iLayer].shoot()); output_digi_hit.setCellID(cellID); diff --git a/VTXdigi/test/runVTXdigitizer.py b/VTXdigi/test/runVTXdigitizer.py index 943542e..bbf65da 100644 --- a/VTXdigi/test/runVTXdigitizer.py +++ b/VTXdigi/test/runVTXdigitizer.py @@ -16,22 +16,22 @@ ################## Vertex sensor resolutions # IDEA -innerVertexResolution_x = 0.003 # [mm], assume 5 µm resolution for ARCADIA sensor -innerVertexResolution_y = 0.003 # [mm], assume 5 µm resolution for ARCADIA sensor +innerVertexResolution_x = 0.003 # [mm], assume 3 µm resolution for ARCADIA sensor +innerVertexResolution_y = 0.003 # [mm], assume 3 µm resolution for ARCADIA sensor innerVertexResolution_t = 1000 # [ns] outerVertexResolution_x = 0.050/math.sqrt(12) # [mm], assume ATLASPix3 sensor with 50 µm pitch outerVertexResolution_y = 0.150/math.sqrt(12) # [mm], assume ATLASPix3 sensor with 150 µm pitch outerVertexResolution_t = 1000 # [ns] # CLD -vertexBarrelResolution_x = 0.003 # [mm], assume 5 µm resolution -vertexBarrelResolution_y = 0.003 # [mm], assume 5 µm resolution +vertexBarrelResolution_x = 0.003 # [mm], assume 3 µm resolution +vertexBarrelResolution_y = 0.003 # [mm], assume 3 µm resolution vertexBarrelResolution_t = 1000 # [ns] -vertexEndcapResolution_x = 0.003 # [mm], assume 5 µm resolution -vertexEndcapResolution_y = 0.003 # [mm], assume 5 µm resolution +vertexEndcapResolution_x = 0.003 # [mm], assume 3 µm resolution +vertexEndcapResolution_y = 0.003 # [mm], assume 3 µm resolution vertexEndcapResolution_t = 1000 # [ns] - +# IDEA silicon wrapper siWrapperResolution_x = 0.050/math.sqrt(12) # [mm] siWrapperResolution_y = 1.0/math.sqrt(12) # [mm] siWrapperResolution_t = 0.040 # [ns], assume 40 ps timing resolution for a single layer -> Should lead to <30 ps resolution when >1 hit @@ -113,21 +113,18 @@ from Configurables import SimG4SaveTrackerHits ### CLD -SimG4SaveTrackerHitsB = SimG4SaveTrackerHits("SimG4SaveTrackerHitsB", readoutName="VertexBarrelCollection") -SimG4SaveTrackerHitsB.SimTrackHits.Path = "VTXB_simTrackerHits" +# SimG4SaveTrackerHitsB = SimG4SaveTrackerHits("SimG4SaveTrackerHitsB", readoutName="VertexBarrelCollection") +# SimG4SaveTrackerHitsB.SimTrackHits.Path = "VTXB_simTrackerHits" -SimG4SaveTrackerHitsE = SimG4SaveTrackerHits("SimG4SaveTrackerHitsE", readoutName="VertexEndcapCollection") -SimG4SaveTrackerHitsE.SimTrackHits.Path = "VTXE_simTrackerHits" +# SimG4SaveTrackerHitsE = SimG4SaveTrackerHits("SimG4SaveTrackerHitsE", readoutName="VertexEndcapCollection") +# SimG4SaveTrackerHitsE.SimTrackHits.Path = "VTXE_simTrackerHits" ### IDEA -SimG4SaveTrackerHitsIB = SimG4SaveTrackerHits("SimG4SaveTrackerHitsIB", readoutName="VTXIBCollection") -SimG4SaveTrackerHitsIB.SimTrackHits.Path = "VTXIB_simTrackerHits" - -SimG4SaveTrackerHitsOB = SimG4SaveTrackerHits("SimG4SaveTrackerHitsOB", readoutName="VTXOBCollection") -SimG4SaveTrackerHitsOB.SimTrackHits.Path = "VTXOB_simTrackerHits" +SimG4SaveTrackerHitsB = SimG4SaveTrackerHits("SimG4SaveTrackerHitsB", readoutName="VertexBarrelCollection") +SimG4SaveTrackerHitsB.SimTrackHits.Path = "VTXB_simTrackerHits" -SimG4SaveTrackerHitsD = SimG4SaveTrackerHits("SimG4SaveTrackerHitsD", readoutName="VTXDCollection") +SimG4SaveTrackerHitsD = SimG4SaveTrackerHits("SimG4SaveTrackerHitsD", readoutName="VertexEndcapCollection") SimG4SaveTrackerHitsD.SimTrackHits.Path = "VTXD_simTrackerHits" SimG4SaveTrackerHitsSiWrB = SimG4SaveTrackerHits("SimG4SaveTrackerHitsSiWrB", readoutName="SiWrBCollection") @@ -148,8 +145,8 @@ # IDEA geantsim = SimG4Alg("SimG4Alg", - outputs= [SimG4SaveTrackerHitsIB, SimG4SaveTrackerHitsOB, SimG4SaveTrackerHitsD, - #SimG4SaveTrackerHitsSiWrB, SimG4SaveTrackerHitsSiWrD, + outputs= [SimG4SaveTrackerHitsB, SimG4SaveTrackerHitsD, + SimG4SaveTrackerHitsSiWrB, SimG4SaveTrackerHitsSiWrD, #saveHistTool ], eventProvider=particle_converter, @@ -159,97 +156,86 @@ from Configurables import VTXdigitizer ### For CLD. Not working yet, SimG4 doesn't produce hits in CLD vertex yet -vtxb_digitizer = VTXdigitizer("VTXBdigitizer", +# cld_vtxb_digitizer = VTXdigitizer("VTXBdigitizer", +# inputSimHits = SimG4SaveTrackerHitsB.SimTrackHits.Path, +# outputDigiHits = SimG4SaveTrackerHitsB.SimTrackHits.Path.replace("sim", "digi"), +# outputSimDigiAssociation = SimG4SaveTrackerHitsB.SimTrackHits.Path.replace("simTrackerHits", "simDigiAssociation"), +# detectorName = "Vertex", +# readoutName = "VertexBarrelCollection", +# xResolutions = [vertexBarrelResolution_x, vertexBarrelResolution_x, vertexBarrelResolution_x, vertexBarrelResolution_x, vertexBarrelResolution_x, vertexBarrelResolution_x], +# yResolutions = [vertexBarrelResolution_y, vertexBarrelResolution_y, vertexBarrelResolution_y, vertexBarrelResolution_y, vertexBarrelResolution_y, vertexBarrelResolution_y], +# tResolutions = [vertexBarrelResolution_t, vertexBarrelResolution_t, vertexBarrelResolution_t, vertexBarrelResolution_t, vertexBarrelResolution_t, vertexBarrelResolution_t], +# forceHitsOntoSurface = False, +# OutputLevel = INFO +# ) + +# cld_vtxd_digitizer = VTXdigitizer("VTXDdigitizer", +# inputSimHits = SimG4SaveTrackerHitsE.SimTrackHits.Path, +# outputDigiHits = SimG4SaveTrackerHitsE.SimTrackHits.Path.replace("sim", "digi"), +# outputSimDigiAssociation = SimG4SaveTrackerHitsE.SimTrackHits.Path.replace("simTrackerHits", "simDigiAssociation"), +# detectorName = "Vertex", +# readoutName = "VertexEndcapCollection", +# xResolutions = [vertexEndcapResolution_x, vertexEndcapResolution_x, vertexEndcapResolution_x, vertexEndcapResolution_x, vertexEndcapResolution_x, vertexEndcapResolution_x], +# yResolutions = [vertexEndcapResolution_y, vertexEndcapResolution_y, vertexEndcapResolution_y, vertexEndcapResolution_y, vertexEndcapResolution_y, vertexEndcapResolution_y], +# tResolutions = [vertexEndcapResolution_t, vertexEndcapResolution_t, vertexEndcapResolution_t, vertexEndcapResolution_t, vertexEndcapResolution_t, vertexEndcapResolution_t], +# forceHitsOntoSurface = False, +# OutputLevel = INFO +# ) + + +### For IDEA +idea_vtxb_digitizer = VTXdigitizer("VTXBdigitizer", inputSimHits = SimG4SaveTrackerHitsB.SimTrackHits.Path, outputDigiHits = SimG4SaveTrackerHitsB.SimTrackHits.Path.replace("sim", "digi"), outputSimDigiAssociation = SimG4SaveTrackerHitsB.SimTrackHits.Path.replace("simTrackerHits", "simDigiAssociation"), detectorName = "Vertex", readoutName = "VertexBarrelCollection", - xResolution = vertexBarrelResolution_x, - yResolution = vertexBarrelResolution_y, - tResolution = vertexBarrelResolution_t, + xResolution = [innerVertexResolution_x, innerVertexResolution_x, innerVertexResolution_x, outerVertexResolution_x, outerVertexResolution_x], # mm, r-phi direction + yResolution = [innerVertexResolution_y, innerVertexResolution_y, innerVertexResolution_y, outerVertexResolution_y, outerVertexResolution_y], # mm, z direction + tResolution = [innerVertexResolution_t, innerVertexResolution_t, innerVertexResolution_t, outerVertexResolution_t, outerVertexResolution_t], # ns forceHitsOntoSurface = False, OutputLevel = INFO ) -vtxe_digitizer = VTXdigitizer("VTXEdigitizer", - inputSimHits = SimG4SaveTrackerHitsE.SimTrackHits.Path, - outputDigiHits = SimG4SaveTrackerHitsE.SimTrackHits.Path.replace("sim", "digi"), - outputSimDigiAssociation = SimG4SaveTrackerHitsE.SimTrackHits.Path.replace("simTrackerHits", "simDigiAssociation"), +idea_vtxd_digitizer = VTXdigitizer("VTXDdigitizer", + inputSimHits = SimG4SaveTrackerHitsD.SimTrackHits.Path, + outputDigiHits = SimG4SaveTrackerHitsD.SimTrackHits.Path.replace("sim", "digi"), + outputSimDigiAssociation = SimG4SaveTrackerHitsD.SimTrackHits.Path.replace("simTrackerHits", "simDigiAssociation"), detectorName = "Vertex", readoutName = "VertexEndcapCollection", - xResolution = vertexEndcapResolution_x, - yResolution = vertexEndcapResolution_y, - tResolution = vertexEndcapResolution_t, + xResolution = [outerVertexResolution_x, outerVertexResolution_x, outerVertexResolution_x], # mm, r direction + yResolution = [outerVertexResolution_y, outerVertexResolution_y, outerVertexResolution_y], # mm, phi direction + tResolution = [outerVertexResolution_t, outerVertexResolution_t, outerVertexResolution_t], # ns forceHitsOntoSurface = False, OutputLevel = INFO ) - -### For IDEA -vtxib_digitizer = VTXdigitizer("VTXIBdigitizer", - inputSimHits = SimG4SaveTrackerHitsIB.SimTrackHits.Path, - outputDigiHits = SimG4SaveTrackerHitsIB.SimTrackHits.Path.replace("sim", "digi"), - outputSimDigiAssociation = SimG4SaveTrackerHitsIB.SimTrackHits.Path.replace("simTrackerHits", "simDigiAssociation"), - detectorName = "Vertex", - readoutName = "VTXIBCollection", - xResolution = innerVertexResolution_x, # mm, r-phi direction - yResolution = innerVertexResolution_y, # mm, z direction - tResolution = innerVertexResolution_t, - forceHitsOntoSurface = False, - OutputLevel = INFO -) - -vtxob_digitizer = VTXdigitizer("VTXOBdigitizer", - inputSimHits = SimG4SaveTrackerHitsOB.SimTrackHits.Path, - outputDigiHits = SimG4SaveTrackerHitsOB.SimTrackHits.Path.replace("sim", "digi"), - outputSimDigiAssociation = SimG4SaveTrackerHitsOB.SimTrackHits.Path.replace("simTrackerHits", "simDigiAssociation"), - detectorName = "Vertex", - readoutName = "VTXOBCollection", - xResolution = outerVertexResolution_x, # mm, r-phi direction - yResolution = outerVertexResolution_y, # mm, z direction - tResolution = outerVertexResolution_t, # ns - forceHitsOntoSurface = False, - OutputLevel = INFO +idea_siwrb_digitizer = VTXdigitizer("SiWrBdigitizer", + inputSimHits = SimG4SaveTrackerHitsSiWrB.SimTrackHits.Path, + outputDigiHits = SimG4SaveTrackerHitsSiWrB.SimTrackHits.Path.replace("sim", "digi"), + outputSimDigiAssociation = SimG4SaveTrackerHitsSiWrB.SimTrackHits.Path.replace("simTrackerHits", "simDigiAssociation"), + detectorName = "SiWrB", + readoutName = "SiWrBCollection", + xResolution = [siWrapperResolution_x, siWrapperResolution_x], # mm, r-phi direction + yResolution = [siWrapperResolution_y, siWrapperResolution_y], # mm, z direction + tResolution = [siWrapperResolution_t, siWrapperResolution_t], # ns + forceHitsOntoSurface = False, + OutputLevel = INFO ) -vtxd_digitizer = VTXdigitizer("VTXDdigitizer", - inputSimHits = SimG4SaveTrackerHitsD.SimTrackHits.Path, - outputDigiHits = SimG4SaveTrackerHitsD.SimTrackHits.Path.replace("sim", "digi"), - outputSimDigiAssociation = SimG4SaveTrackerHitsD.SimTrackHits.Path.replace("simTrackerHits", "simDigiAssociation"), - detectorName = "Vertex", - readoutName = "VTXDCollection", - xResolution = outerVertexResolution_x, # mm, r direction - yResolution = outerVertexResolution_y, # mm, phi direction - tResolution = outerVertexResolution_t, # ns - forceHitsOntoSurface = False, - OutputLevel = INFO +idea_siwrd_digitizer = VTXdigitizer("SiWrDdigitizer", + inputSimHits = SimG4SaveTrackerHitsSiWrD.SimTrackHits.Path, + outputDigiHits = SimG4SaveTrackerHitsSiWrD.SimTrackHits.Path.replace("sim", "digi"), + outputSimDigiAssociation = SimG4SaveTrackerHitsSiWrD.SimTrackHits.Path.replace("simTrackerHits", "simDigiAssociation"), + detectorName = "SiWrD", + readoutName = "SiWrDCollection", + xResolution = [siWrapperResolution_x, siWrapperResolution_x], # mm, r direction + yResolution = [siWrapperResolution_y, siWrapperResolution_y], # mm, phi direction + tResolution = [siWrapperResolution_t, siWrapperResolution_t], # ns + forceHitsOntoSurface = False, + OutputLevel = INFO ) -#siwrb_digitizer = VTXdigitizer("SiWrBdigitizer", -# inputSimHits = SimG4SaveTrackerHitsSiWrB.SimTrackHits.Path, -# outputDigiHits = SimG4SaveTrackerHitsSiWrB.SimTrackHits.Path.replace("sim", "digi"), -# detectorName = "SiliconWrapper", -# readoutName = "SiWrBCollection", -# xResolution = siWrapperResolution_x, # mm, r direction -# yResolution = siWrapperResolution_y, # mm, phi direction -# tResolution = siWrapperResolution_t, # ns -# forceHitsOntoSurface = False, -# OutputLevel = INFO -#) -# -#siwrd_digitizer = VTXdigitizer("SiWrDdigitizer", -# inputSimHits = SimG4SaveTrackerHitsSiWrD.SimTrackHits.Path, -# outputDigiHits = SimG4SaveTrackerHitsSiWrD.SimTrackHits.Path.replace("sim", "digi"), -# detectorName = "SiliconWrapper", -# readoutName = "SiWrDCollection", -# xResolution = siWrapperResolution_x, # mm, r direction -# yResolution = siWrapperResolution_y, # mm, phi direction -# tResolution = siWrapperResolution_t, # ns -# forceHitsOntoSurface = False, -# OutputLevel = INFO -#) - # run the genfit tracking # from Configurables import GenFitter # genfitter = GenFitter("GenFitter", inputHits = savetrackertool.SimTrackHits.Path.replace("sim", "digi"), outputTracks = "genfit_tracks") @@ -281,7 +267,7 @@ # genAlg, # hepmc_converter, # geantsim, -# vtxb_digitizer,vtxe_digitizer, +# cld_vtxb_digitizer, cld_vtxd_digitizer, # out # ], # EvtSel = 'NONE', @@ -296,8 +282,8 @@ genAlg, hepmc_converter, geantsim, - vtxib_digitizer, vtxob_digitizer, vtxd_digitizer, - #siwrb_digitizer, siwrd_digitizer, + idea_vtxb_digitizer, idea_vtxd_digitizer, + idea_siwrb_digitizer, idea_siwrd_digitizer, out ], EvtSel = 'NONE', From d7694a917c5e3c0ed2355e4d5365eda62af47f5d Mon Sep 17 00:00:00 2001 From: jmcarcell Date: Tue, 24 Sep 2024 18:51:49 +0200 Subject: [PATCH 10/14] Update Key4hepConfig.cmake with https://github.com/key4hep/key4hep-dev-utils/pull/9 --- cmake/Key4hepConfig.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/Key4hepConfig.cmake b/cmake/Key4hepConfig.cmake index 6dd524a..7579de1 100644 --- a/cmake/Key4hepConfig.cmake +++ b/cmake/Key4hepConfig.cmake @@ -9,7 +9,7 @@ macro(key4hep_set_compiler_flags) if(CMAKE_CXX_COMPILER_ID MATCHES "^(Apple)?Clang$") set(COMPILER_FLAGS "${COMPILER_FLAGS} -Winconsistent-missing-override -Wheader-hygiene -fcolor-diagnostics") elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") - set(COMPILER_FLAGS "${COMPILER_FLAGS} -fdiagnostics-color=always") + set(COMPILER_FLAGS "${COMPILER_FLAGS} -fdiagnostics-color=always -Wno-dangling-reference") endif() if (DEFINED KEY4HEP_SET_COMPILER_FLAGS AND NOT KEY4HEP_SET_COMPILER_FLAGS) From 52b822a63ae3433055ee1277f3d2757664ca648e Mon Sep 17 00:00:00 2001 From: Thomas Madlener Date: Fri, 27 Sep 2024 18:32:48 +0200 Subject: [PATCH 11/14] Make sure histograms still work with Gaudi v39 (#34) --- Tracking/components/PlotTrackHitResiduals.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Tracking/components/PlotTrackHitResiduals.cpp b/Tracking/components/PlotTrackHitResiduals.cpp index a32e6b9..a9626e8 100644 --- a/Tracking/components/PlotTrackHitResiduals.cpp +++ b/Tracking/components/PlotTrackHitResiduals.cpp @@ -18,6 +18,17 @@ // k4FWCore #include "k4FWCore/Consumer.h" +#include "GAUDI_VERSION.h" + +#if GAUDI_MAJOR_VERSION < 39 +namespace Gaudi::Accumulators { + template + using StaticHistogram = + Gaudi::Accumulators::HistogramingCounterBase; +} +#endif + #include /** @class PlotTrackHitDistances @@ -74,7 +85,7 @@ struct PlotTrackHitDistances final return; } Gaudi::Property m_Bz{this, "Bz", 2., "Z component of the (assumed constant) magnetic field in Tesla."}; - mutable Gaudi::Accumulators::Histogram<1> m_residualHist{this, "track_hits_distance_closest_approach", "Track-hit Distances", {100, 0, 1, "Distance [mm];Entries"}}; + mutable Gaudi::Accumulators::StaticHistogram<1> m_residualHist{this, "track_hits_distance_closest_approach", "Track-hit Distances", {100, 0, 1, "Distance [mm];Entries"}}; }; From d21e71adaa8aea4fa5d356cf3cd2e5174e2a465d Mon Sep 17 00:00:00 2001 From: Juan Miguel Carceller <22276694+jmcarcell@users.noreply.github.com> Date: Sat, 28 Sep 2024 14:30:45 +0200 Subject: [PATCH 12/14] Fix a few warnings after the change Association -> Link (#35) * Fix a few warnings after the change Association -> Link * Fix a few more warnings * Fix a couple of includes * Add missing edm4hep:: --------- Co-authored-by: jmcarcell --- Tracking/components/PlotTrackHitResiduals.cpp | 10 +++++----- Tracking/components/TracksFromGenParticles.cpp | 14 +++++++------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Tracking/components/PlotTrackHitResiduals.cpp b/Tracking/components/PlotTrackHitResiduals.cpp index a9626e8..ea12224 100644 --- a/Tracking/components/PlotTrackHitResiduals.cpp +++ b/Tracking/components/PlotTrackHitResiduals.cpp @@ -6,7 +6,7 @@ // edm4hep #include "edm4hep/MCParticleCollection.h" #include "edm4hep/TrackCollection.h" -#include "edm4hep/MCRecoTrackParticleAssociationCollection.h" +#include "edm4hep/TrackMCParticleLinkCollection.h" #include "edm4hep/SimTrackerHitCollection.h" // marlin @@ -40,7 +40,7 @@ namespace Gaudi::Accumulators { */ struct PlotTrackHitDistances final - : k4FWCore::Consumer { + : k4FWCore::Consumer { PlotTrackHitDistances(const std::string& name, ISvcLocator* svcLoc) : Consumer( name, svcLoc, @@ -49,11 +49,11 @@ struct PlotTrackHitDistances final KeyValues("InputTracksFromGenParticlesAssociation", {"TracksFromGenParticlesAssociation"}), }) {} - void operator()(const edm4hep::SimTrackerHitCollection& simTrackerHits, const edm4hep::MCRecoTrackParticleAssociationCollection& trackParticleAssociations) const override { + void operator()(const edm4hep::SimTrackerHitCollection& simTrackerHits, const edm4hep::TrackMCParticleLinkCollection& trackParticleAssociations) const override { for (const auto& trackParticleAssociation : trackParticleAssociations) { - auto genParticle = trackParticleAssociation.getSim(); - auto track = trackParticleAssociation.getRec(); + auto genParticle = trackParticleAssociation.getTo(); + auto track = trackParticleAssociation.getFrom(); edm4hep::TrackState trackStateAtIP; bool found_trackStateAtIP = false; for (const auto& trackState : track.getTrackStates()) { diff --git a/Tracking/components/TracksFromGenParticles.cpp b/Tracking/components/TracksFromGenParticles.cpp index af03cb8..dab2af0 100644 --- a/Tracking/components/TracksFromGenParticles.cpp +++ b/Tracking/components/TracksFromGenParticles.cpp @@ -3,7 +3,7 @@ // edm4hep #include "edm4hep/MCParticleCollection.h" #include "edm4hep/TrackCollection.h" -#include "edm4hep/MCRecoTrackParticleAssociationCollection.h" +#include "edm4hep/TrackMCParticleLinkCollection.h" // marlin #include @@ -27,7 +27,7 @@ */ struct TracksFromGenParticles final - : k4FWCore::MultiTransformer(const edm4hep::MCParticleCollection&)> { + : k4FWCore::MultiTransformer(const edm4hep::MCParticleCollection&)> { TracksFromGenParticles(const std::string& name, ISvcLocator* svcLoc) : MultiTransformer( name, svcLoc, @@ -36,10 +36,10 @@ struct TracksFromGenParticles final KeyValues("OutputMCRecoTrackParticleAssociation", {"TracksFromGenParticlesAssociation"})}) { } -std::tuple operator()(const edm4hep::MCParticleCollection& genParticleColl) const override { +std::tuple operator()(const edm4hep::MCParticleCollection& genParticleColl) const override { auto outputTrackCollection = edm4hep::TrackCollection(); - auto MCRecoTrackParticleAssociationCollection = edm4hep::MCRecoTrackParticleAssociationCollection(); + auto MCRecoTrackParticleAssociationCollection = edm4hep::TrackMCParticleLinkCollection(); for (const auto& genParticle : genParticleColl) { debug() << "Particle decayed in tracker: " << genParticle.isDecayedInTracker() << endmsg; @@ -76,9 +76,9 @@ std::tuple Date: Mon, 30 Sep 2024 10:35:01 +0200 Subject: [PATCH 13/14] Release Notes for v00-03-00 --- doc/ReleaseNotes.md | 51 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/doc/ReleaseNotes.md b/doc/ReleaseNotes.md index 0a7b8b1..7a9dc71 100644 --- a/doc/ReleaseNotes.md +++ b/doc/ReleaseNotes.md @@ -1,3 +1,54 @@ +# v00-03-00 + +* 2024-09-28 jmcarcell ([PR#35](https://github.com/key4hep/k4RecTracker/pull/35)) + - Fix a few warnings after the change Association -> Link + +* 2024-09-27 tmadlener ([PR#34](https://github.com/key4hep/k4RecTracker/pull/34)) + - Make sure that histograms keep working / compiling with Gaudi v39 + +* 2024-09-24 armin-ilg ([PR#33](https://github.com/key4hep/k4RecTracker/pull/33)) + - Update to IDEA_o1_v03 vertex + - Specify spatial and time resolutions per layer + +* 2024-09-10 jmcarcell ([PR#32](https://github.com/key4hep/k4RecTracker/pull/32)) + - Use the Key4hepConfig flag to set the standard, compiler flags and rpath magic. + +* 2024-09-07 jmcarcell ([PR#30](https://github.com/key4hep/k4RecTracker/pull/30)) + - Remove the old key4hep nightlies workflow + +* 2024-08-08 BrieucF ([PR#28](https://github.com/key4hep/k4RecTracker/pull/28)) + - Add a link between SIM and Digitized VTX hits + - Change detector model to IDEA_o1_v03 for the VTX tests + +* 2024-08-08 BrieucF ([PR#21](https://github.com/key4hep/k4RecTracker/pull/21)) + - Add a transformer to create Tracks out of generated particles + - Add a consumer that plots the distance between simTrackerHits and a Track + +* 2024-07-27 jmcarcell ([PR#26](https://github.com/key4hep/k4RecTracker/pull/26)) + - Add missing k4FWCore::k4Interface when linking, it's needed (although it works fine in the stack) because some files from k4Interface are being included + - Fix warning about an unused variable + +* 2024-07-27 jmcarcell ([PR#25](https://github.com/key4hep/k4RecTracker/pull/25)) + - Change headers and add EventContext in algorithms not to use GaudiAlg + - Replace `GaudiTool` with `AlgTool` + +* 2024-07-04 tmadlener ([PR#23](https://github.com/key4hep/k4RecTracker/pull/23)) + - Remove setting a dummy dE/dx value, since the edm4hep::Track will no longer have it after [EDM4hep#311](https://github.com/key4hep/EDM4hep/pull/311) + +* 2024-03-19 jmcarcell ([PR#20](https://github.com/key4hep/k4RecTracker/pull/20)) + - Add missing GaudiAlgLib, which seems to be giving some problems now in the nightlies + +* 2024-02-26 BrieucF ([PR#19](https://github.com/key4hep/k4RecTracker/pull/19)) + - Drift chamber digitized hit are now in global coordinate by default + - Added an edm4hep association between drift chamber digi and simTrackerHit + - Add a debug mode in the drift chamber digitizer which produces additional distributions and a digi collection in local coordinates + +* 2024-02-23 jmcarcell ([PR#18](https://github.com/key4hep/k4RecTracker/pull/18)) + - Change clone paths in the readme with the new location of this repository + +* 2024-02-23 jmcarcell ([PR#17](https://github.com/key4hep/k4RecTracker/pull/17)) + - Use TrackerHit3D when avaliable, needed after https://github.com/key4hep/EDM4hep/pull/252 + # v00-02-00 * 2024-02-12 tmadlener ([PR#16](https://github.com/key4hep/k4RecTracker/pull/16)) From 120ea0d95ad0fe8ad0e9de5175bf020b347423d7 Mon Sep 17 00:00:00 2001 From: Juan Miguel Carceller <22276694+jmcarcell@users.noreply.github.com> Date: Mon, 30 Sep 2024 10:35:02 +0200 Subject: [PATCH 14/14] Updating version to v00-03-00 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 81c9bc2..198f641 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,7 +5,7 @@ project(${PackageName}) # please keep this layout for version setting, used by the automatic tagging script set(${PackageName}_VERSION_MAJOR 0) -set(${PackageName}_VERSION_MINOR 2) +set(${PackageName}_VERSION_MINOR 3) set(${PackageName}_VERSION_PATCH 0) set(${PackageName}_VERSION "${PACKAGE_VERSION_MAJOR}.${PACKAGE_VERSION_MINOR}.${PACKAGE_VERSION_PATCH}")