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.5 2006/03/17 16:42:28 ivana Exp $
9 /// \brief A slat (building block of stations 3, 4 and 5)
11 /// Author: Laurent Aphecetche
23 # include "AliMpPad.h"
26 #ifndef ALI_MP_V_SEGMENTATION_H
27 # include "AliMpVSegmentation.h"
30 #ifndef ALI_MP_PLANE_TYPE_H
31 # include "AliMpPlaneType.h"
34 #include "AliMpContainers.h"
35 #include "AliMpExMap.h"
40 # include "TObjArray.h"
46 class AliMpMotifPosition;
50 class AliMpSlat : public TObject
57 typedef UInt_t Size_t;
61 AliMpSlat(const char* id, AliMpPlaneType bendingOrNonBending);
64 TVector2 Dimensions() const;
65 TVector2 Position() const { return fPosition; }
67 const char* GetName() const;
69 const char* GetID() const;
71 void Add(AliMpPCB* pcbType, const TArrayI& manuList);
76 /// Find the PCB containing the pad at location (ix,any iy).
77 AliMpPCB* FindPCB(Int_t ix) const;
79 /** Find the index of the PCB containing the pad at location ix.
80 Should not be needed except to comply with Sector(), Dpx(), Dpy()
81 interface of old AliMUONVGeometrySegmentation.
82 FIXME: Remove me when VGeometrySegmentation dies at last.
84 Int_t FindPCBIndex(Int_t ix) const;
86 /// Find the PCB containing location (x,y).
87 AliMpPCB* FindPCB(Double_t x, Double_t y) const;
89 /** Find the index of the PCB containing the pad at location (x,y).
90 Should not be needed except to comply with Sector(), Dpx(), Dpy()
91 interface of old AliMUONVGeometrySegmentation.
92 FIXME: Remove me when VGeometrySegmentation dies at last.
94 Int_t FindPCBIndex(Double_t x, Double_t y) const;
96 /// Returns the i-th PCB of this slat.
97 AliMpPCB* GetPCB(Size_t i) const;
99 /// Returns the MotifPosition containing location (x,y).
100 AliMpMotifPosition* FindMotifPosition(Double_t x, Double_t y) const;
102 /// Returns the MotifPosition which id is manuid.
103 AliMpMotifPosition* FindMotifPosition(Int_t manuid) const;
105 /// Returns the MotifPosition containing the pad located at (ix,iy).
106 AliMpMotifPosition* FindMotifPosition(Int_t ix, Int_t iy) const;
108 /// Return the ids of the electronic cards (either manu or local board).
109 void GetAllMotifPositionsIDs(TArrayI& ecn) const;
111 /** Returns the max. number of pads in the x-direction contained in this slat.
112 This is a max only as for e.g. non-bending slats, the y-dimension depends
115 Int_t GetMaxNofPadsY() const;
117 /** Returns the max index useable in x-direction.
118 Note that this can be different from GetNofPadsX()-1 for rounded slats.
120 Int_t GetMaxPadIndexX() const;
122 /// Return the number of electronic cards (either manu or local board).
123 Int_t GetNofElectronicCards() const;
125 /// Returns the number of pads in the x-direction contained in this slat.
126 Int_t GetNofPadsX() const;
128 /// Returns the number of PCBs of this slat.
129 Size_t GetSize() const;
131 void Print(Option_t* option="") const;
133 /** This is normally only used by triggerSlats, as for ST345 slats,
134 the position is DX(),DY() simply.
136 void ForcePosition(const TVector2& pos);
138 AliMpPlaneType PlaneType() const { return fPlaneType; }
140 Int_t NofPads() const { return fNofPads; }
143 AliMpSlat(const AliMpSlat& rhs);
144 AliMpSlat& operator=(const AliMpSlat& rhs);
147 TString fId; // The name of this slat, e.g. 112233N
148 AliMpPlaneType fPlaneType; // Whether it's bending or non-bending plane
149 Double_t fDX; // Half-size in X (cm)
150 Double_t fDY; // Half-size in Y (cm)
151 Int_t fNofPadsX; // Actual number of pads in x direction
152 Int_t fMaxNofPadsY; // Maximum number of pads in y direction
153 mutable AliMpExMap fManuMap; // map of int to AliMpMotifPosition*
155 TObjArray fPCBs; // array of AliMpPCB*
157 std::vector<AliMpPCB*> fPCBs; // array of AliMpPCB*
159 TVector2 fPosition; // Position of the slat center.
160 Int_t fNofPads; // number of pads in this slat
162 ClassDef(AliMpSlat,2) // A slat for stations 3,4,5