1 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2 * See cxx source for full Copyright notice */
5 // $MpId: AliMpPCB.h,v 1.6 2006/03/17 16:42:28 ivana Exp $
9 /// \brief A PCB for station 3,4 or 5
11 /// Author: Laurent Aphecetche
28 #include "AliMpContainers.h"
31 # ifndef ROOT_TObjArray
32 # include "TObjArray.h"
38 class AliMpMotifPosition;
40 class AliMpMotifSpecial;
42 class AliMpPCB : public TObject
49 typedef UInt_t Size_t;
53 /** Ctor. The sizes are given in mm.
54 See full doc for the meaning of enveloppe parameters.
56 AliMpPCB(const char* id, Double_t padSizeX, Double_t padSizeY,
57 Double_t enveloppeSizeX, Double_t enveloppeSizeY);
59 AliMpPCB(const char* id, AliMpMotifSpecial* ms);
61 AliMpPCB(const AliMpPCB& o);
62 AliMpPCB& operator=(const AliMpPCB& o);
66 TObject* Clone(const char* newname="") const;
68 /** Duplicate this PCB. The copy has the manuids of its motifs changed
69 according to the manuid vector, and its x-offset according to ix
72 AliMpPCB* Clone(const TArrayI& manuids,
73 Int_t ixOffset, Double_t xOffset) const;
75 void Copy(TObject& o) const;
77 /** Add a motif to this PCB. (ix,iy) are the coordinates of one corner
78 of the motif, in pad-units. Which corner depends on the sign(s) of (ix,iy):
79 (ix>0,iy>0) : bottom-left corner
80 (ix<0,iy>0) : bottom-right corner
81 (ix<0,iy<0) : top-right corner
82 (ix>0,iy<0) : top-left corner.
84 void Add(AliMpMotifType* motifType, Int_t ix, Int_t iy);
86 void Print(Option_t* option = "") const;
88 Double_t ActiveDX() const;
89 Double_t ActiveDY() const;
97 Double_t Xmin() const;
98 Double_t Xmax() const;
100 Double_t ActiveXmin() const;
101 Double_t ActiveXmax() const;
103 Double_t Ymin() const;
104 Double_t Ymax() const;
106 Double_t PadSizeX() const;
107 Double_t PadSizeY() const;
109 /** Returns the i-th motifPosition of this PCB.
112 AliMpMotifPosition* GetMotifPosition(Size_t i) const;
114 /// Returns the motifPosition which contains the pad at (ix,iy).
115 AliMpMotifPosition* FindMotifPosition(Int_t ix, Int_t iy) const;
117 /// Returns the motifPosition which contains the pad at (x,y).
118 AliMpMotifPosition* FindMotifPosition(Double_t x, Double_t y) const;
120 /// The number of motifs, aka manus.
121 Size_t GetSize() const;
123 Int_t GetNofPadsX() const;
124 Int_t GetNofPadsY() const;
132 const char* GetID() const;
134 Int_t NofPads() const { return fNofPads; }
137 TString fId; // PCB name
138 Double_t fPadSizeX; // x-size of this PCB's pads (cm)
139 Double_t fPadSizeY; // y-size of this PCB's pads (cm)
140 Double_t fEnveloppeSizeX; // max x-size of this PCB (cm)
141 Double_t fEnveloppeSizeY; // max y-size of this PCB (cm)
142 Double_t fXoffset; // x-offset = x of first pad of this PCB (cm)
143 Double_t fActiveXmin; // min x of an actual pad in this PCB (cm)
144 Double_t fActiveXmax; // max x of an actual pad in this PCB (cm)
145 Int_t fIxmin; // min pad index in x
146 Int_t fIxmax; // max pad index in x
147 Int_t fIymin; // min pad index in y
148 Int_t fIymax; // max pad index in y
150 TObjArray fMotifs; // array of motifs
152 std::vector<AliMpMotifPosition*> fMotifs; // array of motifs
154 Int_t fNofPads; // number of pads in this PCB
156 ClassDef(AliMpPCB,2) // A PCB for Stations 3,4,5