LCOV - code coverage report
Current view: top level - TPC/TPCrec - AliTPCtrackerSector.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 33 40 82.5 %
Date: 2016-06-14 17:26:59 Functions: 27 43 62.8 %

          Line data    Source code
       1             : #ifndef ALITPCTRACKERSECTOR_H
       2             : #define ALITPCTRACKERSECTOR_H
       3             : /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
       4             :  * See cxx source for full Copyright notice                               */
       5             : 
       6             : 
       7             : /* $Id: AliTPCtrackerSector.h 25837 2008-05-16 16:39:00Z marian $ */
       8             : 
       9             : //-------------------------------------------------------
      10             : //   TPC tracker - helper classes for cluster storing
      11             : //                 and navigation                   
      12             : //   
      13             : //
      14             : //   Origin: 
      15             : //-------------------------------------------------------
      16             : 
      17             : #include "TClonesArray.h"
      18             : 
      19             : //class TFile;
      20             : class AliTPCParam;
      21             : class TTreeSRedirector;
      22             : 
      23             : 
      24             : 
      25             : class AliTPCtrackerRow : public TObject{
      26             : public:
      27             :   AliTPCtrackerRow();
      28             :   ~AliTPCtrackerRow();
      29             :   void InsertCluster(const AliTPCclusterMI *c, UInt_t index);
      30             :   void ResetClusters();
      31      248744 :   operator int() const {return fN;}
      32      535124 :   Int_t GetN() const {return fN;}
      33      277124 :   const AliTPCclusterMI* operator[](Int_t i) const {return fClusters[i];}
      34      144096 :   UInt_t GetIndex(Int_t i) const {return fIndex[i];}
      35             :   Int_t Find(Double_t z) const; 
      36             :   AliTPCclusterMI *  FindNearest(Double_t y, Double_t z, Double_t roady, Double_t roadz) const;
      37             :   AliTPCclusterMI *  FindNearest2(Double_t y, Double_t z, Double_t roady, Double_t roadz, UInt_t & index) const;
      38             :   
      39       11448 :   void SetX(Double_t x) {fX=x;}
      40      252428 :   Double_t GetX() const {return fX;}
      41      198704 :   Float_t GetDeadZone() const {return fDeadZone;}
      42       11448 :   void SetDeadZone(Float_t d) {fDeadZone=d;}
      43     1483652 :   Int_t GetN1() const {return fN1;}
      44       45792 :   void SetN1(Int_t n) {fN1=n;}
      45     1446482 :   Int_t GetN2() const {return fN2;}
      46       45666 :   void SetN2(Int_t n) {fN2=n;}
      47      807556 :   TClonesArray* GetClusters1() const {return fClusters1;}
      48      808658 :   TClonesArray* GetClusters2() const {return fClusters2;}
      49             :   void SetCluster1(Int_t i, const AliTPCclusterMI &cl);
      50             :   void SetCluster2(Int_t i, const AliTPCclusterMI &cl);
      51             : 
      52      269360 :   AliTPCclusterMI* GetCluster1(Int_t i) const {return (fClusters1)?(AliTPCclusterMI*) fClusters1->At(i):NULL;}
      53      250224 :   AliTPCclusterMI* GetCluster2(Int_t i) const {return (fClusters2)?(AliTPCclusterMI*) fClusters2->At(i):NULL;}  
      54             :   
      55    23805468 :   Short_t GetFastCluster(Int_t i) const {return fFastCluster[i];}
      56             :   void SetFastCluster(Int_t i, Short_t cl);
      57           0 :   Int_t IncrementN1() { return ++fN1;}
      58           0 :   Int_t IncrementN2() { return ++fN2;}
      59             :   
      60             : private:  
      61             :   AliTPCtrackerRow & operator=(const AliTPCtrackerRow & );
      62             :   AliTPCtrackerRow(const AliTPCtrackerRow& /*r*/);           //dummy copy constructor
      63             :   Float_t fDeadZone;  // the width of the dead zone
      64             :   TClonesArray *fClusters1; //array with clusters 1
      65             :   Int_t fN1;  //number of clusters on left side
      66             :   TClonesArray *fClusters2; //array with clusters 2
      67             :   Int_t fN2; // number of clusters on right side of the TPC
      68             :   Short_t fFastCluster[510];   //index of the nearest cluster at given position
      69             :   Int_t fN;                                          //number of clusters 
      70             :   const AliTPCclusterMI *fClusters[kMaxClusterPerRow]; //pointers to clusters
      71             :   // indexes for cluster at given position z  
      72             :   // AliTPCclusterMI *fClustersArray;                     // 
      73             :   UInt_t fIndex[kMaxClusterPerRow];                  //indeces of clusters
      74             :   Double_t fX;                                 //X-coordinate of this row  
      75          16 :   ClassDef(AliTPCtrackerRow,0)
      76             : };
      77             : 
      78             : 
      79             : //**************** Internal tracker class ********************** 
      80             : class AliTPCtrackerSector: public TObject {
      81             :  public:
      82          72 :   AliTPCtrackerSector():
      83          72 :     fN(0),
      84          72 :     fRow(0),
      85          72 :     fAlpha(0.),
      86          72 :     fAlphaShift(0.),
      87          72 :     fPadPitchWidth(0.),
      88          72 :     fPadPitchLength(0.),
      89          72 :     f1PadPitchLength(0.),
      90         432 :     f2PadPitchLength(0.) {}
      91        6228 :     ~AliTPCtrackerSector() { delete[] fRow; }
      92     4423836 :     AliTPCtrackerRow& operator[](Int_t i) const { return *(fRow+i); }
      93     2816578 :     Int_t GetNRows() const { return fN; }
      94             :     void Setup(const AliTPCParam *par, Int_t flag);
      95           0 :     Double_t GetX(Int_t l) const {return fRow[l].GetX();}
      96             :     Double_t GetMaxY(Int_t l) const {
      97           0 :       return GetX(l)*TMath::Tan(0.5*GetAlpha());
      98             :     } 
      99      105804 :     Double_t GetAlpha() const {return fAlpha;}
     100       92180 :     Double_t GetAlphaShift() const {return fAlphaShift;}     
     101             :     //Int_t GetFirst(){return fFirstRow;}
     102             :     Int_t GetNClInSector(Int_t side);
     103             :     Int_t GetRowNumber(Double_t  x) const;
     104           0 :     Double_t GetPadPitchWidth()  const {return fPadPitchWidth;}
     105           0 :     Double_t GetPadPitchLength() const {return fPadPitchLength;}
     106           0 :     Double_t GetPadPitchLength(Float_t x) const {return (x<200) ? fPadPitchLength:f2PadPitchLength ;}
     107             :     
     108             :     void InsertCluster(AliTPCclusterMI *cl, Int_t size, const AliTPCParam *par);
     109             : 
     110             :     Int_t GetNClInSector(Int_t side) const;
     111             :     Int_t GetNClUsedInSector(Int_t side) const;
     112             :   
     113             :  private:
     114             :     AliTPCtrackerSector & operator=(const AliTPCtrackerSector & );
     115             :     AliTPCtrackerSector(const AliTPCtrackerSector &/*s*/);           //dummy copy contructor 
     116             :     Int_t fN;                           //number of pad rows 
     117             :     //Int_t fFirstRow;                  //offset
     118             :     AliTPCtrackerRow *fRow;             //array of pad rows
     119             :     Double_t fAlpha;                    //opening angle
     120             :     Double_t fAlphaShift;               //shift angle;
     121             :     Double_t fPadPitchWidth;            //pad pitch width
     122             :     Double_t fPadPitchLength;           //pad pitch length
     123             :     Double_t f1PadPitchLength;          //pad pitch length
     124             :     Double_t f2PadPitchLength;          //pad pitch length  
     125          16 :     ClassDef(AliTPCtrackerSector,1)
     126             : };
     127             : 
     128             : 
     129             : 
     130             : #endif
     131             : 
     132             : 

Generated by: LCOV version 1.11