]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/AliITSglobalRecPoint.h
Functions for bitio. Taken as is from The Data Compression Book
[u/mrichter/AliRoot.git] / ITS / AliITSglobalRecPoint.h
1 #ifndef ALIITSGLOBALRECPOINT_H
2 #define ALIITSGLOBALRECPOINT_H
3
4 class AliITSglobalRecPoint : public TObject {
5
6         public:
7                         
8                 AliITSglobalRecPoint();
9       AliITSglobalRecPoint(Double_t gx, Double_t gy, Double_t gz, Double_t gsx, Double_t gsy, Double_t gsz, Int_t l);
10                 
11                 virtual ~AliITSglobalRecPoint() { }
12                 
13                 // difference in azymuthal angle
14                 Double_t DPhi  (AliITSglobalRecPoint *p); 
15                 // difference in polar angle
16                 Double_t DTheta(AliITSglobalRecPoint *p); 
17                 // checks if the pt contains a given positive label
18                 Bool_t   HasID (Int_t ID)      
19                 { if (ID < 0) return kFALSE; else return (fLabel[0]==ID || fLabel[1]==ID || fLabel[2]==ID); }
20                 // checks if the pt shares at least a positive label with another one
21                 Bool_t   SharesID(AliITSglobalRecPoint *p) 
22                 { return (HasID(p->fLabel[0]) || HasID(p->fLabel[1]) || HasID(p->fLabel[2])); }
23                 
24                 // Parameters for sorting
25                 Bool_t  IsSortable() const { return kTRUE; }
26                 Int_t   Compare(const TObject *O) const;
27                 
28         public:
29                         
30                 Double_t fGX, fGY, fGZ; // (x,y,z) in the global reference
31                         
32                 Double_t fR2;    // = sqrt(x^2 + y^2)
33                 Double_t fR3;    // = sqrt(x^2 + y^2 + z^2)
34                 Double_t fPhi;   // = atan(y/x)
35                 Double_t fTheta; // = acos(z/r3)
36                 
37                 Double_t fGSX; //
38                 Double_t fGSY; // sigmas of global coords
39                 Double_t fGSZ; //
40                 
41                 Int_t fModule;      // ITS module containing the point
42                 Int_t fPosInModule; // position in TClonesArray of TreeR
43                 Int_t fLayer;       // ITS layer containing the point
44                 Int_t fLabel[3];    // Generated tracks containing the point
45                 Int_t fKalmanLabel; // Kalman recognized track containing the point
46                 
47                 Int_t fSign;        //   0 if the point doesn't belong to a Kalman track
48                                     // + 1 if the point belongs to a Kalman good track
49                                     // - 1 if the point belongs to a Kalman fake track
50                 
51                 Int_t fUsed;        // a flag to avoid point recycling
52                 
53                 ClassDef(AliITSglobalRecPoint, 1) // AliITSglobalRecPoints class
54 };
55
56 #endif