1 #ifndef ALIMUONST345SLATSEGMENTATION_H
2 #define ALIMUONST345SLATSEGMENTATION_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
10 /// \class AliMUONSt345SlatSegmentation
11 /// \brief Segmentation for slat modules
13 #ifndef ALIMUONVGEOMETRYDESEGMENTATION_H
14 #include "AliMUONVGeometryDESegmentation.h"
17 #ifndef ALI_MP_PLANE_TYPE_H
18 #include "AliMpPlaneType.h"
26 class AliMpSlatSegmentation;
27 class AliMpVPadIterator;
29 class AliMUONSt345SlatSegmentation : public AliMUONVGeometryDESegmentation
33 AliMUONSt345SlatSegmentation();
34 AliMUONSt345SlatSegmentation(AliMpVSegmentation* segmentation,
36 AliMp::PlaneType bendingOrNonBending);
37 virtual ~AliMUONSt345SlatSegmentation();
39 void FirstPad(Float_t xhit, Float_t yhit, Float_t zhit,
40 Float_t dx, Float_t dy);
50 Float_t Distance2AndOffset(Int_t ix, Int_t iy,
54 void GetNParallelAndOffset(Int_t iX, Int_t iY,
55 Int_t* Nparallel, Int_t* Offset);
57 void Neighbours(Int_t iX, Int_t iY, Int_t* Nlist,
58 Int_t Xlist[10], Int_t Ylist[10]);
60 Int_t Sector(Int_t ix, Int_t iy);
61 Int_t Sector(Float_t x, Float_t y);
63 void IntegrationLimits(Float_t& x1, Float_t& x2,
64 Float_t& y1, Float_t& y2);
66 void GiveTestPoints(Int_t& n, Float_t* x, Float_t* y) const;
68 Int_t SigGenCond(Float_t x, Float_t y, Float_t z);
69 void SigGenInit(Float_t x, Float_t y, Float_t z);
71 void SetCorrFunc(Int_t isec, TF1* func);
73 TF1* CorrFunc(Int_t isec) const;
75 void SetPadSize(float x,float y);
77 void SetDAnod(float d);
79 void Init(int /*chamber*/) {} ///< Not implemented
80 void Draw(Option_t* opt = "");
85 Float_t Dpx(int ipcb) const;
86 Float_t Dpy(int ipcb) const;
88 Float_t GetAnod(Float_t xhit) const;
93 /// Sets the current pad.
94 void SetPad(Int_t ix,Int_t iy);
96 /// Sets the current hit.
97 void SetHit(Float_t x, Float_t y, Float_t zIsNotUsed);
99 AliMUONGeometryDirection GetDirection();// { return kDirUndefined; }
101 const AliMpVSegmentation* GetMpSegmentation() const;
103 /// \deprecated. Use the one below w/o z instead.
104 void GetPadC(Int_t ix, Int_t iy, Float_t& x, Float_t& y, Float_t& z);
106 /// From pad indices to coordinates (cm).
107 void GetPadC(Int_t ix, Int_t iy, Float_t& x, Float_t& y);
109 // Transform from pad to real coordinates
110 void GetPadI(Float_t x ,Float_t y ,Int_t &ix,Int_t &iy);
112 // to be deprecated. Use the one above w/o z instead.
113 void GetPadI(Float_t x, Float_t y , Float_t z, Int_t &ix, Int_t &iy);
116 /// Whether a pad exists at a given position.
117 Bool_t HasPad(Float_t x, Float_t y, Float_t z);
119 /// Whether a pad exists, given its indices.
120 Bool_t HasPad(Int_t ix, Int_t iy);
123 void Print(Option_t* opt = "") const;
127 AliMUONSt345SlatSegmentation(const AliMUONSt345SlatSegmentation& right);
129 AliMUONSt345SlatSegmentation& operator = (const AliMUONSt345SlatSegmentation& right);
133 Int_t fDetElemId; ///< det element Id
134 AliMp::PlaneType fPlaneType; ///< plane type
135 const AliMpSlat* fSlat; ///< slat
136 AliMpSlatSegmentation* fSlatSegmentation; ///< slat segmentation
137 AliMpVPadIterator* fPadIterator; //!< pad iterator
138 AliMpPad fCurrentPad; //!< FIXME: should not be needed, if we externalise the SetPad, SetHit, IntegrationLimits methods which have nothing to do here anyway, together with the iteration methods FirstPad, NextPad, MorePads, which have nothing to do here either.
139 Float_t fXhit; //!< x-position of hit
140 Float_t fYhit; //!< y-position of hit
141 ClassDef(AliMUONSt345SlatSegmentation,4) // St345 segmentation