Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not use GaudiAlg #25

Merged
merged 3 commits into from
Jul 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion ARCdigi/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ file(GLOB headers
gaudi_add_module(${PackageName}
SOURCES ${sources}
LINK
Gaudi::GaudiAlgLib
Gaudi::GaudiKernel
EDM4HEP::edm4hep
k4FWCore::k4FWCore
Expand Down
10 changes: 5 additions & 5 deletions ARCdigi/include/ARCdigitizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -33,7 +33,7 @@ namespace edm4hep {
*
*/

class ARCdigitizer : public GaudiAlgorithm {
class ARCdigitizer : public Gaudi::Algorithm {
public:
explicit ARCdigitizer(const std::string&, ISvcLocator*);
virtual ~ARCdigitizer();
Expand All @@ -44,17 +44,17 @@ class ARCdigitizer : public GaudiAlgorithm {
/** Execute.
* @return status code
*/
virtual StatusCode execute() final;
virtual StatusCode execute(const EventContext&) const final;
/** Finalize.
* @return status code
*/
virtual StatusCode finalize() final;

private:
// Input sim tracker hit collection name
DataHandle<edm4hep::SimTrackerHitCollection> m_input_sim_hits{"inputSimHits", Gaudi::DataHandle::Reader, this};
mutable DataHandle<edm4hep::SimTrackerHitCollection> m_input_sim_hits{"inputSimHits", Gaudi::DataHandle::Reader, this};
// Output digitized tracker hit collection name
DataHandle<edm4hep::TrackerHit3DCollection> m_output_digi_hits{"outputDigiHits", Gaudi::DataHandle::Writer, this};
mutable DataHandle<edm4hep::TrackerHit3DCollection> 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
Expand Down
4 changes: 2 additions & 2 deletions ARCdigi/src/ARCdigitizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
Expand Down Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion DCHdigi/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ file(GLOB headers
gaudi_add_module(${PackageName}
SOURCES ${sources}
LINK
Gaudi::GaudiAlgLib
Gaudi::GaudiKernel
EDM4HEP::edm4hep
extensionDict
Expand Down
10 changes: 5 additions & 5 deletions DCHdigi/include/DCHsimpleDigitizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -36,7 +36,7 @@ namespace edm4hep {
*
*/

class DCHsimpleDigitizer : public GaudiAlgorithm {
class DCHsimpleDigitizer : public Gaudi::Algorithm {
public:
explicit DCHsimpleDigitizer(const std::string&, ISvcLocator*);
virtual ~DCHsimpleDigitizer();
Expand All @@ -47,17 +47,17 @@ class DCHsimpleDigitizer : public GaudiAlgorithm {
/** Execute.
* @return status code
*/
virtual StatusCode execute() final;
virtual StatusCode execute(const EventContext&) const final;
/** Finalize.
* @return status code
*/
virtual StatusCode finalize() final;

private:
// Input sim tracker hit collection name
DataHandle<edm4hep::SimTrackerHitCollection> m_input_sim_hits{"inputSimHits", Gaudi::DataHandle::Reader, this};
mutable DataHandle<edm4hep::SimTrackerHitCollection> m_input_sim_hits{"inputSimHits", Gaudi::DataHandle::Reader, this};
// Output digitized tracker hit collection name
DataHandle<edm4hep::TrackerHit3DCollection> m_output_digi_hits{"outputDigiHits", Gaudi::DataHandle::Writer, this};
mutable DataHandle<edm4hep::TrackerHit3DCollection> m_output_digi_hits{"outputDigiHits", Gaudi::DataHandle::Writer, this};

// Detector readout name
Gaudi::Property<std::string> m_readoutName{this, "readoutName", "CDCHHits", "Name of the detector readout"};
Expand Down
22 changes: 11 additions & 11 deletions DCHdigi/include/DCHsimpleDigitizerExtendedEdm.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -33,7 +33,7 @@
*
*/

class DCHsimpleDigitizerExtendedEdm : public GaudiAlgorithm {
class DCHsimpleDigitizerExtendedEdm : public Gaudi::Algorithm {
public:
explicit DCHsimpleDigitizerExtendedEdm(const std::string&, ISvcLocator*);
virtual ~DCHsimpleDigitizerExtendedEdm();
Expand All @@ -44,21 +44,21 @@ class DCHsimpleDigitizerExtendedEdm : public GaudiAlgorithm {
/** Execute.
* @return status code
*/
virtual StatusCode execute() final;
virtual StatusCode execute(const EventContext&) const final;
/** Finalize.
* @return status code
*/
virtual StatusCode finalize() final;

private:
// Input sim tracker hit collection name
DataHandle<edm4hep::SimTrackerHitCollection> m_input_sim_hits{"inputSimHits", Gaudi::DataHandle::Reader, this};
mutable DataHandle<edm4hep::SimTrackerHitCollection> m_input_sim_hits{"inputSimHits", Gaudi::DataHandle::Reader, this};
// Output digitized tracker hit collection name
DataHandle<extension::DriftChamberDigiCollection> m_output_digi_hits{"outputDigiHits", Gaudi::DataHandle::Writer, this};
mutable DataHandle<extension::DriftChamberDigiCollection> m_output_digi_hits{"outputDigiHits", Gaudi::DataHandle::Writer, this};
// Output association between digitized and simulated hit collections
DataHandle<extension::MCRecoDriftChamberDigiAssociationCollection> m_output_sim_digi_association{"outputSimDigiAssociation", Gaudi::DataHandle::Writer, this};
mutable DataHandle<extension::MCRecoDriftChamberDigiAssociationCollection> 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<extension::DriftChamberDigiLocalCollection> m_output_digi_local_hits{"outputDigiLocalHits", Gaudi::DataHandle::Writer, this};
mutable DataHandle<extension::DriftChamberDigiLocalCollection> m_output_digi_local_hits{"outputDigiLocalHits", Gaudi::DataHandle::Writer, this};

// Detector readout name
Gaudi::Property<std::string> m_readoutName{this, "readoutName", "CDCHHits", "Name of the detector readout"};
Expand All @@ -77,10 +77,10 @@ class DCHsimpleDigitizerExtendedEdm : public GaudiAlgorithm {
// Flag to produce debugging distributions
Gaudi::Property<bool> m_debugMode{this, "debugMode", false, "Flag to produce debugging distributions"};
// Declaration of debugging distributions
DataHandle<podio::UserDataCollection<double>> m_leftHitSimHitDeltaDistToWire{"leftHitSimHitDeltaDistToWire", Gaudi::DataHandle::Writer, this}; // mm
DataHandle<podio::UserDataCollection<double>> m_leftHitSimHitDeltaLocalZ{"leftHitSimHitDeltaLocalZ", Gaudi::DataHandle::Writer, this}; // mm
DataHandle<podio::UserDataCollection<double>> m_rightHitSimHitDeltaDistToWire{"rightHitSimHitDeltaDistToWire", Gaudi::DataHandle::Writer, this}; // mm
DataHandle<podio::UserDataCollection<double>> m_rightHitSimHitDeltaLocalZ{"rightHitSimHitDeltaLocalZ", Gaudi::DataHandle::Writer, this}; // mm
mutable DataHandle<podio::UserDataCollection<double>> m_leftHitSimHitDeltaDistToWire{"leftHitSimHitDeltaDistToWire", Gaudi::DataHandle::Writer, this}; // mm
mutable DataHandle<podio::UserDataCollection<double>> m_leftHitSimHitDeltaLocalZ{"leftHitSimHitDeltaLocalZ", Gaudi::DataHandle::Writer, this}; // mm
mutable DataHandle<podio::UserDataCollection<double>> m_rightHitSimHitDeltaDistToWire{"rightHitSimHitDeltaDistToWire", Gaudi::DataHandle::Writer, this}; // mm
mutable DataHandle<podio::UserDataCollection<double>> m_rightHitSimHitDeltaLocalZ{"rightHitSimHitDeltaLocalZ", Gaudi::DataHandle::Writer, this}; // mm

// Random Number Service
IRndmGenSvc* m_randSvc;
Expand Down
4 changes: 2 additions & 2 deletions DCHdigi/src/DCHsimpleDigitizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions DCHdigi/src/DCHsimpleDigitizerExtendedEdm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion Tracking/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ file(GLOB headers
gaudi_add_module(${PackageName}
SOURCES ${sources}
LINK
Gaudi::GaudiAlgLib
Gaudi::GaudiKernel
EDM4HEP::edm4hep
k4FWCore::k4FWCore
Expand Down
10 changes: 5 additions & 5 deletions Tracking/include/GenFitter.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

// GAUDI
#include "Gaudi/Property.h"
#include "GaudiAlg/GaudiAlgorithm.h"
#include "Gaudi/Algorithm.h"

// K4FWCORE
#include "k4FWCore/DataHandle.h"
Expand Down Expand Up @@ -30,7 +30,7 @@ namespace edm4hep {
*
*/

class GenFitter : public GaudiAlgorithm {
class GenFitter : public Gaudi::Algorithm {
public:
explicit GenFitter(const std::string&, ISvcLocator*);
virtual ~GenFitter();
Expand All @@ -41,17 +41,17 @@ class GenFitter : public GaudiAlgorithm {
/** Execute.
* @return status code
*/
virtual StatusCode execute() final;
virtual StatusCode execute(const EventContext&) const final;
/** Finalize.
* @return status code
*/
virtual StatusCode finalize() final;

private:
// Input tracker hit collection name
DataHandle<edm4hep::TrackerHit3DCollection> m_input_hits{"inputHits", Gaudi::DataHandle::Reader, this};
mutable DataHandle<edm4hep::TrackerHit3DCollection> m_input_hits{"inputHits", Gaudi::DataHandle::Reader, this};
// Output track collection name
DataHandle<edm4hep::TrackCollection> m_output_tracks{"outputTracks", Gaudi::DataHandle::Writer, this};
mutable DataHandle<edm4hep::TrackCollection> m_output_tracks{"outputTracks", Gaudi::DataHandle::Writer, this};
// Transient genfit measurements used internally by genfit to run the tracking
//std::vector<genfit::WireMeasurement> m_wire_measurements;
};
4 changes: 2 additions & 2 deletions Tracking/src/GenFitter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
Expand All @@ -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;
Expand Down
1 change: 0 additions & 1 deletion VTXdigi/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ file(GLOB headers
gaudi_add_module(${PackageName}
SOURCES ${sources}
LINK
Gaudi::GaudiAlgLib
Gaudi::GaudiKernel
EDM4HEP::edm4hep
k4FWCore::k4FWCore
Expand Down
12 changes: 6 additions & 6 deletions VTXdigi/include/VTXdigitizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -38,7 +38,7 @@ namespace edm4hep {
*
*/

class VTXdigitizer : public GaudiAlgorithm {
class VTXdigitizer : public Gaudi::Algorithm {
public:
explicit VTXdigitizer(const std::string&, ISvcLocator*);
virtual ~VTXdigitizer();
Expand All @@ -49,17 +49,17 @@ class VTXdigitizer : public GaudiAlgorithm {
/** Execute.
* @return status code
*/
virtual StatusCode execute() final;
virtual StatusCode execute(const EventContext&) const final;
/** Finalize.
* @return status code
*/
virtual StatusCode finalize() final;

private:
// Input sim vertex hit collection name
DataHandle<edm4hep::SimTrackerHitCollection> m_input_sim_hits{"inputSimHits", Gaudi::DataHandle::Reader, this};
mutable DataHandle<edm4hep::SimTrackerHitCollection> m_input_sim_hits{"inputSimHits", Gaudi::DataHandle::Reader, this};
// Output digitized vertex hit collection name
DataHandle<edm4hep::TrackerHit3DCollection> m_output_digi_hits{"outputDigiHits", Gaudi::DataHandle::Writer, this};
mutable DataHandle<edm4hep::TrackerHit3DCollection> m_output_digi_hits{"outputDigiHits", Gaudi::DataHandle::Writer, this};

// Detector name
Gaudi::Property<std::string> m_detectorName{this, "detectorName", "Vertex", "Name of the detector (default: Vertex)"};
Expand All @@ -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"};
Expand Down
4 changes: 2 additions & 2 deletions VTXdigi/src/VTXdigitizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
Expand Down Expand Up @@ -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;
Expand Down
Loading