1 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2 * See cxx source for full Copyright notice */
5 // $MpId: AliMpSlat.h,v 1.2 2005/09/19 19:01:09 ivana Exp $
9 /// \brief A slat (building block of stations 3, 4 and 5)
11 /// Author: Laurent Aphecetche
22 #ifndef ALI_MP_V_SEGMENTATION_H
23 #include "AliMpVSegmentation.h"
30 #include "AliMpContainers.h"
36 # include "TObjArray.h"
42 class AliMpMotifPosition;
45 class AliMpSlat : public TObject
52 typedef UInt_t Size_t;
56 AliMpSlat(const char* id);
59 TVector2 Dimensions() const;
61 const char* GetID() const;
63 void Add(AliMpPCB* pcbType, const TArrayI& manuList);
68 /// Find the PCB containing the pad at location (ix,any iy).
69 AliMpPCB* FindPCB(Int_t ix) const;
71 /** Find the index of the PCB containing the pad at location ix.
72 Should not be needed except to comply with Sector(), Dpx(), Dpy()
73 interface of old AliMUONVGeometrySegmentation.
74 FIXME: Remove me when VGeometrySegmentation dies at last.
76 Int_t FindPCBIndex(Int_t ix) const;
78 /// Find the PCB containing location (x,y).
79 AliMpPCB* FindPCB(Double_t x, Double_t y) const;
81 /** Find the index of the PCB containing the pad at location (x,y).
82 Should not be needed except to comply with Sector(), Dpx(), Dpy()
83 interface of old AliMUONVGeometrySegmentation.
84 FIXME: Remove me when VGeometrySegmentation dies at last.
86 Int_t FindPCBIndex(Double_t x, Double_t y) const;
88 /// Returns the i-th PCB of this slat.
89 AliMpPCB* GetPCB(Size_t i) const;
91 /// Returns the MotifPosition containing location (x,y).
92 AliMpMotifPosition* FindMotifPosition(Double_t x, Double_t y) const;
94 /// Returns the MotifPosition which id is manuid.
95 AliMpMotifPosition* FindMotifPosition(Int_t manuid) const;
97 /// Returns the MotifPosition containing the pad located at (ix,iy).
98 AliMpMotifPosition* FindMotifPosition(Int_t ix, Int_t iy) const;
100 /// Returns the number of PCBs of this slat.
101 Size_t GetSize() const;
103 /// Returns the number of pads in the x-direction contained in this slat.
104 Int_t GetNofPadsX() const;
106 /** Returns the max. number of pads in the x-direction contained in this slat.
107 This is a max only as for e.g. non-bending slats, the y-dimension depends
110 Int_t GetMaxNofPadsY() const;
112 void Print(Option_t* option="") const;
121 TObjArray fPCBs; // array of AliMpPCB*
122 mutable TExMap fManuMap; // map of int to AliMpMotifPosition*
124 std::vector<AliMpPCB*> fPCBs;
125 std::map<int,AliMpMotifPosition*> fManuMap;
128 ClassDef(AliMpSlat,1) // A slat for stations 3,4,5