]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/mapping/AliMpVSegmentation.h
Updates to AddTask macro from Chris
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpVSegmentation.h
1
2
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 // $Id$
7 // $MpId: AliMpVSegmentation.h,v 1.12 2006/05/24 13:58:07 ivana Exp $
8
9 /// \ingroup basic
10 /// \class AliMpVSegmentation
11 /// \brief The abstract base class for the segmentation.
12 ///
13 /// Provides methods related to pads:
14 /// conversion between pad indices, pad location, pad position;
15 /// finding pad neighbour.
16 ///
17 /// \author David Guez, Ivana Hrivnacova, IPN Orsay;
18 ///         Laurent Aphecetche, SUBATECH
19
20 #ifndef ALI_MP_V_SEGMENTATION_H
21 #define ALI_MP_V_SEGMENTATION_H
22
23 #include <TObject.h>
24
25 #include "AliMpPad.h"
26 #include "AliMpPlaneType.h"
27 #include "AliMpStationType.h"
28
29 class AliMpVPadIterator;
30 class AliMpArea;
31 class AliMpMotifPosition;
32
33 class TArrayI;
34 class TObjArray;
35
36 class AliMpVSegmentation : public TObject
37 {
38   public:
39     AliMpVSegmentation();
40     virtual ~AliMpVSegmentation();
41   
42     //
43     // methods 
44     //
45
46     // factory methods
47     /// Create iterator over pads in the given area 
48     virtual AliMpVPadIterator* CreateIterator(const AliMpArea& area) const = 0;
49
50     /// Create a pad iterator over the whole area
51     virtual AliMpVPadIterator* CreateIterator() const = 0;
52     
53     /// Fill the array with the pads that are neighbours of pad. Returns
54     /// the number of neighbours.
55     virtual Int_t GetNeighbours(const AliMpPad& pad, TObjArray& neighbours,
56                                 Bool_t includeSelf=kFALSE,
57                                 Bool_t includeVoid=kFALSE) const = 0;
58
59             /// Find pad by location
60     virtual AliMpPad PadByLocation(Int_t manuId, Int_t manuChannel, 
61                                 Bool_t warning = true) const = 0;
62             /// Find pad by indices
63     virtual AliMpPad PadByIndices (Int_t ix, Int_t iy,  
64                                Bool_t warning = true) const = 0;
65             /// Find pad by position
66     virtual AliMpPad PadByPosition(Double_t x, Double_t y,
67                                Bool_t warning = true) const = 0;
68             /// Return true if the pad with given indices exists.
69             /// Compared with the PadByIndices method, this one can generally be implemented
70             /// faster, as one does not have to create an AliMpPad object... 
71     virtual Bool_t HasPadByIndices(Int_t ix, Int_t iy) const;
72   
73             /// Return true if the pad with given location exists
74     virtual Bool_t HasPadByLocation(Int_t manuId, Int_t manuChannel) const;
75   
76             /// Return maximum pad index in X direction
77     virtual Int_t  MaxPadIndexX() const = 0;
78             /// Return maximum pad index in Y direction
79     virtual Int_t  MaxPadIndexY() const = 0;
80             /// Return the number of pads in the detection element
81     virtual Int_t  NofPads() const = 0;
82
83             /// Fill the given array with the electronic card IDs
84     virtual void GetAllElectronicCardIDs(TArrayI& ecn) const = 0;
85
86             /// Get the number of electronic card IDs 
87     virtual Int_t GetNofElectronicCards() const = 0;
88     
89             /// Whether or not we have a given manu
90     virtual Bool_t HasMotifPosition(Int_t manuId) const = 0;
91   
92             /// Return the position of a given manu (aka motifPosition)
93     virtual AliMpMotifPosition* MotifPosition(Int_t manuId) const = 0;
94
95             /// Return the plane type
96     virtual AliMp::PlaneType PlaneType() const = 0;
97     
98             /// Return the station type
99     virtual AliMp::StationType StationType() const = 0;
100
101             /// Return the x half-sizes of the detection element
102     virtual Double_t  GetDimensionX() const = 0;
103             /// Return the y half-sizes of the detection element
104     virtual Double_t  GetDimensionY() const = 0;
105     
106             /// Return the x position of the origin of the detection element
107     virtual Double_t  GetPositionX() const = 0;
108             /// Return the y position of the origin of the detection element
109     virtual Double_t  GetPositionY() const = 0;
110
111   
112   ClassDef(AliMpVSegmentation,1)  // Segmentation
113 };
114
115 #endif //ALI_MP_V_SEGMENTATION_H
116