LCOV - code coverage report
Current view: top level - HLT/TPCLib/HWCFemulator - AliHLTTPCHWCFDataTypes.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 10 12 83.3 %
Date: 2016-06-14 17:26:59 Functions: 10 13 76.9 %

          Line data    Source code
       1             : // $Id$
       2             : #ifndef ALIHLTTPCHWCFDATATYPES_H
       3             : #define ALIHLTTPCHWCFDATATYPES_H
       4             : //* This file is property of and copyright by the ALICE HLT Project        * 
       5             : //* ALICE Experiment at CERN, All rights reserved.                         *
       6             : //* See cxx source for full Copyright notice                               *
       7             : 
       8             : //  @file   AliHLTTPCHWCFDataTypes.h
       9             : //  @author Sergey Gorbunov <sergey.gorbunov@fias.uni-frankfurt.de>
      10             : //  @author Torsten Alt <talt@cern.ch> 
      11             : //  @brief  Data types for FPGA ClusterFinder Emulator for TPC
      12             : //  @brief  ( see AliHLTTPCHWCFEmulator class )
      13             : //  @note
      14             : 
      15             : #include "AliHLTDataTypes.h"
      16             : #include "AliHLTTPCClusterMCData.h"
      17             : #include <vector>
      18             : 
      19             : 
      20             : struct AliHLTTPCHWCFDefinitions
      21             : {
      22             :   static const unsigned int kMaxNTimeBins = 1024+10; // max N time bins
      23             :   static const int kFixedPoint = 12; // N bits after fixed point 
      24             :                                      // for fixed point operations
      25             : };
      26             : 
      27             : typedef struct AliHLTTPCHWCFDefinitions AliHLTTPCHWCFDefinitions;
      28             : 
      29             : struct AliHLTTPCHWCFDigit
      30             : {
      31             :   //* constructor **/
      32           0 :   AliHLTTPCHWCFDigit(): fQ(0), fTime(0), fPeak(0), fMC()
      33           0 :   {}
      34             : 
      35             :   AliHLTUInt32_t fQ;    // charge
      36             :   AliHLTUInt32_t fTime; // timebin
      37             :   AliHLTUInt32_t fPeak;  // peak flag: 0:flat, 1:peak, 2: local minimum
      38             :   AliHLTTPCClusterMCLabel fMC; // mc label
      39             : };
      40             : typedef struct AliHLTTPCHWCFDigit AliHLTTPCHWCFDigit;
      41             : 
      42          36 : struct AliHLTTPCHWCFBunch
      43             : {
      44             :   //* constructor **/
      45          18 :   AliHLTTPCHWCFBunch(): fFlag(0), fRow(0), fPad(0), fBranch(0), fBorder(0),
      46           9 :                         fGain(0), fData()
      47          27 :   {}
      48             : 
      49             :   AliHLTUInt32_t fFlag; // 0 - Off, 1 - data, 2 - RCU trailer, 3 - end of data
      50             :   AliHLTUInt32_t fRow;  // row number
      51             :   AliHLTUInt32_t fPad;  // pad number
      52             :   bool fBranch;         // 0  - pad belongs to branch A, 1 - pad belongs to branch B
      53             :   bool fBorder;         // is the pad at the border of its branch
      54             :   AliHLTUInt64_t fGain; // gain correction factor 
      55             :                         //   (fixed point integer with kFixedPoint bits after the point)
      56             :   std::vector<AliHLTTPCHWCFDigit> fData;      // signals
      57             : };
      58             : typedef struct AliHLTTPCHWCFBunch AliHLTTPCHWCFBunch;
      59             : 
      60       49656 : struct AliHLTTPCHWCFClusterFragment
      61             : {
      62             :   //* constructor **/
      63       24828 :   AliHLTTPCHWCFClusterFragment():  fFlag(0), fRow(0), fPad(0), fBranch(0), fBorder(0),
      64       12414 :     fQmax(0), fQ(0), fT(0), fP(0), fT2(0), fP2(0), fTMean(0),fLastQ(0), fNPads(0), fSlope(0), fNDeconvolutedTime(0), fIsDeconvolutedPad(0),fConsecutiveTimeDeconvolution(0), fMC()
      65       37242 :   {}
      66             : 
      67             :   AliHLTUInt32_t fFlag; // 0 - Off, 1 - data, 2 - RCU trailer, 3 - end of data
      68             :   AliHLTUInt32_t fRow;  // row number
      69             :   AliHLTUInt32_t fPad;  // pad number
      70             :   bool fBranch;         // 0  - pad belongs to branch A, 1 - pad belongs to branch B
      71             :   bool fBorder;         // is the pad at the border of its branch
      72             :   AliHLTUInt64_t fQmax; // total charge, fixed point integer
      73             :   AliHLTUInt64_t fQ;    // total charge, fixed point integer
      74             :   AliHLTUInt64_t fT;    // sum of time*charge , fixed point integer
      75             :   AliHLTUInt64_t fP;    // sum of pad*charge  , fixed point integer
      76             :   AliHLTUInt64_t fT2;   // sum of time^2*charge , fixed point integer
      77             :   AliHLTUInt64_t fP2;   // sum of pad^2*charge  , fixed point integer
      78             :   AliHLTUInt64_t fTMean;// mean time, used for merging neighbouring pads
      79             :   AliHLTUInt64_t fLastQ; // for merged fragments, charge of the last (highest pad value)
      80             :                          //    fragment bein merged, needed for deconvolution
      81             :   AliHLTUInt32_t fNPads; // how many pads are in the cluster 
      82             :   bool fSlope;           // for merged fragments, ==1 if fLastQ decreases
      83             :                          //   ( needed for deconvolution )
      84             :   AliHLTUInt32_t fNDeconvolutedTime; // how many cluster pads has been split in Time direction  
      85             :   bool fIsDeconvolutedPad; // tag shows if the cluster has been split in several clusters in Pad direction
      86             :   AliHLTUInt32_t fConsecutiveTimeDeconvolution; // ==2 when 2 or more cons. time sequences are deconvoluted
      87             :   std::vector<AliHLTTPCClusterMCLabel> fMC; // mc labels
      88             : };
      89             : typedef struct AliHLTTPCHWCFClusterFragment AliHLTTPCHWCFClusterFragment;
      90             : 
      91             : struct AliHLTTPCHWCFCluster
      92             : {
      93             :   //* constructor **/
      94           6 : AliHLTTPCHWCFCluster(): fFlag(0), fRowQ(0), fQ(0), fT(0), fP(0), fT2(0), fP2(0), fMC()
      95           9 :   {}
      96             : 
      97             :   AliHLTUInt32_t fFlag; // 0 - Off, 1 - data, 2 - RCU trailer, 3 - end of data
      98             :   AliHLTUInt32_t fRowQ; // bits 30-31 = 0x3
      99             :                         // bits 24-29 = row number
     100             :                         // bit  23    = 0 (not used) 
     101             :                         // bits 0 -22 = max adc value as fixed point integer,
     102             :                         //              with 12 bits after the point
     103             :   AliHLTUInt32_t fQ;    // 0-29 total charge as fixed point integer, 12 bits after the point
     104             :                         // 30   flag: is the cluster deconvoluted in Time
     105             :                         // 31   flag: is the cluster deconvoluted in Pad
     106             :   AliHLTUInt32_t fT;    // mean time, 32-bit float stored as 32-bit integer
     107             :   AliHLTUInt32_t fP;    // mean pad,  32-bit float stored as 32-bit integer
     108             :   AliHLTUInt32_t fT2;   // mean time^2, 32-bit float stored as 32-bit integer
     109             :   AliHLTUInt32_t fP2;   // mean pad^2,  32-bit float stored as 32-bit integer
     110             :   AliHLTTPCClusterMCLabel fMC; // mc label
     111             : };
     112             : typedef struct AliHLTTPCHWCFCluster AliHLTTPCHWCFCluster;
     113             : 
     114             : #endif

Generated by: LCOV version 1.11