CbmRoot
Loading...
Searching...
No Matches
CbmTrdCluster Class Reference

Data Container for TRD clusters. More...

#include <CbmTrdCluster.h>

Inheritance diagram for CbmTrdCluster:
[legend]
Collaboration diagram for CbmTrdCluster:
[legend]

Public Types

enum  eCbmTrdClusterDef { kFasp = 5 , kStart , kStop }
 

Public Member Functions

 CbmTrdCluster ()
 Default constructor.
 
 CbmTrdCluster (const CbmTrdCluster &ref)
 
 CbmTrdCluster (const std::vector< int32_t > &indices, int32_t address)
 
 CbmTrdCluster (int32_t address, int32_t idx, uint16_t chT, uint16_t chR, int32_t r, int32_t time)
 Constructor starting from first digit (FASP specific).
 
virtual ~CbmTrdCluster ()
 Destructor.
 
CbmTrdClusteroperator= (const CbmTrdCluster &ref)
 
bool AddChannel (bool r=true)
 Append a channel to cluster edge. The usage is to account for the masked channels. The mask status is assumed to be performed in the calling function.
 
bool AddDigi (int32_t idx, uint16_t chT=0xffff, uint16_t chR=0, int32_t dt=0)
 Append digi to cluster.
 
void Clear (Option_t *)
 reset cluster data
 
uint16_t GetNCols () const
 
uint16_t GetNRows () 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 (CbmTrdCluster *second)
 Merge current cluster with info from second.
 
void ReInit (int32_t address, int32_t row, int32_t time)
 Initialize basic parameters of the cluster.
 
void SetNCols (uint16_t ncols)
 
void SetNRows (uint16_t nrows)
 
void SetFaspDigis (bool set=true)
 
void SetStart (bool set=true)
 
void SetStop (bool set=true)
 
virtual std::string ToString () const
 Extended functionality.
 
void AddDigi (int32_t index)
 Add digi to cluster.
 
void AddDigis (const std::vector< int32_t > &indices)
 Add array of digi to cluster.
 
void SetDigis (const std::vector< int32_t > &indices)
 Set array of digi to cluster. Overwrites existing array.
 
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 > & GetDigis () const
 Get array of digi indices.
 
void ClearDigis ()
 Remove all digis.
 
int32_t GetAddress () const
 
CbmMatchGetMatch () const
 
void SetAddress (int32_t address)
 
void SetMatch (CbmMatch *match)
 

Protected Attributes

uint8_t fNCols = 0
 
uint8_t fNRows = 0x1f
 
uint16_t fStartCh = 0xffff
 
uint32_t fStartTime = 0xffffffff
 

Private Member Functions

 ClassDef (CbmCluster, 2)
 

Private Attributes

std::vector< int32_t > fDigis
 Array of digi indices.
 
int32_t fAddress
 Unique detector ID.
 
CbmMatchfMatch
 link to Monte-Carlo information
 

Detailed Description

Data Container for TRD clusters.

Author
Florian Uhlig f.uhl.nosp@m.ig@g.nosp@m.si.de

Definition at line 27 of file CbmTrdCluster.h.

Member Enumeration Documentation

◆ eCbmTrdClusterDef

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 29 of file CbmTrdCluster.h.

Constructor & Destructor Documentation

◆ CbmTrdCluster() [1/4]

CbmTrdCluster::CbmTrdCluster ( )

Default constructor.

Definition at line 23 of file CbmTrdCluster.cxx.

◆ CbmTrdCluster() [2/4]

CbmTrdCluster::CbmTrdCluster ( const CbmTrdCluster & ref)

Definition at line 26 of file CbmTrdCluster.cxx.

◆ CbmTrdCluster() [3/4]

CbmTrdCluster::CbmTrdCluster ( const std::vector< int32_t > & indices,
int32_t address )

Definition at line 36 of file CbmTrdCluster.cxx.

◆ CbmTrdCluster() [4/4]

CbmTrdCluster::CbmTrdCluster ( int32_t address,
int32_t idx,
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]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 42 of file CbmTrdCluster.cxx.

References AddDigi(), and ReInit().

◆ ~CbmTrdCluster()

CbmTrdCluster::~CbmTrdCluster ( )
virtual

Destructor.

Definition at line 50 of file CbmTrdCluster.cxx.

Member Function Documentation

◆ AddChannel()

bool CbmTrdCluster::AddChannel ( bool r = true)

Append a channel to cluster edge. The usage is to account for the masked channels. The mask status is assumed to be performed in the calling function.

Parameters
[in]rby default apply to the right edge. If false apply to left

Definition at line 65 of file CbmTrdCluster.cxx.

References fNCols, and fStartCh.

Referenced by CbmTrdModuleRec2D::AddClusterEdges().

◆ AddDigi() [1/2]

void CbmCluster::AddDigi ( int32_t index)
inlineinherited

Add digi to cluster.

Parameters
[in]indexDigi index in TClonesArray.

Definition at line 51 of file CbmCluster.h.

References CbmCluster::fDigis.

Referenced by AddDigi(), CbmMvdSensorClusterfinderTask::ExecFrame(), CbmRecoStsPixel::ProcessData(), and TEST().

◆ AddDigi() [2/2]

bool CbmTrdCluster::AddDigi ( int32_t idx,
uint16_t chT = 0xffff,
uint16_t chR = 0,
int32_t dt = 0 )

Append digi to cluster.

Parameters
[in]idxindex of digi in TClonesArray
[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 CbmCluster::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 76 of file CbmTrdCluster.cxx.

References CbmCluster::AddDigi(), CbmCluster::AddDigis(), CbmCluster::ClearDigis(), fNCols, fStartCh, fStartTime, CbmCluster::GetDigis(), GetEndCh(), SetStart(), and SetStop().

Referenced by CbmTrdCluster().

◆ AddDigis()

void CbmCluster::AddDigis ( const std::vector< int32_t > & indices)
inlineinherited

◆ ClassDef()

CbmCluster::ClassDef ( CbmCluster ,
2  )
privateinherited

◆ Clear()

void CbmTrdCluster::Clear ( Option_t * )

reset cluster data

Definition at line 132 of file CbmTrdCluster.cxx.

References CbmCluster::ClearDigis(), fNCols, fNRows, fStartCh, and fStartTime.

◆ ClearDigis()

void CbmCluster::ClearDigis ( )
inlineinherited

Remove all digis.

Definition at line 87 of file CbmCluster.h.

References CbmCluster::fDigis.

Referenced by AddDigi(), Clear(), Merge(), and TEST().

◆ GetAddress()

◆ GetDigi()

◆ GetDigis()

const std::vector< int32_t > & CbmCluster::GetDigis ( ) const
inlineinherited

Get array of digi indices.

Returns
Array of digi indices in TClonesArray.

Definition at line 82 of file CbmCluster.h.

References CbmCluster::fDigis.

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

◆ GetEndCh()

uint16_t CbmTrdCluster::GetEndCh ( ) const
inline

Definition at line 78 of file CbmTrdCluster.h.

References fNCols, and fStartCh.

Referenced by CbmTrdModuleRec2D::AddClusterEdges(), and AddDigi().

◆ GetMatch()

CbmMatch * CbmCluster::GetMatch ( ) const
inlineinherited

Definition at line 91 of file CbmCluster.h.

References CbmCluster::fMatch.

Referenced by compareClusterDataMembers(), and CbmKFTrackFitQa::StsHitMatch().

◆ GetNCols()

uint16_t CbmTrdCluster::GetNCols ( ) const
inline

Accessors

Definition at line 76 of file CbmTrdCluster.h.

References fNCols.

Referenced by PairAnalysisVarManager::FillVarTrdCluster(), and GetSize().

◆ GetNofDigis()

◆ GetNRows()

uint16_t CbmTrdCluster::GetNRows ( ) const
inline

Definition at line 77 of file CbmTrdCluster.h.

References fNRows.

Referenced by PairAnalysisVarManager::FillVarTrdCluster(), and GetRow().

◆ GetRow()

uint16_t CbmTrdCluster::GetRow ( ) const
inline

Definition at line 79 of file CbmTrdCluster.h.

References GetNRows().

Referenced by Merge(), and ToString().

◆ GetSize()

uint16_t CbmTrdCluster::GetSize ( ) const
inline

Definition at line 80 of file CbmTrdCluster.h.

References GetNCols().

◆ GetStartCh()

uint16_t CbmTrdCluster::GetStartCh ( ) const
inline

Definition at line 81 of file CbmTrdCluster.h.

References fStartCh.

Referenced by CbmTrdModuleRec2D::AddClusterEdges().

◆ GetStartTime()

uint32_t CbmTrdCluster::GetStartTime ( ) const
inline

Definition at line 82 of file CbmTrdCluster.h.

References fStartTime.

◆ HasFaspDigis()

bool CbmTrdCluster::HasFaspDigis ( ) const
inline

Definition at line 83 of file CbmTrdCluster.h.

References fNRows, kFasp, and TESTBIT.

Referenced by CbmTrdModuleRec2D::MakeHit(), and ToString().

◆ HasStart()

bool CbmTrdCluster::HasStart ( ) const
inline

Definition at line 84 of file CbmTrdCluster.h.

References fNRows, kStart, and TESTBIT.

Referenced by CbmTrdHitMC::GetClShape(), Merge(), and ToString().

◆ HasStop()

bool CbmTrdCluster::HasStop ( ) const
inline

Definition at line 85 of file CbmTrdCluster.h.

References fNRows, kStop, and TESTBIT.

Referenced by CbmTrdHitMC::GetClShape(), Merge(), and ToString().

◆ IsChannelInRange()

int32_t CbmTrdCluster::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 157 of file CbmTrdCluster.cxx.

References fNCols, and fStartCh.

◆ Merge()

bool CbmTrdCluster::Merge ( CbmTrdCluster * 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 170 of file CbmTrdCluster.cxx.

References CbmCluster::AddDigis(), CbmCluster::ClearDigis(), fNCols, fStartCh, fStartTime, CbmCluster::GetDigis(), GetRow(), HasStart(), HasStop(), SetStart(), and SetStop().

◆ operator=()

CbmTrdCluster & CbmTrdCluster::operator= ( const CbmTrdCluster & ref)

Definition at line 52 of file CbmTrdCluster.cxx.

References fNCols, fNRows, fStartCh, fStartTime, and CbmCluster::operator=().

◆ ReInit()

void CbmTrdCluster::ReInit ( int32_t address,
int32_t row,
int32_t time )

Initialize basic parameters of the cluster.

Parameters
[in]addressglobal module address
[in]rowcluster row in the module
[in]timecluster time in time buffer

Definition at line 142 of file CbmTrdCluster.cxx.

References fNCols, fStartCh, fStartTime, CbmCluster::SetAddress(), SetNRows(), SetStart(), and SetStop().

Referenced by CbmTrdCluster().

◆ SetAddress()

◆ SetDigis()

void CbmCluster::SetDigis ( const std::vector< int32_t > & indices)
inlineinherited

Set array of digi to cluster. Overwrites existing array.

Parameters
[in]indicesArray of digi indices in TClonesArray.

Definition at line 63 of file CbmCluster.h.

References CbmCluster::fDigis.

Referenced by CbmTrdModuleRecR::addClusters(), and TEST().

◆ SetFaspDigis()

void CbmTrdCluster::SetFaspDigis ( bool set = true)
inline

◆ SetMatch()

void CbmCluster::SetMatch ( CbmMatch * match)
inherited

Definition at line 80 of file CbmCluster.cxx.

References CbmCluster::fMatch.

◆ SetNCols()

void CbmTrdCluster::SetNCols ( uint16_t ncols)
inline

Setters

Definition at line 106 of file CbmTrdCluster.h.

References fNCols.

Referenced by CbmTrdModuleRecR::addClusters().

◆ SetNRows()

void CbmTrdCluster::SetNRows ( uint16_t nrows)
inline

Definition at line 107 of file CbmTrdCluster.h.

References fNRows.

Referenced by ReInit().

◆ SetStart()

void CbmTrdCluster::SetStart ( bool set = true)
inline

Definition at line 113 of file CbmTrdCluster.h.

References CLRBIT, fNRows, kStart, and SETBIT.

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

◆ SetStop()

void CbmTrdCluster::SetStop ( bool set = true)
inline

Definition at line 114 of file CbmTrdCluster.h.

References CLRBIT, fNRows, kStop, and SETBIT.

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

◆ ToString()

string CbmTrdCluster::ToString ( ) const
virtual

Member Data Documentation

◆ fAddress

int32_t CbmCluster::fAddress
privateinherited

Unique detector ID.

Definition at line 105 of file CbmCluster.h.

Referenced by CbmCluster::GetAddress(), CbmCluster::operator=(), CbmCluster::SetAddress(), and CbmCluster::ToString().

◆ fDigis

◆ fMatch

CbmMatch* CbmCluster::fMatch
privateinherited

link to Monte-Carlo information

Definition at line 106 of file CbmCluster.h.

Referenced by CbmCluster::CbmCluster(), CbmCluster::GetMatch(), CbmCluster::operator=(), and CbmCluster::SetMatch().

◆ fNCols

uint8_t CbmTrdCluster::fNCols = 0
protected

◆ fNRows

uint8_t CbmTrdCluster::fNRows = 0x1f
protected

◆ fStartCh

uint16_t CbmTrdCluster::fStartCh = 0xffff
protected

◆ fStartTime

uint32_t CbmTrdCluster::fStartTime = 0xffffffff
protected

Definition at line 123 of file CbmTrdCluster.h.

Referenced by AddDigi(), Clear(), GetStartTime(), Merge(), operator=(), and ReInit().


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