LCOV - code coverage report
Current view: top level - TRD/TRDbase - AliTRDchamberTimeBin.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 11 21 52.4 %
Date: 2016-06-14 17:26:59 Functions: 11 25 44.0 %

          Line data    Source code
       1             : #ifndef ALITRDCHAMBERTIMEBIN_H
       2             : #define ALITRDCHAMBERTIMEBIN_H
       3             : 
       4             : /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
       5             : * See cxx source for full Copyright notice                               */
       6             : 
       7             : /* $Id: AliTRDchamberTimeBin.h 22646 2007-11-29 18:13:40Z cblume $ */
       8             : 
       9             : ////////////////////////////////////////////////////////////////////////////
      10             : //                                                                        //
      11             : //  A TRD layer in a single stack                                         //
      12             : //                                                                        //
      13             : ////////////////////////////////////////////////////////////////////////////
      14             : 
      15             : #ifndef ROOT_TObject
      16             : #include "TObject.h"
      17             : #endif
      18             : 
      19             : class AliTRDcluster;
      20             : class AliTRDReconstructor;
      21             : 
      22             : class AliTRDchamberTimeBin : public TObject
      23             : {
      24             : public:
      25             :   enum AliTRDchamberTimeBinStatus {
      26             :      kT0    = BIT(14) // is the T0 time bin
      27             :     ,kOwner = BIT(15) // is owner of the clusters
      28             :   };
      29             :   enum{
      30             :      kMaxClustersLayer = 150
      31             :     ,kMaxRows = 16
      32             :   };
      33             : 
      34             :   AliTRDchamberTimeBin(Int_t plane=-1, Int_t stack=-1, Int_t sector=-1, Double_t z0=-1., Double_t zLength=-1.);
      35             :   //AliTRDchamberTimeBin(const AliTRDpropagationLayer &layer, Double_t z0, Double_t zLength, UChar_t stackNr);
      36             :   //AliTRDchamberTimeBin(const AliTRDpropagationLayer &layer);
      37             :   AliTRDchamberTimeBin(const AliTRDchamberTimeBin &layer);
      38             :   ~AliTRDchamberTimeBin();
      39       54250 :   operator       Int_t() const  { return fN; }
      40             :   AliTRDchamberTimeBin&
      41             :                  operator=(const AliTRDchamberTimeBin &myLayer);
      42             :   AliTRDcluster* operator[](const Int_t i) const {
      43       21948 :     return ((i < fN) && (i >= 0)) ? fClusters[i] : NULL;
      44             :   }
      45             : 
      46             :   void           Bootstrap(const AliTRDReconstructor *rec, Int_t det);
      47             :   void           BuildIndices(Int_t iter = 0);
      48             :   void           BuildCond(AliTRDcluster * const cl, Double_t *cond, UChar_t Layer, Double_t theta=0., Double_t phi=0.);
      49             :   void           Clear(const Option_t *opt = NULL);
      50           0 :   AliTRDcluster* GetCluster(Int_t index) const {return index < fN && index >= 0 ? fClusters[index] : NULL;}
      51       19848 :   Int_t          GetGlobalIndex(Int_t index) const {return ((index < fN) && (index >= 0)) ? fIndex[index] : 0; }
      52             :   void           GetClusters(const Double_t * const cond, Int_t *index, Int_t& ncl, Int_t BufferSize = kMaxClustersLayer);
      53             :   AliTRDcluster* GetNearestCluster(Double_t *cond);
      54             :   Double_t       GetX()                            const {
      55       13178 :   return fX;      }
      56           0 :   Double_t       GetZ0()                           const { return fZ0;     }
      57           0 :   Double_t       GetDZ0()                          const { return fZLength;}
      58           0 :   Int_t          GetNClusters()                    const { return fN; }
      59           0 :   Int_t          GetPlane()                        const { return fPlane;  }
      60           0 :   Int_t          GetStack()                        const { return fStack;  }
      61           0 :   Int_t          GetSector()                       const { return fSector; }
      62             :   void           InsertCluster(AliTRDcluster *c, UInt_t index);
      63             : 
      64           0 :   Bool_t         IsT0() const {return TestBit(kT0);}
      65       43276 :   Bool_t         IsOwner() const {return TestBit(kOwner);}
      66             : 
      67             :   void           Print(Option_t *opt=NULL) const;
      68             :   Int_t          SearchNearestCluster(Double_t y, Double_t z, Double_t Roady, Double_t Roadz) const;
      69             :   void           SetRange(Float_t z0, Float_t zLength);
      70       15594 :   void           SetNRows(Int_t nRows){ fNRows = nRows; }
      71       15594 :   void           SetPlane(Int_t plane){ fPlane = plane; }
      72       21638 :   void           SetReconstructor(const AliTRDReconstructor *rec) {fkReconstructor = rec;}
      73       15594 :   void           SetStack(Int_t stack){ fStack = stack; }
      74       15594 :   void           SetSector(Int_t sector){ fSector = sector; }
      75             :   void           SetOwner(Bool_t copy=kTRUE);
      76           0 :   void           SetT0(Bool_t set=kTRUE) {SetBit(kT0, set);}
      77           0 :   void           SetX(Double_t x) {fX = x;}
      78             : private:
      79             :   void           Copy(TObject &o) const;
      80             :   Int_t          Find(Float_t y) const;
      81             :   Int_t          FindYPosition(Double_t y, UChar_t z, Int_t nClusters) const;
      82             :   Int_t          FindNearestYCluster(Double_t y, UChar_t z) const;
      83             : 
      84             : private:
      85             :   const AliTRDReconstructor *fkReconstructor; //! Global TRD reconstructor
      86             :   Char_t        fPlane;                       //! Plane number
      87             :   Char_t        fStack;                       //! Stack number in supermodule
      88             :   Char_t        fSector;                      //! Sector mumber
      89             :   Char_t        fNRows;                       //! Number of pad rows in the chamber
      90             :   UChar_t       fPositions[kMaxRows];         //! Starting index of clusters in pad row
      91             :   Int_t         fN;                           //! Number of clusters
      92             :   AliTRDcluster *fClusters[kMaxClustersLayer];//  Array of pointers to clusters
      93             :   UInt_t        fIndex[kMaxClustersLayer];    //! Array of cluster indexes
      94             :   Double_t      fX;                           //! Radial position of tb
      95             : 
      96             :   // obsolete !!
      97             :   Double_t      fZ0;                          //  Starting position of the layer in Z direction
      98             :   Double_t      fZLength;                     //  Length of the layer in Z direction
      99             : 
     100          48 :   ClassDef(AliTRDchamberTimeBin, 2)           //  Tracking propagation layer for one time bin in chamber
     101             : };
     102             : 
     103             : #endif  // ALITRDCHAMBERTIMEBIN_H
     104             : 

Generated by: LCOV version 1.11