HerdSoftware  0.4.0
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Herd::PsdGeometricDigitizerAlgo Class Reference

Algorithm that groups the Monte Carlo PSD hits based on a purely geometric criterion. More...

#include <algorithms/digitization/PsdGeometricDigitizerAlgo.h>

Inheritance diagram for Herd::PsdGeometricDigitizerAlgo:

Public Member Functions

 PsdGeometricDigitizerAlgo (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 Member Functions

void Aggregate (const std::vector< PsdGeoParams > &originalGeoParams, const PsdHits &originalHits, EA::observer_ptr< const PsdParticleHits > originalParticleHits, const AxesArray< int > &aggrFactors, const std::vector< PsdGeoParams > &aggregatedGeoParams, PsdHits &aggregatedHits, PsdParticleHits &aggregatedParticleHits)
 Aggregate hits for a single PSD detector. More...
 
CooArray< unsigned char > AggregatedIndexes (const CooArray< unsigned char > &origIndexes, const AxesArray< int > &aggrFactors)
 

Private Attributes

AxesArray< int > m_topAggrFactor
 
AxesArray< int > m_latAggrFactor
 
PsdHitsColl m_aggrPsdHitsColl
 
PsdParticleHitsColl m_aggrPsdParticleHitsColl
 
EA::observer_ptr< PsdGeoParamsCollm_origPsdGeoParamsColl
 
std::shared_ptr< PsdGeoParamsCollm_aggrPsdGeoParamsColl
 
EA::StorePtr m_evStore
 
EA::StorePtr m_globStore
 
SidesArray< RefFrame::Axism_tileMainAggrAxis
 
SidesArray< RefFrame::Axism_tileSecAggrAxis
 

Detailed Description

Algorithm that groups the Monte Carlo PSD hits based on a purely geometric criterion.

This algorithm groups the neighboring PSD tiles into bigger elements, by adding up the energy releases and assigning the total release to a new, bigger PSD element. The number of elements to be digitized is defined by the aggregation factors for each direction, which can be set as algorithm parameters. For example, setting an aggregation factor of 3 for the X direction of top PSD means that big tiles for the top PSD along X will be created by grouping 3 neighboring tiles along X. The default aggregation factor is 1 in each direction, meaning that no aggregation is done if the user does not explicitly set the aggregation parameters. The digitization criterion is purely geometric and does not take into account important effects such as quenching, the photoelectron statistics, electronic noise, GeV->ADC conversion etc.

Needed event objects:

name type store optional description
psdHitsCollMC PsdHitsColl evStore no The hits in the PSD produced by MC simulation.
psdParticleHitsCollMC PsdParticleHitsColl evStore yes The particle hits in the PSD produced by MC simulation.

Needed global objects:

name type store optional description
psdGeoParamsColl PsdGeoParamsColl globStore yes Geometric parameters of the top PSD.

Produced event objects:

name alias type store description
psdHitsCollAggregated psdHitsCollMC PsdHitsColl evStore The hits in the digitized tiles of the PSD.
psdParticleHitsCollAggregated psdParticleHitsCollMC PsdParticleHitsColl evStore The particle hits in the digitized tiles of the PSD.

Produced global objects:

name alias type store description
psdGeoParamsCollAggregated psdGeoParamsColl PsdGeoParamsColl evStore Geometric parameters of the digitized PSD.

Parameters:

name type default value description
topAggrFactorX int 0 Aggregation factor for top PSD elements along X.
topAggrFactorY int 0 Aggregation factor for top PSD elements along Y.
latAggrFactorXY int 0 Aggregation factor for lateral PSD elements along Z.
latAggrFactorZ int 0 Aggregation factor for lateral PSD elements along X or Y (depending on side).

Constructor & Destructor Documentation

◆ PsdGeometricDigitizerAlgo()

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

Constructor.

Parameters
nameThe name of the algorithm.

Member Function Documentation

◆ Aggregate()

void Herd::PsdGeometricDigitizerAlgo::Aggregate ( const std::vector< PsdGeoParams > &  originalGeoParams,
const PsdHits originalHits,
EA::observer_ptr< const PsdParticleHits originalParticleHits,
const AxesArray< int > &  aggrFactors,
const std::vector< PsdGeoParams > &  aggregatedGeoParams,
PsdHits aggregatedHits,
PsdParticleHits aggregatedParticleHits 
)
private

Aggregate hits for a single PSD detector.

This function aggregates the hits of a single (e.g. top) PSD detector. It fills the container passed as aggregatedHits argument with the digitized hits. To understand the meaning of the arguments assume the following geometric PSD configuration:

Y^ | ----------------— | | 3 7 11 15 19 23| | | 2 6 10 14 18 22| | | 1 5 9 13 17 21| | | 0 4 8 12 16 20| | ----------------— | ------------------------—>X

The PSD has 6 tiles along X and 4 along Y. The normal axis is Z, the main aggregation axis is Y (the axis where the tile IDs increase with steps of 1) and the secondary aggregation axis is X. The coordinates increase with tile ID along both the main and the secondary aggregation axes.

Parameters
originalGeoParamsThe original (i.e. not digitized) geometry parameters of the PSD detector.
originalHitsThe container of original hits for the PSD detector.
originalParticleHitsThe container of original particle hits for the PSD detector (ignored if nullptr).
aggrFactorsThe aggregation factors along each axis.
aggregatedGeoParamsThe aggregated geometry parameters.
aggregatedHitsThe container of aggregated hits.
aggregatedParticleHitsThe container of aggregated particle hits.

◆ AggregatedIndexes()

CooArray< unsigned char > Herd::PsdGeometricDigitizerAlgo::AggregatedIndexes ( const CooArray< unsigned char > &  origIndexes,
const AxesArray< int > &  aggrFactors 
)
private

◆ FreeObjects()

std::vector< std::string > Herd::PsdGeometricDigitizerAlgo::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 aggregated hits 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::PsdGeometricDigitizerAlgo::Initialize ( )
override

Initialization of the algorithm.

Returns
false if the aggregation parameters are not exact divisors of tile numbers.

◆ Process()

bool Herd::PsdGeometricDigitizerAlgo::Process ( )
override

Process a single event.

This method also sets the geometry parameters of digitized PSD.

Returns
If event processing is successful.

Member Data Documentation

◆ m_aggrPsdGeoParamsColl

std::shared_ptr<PsdGeoParamsColl> Herd::PsdGeometricDigitizerAlgo::m_aggrPsdGeoParamsColl
private

◆ m_aggrPsdHitsColl

PsdHitsColl Herd::PsdGeometricDigitizerAlgo::m_aggrPsdHitsColl
private

◆ m_aggrPsdParticleHitsColl

PsdParticleHitsColl Herd::PsdGeometricDigitizerAlgo::m_aggrPsdParticleHitsColl
private

◆ m_evStore

EA::StorePtr Herd::PsdGeometricDigitizerAlgo::m_evStore
private

◆ m_globStore

EA::StorePtr Herd::PsdGeometricDigitizerAlgo::m_globStore
private

◆ m_latAggrFactor

AxesArray<int> Herd::PsdGeometricDigitizerAlgo::m_latAggrFactor
private

◆ m_origPsdGeoParamsColl

EA::observer_ptr<PsdGeoParamsColl> Herd::PsdGeometricDigitizerAlgo::m_origPsdGeoParamsColl
private

◆ m_tileMainAggrAxis

SidesArray<RefFrame::Axis> Herd::PsdGeometricDigitizerAlgo::m_tileMainAggrAxis
private

◆ m_tileSecAggrAxis

SidesArray<RefFrame::Axis> Herd::PsdGeometricDigitizerAlgo::m_tileSecAggrAxis
private

◆ m_topAggrFactor

AxesArray<int> Herd::PsdGeometricDigitizerAlgo::m_topAggrFactor
private

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