AliRoot Core  a565103 (a565103)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliMpFastSegmentation.h
Go to the documentation of this file.
1 #ifndef ALIMPFASTSEGMENTATION_H
2 #define ALIMPFASTSEGMENTATION_H
3 
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6 
7 // $Id$
8 
13 // author Laurent Aphecetche
14 
15 #ifndef ROOT_TObject
16 # include "TObject.h"
17 #endif
18 
19 #ifndef ALI_MP_V_SEGMENTATION_H
20 # include "AliMpVSegmentation.h"
21 #endif
22 
23 #ifndef ROOT_TObjArray
24 # include "TObjArray.h"
25 #endif
26 
27 #ifndef ROOT_TExMap
28 # include "TExMap.h"
29 #endif
30 
31 class AliMpMotifPosition;
32 
34 {
35 public:
37  virtual ~AliMpFastSegmentation();
38 
39  virtual AliMpVPadIterator* CreateIterator(const AliMpArea& area) const;
40  virtual AliMpVPadIterator* CreateIterator() const;
41 
42  virtual Int_t GetNeighbours(const AliMpPad& pad, TObjArray& neighbours,
43  Bool_t includeSelf=kFALSE,
44  Bool_t includeVoid=kFALSE) const;
45 
46  virtual Bool_t HasPadByIndices(Int_t ix, Int_t iy) const;
47  virtual Bool_t HasPadByLocation(Int_t manuId, Int_t manuChannel) const;
48 
49  virtual AliMpPad PadByLocation(Int_t manuId, Int_t manuChannel, Bool_t warning = true) const;
50  virtual AliMpPad PadByIndices (Int_t ix, Int_t iy, Bool_t warning = true) const;
51  virtual AliMpPad PadByPosition(Double_t x, Double_t y, Bool_t warning = true) const;
52 
53  virtual Int_t MaxPadIndexX() const;
54  virtual Int_t MaxPadIndexY() const;
55  virtual Int_t NofPads() const;
56 
57  virtual void GetAllElectronicCardIDs(TArrayI& ecn) const;
58 
59  virtual Int_t GetNofElectronicCards() const;
60 
61  virtual AliMp::PlaneType PlaneType() const;
62 
63  virtual Double_t GetDimensionX() const;
64  virtual Double_t GetDimensionY() const;
65 
66  virtual Double_t GetPositionX() const;
67  virtual Double_t GetPositionY() const;
68 
69  virtual AliMpMotifPosition* MotifPosition(Int_t manuId) const;
70 
71  virtual Bool_t HasMotifPosition(Int_t manuId) const;
72 
73  virtual void Print(Option_t* opt="") const;
74 
76  AliMpVSegmentation* GetHelper() const { return fHelper; }
77 
80 
81 private:
86 
87  virtual AliMpMotifPosition* InternalMotifPosition(Int_t index) const;
88 
89 private:
92  mutable TExMap fIxIy;
93  mutable TExMap fManuId;
94  Double_t fPositionX;
95  Double_t fPositionY;
96 
97  ClassDef(AliMpFastSegmentation,2) // Variant implementation for AliMpVSegmentation
98 };
99 
100 #endif
AliMp::StationType StationType() const
Return segmentation station type.
virtual Int_t MaxPadIndexY() const
Return maximum pad index in Y direction.
virtual AliMp::PlaneType PlaneType() const
Return the plane type.
AliMpVSegmentation * GetHelper() const
Return helper class.
Double_t fPositionY
to compute pad positions
virtual Int_t GetNofElectronicCards() const
Get the number of electronic card IDs.
TExMap fManuId
map of (manuid) -> index in array above
#define TObjArray
virtual Bool_t HasPadByIndices(Int_t ix, Int_t iy) const
virtual void GetAllElectronicCardIDs(TArrayI &ecn) const
Fill the given array with the electronic card IDs.
A rectangle area positioned in plane..
Definition: AliMpArea.h:20
AliMpFastSegmentation(AliMpVSegmentation *seg)
virtual AliMpMotifPosition * InternalMotifPosition(Int_t index) const
virtual Bool_t HasMotifPosition(Int_t manuId) const
Whether or not we have a given manu.
virtual Double_t GetPositionY() const
Return the y position of the origin of the detection element.
virtual AliMpPad PadByIndices(Int_t ix, Int_t iy, Bool_t warning=true) const
Find pad by indices.
virtual AliMp::StationType StationType() const =0
Return the station type.
A placed motif.
virtual Int_t NofPads() const
Return the number of pads in the detection element.
TExMap fIxIy
map of (ix,iy) -> index in array above
An interface for an iterator over pads.
virtual AliMpPad PadByLocation(Int_t manuId, Int_t manuChannel, Bool_t warning=true) const
Find pad by location.
virtual Bool_t HasPadByLocation(Int_t manuId, Int_t manuChannel) const
Return true if the pad with given location exists.
virtual Double_t GetPositionX() const
Return the x position of the origin of the detection element.
virtual Int_t GetNeighbours(const AliMpPad &pad, TObjArray &neighbours, Bool_t includeSelf=kFALSE, Bool_t includeVoid=kFALSE) const
virtual AliMpVPadIterator * CreateIterator() const
Create a pad iterator over the whole area.
virtual AliMpMotifPosition * MotifPosition(Int_t manuId) const
Return the position of a given manu (aka motifPosition)
virtual Int_t MaxPadIndexX() const
Return maximum pad index in X direction.
The abstract base class for the segmentation.
Double_t fPositionX
to compute pad positions
virtual Double_t GetDimensionY() const
Return the y half-sizes of the detection element.
Class which encapsuate all information about a pad.
Definition: AliMpPad.h:22
TObjArray fMotifPositions
array of AliMpMotifPositions (not owner)
Fast version of AliMpVSegmentation.
virtual AliMpPad PadByPosition(Double_t x, Double_t y, Bool_t warning=true) const
Find pad by position.
AliMpFastSegmentation & operator=(const AliMpFastSegmentation &rhs)
Not implemented.
virtual void Print(Option_t *opt="") const
virtual Double_t GetDimensionX() const
Return the x half-sizes of the detection element.
AliMpVSegmentation * fHelper
helper class (owner)