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