]>
Commit | Line | Data |
---|---|---|
dee1d5f1 | 1 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * |
2 | * See cxx source for full Copyright notice */ | |
3 | ||
4 | // $Id$ | |
13985652 | 5 | // $MpId: AliMpSlat.h,v 1.8 2006/05/24 13:58:24 ivana Exp $ |
dee1d5f1 | 6 | |
7 | /// \ingroup slat | |
8 | /// \class AliMpSlat | |
9 | /// \brief A slat (building block of stations 3, 4 and 5) | |
10 | /// | |
13985652 | 11 | // Author: Laurent Aphecetche |
dee1d5f1 | 12 | |
13 | #ifndef ALI_MP_SLAT_H | |
14 | #define ALI_MP_SLAT_H | |
15 | ||
16 | #include <TObject.h> | |
17 | ||
18 | #ifndef ROOT_TString | |
19b51aad | 19 | # include "TString.h" |
20 | #endif | |
21 | ||
22 | #ifndef ALI_MP_PAD_H | |
23 | # include "AliMpPad.h" | |
dee1d5f1 | 24 | #endif |
25 | ||
26 | #ifndef ALI_MP_V_SEGMENTATION_H | |
19b51aad | 27 | # include "AliMpVSegmentation.h" |
dee1d5f1 | 28 | #endif |
29 | ||
19b51aad | 30 | #ifndef ALI_MP_PLANE_TYPE_H |
31 | # include "AliMpPlaneType.h" | |
dee1d5f1 | 32 | #endif |
33 | ||
34 | #include "AliMpContainers.h" | |
0f60374b | 35 | #include "AliMpExMap.h" |
dee1d5f1 | 36 | |
37 | class TArrayI; | |
38 | ||
39 | #ifdef WITH_ROOT | |
dee1d5f1 | 40 | # include "TObjArray.h" |
41 | #else | |
42 | # include <vector> | |
0f60374b | 43 | //# include <map> |
dee1d5f1 | 44 | #endif |
45 | ||
46 | class AliMpMotifPosition; | |
47 | class AliMpPCB; | |
19b51aad | 48 | class TArrayI; |
dee1d5f1 | 49 | |
50 | class AliMpSlat : public TObject | |
51 | { | |
52 | public: | |
53 | ||
54 | #ifdef WITH_ROOT | |
71a2d3aa | 55 | /// Type def for the array size |
dee1d5f1 | 56 | typedef Int_t Size_t; |
57 | #else | |
71a2d3aa | 58 | /// Type def for the array size |
dee1d5f1 | 59 | typedef UInt_t Size_t; |
60 | #endif | |
61 | ||
62 | AliMpSlat(); | |
cddd101e | 63 | AliMpSlat(const char* id, AliMp::PlaneType bendingOrNonBending); |
dee1d5f1 | 64 | virtual ~AliMpSlat(); |
65 | ||
66 | TVector2 Dimensions() const; | |
71a2d3aa | 67 | |
68 | /// Return position | |
efb408b3 | 69 | TVector2 Position() const { return fPosition; } |
19b51aad | 70 | |
71 | const char* GetName() const; | |
72 | ||
dee1d5f1 | 73 | const char* GetID() const; |
74 | ||
d21dc4b0 | 75 | void Add(const AliMpPCB& pcbType, const TArrayI& manuList); |
dee1d5f1 | 76 | |
77 | Double_t DX() const; | |
78 | Double_t DY() const; | |
79 | ||
80 | /// Find the PCB containing the pad at location (ix,any iy). | |
81 | AliMpPCB* FindPCB(Int_t ix) const; | |
82 | ||
83 | /** Find the index of the PCB containing the pad at location ix. | |
84 | Should not be needed except to comply with Sector(), Dpx(), Dpy() | |
85 | interface of old AliMUONVGeometrySegmentation. | |
86 | FIXME: Remove me when VGeometrySegmentation dies at last. | |
87 | */ | |
88 | Int_t FindPCBIndex(Int_t ix) const; | |
89 | ||
90 | /// Find the PCB containing location (x,y). | |
91 | AliMpPCB* FindPCB(Double_t x, Double_t y) const; | |
92 | ||
62abf021 | 93 | /// Find the index of the PCB containing the pad at location (x,y). |
dee1d5f1 | 94 | Int_t FindPCBIndex(Double_t x, Double_t y) const; |
95 | ||
96 | /// Returns the i-th PCB of this slat. | |
97 | AliMpPCB* GetPCB(Size_t i) const; | |
98 | ||
99 | /// Returns the MotifPosition containing location (x,y). | |
100 | AliMpMotifPosition* FindMotifPosition(Double_t x, Double_t y) const; | |
101 | ||
102 | /// Returns the MotifPosition which id is manuid. | |
103 | AliMpMotifPosition* FindMotifPosition(Int_t manuid) const; | |
104 | ||
105 | /// Returns the MotifPosition containing the pad located at (ix,iy). | |
106 | AliMpMotifPosition* FindMotifPosition(Int_t ix, Int_t iy) const; | |
107 | ||
19b51aad | 108 | /// Return the ids of the electronic cards (either manu or local board). |
c9da0af9 | 109 | void GetAllMotifPositionsIDs(TArrayI& ecn) const; |
19b51aad | 110 | |
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 | |
113 | on the x-position. | |
114 | */ | |
115 | Int_t GetMaxNofPadsY() const; | |
116 | ||
16e8fffd | 117 | /** Returns the max index useable in x-direction. |
118 | Note that this can be different from GetNofPadsX()-1 for rounded slats. | |
119 | */ | |
120 | Int_t GetMaxPadIndexX() const; | |
121 | ||
19b51aad | 122 | /// Return the number of electronic cards (either manu or local board). |
123 | Int_t GetNofElectronicCards() const; | |
124 | ||
dee1d5f1 | 125 | /// Returns the number of pads in the x-direction contained in this slat. |
126 | Int_t GetNofPadsX() const; | |
127 | ||
19b51aad | 128 | /// Returns the number of PCBs of this slat. |
129 | Size_t GetSize() const; | |
130 | ||
dee1d5f1 | 131 | void Print(Option_t* option="") const; |
132 | ||
19b51aad | 133 | /** This is normally only used by triggerSlats, as for ST345 slats, |
134 | the position is DX(),DY() simply. | |
135 | */ | |
136 | void ForcePosition(const TVector2& pos); | |
137 | ||
71a2d3aa | 138 | /// Return the plane type |
cddd101e | 139 | AliMp::PlaneType PlaneType() const { return fPlaneType; } |
efb408b3 | 140 | |
71a2d3aa | 141 | /// Return the number of pads in this slat |
efb408b3 | 142 | Int_t NofPads() const { return fNofPads; } |
143 | ||
13e7956b | 144 | private: |
71a2d3aa | 145 | /// Not implemented |
efb408b3 | 146 | AliMpSlat(const AliMpSlat& rhs); |
71a2d3aa | 147 | /// Not implemented |
efb408b3 | 148 | AliMpSlat& operator=(const AliMpSlat& rhs); |
13e7956b | 149 | |
829425a5 | 150 | TString fId; ///< The name of this slat, e.g. 112233N |
cddd101e | 151 | AliMp::PlaneType fPlaneType; ///< Whether it's bending or non-bending plane |
829425a5 | 152 | Double_t fDX; ///< Half-size in X (cm) |
153 | Double_t fDY; ///< Half-size in Y (cm) | |
154 | Int_t fNofPadsX; ///< Actual number of pads in x direction | |
155 | Int_t fMaxNofPadsY; ///< Maximum number of pads in y direction | |
156 | mutable AliMpExMap fManuMap; ///< map of int to AliMpMotifPosition* | |
dee1d5f1 | 157 | #ifdef WITH_ROOT |
829425a5 | 158 | TObjArray fPCBs; ///< array of AliMpPCB* |
dee1d5f1 | 159 | #else |
829425a5 | 160 | std::vector<AliMpPCB*> fPCBs; ///< array of AliMpPCB* |
dee1d5f1 | 161 | #endif |
829425a5 | 162 | TVector2 fPosition; ///< Position of the slat center. |
163 | Int_t fNofPads; ///< number of pads in this slat | |
dee1d5f1 | 164 | |
efb408b3 | 165 | ClassDef(AliMpSlat,2) // A slat for stations 3,4,5 |
dee1d5f1 | 166 | }; |
167 | ||
168 | #endif |