1 #ifndef ALIITSUCLUSTERPIX_H
2 #define ALIITSUCLUSTERPIX_H
4 #include "AliCluster.h"
10 class AliITSUClusterPix : public AliCluster
13 enum { // frame in which the track is currently defined
17 ,kFrameBits = kFrameLoc|kFrameTrk|kFrameGlo
21 enum SortMode_t { // various modes
22 kSortIdLocXZ = BIT(0) // sort according to ID, then X,Z of local frame
23 ,kSortIdTrkYZ = BIT(1) // sort according to ID, then Y,Z of tracking frame
24 ,kSortBits = kSortIdLocXZ|kSortIdTrkYZ
29 AliITSUClusterPix(const AliITSUClusterPix& cluster);
30 AliITSUClusterPix &operator=(const AliITSUClusterPix& cluster);
31 virtual ~AliITSUClusterPix();
33 Bool_t IsFrameLoc() const {return TestBit(kFrameLoc);}
34 Bool_t IsFrameGlo() const {return TestBit(kFrameGlo);}
35 Bool_t IsFrameTrk() const {return TestBit(kFrameTrk);}
37 Bool_t IsSplit() const {return TestBit(kSplit);}
39 void SetFrameLoc() {ResetBit(kFrameBits); SetBit(kFrameLoc);}
40 void SetFrameGlo() {ResetBit(kFrameBits); SetBit(kFrameGlo);}
41 void SetFrameTrk() {ResetBit(kFrameTrk); SetBit(kFrameTrk);}
43 void SetSplit(Bool_t v=kTRUE) {SetBit(kSplit,v);}
48 void GetLocalXYZ(Float_t xyz[3]) const;
49 void GetTrackingXYZ(Float_t xyz[3]) const;
51 void SetNxNzN(UChar_t nx,UChar_t nz,UShort_t n) {fNxNzN = (n<<16) + (nx<<8) + nz;}
52 Int_t GetNx() const {return (fNxNzN>>8)&0xff;}
53 Int_t GetNz() const {return fNxNzN&0xff;}
54 Int_t GetNPix() const {return fNxNzN>>16;}
56 void SetQ(UShort_t q) {fCharge = q;}
57 Int_t GetQ() const {return fCharge;}
59 virtual void Print(Option_t* option = "") const;
60 virtual const TGeoHMatrix* GetTracking2LocalMatrix() const;
61 virtual TGeoHMatrix* GetMatrix(Bool_t original = kFALSE) const;
62 virtual Bool_t GetGlobalXYZ(Float_t xyz[3]) const;
63 virtual Bool_t GetGlobalCov(Float_t cov[6]) const;
64 virtual Bool_t GetXRefPlane(Float_t &xref) const;
66 virtual Bool_t IsSortable() const {return kTRUE;}
67 virtual Bool_t IsEqual(const TObject* obj) const;
68 virtual Int_t Compare(const TObject* obj) const;
70 Bool_t HasCommonTrack(const AliCluster* cl) const;
72 static void SetGeom(AliITSUGeomTGeo* gm) {fgGeom = gm;}
73 static void SetSortMode(SortMode_t md) {fgMode &= ~kSortBits; fgMode |= md;}
74 static UInt_t GetSortMode() {return fgMode&kSortBits;}
75 static UInt_t GetMode() {return fgMode;}
76 static SortMode_t SortModeIdTrkYZ() {return kSortIdTrkYZ;}
77 static SortMode_t SortModeIdLocXZ() {return kSortIdLocXZ;}
81 UShort_t fCharge; // charge (for MC studies only)
82 Int_t fNxNzN; // effective cluster size in X (1st byte) and Z (2nd byte) directions
83 // and total Npix(3d&4th bytes)
84 static UInt_t fgMode; //! general mode (sorting mode etc)
85 static AliITSUGeomTGeo* fgGeom; //! pointer on the geometry data
87 ClassDef(AliITSUClusterPix,1)