k4SimGeant4
Loading...
Searching...
No Matches
MergeLayers Class Reference

Merge layers (volume ids). More...

#include <MergeLayers.h>

Inheritance diagram for MergeLayers:
Collaboration diagram for MergeLayers:

Public Member Functions

 MergeLayers (const std::string &, ISvcLocator *)
 
virtual ~MergeLayers ()
 
virtual StatusCode initialize () final
 Initialize.
 
virtual StatusCode execute (const EventContext &) const final
 Execute.
 
virtual StatusCode finalize () final
 Finalize.
 

Private Attributes

ServiceHandle< IGeoSvc > m_geoSvc
 Pointer to the geometry service.
 
DataHandle< edm4hep::CalorimeterHitCollection > m_inHits {"hits/caloInHits", Gaudi::DataHandle::Reader, this}
 Handle for the EDM Hits to be read.
 
DataHandle< edm4hep::CalorimeterHitCollection > m_outHits {"hits/caloOutHits", Gaudi::DataHandle::Writer, this}
 Handle for the EDM Hits to be written.
 
dd4hep::IDDescriptor m_descriptor
 
Gaudi::Property< std::string > m_readoutName {this, "readout", "", "Name of the detector readout"}
 Name of the detector readout.
 
Gaudi::Property< std::string > m_idToMerge {this, "identifier", "", "Identifier to be merged"}
 Identifier to be merged.
 
Gaudi::Property< std::string > m_volumeName {this, "volumeName", "", "Name (or its part) of the volume"}
 Name (or its part) of the volume.
 
Gaudi::Property< std::vector< uint > > m_listToMerge
 List with number of adjacent cells to be merged.
 
Gaudi::Property< uint > m_debugPrint {this, "debugPrint", 10, "Maximum number of lines in debug output"}
 Maximum number of lines in debug output.
 

Detailed Description

Merge layers (volume ids).

Merging is performed on a collection of hits and as a result only the cellID of hit is changed (in particular, the part of the volume ID). There is no real change of the geometry. GeoSvc is required (to access the detector readout). Common part of the name of the volumes to be merged is defined be property 'volumeName'. Name of the field in the readout that corresponds to the volume is defined be property 'identifier'. Property 'merge' describes how many adjacent volumes should be merged. E.g. 'merge = [2,3,2]' means that first 2 volumes are merged into new cell (id=0), next 3 volumes become new cell (id=1), and finally last 2 layers are merged into last cell (id=2). The sum of all sizes from the list should correspond to the total number of volumes named as indicated in 'volumeName'. For an example see Detector/DetComponents/tests/options/mergeLayers.py

Author
Anna Zaborowska

Constructor & Destructor Documentation

◆ MergeLayers()

MergeLayers::MergeLayers ( const std::string & aName,
ISvcLocator * aSvcLoc )
explicit

◆ ~MergeLayers()

MergeLayers::~MergeLayers ( )
virtual

Member Function Documentation

◆ execute()

StatusCode MergeLayers::execute ( const EventContext & ) const
finalvirtual

Execute.

Returns
status code

◆ finalize()

StatusCode MergeLayers::finalize ( )
finalvirtual

Finalize.

Returns
status code

◆ initialize()

StatusCode MergeLayers::initialize ( )
finalvirtual

Initialize.

Returns
status code

Member Data Documentation

◆ m_debugPrint

Gaudi::Property<uint> MergeLayers::m_debugPrint {this, "debugPrint", 10, "Maximum number of lines in debug output"}
private

Maximum number of lines in debug output.

◆ m_descriptor

dd4hep::IDDescriptor MergeLayers::m_descriptor
private

◆ m_geoSvc

ServiceHandle<IGeoSvc> MergeLayers::m_geoSvc
private

Pointer to the geometry service.

◆ m_idToMerge

Gaudi::Property<std::string> MergeLayers::m_idToMerge {this, "identifier", "", "Identifier to be merged"}
private

Identifier to be merged.

◆ m_inHits

DataHandle<edm4hep::CalorimeterHitCollection> MergeLayers::m_inHits {"hits/caloInHits", Gaudi::DataHandle::Reader, this}
mutableprivate

Handle for the EDM Hits to be read.

◆ m_listToMerge

Gaudi::Property<std::vector<uint> > MergeLayers::m_listToMerge
private
Initial value:
{
this, "merge", {}, "List with number of adjacent cells to be merged"}

List with number of adjacent cells to be merged.

◆ m_outHits

DataHandle<edm4hep::CalorimeterHitCollection> MergeLayers::m_outHits {"hits/caloOutHits", Gaudi::DataHandle::Writer, this}
mutableprivate

Handle for the EDM Hits to be written.

◆ m_readoutName

Gaudi::Property<std::string> MergeLayers::m_readoutName {this, "readout", "", "Name of the detector readout"}
private

Name of the detector readout.

◆ m_volumeName

Gaudi::Property<std::string> MergeLayers::m_volumeName {this, "volumeName", "", "Name (or its part) of the volume"}
private

Name (or its part) of the volume.


The documentation for this class was generated from the following files: