]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONSt345SlatSegmentation.h
Removing semaphore .done files.
[u/mrichter/AliRoot.git] / MUON / AliMUONSt345SlatSegmentation.h
CommitLineData
cc4dcfb0 1#ifndef ALIMUONST345SLATSEGMENTATION_H
2#define ALIMUONST345SLATSEGMENTATION_H
ec4831c6 3
cc4dcfb0 4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6
f64ec237 7/* $Id$ */
cc4dcfb0 8
692de412 9/// \ingroup base
10/// \class AliMUONSt345SlatSegmentation
11/// \brief Segmentation for slat modules
cc4dcfb0 12
ec4831c6 13#ifndef ALIMUONVGEOMETRYDESEGMENTATION_H
14#include "AliMUONVGeometryDESegmentation.h"
15#endif
cc4dcfb0 16
ec4831c6 17#ifndef ALI_MP_PLANE_TYPE_H
18#include "AliMpPlaneType.h"
19#endif
20
21#ifndef ALI_MP_PAD_H
22#include "AliMpPad.h"
23#endif
9db6c8d7 24
ec4831c6 25class AliMpSlat;
26class AliMpSlatSegmentation;
27class AliMpVPadIterator;
cc4dcfb0 28
ec4831c6 29class AliMUONSt345SlatSegmentation : public AliMUONVGeometryDESegmentation
cc4dcfb0 30{
31 public:
ec4831c6 32
33 AliMUONSt345SlatSegmentation();
34 AliMUONSt345SlatSegmentation(AliMpVSegmentation* segmentation,
35 Int_t detElemId,
36 AliMpPlaneType bendingOrNonBending);
37 virtual ~AliMUONSt345SlatSegmentation();
38
39 void FirstPad(Float_t xhit, Float_t yhit, Float_t zhit,
40 Float_t dx, Float_t dy);
41
42 void NextPad();
43
44 Int_t MorePads();
45
46 Int_t Ix();
47 Int_t Iy();
48 Int_t ISector();
49
50 Float_t Distance2AndOffset(Int_t ix, Int_t iy,
51 Float_t X, Float_t Y,
52 Int_t* dummy);
53
54 void GetNParallelAndOffset(Int_t iX, Int_t iY,
55 Int_t* Nparallel, Int_t* Offset);
56
57 void Neighbours(Int_t iX, Int_t iY, Int_t* Nlist,
58 Int_t Xlist[10], Int_t Ylist[10]);
59
60 Int_t Sector(Int_t ix, Int_t iy);
61 Int_t Sector(Float_t x, Float_t y);
62
63 void IntegrationLimits(Float_t& x1, Float_t& x2,
64 Float_t& y1, Float_t& y2);
65
66 void GiveTestPoints(Int_t& n, Float_t* x, Float_t* y) const;
67
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);
70
71 void SetCorrFunc(Int_t isec, TF1* func);
72
73 TF1* CorrFunc(Int_t isec) const;
74
75 void SetPadSize(float x,float y);
76
77 void SetDAnod(float d);
78
79 void Init(int /*chamber*/) {} ///< Not implemented
80 void Draw(Option_t* opt = "");
81
82 Float_t Dpx() const;
83 Float_t Dpy() const;
cc4dcfb0 84
ec4831c6 85 Float_t Dpx(int ipcb) const;
86 Float_t Dpy(int ipcb) const;
87
88 Float_t GetAnod(Float_t xhit) const;
89
90 Int_t Npx() const;
91 Int_t Npy() const;
92
93 /// Sets the current pad.
94 void SetPad(Int_t ix,Int_t iy);
95
96 /// Sets the current hit.
97 void SetHit(Float_t x, Float_t y, Float_t zIsNotUsed);
cc4dcfb0 98
ec4831c6 99 AliMUONGeometryDirection GetDirection();// { return kDirUndefined; }
cc4dcfb0 100
ec4831c6 101 const AliMpVSegmentation* GetMpSegmentation() const;
cc4dcfb0 102
ec4831c6 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);
f1501d74 105
ec4831c6 106 /// From pad indices to coordinates (cm).
107 void GetPadC(Int_t ix, Int_t iy, Float_t& x, Float_t& y);
cc4dcfb0 108
ec4831c6 109 // Transform from pad to real coordinates
110 void GetPadI(Float_t x ,Float_t y ,Int_t &ix,Int_t &iy);
cc4dcfb0 111
ec4831c6 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);
cc4dcfb0 114
115
ec4831c6 116 /// Whether a pad exists at a given position.
117 Bool_t HasPad(Float_t x, Float_t y, Float_t z);
cc4dcfb0 118
ec4831c6 119 /// Whether a pad exists, given its indices.
120 Bool_t HasPad(Int_t ix, Int_t iy);
121
122 /// Print.
123 void Print(Option_t* opt = "") const;
cc4dcfb0 124
ec4831c6 125 protected:
126 AliMUONSt345SlatSegmentation(const AliMUONSt345SlatSegmentation& right);
127 AliMUONSt345SlatSegmentation& operator = (const AliMUONSt345SlatSegmentation& right);
128
129 private:
130
131 Int_t fDetElemId; ///< det element Id
132 AliMpPlaneType fPlaneType; ///< plane type
133 const AliMpSlat* fSlat; ///< slat
134 AliMpSlatSegmentation* fSlatSegmentation; ///< slat segmentation
135 AliMpVPadIterator* fPadIterator; //!< pad iterator
136 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.
137 Float_t fXhit; //!< x-position of hit
138 Float_t fYhit; //!< y-position of hit
139 ClassDef(AliMUONSt345SlatSegmentation,4) // St345 segmentation
140};
141
142#endif