]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/UPGRADE/AliITSUSeed.h
54711c8083e9650c854e5908f4e2916e5bb51d21
[u/mrichter/AliRoot.git] / ITS / UPGRADE / AliITSUSeed.h
1 #ifndef ALIITSUSEED_H
2 #define ALIITSUSEED_H
3
4 #include "AliExternalTrackParam.h"
5 #include "AliITSUAux.h"
6 using namespace AliITSUAux;
7
8
9 class AliITSUSeed: public AliExternalTrackParam
10 {
11  public:
12   AliITSUSeed();
13   AliITSUSeed(const AliITSUSeed& src);
14   AliITSUSeed &operator=(const AliITSUSeed &src);
15   virtual ~AliITSUSeed();
16   virtual void    Print(Option_t* option = "") const;
17   //
18   void            SetLrClusterID(Int_t lr, Int_t cl);
19   void            SetLr(Int_t lr)                        {SetLrClusterID(lr,-1);} // lr w/o cluster
20   void            SetLrClusterID(UInt_t id)              {fClID = id;}
21   void            SetParent(TObject* par)                {fParent = par;}
22   void            SetChi2Cl(Double_t v)                  {fChi2Glo += fChi2Cl= v;}
23   //
24   UInt_t          GetLrClusterID()                 const {return fClID;}
25   Int_t           GetLrCluster(Int_t &lr)          const {return UnpackCluster(fClID,lr);}
26   Int_t           GetLayerID()                     const {return UnpackLayer(fClID);}
27   Int_t           GetClusterID()                   const {return UnpackCluster(fClID);}
28   Bool_t          HasClusterOnLayer(Int_t lr)      const {return fHitsPattern&(0x1<<lr);}
29   Int_t           GetNLayersHit()                  const {return NumberOfBitsSet(fHitsPattern);}
30   Float_t         GetChi2Cl()                      const {return fChi2Cl;}
31   Float_t         GetChi2Glo()                     const {return fChi2Glo;}
32   //
33   TObject*        GetParent()                      const {return fParent;}
34   //
35  protected:
36   UShort_t              fHitsPattern;       // bit pattern of hits
37   UInt_t                fClID;              // packed cluster info (see AliITSUAux::PackCluster)
38   Float_t               fChi2Glo;           // current chi2 global
39   Float_t               fChi2Cl;            // track-cluster chi2
40   TObject*              fParent;            // parent track (in higher tree hierarchy)
41   
42   ClassDef(AliITSUSeed,1)
43 };
44
45 //_________________________________________________________________________
46 inline void AliITSUSeed::SetLrClusterID(Int_t lr, Int_t cl)
47 {
48   // assign layer, cluster (if -1 - no hit on this layer)
49   fClID = PackCluster(lr,cl);
50   if (cl>=0) fHitsPattern &= 0x1<<lr;
51 }
52
53
54 #endif