]>
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: AliMpPCB.h,v 1.9 2006/05/24 13:58:24 ivana Exp $ |
dee1d5f1 | 6 | |
7 | /// \ingroup slat | |
8 | /// \class AliMpPCB | |
9 | /// \brief A PCB for station 3,4 or 5 | |
10 | /// | |
13985652 | 11 | // Author: Laurent Aphecetche |
dee1d5f1 | 12 | |
13 | #ifndef ALIMPPCB_H | |
14 | #define ALIMPPCB_H | |
15 | ||
2294822d | 16 | #ifndef ALI_MP_VPAD_ITERATOR_H |
17 | # include "AliMpVPadIterator.h" | |
dee1d5f1 | 18 | #endif |
19 | ||
2294822d | 20 | #ifndef ALI_MP_AREA_H |
21 | # include "AliMpArea.h" | |
dee1d5f1 | 22 | #endif |
23 | ||
dee1d5f1 | 24 | |
2294822d | 25 | #ifndef ROOT_TObject |
26 | # include "TObject.h" | |
27 | #endif | |
dee1d5f1 | 28 | |
2294822d | 29 | #ifndef ROOT_TString |
30 | # include "TString.h" | |
dee1d5f1 | 31 | #endif |
32 | ||
2294822d | 33 | #ifndef ROOT_TArraI |
34 | # include "TArrayI.h" | |
5f5c0c3d | 35 | #endif |
36 | ||
2294822d | 37 | #ifndef ROOT_TObjArray |
38 | # include "TObjArray.h" | |
f35ac2f6 | 39 | #endif |
40 | ||
41 | class AliMpSlatMotifMap; | |
dee1d5f1 | 42 | class AliMpMotifPosition; |
43 | class AliMpMotifType; | |
b7762666 | 44 | class AliMpMotifSpecial; |
dee1d5f1 | 45 | |
46 | class AliMpPCB : public TObject | |
47 | { | |
48 | public: | |
49 | ||
dee1d5f1 | 50 | AliMpPCB(); |
51 | /** Ctor. The sizes are given in mm. | |
85fec35d | 52 | See full doc for the meaning of enveloppe parameters. |
dee1d5f1 | 53 | */ |
f35ac2f6 | 54 | AliMpPCB(AliMpSlatMotifMap* motifMap, |
55 | const char* id, Double_t padSizeX, Double_t padSizeY, | |
56 | Double_t enveloppeSizeX, Double_t enveloppeSizeY); | |
b7762666 | 57 | |
58 | AliMpPCB(const char* id, AliMpMotifSpecial* ms); | |
59 | ||
84aac932 | 60 | AliMpPCB(const AliMpPCB& o); |
61 | AliMpPCB& operator=(const AliMpPCB& o); | |
dee1d5f1 | 62 | |
63 | virtual ~AliMpPCB(); | |
64 | ||
65 | TObject* Clone(const char* newname="") const; | |
66 | ||
67 | /** Duplicate this PCB. The copy has the manuids of its motifs changed | |
68 | according to the manuid vector, and its x-offset according to ix | |
69 | and x. | |
70 | */ | |
71 | AliMpPCB* Clone(const TArrayI& manuids, | |
72 | Int_t ixOffset, Double_t xOffset) const; | |
73 | ||
84aac932 | 74 | void Copy(TObject& o) const; |
dee1d5f1 | 75 | |
b7762666 | 76 | /** Add a motif to this PCB. (ix,iy) are the coordinates of one corner |
77 | of the motif, in pad-units. Which corner depends on the sign(s) of (ix,iy): | |
78 | (ix>0,iy>0) : bottom-left corner | |
79 | (ix<0,iy>0) : bottom-right corner | |
80 | (ix<0,iy<0) : top-right corner | |
81 | (ix>0,iy<0) : top-left corner. | |
82 | */ | |
dee1d5f1 | 83 | void Add(AliMpMotifType* motifType, Int_t ix, Int_t iy); |
84 | ||
f35ac2f6 | 85 | AliMpArea Area() const; |
86 | ||
dee1d5f1 | 87 | void Print(Option_t* option = "") const; |
88 | ||
5f5c0c3d | 89 | Bool_t HasMotifPositionID(Int_t manuId) const; |
90 | ||
dee1d5f1 | 91 | Double_t ActiveDX() const; |
92 | Double_t ActiveDY() const; | |
93 | ||
94 | Double_t DX() const; | |
95 | Double_t DY() const; | |
96 | ||
97 | Double_t X() const; | |
98 | Double_t Y() const; | |
99 | ||
100 | Double_t Xmin() const; | |
101 | Double_t Xmax() const; | |
102 | ||
103 | Double_t ActiveXmin() const; | |
104 | Double_t ActiveXmax() const; | |
105 | ||
106 | Double_t Ymin() const; | |
107 | Double_t Ymax() const; | |
108 | ||
109 | Double_t PadSizeX() const; | |
110 | Double_t PadSizeY() const; | |
111 | ||
112 | /** Returns the i-th motifPosition of this PCB. | |
113 | i : [0..GetSize()-1] | |
114 | */ | |
630711ed | 115 | AliMpMotifPosition* GetMotifPosition(Int_t i) const; |
dee1d5f1 | 116 | |
117 | /// Returns the motifPosition which contains the pad at (ix,iy). | |
118 | AliMpMotifPosition* FindMotifPosition(Int_t ix, Int_t iy) const; | |
119 | ||
120 | /// Returns the motifPosition which contains the pad at (x,y). | |
121 | AliMpMotifPosition* FindMotifPosition(Double_t x, Double_t y) const; | |
122 | ||
123 | /// The number of motifs, aka manus. | |
630711ed | 124 | Int_t GetSize() const; |
dee1d5f1 | 125 | |
126 | Int_t GetNofPadsX() const; | |
127 | Int_t GetNofPadsY() const; | |
128 | ||
129 | Int_t Ixmin() const; | |
130 | Int_t Ixmax() const; | |
b7762666 | 131 | |
132 | Int_t Iymin() const; | |
133 | Int_t Iymax() const; | |
134 | ||
dee1d5f1 | 135 | const char* GetID() const; |
136 | ||
71a2d3aa | 137 | /// Return the number of pads in this PCB |
efb408b3 | 138 | Int_t NofPads() const { return fNofPads; } |
139 | ||
71a2d3aa | 140 | /// Return the motif map |
f35ac2f6 | 141 | AliMpSlatMotifMap* MotifMap() const { return fMotifMap; } |
142 | ||
143 | void Save() const; | |
144 | ||
dee1d5f1 | 145 | private: |
829425a5 | 146 | TString fId; ///< PCB name |
147 | Double_t fPadSizeX; ///< x-size of this PCB's pads (cm) | |
148 | Double_t fPadSizeY; ///< y-size of this PCB's pads (cm) | |
149 | Double_t fEnveloppeSizeX; ///< max x-size of this PCB (cm) | |
71a2d3aa | 150 | Double_t fEnveloppeSizeY; ///< max y-size of this PCB (cm) |
829425a5 | 151 | Double_t fXoffset; ///< x-offset = x of first pad of this PCB (cm) |
152 | Double_t fActiveXmin; ///< min x of an actual pad in this PCB (cm) | |
153 | Double_t fActiveXmax; ///< max x of an actual pad in this PCB (cm) | |
154 | Int_t fIxmin; ///< min pad index in x | |
155 | Int_t fIxmax; ///< max pad index in x | |
156 | Int_t fIymin; ///< min pad index in y | |
157 | Int_t fIymax; ///< max pad index in y | |
f35ac2f6 | 158 | TObjArray fMotifPositions; ///< array of motifs |
829425a5 | 159 | Int_t fNofPads; ///< number of pads in this PCB |
f35ac2f6 | 160 | AliMpSlatMotifMap* fMotifMap; ///< to keep track of things to avoid duplications of motif and motiftypes, and get proper deletion |
efb408b3 | 161 | |
f35ac2f6 | 162 | ClassDef(AliMpPCB,3) // A PCB for Stations 3,4,5 |
dee1d5f1 | 163 | }; |
164 | ||
165 | #endif |