diff --git a/Biasing/include/Biasing/DeepEcalProcessFilter.h b/Biasing/include/Biasing/DeepEcalProcessFilter.h index 7e66b94df..40c362009 100644 --- a/Biasing/include/Biasing/DeepEcalProcessFilter.h +++ b/Biasing/include/Biasing/DeepEcalProcessFilter.h @@ -42,24 +42,24 @@ class DeepEcalProcessFilter : public simcore::UserAction { virtual ~DeepEcalProcessFilter() = default; /// Method to set flags in the beginning of the event - void BeginOfEventAction(const G4Event* event) final override; + void BeginOfEventAction(const G4Event* event) override; /** * Implement the stepping action which performs the target volume biasing. * @param step The Geant4 step. */ - void stepping(const G4Step* step) final override; + void stepping(const G4Step* step) override; // /** // * Method called at the end of every event. // * @param event Geant4 event object. // */ - // void EndOfEventAction(const G4Event*) final override; + // void EndOfEventAction(const G4Event*) override; - void NewStage() final override; + void NewStage() override; /// Retrieve the type of actions this class defines - std::vector getTypes() final override { + std::vector getTypes() override { return {simcore::TYPE::STACKING, simcore::TYPE::STEPPING, simcore::TYPE::EVENT}; } diff --git a/Biasing/include/Biasing/EcalDarkBremFilter.h b/Biasing/include/Biasing/EcalDarkBremFilter.h index 69ff62b7b..7de4eb5c2 100644 --- a/Biasing/include/Biasing/EcalDarkBremFilter.h +++ b/Biasing/include/Biasing/EcalDarkBremFilter.h @@ -63,7 +63,7 @@ class EcalDarkBremFilter : public simcore::UserAction { * * @return list of action types this class does */ - std::vector getTypes() final override { + std::vector getTypes() override { return {simcore::TYPE::STACKING, simcore::TYPE::EVENT, simcore::TYPE::TRACKING}; } @@ -73,7 +73,7 @@ class EcalDarkBremFilter : public simcore::UserAction { * * @param event unused */ - void BeginOfEventAction(const G4Event* event) final override; + void BeginOfEventAction(const G4Event* event) override; /** * We return the classification of the track done by the PartialEnergySorter, @@ -90,7 +90,7 @@ class EcalDarkBremFilter : public simcore::UserAction { */ G4ClassificationOfNewTrack ClassifyNewTrack( const G4Track* aTrack, - const G4ClassificationOfNewTrack& currentTrackClass) final override; + const G4ClassificationOfNewTrack& currentTrackClass) override; /** * When using the PartialEnergySorter, @@ -102,7 +102,7 @@ class EcalDarkBremFilter : public simcore::UserAction { * * @see PartialEnergySort::NewStage */ - void NewStage() final override; + void NewStage() override; /** * Make sure A' is saved. @@ -114,7 +114,7 @@ class EcalDarkBremFilter : public simcore::UserAction { * * @param track G4Track to check if it is an A' */ - void PostUserTrackingAction(const G4Track* track) final override; + void PostUserTrackingAction(const G4Track* track) override; private: /** diff --git a/Biasing/include/Biasing/EcalProcessFilter.h b/Biasing/include/Biasing/EcalProcessFilter.h index bb2e66057..a2473243d 100644 --- a/Biasing/include/Biasing/EcalProcessFilter.h +++ b/Biasing/include/Biasing/EcalProcessFilter.h @@ -38,9 +38,9 @@ class EcalProcessFilter : public simcore::UserAction { /// Destructor ~EcalProcessFilter(); - void stepping(const G4Step* step) final override; + void stepping(const G4Step* step) override; - // void PostUserTrackingAction(const G4Track*) final override; + // void PostUserTrackingAction(const G4Track*) override; /** * Classify a new track which postpones track processing. @@ -50,10 +50,10 @@ class EcalProcessFilter : public simcore::UserAction { */ G4ClassificationOfNewTrack ClassifyNewTrack( const G4Track* aTrack, - const G4ClassificationOfNewTrack& currentTrackClass) final override; + const G4ClassificationOfNewTrack& currentTrackClass) override; /// Retrieve the type of actions this class defines - std::vector getTypes() final override { + std::vector getTypes() override { return {simcore::TYPE::STACKING, simcore::TYPE::STEPPING}; } diff --git a/Biasing/include/Biasing/MidShowerDiMuonBkgdFilter.h b/Biasing/include/Biasing/MidShowerDiMuonBkgdFilter.h index fb05d255e..2e2d1f992 100644 --- a/Biasing/include/Biasing/MidShowerDiMuonBkgdFilter.h +++ b/Biasing/include/Biasing/MidShowerDiMuonBkgdFilter.h @@ -44,7 +44,7 @@ class MidShowerDiMuonBkgdFilter : public simcore::UserAction { * * @return list of action types this class does */ - std::vector getTypes() final override { + std::vector getTypes() override { return {simcore::TYPE::STACKING, simcore::TYPE::STEPPING, simcore::TYPE::EVENT}; } @@ -54,7 +54,7 @@ class MidShowerDiMuonBkgdFilter : public simcore::UserAction { * * @param[in] event not used */ - void BeginOfEventAction(const G4Event* event) final override; + void BeginOfEventAction(const G4Event* event) override; /** * We follow the simulation along each step and check @@ -72,7 +72,7 @@ class MidShowerDiMuonBkgdFilter : public simcore::UserAction { * * @param[in] step current G4Step */ - void stepping(const G4Step* step) final override; + void stepping(const G4Step* step) override; /** * When using the PartialEnergySorter, @@ -86,7 +86,7 @@ class MidShowerDiMuonBkgdFilter : public simcore::UserAction { * @see PartialEnergySort::NewStage * @see AbortEvent */ - void NewStage() final override; + void NewStage() override; private: /** diff --git a/Biasing/include/Biasing/MidShowerNuclearBkgdFilter.h b/Biasing/include/Biasing/MidShowerNuclearBkgdFilter.h index 74e233f8e..e18d5ee68 100644 --- a/Biasing/include/Biasing/MidShowerNuclearBkgdFilter.h +++ b/Biasing/include/Biasing/MidShowerNuclearBkgdFilter.h @@ -46,7 +46,7 @@ class MidShowerNuclearBkgdFilter : public simcore::UserAction { * * @return list of action types this class does */ - std::vector getTypes() final override { + std::vector getTypes() override { return {simcore::TYPE::STACKING, simcore::TYPE::STEPPING, simcore::TYPE::EVENT}; } @@ -56,7 +56,7 @@ class MidShowerNuclearBkgdFilter : public simcore::UserAction { * * @param[in] event not used */ - void BeginOfEventAction(const G4Event* event) final override; + void BeginOfEventAction(const G4Event* event) override; /** * We follow the simulation along each step and check @@ -74,7 +74,7 @@ class MidShowerNuclearBkgdFilter : public simcore::UserAction { * * @param[in] step current G4Step */ - void stepping(const G4Step* step) final override; + void stepping(const G4Step* step) override; /** * When using the PartialEnergySorter, @@ -88,7 +88,7 @@ class MidShowerNuclearBkgdFilter : public simcore::UserAction { * @see PartialEnergySort::NewStage * @see AbortEvent */ - void NewStage() final override; + void NewStage() override; private: /** diff --git a/Biasing/include/Biasing/NonFiducialFilter.h b/Biasing/include/Biasing/NonFiducialFilter.h index db976c445..1415bf6f1 100644 --- a/Biasing/include/Biasing/NonFiducialFilter.h +++ b/Biasing/include/Biasing/NonFiducialFilter.h @@ -46,16 +46,16 @@ class NonFiducialFilter : public simcore::UserAction { * Implement the stepping action which performs the target volume biasing. * @param step The Geant4 step. */ - void stepping(const G4Step* step) final override; + void stepping(const G4Step* step) override; /** * Method called at the end of every event. * @param event Geant4 event object. */ - void EndOfEventAction(const G4Event*) final override; + void EndOfEventAction(const G4Event*) override; /// Retrieve the type of actions this class defines - std::vector getTypes() final override { + std::vector getTypes() override { return {simcore::TYPE::EVENT, simcore::TYPE::STACKING, simcore::TYPE::STEPPING}; } diff --git a/Biasing/include/Biasing/PhotoNuclearProductsFilter.h b/Biasing/include/Biasing/PhotoNuclearProductsFilter.h index cca69a6f3..857334767 100644 --- a/Biasing/include/Biasing/PhotoNuclearProductsFilter.h +++ b/Biasing/include/Biasing/PhotoNuclearProductsFilter.h @@ -48,10 +48,10 @@ class PhotoNuclearProductsFilter : public simcore::UserAction { * @param[in] step The Geant4 step containing transient information * about the step taken by a track. */ - void stepping(const G4Step* step) final override; + void stepping(const G4Step* step) override; /// Retrieve the type of actions this class defines - std::vector getTypes() final override { + std::vector getTypes() override { return {simcore::TYPE::STEPPING}; } diff --git a/Biasing/include/Biasing/PhotoNuclearTopologyFilters.h b/Biasing/include/Biasing/PhotoNuclearTopologyFilters.h index a5036e901..dccd69b3d 100644 --- a/Biasing/include/Biasing/PhotoNuclearTopologyFilters.h +++ b/Biasing/include/Biasing/PhotoNuclearTopologyFilters.h @@ -54,7 +54,7 @@ class PhotoNuclearTopologyFilter : public simcore::UserAction { virtual bool rejectEvent(const std::vector& secondaries) const = 0; /// Retrieve the type of actions this class defines - std::vector getTypes() final override { + std::vector getTypes() override { return {simcore::TYPE::STEPPING}; } diff --git a/Biasing/include/Biasing/PrimaryToEcalFilter.h b/Biasing/include/Biasing/PrimaryToEcalFilter.h index 1e327eecf..5b1d123f4 100644 --- a/Biasing/include/Biasing/PrimaryToEcalFilter.h +++ b/Biasing/include/Biasing/PrimaryToEcalFilter.h @@ -47,10 +47,10 @@ class PrimaryToEcalFilter : public simcore::UserAction { * * @param[in] step Geant4 step */ - void stepping(const G4Step* step) final override; + void stepping(const G4Step* step) override; /// Retrieve the type of actions this class defines - std::vector getTypes() final override { + std::vector getTypes() override { return {simcore::TYPE::STEPPING}; } diff --git a/Biasing/include/Biasing/TaggerHitFilter.h b/Biasing/include/Biasing/TaggerHitFilter.h index 6ed6b2ee7..334eec006 100644 --- a/Biasing/include/Biasing/TaggerHitFilter.h +++ b/Biasing/include/Biasing/TaggerHitFilter.h @@ -41,16 +41,16 @@ class TaggerHitFilter : public simcore::UserAction { * * @param[in] step Geant4 step */ - void stepping(const G4Step* step) final override; + void stepping(const G4Step* step) override; /** * Action called once tracking of all particles has concluded. This is being * used to clear the hit count set in preparation for the next event. */ - void EndOfEventAction(const G4Event* event) final override; + void EndOfEventAction(const G4Event* event) override; /// Retrieve the type of actions this class defines - std::vector getTypes() final override { + std::vector getTypes() override { return {simcore::TYPE::STEPPING, simcore::TYPE::EVENT}; } diff --git a/Biasing/include/Biasing/TaggerVetoFilter.h b/Biasing/include/Biasing/TaggerVetoFilter.h index 0d96b9789..23f07eac5 100644 --- a/Biasing/include/Biasing/TaggerVetoFilter.h +++ b/Biasing/include/Biasing/TaggerVetoFilter.h @@ -46,7 +46,7 @@ class TaggerVetoFilter : public simcore::UserAction { * Action called at the start of an event to reset * */ - void BeginOfEventAction(const G4Event *) final override; + void BeginOfEventAction(const G4Event *) override; /** * * Action called at the end of an event to veto events where the primary @@ -54,17 +54,17 @@ class TaggerVetoFilter : public simcore::UserAction { * */ - void EndOfEventAction(const G4Event *) final override; + void EndOfEventAction(const G4Event *) override; /** * Stepping action called when a step is taken during tracking of * a particle. * * @param[in] step Geant4 step */ - void stepping(const G4Step *step) final override; + void stepping(const G4Step *step) override; /// Retrieve the type of actions this class defines - std::vector getTypes() final override { + std::vector getTypes() override { return {simcore::TYPE::STEPPING, simcore::TYPE::EVENT}; } diff --git a/Biasing/include/Biasing/TargetBremFilter.h b/Biasing/include/Biasing/TargetBremFilter.h index 223c1f6ae..b0e5e3c3e 100644 --- a/Biasing/include/Biasing/TargetBremFilter.h +++ b/Biasing/include/Biasing/TargetBremFilter.h @@ -35,14 +35,14 @@ class TargetBremFilter : public simcore::UserAction { * Implement the stepping action which performs the target volume biasing. * @param step The Geant4 step. */ - void stepping(const G4Step* step) final override; + void stepping(const G4Step* step) override; /** * Method called at the end of every event. * * @param event Geant4 event object. */ - void EndOfEventAction(const G4Event*) final override; + void EndOfEventAction(const G4Event*) override; /** * Classify a new track which postpones track processing. @@ -52,10 +52,10 @@ class TargetBremFilter : public simcore::UserAction { */ G4ClassificationOfNewTrack ClassifyNewTrack( const G4Track* aTrack, - const G4ClassificationOfNewTrack& currentTrackClass) final override; + const G4ClassificationOfNewTrack& currentTrackClass) override; /// Retrieve the type of actions this class defines - std::vector getTypes() final override { + std::vector getTypes() override { return {simcore::TYPE::EVENT, simcore::TYPE::STACKING, simcore::TYPE::STEPPING}; } diff --git a/Biasing/include/Biasing/TargetDarkBremFilter.h b/Biasing/include/Biasing/TargetDarkBremFilter.h index e68631413..c081e84d2 100644 --- a/Biasing/include/Biasing/TargetDarkBremFilter.h +++ b/Biasing/include/Biasing/TargetDarkBremFilter.h @@ -54,14 +54,14 @@ class TargetDarkBremFilter : public simcore::UserAction { /** * Class destructor. */ - ~TargetDarkBremFilter() {} + ~TargetDarkBremFilter() = default; /** * Get the types of actions this class can do * * @return list of action types this class does */ - std::vector getTypes() final override { + std::vector getTypes() override { return {simcore::TYPE::STEPPING, simcore::TYPE::EVENT}; } @@ -70,7 +70,7 @@ class TargetDarkBremFilter : public simcore::UserAction { * * @param[in] e event being started, unused */ - void BeginOfEventAction(const G4Event* e) final override; + void BeginOfEventAction(const G4Event* e) override; /** * Looking for A' while primary is stepping. @@ -83,7 +83,7 @@ class TargetDarkBremFilter : public simcore::UserAction { * * @param[in] step current G4Step */ - void stepping(const G4Step* step); + void stepping(const G4Step* step) override; /** * Check flag signaling finding of A', if false, @@ -91,7 +91,7 @@ class TargetDarkBremFilter : public simcore::UserAction { * * @param[in] event being ended, check if it is already aborted */ - void EndOfEventAction(const G4Event* event) final override; + void EndOfEventAction(const G4Event* event) override; private: /** diff --git a/Biasing/include/Biasing/TargetENProcessFilter.h b/Biasing/include/Biasing/TargetENProcessFilter.h index b553b92d9..7f51f7d97 100644 --- a/Biasing/include/Biasing/TargetENProcessFilter.h +++ b/Biasing/include/Biasing/TargetENProcessFilter.h @@ -34,15 +34,15 @@ class TargetENProcessFilter : public simcore::UserAction { * Implementmthe stepping action which performs the target volume biasing. * @param step The Geant4 step. */ - void stepping(const G4Step* step) final override; + void stepping(const G4Step* step) override; /** * End of event action. */ - void EndOfEventAction(const G4Event*) final override; + void EndOfEventAction(const G4Event*) override; /// Retrieve the type of actions this class defines - std::vector getTypes() final override { + std::vector getTypes() override { return {simcore::TYPE::EVENT, simcore::TYPE::STEPPING}; } diff --git a/Biasing/include/Biasing/TargetProcessFilter.h b/Biasing/include/Biasing/TargetProcessFilter.h index c2699a4b3..77f89b393 100644 --- a/Biasing/include/Biasing/TargetProcessFilter.h +++ b/Biasing/include/Biasing/TargetProcessFilter.h @@ -38,12 +38,12 @@ class TargetProcessFilter : public simcore::UserAction { * Implementmthe stepping action which performs the target volume biasing. * @param step The Geant4 step. */ - void stepping(const G4Step *step) final override; + void stepping(const G4Step *step) override; /** * End of event action. */ - void EndOfEventAction(const G4Event *) final override; + void EndOfEventAction(const G4Event *) override; /** * Classify a new track which postpones track processing. @@ -53,10 +53,10 @@ class TargetProcessFilter : public simcore::UserAction { */ G4ClassificationOfNewTrack ClassifyNewTrack( const G4Track *aTrack, - const G4ClassificationOfNewTrack ¤tTrackClass) final override; + const G4ClassificationOfNewTrack ¤tTrackClass) override; /// Retrieve the type of actions this class defines - std::vector getTypes() final override { + std::vector getTypes() override { return {simcore::TYPE::EVENT, simcore::TYPE::STACKING, simcore::TYPE::STEPPING}; } diff --git a/Biasing/include/Biasing/Utility/DecayChildrenKeeper.h b/Biasing/include/Biasing/Utility/DecayChildrenKeeper.h index 637f0d008..95b022e46 100644 --- a/Biasing/include/Biasing/Utility/DecayChildrenKeeper.h +++ b/Biasing/include/Biasing/Utility/DecayChildrenKeeper.h @@ -55,10 +55,10 @@ class DecayChildrenKeeper : public simcore::UserAction { * * @param[in] track Geant4 track associated with a particle. */ - void PostUserTrackingAction(const G4Track* track) final override; + void PostUserTrackingAction(const G4Track* track) override; /// Retrieve the type of actions this class defines. - std::vector getTypes() final override { + std::vector getTypes() override { return {simcore::TYPE::TRACKING}; } diff --git a/Biasing/include/Biasing/Utility/PartialEnergySorter.h b/Biasing/include/Biasing/Utility/PartialEnergySorter.h index 7d509d2f3..d87a80c34 100644 --- a/Biasing/include/Biasing/Utility/PartialEnergySorter.h +++ b/Biasing/include/Biasing/Utility/PartialEnergySorter.h @@ -62,7 +62,7 @@ class PartialEnergySorter : public simcore::UserAction { * * @param[in] event unused */ - void BeginOfEventAction(const G4Event* event) final override; + void BeginOfEventAction(const G4Event* event) override; /** * Classify a "new" track @@ -83,7 +83,7 @@ class PartialEnergySorter : public simcore::UserAction { */ G4ClassificationOfNewTrack ClassifyNewTrack( const G4Track* aTrack, - const G4ClassificationOfNewTrack& currentTrackClass) final override; + const G4ClassificationOfNewTrack& currentTrackClass) override; /** * Checks if a particle steps from above the threshold to below it. @@ -95,10 +95,10 @@ class PartialEnergySorter : public simcore::UserAction { * * @param[in] step Geant4 step */ - void stepping(const G4Step* step) final override; + void stepping(const G4Step* step) override; /// Retrieve the type of actions this class defines - std::vector getTypes() { + std::vector getTypes() override { return {simcore::TYPE::STEPPING, simcore::TYPE::STACKING, simcore::TYPE::EVENT}; } @@ -128,7 +128,7 @@ class PartialEnergySorter : public simcore::UserAction { * tracking without "stepping" from above the threshold to * below it. */ - void NewStage() final override { + void NewStage() override { /** debug printout std::cout << "[ PartialEnergySorter ] : " << "Starting new stage with " diff --git a/Biasing/include/Biasing/Utility/TrackProcessFilter.h b/Biasing/include/Biasing/Utility/TrackProcessFilter.h index fc8e06bfc..b98cedef0 100644 --- a/Biasing/include/Biasing/Utility/TrackProcessFilter.h +++ b/Biasing/include/Biasing/Utility/TrackProcessFilter.h @@ -47,10 +47,10 @@ class TrackProcessFilter : public simcore::UserAction { * * @param[in] track Geant4 track associated with a particle. */ - void PostUserTrackingAction(const G4Track* track) final override; + void PostUserTrackingAction(const G4Track* track) override; /// Retrieve the type of actions this class defines. - std::vector getTypes() final override { + std::vector getTypes() override { return {simcore::TYPE::TRACKING}; } diff --git a/CMakeLists.txt b/CMakeLists.txt index 7e31ed74f..c66c59646 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,6 +19,8 @@ project(LDMX_SW VERSION 3.1.1 LANGUAGES CXX ) +set(CMAKE_CXX_STANDARD 17) + # Load additional macros used by this project. list(APPEND CMAKE_MODULE_PATH ${LDMX_SW_SOURCE_DIR}/cmake/) diff --git a/Conditions/src/Conditions/GeneralCSVLoader.cxx b/Conditions/src/Conditions/GeneralCSVLoader.cxx index 17084b8c3..c26d4511c 100644 --- a/Conditions/src/Conditions/GeneralCSVLoader.cxx +++ b/Conditions/src/Conditions/GeneralCSVLoader.cxx @@ -74,19 +74,19 @@ StringCSVLoader::StringCSVLoader(const std::string& source, std::string StringCSVLoader::getNextLine() { std::string retval; if (rowBegin_ != rowEnd_) - if (rowEnd_ == std::string::npos) + if (rowEnd_ == std::string::npos) { retval = source_.substr(rowBegin_, rowEnd_); - else + } else { retval = source_.substr(rowBegin_, rowEnd_ - rowBegin_); - + } // now we look for the follow on. // find the first non-end-of-line character rowBegin_ = source_.find_first_not_of(linesep_, rowEnd_); if (rowBegin_ != std::string::npos) { rowEnd_ = source_.find_first_of(linesep_, rowBegin_); - } else + } else { rowEnd_ = std::string::npos; - + } return retval; } diff --git a/DQM/include/DQM/DarkBremInteraction.h b/DQM/include/DQM/DarkBremInteraction.h index 39cfac0cf..5ac09c2f6 100644 --- a/DQM/include/DQM/DarkBremInteraction.h +++ b/DQM/include/DQM/DarkBremInteraction.h @@ -37,7 +37,7 @@ class DarkBremInteraction : public framework::Producer { * This is helpful for downstream viewers of the histograms * so that ROOT will display the bins properly. */ - virtual void onProcessStart() final override; + virtual void onProcessStart() override; /** * extract the kinematics of the dark brem interaction from the SimParticles @@ -52,7 +52,7 @@ class DarkBremInteraction : public framework::Producer { * conserve momentum, so we need to reconstruct the incident particle's * 3-momentum and then use the electron mass to calculate its total energy. */ - virtual void produce(framework::Event& e) final override; + virtual void produce(framework::Event& e) override; private: /** diff --git a/DQM/include/DQM/SampleValidation.h b/DQM/include/DQM/SampleValidation.h index 774238b7a..5fd92e4fb 100644 --- a/DQM/include/DQM/SampleValidation.h +++ b/DQM/include/DQM/SampleValidation.h @@ -16,8 +16,8 @@ class SampleValidation : public framework::Analyzer { public: SampleValidation(const std::string& name, framework::Process& process) : Analyzer(name, process) {} - virtual void configure(framework::config::Parameters& ps); - virtual void analyze(const framework::Event& event); + virtual void configure(framework::config::Parameters& ps) override; + virtual void analyze(const framework::Event& event) override; int pdgid_label(const int pdgid); /// Method executed before processing of events begins. void onProcessStart() override; diff --git a/DQM/src/DQM/PhotoNuclearDQM.cxx b/DQM/src/DQM/PhotoNuclearDQM.cxx index 218e944d2..dec9fbf56 100644 --- a/DQM/src/DQM/PhotoNuclearDQM.cxx +++ b/DQM/src/DQM/PhotoNuclearDQM.cxx @@ -98,7 +98,7 @@ void PhotoNuclearDQM::findParticleKinematics( hardest_theta = theta; } - if ((pdgID == 2112)) { + if (pdgID == 2112) { total_neutron_ke += ke; neutron_multiplicity++; if (hardest_neutron_ke < ke) { diff --git a/Ecal/include/Ecal/DNNEcalVetoProcessor.h b/Ecal/include/Ecal/DNNEcalVetoProcessor.h index 556e68d6b..51a511942 100644 --- a/Ecal/include/Ecal/DNNEcalVetoProcessor.h +++ b/Ecal/include/Ecal/DNNEcalVetoProcessor.h @@ -27,8 +27,8 @@ class DNNEcalVetoProcessor : public framework::Producer { public: DNNEcalVetoProcessor(const std::string& name, framework::Process& process); virtual ~DNNEcalVetoProcessor() {} - void configure(framework::config::Parameters& parameters) final override; - void produce(framework::Event& event); + void configure(framework::config::Parameters& parameters) override; + void produce(framework::Event& event) override; private: /** diff --git a/Ecal/include/Ecal/EcalClusterProducer.h b/Ecal/include/Ecal/EcalClusterProducer.h index 94ce38055..b98f49853 100644 --- a/Ecal/include/Ecal/EcalClusterProducer.h +++ b/Ecal/include/Ecal/EcalClusterProducer.h @@ -53,9 +53,9 @@ class EcalClusterProducer : public framework::Producer { * * @param parameters Set of parameters used to configure this processor. */ - void configure(framework::config::Parameters& parameters) final override; + void configure(framework::config::Parameters& parameters) override; - virtual void produce(framework::Event& event); + virtual void produce(framework::Event& event) override; private: double seedThreshold_{0}; diff --git a/Ecal/include/Ecal/EcalVetoProcessor.h b/Ecal/include/Ecal/EcalVetoProcessor.h index e46baaad1..53b068828 100644 --- a/Ecal/include/Ecal/EcalVetoProcessor.h +++ b/Ecal/include/Ecal/EcalVetoProcessor.h @@ -45,9 +45,9 @@ class EcalVetoProcessor : public framework::Producer { * * @param parameters Set of parameters used to configure this processor. */ - void configure(framework::config::Parameters& parameters) final override; + void configure(framework::config::Parameters& parameters) override; - void produce(framework::Event& event); + void produce(framework::Event& event) override; // MIP tracking: Class for storing hit information for tracking in a // convenient way diff --git a/Ecal/test/EcalDigiPipelineTest.cxx b/Ecal/test/EcalDigiPipelineTest.cxx index 240c18b94..ab6e7f3c5 100644 --- a/Ecal/test/EcalDigiPipelineTest.cxx +++ b/Ecal/test/EcalDigiPipelineTest.cxx @@ -185,8 +185,8 @@ class EcalFakeSimHits : public framework::Producer { : framework::Producer(name, p) {} ~EcalFakeSimHits() {} - void beforeNewRun(ldmx::RunHeader &header) { - header.setDetectorName("ldmx-det-v12"); + void beforeNewRun(ldmx::RunHeader &header) final override { + header.setDetectorName("ldmx-det-v14-8gev"); } void produce(framework::Event &event) final override { @@ -195,19 +195,11 @@ class EcalFakeSimHits : public framework::Producer { ldmx::EcalID id(0, 0, 0); pretendSimHits[0].setID(id.raw()); - pretendSimHits[0].addContrib( - -1 // incidentID - , - -1 // trackID - , - 0 // pdg ID - , - currEnergy_ // edep - , - 1. // time - 299mm is about 1ns from target and in middle of ECal - ); - pretendSimHits[0].setPosition(0., 0., - 299.); // sim position in middle of ECal + // incidentID, trackID, pdg ID, edep, time - 299mm is about 1ns from target + // and in middle of ECal + pretendSimHits[0].addContrib(-1, -1, 0, currEnergy_, 1.); + // sim position in middle of ECal + pretendSimHits[0].setPosition(0., 0., 299.); // needs to be correct collection name REQUIRE_NOTHROW(event.add("EcalSimHits", pretendSimHits)); diff --git a/Framework/test/ConfigurePythonTest.cxx b/Framework/test/ConfigurePythonTest.cxx index 393240aee..255831e23 100644 --- a/Framework/test/ConfigurePythonTest.cxx +++ b/Framework/test/ConfigurePythonTest.cxx @@ -98,7 +98,7 @@ class TestConfig : public framework::Producer { } // I don't do anything. - virtual void produce(framework::Event &) {} + virtual void produce(framework::Event &) final override {} }; /** diff --git a/Hcal/test/HcalDigiPipelineTest.cxx b/Hcal/test/HcalDigiPipelineTest.cxx index e5334e7ce..44b569b10 100644 --- a/Hcal/test/HcalDigiPipelineTest.cxx +++ b/Hcal/test/HcalDigiPipelineTest.cxx @@ -158,7 +158,7 @@ class HcalFakeSimHits : public framework::Producer { : framework::Producer(name, p) {} ~HcalFakeSimHits() {} - void beforeNewRun(ldmx::RunHeader &header) { + void beforeNewRun(ldmx::RunHeader &header) final override { header.setDetectorName("ldmx-det-v12"); } diff --git a/Packing/include/Packing/RawIO.h b/Packing/include/Packing/RawIO.h index 69b7574d6..630063760 100644 --- a/Packing/include/Packing/RawIO.h +++ b/Packing/include/Packing/RawIO.h @@ -29,25 +29,25 @@ class RawIO : public framework::Producer { * * @param[in] ps Parameters for configuration */ - void configure(framework::config::Parameters& ps) final override; + void configure(framework::config::Parameters& ps) override; /** * We are given a non-const reference to a new RunHeader so * we can add parameters unpacked from the raw data. */ - void beforeNewRun(ldmx::RunHeader& header) final override; + void beforeNewRun(ldmx::RunHeader& header) override; /** * Actually do the unpacking/decoding. * * @param[in,out] event Event bus with raw data where we will put the digis */ - void produce(framework::Event& event) final override; + void produce(framework::Event& event) override; /** * Close up ROOT file with raw data in it. */ - void onProcessEnd() final override; + void onProcessEnd() override; private: /// raw data file we are reading diff --git a/Packing/include/Packing/SingleSubsystemPacker.h b/Packing/include/Packing/SingleSubsystemPacker.h index 32af1a921..998e5f5ed 100644 --- a/Packing/include/Packing/SingleSubsystemPacker.h +++ b/Packing/include/Packing/SingleSubsystemPacker.h @@ -27,14 +27,14 @@ class SingleSubsystemPacker : public framework::Analyzer { * * @param[in] ps Parameters for configuration */ - void configure(framework::config::Parameters& ps) final override; + void configure(framework::config::Parameters& ps) override; /** * Actually do the unpacking/decoding. * * @param[in,out] event Event bus with raw data where we will put the digis */ - void analyze(const framework::Event& event) final override; + void analyze(const framework::Event& event) override; private: /// buffer object name on event bus diff --git a/Packing/include/Packing/SingleSubsystemUnpacker.h b/Packing/include/Packing/SingleSubsystemUnpacker.h index aae01fec4..63f86cff9 100644 --- a/Packing/include/Packing/SingleSubsystemUnpacker.h +++ b/Packing/include/Packing/SingleSubsystemUnpacker.h @@ -27,16 +27,16 @@ class SingleSubsystemUnpacker : public framework::Producer { * * @param[in] ps Parameters for configuration */ - void configure(framework::config::Parameters& ps) final override; + void configure(framework::config::Parameters& ps) override; /** * Actually do the unpacking/decoding. * * @param[in,out] event Event bus with raw data where we will put the digis */ - void produce(framework::Event& event) final override; + void produce(framework::Event& event) override; - void beforeNewRun(ldmx::RunHeader& rh) final override; + void beforeNewRun(ldmx::RunHeader& rh) override; private: /// number of bytes in each event diff --git a/Recon/include/Recon/BeamElectronLocator.h b/Recon/include/Recon/BeamElectronLocator.h index c07967eb8..c0f20c4de 100644 --- a/Recon/include/Recon/BeamElectronLocator.h +++ b/Recon/include/Recon/BeamElectronLocator.h @@ -46,19 +46,19 @@ class BeamElectronLocator : public framework::Producer { * * @param parameters Set of parameters used to configure this processor. */ - void configure(framework::config::Parameters ¶meters) final override; + void configure(framework::config::Parameters ¶meters) override; /** * Prints the configuration to log in debug mode */ - void onProcessStart() final override; + void onProcessStart() override; /** * Process the event and put new data products into it. * * @param event The event to process. */ - void produce(framework::Event &event) final override; + void produce(framework::Event &event) override; private: /** diff --git a/Recon/include/Recon/ElectronCounter.h b/Recon/include/Recon/ElectronCounter.h index f53ef23ff..9c2b9489f 100644 --- a/Recon/include/Recon/ElectronCounter.h +++ b/Recon/include/Recon/ElectronCounter.h @@ -42,14 +42,14 @@ class ElectronCounter : public framework::Producer { * * @param parameters Set of parameters used to configure this processor. */ - void configure(framework::config::Parameters ¶meters) final override; + void configure(framework::config::Parameters ¶meters) override; /** * Process the event and put new data products into it. * * @param event The event to process. */ - void produce(framework::Event &event) final override; + void produce(framework::Event &event) override; private: /** diff --git a/SimCore/include/SimCore/BiasOperators/DarkBrem.h b/SimCore/include/SimCore/BiasOperators/DarkBrem.h index c747e922c..5c9fac2dd 100644 --- a/SimCore/include/SimCore/BiasOperators/DarkBrem.h +++ b/SimCore/include/SimCore/BiasOperators/DarkBrem.h @@ -45,7 +45,7 @@ class DarkBrem : public XsecBiasingOperator { */ G4VBiasingOperation* ProposeOccurenceBiasingOperation( const G4Track* track, - const G4BiasingProcessInterface* callingProcess) final override; + const G4BiasingProcessInterface* callingProcess) override; /// Return the name of the process this operator biases std::string getProcessToBias() const override { diff --git a/SimCore/include/SimCore/BiasOperators/ElectroNuclear.h b/SimCore/include/SimCore/BiasOperators/ElectroNuclear.h index 297c27209..6ffc20048 100644 --- a/SimCore/include/SimCore/BiasOperators/ElectroNuclear.h +++ b/SimCore/include/SimCore/BiasOperators/ElectroNuclear.h @@ -28,7 +28,7 @@ class ElectroNuclear : public XsecBiasingOperator { */ G4VBiasingOperation* ProposeOccurenceBiasingOperation( const G4Track* track, - const G4BiasingProcessInterface* callingProcess) final override; + const G4BiasingProcessInterface* callingProcess) override; /// Return the process to bias std::string getProcessToBias() const override { return "electronNuclear"; } diff --git a/SimCore/include/SimCore/BiasOperators/GammaToMuPair.h b/SimCore/include/SimCore/BiasOperators/GammaToMuPair.h index 9085a64f5..83970e3d6 100644 --- a/SimCore/include/SimCore/BiasOperators/GammaToMuPair.h +++ b/SimCore/include/SimCore/BiasOperators/GammaToMuPair.h @@ -28,7 +28,7 @@ class GammaToMuPair : public XsecBiasingOperator { */ G4VBiasingOperation* ProposeOccurenceBiasingOperation( const G4Track* track, - const G4BiasingProcessInterface* callingProcess) final override; + const G4BiasingProcessInterface* callingProcess) override; /// Return the process to bias std::string getProcessToBias() const override { return "GammaToMuPair"; } diff --git a/SimCore/include/SimCore/BiasOperators/K0LongInelastic.h b/SimCore/include/SimCore/BiasOperators/K0LongInelastic.h index e20762037..bdf3478e1 100644 --- a/SimCore/include/SimCore/BiasOperators/K0LongInelastic.h +++ b/SimCore/include/SimCore/BiasOperators/K0LongInelastic.h @@ -28,7 +28,7 @@ class K0LongInelastic : public XsecBiasingOperator { */ G4VBiasingOperation* ProposeOccurenceBiasingOperation( const G4Track* track, - const G4BiasingProcessInterface* callingProcess) final override; + const G4BiasingProcessInterface* callingProcess) override; /// Return the process to bias std::string getProcessToBias() const override { return "kaon0LInelastic"; } diff --git a/SimCore/include/SimCore/BiasOperators/NeutronInelastic.h b/SimCore/include/SimCore/BiasOperators/NeutronInelastic.h index 4dd872740..f71df881a 100644 --- a/SimCore/include/SimCore/BiasOperators/NeutronInelastic.h +++ b/SimCore/include/SimCore/BiasOperators/NeutronInelastic.h @@ -28,7 +28,7 @@ class NeutronInelastic : public XsecBiasingOperator { */ G4VBiasingOperation* ProposeOccurenceBiasingOperation( const G4Track* track, - const G4BiasingProcessInterface* callingProcess) final override; + const G4BiasingProcessInterface* callingProcess) override; /// Return the process to bias std::string getProcessToBias() const override { return "neutronInelastic"; } diff --git a/SimCore/include/SimCore/BiasOperators/PhotoNuclear.h b/SimCore/include/SimCore/BiasOperators/PhotoNuclear.h index 7accfca2b..28d8bcdb0 100644 --- a/SimCore/include/SimCore/BiasOperators/PhotoNuclear.h +++ b/SimCore/include/SimCore/BiasOperators/PhotoNuclear.h @@ -24,7 +24,7 @@ class PhotoNuclear : public XsecBiasingOperator { */ G4VBiasingOperation* ProposeOccurenceBiasingOperation( const G4Track* track, - const G4BiasingProcessInterface* callingProcess) final override; + const G4BiasingProcessInterface* callingProcess) override; /// return the process we want to bias std::string getProcessToBias() const override { return "photonNuclear"; } diff --git a/SimCore/include/SimCore/Factory.h b/SimCore/include/SimCore/Factory.h index 9f6db616d..91510aae9 100644 --- a/SimCore/include/SimCore/Factory.h +++ b/SimCore/include/SimCore/Factory.h @@ -112,7 +112,7 @@ namespace simcore { * namespace library { * class Book : public LibraryEntry { * public : - * virtual std::string name() final override { + * virtual std::string name() override { * return "Where the Red Fern Grows"; * } * }; @@ -128,7 +128,7 @@ namespace simcore { * namespace audio { * class Podcast : public LibraryEntry { * public : - * virtual std::string name() final override { + * virtual std::string name() override { * return "538 Politics Podcast"; * } * }; @@ -145,7 +145,7 @@ namespace simcore { * namespace audio { * class Album : public LibraryEntry { * public : - * virtual std::string name() final override { + * virtual std::string name() override { * return "Kind of Blue"; * } * }; diff --git a/SimCore/include/SimCore/G4User/PrimaryGeneratorAction.h b/SimCore/include/SimCore/G4User/PrimaryGeneratorAction.h index 6c2bce753..41f87d141 100644 --- a/SimCore/include/SimCore/G4User/PrimaryGeneratorAction.h +++ b/SimCore/include/SimCore/G4User/PrimaryGeneratorAction.h @@ -78,7 +78,7 @@ class PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction { * * @param event The Geant4 event. */ - void GeneratePrimaries(G4Event* event) final override; + void GeneratePrimaries(G4Event* event) override; private: /** diff --git a/SimCore/include/SimCore/G4User/SteppingAction.h b/SimCore/include/SimCore/G4User/SteppingAction.h index a0cf67d81..f3a952558 100644 --- a/SimCore/include/SimCore/G4User/SteppingAction.h +++ b/SimCore/include/SimCore/G4User/SteppingAction.h @@ -38,7 +38,7 @@ class SteppingAction : public G4UserSteppingAction { * * @param step The Geant4 step. */ - void UserSteppingAction(const G4Step* step) final override; + void UserSteppingAction(const G4Step* step) override; /** * Register a user action of type SteppingAction with this class. diff --git a/SimCore/include/SimCore/Generators/GeneralParticleSource.h b/SimCore/include/SimCore/Generators/GeneralParticleSource.h index 99d0824e6..6de630304 100644 --- a/SimCore/include/SimCore/Generators/GeneralParticleSource.h +++ b/SimCore/include/SimCore/Generators/GeneralParticleSource.h @@ -48,8 +48,8 @@ class GeneralParticleSource : public simcore::PrimaryGenerator { * * @param event The Geant4 event. */ - void GeneratePrimaryVertex(G4Event* event) final override; - void RecordConfig(const std::string& id, ldmx::RunHeader& rh) final override; + void GeneratePrimaryVertex(G4Event* event) override; + void RecordConfig(const std::string& id, ldmx::RunHeader& rh) override; private: /** diff --git a/SimCore/include/SimCore/Generators/LHEPrimaryGenerator.h b/SimCore/include/SimCore/Generators/LHEPrimaryGenerator.h index 6dfea2ad8..34d5532d3 100644 --- a/SimCore/include/SimCore/Generators/LHEPrimaryGenerator.h +++ b/SimCore/include/SimCore/Generators/LHEPrimaryGenerator.h @@ -39,9 +39,9 @@ class LHEPrimaryGenerator : public simcore::PrimaryGenerator { * Generate vertices in the Geant4 event. * @param anEvent The Geant4 event. */ - void GeneratePrimaryVertex(G4Event* anEvent) final override; + void GeneratePrimaryVertex(G4Event* anEvent) override; - void RecordConfig(const std::string& id, ldmx::RunHeader& rh) final override; + void RecordConfig(const std::string& id, ldmx::RunHeader& rh) override; private: /** diff --git a/SimCore/include/SimCore/Generators/MultiParticleGunPrimaryGenerator.h b/SimCore/include/SimCore/Generators/MultiParticleGunPrimaryGenerator.h index fdd72317d..58bda5b35 100644 --- a/SimCore/include/SimCore/Generators/MultiParticleGunPrimaryGenerator.h +++ b/SimCore/include/SimCore/Generators/MultiParticleGunPrimaryGenerator.h @@ -74,9 +74,9 @@ class MultiParticleGunPrimaryGenerator : public simcore::PrimaryGenerator { * * @param anEvent The Geant4 event. */ - void GeneratePrimaryVertex(G4Event* anEvent) final override; + void GeneratePrimaryVertex(G4Event* anEvent) override; - void RecordConfig(const std::string& id, ldmx::RunHeader& rh) final override; + void RecordConfig(const std::string& id, ldmx::RunHeader& rh) override; private: /** Random number generator. */ diff --git a/SimCore/include/SimCore/Generators/ParticleGun.h b/SimCore/include/SimCore/Generators/ParticleGun.h index 26c20ffac..77572a350 100644 --- a/SimCore/include/SimCore/Generators/ParticleGun.h +++ b/SimCore/include/SimCore/Generators/ParticleGun.h @@ -53,9 +53,9 @@ class ParticleGun : public simcore::PrimaryGenerator { * * @param event The Geant4 event. */ - void GeneratePrimaryVertex(G4Event* event) final override; + void GeneratePrimaryVertex(G4Event* event) override; - void RecordConfig(const std::string& id, ldmx::RunHeader& rh) final override; + void RecordConfig(const std::string& id, ldmx::RunHeader& rh) override; private: /** diff --git a/SimCore/include/SimCore/Geo/GDMLParser.h b/SimCore/include/SimCore/Geo/GDMLParser.h index 49a0864b1..feae38104 100644 --- a/SimCore/include/SimCore/Geo/GDMLParser.h +++ b/SimCore/include/SimCore/Geo/GDMLParser.h @@ -43,7 +43,7 @@ class GDMLParser : public Parser { * * @return The world volume. */ - G4VPhysicalVolume *GetWorldVolume() final override; + G4VPhysicalVolume *GetWorldVolume() override; /** * Get the name of the parsed detector. @@ -53,12 +53,12 @@ class GDMLParser : public Parser { * * @return The name of the detector. */ - std::string getDetectorName() final override { return detector_name_; } + std::string getDetectorName() override { return detector_name_; } /** * Parse the detector geometry and read it into memory. */ - void read() final override; + void read() override; /** * Create an instance of this parser. diff --git a/SimCore/include/SimCore/ReSimulator.h b/SimCore/include/SimCore/ReSimulator.h index 7ecf2b450..1e84d5eb4 100644 --- a/SimCore/include/SimCore/ReSimulator.h +++ b/SimCore/include/SimCore/ReSimulator.h @@ -16,7 +16,7 @@ class ReSimulator : public SimulatorBase { * * @param parameters ParameterSet for configuration. */ - void configure(framework::config::Parameters& parameters) final override; + void configure(framework::config::Parameters& parameters) override; /** * Run resimulation if the event is part of the requested sets of events to * resimulate diff --git a/SimCore/include/SimCore/SDs/EcalSD.h b/SimCore/include/SimCore/SDs/EcalSD.h index e26a5a922..3111f0c51 100644 --- a/SimCore/include/SimCore/SDs/EcalSD.h +++ b/SimCore/include/SimCore/SDs/EcalSD.h @@ -51,7 +51,7 @@ class EcalSD : public SensitiveDetector { * * @note Dependent on names defined in GDML! */ - virtual bool isSensDet(G4LogicalVolume* vol) const final override { + virtual bool isSensDet(G4LogicalVolume* vol) const override { auto region = vol->GetRegion(); if (region and region->GetName().contains("CalorimeterRegion")) { return vol->GetName().contains("Si"); @@ -64,17 +64,17 @@ class EcalSD : public SensitiveDetector { * @param aStep The step information. * @param ROhist The readout history. */ - G4bool ProcessHits(G4Step* aStep, G4TouchableHistory* ROhist) final override; + G4bool ProcessHits(G4Step* aStep, G4TouchableHistory* ROhist) override; /** * Add our hits to the event bus. */ - virtual void saveHits(framework::Event& event) final override; + virtual void saveHits(framework::Event& event) override; /** * Clear the map of hits we have accumulated */ - virtual void OnFinishedEvent() final override { hits_.clear(); } + virtual void OnFinishedEvent() override { hits_.clear(); } private: /// map of hits to add to the event (will be squashed) diff --git a/SimCore/include/SimCore/SDs/HcalSD.h b/SimCore/include/SimCore/SDs/HcalSD.h index c1eddc39d..3c1cc48aa 100644 --- a/SimCore/include/SimCore/SDs/HcalSD.h +++ b/SimCore/include/SimCore/SDs/HcalSD.h @@ -46,7 +46,7 @@ class HcalSD : public SensitiveDetector { * to contain to "CalorimeterRegion" and b) the volume name contains one of * the identifiers in the gdml_identifiers parameter */ - bool isSensDet(G4LogicalVolume* volume) const final override { + bool isSensDet(G4LogicalVolume* volume) const override { auto region = volume->GetRegion(); if (region and region->GetName().contains("CalorimeterRegion")) { const auto name{volume->GetName()}; @@ -78,16 +78,16 @@ class HcalSD : public SensitiveDetector { * @param[in] history The readout history. */ virtual G4bool ProcessHits(G4Step* aStep, - G4TouchableHistory* ROhist) final override; + G4TouchableHistory* ROhist) override; /** * Add our hits to the event bus and then reset the container */ - virtual void saveHits(framework::Event& event) final override { + virtual void saveHits(framework::Event& event) override { event.add(COLLECTION_NAME, hits_); } - virtual void OnFinishedEvent() final override { hits_.clear(); } + virtual void OnFinishedEvent() override { hits_.clear(); } private: // A list of identifiers used to find out whether or not a given logical diff --git a/SimCore/include/SimCore/SDs/ScoringPlaneSD.h b/SimCore/include/SimCore/SDs/ScoringPlaneSD.h index cf12b9f59..5a524372e 100644 --- a/SimCore/include/SimCore/SDs/ScoringPlaneSD.h +++ b/SimCore/include/SimCore/SDs/ScoringPlaneSD.h @@ -28,7 +28,7 @@ class ScoringPlaneSD : public SensitiveDetector { /** * Check if the input logical volume is a scoring plane we should include. */ - bool isSensDet(G4LogicalVolume* volume) const final override { + bool isSensDet(G4LogicalVolume* volume) const override { return volume->GetName().contains(match_substr_); } @@ -40,8 +40,7 @@ class ScoringPlaneSD : public SensitiveDetector { * @param[in] step the step that happened within one of our logical volumes * @param[in] hist the touchable history of the step */ - virtual G4bool ProcessHits(G4Step* step, - G4TouchableHistory* hist) final override; + virtual G4bool ProcessHits(G4Step* step, G4TouchableHistory* hist) override; /** * We are given the event bus here and we must decide @@ -49,9 +48,9 @@ class ScoringPlaneSD : public SensitiveDetector { * * @param[in,out] event event bus to add thing(s) to */ - virtual void saveHits(framework::Event& event) final override; + virtual void saveHits(framework::Event& event) override; - virtual void OnFinishedEvent() final override { hits_.clear(); } + virtual void OnFinishedEvent() override { hits_.clear(); } private: /// Substring to match to logical volumes diff --git a/SimCore/include/SimCore/SDs/TrackerSD.h b/SimCore/include/SimCore/SDs/TrackerSD.h index 74e395bd4..c90102562 100644 --- a/SimCore/include/SimCore/SDs/TrackerSD.h +++ b/SimCore/include/SimCore/SDs/TrackerSD.h @@ -31,7 +31,7 @@ class TrackerSD : public SensitiveDetector { * * @note This is dependent on the naming convention in the GDML! */ - virtual bool isSensDet(G4LogicalVolume* volume) const final override { + virtual bool isSensDet(G4LogicalVolume* volume) const override { return (volume->GetName().contains("Sensor") and volume->GetName().contains(subsystem_)); } @@ -47,11 +47,11 @@ class TrackerSD : public SensitiveDetector { /** * Add the hits to the event and then reset the container */ - virtual void saveHits(framework::Event& event) final override { + virtual void saveHits(framework::Event& event) override { event.add(collection_name_, hits_); } - virtual void OnFinishedEvent() final override { hits_.clear(); } + virtual void OnFinishedEvent() override { hits_.clear(); } private: /// The name of the subsystem we are apart of diff --git a/SimCore/include/SimCore/SDs/TrigScintSD.h b/SimCore/include/SimCore/SDs/TrigScintSD.h index 5c3892065..67091432e 100644 --- a/SimCore/include/SimCore/SDs/TrigScintSD.h +++ b/SimCore/include/SimCore/SDs/TrigScintSD.h @@ -34,7 +34,7 @@ class TrigScintSD : public SensitiveDetector { * we intentionally exclude volumes with the string 'sp_' in * their names. */ - virtual bool isSensDet(G4LogicalVolume* vol) const final override { + virtual bool isSensDet(G4LogicalVolume* vol) const override { return vol->GetName().contains(vol_name_) and not vol->GetName().contains("sp_"); } @@ -45,16 +45,16 @@ class TrigScintSD : public SensitiveDetector { * @param[in] step The step information. * @param[in] history The readout history. */ - G4bool ProcessHits(G4Step* step, G4TouchableHistory* history) final override; + G4bool ProcessHits(G4Step* step, G4TouchableHistory* history) override; /** * Save our hits collection into the event bus and reset it. */ - virtual void saveHits(framework::Event& event) final override { + virtual void saveHits(framework::Event& event) override { event.add(collection_name_, hits_); } - virtual void OnFinishedEvent() final override { hits_.clear(); } + virtual void OnFinishedEvent() override { hits_.clear(); } private: /// our collection of hits in this SD diff --git a/SimCore/include/SimCore/Simulator.h b/SimCore/include/SimCore/Simulator.h index 6ecb45530..21fc0071a 100644 --- a/SimCore/include/SimCore/Simulator.h +++ b/SimCore/include/SimCore/Simulator.h @@ -69,7 +69,7 @@ class Simulator : public SimulatorBase { * * @param parameters ParameterSet for configuration. */ - void configure(framework::config::Parameters& parameters) final override; + void configure(framework::config::Parameters& parameters) override; /** * Given a non-const reference to the new RunHeader, @@ -78,7 +78,7 @@ class Simulator : public SimulatorBase { * * @param header of new run */ - void beforeNewRun(ldmx::RunHeader& header) final override; + void beforeNewRun(ldmx::RunHeader& header) override; /** * Before the run starts (but after the conditions are configured) @@ -86,17 +86,17 @@ class Simulator : public SimulatorBase { * * @param[in] header RunHeader for this run, unused */ - void onNewRun(const ldmx::RunHeader& header) final override; + void onNewRun(const ldmx::RunHeader& header) override; /** * Run simulation and export results to output event. * * @param event The event to process. */ - virtual void produce(framework::Event& event) final override; + virtual void produce(framework::Event& event) override; /// Callback called once processing is complete. - void onProcessEnd() final override; + void onProcessEnd() override; private: /** diff --git a/SimCore/include/SimCore/UserEventInformation.h b/SimCore/include/SimCore/UserEventInformation.h index 65e9e0080..162ab33ed 100644 --- a/SimCore/include/SimCore/UserEventInformation.h +++ b/SimCore/include/SimCore/UserEventInformation.h @@ -16,7 +16,7 @@ class UserEventInformation : public G4VUserEventInformation { virtual ~UserEventInformation() = default; /// Print the information associated with the track - void Print() const final override; + void Print() const override; /// Increment the number of brem candidates in an event. void incBremCandidateCount() { bremCandidateCount_ += 1; } diff --git a/SimCore/include/SimCore/UserTrackInformation.h b/SimCore/include/SimCore/UserTrackInformation.h index 89c33a6f9..41f7d438c 100644 --- a/SimCore/include/SimCore/UserTrackInformation.h +++ b/SimCore/include/SimCore/UserTrackInformation.h @@ -48,7 +48,7 @@ class UserTrackInformation : public G4VUserTrackInformation { void initialize(const G4Track* track); /// Print the information associated with the track. - void Print() const final override; + void Print() const override; /** * Get the flag which indicates whether this track should be saved diff --git a/Tracking/include/Tracking/Reco/CustomStatePropagator.h b/Tracking/include/Tracking/Reco/CustomStatePropagator.h index 32eeeb236..ed7ae7c54 100644 --- a/Tracking/include/Tracking/Reco/CustomStatePropagator.h +++ b/Tracking/include/Tracking/Reco/CustomStatePropagator.h @@ -39,12 +39,12 @@ class CustomStatePropagator : public framework::Producer { CustomStatePropagator(const std::string& name, framework::Process& process); ~CustomStatePropagator(); - void onProcessStart() final override; - void onProcessEnd() final override; + void onProcessStart() override; + void onProcessEnd() override; - void configure(framework::config::Parameters& parameters) final override; + void configure(framework::config::Parameters& parameters) override; - void produce(framework::Event& event){}; + void produce(framework::Event& event) override{}; void fillTree(int state, int q, const Acts::Vector3 gen_pos, const Acts::Vector3 gen_mom, diff --git a/Tracking/include/Tracking/Reco/DigitizationProcessor.h b/Tracking/include/Tracking/Reco/DigitizationProcessor.h index f47fa462e..548143178 100644 --- a/Tracking/include/Tracking/Reco/DigitizationProcessor.h +++ b/Tracking/include/Tracking/Reco/DigitizationProcessor.h @@ -31,9 +31,9 @@ class DigitizationProcessor : public TrackingGeometryUser { DigitizationProcessor(const std::string& name, framework::Process& process); ~DigitizationProcessor() = default; - void onProcessStart() final override; + void onProcessStart() override; - void configure(framework::config::Parameters& parameters) final override; + void configure(framework::config::Parameters& parameters) override; /** * Before the run starts (but after the conditions are configured) @@ -41,9 +41,9 @@ class DigitizationProcessor : public TrackingGeometryUser { * * @param[in] header RunHeader for this run, unused */ - void onNewRun(const ldmx::RunHeader& header) final override; + void onNewRun(const ldmx::RunHeader& header) override; - void produce(framework::Event& event); + void produce(framework::Event& event) override; /** * Does basic digitization of SimTrackerHits. For now, this simply uses the diff --git a/Tracking/include/Tracking/Reco/SeedFinderProcessor.h b/Tracking/include/Tracking/Reco/SeedFinderProcessor.h index fa333bcf4..cfd894788 100644 --- a/Tracking/include/Tracking/Reco/SeedFinderProcessor.h +++ b/Tracking/include/Tracking/Reco/SeedFinderProcessor.h @@ -55,19 +55,19 @@ class SeedFinderProcessor : public TrackingGeometryUser { /** * */ - void onProcessStart() final override; + void onProcessStart() override; /** * */ - void onProcessEnd() final override; + void onProcessEnd() override; /** * Configure the processor using the given user specified parameters. * * @param parameters Set of parameters used to configure this processor. */ - void configure(framework::config::Parameters& parameters) final override; + void configure(framework::config::Parameters& parameters) override; /** * Run the processor and create a collection of results which @@ -75,7 +75,7 @@ class SeedFinderProcessor : public TrackingGeometryUser { * * @param event The event to process. */ - void produce(framework::Event& event); + void produce(framework::Event& event) override; bool GroupStrips(const std::vector& measurements, const std::vector strategy); diff --git a/Tracking/include/Tracking/Reco/TrackExtrapolatorTool.h b/Tracking/include/Tracking/Reco/TrackExtrapolatorTool.h index 81acbac1a..5057cc0e8 100644 --- a/Tracking/include/Tracking/Reco/TrackExtrapolatorTool.h +++ b/Tracking/include/Tracking/Reco/TrackExtrapolatorTool.h @@ -187,8 +187,6 @@ class TrackExtrapolatorTool { return std::nullopt; } - /** - /** Create an ldmx::TrackState to the extrapolated position @param Acts::Track @param extrapolation surface diff --git a/Tracking/include/Tracking/Reco/TruthSeedProcessor.h b/Tracking/include/Tracking/Reco/TruthSeedProcessor.h index 55364d3ea..2c570fa78 100644 --- a/Tracking/include/Tracking/Reco/TruthSeedProcessor.h +++ b/Tracking/include/Tracking/Reco/TruthSeedProcessor.h @@ -64,14 +64,14 @@ class TruthSeedProcessor : public TrackingGeometryUser { * * @param parameters Parameters for configuration. */ - void configure(framework::config::Parameters& parameters) final override; + void configure(framework::config::Parameters& parameters) override; /** * Callback for the EventProcessor to take any necessary action when the * processing of events starts. For this class, the callback is used to * retrieve the GeometryContext from ACTS. */ - void onProcessStart() final override{}; + void onProcessStart() override{}; /** * onNewRun is the first function called for each processor @@ -87,7 +87,7 @@ class TruthSeedProcessor : public TrackingGeometryUser { * * @param event The event containing the collections to process. */ - void produce(framework::Event& event) final override; + void produce(framework::Event& event) override; private: /** diff --git a/Tracking/include/Tracking/Reco/VertexProcessor.h b/Tracking/include/Tracking/Reco/VertexProcessor.h index 43e68658a..0419e7935 100644 --- a/Tracking/include/Tracking/Reco/VertexProcessor.h +++ b/Tracking/include/Tracking/Reco/VertexProcessor.h @@ -56,31 +56,24 @@ class VertexProcessor : public framework::Producer { VertexProcessor(const std::string &name, framework::Process &process); /// Destructor - ~VertexProcessor(); + ~VertexProcessor() = default; - /** - * - */ - void onProcessStart() final override; - - /** - * - */ - void onProcessEnd() final override; + void onProcessStart() override; + void onProcessEnd() override; /** * Configure the processor using the given user specified parameters. * * @param parameters Set of parameters used to configure this processor. */ - void configure(framework::config::Parameters ¶meters) final override; + void configure(framework::config::Parameters ¶meters) override; /** * Run the processor * * @param event The event to process. */ - void produce(framework::Event &event); + void produce(framework::Event &event) override; private: /// The contexts - TODO: they should move to some global location, I guess diff --git a/Tracking/include/Tracking/Reco/Vertexer.h b/Tracking/include/Tracking/Reco/Vertexer.h index 59bf1127a..45fcbafa2 100644 --- a/Tracking/include/Tracking/Reco/Vertexer.h +++ b/Tracking/include/Tracking/Reco/Vertexer.h @@ -49,14 +49,14 @@ class Vertexer : public framework::Producer { public: Vertexer(const std::string& name, framework::Process& process); - ~Vertexer(); + ~Vertexer() = default; - void onProcessStart() final override; - void onProcessEnd() final override; + void onProcessStart() override; + void onProcessEnd() override; - void configure(framework::config::Parameters& parameters) final override; + void configure(framework::config::Parameters& parameters) override; - void produce(framework::Event& event); + void produce(framework::Event& event) override; void TaggerRecoilMonitoring(const std::vector& tagger_tracks, const std::vector& recoil_tracks); diff --git a/Tracking/include/Tracking/dqm/TrackerDigiDQM.h b/Tracking/include/Tracking/dqm/TrackerDigiDQM.h index d6d0845e4..e86648aaa 100644 --- a/Tracking/include/Tracking/dqm/TrackerDigiDQM.h +++ b/Tracking/include/Tracking/dqm/TrackerDigiDQM.h @@ -18,6 +18,6 @@ class TrackerDigiDQM : public framework::Analyzer { /** * */ - void analyze(const framework::Event& event) final override; + void analyze(const framework::Event& event) override; }; } // namespace tracking::dqm diff --git a/Tracking/include/Tracking/dqm/TrackingRecoDQM.h b/Tracking/include/Tracking/dqm/TrackingRecoDQM.h index ef8273b66..fe97b1890 100644 --- a/Tracking/include/Tracking/dqm/TrackingRecoDQM.h +++ b/Tracking/include/Tracking/dqm/TrackingRecoDQM.h @@ -28,7 +28,7 @@ class TrackingRecoDQM : public framework::Analyzer { /// Destructor ~TrackingRecoDQM() = default; - void analyze(const framework::Event& event) final override; + void analyze(const framework::Event& event) override; void TrackMonitoring(const std::vector& tracks, const std::string title, const bool& doDetail, diff --git a/Tracking/src/Tracking/Reco/VertexProcessor.cxx b/Tracking/src/Tracking/Reco/VertexProcessor.cxx index a5310cb2c..8c1d6a081 100644 --- a/Tracking/src/Tracking/Reco/VertexProcessor.cxx +++ b/Tracking/src/Tracking/Reco/VertexProcessor.cxx @@ -13,8 +13,6 @@ VertexProcessor::VertexProcessor(const std::string &name, framework::Process &process) : framework::Producer(name, process) {} -VertexProcessor::~VertexProcessor() {} - void VertexProcessor::onProcessStart() { gctx_ = Acts::GeometryContext(); bctx_ = Acts::MagneticFieldContext(); diff --git a/Tracking/src/Tracking/Reco/Vertexer.cxx b/Tracking/src/Tracking/Reco/Vertexer.cxx index a21f5d9c1..3a3f6f4d9 100644 --- a/Tracking/src/Tracking/Reco/Vertexer.cxx +++ b/Tracking/src/Tracking/Reco/Vertexer.cxx @@ -17,8 +17,6 @@ namespace reco { Vertexer::Vertexer(const std::string& name, framework::Process& process) : framework::Producer(name, process) {} -Vertexer::~Vertexer() {} - void Vertexer::onProcessStart() { // Monitoring plots diff --git a/TrigScint/include/TrigScint/EventReadoutProducer.h b/TrigScint/include/TrigScint/EventReadoutProducer.h index 9bb2202ff..5cbb13403 100644 --- a/TrigScint/include/TrigScint/EventReadoutProducer.h +++ b/TrigScint/include/TrigScint/EventReadoutProducer.h @@ -35,7 +35,7 @@ class EventReadoutProducer : public framework::Producer { public: EventReadoutProducer(const std::string& name, framework::Process& process); - ~EventReadoutProducer(); + ~EventReadoutProducer() = default; /** * Callback for the processor to configure itself from the given set @@ -43,9 +43,9 @@ class EventReadoutProducer : public framework::Producer { * * @param parameters ParameterSet for configuration. */ - void configure(framework::config::Parameters& parameters) final override; + void configure(framework::config::Parameters& parameters) override; - void produce(framework::Event& event); + void produce(framework::Event& event) override; private: /// Class to set the verbosity level. diff --git a/TrigScint/include/TrigScint/QIEInputPulse.h b/TrigScint/include/TrigScint/QIEInputPulse.h index 8d946823d..acaab141b 100644 --- a/TrigScint/include/TrigScint/QIEInputPulse.h +++ b/TrigScint/include/TrigScint/QIEInputPulse.h @@ -82,7 +82,7 @@ class Bimoid : public QIEInputPulse { /** * Evaluate the pulse at time T */ - float EvalSingle(float T, int id) final override; + float EvalSingle(float T, int id) override; /** * Indefinite integral at time T @@ -92,17 +92,17 @@ class Bimoid : public QIEInputPulse { /** * Integrate the pulse from T1 to T2 */ - float Integrate(float T1, float T2) final override; + float Integrate(float T1, float T2) override; /** * maximum of the pulse */ - float Max(int id) final override; + float Max(int id) override; /** * Differentiate pulse at time T */ - float Derivative(float T, int id) final override; + float Derivative(float T, int id) override; private: /// rise time @@ -157,22 +157,22 @@ class Expo : public QIEInputPulse { /** * Evaluate the pulse at time T */ - float EvalSingle(float T, int id) final override; + float EvalSingle(float T, int id) override; /** * Integrate the pulse from T1 to T2 */ - float Integrate(float T1, float T2) final override; + float Integrate(float T1, float T2) override; /** * maximum of the pulse */ - float Max(int id) final override; + float Max(int id) override; /** * Differentiate pulse at time T */ - float Derivative(float T, int id) final override; + float Derivative(float T, int id) override; private: /// 1/RC time constant (for the capacitor) diff --git a/TrigScint/include/TrigScint/TestBeamHitProducer.h b/TrigScint/include/TrigScint/TestBeamHitProducer.h index e9662f096..623c00632 100644 --- a/TrigScint/include/TrigScint/TestBeamHitProducer.h +++ b/TrigScint/include/TrigScint/TestBeamHitProducer.h @@ -40,9 +40,9 @@ class TestBeamHitProducer : public framework::Producer { * * @param parameters ParameterSet for configuration. */ - void configure(framework::config::Parameters& parameters) final override; + void configure(framework::config::Parameters& parameters) override; - void produce(framework::Event& event); + void produce(framework::Event& event) override; private: /// Set the local verbosity level. diff --git a/TrigScint/include/TrigScint/TrigScintDigiProducer.h b/TrigScint/include/TrigScint/TrigScintDigiProducer.h index fdc7d587f..a1be4db18 100644 --- a/TrigScint/include/TrigScint/TrigScintDigiProducer.h +++ b/TrigScint/include/TrigScint/TrigScintDigiProducer.h @@ -46,7 +46,7 @@ class TrigScintDigiProducer : public framework::Producer { TrigScintDigiProducer(const std::string& name, framework::Process& process); - ~TrigScintDigiProducer(); + ~TrigScintDigiProducer() = default; /** * Callback for the processor to configure itself from the given set @@ -54,9 +54,9 @@ class TrigScintDigiProducer : public framework::Producer { * * @param parameters ParameterSet for configuration. */ - void configure(framework::config::Parameters& parameters) final override; + void configure(framework::config::Parameters& parameters) override; - void produce(framework::Event& event); + void produce(framework::Event& event) override; ldmx::TrigScintID generateRandomID(int module); diff --git a/TrigScint/include/TrigScint/TrigScintQIEDigiProducer.h b/TrigScint/include/TrigScint/TrigScintQIEDigiProducer.h index a02e1f0ae..c680e5dd2 100644 --- a/TrigScint/include/TrigScint/TrigScintQIEDigiProducer.h +++ b/TrigScint/include/TrigScint/TrigScintQIEDigiProducer.h @@ -56,7 +56,7 @@ class TrigScintQIEDigiProducer : public framework::Producer { * * @param parameters ParameterSet for configuration. */ - void configure(framework::config::Parameters& parameters) final override; + void configure(framework::config::Parameters& parameters) override; /** * Method to produce a collection of QIE digis. diff --git a/TrigScint/include/TrigScint/TrigScintRecHitProducer.h b/TrigScint/include/TrigScint/TrigScintRecHitProducer.h index 9b64d3776..991e8ca4b 100644 --- a/TrigScint/include/TrigScint/TrigScintRecHitProducer.h +++ b/TrigScint/include/TrigScint/TrigScintRecHitProducer.h @@ -50,9 +50,9 @@ class TrigScintRecHitProducer : public framework::Producer { * * @param parameters ParameterSet for configuration. */ - void configure(framework::config::Parameters& parameters) final override; + void configure(framework::config::Parameters& parameters) override; - void produce(framework::Event& event); + void produce(framework::Event& event) override; private: /// Class to set the verbosity level. diff --git a/TrigScint/include/TrigScint/TruthHitProducer.h b/TrigScint/include/TrigScint/TruthHitProducer.h index 99551f497..80402e5bb 100644 --- a/TrigScint/include/TrigScint/TruthHitProducer.h +++ b/TrigScint/include/TrigScint/TruthHitProducer.h @@ -32,7 +32,7 @@ class TruthHitProducer : public framework::Producer { TruthHitProducer(const std::string &name, framework::Process &process); /// Destructor - ~TruthHitProducer(); + ~TruthHitProducer() = default; /** * Configure the processor using the given user specified parameters. @@ -43,14 +43,14 @@ class TruthHitProducer : public framework::Producer { * * @param parameters Set of parameters used to configure this processor. */ - void configure(framework::config::Parameters ¶meters) final override; + void configure(framework::config::Parameters ¶meters) override; /** * Process the event and put new data products into it. * * @param event The event to process. */ - void produce(framework::Event &event); + void produce(framework::Event &event) override; /// Class to set the verbosity level. // TODO: Make use of the global verbose parameter. diff --git a/TrigScint/src/TrigScint/EventReadoutProducer.cxx b/TrigScint/src/TrigScint/EventReadoutProducer.cxx index 8075b3722..a85b6f2e7 100644 --- a/TrigScint/src/TrigScint/EventReadoutProducer.cxx +++ b/TrigScint/src/TrigScint/EventReadoutProducer.cxx @@ -10,8 +10,6 @@ EventReadoutProducer::EventReadoutProducer(const std::string &name, framework::Process &process) : Producer(name, process) {} -EventReadoutProducer::~EventReadoutProducer() {} - void EventReadoutProducer::configure( framework::config::Parameters ¶meters) { // Configure this instance of the producer diff --git a/TrigScint/src/TrigScint/QIEAnalyzer.cxx b/TrigScint/src/TrigScint/QIEAnalyzer.cxx index 99bbd2dc4..3f72f6aca 100644 --- a/TrigScint/src/TrigScint/QIEAnalyzer.cxx +++ b/TrigScint/src/TrigScint/QIEAnalyzer.cxx @@ -67,9 +67,8 @@ void QIEAnalyzer::analyze(const framework::Event& event) { ldmx_log(info) << "Found fired TDC = " << tdc.at(iT) << " at time sample " << iT << " in channel " << bar << " and event " << evNb; - hOut[evNb][bar]->SetLineColor(kRed + - 1); // for some reason, the style - // settings are washed out later... + // for some reason, the style settings are washed out later... + hOut[evNb][bar]->SetLineColor(kRed + 1); hOut[evNb][bar]->SetMarkerColor(hOut[evNb][bar]->GetLineColor()); hOut[evNb][bar]->SetMarkerSize(0.2); @@ -87,9 +86,8 @@ void QIEAnalyzer::analyze(const framework::Event& event) { ldmx_log(debug) << " above channel overall pedestal: " << q.at(iT) << " > " << 2 * fabs(peds_[bar]); - if (firstT = startSample_ - - 1) // keep track of first time sample above threshold - firstT = startSample_ + iT; + // keep track of first time sample above threshold + if (firstT == startSample_ - 1) firstT = startSample_ + iT; } // if above threshold if (q.at(iT) > ped) { subtrQ += q.at(iT) - peds_[bar]; diff --git a/TrigScint/src/TrigScint/QIEInputPulse.cxx b/TrigScint/src/TrigScint/QIEInputPulse.cxx index 48198e426..0710ce785 100644 --- a/TrigScint/src/TrigScint/QIEInputPulse.cxx +++ b/TrigScint/src/TrigScint/QIEInputPulse.cxx @@ -73,7 +73,7 @@ float Bimoid::Max(int id) { float b = 50; float mx = (a + b) / 2; // maximum - while (abs(Derivative(mx, id)) >= 1e-5) { + while (std::abs(Derivative(mx, id)) >= 1e-5) { if (Derivative(a, id) * Derivative(mx, id) > 0) { a = mx; } else diff --git a/TrigScint/src/TrigScint/TrigScintDigiProducer.cxx b/TrigScint/src/TrigScint/TrigScintDigiProducer.cxx index 5d9c6aacb..757f62d95 100644 --- a/TrigScint/src/TrigScint/TrigScintDigiProducer.cxx +++ b/TrigScint/src/TrigScint/TrigScintDigiProducer.cxx @@ -11,8 +11,6 @@ TrigScintDigiProducer::TrigScintDigiProducer(const std::string &name, framework::Process &process) : Producer(name, process) {} -TrigScintDigiProducer::~TrigScintDigiProducer() {} - void TrigScintDigiProducer::configure( framework::config::Parameters ¶meters) { // Configure this instance of the producer diff --git a/TrigScint/src/TrigScint/TruthHitProducer.cxx b/TrigScint/src/TrigScint/TruthHitProducer.cxx index c1a57b40c..787b7b0a7 100644 --- a/TrigScint/src/TrigScint/TruthHitProducer.cxx +++ b/TrigScint/src/TrigScint/TruthHitProducer.cxx @@ -7,8 +7,6 @@ TruthHitProducer::TruthHitProducer(const std::string &name, framework::Process &process) : Producer(name, process) {} -TruthHitProducer::~TruthHitProducer() {} - void TruthHitProducer::configure(framework::config::Parameters ¶meters) { inputCollection_ = parameters.getParameter("input_collection"); inputPassName_ = parameters.getParameter("input_pass_name");