CbmRoot
Loading...
Searching...
No Matches
cbm::algo::trd::Cluster2D Class Reference

Data Container for TRD clusters. More...

#include <Cluster2D.h>

Public Types

enum  eClusterDef { kFasp = 5 , kStart , kStop }
 

Public Member Functions

 Cluster2D ()=delete
 Default constructor.
 
 Cluster2D (const Cluster2D &ref)
 
 Cluster2D (int32_t address, int32_t idx, const CbmTrdDigi *digi, uint16_t chT, uint16_t chR, int32_t r, int32_t time)
 Constructor starting from first digit (FASP specific).
 
virtual ~Cluster2D ()
 Destructor.
 
void AddDigiIdxPair (int32_t index, const CbmTrdDigi *digi)
 Add digi to cluster.
 
void AddDigiIdxPairs (const std::vector< int32_t > &indices, const std::vector< const CbmTrdDigi * > digis)
 Add array of digi to cluster.
 
int32_t GetNofDigis () const
 Number of digis in cluster.
 
int32_t GetDigi (int32_t index) const
 Get digi at position index.
 
const std::vector< int32_t > & GetDigiIndices () const
 Get array of digi indices.
 
std::vector< const CbmTrdDigi * > & GetDigis ()
 Get array of digi pointers.
 
const std::vector< DigiRec > & GetRecDigis () const
 Get array of calibrated digis.
 
void ClearDigis ()
 Remove all digis.
 
int32_t GetAddress () const
 
bool AddDigi (int32_t idx, const CbmTrdDigi *digi, uint16_t chT=0xffff, uint16_t chR=0, int32_t dt=0)
 Append digi to cluster.
 
uint16_t GetNCols () const
 
uint16_t GetNRows () const
 
uint16_t GetNRowsRaw () const
 
uint16_t GetEndCh () const
 
uint16_t GetRow () const
 
uint16_t GetSize () const
 
uint16_t GetStartCh () const
 
uint32_t GetStartTime () const
 
bool HasFaspDigis () const
 
bool HasStart () const
 
bool HasStop () const
 
int32_t IsChannelInRange (uint16_t chT, uint16_t chR) const
 Query on RO channels list.
 
bool Merge (Cluster2D *second)
 Merge current cluster with info from second.
 
bool Finalize (const size_t numCols)
 Fill array of calibrated digis.
 
void SetNCols (uint16_t ncols)
 
void SetNRows (uint16_t nrows)
 
void SetStart (bool set=true)
 
void SetStop (bool set=true)
 

Private Attributes

std::vector< DigiRecfRecDigis
 Array of calibrated digis.
 
std::vector< const CbmTrdDigi * > fDigis
 Array of digi pointers.
 
std::vector< int32_t > fDigiIndices
 Array of digi indices.
 
int32_t fAddress = 0
 Unique detector ID.
 
uint8_t fNCols = 0
 
uint8_t fNRows = 0x1f
 
uint16_t fStartCh = 0xffff
 
uint32_t fStartTime = 0xffffffff
 

Detailed Description

Data Container for TRD clusters.

Author
Dominik Smith d.smi.nosp@m.th@g.nosp@m.si.de

Definition at line 22 of file Cluster2D.h.

Member Enumeration Documentation

◆ eClusterDef

Enumerator
kFasp 

set type of FEE digis contained

kStart 

only for triangular if no T in first col

kStop 

only for triangular if no R in last col

Definition at line 25 of file Cluster2D.h.

Constructor & Destructor Documentation

◆ Cluster2D() [1/3]

cbm::algo::trd::Cluster2D::Cluster2D ( )
delete

Default constructor.

◆ Cluster2D() [2/3]

cbm::algo::trd::Cluster2D::Cluster2D ( const Cluster2D & ref)

Definition at line 17 of file Cluster2D.cxx.

◆ Cluster2D() [3/3]

cbm::algo::trd::Cluster2D::Cluster2D ( int32_t address,
int32_t idx,
const CbmTrdDigi * digi,
uint16_t chT,
uint16_t chR,
int32_t r,
int32_t time )

Constructor starting from first digit (FASP specific).

Parameters
[in]addressglobal module address
[in]idxglobal digi index in the TClonesArray
[in]digipointer to digi
[in]chTRO channel address within the module for tilt pairing
[in]chRRO channel address within the module for rect pairing
[in]rmodule row for the RO channel
[in]timerelative buffer DAQ time

Definition at line 30 of file Cluster2D.cxx.

References AddDigi(), SetNRows(), SetStart(), and SetStop().

◆ ~Cluster2D()

virtual cbm::algo::trd::Cluster2D::~Cluster2D ( )
inlinevirtual

Destructor.

Definition at line 54 of file Cluster2D.h.

Member Function Documentation

◆ AddDigi()

bool cbm::algo::trd::Cluster2D::AddDigi ( int32_t idx,
const CbmTrdDigi * digi,
uint16_t chT = 0xffff,
uint16_t chR = 0,
int32_t dt = 0 )

Append digi to cluster.

Parameters
[in]idxindex of digi in TClonesArray
[in]digipointer to digi
[in]chTRO channel for digi (tilt pairing for FASP) default 0xffff (SPADIC)
[in]chRRO channel for rect pairing (only for FASP)
[in]dtupdate start time of cluster if current digi is prompt
Returns
true if successful

Extend basic functionality of Cluster2D::AddDigi() for the case of 2D. If chT < 0 use the basic functionality [default].

For the 2D the parameters are intergpreted as follows chT : tilted paired channel [default 0x0fffffff] chR : rectangular paired channel dt : offset in clks of the prompt signal

if chT and chR positive the (chT, chR) are interpreted as the 2 channels of the digi specific to the 2D version. The following specific cases can be distinguished :

  • ch == 0 : no data, cluster signal sequence terminator
  • ch == -ch : no data, channel masked in HW

Definition at line 44 of file Cluster2D.cxx.

References AddDigiIdxPair(), AddDigiIdxPairs(), ClearDigis(), fNCols, fStartCh, fStartTime, GetDigiIndices(), GetDigis(), GetEndCh(), SetStart(), and SetStop().

Referenced by Cluster2D().

◆ AddDigiIdxPair()

void cbm::algo::trd::Cluster2D::AddDigiIdxPair ( int32_t index,
const CbmTrdDigi * digi )
inline

Add digi to cluster.

Parameters
[in]indexDigi index in TClonesArray.
[in]digipointer to digi

Definition at line 61 of file Cluster2D.h.

References fDigiIndices, and fDigis.

Referenced by AddDigi().

◆ AddDigiIdxPairs()

void cbm::algo::trd::Cluster2D::AddDigiIdxPairs ( const std::vector< int32_t > & indices,
const std::vector< const CbmTrdDigi * > digis )
inline

Add array of digi to cluster.

Parameters
[in]indicesArray of digi indices in TClonesArray.

Definition at line 71 of file Cluster2D.h.

References fDigiIndices, and fDigis.

Referenced by AddDigi(), and Merge().

◆ ClearDigis()

void cbm::algo::trd::Cluster2D::ClearDigis ( )
inline

Remove all digis.

Definition at line 111 of file Cluster2D.h.

References fDigiIndices, fDigis, and fRecDigis.

Referenced by AddDigi(), and Merge().

◆ Finalize()

bool cbm::algo::trd::Cluster2D::Finalize ( const size_t numCols)

Fill array of calibrated digis.

Parameters
[in]numberof columns
Returns
success or fail

Load RAW digis info in calibration aware strucuture CbmTrdDigiReco Do basic sanity checks; also incomplete adjacent digi and if found merge them.

Definition at line 151 of file Cluster2D.cxx.

References fDigis, fRecDigis, CbmTrdDigi::GetAddressChannel(), and L_.

◆ GetAddress()

int32_t cbm::algo::trd::Cluster2D::GetAddress ( ) const
inline

Accessors

Definition at line 119 of file Cluster2D.h.

References fAddress.

◆ GetDigi()

int32_t cbm::algo::trd::Cluster2D::GetDigi ( int32_t index) const
inline

Get digi at position index.

Parameters
[in]indexPosition of digi in array.
Returns
Digi index in TClonesArray.

Definition at line 88 of file Cluster2D.h.

References fDigiIndices.

◆ GetDigiIndices()

const std::vector< int32_t > & cbm::algo::trd::Cluster2D::GetDigiIndices ( ) const
inline

Get array of digi indices.

Returns
Array of digi indices in TClonesArray.

Definition at line 94 of file Cluster2D.h.

References fDigiIndices.

Referenced by AddDigi(), and Merge().

◆ GetDigis()

std::vector< const CbmTrdDigi * > & cbm::algo::trd::Cluster2D::GetDigis ( )
inline

Get array of digi pointers.

Returns
Array of digi pointers

Definition at line 100 of file Cluster2D.h.

References fDigis.

Referenced by AddDigi(), and Merge().

◆ GetEndCh()

uint16_t cbm::algo::trd::Cluster2D::GetEndCh ( ) const
inline

Definition at line 135 of file Cluster2D.h.

References fNCols, and fStartCh.

Referenced by AddDigi().

◆ GetNCols()

uint16_t cbm::algo::trd::Cluster2D::GetNCols ( ) const
inline

Accessors

Definition at line 132 of file Cluster2D.h.

References fNCols.

Referenced by GetSize().

◆ GetNofDigis()

int32_t cbm::algo::trd::Cluster2D::GetNofDigis ( ) const
inline

Number of digis in cluster.

Returns
Number of digis in cluster.

Definition at line 81 of file Cluster2D.h.

References fDigiIndices.

◆ GetNRows()

uint16_t cbm::algo::trd::Cluster2D::GetNRows ( ) const
inline

Definition at line 133 of file Cluster2D.h.

References fNRows.

Referenced by GetRow().

◆ GetNRowsRaw()

uint16_t cbm::algo::trd::Cluster2D::GetNRowsRaw ( ) const
inline

Definition at line 134 of file Cluster2D.h.

References fNRows.

◆ GetRecDigis()

const std::vector< DigiRec > & cbm::algo::trd::Cluster2D::GetRecDigis ( ) const
inline

Get array of calibrated digis.

Returns
Array of calibrated digis

Definition at line 106 of file Cluster2D.h.

References fRecDigis.

Referenced by cbm::algo::trd::HitFinder2D::MakeHit(), and cbm::algo::trd::HitFinder2D::ProjectDigis().

◆ GetRow()

uint16_t cbm::algo::trd::Cluster2D::GetRow ( ) const
inline

Definition at line 136 of file Cluster2D.h.

References GetNRows().

Referenced by Merge().

◆ GetSize()

uint16_t cbm::algo::trd::Cluster2D::GetSize ( ) const
inline

Definition at line 137 of file Cluster2D.h.

References GetNCols().

◆ GetStartCh()

uint16_t cbm::algo::trd::Cluster2D::GetStartCh ( ) const
inline

Definition at line 138 of file Cluster2D.h.

References fStartCh.

◆ GetStartTime()

uint32_t cbm::algo::trd::Cluster2D::GetStartTime ( ) const
inline

Definition at line 139 of file Cluster2D.h.

References fStartTime.

◆ HasFaspDigis()

bool cbm::algo::trd::Cluster2D::HasFaspDigis ( ) const
inline

Definition at line 140 of file Cluster2D.h.

◆ HasStart()

bool cbm::algo::trd::Cluster2D::HasStart ( ) const
inline

Definition at line 141 of file Cluster2D.h.

References fNRows, kStart, and TESTBIT.

Referenced by Merge().

◆ HasStop()

bool cbm::algo::trd::Cluster2D::HasStop ( ) const
inline

Definition at line 142 of file Cluster2D.h.

References fNRows, kStop, and TESTBIT.

Referenced by Merge().

◆ IsChannelInRange()

int32_t cbm::algo::trd::Cluster2D::IsChannelInRange ( uint16_t chT,
uint16_t chR ) const

Query on RO channels list.

Parameters
[in]chTtilted RO channel for digi
[in]chRrectangular RO channel for digi
Returns
-1 before range; 0 in range; 1 after range; -2 cluster empty of digits

Definition at line 103 of file Cluster2D.cxx.

References fNCols, and fStartCh.

◆ Merge()

bool cbm::algo::trd::Cluster2D::Merge ( Cluster2D * second)

Merge current cluster with info from second.

Parameters
[in]secondcluster to be added
[in]typthe type of pad-plane of the source chamber; true if Trd2d
Returns
success or fail

Definition at line 116 of file Cluster2D.cxx.

References AddDigiIdxPairs(), ClearDigis(), fNCols, fStartCh, fStartTime, GetDigiIndices(), GetDigis(), GetRow(), HasStart(), HasStop(), SetStart(), and SetStop().

◆ SetNCols()

void cbm::algo::trd::Cluster2D::SetNCols ( uint16_t ncols)
inline

Setters

Definition at line 165 of file Cluster2D.h.

References fNCols.

◆ SetNRows()

void cbm::algo::trd::Cluster2D::SetNRows ( uint16_t nrows)
inline

Definition at line 166 of file Cluster2D.h.

References fNRows.

Referenced by Cluster2D().

◆ SetStart()

void cbm::algo::trd::Cluster2D::SetStart ( bool set = true)
inline

Definition at line 171 of file Cluster2D.h.

References CLRBIT, fNRows, kStart, and SETBIT.

Referenced by AddDigi(), Cluster2D(), and Merge().

◆ SetStop()

void cbm::algo::trd::Cluster2D::SetStop ( bool set = true)
inline

Definition at line 172 of file Cluster2D.h.

References CLRBIT, fNRows, kStop, and SETBIT.

Referenced by AddDigi(), Cluster2D(), and Merge().

Member Data Documentation

◆ fAddress

int32_t cbm::algo::trd::Cluster2D::fAddress = 0
private

Unique detector ID.

Definition at line 179 of file Cluster2D.h.

Referenced by GetAddress().

◆ fDigiIndices

std::vector<int32_t> cbm::algo::trd::Cluster2D::fDigiIndices
private

Array of digi indices.

Definition at line 177 of file Cluster2D.h.

Referenced by AddDigiIdxPair(), AddDigiIdxPairs(), ClearDigis(), GetDigi(), GetDigiIndices(), and GetNofDigis().

◆ fDigis

std::vector<const CbmTrdDigi*> cbm::algo::trd::Cluster2D::fDigis
private

Array of digi pointers.

Definition at line 176 of file Cluster2D.h.

Referenced by AddDigiIdxPair(), AddDigiIdxPairs(), ClearDigis(), Finalize(), and GetDigis().

◆ fNCols

uint8_t cbm::algo::trd::Cluster2D::fNCols = 0
private

Definition at line 180 of file Cluster2D.h.

Referenced by AddDigi(), GetEndCh(), GetNCols(), IsChannelInRange(), Merge(), and SetNCols().

◆ fNRows

uint8_t cbm::algo::trd::Cluster2D::fNRows = 0x1f
private

Definition at line 181 of file Cluster2D.h.

Referenced by GetNRows(), GetNRowsRaw(), HasStart(), HasStop(), SetNRows(), SetStart(), and SetStop().

◆ fRecDigis

std::vector<DigiRec> cbm::algo::trd::Cluster2D::fRecDigis
private

Array of calibrated digis.

Definition at line 175 of file Cluster2D.h.

Referenced by ClearDigis(), Finalize(), and GetRecDigis().

◆ fStartCh

uint16_t cbm::algo::trd::Cluster2D::fStartCh = 0xffff
private

Definition at line 182 of file Cluster2D.h.

Referenced by AddDigi(), GetEndCh(), GetStartCh(), IsChannelInRange(), and Merge().

◆ fStartTime

uint32_t cbm::algo::trd::Cluster2D::fStartTime = 0xffffffff
private

Definition at line 183 of file Cluster2D.h.

Referenced by AddDigi(), GetStartTime(), and Merge().


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