HerdSoftware  0.1.1
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, Memory::Status memStatus) override
 Free the memory of unneeded objects. More...
 

Private Member Functions

void _Aggregate (const std::vector< PsdGeoParams > &originalGeoParams, const PsdHits &originalHits, 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 > _topAggrFactor
 
AxesArray< int > _latAggrFactor
 
PsdHitsColl _aggrPsdHitsColl
 
PsdParticleHitsColl _aggrPsdParticleHitsColl
 
observer_ptr< PsdGeoParamsColl_origPsdGeoParamsColl
 
std::shared_ptr< PsdGeoParamsColl_aggrPsdGeoParamsColl
 
StorePtr _evStore
 
StorePtr _globStore
 
SidesArray< std::array< bool, 2 > > _tileCooIncreasesWithID
 
SidesArray< RefFrame::Axis_tileMainAggrAxis
 
SidesArray< RefFrame::Axis_tileSecAggrAxis
 

Detailed Description

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

This algorithm groups the neighboring PSD tiles/bars 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 STK means that big bars/tiles for the top PSD along X will be created by grouping 3 neighboring bars/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/bars of the PSD.
psdParticleHitsCollAggregated psdParticleHitsCollMC PsdParticleHitsColl evStore The particle hits in the digitized tiles/bars 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,
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 #hits 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,
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/bar 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

◆ _aggrPsdGeoParamsColl

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

◆ _aggrPsdHitsColl

PsdHitsColl Herd::PsdGeometricDigitizerAlgo::_aggrPsdHitsColl
private

◆ _aggrPsdParticleHitsColl

PsdParticleHitsColl Herd::PsdGeometricDigitizerAlgo::_aggrPsdParticleHitsColl
private

◆ _evStore

StorePtr Herd::PsdGeometricDigitizerAlgo::_evStore
private

◆ _globStore

StorePtr Herd::PsdGeometricDigitizerAlgo::_globStore
private

◆ _latAggrFactor

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

◆ _origPsdGeoParamsColl

observer_ptr<PsdGeoParamsColl> Herd::PsdGeometricDigitizerAlgo::_origPsdGeoParamsColl
private

◆ _tileCooIncreasesWithID

SidesArray<std::array<bool, 2> > Herd::PsdGeometricDigitizerAlgo::_tileCooIncreasesWithID
private

◆ _tileMainAggrAxis

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

◆ _tileSecAggrAxis

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

◆ _topAggrFactor

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

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