LCOV - code coverage report
Current view: top level - TPC/TPCrec - AliTPCseed.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 53 73 72.6 %
Date: 2016-06-14 17:26:59 Functions: 54 77 70.1 %

          Line data    Source code
       1             : #ifndef ALITPCSEED_H
       2             : #define ALITPCSEED_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$ */
       8             : 
       9             : //-------------------------------------------------------
      10             : //   TPC seed
      11             : //   Class  needed for TPC parallel tracking 
      12             : //
      13             : //   Origin: 
      14             : //-------------------------------------------------------
      15             : 
      16             : #include <TError.h>
      17             : #include <TBits.h>
      18             : 
      19             : #include <TVectorFfwd.h>
      20             : #include "AliTPCtrack.h"
      21             : #include "AliComplexCluster.h"
      22             : #include "AliPID.h"
      23             : #include "AliVTPCseed.h"
      24             : #include "AliTPCreco.h"
      25             : 
      26             : class TFile;
      27             : class AliTPCParam;
      28             : class AliTPCseed;
      29             : class AliTPCclusterMI;
      30             : class AliESD;
      31             : class AliTPCCalPad;
      32             : class TClonesArray;
      33             : 
      34             : class AliTPCseed : public AliTPCtrack, public AliVTPCseed {
      35             :   public:  
      36             :   enum {
      37             :     kInDead=BIT(15)            //! indicate if the track is in dead zone
      38             :     ,kIsSeeding=BIT(16)         //! indicates if it is proces of seeading
      39             :     ,kBSigned=BIT(17)           //indicates that clusters of this trackes are signed to be used
      40             :   };
      41             :      AliTPCseed();
      42             :      virtual ~AliTPCseed();
      43             :      virtual TObject* Clone(const char* newname = "") const;
      44             :      AliTPCseed(const AliTPCtrack &t);
      45             :      AliTPCseed(const AliTPCseed &s, Bool_t clusterOwner = kFALSE);
      46             :      //AliTPCseed(const AliTPCseed &t, Double_t a);
      47             :      AliTPCseed(Double_t xr, Double_t alpha, const Double_t xx[5], 
      48             :                 const Double_t cc[15], Int_t i);   
      49             :      AliTPCseed &operator = (const AliTPCseed & param);  
      50             :      void Clear(Option_t* = "");
      51             :      static Int_t  RefitTrack(AliTPCseed* seed, AliExternalTrackParam * in, AliExternalTrackParam * out);
      52             :      Bool_t RefitTrack(AliTPCseed* seed, Bool_t out);
      53             :      Int_t Compare(const TObject *o) const;
      54             :      void Reset(Bool_t all = kTRUE);
      55             :      Int_t GetProlongation(Double_t xr, Double_t &y, Double_t & z) const;
      56             :      virtual Double_t GetPredictedChi2(const AliCluster *cluster2) const;
      57             :      virtual Bool_t Update(const AliCluster* c2, Double_t chi2, Int_t i);
      58             :      //
      59      482136 :      const AliTPCTrackerPoints::Point* GetTrackPoint(Int_t i) const { return fTrackPointsArr.GetPoint(i); }
      60             :      //
      61           0 :      AliTPCclusterMI * GetClusterFast(Int_t irow){return fClusterPointer ? ((AliTPCclusterMI*)fClusterPointer[irow]):0;}
      62     1383522 :      AliTPCclusterMI * GetClusterFast(Int_t irow) const { return fClusterPointer ? fClusterPointer[irow]:0;}
      63         540 :      const AliTPCclusterMI** GetClusters() const {return (const AliTPCclusterMI**)fClusterPointer;}
      64        1408 :      void  SetClustersArrayTMP(AliTPCclusterMI** arr) {fClusterPointer = arr; fNClStore = arr ? kMaxRow : 0;}
      65             :      void SetClusterPointer(Int_t irow, AliTPCclusterMI* cl);
      66             :      Double_t GetDensityFirst(Int_t n);
      67             :      Double_t GetSigma2C() const {
      68           0 :        Double_t cnv=GetBz()*kB2C;
      69           0 :        return GetSigma1Pt2()*cnv*cnv;
      70             :      }
      71             :      void GetClusterStatistic(Int_t first, Int_t last, Int_t &found, Int_t &foundable, Int_t &shared, Bool_t plus2);
      72             :      void GetClusterStatistic(Int_t first, Int_t last, Int_t &found, Int_t &foundable);
      73             :      
      74             :      void Modify(Double_t factor);
      75     5295632 :      void  SetClusterIndex2(Int_t row, Int_t index) {fIndex[row] = index;} //RS: no check on index range
      76     1721736 :      Int_t GetClusterIndex2(Int_t row) const { return fIndex[row];} // RS: no check on index range
      77             :      Int_t GetClusterSector(Int_t row) const {
      78             :        Int_t pica = -1;
      79           0 :        if (fIndex[row]>=0) pica =  ((fIndex[row]&0xff000000)>>24);
      80           0 :        return pica;
      81             :      }
      82             :     
      83             :      Double_t GetYat(Double_t x) const;
      84             : 
      85      211884 :      void SetErrorY2(Float_t sy2){fErrorY2=sy2;}
      86      211884 :      void SetErrorZ2(Float_t sz2){fErrorZ2=sz2;}
      87             :      Float_t  CookdEdx(Double_t low=0.05, Double_t up=0.70, Int_t i1=0, Int_t i2=kMaxRow, Bool_t onlyused = kFALSE);
      88             :      Float_t  CookShape(Int_t type);
      89             :      //  Float_t CookShape2(Int_t type,Bool_t withQ);
      90             :      void CookPID();
      91      244368 :      Bool_t IsActive() const { return !(fRemoval);}
      92          12 :      void Desactivate(Int_t reason){ fRemoval = reason;} 
      93      798652 :      AliTPCclusterMI* GetClusterPointer(Int_t i) const {return GetClusterFast(i);}
      94      210964 :      Int_t GetSector() const {return fSector;}
      95      206720 :      Float_t GetCurrentSigmaY2() const {return fCurrentSigmaY2;}
      96      206720 :      Float_t GetCurrentSigmaZ2() const {return fCurrentSigmaZ2;}
      97      705576 :      Int_t GetRelativeSector() const {return fRelativeSector;}
      98          32 :      Char_t GetCircular() const {return fCircular;}
      99             : 
     100      210964 :      void SetCurrentSigmaY2(Float_t s) {fCurrentSigmaY2=s;}
     101      210964 :      void SetCurrentSigmaZ2(Float_t s) {fCurrentSigmaZ2=s;}
     102       12788 :      void SetRelativeSector(Int_t r) {fRelativeSector=r;}
     103         328 :      void SetCircular(Char_t c) {fCircular=c;}
     104         562 :      void SetIsSeeding(Bool_t s) {SetBit(kIsSeeding,s);}
     105        1052 :      void SetSeedType(Int_t s) {fSeedType=s;}
     106         456 :      void SetSeed1(Int_t s) {fSeed1=s;}
     107         456 :      void SetSeed2(Int_t s) {fSeed2=s;}
     108         544 :      void SetESD(AliESDtrack* esd) {fEsd=esd;}
     109         230 :      void SetBSigned(Bool_t s) {SetBit(kBSigned,s);}
     110         816 :      void SetSort(Int_t s) {fSort=s;}
     111        6648 :      void SetOverlapLabel(Int_t i, Int_t l) {fOverlapLabels[i]=l;}
     112      301244 :      void SetCurrentCluster(AliTPCclusterMI* cl) {fCurrentCluster=cl;}
     113      198496 :      void SetNoCluster(Int_t n) {fNoCluster=n;}
     114      498600 :      void SetRow(Int_t n) {fRow=n;}
     115      206720 :      void SetSector(Int_t n) {fSector=n;}
     116      503276 :      void SetCurrentClusterIndex1(Int_t n) {fCurrentClusterIndex1=n;}
     117        3954 :      void SetInDead(Bool_t s) {SetBit(kInDead,s);}
     118             : 
     119           0 :      Double_t TPCrPID(Int_t i) const {return fTPCr[i];}
     120           0 :      Double_t* TPCrPIDs() {return fTPCr;}
     121           0 :      Bool_t GetIsSeeding() const {return TestBit(kIsSeeding);}
     122           0 :      Int_t GetSeedType() const {return fSeedType;}
     123           0 :      Int_t GetSeed1() const {return fSeed1;}
     124           0 :      Int_t GetSeed2() const {return fSeed2;}
     125        2216 :      AliESDtrack* GetESD() {return fEsd;}
     126         812 :      Float_t GetSDEDX(Int_t i) const {return fSDEDX[i];}
     127        2176 :      Float_t GetDEDXregion(Int_t i) const {return fDEDX[i];}
     128        1628 :      Int_t GetNCDEDX(Int_t i) const {return fNCDEDX[i];}
     129         816 :      Int_t GetNCDEDXInclThres(Int_t i) const {return fNCDEDXInclThres[i];}
     130       78432 :      Bool_t GetBSigned() const {return TestBit(kBSigned);}
     131           0 :      Int_t GetSort() const {return fSort;}
     132          40 :      Int_t GetOverlapLabel(Int_t i) const {return fOverlapLabels[i];}
     133     1178124 :      AliTPCclusterMI* GetCurrentCluster() const {return fCurrentCluster;}
     134       29456 :      Int_t GetNoCluster() const {return fNoCluster;}
     135           0 :      Int_t GetRow() const {return fRow;}
     136      413440 :      Int_t GetCurrentClusterIndex1() const {return fCurrentClusterIndex1;}
     137           0 :      Bool_t GetInDead() const {return TestBit(kInDead);}
     138      209328 :      Float_t GetErrorY2() const {return fErrorY2;}
     139      209328 :      Float_t GetErrorZ2() const {return fErrorZ2;}
     140           0 :   Float_t GetCMeanSigmaY2p30() const {return fCMeanSigmaY2p30;}
     141           0 :   Float_t GetCMeanSigmaZ2p30() const {return fCMeanSigmaZ2p30;}
     142           0 :   Float_t GetCMeanSigmaY2p30R() const {return fCMeanSigmaY2p30R;}
     143           0 :   Float_t GetCMeanSigmaZ2p30R() const {return fCMeanSigmaZ2p30R;}
     144             :      //
     145             :      //
     146             : 
     147             :   Float_t  CookdEdxNorm(Double_t low=0.05, Double_t up=0.70, Int_t type=0, Int_t i1=0, Int_t i2=kMaxRow, Bool_t shapeNorm=kTRUE, Int_t posNorm=0, Int_t padNorm=0,Int_t returnVal=0);
     148             : 
     149             :   Float_t  CookdEdxAnalytical(Double_t low=0.05, Double_t up=0.70, Int_t type=0, Int_t i1=0, Int_t i2=kMaxRow, Int_t returnVal=0, Int_t rowThres = 2, Int_t mode=0, TVectorT<float> *returnVec = NULL);
     150             : 
     151             :  static   void GetError(AliTPCclusterMI* cluster, AliExternalTrackParam * param, 
     152             :                          Double_t& erry, Double_t &errz);
     153             :  static   void GetShape(AliTPCclusterMI* cluster, AliExternalTrackParam * param, 
     154             :                          Double_t& rmsy, Double_t &rmsz);
     155             :   static   Double_t GetQCorrGeom(Float_t ty, Float_t tz);
     156             :   static   Double_t GetQCorrShape(Int_t ipad, Int_t type,Float_t z, Float_t ty, Float_t tz, Float_t q, Float_t thr);
     157             :   //
     158             :   // Float_t GetTPCClustInfo(Int_t nNeighbours, Int_t type, Int_t row0, Int_t row1, TVectorT<float> *returnVec);
     159       27752 :   void    SetPoolID(Int_t id) {fPoolID = id;}
     160       26940 :   Int_t   GetPoolID()  const {return fPoolID;}
     161             :   Int_t   GetNumberOfClustersIndices();  // Should be in AliTPCtrack
     162             : 
     163             :   // AliVVTPCseed interface
     164             : 
     165           0 :   void CopyToTPCseed( AliTPCseed &s) const { s = *this; }
     166           0 :   void SetFromTPCseed( const AliTPCseed* seed ) { *this=*seed; }
     167             : 
     168        1152 :   void    SetShared(int i)      {fTrackPointsArr.SetShared(i);}
     169      273560 :   Bool_t  IsShared(int i) const {return fTrackPointsArr.IsShared(i);}
     170             :   //
     171         272 :   Bool_t  GetClusterOwner() const {return fClusterOwner;}
     172         164 :   void    SetClusterOwner(Bool_t v) {fClusterOwner = v;}
     173             :   //
     174             :   void    TagSuppressSharedClusters();
     175             : 
     176             :  private:
     177             :      //     AliTPCseed & operator = (const AliTPCseed &)
     178             :      //  {::Fatal("= operator","Not Implemented\n");return *this;}
     179             :      AliESDtrack * fEsd; //!
     180             :      Int_t fNClStore;                       // size of stored cluster pointers array
     181             :      AliTPCclusterMI**  fClusterPointer;    //[fNClStore] array of cluster pointers  - 
     182             :      Bool_t             fClusterOwner;         // indicates the track is owner of cluster
     183             :      //---CURRENT VALUES
     184             :      Short_t fRow;               // current row number  
     185             :      Char_t  fSector;            // current sector number
     186             :      Char_t  fRelativeSector;    // index of current relative sector
     187             :      Float_t fCurrentSigmaY2;    //!expected current cluster sigma Y
     188             :      Float_t fCurrentSigmaZ2;    //!expected current cluster sigma Z
     189             :      Float_t fCMeanSigmaY2p30;   //! current mean sigma Y2 - mean30%
     190             :      Float_t fCMeanSigmaZ2p30;   //! current mean sigma Z2 - mean30%
     191             :      Float_t fCMeanSigmaY2p30R;   //! current relative mean sigma Y2 - mean30%
     192             :      Float_t fCMeanSigmaZ2p30R;   //! current relative mean sigma Z2 - mean30%
     193             :      Float_t fErrorY2;           //!sigma of current cluster 
     194             :      Float_t fErrorZ2;           //!sigma of current cluster    
     195             :      AliTPCclusterMI * fCurrentCluster; //!pointer to the current cluster for prolongation
     196             :      Int_t   fCurrentClusterIndex1; //! index of the current cluster
     197             :      UChar_t  fNoCluster;         //!indicates number of rows without clusters
     198             :      Char_t   fSort;              //!indicate criteria for sorting
     199             :      //
     200             :      //
     201             :      Float_t fDEDX[9];            // dedx according padrows
     202             :      Float_t fSDEDX[4];           // sdedx according padrows
     203             :      UChar_t fNCDEDX[4];          // number of clusters for dedx measurment
     204             :      UChar_t  fNCDEDXInclThres[4]; // number of clusters for dedx measurment including sub-threshold clusters
     205             :      Double_t fTPCr[AliPID::kSPECIES];   // rough PID according TPC   
     206             :      //
     207             :      UChar_t   fSeedType;         //seeding type
     208             :      UChar_t   fSeed1;            //first row for seeding
     209             :      UChar_t   fSeed2;            //last row for seeding
     210             :      Char_t   fCircular;           // indicates curlin track
     211             :      Int_t   fOverlapLabels[12];  //track labels and the length of the  overlap     
     212             :      Float_t fMAngular;           // mean angular factor
     213             :      Int_t   fPoolID;              //! id in the pool
     214             :      AliTPCTrackerPoints fTrackPointsArr;  // track points - array track points
     215       62920 :      ClassDef(AliTPCseed,9)
     216             : };
     217             : 
     218             : 
     219             : 
     220             : 
     221             : 
     222             : #endif
     223             : 
     224             : 

Generated by: LCOV version 1.11