1 #ifndef ALI_MUON_ST12_QUADRANT_SEGMENTATION_H
2 #define ALI_MUON_ST12_QUADRANT_SEGMENTATION_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
8 // Revision of includes 07/05/2004
11 /// \class AliMUONSt12QuadrantSegmentation
12 /// \brief Segmentation for MUON quadrants of stations 1 and 2
14 // Class AliMUONSt12QuadrantSegmentation
15 // -------------------------------------
16 // Segmentation for MUON quadrants of stations 1 and 2 using
17 // the mapping package
19 // Author: Ivana Hrivnacova, IPN Orsay
21 #include "AliMpStationType.h"
22 #include "AliMpPlaneType.h"
24 #include "AliMUONVGeometryDESegmentation.h"
29 class AliMpSectorSegmentation;
30 class AliMpVPadIterator;
35 class AliMUONSt12QuadrantSegmentation : public AliMUONVGeometryDESegmentation
38 AliMUONSt12QuadrantSegmentation(AliMpVSegmentation* segmentation,
39 AliMpStationType stationType,
40 AliMpPlaneType planeType);
41 AliMUONSt12QuadrantSegmentation();
43 virtual ~AliMUONSt12QuadrantSegmentation();
46 // methods derived from base class
49 // Set Chamber Segmentation Parameters
51 virtual void SetPadSize(Float_t p1, Float_t p2);
53 virtual void SetDAnod(Float_t D);
56 // Check if pad exists
58 virtual Bool_t HasPad(Float_t x, Float_t y, Float_t z);
59 // Returns true if a pad exists in the given position
60 virtual Bool_t HasPad(Int_t ix, Int_t iy);
61 // Returns true if a pad with given indices exists
65 virtual AliMUONGeometryDirection GetDirection();
66 // Returns the direction with a constant pad size
68 virtual const AliMpVSegmentation* GetMpSegmentation() const;
70 // Transform from pad (wire) to real coordinates and vice versa
72 virtual Float_t GetAnod(Float_t xhit) const;
73 // Anode wire coordinate closest to xhit
74 virtual void GetPadI(Float_t x, Float_t y, Float_t z, Int_t& ix, Int_t& iy);
75 virtual void GetPadI(Float_t x, Float_t y , Int_t &ix, Int_t &iy) ;
76 // Transform from pad to real coordinates
77 virtual void GetPadC(Int_t ix, Int_t iy, Float_t& x, Float_t& y, Float_t& z);
78 virtual void GetPadC(Int_t ix, Int_t iy, Float_t& x, Float_t& y);
79 // Transform from real to pad coordinates
83 virtual void Init(Int_t chamber);
87 virtual Float_t Dpx() const;
88 virtual Float_t Dpy() const;
90 virtual Float_t Dpx(Int_t isector) const;
91 virtual Float_t Dpy(Int_t isector) const;
92 // Pad size in x, y by Sector
93 virtual Int_t Npx() const;
94 virtual Int_t Npy() const;
95 // Maximum number of Pads in y
97 virtual void SetPad(Int_t ix, Int_t iy);
99 virtual void SetHit(Float_t xhit, Float_t yhit, Float_t zhit);
104 virtual void FirstPad(Float_t xhit, Float_t yhit, Float_t zhit,
105 Float_t dx, Float_t dy);
106 virtual void NextPad();
107 virtual Int_t MorePads();
109 virtual Float_t Distance2AndOffset(Int_t iX, Int_t iY,
110 Float_t X, Float_t Y, Int_t* dummy) ;
111 // Distance between 1 pad and a position
112 virtual void GetNParallelAndOffset(Int_t iX, Int_t iY,
113 Int_t* Nparallel, Int_t* Offset);
114 // Number of pads read in parallel and offset to add to x
115 // (specific to LYON, but mandatory for display)
116 virtual void Neighbours(Int_t iX, Int_t iY,
117 Int_t* Nlist, Int_t Xlist[10], Int_t Ylist[10]);
118 // Get next neighbours
124 // Current pad cursor during disintegration
126 virtual Int_t ISector();
129 virtual Int_t Sector(Int_t ix, Int_t iy);
130 virtual Int_t Sector(Float_t x, Float_t y);
131 // calculate sector from pad coordinates
133 virtual void IntegrationLimits(Float_t& x1, Float_t& x2,
134 Float_t& y1, Float_t& y2);
135 // Current integration limits
139 virtual Int_t SigGenCond(Float_t x, Float_t y, Float_t z);
140 // Signal Generation Condition during Stepping
141 virtual void SigGenInit(Float_t x, Float_t y, Float_t z);
142 // Initialise signal generation at coord (x,y,z)
145 virtual void GiveTestPoints(Int_t& n, Float_t* x, Float_t* y) const;
146 // Test points for auto calibration
147 virtual void Draw(const char *opt = "");
148 // Draw the segmentation zones
150 // Function for systematic corrections
152 virtual void SetCorrFunc(Int_t isec, TF1* func);
153 // Set the correction function
154 virtual TF1* CorrFunc(Int_t isec) const;
155 // Get the correction Function
158 AliMUONSt12QuadrantSegmentation(const AliMUONSt12QuadrantSegmentation& rhs);
161 AliMUONSt12QuadrantSegmentation& operator=(const AliMUONSt12QuadrantSegmentation & rhs);
165 void UpdateCurrentPadValues(const AliMpPad& pad);
171 AliMpStationType fStationType; // station type
172 AliMpPlaneType fPlaneType; // plane type
173 const AliMpSector* fSector; // sector (from mapping)
174 AliMpSectorSegmentation* fSectorSegmentation;// sector segmentation (from mapping)
175 AliMpVPadIterator* fSectorIterator; // ! iterator over pads
179 Float_t fWireD; // wire pitch
180 // (smaller distance between anode wires)
182 // Reference to mother chamber
184 AliMUONChamber* fChamber; // ! Reference to mother chamber
185 Int_t fId; // Identifier
186 Float_t fRmin; // inner radius
187 Float_t fRmax; // outer radius
188 Float_t fZ; // z-position of chamber
190 // Current pad during integration (cursor for disintegration)
192 Int_t fIx; // ! pad coord. x
193 Int_t fIy; // ! pad coord. y
194 Float_t fX; // ! real coord. x
195 Float_t fY; // ! real ccord. y
196 Int_t fZone; // ! Current zone (sector in AliSegmentation naming)
198 // Current pad and wire during tracking (cursor at hit centre)
200 Float_t fXhit; // ! x-position of hit
201 Float_t fYhit; // ! y-position of hit
203 // Reference point to define signal generation condition
205 Int_t fIxt; // ! pad coord. x
206 Int_t fIyt; // ! pad coord. y
207 Int_t fIwt; // ! wire number
211 TObjArray* fCorrA; // ! Array of correction functions
213 ClassDef(AliMUONSt12QuadrantSegmentation,2) // Station1 segmentation
216 #endif //ALI_MUON_ST12_QUADRANT_SEGMENTATION_H