]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSRecPoint.h
EffC++ warnings corrected.
[u/mrichter/AliRoot.git] / ITS / AliITSRecPoint.h
index eb169606f6f0344234143c35648b698cf78e554a..c2ad0573f1d09122c3578b85fe51e6f648d5d704 100644 (file)
 #ifndef ALIITSRECPOINT_H
 #define ALIITSRECPOINT_H 
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
 
-////////////////////////////////////////////////////
-//  Reconstructed space point class for set:ITS   //
-////////////////////////////////////////////////////
+/*
+  $Id$
+*/
 
-#include <TObject.h>
+///////////////////////////////////////////////////////////////////////////////
+//  Reconstructed space point class for set:ITS   
+//  Reconstructed points are expressed simultaneously in two different 
+//  reference frames, both differing from the global system.
+//  The first is referred to the sensor (see AliITSsegmentation for the
+//  definition) and each point is represented by two coordinates: fXloc and
+//  fZloc. This system in the code is referred to as "local"
+//  The second is used for tracking (V2, SA and MI versions) and the X axis 
+//  represents the radial coordinate (this system is, in the bending plane, 
+//  a rotated system w.r.t. the global reference system). 
+//  Each reaconstructed point is represented by two coordinates: fY and fZ, 
+//  inherited from AliCluster. This system in the code is referred to as 
+//  "trackingV2".
+///////////////////////////////////////////////////////////////////////////////
 
-
-class AliITSRecPoint : public TObject {
+#include <AliCluster.h>
+#include <Riostream.h>
+#include <AliLog.h>
+#include <AliITSgeom.h>
 
 
+class AliITSRecPoint : public AliCluster {
  public:
-
   AliITSRecPoint();
+  AliITSRecPoint(AliITSgeom* geom);
+  AliITSRecPoint(Int_t *lab,Float_t *hit, Int_t *info);
+  AliITSRecPoint(Int_t module,AliITSgeom* geom,Int_t *lab,
+                Float_t *hit, Int_t *info);
+  AliITSRecPoint(const AliITSRecPoint& pt);
+  AliITSRecPoint& operator=(const AliITSRecPoint &source);
+  
   virtual ~AliITSRecPoint() {}; // distructor
   Bool_t IsSortable() const {return kTRUE;} // allows for sorting
-  Int_t   GetLabel(Int_t i) {return fTracks[i];} // get track label
-  Float_t GetX(){return fX;} // gets fX
-  Float_t GetZ(){return fZ;} // gets fZ
-  Float_t GetQ(){return fQ;} // gets fQ
-  Float_t GetdEdX(){return fdEdX;} // gets fdEdX
-  Float_t GetSigmaX2(){return fSigmaX2;} // gets fSigmaX2
-  Float_t GetSigmaZ2(){return fSigmaZ2;} // gets fSigmaZ2
-  void SetLabel(Int_t i, Int_t lab){fTracks[i]=lab;} // sets track label
-  void SetX(Float_t x){fX=x;} // sets fX
-  void SetZ(Float_t z){fZ=z;} // sets fZ
-  void SetQ(Float_t q){fQ=q;} // sets fQ
+  Int_t  *GetTracks(){return fTracks;}// Returns pointer to track array
+  Int_t   GetNTracks() const {return 3;} // returns track array size
+  Float_t GetDetLocalX() const {return fXloc;} // gets fX
+  Float_t GetDetLocalZ() const {return fZloc;} // gets fZ
+  Float_t GetdEdX() const {return fdEdX;} // gets fdEdX
+  Float_t GetSigmaDetLocX2() const {return fSigmaY2;} // gets fSigmaX2
   void SetdEdX(Float_t dedx){fdEdX=dedx;} // sets fdEdX
-  void SetSigmaX2(Float_t sx2){fSigmaX2=sx2;} // sets fSigmaX2
-  void SetSigmaZ2(Float_t sz2){fSigmaZ2=sz2;} // sets fSigmaZ2
-  void  Use() {
-    //if fQ<0 cluster is already associated with a track
-    fQ=-fQ;
+  void SetSigmaDetLocX2(Float_t sx2){fSigmaY2=sx2;} // sets fSigmaX2
+  Int_t Compare(const TObject *) const {return 0;} //to be defined
+  void Print(ostream *os); 
+  // Reads in the content of this class in the format of Print
+  void Read(istream *is);
+  virtual void Print(Option_t *option="") const {TObject::Print(option);}
+  virtual Int_t Read(const char *name) {return TObject::Read(name);}
+  
+  void SetITSgeom(AliITSgeom* geom) {fGeom=geom;}
+  virtual void SetY(Float_t  y ){fY=y;
+    AliError("For consistency, Use method SetYZ. Data members are only partially set\n");}
+  virtual void SetZ(Float_t  z ){fZ=z;
+    AliError("For consistency, Use method SetYZ. Data members are only partially set\n");}
+  void SetYZ(Int_t module, Float_t y, Float_t z){
+    fY=y;fZ=z;
+    if(fGeom)fGeom->TrackingV2ToDetL(module,y,z,fXloc,fZloc);
+    else AliError("Geometry not set. \n");
   }
-  Int_t IsUsed() const {return (fQ<0) ? 1 : 0;} // checks Use condision
-  Int_t Compare(TObject *o) {
-    //to be defined
-    return 0;
-  } 
+  void SetXZ(Int_t module, Float_t x, Float_t z){
+    fXloc=x;fZloc=z;
+    if(fGeom)fGeom->DetLToTrackingV2(module,x,z,fY,fZ);
+    else AliError("Geometry not set. Nothing done!!!!!\n");
+  }
+  void Use(Int_t = 0) {fQ=-fQ;}
+  void UnUse() {fQ=TMath::Abs(fQ);}
+  void SetQ(Float_t q) {fQ=q;}
+  void SetDetectorIndex(Int_t i) { fIndex=i; }
+  void SetLayer(Int_t layer) {fLayer=layer;}
+  void SetNz(Int_t nz) {fNz =nz;}
+  void SetNy(Int_t ny){fNy=ny;}
+  void SetChargeRatio(Float_t ratio) { fChargeRatio = ratio;}
+  void SetPhiR(Float_t y) { fChargeRatio=y; }
+  void SetType(Int_t type){ fType=type;}
+  void SetDeltaProbability(Float_t prob){fDeltaProb = prob;}
+  
+  Int_t IsUsed() const {return (fQ<0)?1:0;}
+  Float_t GetQ() const {return TMath::Abs(fQ);}
+  Int_t GetDetectorIndex() const { return 0x3FF&fIndex; }
+  Int_t GetLayer() const {return fLayer;}
+  Int_t GetNz() const {return fNz;}
+  Int_t GetNy() const {return fNy;}
+  Float_t GetChargeRatio() const {return fChargeRatio;}
+  Float_t GetPhiR() const {return fChargeRatio;}
+  Int_t GetPindex() const { return 0xFFF00000&fIndex; }  //SSD clusters only
+  Int_t GetNindex() const { return 0xFFC00&fIndex; }  //SSD clusters only
+  Int_t GetType() const {return fType;}  // type of the cluster
+  Float_t GetDeltaProbability() const{return fDeltaProb;} //probability to belong to the delta ray
+  
 
- public:
-    Int_t     fTracks[3]; //labels of overlapped tracks
-    Float_t   fX ;        //X of cluster
-    Float_t   fZ ;        //Z of cluster
-    Float_t   fQ ;        //Q of cluster (in ADC counts)
-    Float_t   fdEdX;      //dE/dX inside this cluster
-    Float_t   fSigmaX2;   //Sigma X square of cluster
-    Float_t   fSigmaZ2;   //Sigma Z square of cluster
-
-  ClassDef(AliITSRecPoint,1)  // AliITSRecPoint class
-};
 
-#endif
+ protected:
 
+  Float_t   fXloc ;        //X of cluster (local coordinates)
+  Float_t   fZloc ;        //Z of cluster (local coordinates)
+  Float_t   fdEdX;      //dE/dX inside this cluster
 
+  Int_t    fIndex;    // detector index
+  Float_t  fQ ;       // Q of cluster (in ADC counts)
+  Char_t   fLayer;    // layer number
+  Short_t  fNz;       //number of digits in Z direction
+  Short_t  fNy;       //number of digits in y direction 
+  Float_t  fChargeRatio; //charge ratio
+  Int_t    fType;         //quality factor of the cluster
+  Float_t  fDeltaProb;    // probability to be deleta electron
+    
+  AliITSgeom* fGeom;     //!pointer to ITS geometry
 
+  ClassDef(AliITSRecPoint,2)  // AliITSRecPoint class
+};
+// Input and output function for standard C++ input/output.
+ostream& operator<<(ostream &os,AliITSRecPoint &source);
+istream& operator>>(istream &is,AliITSRecPoint &source);
+#endif