]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TRD/AliTRDpadPlane.h
Move to numbers of atoms for gas mixture
[u/mrichter/AliRoot.git] / TRD / AliTRDpadPlane.h
index 3c15b78d663f22b70dd435e7ed09dc05832b4a24..d9bcaf827cda6dec0d447c2cb8b4226167f748d7 100644 (file)
@@ -32,12 +32,46 @@ class AliTRDpadPlane : public TObject {
   AliTRDpadPlane    &operator=(const AliTRDpadPlane &p);
   virtual void       Copy(TObject &p) const;
 
-  Int_t    GetPadRowNumber(const Double_t z);
-  Int_t    GetPadColNumber(const Double_t rphi);
-
-  Double_t GetPadRowOffset(const Int_t row, const Double_t z);
-  Double_t GetPadColOffset(const Int_t col, const Double_t rphi);
+  Int_t    GetPadRowNumber(Double_t z) const;
+  Int_t    GetPadColNumber(Double_t rphi, Double_t rowOffset) const;
+  Double_t GetTiltOffset(Double_t rowOffset) const 
+                                             { return fTiltingTan * (rowOffset - 0.5*fLengthIPad); };
+  Double_t GetPadRowOffset(Int_t row, Double_t z) const
+                                             { if ((row < 0) || (row >= fNrows))
+                                                 return -1.0;
+                                               else 
+                                                 return fPadRow[row] - z;    };
+
+  Double_t GetPadColOffset(Int_t col, Double_t rphi) const
+                                             { if ((col < 0) || (col >= fNcols))
+                                                 return -1.0;
+                                               else
+                                                 return fPadCol[col] - rphi; };
+
+  Double_t GetTiltingAngle() const           { return fTiltingAngle; };
+
+  Int_t    GetNrows() const                  { return fNrows;        };
+  Int_t    GetNcols() const                  { return fNcols;        };
+
+  Double_t GetRow0() const                   { return fPadRow[0];    };
+  Double_t GetCol0() const                   { return fPadCol[0];    };
+
+  Double_t GetRowEnd() const                 { return fPadRow[fNrows-1] - fLengthOPad; };
+  Double_t GetColEnd() const                 { return fPadCol[fNcols-1] - fWidthOPad;  };
+
+  Double_t GetRowPos(Int_t row) const        { return fPadRow[row];  };
+  Double_t GetColPos(Int_t col) const        { return fPadCol[col];  };
   
+  Double_t GetRowSize(Int_t row) const       { if ((row == 0) || (row == fNrows-1))
+                                                 return fLengthOPad;
+                                               else
+                                                 return fLengthIPad; };
+  Double_t GetColSize(Int_t col) const       { if ((col == 0) || (col == fNcols-1))
+                                                 return fWidthOPad;
+                                               else
+                                                  return fWidthIPad; };
+  Double_t GetLengthRim() const              { return fLengthRim;    };
+
  protected:
 
   AliTRDgeometry *fGeo;       //! TRD geometry       
@@ -64,11 +98,12 @@ class AliTRDpadPlane : public TObject {
   Int_t     fNcols;           //  Number of columns
 
   Double_t  fTiltingAngle;    //  Pad tilting angle  
+  Double_t  fTiltingTan;      //  Tangens of pad tilting angle
 
   Double_t *fPadRow;          //! Pad border positions in row direction
   Double_t *fPadCol;          //! Pad border positions in column direction
 
-  ClassDef(AliTRDpadPlane,1)  //  TRD ROC pad plane
+  ClassDef(AliTRDpadPlane,2)  //  TRD ROC pad plane
 
 };