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