LCOV - code coverage report
Current view: top level - TRD/TRDbase - AliTRDpadPlane.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 54 60 90.0 %
Date: 2016-06-14 17:26:59 Functions: 44 50 88.0 %

          Line data    Source code
       1             : #ifndef ALITRDPADPLANE_H
       2             : #define ALITRDPADPLANE_H
       3             : /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
       4             :  * See cxx source for full Copyright notice                               */
       5             : 
       6             : /* $Id$ */
       7             : 
       8             : ////////////////////////////////////////////////////////////////////////////
       9             : //                                                                        //
      10             : //  TRD pad plane class                                                   //
      11             : //                                                                        //
      12             : //  Contains the information on ideal pad positions, pad dimensions,      //
      13             : //  tilting angle, etc.                                                   //
      14             : //  It also provides methods to identify the current pad number from      //
      15             : //  local tracking coordinates.                                           //
      16             : //                                                                        //
      17             : ////////////////////////////////////////////////////////////////////////////
      18             : 
      19             : #include <TObject.h>
      20             : 
      21             : //_____________________________________________________________________________
      22             : class AliTRDpadPlane : public TObject {
      23             : 
      24             :  public:
      25             : 
      26             :   AliTRDpadPlane();
      27             :   AliTRDpadPlane(Int_t layer, Int_t stack);
      28             :   virtual           ~AliTRDpadPlane();
      29             :   virtual void       Copy(TObject &p) const;
      30             : 
      31         180 :   void     SetLayer(Int_t l)                   { fLayer          = l; };
      32         180 :   void     SetStack(Int_t s)                   { fStack          = s; };
      33         180 :   void     SetRowSpacing(Double_t s)           { fRowSpacing     = s; };
      34         180 :   void     SetColSpacing(Double_t s)           { fColSpacing     = s; };
      35         180 :   void     SetLengthRim(Double_t l)            { fLengthRim      = l; };
      36         180 :   void     SetWidthRim(Double_t w)             { fWidthRim       = w; };
      37         180 :   void     SetNcols(Int_t n)                   { fNcols          = n;
      38          90 :                                                  if (fPadCol) delete[] fPadCol;
      39          90 :                                                  fPadCol         = new Double_t[fNcols]; };
      40         180 :   void     SetNrows(Int_t n)                   { fNrows          = n;
      41          90 :                                                  if (fPadRow) delete[] fPadRow;
      42          90 :                                                  fPadRow         = new Double_t[fNrows]; };
      43       51840 :   void     SetPadCol(Int_t ic, Double_t c)     { if (ic < fNcols) fPadCol[ic] = c;       };
      44        5472 :   void     SetPadRow(Int_t ir, Double_t r)     { if (ir < fNrows) fPadRow[ir] = r;       };
      45         180 :   void     SetLength(Double_t l)               { fLength          = l; };
      46         180 :   void     SetWidth(Double_t w)                { fWidth           = w; };
      47         180 :   void     SetLengthOPad(Double_t l)           { fLengthOPad      = l; };
      48         180 :   void     SetWidthOPad(Double_t w)            { fWidthOPad       = w; };
      49         180 :   void     SetLengthIPad(Double_t l)           { fLengthIPad      = l; };
      50         180 :   void     SetWidthIPad(Double_t w)            { fWidthIPad       = w; };
      51         180 :   void     SetPadRowSMOffset(Double_t o)       { fPadRowSMOffset  = o; };
      52         180 :   void     SetAnodeWireOffset(Float_t o)       { fAnodeWireOffset = o; };
      53             :   void     SetTiltingAngle(Double_t t);
      54             : 
      55             :   Int_t    GetPadRowNumber(Double_t z) const;
      56             :   Int_t    GetPadRowNumberROC(Double_t z) const;
      57             :   Int_t    GetPadColNumber(Double_t rphi) const;
      58             : 
      59             :   Double_t GetTiltOffset(Double_t rowOffset) const 
      60     1194256 :                                              { return fTiltingTan * (rowOffset - 0.5*fLengthIPad); };
      61             : 
      62             :   Double_t GetPadRowOffset(Int_t row, Double_t z) const
      63           0 :                                              { if ((row < 0) || (row >= fNrows))
      64           0 :                                                  return -1.0;
      65             :                                                 else 
      66           0 :                                                  return fPadRow[row] + fPadRowSMOffset - z;        };
      67             :   Double_t GetPadRowOffsetROC(Int_t row, Double_t z) const
      68     1791384 :                                              { if ((row < 0) || (row >= fNrows))
      69           0 :                                                  return -1.0;
      70             :                                                else 
      71     1194256 :                                                  return fPadRow[row] - z;    };
      72             : 
      73             :   Double_t GetPadColOffset(Int_t col, Double_t rphi) const
      74     1724712 :                                              { if ((col < 0) || (col >= fNcols))
      75           0 :                                                  return -1.0;
      76             :                                                else
      77     1149808 :                                                  return rphi - fPadCol[col]; };
      78             : 
      79        1848 :   Double_t GetTiltingAngle() const           { return fTiltingAngle;    };
      80             : 
      81       44890 :   Int_t    GetNrows() const                  { return fNrows;           };
      82       29280 :   Int_t    GetNcols() const                  { return fNcols;           };
      83             : 
      84       10942 :   Double_t GetRow0() const                   { return fPadRow[0] + fPadRowSMOffset;    };
      85     1195384 :   Double_t GetRow0ROC() const                { return fPadRow[0];       };
      86     1195180 :   Double_t GetCol0() const                   { return fPadCol[0];       };
      87             : 
      88        2124 :   Double_t GetRowEnd() const                 { return fPadRow[fNrows-1] - fLengthOPad + fPadRowSMOffset; };
      89     1194994 :   Double_t GetRowEndROC() const              { return fPadRow[fNrows-1] - fLengthOPad; };
      90     1194256 :   Double_t GetColEnd() const                 { return fPadCol[fNcols-1] + fWidthOPad;  };
      91             : 
      92       38556 :   Double_t GetRowPos(Int_t row) const        { return fPadRow[row] + fPadRowSMOffset;  };
      93           0 :   Double_t GetRowPosROC(Int_t row) const     { return fPadRow[row];     };
      94       36904 :   Double_t GetColPos(Int_t col) const        { return fPadCol[col];     };
      95             :   
      96      166890 :   Double_t GetRowSize(Int_t row) const       { if ((row == 0) || (row == fNrows-1))
      97        1944 :                                                  return fLengthOPad;
      98             :                                                else
      99      109836 :                                                  return fLengthIPad; };
     100     3501510 :   Double_t GetColSize(Int_t col) const       { if ((col == 0) || (col == fNcols-1))
     101        8896 :                                                  return fWidthOPad;
     102             :                                                else
     103     2327624 :                                                  return fWidthIPad;     };
     104             : 
     105         180 :   Double_t GetLengthRim() const              { return fLengthRim;       };
     106         180 :   Double_t GetWidthRim() const               { return fWidthRim;        };
     107             : 
     108       10332 :   Double_t GetRowSpacing() const             { return fRowSpacing;      };
     109       26844 :   Double_t GetColSpacing() const             { return fColSpacing;      };
     110             : 
     111        7776 :   Double_t GetLengthOPad() const             { return fLengthOPad;      };
     112       12884 :   Double_t GetLengthIPad() const             { return fLengthIPad;      };
     113             : 
     114        1104 :   Double_t GetWidthOPad() const              { return fWidthOPad;       };
     115       27188 :   Double_t GetWidthIPad() const              { return fWidthIPad;       };
     116             : 
     117     1150788 :   Double_t GetAnodeWireOffset() const        { return fAnodeWireOffset; };
     118             : 
     119             :  protected:
     120             : 
     121             :   Int_t     fLayer;           //  Layer number
     122             :   Int_t     fStack;           //  Stack number
     123             : 
     124             :   Double_t  fLength;          //  Length of pad plane in z-direction (row)
     125             :   Double_t  fWidth;           //  Width of pad plane in rphi-direction (col)
     126             : 
     127             :   Double_t  fLengthRim;       //  Length of the rim in z-direction (row)
     128             :   Double_t  fWidthRim;        //  Width of the rim in rphi-direction (col)
     129             : 
     130             :   Double_t  fLengthOPad;      //  Length of an outer pad in z-direction (row)
     131             :   Double_t  fWidthOPad;       //  Width of an outer pad in rphi-direction (col)
     132             : 
     133             :   Double_t  fLengthIPad;      //  Length of an inner pad in z-direction (row)
     134             :   Double_t  fWidthIPad;       //  Width of an inner pad in rphi-direction (col)
     135             : 
     136             :   Double_t  fRowSpacing;      //  Spacing between the pad rows
     137             :   Double_t  fColSpacing;      //  Spacing between the pad columns
     138             : 
     139             :   Int_t     fNrows;           //  Number of rows
     140             :   Int_t     fNcols;           //  Number of columns
     141             : 
     142             :   Double_t  fTiltingAngle;    //  Pad tilting angle  
     143             :   Double_t  fTiltingTan;      //  Tangens of pad tilting angle
     144             : 
     145             :   Double_t *fPadRow;          //  Pad border positions in row direction
     146             :   Double_t *fPadCol;          //  Pad border positions in column direction
     147             : 
     148             :   Double_t  fPadRowSMOffset;  //  To be added to translate local ROC system to local SM system
     149             : 
     150             :   Double_t  fAnodeWireOffset; //  Distance of first anode wire from pad edge
     151             : 
     152             :  private:
     153             :   AliTRDpadPlane(const AliTRDpadPlane &p);
     154             :   AliTRDpadPlane    &operator=(const AliTRDpadPlane &p);
     155             : 
     156          48 :   ClassDef(AliTRDpadPlane,6)  //  TRD ROC pad plane
     157             : 
     158             : };
     159             : 
     160             : #endif

Generated by: LCOV version 1.11