]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/mapping/AliMpSlat.h
Replacement of AliMpIntPair object with algoritmic
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpSlat.h
CommitLineData
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
19b51aad 16#ifndef ALI_MP_PAD_H
17# include "AliMpPad.h"
dee1d5f1 18#endif
19
20#ifndef ALI_MP_V_SEGMENTATION_H
19b51aad 21# include "AliMpVSegmentation.h"
dee1d5f1 22#endif
23
19b51aad 24#ifndef ALI_MP_PLANE_TYPE_H
25# include "AliMpPlaneType.h"
dee1d5f1 26#endif
27
2294822d 28#ifndef ALI_MP_EX_MAP_H
29 #include "AliMpExMap.h"
30#endif
dee1d5f1 31
2294822d 32#ifndef ROOT_TObject
33 #include <TObject.h>
34#endif
dee1d5f1 35
2294822d 36#ifndef ROOT_TString
37# include "TString.h"
38#endif
39
40#ifndef ROOT_TObjArray
dee1d5f1 41# include "TObjArray.h"
dee1d5f1 42#endif
43
2294822d 44class TArrayI;
45
46
dee1d5f1 47class AliMpMotifPosition;
48class AliMpPCB;
19b51aad 49class TArrayI;
dee1d5f1 50
51class AliMpSlat : public TObject
52{
53 public:
54
630711ed 55 AliMpSlat(TRootIOCtor* ioCtor);
cddd101e 56 AliMpSlat(const char* id, AliMp::PlaneType bendingOrNonBending);
dee1d5f1 57 virtual ~AliMpSlat();
58
59 TVector2 Dimensions() const;
71a2d3aa 60
61 /// Return position
efb408b3 62 TVector2 Position() const { return fPosition; }
19b51aad 63
64 const char* GetName() const;
65
dee1d5f1 66 const char* GetID() const;
67
d21dc4b0 68 void Add(const AliMpPCB& pcbType, const TArrayI& manuList);
dee1d5f1 69
70 Double_t DX() const;
71 Double_t DY() const;
72
73 /// Find the PCB containing the pad at location (ix,any iy).
74 AliMpPCB* FindPCB(Int_t ix) const;
75
db95e382 76 /// Find the index of the PCB containing the pad at location ix.
77 Int_t FindPCBIndex(Int_t ix) const;
78
79 /// Find the index of the PCB containing a given manu
80 Int_t FindPCBIndexByMotifPositionID(Int_t manuId) const;
81
dee1d5f1 82 /// Find the PCB containing location (x,y).
83 AliMpPCB* FindPCB(Double_t x, Double_t y) const;
84
db95e382 85 /// Find the index of the PCB containing the pad at location (x,y).
86 Int_t FindPCBIndex(Double_t x, Double_t y) const;
dee1d5f1 87
88 /// Returns the i-th PCB of this slat.
630711ed 89 AliMpPCB* GetPCB(Int_t i) const;
dee1d5f1 90
91 /// Returns the MotifPosition containing location (x,y).
92 AliMpMotifPosition* FindMotifPosition(Double_t x, Double_t y) const;
93
94 /// Returns the MotifPosition which id is manuid.
95 AliMpMotifPosition* FindMotifPosition(Int_t manuid) const;
96
97 /// Returns the MotifPosition containing the pad located at (ix,iy).
98 AliMpMotifPosition* FindMotifPosition(Int_t ix, Int_t iy) const;
99
19b51aad 100 /// Return the ids of the electronic cards (either manu or local board).
c9da0af9 101 void GetAllMotifPositionsIDs(TArrayI& ecn) const;
19b51aad 102
103 /** Returns the max. number of pads in the x-direction contained in this slat.
104 This is a max only as for e.g. non-bending slats, the y-dimension depends
105 on the x-position.
106 */
107 Int_t GetMaxNofPadsY() const;
108
16e8fffd 109 /** Returns the max index useable in x-direction.
110 Note that this can be different from GetNofPadsX()-1 for rounded slats.
111 */
112 Int_t GetMaxPadIndexX() const;
113
19b51aad 114 /// Return the number of electronic cards (either manu or local board).
115 Int_t GetNofElectronicCards() const;
116
dee1d5f1 117 /// Returns the number of pads in the x-direction contained in this slat.
118 Int_t GetNofPadsX() const;
119
19b51aad 120 /// Returns the number of PCBs of this slat.
630711ed 121 Int_t GetSize() const;
19b51aad 122
dee1d5f1 123 void Print(Option_t* option="") const;
124
19b51aad 125 /** This is normally only used by triggerSlats, as for ST345 slats,
126 the position is DX(),DY() simply.
127 */
128 void ForcePosition(const TVector2& pos);
129
71a2d3aa 130 /// Return the plane type
cddd101e 131 AliMp::PlaneType PlaneType() const { return fPlaneType; }
efb408b3 132
71a2d3aa 133 /// Return the number of pads in this slat
efb408b3 134 Int_t NofPads() const { return fNofPads; }
135
13e7956b 136 private:
630711ed 137 /// Not implemented
138 AliMpSlat();
71a2d3aa 139 /// Not implemented
efb408b3 140 AliMpSlat(const AliMpSlat& rhs);
71a2d3aa 141 /// Not implemented
efb408b3 142 AliMpSlat& operator=(const AliMpSlat& rhs);
13e7956b 143
829425a5 144 TString fId; ///< The name of this slat, e.g. 112233N
cddd101e 145 AliMp::PlaneType fPlaneType; ///< Whether it's bending or non-bending plane
829425a5 146 Double_t fDX; ///< Half-size in X (cm)
147 Double_t fDY; ///< Half-size in Y (cm)
148 Int_t fNofPadsX; ///< Actual number of pads in x direction
149 Int_t fMaxNofPadsY; ///< Maximum number of pads in y direction
150 mutable AliMpExMap fManuMap; ///< map of int to AliMpMotifPosition*
829425a5 151 TObjArray fPCBs; ///< array of AliMpPCB*
829425a5 152 TVector2 fPosition; ///< Position of the slat center.
153 Int_t fNofPads; ///< number of pads in this slat
dee1d5f1 154
efb408b3 155 ClassDef(AliMpSlat,2) // A slat for stations 3,4,5
dee1d5f1 156};
157
158#endif