]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/mapping/AliMpVSegmentation.h
Removing useless ifs
[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.7 2006/01/11 10:07:54 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
25 class TVector2;
26
27 class AliMpVPadIterator;
28 class AliMpIntPair;
29 class AliMpArea;
30
31 class AliMpVSegmentation : public TObject
32 {
33   public:
34     AliMpVSegmentation();
35     virtual ~AliMpVSegmentation();
36   
37     // factory method 
38     virtual AliMpVPadIterator* CreateIterator(const AliMpArea& area) const = 0;
39
40     // methods  
41     virtual AliMpPad PadByLocation(const AliMpIntPair& location, 
42                                Bool_t warning = true) const = 0;
43     virtual AliMpPad PadByIndices (const AliMpIntPair& indices,  
44                                Bool_t warning = true) const = 0;
45     virtual AliMpPad PadByPosition(const TVector2& position,
46                                Bool_t warning = true) const = 0;
47
48     virtual AliMpPadPair PadsUp(const AliMpPad& pad) const;
49     virtual AliMpPadPair PadsDown(const AliMpPad& pad) const;
50     virtual AliMpPadPair PadsLeft(const AliMpPad& pad) const;
51     virtual AliMpPadPair PadsRight(const AliMpPad& pad) const;
52
53     virtual Int_t  MaxPadIndexX() = 0;
54     virtual Int_t  MaxPadIndexY() = 0;
55
56     virtual Bool_t HasPad(const AliMpIntPair& indices) const = 0;
57     
58   private:  
59     // methods
60     AliMpPadPair FindPads(const TVector2& position1, 
61                           const TVector2& position2) const;
62
63   ClassDef(AliMpVSegmentation,1)  // Segmentation
64 };
65
66 #endif //ALI_MP_V_SEGMENTATION_H
67