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.4 2005/09/19 19:01:09 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;
41 class AliMpPCB : public TObject
48 typedef UInt_t Size_t;
52 /** Ctor. The sizes are given in mm.
53 enveloppe is due to the fact that not all PCBs are "full" of pads,
54 e.g. the rounded or short ones miss some pads, but the enveloppe
55 is a virtual size that should be constant across the slats,
57 It's a usefull notion to compute e.g. slat center in a uniform way,
58 considering that a slat is N PCBs, of the same "virtual" size, that of
61 AliMpPCB(const char* id, Double_t padSizeX, Double_t padSizeY,
62 Double_t enveloppeSizeX, Double_t enveloppeSizeY);
63 AliMpPCB(const AliMpPCB&);
64 AliMpPCB& operator=(const AliMpPCB&);
68 TObject* Clone(const char* newname="") const;
70 /** Duplicate this PCB. The copy has the manuids of its motifs changed
71 according to the manuid vector, and its x-offset according to ix
74 AliMpPCB* Clone(const TArrayI& manuids,
75 Int_t ixOffset, Double_t xOffset) const;
77 void Copy(TObject&) const;
79 /** Add a motif to this PCB. (ix,iy) are the coordinates of the lower-left
80 of the motif, in pad-units, starting at 0,0 on the lower-left of the PCB.
82 void Add(AliMpMotifType* motifType, Int_t ix, Int_t iy);
84 void Print(Option_t* option = "") const;
86 Double_t ActiveDX() const;
87 Double_t ActiveDY() const;
95 Double_t Xmin() const;
96 Double_t Xmax() const;
98 Double_t ActiveXmin() const;
99 Double_t ActiveXmax() const;
101 Double_t Ymin() const;
102 Double_t Ymax() const;
104 Double_t PadSizeX() const;
105 Double_t PadSizeY() const;
107 /** Returns the i-th motifPosition of this PCB.
110 AliMpMotifPosition* GetMotifPosition(Size_t i) const;
112 /// Returns the motifPosition which contains the pad at (ix,iy).
113 AliMpMotifPosition* FindMotifPosition(Int_t ix, Int_t iy) const;
115 /// Returns the motifPosition which contains the pad at (x,y).
116 AliMpMotifPosition* FindMotifPosition(Double_t x, Double_t y) const;
118 /// The number of motifs, aka manus.
119 Size_t GetSize() const;
121 Int_t GetNofPadsX() const;
122 Int_t GetNofPadsY() const;
127 const char* GetID() const;
133 Double_t fEnveloppeSizeX;
134 Double_t fEnveloppeSizeY;
136 Double_t fActiveXmin;
137 Double_t fActiveXmax;
145 std::vector<AliMpMotifPosition*> fMotifs;
148 ClassDef(AliMpPCB,1) // A PCB for Stations 3,4,5