|
CbmRoot
|
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< DigiRec > | fRecDigis |
| 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 |
Data Container for TRD clusters.
Definition at line 22 of file Cluster2D.h.
| 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.
|
delete |
| cbm::algo::trd::Cluster2D::Cluster2D | ( | const Cluster2D & | ref | ) |
Definition at line 17 of file Cluster2D.cxx.
References Cluster2D(), fAddress, fDigiIndices, fDigis, fNCols, fNRows, fRecDigis, fStartCh, and fStartTime.
| 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).
| [in] | address | global module address |
| [in] | idx | global digi index in the TClonesArray |
| [in] | digi | pointer to digi |
| [in] | chT | RO channel address within the module for tilt pairing |
| [in] | chR | RO channel address within the module for rect pairing |
| [in] | r | module row for the RO channel |
| [in] | time | relative buffer DAQ time |
Definition at line 30 of file Cluster2D.cxx.
References AddDigi(), fAddress, fNCols, fStartCh, fStartTime, SetNRows(), SetStart(), and SetStop().
|
inlinevirtual |
Destructor.
Definition at line 54 of file Cluster2D.h.
| 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.
| [in] | idx | index of digi in TClonesArray |
| [in] | digi | pointer to digi |
| [in] | chT | RO channel for digi (tilt pairing for FASP) default 0xffff (SPADIC) |
| [in] | chR | RO channel for rect pairing (only for FASP) |
| [in] | dt | update start time of cluster if current digi is prompt |
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 :
Definition at line 44 of file Cluster2D.cxx.
References AddDigiIdxPair(), AddDigiIdxPairs(), ClearDigis(), fNCols, fStartCh, fStartTime, GetDigiIndices(), GetDigis(), GetEndCh(), SetStart(), and SetStop().
Referenced by Cluster2D().
|
inline |
Add digi to cluster.
| [in] | index | Digi index in TClonesArray. |
| [in] | digi | pointer to digi |
Definition at line 61 of file Cluster2D.h.
References fDigiIndices, and fDigis.
Referenced by AddDigi().
|
inline |
Add array of digi to cluster.
| [in] | indices | Array of digi indices in TClonesArray. |
Definition at line 71 of file Cluster2D.h.
References fDigiIndices, and fDigis.
|
inline |
Remove all digis.
Definition at line 111 of file Cluster2D.h.
References fDigiIndices, fDigis, and fRecDigis.
| bool cbm::algo::trd::Cluster2D::Finalize | ( | const size_t | numCols | ) |
Fill array of calibrated digis.
| [in] | number | of columns |
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_.
|
inline |
|
inline |
Get digi at position index.
| [in] | index | Position of digi in array. |
Definition at line 88 of file Cluster2D.h.
References fDigiIndices.
|
inline |
Get array of digi indices.
Definition at line 94 of file Cluster2D.h.
References fDigiIndices.
|
inline |
Get array of digi pointers.
Definition at line 100 of file Cluster2D.h.
References fDigis.
|
inline |
Definition at line 135 of file Cluster2D.h.
References fNCols, and fStartCh.
Referenced by AddDigi().
|
inline |
|
inline |
Number of digis in cluster.
Definition at line 81 of file Cluster2D.h.
References fDigiIndices.
|
inline |
|
inline |
Definition at line 134 of file Cluster2D.h.
References fNRows.
|
inline |
Get 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().
|
inline |
|
inline |
Definition at line 137 of file Cluster2D.h.
References GetNCols().
|
inline |
Definition at line 138 of file Cluster2D.h.
References fStartCh.
|
inline |
Definition at line 139 of file Cluster2D.h.
References fStartTime.
|
inline |
Definition at line 140 of file Cluster2D.h.
|
inline |
|
inline |
| int32_t cbm::algo::trd::Cluster2D::IsChannelInRange | ( | uint16_t | chT, |
| uint16_t | chR ) const |
Query on RO channels list.
| [in] | chT | tilted RO channel for digi |
| [in] | chR | rectangular RO channel for digi |
Definition at line 103 of file Cluster2D.cxx.
| bool cbm::algo::trd::Cluster2D::Merge | ( | Cluster2D * | second | ) |
Merge current cluster with info from second.
| [in] | second | cluster to be added |
| [in] | typ | the type of pad-plane of the source chamber; true if Trd2d |
Definition at line 116 of file Cluster2D.cxx.
References AddDigiIdxPairs(), ClearDigis(), Cluster2D(), fNCols, fStartCh, fStartTime, GetDigiIndices(), GetDigis(), GetRow(), HasStart(), HasStop(), SetStart(), and SetStop().
|
inline |
|
inline |
|
inline |
Definition at line 171 of file Cluster2D.h.
References CLRBIT, fNRows, kStart, and SETBIT.
Referenced by AddDigi(), Cluster2D(), and Merge().
|
inline |
Definition at line 172 of file Cluster2D.h.
References CLRBIT, fNRows, kStop, and SETBIT.
Referenced by AddDigi(), Cluster2D(), and Merge().
|
private |
Unique detector ID.
Definition at line 179 of file Cluster2D.h.
Referenced by Cluster2D(), Cluster2D(), and GetAddress().
|
private |
Array of digi indices.
Definition at line 177 of file Cluster2D.h.
Referenced by AddDigiIdxPair(), AddDigiIdxPairs(), ClearDigis(), Cluster2D(), GetDigi(), GetDigiIndices(), and GetNofDigis().
|
private |
Array of digi pointers.
Definition at line 176 of file Cluster2D.h.
Referenced by AddDigiIdxPair(), AddDigiIdxPairs(), ClearDigis(), Cluster2D(), Finalize(), and GetDigis().
|
private |
Definition at line 180 of file Cluster2D.h.
Referenced by AddDigi(), Cluster2D(), Cluster2D(), GetEndCh(), GetNCols(), IsChannelInRange(), Merge(), and SetNCols().
|
private |
Definition at line 181 of file Cluster2D.h.
Referenced by Cluster2D(), GetNRows(), GetNRowsRaw(), HasStart(), HasStop(), SetNRows(), SetStart(), and SetStop().
|
private |
Array of calibrated digis.
Definition at line 175 of file Cluster2D.h.
Referenced by ClearDigis(), Cluster2D(), Finalize(), and GetRecDigis().
|
private |
Definition at line 182 of file Cluster2D.h.
Referenced by AddDigi(), Cluster2D(), Cluster2D(), GetEndCh(), GetStartCh(), IsChannelInRange(), and Merge().
|
private |
Definition at line 183 of file Cluster2D.h.
Referenced by AddDigi(), Cluster2D(), Cluster2D(), GetStartTime(), and Merge().