]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/mapping/AliMpVSegmentation.h
81e33ff1d29ce2fabd22abde9e3f57f7120ef1e6
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpVSegmentation.h
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: AliMpVSegmentation.h,v 1.10 2006/03/17 11:34:29 ivana Exp $
6
7 /// \ingroup basic
8 /// \class AliMpVSegmentation
9 /// \brief The abstract base class for the segmentation.
10 ///
11 /// Provides methods related to pads:
12 /// conversion between pad indices, pad location, pad position;
13 /// finding pad neighbour.
14 ///
15 /// Authors: David Guez, Ivana Hrivnacova; IPN Orsay
16
17 #ifndef ALI_MP_V_SEGMENTATION_H
18 #define ALI_MP_V_SEGMENTATION_H
19
20 #include <TObject.h>
21
22 #include "AliMpPadPair.h"
23 #include "AliMpPad.h"
24 #include "AliMpPlaneType.h"
25
26 class AliMpVPadIterator;
27 class AliMpIntPair;
28 class AliMpArea;
29
30 class TArrayI;
31 class TVector2;
32
33 class AliMpVSegmentation : public TObject
34 {
35   public:
36     AliMpVSegmentation();
37     virtual ~AliMpVSegmentation();
38   
39     // factory method 
40     virtual AliMpVPadIterator* CreateIterator(const AliMpArea& area) const = 0;
41
42     // methods  
43     virtual AliMpPad PadByLocation(const AliMpIntPair& location, 
44                                Bool_t warning = true) const = 0;
45     virtual AliMpPad PadByIndices (const AliMpIntPair& indices,  
46                                Bool_t warning = true) const = 0;
47     virtual AliMpPad PadByPosition(const TVector2& position,
48                                Bool_t warning = true) const = 0;
49
50     virtual AliMpPadPair PadsUp(const AliMpPad& pad) const;
51     virtual AliMpPadPair PadsDown(const AliMpPad& pad) const;
52     virtual AliMpPadPair PadsLeft(const AliMpPad& pad) const;
53     virtual AliMpPadPair PadsRight(const AliMpPad& pad) const;
54
55     virtual Int_t  MaxPadIndexX() const = 0;
56     virtual Int_t  MaxPadIndexY() const = 0;
57     virtual Int_t  NofPads() const = 0;
58
59     virtual Bool_t HasPad(const AliMpIntPair& indices) const = 0;
60     
61     virtual void GetAllElectronicCardIDs(TArrayI& ecn) const = 0;
62
63     virtual AliMpPlaneType PlaneType() const = 0;
64     
65     /// Gives the half-sizes (in cm) of the underlying detection element.
66     virtual TVector2 Dimensions() const = 0;
67     
68   private:  
69     // methods
70     AliMpPadPair FindPads(const TVector2& position1, 
71                           const TVector2& position2) const;
72
73   ClassDef(AliMpVSegmentation,1)  // Segmentation
74 };
75
76 #endif //ALI_MP_V_SEGMENTATION_H
77