LCOV - code coverage report
Current view: top level - TPC/TPCbase - AliTPCclusterMI.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 19 23 82.6 %
Date: 2016-06-14 17:26:59 Functions: 18 25 72.0 %

          Line data    Source code
       1             : #ifndef ALITPCCLUSTERMI_H
       2             : #define ALITPCCLUSTERMI_H
       3             : 
       4             : /// \class AliTPCclusterMI
       5             : /// \brief TPC Cluster Class
       6             : ///
       7             : /// Parallel tracking
       8             : ///
       9             : /// \author Marian Ivanov
      10             : 
      11             : /* $Id$ */
      12             : 
      13             : 
      14             : #include "AliCluster.h"
      15             : #include "TMath.h"
      16             : //#include "AliTPCclusterInfo.h"
      17             : #include <AliTrackPointArray.h>
      18             : 
      19             : //_____________________________________________________________________________
      20             : class AliTPCclusterMI : public AliCluster {
      21             :   enum Status{ kDisabled = 0x7F};
      22             :   enum {
      23             :     kSectorChanged=BIT(14)          // to flag sector change due to the distortions
      24             :   };
      25             : public:
      26             :   AliTPCclusterMI();
      27             :   AliTPCclusterMI(const AliTPCclusterMI & cluster);
      28             :   AliTPCclusterMI &operator = (const AliTPCclusterMI & cluster); //assignment operator
      29             :   AliTPCclusterMI(Int_t *lab, Float_t *hit);
      30             :   virtual ~AliTPCclusterMI();
      31           0 :   virtual void  Clear(const Option_t*) { ResetBit(0xffffffff);}
      32             :   virtual Bool_t IsSortable() const;
      33             :   virtual Int_t Compare(const TObject* obj) const;
      34             :   inline  void Use(Int_t inc=10);
      35           0 :   inline  void Disable(){fUsed=kDisabled;}
      36      221168 :   inline  Bool_t IsDisabled() const {return (fUsed==kDisabled);}
      37             : 
      38           0 :   Bool_t  IsSectorChanged()                const {return TestBit(kSectorChanged);}
      39           0 :   void    SetSectorChanged(Bool_t v=kTRUE)       {SetBit(kSectorChanged,v);}
      40             : 
      41     1530572 :   virtual Int_t GetDetector() const {return fDetector;}
      42      907308 :   virtual Int_t GetRow() const {return fRow;}
      43             :   virtual void SetDetector(Int_t detector);
      44      129896 :   virtual void SetRow(Int_t row){fRow = (UChar_t)(row%256);}
      45      129896 :   virtual void SetTimeBin(Float_t timeBin){ fTimeBin= timeBin;}
      46      129896 :   virtual void SetPad(Float_t pad){ fPad = pad;}
      47             :   //
      48      129896 :   void SetQ(Float_t q) {fQ=(UShort_t)q;}
      49      282172 :   void SetType(Char_t type) {fType=type;}
      50      129896 :   void SetMax(UShort_t max) {fMax=max;}
      51      788288 :   Int_t IsUsed(Int_t th=10) const {return (fUsed>=th) ? 1 : 0;}
      52      328096 :   Float_t GetQ() const {return TMath::Abs(fQ);}
      53      299744 :   Float_t GetMax() const {return fMax;}
      54      312938 :   Char_t  GetType()const {return fType;}
      55      941864 :   Float_t GetTimeBin() const { return fTimeBin;}
      56     1118776 :   Float_t GetPad() const { return fPad;}
      57             :   //
      58             :   void    SetDistortions(float dx, float dy, float dz);
      59             :   void    GetDistortions(float& dx,float& dy, float& dz)  const;
      60             :   void    SetDistortionDispersion(float d);
      61             :   Float_t GetDistortionX() const;
      62             :   Float_t GetDistortionY() const;
      63             :   Float_t GetDistortionZ() const;
      64             :   Float_t GetDistortionDispersion() const;
      65             : 
      66             :   Bool_t  GetGlobalCov(Float_t cov[6]) const;
      67             :   //  AliTPCclusterInfo * GetInfo() const { return fInfo;}
      68             :   //  void SetInfo(AliTPCclusterInfo * info);
      69             :   //
      70             :   AliTPCclusterMI*  MakeCluster(AliTrackPoint* point);
      71             :   AliTrackPoint*    MakePoint();
      72             :   static void     SetGlobalTrackPoint(const AliCluster &cl, AliTrackPoint &point);
      73             : 
      74             :  protected:
      75             :   enum{ // constants for storing x,y,z distortion in AliCluster::fSigmaYZ 
      76             :     kScaleDX=50,kScaleDY=100,kScaleDZ=100,kScaleDisp=85, // 1./kScale gives rounding in cm
      77             :     kNBitsDX=10, kNBitsDY=11,kNBitsDZ=11, 
      78             :     kMaxDX = (0x1<<(kNBitsDX-1))-1, kMaxDY = (0x1<<(kNBitsDY-1))-1,kMaxDZ = (0x1<<(kNBitsDZ-1))-1,
      79             :     kMaxDisp = 0xff,
      80             :     kMaskDX = (0x1<<kNBitsDX)-1, kMaskDY = (0x1<<kNBitsDY)-1, kMaskDZ = (0x1<<kNBitsDZ)-1
      81             :   };
      82             : 
      83             : private:
      84             :   //  AliTPCclusterInfo * fInfo;  ///< pointer to the cluster debug info
      85             :   Float_t   fTimeBin;  ///< time bin coordinate
      86             :   Float_t   fPad;  ///< pad coordinate
      87             :   Short_t   fQ ;       ///< Q of cluster (in ADC counts)
      88             :   Short_t   fMax;      ///< maximal amplitude in cluster
      89             :   Char_t    fType;     ///< different meaning depending on whether hlt of offline cluster finder was used:
      90             :                        //   offline: type of the cluster 0 means golden
      91             :                        //   hlt: 0 = Not Split, 1 = Split in Pad Direction, 2 = Split in Time Direction, 3 = Split in both directions
      92             :   Char_t    fUsed;     ///< counter of usage
      93             :   UChar_t   fDisp;     ///< dispersion of applied correction
      94             :   UChar_t   fDetector; ///< detector  number
      95             :   UChar_t   fRow;      ///< row number number
      96             :   /// \cond CLASSIMP
      97       31412 :   ClassDef(AliTPCclusterMI,7)  // Time Projection Chamber clusters
      98             :   /// \endcond
      99             : };
     100             : 
     101             : void AliTPCclusterMI::Use(Int_t inc)
     102             : {
     103     1505176 :   if (inc>0)  fUsed+=inc;
     104             :   else
     105      519584 :     fUsed=0;
     106      674920 : }
     107             : 
     108             : 
     109             : 
     110             : #endif
     111             : 
     112             : 

Generated by: LCOV version 1.11