LCOV - code coverage report
Current view: top level - MUON/MUONmapping - AliMpVRowSegmentSpecial.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 2 3 66.7 %
Date: 2016-06-14 17:26:59 Functions: 2 7 28.6 %

          Line data    Source code
       1             : /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
       2             :  * See cxx source for full Copyright notice                               */
       3             : 
       4             : // $Id$
       5             : // $MpId: AliMpVRowSegmentSpecial.h,v 1.10 2006/05/24 13:58:21 ivana Exp $
       6             : 
       7             : /// \ingroup sector
       8             : /// \class AliMpVRowSegmentSpecial
       9             : /// \brief Abstract base class for a special row segment composed of the 
      10             : /// pad rows.
      11             : ///
      12             : /// \author David Guez, Ivana Hrivnacova; IPN Orsay
      13             : 
      14             : #ifndef ALI_MP_V_ROW_SEGMENT_SPECIAL_H
      15             : #define ALI_MP_V_ROW_SEGMENT_SPECIAL_H
      16             : 
      17             : #include "AliMpVRowSegment.h"
      18             : #include "AliMpVMotif.h"
      19             : 
      20             : #include <TVector2.h>
      21             : #include <TArrayI.h>
      22             : #include <TObjArray.h>
      23             : 
      24             : class AliMpRow;
      25             : class AliMpPadRow;
      26             : class AliMpVPadRowSegment;
      27             : 
      28             : class AliMpVRowSegmentSpecial : public AliMpVRowSegment
      29             : {
      30             :   public:
      31             :     AliMpVRowSegmentSpecial(AliMpRow* row, Double_t offsetX);
      32             :     AliMpVRowSegmentSpecial();
      33             :     virtual ~AliMpVRowSegmentSpecial();
      34             :     
      35             :     //
      36             :     // methods
      37             :     //
      38             :     void  AddPadRow(AliMpPadRow* padRow);
      39             :     void  UpdateMotifVector();
      40             :     /// Update pads offset
      41             :     virtual void  UpdatePadsOffset() = 0;
      42             :     /// Return the x coordinate of the left border in the global coordinate system.
      43             :     virtual Double_t  LeftBorderX() const = 0;
      44             :     /// Return the x coordinate of the right border in the global coordinate system.
      45             :     virtual Double_t  RightBorderX() const= 0;
      46             :     /// Return the half size in y of this row segment.
      47             :     virtual Double_t  HalfSizeY() const;
      48             : 
      49             :     //
      50             :     // find methods
      51             :     //
      52             :     virtual AliMpVMotif*  FindMotif(Double_t x, Double_t y) const;    
      53             :     virtual Int_t     FindMotifPositionId(Double_t x, Double_t y) const;
      54             :     virtual Bool_t    HasMotifPosition(Int_t motifPositionId) const;
      55             : 
      56             :     virtual void  MotifCenter(Int_t motifPositionId,
      57             :                               Double_t& x, Double_t& y) const;
      58             : 
      59             :     //
      60             :     // geometry
      61             :     //
      62             :     /// Return the x position of the row segment centre.
      63             :     virtual Double_t  GetPositionX() const = 0;
      64             :     /// Return the y position of the row segment centre.
      65             :     virtual Double_t  GetPositionY() const = 0;
      66             : 
      67             : 
      68             :     /// Return the x dimension of the row segment centre.
      69             :     virtual Double_t  GetDimensionX() const;
      70             :     /// Return the y dimension of the row segment centre.
      71             :     virtual Double_t  GetDimensionY() const;
      72             : 
      73             :     //
      74             :     // set methods
      75             :     //
      76             :     /// Calculate offset
      77           0 :     virtual void   SetOffset(Double_t /*x*/, Double_t /*y*/) {}
      78             :     /// Set global indices limits.
      79             :     virtual void   SetGlobalIndices(AliMpRow* rowBefore) = 0;
      80             :     /// Set global indices to i-th motif position and returns next index in x.
      81             :     virtual Int_t  SetIndicesToMotifPosition(Int_t i, MpPair_t indices) = 0;
      82             : 
      83             :     //
      84             :     // get methods
      85             :     //
      86             :     virtual AliMpRow*     GetRow() const;
      87             :     virtual Int_t         GetNofMotifs() const;
      88             :     virtual AliMpVMotif*  GetMotif(Int_t i) const;
      89             :     virtual Int_t         GetMotifPositionId(Int_t i) const;
      90             : 
      91             :   protected:
      92             :     // methods
      93             :     /// Return the coordinates of the motif specified with the given motif position Id                                           \n
      94             :     virtual void  MotifCenterSlow(Int_t motifPositionId, 
      95             :                                   Double_t& x, Double_t& y) const = 0;
      96             :     AliMpPadRow*         FindPadRow(Double_t y) const;
      97             :     AliMpVPadRowSegment* FindPadRowSegment(Int_t motifPositionId) const;
      98             :     MpPair_t             FindRelativeLowIndicesOf(Int_t motifPositionId) const;
      99             :     Int_t   MaxNofPadsInRow() const;
     100             :     Bool_t  HasMotif(const AliMpVMotif* motif) const;    
     101             : 
     102             :     // get methods
     103             :     Int_t         GetNofPadRows() const;
     104             :     AliMpPadRow*  GetPadRow(Int_t i) const;
     105             :     Double_t      GetOffsetX() const;
     106             : 
     107             :   private:
     108             :     /// Not implemented
     109             :     AliMpVRowSegmentSpecial(const AliMpVRowSegmentSpecial& right);
     110             :     /// Not implemented
     111             :     AliMpVRowSegmentSpecial&  operator = (const AliMpVRowSegmentSpecial& right);
     112             : 
     113             :     // static data members
     114             :     static const Int_t  fgkMaxNofMotifPositionIds; ///< dimension of fMotifPositionIds
     115             : 
     116             :     // data members
     117             :     AliMpRow*   fRow;     ///< the row containing this segment 
     118             :     Double_t    fOffsetX; ///< \brief the x position of the border that touches a standard
     119             :                           /// row segment
     120             :     TObjArray   fPadRows; ///< pad rows vector
     121             :     TObjArray   fMotifs;  ///< motifs vector
     122             :     TArrayI     fMotifPositionIds;    ///< motifs position Ids vector
     123             :     Int_t       fNofMotifPositionIds; ///< number of motif positions Ids
     124             :     
     125          18 :   ClassDef(AliMpVRowSegmentSpecial,1)  //Row segment
     126             : };
     127             : 
     128             : // inline functions
     129             : 
     130             : /// Return the x position of the border that touches a standard row segment
     131             : inline Double_t AliMpVRowSegmentSpecial::GetOffsetX() const
     132        4072 : { return fOffsetX; }    
     133             : 
     134             : #endif //ALI_MP_V_ROW_SEGMENT_SPECIAL_H

Generated by: LCOV version 1.11