Skip to content

Commit

Permalink
move code to RecCalorimeter, remove unused pointer to geoSvc
Browse files Browse the repository at this point in the history
  • Loading branch information
giovannimarchiori committed Sep 9, 2024
1 parent f9a1100 commit e2e3b9f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,13 @@
// k4geo
#include "detectorCommon/DetUtils_k4geo.h"

// k4FWCore
#include "k4Interface/IGeoSvc.h"

// edm4hep
#include "edm4hep/CalorimeterHit.h"

DECLARE_COMPONENT(CreatePositionedCaloCells)

CreatePositionedCaloCells::CreatePositionedCaloCells(const std::string& name, ISvcLocator* svcLoc) :
Gaudi::Algorithm(name, svcLoc), m_geoSvc("GeoSvc", name) {
Gaudi::Algorithm(name, svcLoc) {
declareProperty("hits", m_hits, "Hits from which to create cells (input)");
declareProperty("cells", m_cells, "The created calorimeter cells (output)");

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef RECFCCEECALORIMETER_CREATEPOSITIONEDCALOCELLS_H
#define RECFCCEECALORIMETER_CREATEPOSITIONEDCALOCELLS_H
#ifndef RECCALORIMETER_CREATEPOSITIONEDCALOCELLS_H
#define RECCALORIMETER_CREATEPOSITIONEDCALOCELLS_H

// k4FWCore
#include "k4FWCore/DataHandle.h"
Expand All @@ -17,9 +17,6 @@
// edm4hep
#include "edm4hep/CalorimeterHitCollection.h"
#include "edm4hep/SimCalorimeterHitCollection.h"
#include "edm4hep/Constants.h"

class IGeoSvc;

/** @class CreatePositionedCaloCells
*
Expand Down Expand Up @@ -88,9 +85,6 @@ class CreatePositionedCaloCells : public Gaudi::Algorithm {
/// Handle for calo cells (output collection)
mutable DataHandle<edm4hep::CalorimeterHitCollection> m_cells{"cells", Gaudi::DataHandle::Writer, this};
MetaDataHandle<std::string> m_cellsCellIDEncoding{m_cells, edm4hep::labels::CellIDEncoding, Gaudi::DataHandle::Writer};
/// Pointer to the geometry service (is this needed?)
ServiceHandle<IGeoSvc> m_geoSvc;
/// dd4hep::VolumeManager m_volman; (not needed)
/// Maps of cell IDs (corresponding to DD4hep IDs) on final energies to be used for clustering
mutable std::unordered_map<uint64_t, double> m_cellsMap;
/// Maps of cell IDs (corresponding to DD4hep IDs) on transfer of signals due to crosstalk
Expand All @@ -100,4 +94,4 @@ class CreatePositionedCaloCells : public Gaudi::Algorithm {
mutable std::unordered_map<dd4hep::DDSegmentation::CellID, edm4hep::Vector3f> m_positions_cache{};
};

#endif /* RECFCCEECALORIMETER_CREATEPOSITIONEDCALOCELLS_H */
#endif /* RECCALORIMETER_CREATEPOSITIONEDCALOCELLS_H */

0 comments on commit e2e3b9f

Please sign in to comment.