1 #ifndef ALI_MUON_ST1_SEGMENTATION_H
2 #define ALI_MUON_ST1_SEGMENTATION_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
9 // Authors: David Guez, Ivana Hrivnacova, Marion MacCormick; IPN Orsay
11 // Class AliMUONSt1Segmentation
12 // -----------------------------
13 // Segmentation for MUON station 1 using the external
17 #include "AliMpPlaneType.h"
19 #include "AliSegmentation.h"
24 class AliMpPlaneSegmentation;
25 class AliMpVPadIterator;
29 class AliMUONSt1Segmentation : public AliSegmentation
32 AliMUONSt1Segmentation(const AliMpPlaneType planeType);
33 AliMUONSt1Segmentation(const AliMUONSt1Segmentation& rhs);
34 AliMUONSt1Segmentation();
36 virtual ~AliMUONSt1Segmentation();
39 // methods derived from base class
42 // Set Chamber Segmentation Parameters
44 virtual void SetPadSize(Float_t p1, Float_t p2);
46 virtual void SetDAnod(Float_t D);
49 // Transform from pad (wire) to real coordinates and vice versa
51 virtual Float_t GetAnod(Float_t xhit) const;
52 // Anode wire coordinate closest to xhit
53 virtual void GetPadI(Float_t x, Float_t y, Float_t z, Int_t& ix, Int_t& iy);
54 virtual void GetPadI(Float_t x, Float_t y , Int_t &ix, Int_t &iy) ;
55 // Transform from pad to real coordinates
56 virtual void GetPadC(Int_t ix, Int_t iy, Float_t& x, Float_t& y, Float_t& z);
57 virtual void GetPadC(Int_t ix, Int_t iy, Float_t& x, Float_t& y);
58 // Transform from real to pad coordinates
63 virtual void Init(Int_t chamber);
67 virtual Float_t Dpx() const;
68 virtual Float_t Dpy() const;
70 virtual Float_t Dpx(Int_t) const;
71 virtual Float_t Dpy(Int_t) const;
72 // Pad size in x, y by Sector
73 virtual Int_t Npx() const;
74 virtual Int_t Npy() const;
75 // Maximum number of Pads in y
77 virtual void SetPad(Int_t, Int_t);
79 virtual void SetHit(Float_t, Float_t, Float_t);
84 virtual void FirstPad(Float_t xhit, Float_t yhit, Float_t zhit,
85 Float_t dx, Float_t dy);
86 virtual void NextPad();
87 virtual Int_t MorePads();
89 virtual Float_t Distance2AndOffset(Int_t iX, Int_t iY,
90 Float_t X, Float_t Y, Int_t* dummy) ;
91 // Distance between 1 pad and a position
92 virtual void GetNParallelAndOffset(Int_t iX, Int_t iY,
93 Int_t* Nparallel, Int_t* Offset);
94 // Number of pads read in parallel and offset to add to x
95 // (specific to LYON, but mandatory for display)
96 virtual void Neighbours(Int_t iX, Int_t iY,
97 Int_t* Nlist, Int_t Xlist[10], Int_t Ylist[10]);
98 // Get next neighbours
104 // Current pad cursor during disintegration
106 virtual Int_t ISector();
109 virtual Int_t Sector(Int_t ix, Int_t iy);
110 virtual Int_t Sector(Float_t x, Float_t y);
111 // calculate sector from pad coordinates
113 virtual void IntegrationLimits(Float_t& x1, Float_t& x2,
114 Float_t& y1, Float_t& y2);
115 // Current integration limits
119 virtual Int_t SigGenCond(Float_t x, Float_t y, Float_t z);
120 // Signal Generation Condition during Stepping
121 virtual void SigGenInit(Float_t x, Float_t y, Float_t z);
122 // Initialise signal generation at coord (x,y,z)
125 virtual void GiveTestPoints(Int_t& n, Float_t* x, Float_t* y) const;
126 // Test points for auto calibration
127 virtual void Draw(const char *opt = "") const;
128 // Draw the segmentation zones
130 // Function for systematic corrections
132 virtual void SetCorrFunc(Int_t, TF1*);
133 // Set the correction function
134 virtual TF1* CorrFunc(Int_t) const;
135 // Get the correction Function
139 AliMUONSt1Segmentation& operator=(const AliMUONSt1Segmentation & rhs);
142 void UpdateCurrentPadValues(const AliMpPad& pad);
145 static const Float_t fgkWireD; // default wire pitch
146 static const Float_t fgkLengthUnit;// conversion between length units
147 // from mapping (mm) to AliRoot (cm)
153 AliMpPlane* fPlane; // plane (from mapping)
154 AliMpPlaneSegmentation* fPlaneSegmentation;// plane segmantation (from mapping)
155 AliMpVPadIterator* fPlaneIterator; // ! iterator over pads
159 Float_t fWireD; // wire pitch
160 // (smaller distance between anode wires)
162 // Reference to mother chamber
164 AliMUONChamber* fChamber; // ! Reference to mother chamber
165 Int_t fId; // Identifier
166 Float_t fRmin; // inner radius
167 Float_t fRmax; // outer radius
168 Float_t fZ; // z-position of chamber
170 // Current pad during integration (cursor for disintegration)
172 Int_t fIx; // ! pad coord. x
173 Int_t fIy; // ! pad coord. y
174 Float_t fX; // ! real coord. x
175 Float_t fY; // ! real ccord. y
176 Int_t fSector; // ! Current sector
178 // Current pad and wire during tracking (cursor at hit centre)
180 Float_t fXhit; // ! x-position of hit
181 Float_t fYhit; // ! y-position of hit
183 // Reference point to define signal generation condition
185 Int_t fIxt; // ! pad coord. x
186 Int_t fIyt; // ! pad coord. y
187 Int_t fIwt; // ! wire number
191 TObjArray* fCorrA; // ! Array of correction functions
193 ClassDef(AliMUONSt1Segmentation,1) // Station1 segmentation
196 #endif //ALI_MUON_ST1_SEGMENTATION_H