]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Changes to obey the coding conventions
authorkowal2 <kowal2@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 10 Nov 2003 15:47:28 +0000 (15:47 +0000)
committerkowal2 <kowal2@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 10 Nov 2003 15:47:28 +0000 (15:47 +0000)
TPC/AliComplexCluster.h
TPC/AliTPCTrackHits.cxx
TPC/AliTPCTrackHits.h

index f02f6d908669030960e14a71cd422dbe457939a4..c7db51564bb0b71e4ba8651bac3573bac3d4cf3f 100644 (file)
 
 class AliComplexCluster : public TObject {
 public:
+  friend class AliTPC;
+  friend class AliTPCClusterFinder;
+  friend class AliClusters;
+
+  AliComplexCluster() {
+    fTracks[0]=fTracks[1]=fTracks[2]=0; 
+    fX=fY=fQ=fSigmaX2=fSigmaY2=fSigmaXY=fArea=fMax=0.;
+  }
+  virtual ~AliComplexCluster() {;}
+  Bool_t    IsSortable() const;
+  Int_t Compare(const TObject *o) const;
+private:
   Int_t     fTracks[3];//labels of overlapped tracks
   Float_t   fX ;       //Y of cluster
   Float_t   fY ;       //Z of cluster
@@ -20,87 +32,75 @@ public:
   Float_t   fSigmaXY;  //      XY moment 
   Float_t   fArea;     //area of cluster
   Float_t   fMax;     //amplitude at maximum 
-public:
-  AliComplexCluster() {
-    fTracks[0]=fTracks[1]=fTracks[2]=0; 
-    fX=fY=fQ=fSigmaX2=fSigmaY2=fSigmaXY=fArea=fMax=0.;
-  }
-  virtual ~AliComplexCluster() {;}
-  Bool_t    IsSortable() const;
-  Int_t Compare(const TObject *o) const;
-  ClassDef(AliComplexCluster,1)  // Cluster manager
+
+  ClassDef(AliComplexCluster,1)
+    // Cluster manager
 };
 
 class AliDigitCluster : public AliComplexCluster {
 public:
+  friend class AliTPCClusterFinder;
+private:
   Int_t fNx; //number of accepted x bins
   Int_t fNy; //number of accepted y bins
   Float_t fMaxX; //maximum x bin
   Float_t fMaxY; //maximum y bin
-public:  
+
   ClassDef(AliDigitCluster,1)  // Tclusters
 };
 
 
 
 class AliTPCTrackerPoint  {  
- private:
-  Short_t   fTX;        // x position of the cluster  in cm - 10 mum prec
-  Short_t   fTZ;        // current prolongation in Z  in cm - 10 mum prec.
-  Short_t   fTY;        // current prolongation in Y  in cm - 10 mum prec.
-  Char_t    fTAngleZ;    // angle 
-  Char_t    fTAngleY;    // angle 
-  UShort_t  fSigmaZ;     // shape  Z - normalised shape - normaliziation 1 - precision 2 percent
-  UShort_t  fSigmaY;     // shape  Y - normalised shape - normaliziation 1 - precision 2 percent
-  UShort_t  fErrZ;       // z error estimate - in  mm - 50 mum precision 
-  UShort_t  fErrY;       // y error estimate - in  mm - 50 mum precision 
  public:
   Char_t   fIsShared;     // indicate sharing of the point between several tracks
 
   AliTPCTrackerPoint(){fTX=0; fTY=0; fTZ=0; fTAngleZ=0; fTAngleY=0; fIsShared = 0;}
-  inline Float_t  GetX() {return (fTX*0.01);}
-  inline Float_t  GetZ() {return (fTZ*0.01);}
-  inline Float_t  GetY() {return (fTY*0.01);}
-  inline Float_t  GetAngleZ() {return (Float_t(fTAngleZ)*0.02);}
-  inline Float_t  GetAngleY() {return (Float_t(fTAngleY)*0.02);}
+  Float_t  GetX() const  {return (fTX*0.01);}
+  Float_t  GetZ() const {return (fTZ*0.01);}
+  Float_t  GetY() const {return (fTY*0.01);}
+  Float_t  GetAngleZ() const  {return (Float_t(fTAngleZ)*0.02);}
+  Float_t  GetAngleY() const {return (Float_t(fTAngleY)*0.02);}
   //
-  void     SetX(Float_t x){ fTX = Short_t(TMath::Nint(x*100.));} 
-  void     SetY(Float_t y){ fTY = Short_t(TMath::Nint(y*100.));} 
-  void     SetZ(Float_t z){ fTZ = Short_t(TMath::Nint(z*100.));} 
+  void     SetX(Float_t x)  { fTX = Short_t(TMath::Nint(x*100.));} 
+  void     SetY(Float_t y)  { fTY = Short_t(TMath::Nint(y*100.));} 
+  void     SetZ(Float_t z)  { fTZ = Short_t(TMath::Nint(z*100.));} 
   void     SetAngleZ(Float_t anglez) {fTAngleZ = Char_t(TMath::Nint(anglez*50.));}
   void     SetAngleY(Float_t angley) {fTAngleY = Char_t(TMath::Nint(angley*50.));}
-  inline Float_t  GetSigmaZ() {return (fSigmaZ*0.02);}
-  inline Float_t  GetSigmaY() {return (fSigmaY*0.02);}  
-  inline Float_t  GetErrZ()   {return (fErrZ*0.005);}
-  inline Float_t  GetErrY()   {return (fErrY*0.005);}
+  Float_t  GetSigmaZ() const {return (fSigmaZ*0.02);}
+  Float_t  GetSigmaY() const {return (fSigmaY*0.02);}  
+  Float_t  GetErrZ()   const {return (fErrZ*0.005);}
+  Float_t  GetErrY()   const {return (fErrY*0.005);}
   void     SetErrZ(Float_t errz) {fErrZ = UChar_t(TMath::Nint(errz*200.));}
   void     SetErrY(Float_t erry) {fErrY = UChar_t(TMath::Nint(erry*200.));}
 
   void     SetSigmaZ(Float_t sigmaz) {fSigmaZ = UChar_t(TMath::Nint(sigmaz*50.));}
   void     SetSigmaY(Float_t sigmay) {fSigmaY = UChar_t(TMath::Nint(sigmay*50.));}
   //
- public:
+ private:
+  Short_t   fTX;        // x position of the cluster  in cm - 10 mum prec
+  Short_t   fTZ;        // current prolongation in Z  in cm - 10 mum prec.
+  Short_t   fTY;        // current prolongation in Y  in cm - 10 mum prec.
+  Char_t    fTAngleZ;    // angle 
+  Char_t    fTAngleY;    // angle 
+  UShort_t  fSigmaZ;     // shape  Z - normalised shape - normaliziation 1 - precision 2 percent
+  UShort_t  fSigmaY;     // shape  Y - normalised shape - normaliziation 1 - precision 2 percent
+  UShort_t  fErrZ;       // z error estimate - in  mm - 50 mum precision 
+  UShort_t  fErrY;       // y error estimate - in  mm - 50 mum precision 
+
   ClassDef(AliTPCTrackerPoint,1)  
 };
 
 class AliTPCClusterPoint  {
- private:
-  Short_t  fCZ;       // current cluster position Z in cm - 100 mum precision
-  Short_t  fCY;       // current cluster position Y in cm - 100 mum precision
-  UChar_t  fSigmaZ;   // shape  Z - normalised shape - normaliziation 1 - precision 2 percent
-  UChar_t  fSigmaY;   // shape  Y - normalised shape - normaliziation 1 - precision 2 percent
-  UShort_t fQ;        // total charge in cluster 
-  UShort_t fMax;      // charge at maximum  
-  Char_t   fCType;    // type of the cluster
  public:
   AliTPCClusterPoint(){fCZ=fCY=fSigmaZ=fSigmaY=fQ=fMax=fCType=0;}
-  inline Float_t  GetZ()    {return (fCZ*0.01);}
-  inline Float_t  GetY()    {return (fCY*0.01);}
-  inline Float_t  GetSigmaZ() {return (fSigmaZ*0.02);}
-  inline Float_t  GetSigmaY() {return (fSigmaY*0.02);}  
-  inline Int_t  GetType()   {return fCType;}
-  inline Int_t  GetMax()   {return fMax;}
-  inline Float_t  GetQ()   {return fQ;}
+  inline Float_t  GetZ() const    {return (fCZ*0.01);}
+  inline Float_t  GetY() const   {return (fCY*0.01);}
+  inline Float_t  GetSigmaZ() const {return (fSigmaZ*0.02);}
+  inline Float_t  GetSigmaY() const {return (fSigmaY*0.02);}  
+  inline Int_t  GetType() const  {return fCType;}
+  inline Int_t  GetMax()  const {return fMax;}
+  inline Float_t  GetQ()  const {return fQ;}
 
   //
   void     SetY(Float_t y){ fCY = Short_t(TMath::Nint(y*100.));} 
@@ -110,9 +110,16 @@ class AliTPCClusterPoint  {
   void     SetQ(Float_t q) {fQ = UShort_t(q);}
   void     SetMax(Float_t max) {fMax = UShort_t(max);}
   void     SetType(Char_t type) {fCType = type;}
+ private:
+  Short_t  fCZ;       // current cluster position Z in cm - 100 mum precision
+  Short_t  fCY;       // current cluster position Y in cm - 100 mum precision
+  UChar_t  fSigmaZ;   // shape  Z - normalised shape - normaliziation 1 - precision 2 percent
+  UChar_t  fSigmaY;   // shape  Y - normalised shape - normaliziation 1 - precision 2 percent
+  UShort_t fQ;        // total charge in cluster 
+  UShort_t fMax;      // charge at maximum  
+  Char_t   fCType;    // type of the cluster
 
   //
- public:
   ClassDef(AliTPCClusterPoint,1)  
 };
 
@@ -120,6 +127,7 @@ class AliTPCClusterPoint  {
 class AliTPCExactPoint : public TObject{
  public:
   AliTPCExactPoint(){fEZ=fEY=fEAngleZ=fEAngleY=fEAmp=fEPrim=fTrackID=0;}
+ private:
   Float_t fEZ;       // current "exact" position according simulation
   Float_t fEY;       // current "exact" position according simulation
   Float_t fEX;       // x poistion of the cluster
@@ -130,27 +138,31 @@ class AliTPCExactPoint : public TObject{
   Int_t   fTrackID;  // id of the track
   Int_t   fRow;      // row
   Int_t   fSec;      //sector
+  friend class AliTPCtrackerMI;
   ClassDef(AliTPCExactPoint,1)  
 };
 
 
 class AliTPCTrackPoint: public TObject{
  public:
+  friend class AliTPCtrackerMI;
   AliTPCTrackPoint(){}
   // AliTPCClusterPoint & GetCPoint(){return fCPoint;}
   AliTPCTrackerPoint & GetTPoint(){return fTPoint;}
   AliTPCclusterMI & GetCPoint(){return fCPoint;}  
- public:
+ private:
   //  AliTPCClusterPoint fCPoint; 
   //Char_t fIsShared;
-  AliTPCTrackerPoint fTPoint;
-  AliTPCclusterMI    fCPoint;
+  AliTPCTrackerPoint fTPoint;  // track point
+  AliTPCclusterMI    fCPoint;  // cluster point
   ClassDef(AliTPCTrackPoint,1)  
 };
 
 class AliTPCTrackPoint2: public AliTPCTrackPoint{
  public:
+  friend class AliTPCtrackerMI;
   AliTPCTrackPoint2(){}
+ private: 
   Float_t fGX;    //global poition of the point
   Float_t fGY;    //global poition of the point
   Float_t fGZ;    //global poition of the point
@@ -169,7 +181,6 @@ class AliTPCTrackPoint2: public AliTPCTrackPoint{
   //
   Int_t   fID;            //id of the corresponding track
   Int_t   fLab;           //MC label of the track
- public:
   ClassDef(AliTPCTrackPoint2,1)  
 };
 
@@ -178,9 +189,10 @@ class AliTPCTrackPoint2: public AliTPCTrackPoint{
 
 class AliTPCTrackPointRef: public AliTPCTrackPoint{
  public:
+  friend class AliTPCtrackerMI;
   AliTPCExactPoint & GetExactPoint(){return fEPoint;}
   AliTPCExactPoint & GetNearestPoint(){return fNPoint;}  
- public:
+ private:
   AliTPCExactPoint fEPoint; //exact point belonging to track
   AliTPCExactPoint fNPoint; //nearest point  
   ClassDef(AliTPCTrackPointRef,1)  
index 0f60f266b65646d4bed00194cac97a99504e916b..d43deeb83fe9b502bd2f22629662c8d8ac70cdb2 100644 (file)
 //                                                                          //
 ///////////////////////////////////////////////////////////////////////////////
 
-#include "TVector3.h"
-#include "TClonesArray.h"    
+//#include "TVector3.h"
+//#include "TClonesArray.h"    
 #include "AliTPCTrackHits.h"
 #include "AliTPC.h"
 
-#include <Riostream.h>
+//#include <Riostream.h>
 
 
 
@@ -89,16 +89,16 @@ struct  AliTPCTempHitInfo {
            Double_t fSumX4, Int_t n,
              Double_t &a, Double_t &b, Double_t &c);
   void  Fit(AliTrackHitsParam * param);
-  Double_t fSumDr;    //
-  Double_t fSumDr2;   //
-  Double_t fSumDr3;   //  
-  Double_t fSumDr4;   //
-  Double_t fSumDFi;  //
-  Double_t fSumDFiDr; //  
-  Double_t fSumDFiDr2;//
-  Double_t fSumDZ;     //
-  Double_t fSumDZDr;  //
-  Double_t fSumDZDr2;  //
+  Double_t fSumDr;    //fSumDr
+  Double_t fSumDr2;   //fSumDr2
+  Double_t fSumDr3;   //  fSumDr3
+  Double_t fSumDr4;   //fSumDr4
+  Double_t fSumDFi;  //fSumDFi
+  Double_t fSumDFiDr; // fSumDFiDr 
+  Double_t fSumDFiDr2;//fSumDFiDr2
+  Double_t fSumDZ;     //fSumDZ
+  Double_t fSumDZDr;  //fSumDZDr
+  Double_t fSumDZDr2;  //fSumDZDr2
   Double_t fOldR;     //previos r
   Double_t fPositionStack[3*fkStackSize];  //position stack 
   UInt_t   fQStack[fkStackSize];           //Q stack
@@ -285,6 +285,11 @@ AliTPCTrackHits::AliTPCTrackHits()
 
 } 
 
+AliTPCTrackHits::AliTPCTrackHits(const AliTPCTrackHits& r) : TObject(r)
+{
+}
+
+
 AliTPCTrackHits::~AliTPCTrackHits()
 {
   //
@@ -318,6 +323,7 @@ void AliTPCTrackHits::Clear()
 void AliTPCTrackHits::AddHitKartez(Int_t volumeID, Int_t trackID, Double_t x, 
              Double_t y, Double_t z,Int_t q)
 {
+  //add hits (cartesian)
   Double_t r = TMath::Sqrt(x*x+y*y);
   Double_t fi = TMath::ACos(x/r);
   if (y<0) fi*=-1.;
@@ -675,7 +681,7 @@ Bool_t AliTPCTrackHits::Next()
 }
 
 */  
-AliTPChit * AliTPCTrackHits::GetHit()
+AliTPChit * AliTPCTrackHits::GetHit() const
 {
   //
    return (fCurrentHit->fStatus)? &fCurrentHit->fHit:0;
index 40771875f34f810f5bffc78f7effc3f5d02f93bb..21d23c23e374f683de601253612333c662a98828 100644 (file)
@@ -9,11 +9,11 @@
 ////////////////////////////////////////////////
 
 #include "AliCTypes.h"
-#include "AliSegmentID.h"
-#include "AliArrayS.h"
-#include "AliTPC.h"
-#include "TVector3.h"
-#include "AliObjectArray.h"
+//#include "AliSegmentID.h"
+//#include "AliArrayS.h"
+//#include "AliTPC.h"
+//#include "TVector3.h"
+//#include "AliObjectArray.h"
 #include "TArrayOfArray.h"
 
 class TClonesArray;
@@ -21,25 +21,32 @@ class AliArrayS;
 class AliTPChit;
 class AliTPCTempHitInfo;
 class AliTPCCurrentHit;
+class AliObjectArray;
 
-
-class AliTrackHitsInfo {
+class AliTrackHitsInfo   {
+  friend  class  AliTPCTrackHits;
+  friend class   AliTPC;
 public:
   AliTrackHitsInfo(){fgCounter1++;fgCounter2++;}
   ~AliTrackHitsInfo(){fgCounter1--;}
+ private:  
   Int_t   fTrackID;  //track ID
   Int_t   fVolumeID;   //volume ID
   UInt_t   fHitParamIndex; //corresponding index  
-  static Int_t fgCounter1;
-  static Int_t fgCounter2;  
+  static Int_t fgCounter1; //counter
+  static Int_t fgCounter2;   //counter
+
   LClassDef(AliTrackHitsInfo,1)  
 };
 
 
 class AliTrackHitsParam {
+  friend  class  AliTPCTrackHits;
+  friend  struct AliTPCTempHitInfo;
 public:
   AliTrackHitsParam(){fgCounter1++;fgCounter2++;}
   ~AliTrackHitsParam(){fgCounter1--;}
+ private:
   Float_t fR;  //radius
   Float_t fZ;  //z position
   Float_t fFi; //radial angle
@@ -47,26 +54,33 @@ public:
   Float_t fAd; //derivation of angle
   Float_t fTheta; //theta angle
   Float_t fThetaD; //theta angle derivation
-  static Int_t fgCounter1;
-  static Int_t fgCounter2;  
+  static Int_t fgCounter1; //counter
+  static Int_t fgCounter2;   //counter
+
   LClassDef(AliTrackHitsParam,1)  
 };
 
 
 class AliHitInfo {
+  friend  class  AliTPCTrackHits;
+  friend  struct AliTPCTempHitInfo;
 public:
   AliHitInfo(){fgCounter1++;fgCounter2++;}
   ~AliHitInfo(){fgCounter1--;}
+ private:
   Short_t fHitDistance; //distance to previous hit
   Short_t fCharge; //deponed charge
-  static Int_t fgCounter1;
-  static Int_t fgCounter2;  
+  static Int_t fgCounter1; //counter
+  static Int_t fgCounter2;  //counter
+
   LClassDef(AliHitInfo,1)
 };
 
 
 
 class AliTPCTrackHits : public TObject{
+  friend class AliTPC;
+  friend  struct AliTPCTempHitInfo;
 public:
   AliTPCTrackHits(); 
   ~AliTPCTrackHits();
@@ -78,7 +92,7 @@ public:
  
   Bool_t First(); //set current hit to first hit 
   Bool_t Next(Int_t id = -1);  //set current hit to next
-  AliTPChit * GetHit();
+  AliTPChit * GetHit() const;
   AliTrackHitsParam * GetParam();
   AliHitInfo * GetHitInfo();
   Int_t  GetEntriesFast() { return fHitsPosAndQ ? fHitsPosAndQ->ArraySize():0;}
@@ -86,7 +100,7 @@ public:
   void SetStepPrecision(Double_t prec) {fStep=prec;}
   void SetMaxDistance(UInt_t distance) {fMaxDistance = distance;}
   Bool_t  FlushHitStack(Bool_t force=kTRUE);    //
-public:
+private:
   void FlushHitStack2(Int_t index1, Int_t index2);   //
   AliObjectArray * fTrackHitsInfo;  //quick information about track
   AliObjectArray * fTrackHitsParam;  //hit information  
@@ -95,12 +109,14 @@ public:
   Double_t fPrecision;  // required precision
   Double_t fStep;       //unit step size
   UInt_t fMaxDistance;   //maximal distance between two connected hits 
+  AliTPCTrackHits(const AliTPCTrackHits& r);
   AliTPCTempHitInfo * fTempInfo; //!information about track
   AliTPCCurrentHit  * fCurrentHit; //!information about current hit 
   static const Double_t fgkPrecision;  //precision 
   static const Double_t fgkPrecision2;  //precision
   static Int_t fgCounter1;
   static Int_t fgCounter2;  
+
   ClassDef(AliTPCTrackHits,1) 
 };