CbmRoot
Loading...
Searching...
No Matches
cbm::algo::sts::Hitfinder Class Reference

#include <Hitfinder.h>

Collaboration diagram for cbm::algo::sts::Hitfinder:
[legend]

Public Member Functions

XPU_D void SortDigisInSpaceAndTime (SortDigis::context &) const
 
XPU_D void FindClustersSingleStep (FindClusters::context &) const
 
XPU_D void SortClusters (SortClusters::context &) const
 
XPU_D void FindHits (FindHits::context &) const
 
XPU_D void CalculateOffsetsParallel (FindClusters::context &) const
 
XPU_D void FindClustersParallel (FindClusters::context &) const
 
XPU_D void CalculateClustersParallel (FindClusters::context &) const
 

Public Attributes

int nModules
 
int nChannels
 
sts::HitfinderPars::Asic asic
 
int landauTableSize
 
float landauStepSize
 
xpu::buffer< float > landauTable
 
xpu::buffer< float > localToGlobalTranslationByModule
 
xpu::buffer< float > localToGlobalRotationByModule
 
xpu::buffer< SensorParsensorPars
 
xpu::buffer< HitfinderMonDevicemonitor
 
xpu::buffer< size_t > digiOffsetPerModule
 
xpu::buffer< CbmStsDigidigisPerModule
 
xpu::buffer< CbmStsDigidigisPerModuleTmp
 
xpu::buffer< DigiConnectordigiConnectorsPerModule
 
xpu::buffer< unsigned int > channelOffsetPerModule
 
size_t maxClustersPerModule
 
xpu::buffer< ClusterIdxclusterIdxPerModule
 
xpu::buffer< ClusterIdxclusterIdxPerModuleTmp
 
xpu::buffer< ClusterIdx * > clusterIdxSortedPerModule
 
xpu::buffer< sts::ClusterclusterDataPerModule
 
xpu::buffer< PaddedToCacheLine< int > > nClustersPerModule
 
xpu::buffer< PaddedToCacheLine< float > > maxClusterTimeErrorByModuleSide
 
size_t hitsAllocatedPerModule
 
size_t maxHitsPerModule
 
xpu::buffer< sts::HithitsPerModule
 
xpu::buffer< PaddedToCacheLine< int > > nHitsPerModule
 
size_t hitsFlatCapacity
 
xpu::buffer< sts::HithitsFlat
 

Private Member Functions

XPU_D void CalculateChannelOffsets (FindClusters::context &ctx, CbmStsDigi *digis, unsigned int *channelOffsets, unsigned int nDigis) const
 
XPU_D void FindClusterConnectionsDigiWise (FindClusters::context &ctx, CbmStsDigi *digis, DigiConnector *digiConnector, unsigned int *channelOffsets, unsigned int nDigis) const
 
XPU_D void CalculateClustersDigiWise (FindClusters::context &ctx, CbmStsDigi *digis, DigiConnector *digiConnector, unsigned int const nDigis) const
 
XPU_D void CreateClusterFromConnectors1 (int const iModule, const CbmStsDigi *digis, int const digiIndex) const
 
XPU_D void CreateClusterFromConnectors2 (int const iModule, const CbmStsDigi *digis, DigiConnector *digiConnector, int const digiIndex) const
 
XPU_D void CreateClusterFromConnectorsN (int const iModule, const CbmStsDigi *digis, DigiConnector *digiConnector, int const digiIndex) const
 
XPU_D unsigned int GetNDigis (int iModule) const
 
XPU_D float GetTimeResolution (int, int) const
 
XPU_D bool IsActive (int *channelStatus, int channel) const
 
XPU_D int ChanLeft (int channel) const
 
XPU_D int ChanRight (int channel) const
 
XPU_D int ChanDist (int c1, int c2) const
 
XPU_D void AddCluster (int iModule, uint32_t time, const sts::Cluster &cls) const
 
XPU_D bool IsBackside (int iModule) const
 
XPU_D float LandauWidth (float charge) const
 
XPU_D void ToGlobal (int iModule, float lx, float ly, float lz, float &gx, float &gy, float &gz) const
 
XPU_D void IntersectClusters (int iBlock, const HitfinderCache &pars, const ClusterIdx &idxF, const sts::Cluster &clsF, const ClusterIdx &idxB, const sts::Cluster &clsB) const
 
XPU_D float GetClusterPosition (const HitfinderCache &pars, float centre, bool isFront) const
 
XPU_D bool Intersect (const HitfinderCache &pars, float xF, float exF, float xB, float exB, float &x, float &y, float &varX, float &varY, float &varXY) const
 
XPU_D bool IsInside (const HitfinderCache &pars, float x, float y) const
 
XPU_D void CreateHit (int iBlocks, float xLocal, float yLocal, float varX, float varY, float varXY, const ClusterIdx &idxF, const Cluster &clsF, const ClusterIdx &idxB, const sts::Cluster &clsB, float du, float dv) const
 
XPU_D void SaveMaxError (float errorValue, int iModule) const
 

Detailed Description

Definition at line 198 of file Hitfinder.h.

Member Function Documentation

◆ AddCluster()

XPU_D void cbm::algo::sts::Hitfinder::AddCluster ( int iModule,
uint32_t time,
const sts::Cluster & cls ) const
inlineprivate

◆ CalculateChannelOffsets()

XPU_D void sts::Hitfinder::CalculateChannelOffsets ( FindClusters::context & ctx,
CbmStsDigi * digis,
unsigned int * channelOffsets,
unsigned int nDigis ) const
private

sts::Hitfinder::calculateChannelOffsets Calculates the Offsest of every channel. digis-Array is sorted in Channel and Time. If a channelChange is detected it is stored in channelOffsetsPerModule.

Parameters
digisAll Digis that are relevant for this Block
channelOffsetsThe Array where all offsets are written to
nDigisAmount of digis in digis-Array

Definition at line 92 of file Hitfinder.cxx.

References CbmStsDigi::GetChannel(), and pos.

◆ CalculateClustersDigiWise()

XPU_D void sts::Hitfinder::CalculateClustersDigiWise ( FindClusters::context & ctx,
CbmStsDigi * digis,
sts::DigiConnector * digiConnector,
unsigned int const nDigis ) const
private

sts::Hitfinder::calculateClustersDigiWise

Each Thread one Channel

ChannelId: 00000 11111 DigiIndex: 01234 56789 ThreadId: 01234 56789

Calculates the Clustercharges of all found ClusterConnections. Each Thread takes on digi and looks for connections. When the thread is done, it takes the next digi. If one Digi does not have a previous one it's a cluster start and may be the start of either a single-element-cluster, double-element-cluster or multi-element-cluster.

Parameters
digisAll Digis that are relevant for this Block
digiConnectorArray where the connection between 2 digis is sotred in.(next Digi; has Previous)
iModuleThe Module that the curren Block is working on
threadIdId of the thrad currently working

Definition at line 287 of file Hitfinder.cxx.

◆ CalculateClustersParallel()

XPU_D void sts::Hitfinder::CalculateClustersParallel ( FindClusters::context & ctx) const

sts::Hitfinder::calculateClustersParallel This function calculates clusters form an sts-Digi Array inserted. It runs the calculating process highly parallel.

Parameters
iBlockis the Block/Module that is currently worked on

Definition at line 223 of file Hitfinder.cxx.

◆ CalculateOffsetsParallel()

XPU_D void sts::Hitfinder::CalculateOffsetsParallel ( FindClusters::context & ctx) const

sts::Hitfinder::calculateOffsetsParallel This function calculates the channeloffsets in a certain module. An Offset is the Startingpoint of a Channel in a sorted array of Digis.

Parameters
iBlockis the Block/Module that is currently worked on

Definition at line 120 of file Hitfinder.cxx.

◆ ChanDist()

XPU_D int cbm::algo::sts::Hitfinder::ChanDist ( int c1,
int c2 ) const
inlineprivate

Definition at line 350 of file Hitfinder.h.

◆ ChanLeft()

XPU_D int cbm::algo::sts::Hitfinder::ChanLeft ( int channel) const
inlineprivate

Definition at line 346 of file Hitfinder.h.

◆ ChanRight()

XPU_D int cbm::algo::sts::Hitfinder::ChanRight ( int channel) const
inlineprivate

Definition at line 348 of file Hitfinder.h.

◆ CreateClusterFromConnectors1()

XPU_D void sts::Hitfinder::CreateClusterFromConnectors1 ( int const iModule,
const CbmStsDigi * digis,
int const digiIndex ) const
private

◆ CreateClusterFromConnectors2()

XPU_D void sts::Hitfinder::CreateClusterFromConnectors2 ( int const iModule,
const CbmStsDigi * digis,
sts::DigiConnector * digiConnector,
int const digiIndex ) const
private

◆ CreateClusterFromConnectorsN()

◆ CreateHit()

XPU_D void sts::Hitfinder::CreateHit ( int iBlocks,
float xLocal,
float yLocal,
float varX,
float varY,
float varXY,
const ClusterIdx & idxF,
const Cluster & clsF,
const ClusterIdx & idxB,
const sts::Cluster & clsB,
float du,
float dv ) const
private

◆ FindClusterConnectionsDigiWise()

XPU_D void cbm::algo::sts::Hitfinder::FindClusterConnectionsDigiWise ( FindClusters::context & ctx,
CbmStsDigi * digis,
DigiConnector * digiConnector,
unsigned int * channelOffsets,
unsigned int nDigis ) const
private

◆ FindClustersParallel()

XPU_D void sts::Hitfinder::FindClustersParallel ( FindClusters::context & ctx) const

sts::Hitfinder::findClustersParallel This function finds clusters form an sts-Digi Array inserted. It runs the finding process highly parallel.

Parameters
iBlockis the Block/Module that is currently worked on

Definition at line 141 of file Hitfinder.cxx.

References CbmStsDigi::GetChannel(), CbmStsDigi::GetTimeU32(), cbm::algo::RecoParams::STS::timeCutDigiAbs, and cbm::algo::RecoParams::STS::timeCutDigiSig.

◆ FindClustersSingleStep()

XPU_D void sts::Hitfinder::FindClustersSingleStep ( FindClusters::context & ctx) const

Definition at line 73 of file Hitfinder.cxx.

◆ FindHits()

◆ GetClusterPosition()

XPU_D float sts::Hitfinder::GetClusterPosition ( const HitfinderCache & pars,
float centre,
bool isFront ) const
private

◆ GetNDigis()

XPU_D unsigned int cbm::algo::sts::Hitfinder::GetNDigis ( int iModule) const
inlineprivate

Definition at line 330 of file Hitfinder.h.

References digiOffsetPerModule.

◆ GetTimeResolution()

XPU_D float cbm::algo::sts::Hitfinder::GetTimeResolution ( int ,
int  ) const
inlineprivate

Definition at line 335 of file Hitfinder.h.

References asic, and cbm::algo::sts::HitfinderPars::Asic::timeResolution.

◆ Intersect()

XPU_D bool sts::Hitfinder::Intersect ( const HitfinderCache & pars,
float xF,
float exF,
float xB,
float exB,
float & x,
float & y,
float & varX,
float & varY,
float & varXY ) const
private

◆ IntersectClusters()

◆ IsActive()

XPU_D bool cbm::algo::sts::Hitfinder::IsActive ( int * channelStatus,
int channel ) const
inlineprivate

Definition at line 337 of file Hitfinder.h.

References nChannels.

◆ IsBackside()

XPU_D bool cbm::algo::sts::Hitfinder::IsBackside ( int iModule) const
inlineprivate

Definition at line 374 of file Hitfinder.h.

References nModules.

◆ IsInside()

XPU_D bool sts::Hitfinder::IsInside ( const HitfinderCache & pars,
float x,
float y ) const
private

Definition at line 825 of file Hitfinder.cxx.

References cbm::algo::sts::HitfinderCache::dX, cbm::algo::sts::SensorPar::dY, x, and y.

◆ LandauWidth()

XPU_D float sts::Hitfinder::LandauWidth ( float charge) const
private

Definition at line 881 of file Hitfinder.cxx.

◆ SaveMaxError()

XPU_D void cbm::algo::sts::Hitfinder::SaveMaxError ( float errorValue,
int iModule ) const
inlineprivate

Definition at line 390 of file Hitfinder.h.

References maxClusterTimeErrorByModuleSide.

◆ SortClusters()

XPU_D void sts::Hitfinder::SortClusters ( SortClusters::context & ctx) const

Definition at line 486 of file Hitfinder.cxx.

References cbm::algo::sts::ClusterIdx::fTime.

◆ SortDigisInSpaceAndTime()

XPU_D void sts::Hitfinder::SortDigisInSpaceAndTime ( SortDigis::context & ctx) const

sts::Hitfinder::sortDigisKhun Sorts digis channelwise. Inside a channel all digis are sorted in time.

Parameters
smemis the shared memory it is worked in
iBlockis the Block/Module that is currenty running

Definition at line 52 of file Hitfinder.cxx.

References CbmStsDigi::GetChannel(), and CbmStsDigi::GetTimeU32().

◆ ToGlobal()

XPU_D void sts::Hitfinder::ToGlobal ( int iModule,
float lx,
float ly,
float lz,
float & gx,
float & gy,
float & gz ) const
private

Definition at line 895 of file Hitfinder.cxx.

Member Data Documentation

◆ asic

sts::HitfinderPars::Asic cbm::algo::sts::Hitfinder::asic

Definition at line 207 of file Hitfinder.h.

Referenced by GetTimeResolution().

◆ channelOffsetPerModule

xpu::buffer<unsigned int> cbm::algo::sts::Hitfinder::channelOffsetPerModule

Definition at line 242 of file Hitfinder.h.

◆ clusterDataPerModule

xpu::buffer<sts::Cluster> cbm::algo::sts::Hitfinder::clusterDataPerModule

Definition at line 265 of file Hitfinder.h.

Referenced by AddCluster().

◆ clusterIdxPerModule

xpu::buffer<ClusterIdx> cbm::algo::sts::Hitfinder::clusterIdxPerModule

Definition at line 251 of file Hitfinder.h.

Referenced by AddCluster().

◆ clusterIdxPerModuleTmp

xpu::buffer<ClusterIdx> cbm::algo::sts::Hitfinder::clusterIdxPerModuleTmp

Definition at line 255 of file Hitfinder.h.

◆ clusterIdxSortedPerModule

xpu::buffer<ClusterIdx*> cbm::algo::sts::Hitfinder::clusterIdxSortedPerModule

Definition at line 260 of file Hitfinder.h.

◆ digiConnectorsPerModule

xpu::buffer<DigiConnector> cbm::algo::sts::Hitfinder::digiConnectorsPerModule

Definition at line 237 of file Hitfinder.h.

◆ digiOffsetPerModule

xpu::buffer<size_t> cbm::algo::sts::Hitfinder::digiOffsetPerModule

Definition at line 228 of file Hitfinder.h.

Referenced by GetNDigis().

◆ digisPerModule

xpu::buffer<CbmStsDigi> cbm::algo::sts::Hitfinder::digisPerModule

Definition at line 229 of file Hitfinder.h.

◆ digisPerModuleTmp

xpu::buffer<CbmStsDigi> cbm::algo::sts::Hitfinder::digisPerModuleTmp

Definition at line 232 of file Hitfinder.h.

◆ hitsAllocatedPerModule

size_t cbm::algo::sts::Hitfinder::hitsAllocatedPerModule

Definition at line 279 of file Hitfinder.h.

◆ hitsFlat

xpu::buffer<sts::Hit> cbm::algo::sts::Hitfinder::hitsFlat

Definition at line 299 of file Hitfinder.h.

◆ hitsFlatCapacity

size_t cbm::algo::sts::Hitfinder::hitsFlatCapacity

Definition at line 298 of file Hitfinder.h.

◆ hitsPerModule

xpu::buffer<sts::Hit> cbm::algo::sts::Hitfinder::hitsPerModule

Definition at line 290 of file Hitfinder.h.

◆ landauStepSize

float cbm::algo::sts::Hitfinder::landauStepSize

Definition at line 210 of file Hitfinder.h.

◆ landauTable

xpu::buffer<float> cbm::algo::sts::Hitfinder::landauTable

Definition at line 212 of file Hitfinder.h.

◆ landauTableSize

int cbm::algo::sts::Hitfinder::landauTableSize

Definition at line 209 of file Hitfinder.h.

◆ localToGlobalRotationByModule

xpu::buffer<float> cbm::algo::sts::Hitfinder::localToGlobalRotationByModule

Definition at line 217 of file Hitfinder.h.

◆ localToGlobalTranslationByModule

xpu::buffer<float> cbm::algo::sts::Hitfinder::localToGlobalTranslationByModule

Definition at line 216 of file Hitfinder.h.

◆ maxClustersPerModule

size_t cbm::algo::sts::Hitfinder::maxClustersPerModule

Definition at line 245 of file Hitfinder.h.

Referenced by AddCluster().

◆ maxClusterTimeErrorByModuleSide

xpu::buffer<PaddedToCacheLine<float> > cbm::algo::sts::Hitfinder::maxClusterTimeErrorByModuleSide

Definition at line 274 of file Hitfinder.h.

Referenced by SaveMaxError().

◆ maxHitsPerModule

size_t cbm::algo::sts::Hitfinder::maxHitsPerModule

Definition at line 285 of file Hitfinder.h.

◆ monitor

xpu::buffer<HitfinderMonDevice> cbm::algo::sts::Hitfinder::monitor

Definition at line 224 of file Hitfinder.h.

Referenced by AddCluster().

◆ nChannels

int cbm::algo::sts::Hitfinder::nChannels

Definition at line 205 of file Hitfinder.h.

Referenced by IsActive().

◆ nClustersPerModule

xpu::buffer<PaddedToCacheLine<int> > cbm::algo::sts::Hitfinder::nClustersPerModule

Definition at line 270 of file Hitfinder.h.

Referenced by AddCluster().

◆ nHitsPerModule

xpu::buffer<PaddedToCacheLine<int> > cbm::algo::sts::Hitfinder::nHitsPerModule

Definition at line 295 of file Hitfinder.h.

◆ nModules

int cbm::algo::sts::Hitfinder::nModules

Definition at line 204 of file Hitfinder.h.

Referenced by IsBackside().

◆ sensorPars

xpu::buffer<SensorPar> cbm::algo::sts::Hitfinder::sensorPars

Definition at line 221 of file Hitfinder.h.


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