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

          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: AliMpPCB.h,v 1.9 2006/05/24 13:58:24 ivana Exp $ 
       6             : 
       7             : /// \ingroup slat
       8             : /// \class AliMpPCB
       9             : /// \brief A PCB for station 3,4 or 5
      10             : /// 
      11             : //  Author: Laurent Aphecetche
      12             : 
      13             : #ifndef ALIMPPCB_H
      14             : #define ALIMPPCB_H
      15             : 
      16             : #ifndef ALI_MP_VPAD_ITERATOR_H
      17             : #  include "AliMpVPadIterator.h"
      18             : #endif
      19             : 
      20             : #ifndef ALI_MP_AREA_H
      21             : #  include "AliMpArea.h"
      22             : #endif
      23             : 
      24             : 
      25             : #ifndef ROOT_TObject
      26             : #  include "TObject.h"
      27             : #endif
      28             : 
      29             : #ifndef ROOT_TString
      30             : #  include "TString.h"
      31             : #endif
      32             : 
      33             : #ifndef ROOT_TArraI
      34             : #  include "TArrayI.h"
      35             : #endif
      36             : 
      37             : #ifndef ROOT_TObjArray
      38             : #  include "TObjArray.h"
      39             : #endif
      40             : 
      41             : class AliMpSlatMotifMap;
      42             : class AliMpMotifPosition;
      43             : class AliMpMotifType;
      44             : class AliMpMotifSpecial;
      45             : 
      46             : class AliMpPCB : public TObject
      47             : {
      48             :  public:
      49             : 
      50             :   AliMpPCB();
      51             :   /** Ctor. The sizes are given in mm.
      52             :       See full doc for the meaning of enveloppe parameters.
      53             :   */
      54             :   AliMpPCB(AliMpSlatMotifMap* motifMap,
      55             :            const char* id, Double_t padSizeX, Double_t padSizeY,
      56             :            Double_t enveloppeSizeX, Double_t enveloppeSizeY);
      57             :   
      58             :   AliMpPCB(const char* id, AliMpMotifSpecial* ms);
      59             :   
      60             :   AliMpPCB(const AliMpPCB& o);
      61             :   AliMpPCB& operator=(const AliMpPCB& o);
      62             : 
      63             :   virtual ~AliMpPCB();
      64             : 
      65             :   TObject* Clone(const char* newname="") const;
      66             : 
      67             :   /** Duplicate this PCB. The copy has the manuids of its motifs changed 
      68             :       according to the manuid vector, and its x-offset according to ix 
      69             :       and x.
      70             :   */    
      71             :   AliMpPCB* Clone(const TArrayI& manuids,
      72             :                   Int_t ixOffset, Double_t xOffset) const;
      73             : 
      74             :   void Copy(TObject& o) const;
      75             : 
      76             :   /** Add a motif to this PCB. (ix,iy) are the coordinates of one corner 
      77             :     of the motif, in pad-units. Which corner depends on the sign(s) of (ix,iy):
      78             :     (ix>0,iy>0) : bottom-left corner
      79             :     (ix<0,iy>0) : bottom-right corner
      80             :     (ix<0,iy<0) : top-right corner
      81             :     (ix>0,iy<0) : top-left corner.
      82             :     */
      83             :   void Add(AliMpMotifType* motifType, Int_t ix, Int_t iy);
      84             : 
      85             :   AliMpArea Area() const;
      86             :   
      87             :   void Print(Option_t* option = "") const;
      88             : 
      89             :   Bool_t HasMotifPositionID(Int_t manuId) const;
      90             :   
      91             :   Double_t ActiveDX() const;
      92             :   Double_t ActiveDY() const;
      93             : 
      94             :   Double_t DX() const;
      95             :   Double_t DY() const;
      96             : 
      97             :   Double_t X() const;
      98             :   Double_t Y() const;
      99             : 
     100             :   Double_t Xmin() const;
     101             :   Double_t Xmax() const;
     102             :  
     103             :   Double_t ActiveXmin() const;
     104             :   Double_t ActiveXmax() const;
     105             : 
     106             :   Double_t Ymin() const;
     107             :   Double_t Ymax() const;
     108             : 
     109             :   Double_t PadSizeX() const;
     110             :   Double_t PadSizeY() const;
     111             : 
     112             :   /** Returns the i-th motifPosition of this PCB.
     113             :       i : [0..GetSize()-1]
     114             :   */
     115             :   AliMpMotifPosition* GetMotifPosition(Int_t i) const;
     116             : 
     117             :   /// Returns the motifPosition which contains the pad at (ix,iy).
     118             :   AliMpMotifPosition* FindMotifPosition(Int_t ix, Int_t iy) const;
     119             : 
     120             :   /// Returns the motifPosition which contains the pad at (x,y).
     121             :   AliMpMotifPosition* FindMotifPosition(Double_t x, Double_t y) const;
     122             : 
     123             :   /// The number of motifs, aka manus.
     124             :   Int_t GetSize() const;
     125             : 
     126             :   Int_t GetNofPadsX() const;
     127             :   Int_t GetNofPadsY() const;
     128             : 
     129             :   Int_t Ixmin() const;
     130             :   Int_t Ixmax() const;
     131             :   
     132             :   Int_t Iymin() const;
     133             :   Int_t Iymax() const;
     134             :   
     135             :   const char* GetID() const;
     136             :   
     137             :   /// Return the number of pads in this PCB 
     138        9552 :   Int_t NofPads() const { return fNofPads; }
     139             :   
     140             :   /// Return the motif map
     141           0 :   AliMpSlatMotifMap* MotifMap() const { return fMotifMap; }
     142             :   
     143             :   void Save() const;
     144             :   
     145             :  private:
     146             :   TString fId; ///< PCB name
     147             :   Double_t fPadSizeX; ///< x-size of this PCB's pads (cm)
     148             :   Double_t fPadSizeY; ///< y-size of this PCB's pads (cm)
     149             :   Double_t fEnveloppeSizeX; ///< max x-size of this PCB (cm)
     150             :   Double_t fEnveloppeSizeY; ///< max y-size of this PCB (cm)
     151             :   Double_t fXoffset; ///< x-offset = x of first pad of this PCB (cm)
     152             :   Double_t fActiveXmin; ///< min x of an actual pad in this PCB (cm)
     153             :   Double_t fActiveXmax; ///< max x of an actual pad in this PCB (cm)
     154             :   Int_t fIxmin; ///< min pad index in x
     155             :   Int_t fIxmax; ///< max pad index in x
     156             :   Int_t fIymin; ///< min pad index in y
     157             :   Int_t fIymax; ///< max pad index in y
     158             :   TObjArray fMotifPositions; ///< array of motifs
     159             :   Int_t fNofPads; ///< number of pads in this PCB
     160             :   AliMpSlatMotifMap* fMotifMap; ///< to keep track of things to avoid duplications of motif and motiftypes, and get proper deletion
     161             :   
     162      140036 :   ClassDef(AliMpPCB,3) // A PCB for Stations 3,4,5
     163             : };
     164             : 
     165             : #endif 

Generated by: LCOV version 1.11