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