HerdSoftware  0.1.1
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
Herd::CaloDBSCANClustering Class Reference

Algorithm that clusters calorimeter hits into showers. More...

#include <algorithms/clustering/CaloDBSCANClustering.h>

Inheritance diagram for Herd::CaloDBSCANClustering:

Public Member Functions

 CaloDBSCANClustering (const std::string &name)
 Constructor. More...
 
bool Initialize () override
 Initialization of the algorithm. More...
 
bool Process () override
 Process a single event. More...
 
std::vector< std::string > FreeObjects (const std::vector< std::string > &objs, Memory::Status memStatus) override
 Free the memory of unneeded objects. More...
 

Private Types

using HitIt = std::vector< Hit >::const_iterator
 

Private Member Functions

void FindShowers (CaloHits &caloHits)
 
void BuildShowerFromSeed (HitIt seedIt, const CaloHits &hits)
 
std::vector< unsigned int > FindNeighborsHitID (HitIt hitIt, const CaloHits &hits)
 
unsigned int CountHitNeighbors (HitIt hitIt, const CaloHits &hits)
 
std::vector< unsigned int > GetNeighboringCubesID (unsigned int volID, CaloGeoParams &caloGeoParams)
 
void BuildNeighborsMap (CaloGeoParams &caloGeoParams)
 
const std::vector< unsigned int > & GetNeighboringCubesID (unsigned int volID)
 

Private Attributes

float _threshold
 
float _maxDist
 
unsigned int _minHits
 
unsigned int _minShowerHits
 
std::string _caloHitsName
 
CaloClusters _showers
 
observer_ptr< CaloGeoParams_caloGeoParams
 
EventStorePtr _evStore
 
GlobalStorePtr _globStore
 
int nShowers
 
std::map< unsigned int, int > m_labels
 
std::vector< std::vector< unsigned int > > m_neighborCubes
 

Detailed Description

Algorithm that clusters calorimeter hits into showers.

This algorithm creates aggregates hits into showers using a k-means

name type store optional description
caloHitsGeV CaloHits evStore no Hits in the calorimeter.
caloGeoParams CaloGeoParams gloabStore no Geometry information of the calorimeter.

Produced event objects:

name alias type store description
caloClusters CaloClusters evStore A collection of clustered hits

Parameters:

name type default value description
threshold float 0 eDep threshold
maxDist float 6 The maximum distance between two hits to be considered connected
minHits int 2 The minimum number of hits to start the clustering process
minShowerHits int 9 The minimum number of hits to save a shower

Member Typedef Documentation

◆ HitIt

using Herd::CaloDBSCANClustering::HitIt = std::vector<Hit>::const_iterator
private

Constructor & Destructor Documentation

◆ CaloDBSCANClustering()

Herd::CaloDBSCANClustering::CaloDBSCANClustering ( const std::string &  name)

Constructor.

Parameters
nameThe name of the algorithm.

Member Function Documentation

◆ BuildNeighborsMap()

void Herd::CaloDBSCANClustering::BuildNeighborsMap ( CaloGeoParams caloGeoParams)
private

◆ BuildShowerFromSeed()

void Herd::CaloDBSCANClustering::BuildShowerFromSeed ( HitIt  seedIt,
const CaloHits hits 
)
private

◆ CountHitNeighbors()

unsigned int Herd::CaloDBSCANClustering::CountHitNeighbors ( HitIt  hitIt,
const CaloHits hits 
)
private

◆ FindNeighborsHitID()

std::vector< unsigned int > Herd::CaloDBSCANClustering::FindNeighborsHitID ( HitIt  hitIt,
const CaloHits hits 
)
private

◆ FindShowers()

void Herd::CaloDBSCANClustering::FindShowers ( CaloHits caloHits)
private

◆ FreeObjects()

std::vector< std::string > Herd::CaloDBSCANClustering::FreeObjects ( const std::vector< std::string > &  objs,
Memory::Status  memStatus 
)
override

Free the memory of unneeded objects.

Currently this method frees the memory of the clusters if memStatus is EXHAUSTED.

Parameters
objsThe list of objects to be freed.
memStatusThe current memory occupation status.
Returns
a list of freed objects.

◆ GetNeighboringCubesID() [1/2]

std::vector< unsigned int > Herd::CaloDBSCANClustering::GetNeighboringCubesID ( unsigned int  volID,
CaloGeoParams caloGeoParams 
)
private

◆ GetNeighboringCubesID() [2/2]

const std::vector<unsigned int>& Herd::CaloDBSCANClustering::GetNeighboringCubesID ( unsigned int  volID)
inlineprivate

◆ Initialize()

bool Herd::CaloDBSCANClustering::Initialize ( )
override

Initialization of the algorithm.

Returns
true if the initialization procedure is successful.

◆ Process()

bool Herd::CaloDBSCANClustering::Process ( )
override

Process a single event.

Returns
If event processing is successful.

Member Data Documentation

◆ _caloGeoParams

observer_ptr<CaloGeoParams> Herd::CaloDBSCANClustering::_caloGeoParams
private

◆ _caloHitsName

std::string Herd::CaloDBSCANClustering::_caloHitsName
private

◆ _evStore

EventStorePtr Herd::CaloDBSCANClustering::_evStore
private

◆ _globStore

GlobalStorePtr Herd::CaloDBSCANClustering::_globStore
private

◆ _maxDist

float Herd::CaloDBSCANClustering::_maxDist
private

◆ _minHits

unsigned int Herd::CaloDBSCANClustering::_minHits
private

◆ _minShowerHits

unsigned int Herd::CaloDBSCANClustering::_minShowerHits
private

◆ _showers

CaloClusters Herd::CaloDBSCANClustering::_showers
private

◆ _threshold

float Herd::CaloDBSCANClustering::_threshold
private

◆ m_labels

std::map<unsigned int, int> Herd::CaloDBSCANClustering::m_labels
private

◆ m_neighborCubes

std::vector<std::vector<unsigned int> > Herd::CaloDBSCANClustering::m_neighborCubes
private

◆ nShowers

int Herd::CaloDBSCANClustering::nShowers
private

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