AliRoot Core  a565103 (a565103)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliMpSectorSegmentation.h
Go to the documentation of this file.
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: AliMpSectorSegmentation.h,v 1.15 2006/05/24 13:58:21 ivana Exp $
6 
16 
17 #ifndef ALI_MP_SECTOR_SEGMENTATION_H
18 #define ALI_MP_SECTOR_SEGMENTATION_H
19 
20 #include "AliMpVSegmentation.h"
21 #include "AliMpPad.h"
22 
23 #include <TExMap.h>
24 
25 class AliMpSector;
26 class AliMpMotifPosition;
27 class AliMpVPadIterator;
28 class AliMpArea;
29 
31 {
32  public:
33  AliMpSectorSegmentation(const AliMpSector* sector, Bool_t own = false);
35  virtual ~AliMpSectorSegmentation();
36 
37  // factory methods
38  virtual AliMpVPadIterator* CreateIterator(const AliMpArea& area) const;
39  virtual AliMpVPadIterator* CreateIterator() const;
40 
41  virtual Int_t GetNeighbours(const AliMpPad& pad, TObjArray& neighbours,
42  Bool_t includeSelf = kFALSE,
43  Bool_t includeVoid = kFALSE) const;
44 
45  // methods
46  virtual AliMpPad PadByLocation(Int_t manuId, Int_t manuChannel,
47  Bool_t warning = kTRUE) const;
48  virtual AliMpPad PadByIndices (Int_t ix, Int_t iy,
49  Bool_t warning = kTRUE) const;
50  virtual AliMpPad PadByPosition(Double_t x, Double_t y,
51  Bool_t warning = kTRUE) const;
52  virtual AliMpPad PadByDirection(Double_t startx, Double_t starty,
53  Double_t distance) const;
54 
55  virtual Bool_t HasPadByIndices(Int_t ix, Int_t iy) const;
56  virtual Bool_t HasPadByLocation(Int_t manuId, Int_t manuChannel) const;
57 
58  virtual Int_t MaxPadIndexX() const;
59  virtual Int_t MaxPadIndexY() const;
60  virtual Int_t NofPads() const;
61 
62  virtual void GetAllElectronicCardIDs(TArrayI& ecn) const;
63  virtual Int_t GetNofElectronicCards() const;
64  virtual Bool_t HasMotifPosition(Int_t motifPositionID) const;
65  virtual AliMpMotifPosition* MotifPosition(Int_t manuId) const;
66 
67  virtual AliMp::PlaneType PlaneType() const;
68  virtual AliMp::StationType StationType() const;
69 
70  virtual Double_t GetDimensionX() const;
71  virtual Double_t GetDimensionY() const;
72 
73  virtual Double_t GetPositionX() const;
74  virtual Double_t GetPositionY() const;
75 
76  virtual void Print(Option_t* opt="") const;
77 
78  Double_t GetMinPadDimensionX() const;
79  Double_t GetMinPadDimensionY() const;
80 
81  Bool_t CircleTest(Int_t ix, Int_t iy) const;
82 
83  const AliMpSector* GetSector() const;
84 
85  private:
90 
91  // methods
92  AliMpMotifPosition* FindMotifPosition(Int_t ix, Int_t iy) const;
93  virtual AliMpPad PadByXDirection(Double_t startx, Double_t starty,
94  Double_t maxX) const;
95  virtual AliMpPad PadByYDirection(Double_t startx, Double_t starty,
96  Double_t maxY) const;
97 
98  // data members
100  Bool_t fIsOwner;
102  Int_t fMaxIndexInX;
103  Int_t fMaxIndexInY;
104 
105  ClassDef(AliMpSectorSegmentation,3) // Segmentation
106 };
107 
108 
109 // inline functions
110 
113 { return fkSector; }
114 
117 { return AliMp::kStation12; }
118 
119 
120 #endif //ALI_MP_SECTOR_SEGMENTATION_H
121 
AliMpMotifPosition * FindMotifPosition(Int_t ix, Int_t iy) const
virtual AliMpVPadIterator * CreateIterator() const
Create a pad iterator over the whole area.
station 1,2 (quadrants)
Int_t fMaxIndexInY
maximum pad index in y
const AliMpSector * GetSector() const
Return the sector.
Bool_t CircleTest(Int_t ix, Int_t iy) const
#define TObjArray
virtual AliMpPad PadByYDirection(Double_t startx, Double_t starty, Double_t maxY) const
virtual AliMpPad PadByDirection(Double_t startx, Double_t starty, Double_t distance) const
virtual AliMpPad PadByIndices(Int_t ix, Int_t iy, Bool_t warning=kTRUE) const
Find pad by indices.
virtual void Print(Option_t *opt="") const
virtual AliMpPad PadByLocation(Int_t manuId, Int_t manuChannel, Bool_t warning=kTRUE) const
Find pad by location.
A rectangle area positioned in plane..
Definition: AliMpArea.h:20
virtual AliMpMotifPosition * MotifPosition(Int_t manuId) const
Return the position of a given manu (aka motifPosition)
virtual Double_t GetDimensionY() const
Return the y half-sizes of the detection element.
virtual Int_t GetNofElectronicCards() const
Get the number of electronic card IDs.
virtual Double_t GetPositionY() const
Return the y position of the origin of the detection element.
virtual void GetAllElectronicCardIDs(TArrayI &ecn) const
Fill the given array with the electronic card IDs.
virtual Bool_t HasPadByIndices(Int_t ix, Int_t iy) const
A placed motif.
virtual AliMpPad PadByXDirection(Double_t startx, Double_t starty, Double_t maxX) const
An interface for an iterator over pads.
A sector (quadrant) of the MUON chamber of stations 1 and 2.
Definition: AliMpSector.h:34
virtual Double_t GetPositionX() const
Return the x position of the origin of the detection element.
const AliMpSector * fkSector
Sector.
Bool_t fIsOwner
Sector ownership.
virtual Double_t GetDimensionX() const
Return the x half-sizes of the detection element.
A segmentation of the sector.
virtual Int_t GetNeighbours(const AliMpPad &pad, TObjArray &neighbours, Bool_t includeSelf=kFALSE, Bool_t includeVoid=kFALSE) const
The abstract base class for the segmentation.
virtual AliMpPad PadByPosition(Double_t x, Double_t y, Bool_t warning=kTRUE) const
Find pad by position.
AliMpSectorSegmentation & operator=(const AliMpSectorSegmentation &right)
Not implemented.
Class which encapsuate all information about a pad.
Definition: AliMpPad.h:22
Int_t fMaxIndexInX
maximum pad index in x
AliMpPad * fPadBuffer
The pad buffer.
virtual Bool_t HasPadByLocation(Int_t manuId, Int_t manuChannel) const
Return true if the pad with given location exists.
virtual Int_t MaxPadIndexX() const
Return maximum pad index in X direction.
virtual Bool_t HasMotifPosition(Int_t motifPositionID) const
Whether or not we have a given manu.
virtual Int_t MaxPadIndexY() const
Return maximum pad index in Y direction.
virtual AliMp::StationType StationType() const
Return station type.
virtual Int_t NofPads() const
Return the number of pads in the detection element.
virtual AliMp::PlaneType PlaneType() const
Return the plane type.