]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/AliITSRecPoint.h
Updates concerning the geometry: versioning system, new V11hybrid version, bug fixes...
[u/mrichter/AliRoot.git] / ITS / AliITSRecPoint.h
1 #ifndef ALIITSRECPOINT_H
2 #define ALIITSRECPOINT_H 
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 /*
7   $Id$
8 */
9
10 ///////////////////////////////////////////////////////////////////////////////
11 //  Reconstructed space point class for set:ITS   
12 //  Reconstructed points are expressed simultaneously in two different 
13 //  reference frames, both differing from the global system.
14 //  The first is referred to the sensor (see AliITSsegmentation for the
15 //  definition) and each point is represented by two coordinates: fXloc and
16 //  fZloc. This system in the code is referred to as "local"
17 //  The second is used for tracking (V2, SA and MI versions) and the X axis 
18 //  represents the radial coordinate (this system is, in the bending plane, 
19 //  a rotated system w.r.t. the global reference system). 
20 //  Each reaconstructed point is represented by two coordinates: fY and fZ, 
21 //  inherited from AliCluster. This system in the code is referred to as 
22 //  "trackingV2".
23 ///////////////////////////////////////////////////////////////////////////////
24
25 #include <AliCluster.h>
26 #include <Riostream.h>
27 #include <AliLog.h>
28
29 class AliITSRecPoint : public AliCluster {
30  public:
31   AliITSRecPoint();
32   AliITSRecPoint(Int_t *lab,Float_t *hit, Int_t *info, Bool_t local = kFALSE);
33   AliITSRecPoint(const AliITSRecPoint& pt);
34   AliITSRecPoint& operator=(const AliITSRecPoint &source);
35   
36   virtual ~AliITSRecPoint() {}; // distructor
37   Bool_t  IsSortable() const {return kTRUE;} // allows for sorting
38   Float_t GetDetLocalX() const {return fXloc;} // gets fX
39   Float_t GetDetLocalZ() const {return fZloc;} // gets fZ
40   Float_t GetdEdX() const {return fdEdX;} // gets fdEdX
41   Float_t GetSigmaDetLocX2() const {return GetSigmaY2();} // gets fSigmaX2
42   void    SetdEdX(Float_t dedx){fdEdX=dedx;} // sets fdEdX
43   Int_t Compare(const TObject *) const {return 0;} //to be defined
44   void Print(ostream *os); 
45   // Reads in the content of this class in the format of Print
46   void Read(istream *is);
47   virtual void Print(Option_t *option="") const {TObject::Print(option);}
48   virtual Int_t Read(const char *name) {return TObject::Read(name);}
49   
50   void Use(Int_t = 0) {fQ=-fQ;}
51   void UnUse() {fQ=TMath::Abs(fQ);}
52   void SetQ(Float_t q) {fQ=q;}
53   void SetDetectorIndex(Int_t i) { fIndex=i; }
54   void SetLayer(Int_t layer) {fLayer=layer;}
55   void SetNz(Int_t nz) {fNz =nz;}
56   void SetNy(Int_t ny){fNy=ny;}
57   void SetChargeRatio(Float_t ratio) { fChargeRatio = ratio;}
58   void SetPhiR(Float_t y) { fChargeRatio=y; }
59   void SetType(Int_t type){ fType=type;}
60   void SetDeltaProbability(Float_t prob){fDeltaProb = prob;}
61   
62   Int_t IsUsed() const {return (fQ<0)?1:0;}
63   Float_t GetQ() const {return TMath::Abs(fQ);}
64   Int_t GetDetectorIndex() const { return 0x3FF&fIndex; }
65   Int_t GetLayer() const {return fLayer;}
66   Int_t GetNz() const {return fNz;}
67   Int_t GetNy() const {return fNy;}
68   Float_t GetChargeRatio() const {return fChargeRatio;}
69   Float_t GetPhiR() const {return fChargeRatio;}
70   Int_t GetPindex() const { return 0xFFF00000&fIndex; }  //SSD clusters only
71   Int_t GetNindex() const { return 0xFFC00&fIndex; }  //SSD clusters only
72   Int_t GetType() const {return fType;}  // type of the cluster
73   Float_t GetDeltaProbability() const{return fDeltaProb;} //probability to belong to the delta ray
74   
75  protected:
76
77   Float_t   fXloc ;        //X of cluster (local coordinates)
78   Float_t   fZloc ;        //Z of cluster (local coordinates)
79   Float_t   fdEdX;      //dE/dX inside this cluster
80
81   Int_t    fIndex;    // detector index
82   Float_t  fQ ;       // Q of cluster (in ADC counts)
83   Char_t   fLayer;    // layer number
84   Short_t  fNz;       //number of digits in Z direction
85   Short_t  fNy;       //number of digits in y direction 
86   Float_t  fChargeRatio; //charge ratio
87   Int_t    fType;         //quality factor of the cluster
88   Float_t  fDeltaProb;    // probability to be deleta electron
89     
90   ClassDef(AliITSRecPoint,5)  // AliITSRecPoint class
91 };
92 // Input and output function for standard C++ input/output.
93 ostream& operator<<(ostream &os,AliITSRecPoint &source);
94 istream& operator>>(istream &is,AliITSRecPoint &source);
95 #endif