HerdSoftware  0.4.0
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, EA::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 > NeighboringCubesID (unsigned int volID, CaloGeoParams &caloGeoParams)
 
void BuildNeighborsMap (CaloGeoParams &caloGeoParams)
 
const std::vector< unsigned int > & NeighboringCubesID (unsigned int volID)
 

Private Attributes

float m_threshold
 
float m_maxDist
 
unsigned int m_minHits
 
unsigned int m_minShowerHits
 
std::string m_caloHitsName
 
CaloClusters m_showers
 
EA::observer_ptr< CaloGeoParamsm_caloGeoParams
 
EA::EventStorePtr m_evStore
 
EA::GlobalStorePtr m_globStore
 
int m_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 DBSCAN clusterization method

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,
EA::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.

◆ Initialize()

bool Herd::CaloDBSCANClustering::Initialize ( )
override

Initialization of the algorithm.

Returns
true if the initialization procedure is successful.

◆ NeighboringCubesID() [1/2]

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

◆ NeighboringCubesID() [2/2]

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

◆ Process()

bool Herd::CaloDBSCANClustering::Process ( )
override

Process a single event.

Returns
If event processing is successful.

Member Data Documentation

◆ m_caloGeoParams

EA::observer_ptr<CaloGeoParams> Herd::CaloDBSCANClustering::m_caloGeoParams
private

◆ m_caloHitsName

std::string Herd::CaloDBSCANClustering::m_caloHitsName
private

◆ m_evStore

EA::EventStorePtr Herd::CaloDBSCANClustering::m_evStore
private

◆ m_globStore

EA::GlobalStorePtr Herd::CaloDBSCANClustering::m_globStore
private

◆ m_labels

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

◆ m_maxDist

float Herd::CaloDBSCANClustering::m_maxDist
private

◆ m_minHits

unsigned int Herd::CaloDBSCANClustering::m_minHits
private

◆ m_minShowerHits

unsigned int Herd::CaloDBSCANClustering::m_minShowerHits
private

◆ m_neighborCubes

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

◆ m_nShowers

int Herd::CaloDBSCANClustering::m_nShowers
private

◆ m_showers

CaloClusters Herd::CaloDBSCANClustering::m_showers
private

◆ m_threshold

float Herd::CaloDBSCANClustering::m_threshold
private

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