Fix in hits pattern 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:
12 AliITSUSeed();
13 AliITSUSeed(const AliITSUSeed& src);
14 AliITSUSeed &operator=(const AliITSUSeed &src);
15 virtual ~AliITSUSeed();
f8832015 16 virtual void Print(Option_t* option = "") const;
32d38de2 17 //
f8832015 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;}
c61e50c3 23 //
f8832015 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;}
c61e50c3 34 //
32d38de2 35 protected:
f8832015 36 UShort_t fHitsPattern; // bit pattern of hits
c61e50c3 37 UInt_t fClID; // packed cluster info (see AliITSUAux::PackCluster)
f8832015 38 Float_t fChi2Glo; // current chi2 global
39 Float_t fChi2Cl; // track-cluster chi2
c61e50c3 40 TObject* fParent; // parent track (in higher tree hierarchy)
32d38de2 41
42 ClassDef(AliITSUSeed,1)
43};
44
f8832015 45//_________________________________________________________________________
46inline 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);
134fa001 50 if (cl>=0) fHitsPattern |= 0x1<<lr;
f8832015 51}
52
32d38de2 53
54#endif