k4SimGeant4
Loading...
Searching...
No Matches
MergeCells.h
Go to the documentation of this file.
1#ifndef DETCOMPONENTS_MERGECELLS_H
2#define DETCOMPONENTS_MERGECELLS_H
3
4// GAUDI
5#include "Gaudi/Algorithm.h"
6#include "GaudiKernel/EventContext.h"
7
8// FCCSW
9#include "k4FWCore/DataHandle.h"
10class IGeoSvc;
11
12#include "DD4hep/IDDescriptor.h"
13
14// datamodel
15namespace edm4hep {
16class CalorimeterHitCollection;
17}
18
34class MergeCells : public Gaudi::Algorithm {
35public:
36 explicit MergeCells(const std::string&, ISvcLocator*);
37 virtual ~MergeCells();
41 virtual StatusCode initialize() final;
45 virtual StatusCode execute(const EventContext&) const final;
50 virtual StatusCode finalize() final;
51
52private:
54 ServiceHandle<IGeoSvc> m_geoSvc;
56 mutable DataHandle<edm4hep::CalorimeterHitCollection> m_inHits{"hits/caloInHits", Gaudi::DataHandle::Reader, this};
58 mutable DataHandle<edm4hep::CalorimeterHitCollection> m_outHits{"hits/caloOutHits", Gaudi::DataHandle::Writer, this};
59 // Handle to the detector ID descriptor
60 dd4hep::IDDescriptor m_descriptor;
62 Gaudi::Property<std::string> m_readoutName{this, "readout", "", "Name of the detector readout"};
64 Gaudi::Property<std::string> m_idToMerge{this, "identifier", "", "Identifier to be merged"};
66 Gaudi::Property<uint> m_numToMerge{this, "merge", 0, "Number of adjacent cells to be merged"};
68 Gaudi::Property<uint> m_debugPrint{this, "debugPrint", 10, "Limit of debug printing"};
69};
70#endif /* DETCOMPONENTS_MERGECELLS_H */
Merge cells for one field of the segmentation.
Definition MergeCells.h:34
virtual StatusCode execute(const EventContext &) const final
Execute.
Definition MergeCells.cpp:76
Gaudi::Property< uint > m_numToMerge
Number of adjacent cells to be merged.
Definition MergeCells.h:66
Gaudi::Property< std::string > m_idToMerge
Identifier to be merged.
Definition MergeCells.h:64
virtual StatusCode finalize() final
Finalize.
Definition MergeCells.cpp:120
DataHandle< edm4hep::CalorimeterHitCollection > m_inHits
Handle for the EDM Hits to be read.
Definition MergeCells.h:56
Gaudi::Property< std::string > m_readoutName
Name of the detector readout.
Definition MergeCells.h:62
MergeCells(const std::string &, ISvcLocator *)
Definition MergeCells.cpp:18
dd4hep::IDDescriptor m_descriptor
Definition MergeCells.h:60
Gaudi::Property< uint > m_debugPrint
Limit of debug printing.
Definition MergeCells.h:68
virtual StatusCode initialize() final
Initialize.
Definition MergeCells.cpp:25
virtual ~MergeCells()
Definition MergeCells.cpp:23
DataHandle< edm4hep::CalorimeterHitCollection > m_outHits
Handle for the EDM Hits to be written.
Definition MergeCells.h:58
ServiceHandle< IGeoSvc > m_geoSvc
Pointer to the geometry service.
Definition MergeCells.h:54
Definition EventInformation.h:10