]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/mapping/AliMpVSegmentation.h
In mapping:
[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 "AliMpPadPair.h"
24#include "AliMpPad.h"
6914e59d 25#include "AliMpPlaneType.h"
f3ed9a44 26#include "AliMpStationType.h"
2998a151 27
5f91c9e8 28class AliMpVPadIterator;
2998a151 29class AliMpIntPair;
30class AliMpArea;
5f91c9e8 31
2a7ea2e6 32class TArrayI;
33class TVector2;
c49cb542 34class TObjArray;
2a7ea2e6 35
5f91c9e8 36class AliMpVSegmentation : public TObject
37{
38 public:
39 AliMpVSegmentation();
40 virtual ~AliMpVSegmentation();
41
c49cb542 42 // factory methods
f5671fc3 43 /// Create iterator over pads in the given area
5f91c9e8 44 virtual AliMpVPadIterator* CreateIterator(const AliMpArea& area) const = 0;
f5671fc3 45
c49cb542 46 /// Create a pad iterator over the whole area
47 virtual AliMpVPadIterator* CreateIterator() const = 0;
48
f5671fc3 49 /// Fill the array with the pads that are neighbours of pad. Returns
50 /// the number of neighbours.
c49cb542 51 virtual Int_t GetNeighbours(const AliMpPad& pad, TObjArray& neighbours,
52 Bool_t includeSelf=kFALSE,
53 Bool_t includeVoid=kFALSE) const = 0;
5f91c9e8 54
f5671fc3 55 // methods
56 //
57 /// Find pad by location
5f91c9e8 58 virtual AliMpPad PadByLocation(const AliMpIntPair& location,
8be59ff4 59 Bool_t warning = true) const = 0;
f5671fc3 60 /// Find pad by indices
5f91c9e8 61 virtual AliMpPad PadByIndices (const AliMpIntPair& indices,
8be59ff4 62 Bool_t warning = true) const = 0;
f5671fc3 63 /// Find pad by position
5f91c9e8 64 virtual AliMpPad PadByPosition(const TVector2& position,
8be59ff4 65 Bool_t warning = true) const = 0;
5f91c9e8 66
67 virtual AliMpPadPair PadsUp(const AliMpPad& pad) const;
68 virtual AliMpPadPair PadsDown(const AliMpPad& pad) const;
69 virtual AliMpPadPair PadsLeft(const AliMpPad& pad) const;
70 virtual AliMpPadPair PadsRight(const AliMpPad& pad) const;
71
f5671fc3 72 /// Return maximum pad index in X direction
bd984e15 73 virtual Int_t MaxPadIndexX() const = 0;
f5671fc3 74 /// Return maximum pad index in Y direction
bd984e15 75 virtual Int_t MaxPadIndexY() const = 0;
f5671fc3 76 /// Return the number of pads in the detection element
bd984e15 77 virtual Int_t NofPads() const = 0;
580c28fd 78
f5671fc3 79 /// Return true if the pad with given indices exists
5f91c9e8 80 virtual Bool_t HasPad(const AliMpIntPair& indices) const = 0;
81
f5671fc3 82 /// Fill the given array with the electronic card IDs
6914e59d 83 virtual void GetAllElectronicCardIDs(TArrayI& ecn) const = 0;
84
f5671fc3 85 /// Return the plane type
cddd101e 86 virtual AliMp::PlaneType PlaneType() const = 0;
6914e59d 87
f3ed9a44 88 /// Return the station type
89 virtual AliMp::StationType StationType() const = 0;
90
f5671fc3 91 /// Return the half-sizes of the detection element
6914e59d 92 virtual TVector2 Dimensions() const = 0;
93
5f91c9e8 94 private:
95 // methods
96 AliMpPadPair FindPads(const TVector2& position1,
97 const TVector2& position2) const;
98
99 ClassDef(AliMpVSegmentation,1) // Segmentation
100};
101
102#endif //ALI_MP_V_SEGMENTATION_H
103