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
10 // Class AliMUONSt12QuadrantSegmentation
11 // -------------------------------------
12 // Segmentation for MUON quadrants of stations 1 and 2 using
13 // the mapping package
15 // Author: Ivana Hrivnacova, IPN Orsay
17 #include "AliMpStationType.h"
18 #include "AliMpPlaneType.h"
20 #include "AliMUONVGeometryDESegmentation.h"
25 class AliMpSectorSegmentation;
26 class AliMpVPadIterator;
31 class AliMUONSt12QuadrantSegmentation : public AliMUONVGeometryDESegmentation
34 AliMUONSt12QuadrantSegmentation(AliMpStationType stationType,
35 AliMpPlaneType planeType);
36 AliMUONSt12QuadrantSegmentation();
38 virtual ~AliMUONSt12QuadrantSegmentation();
41 // methods derived from base class
44 // Set Chamber Segmentation Parameters
46 virtual void SetPadSize(Float_t p1, Float_t p2);
48 virtual void SetDAnod(Float_t D);
51 // Check if pad exists
53 virtual Bool_t HasPad(Float_t x, Float_t y, Float_t z);
54 // Returns true if a pad exists in the given position
55 virtual Bool_t HasPad(Int_t ix, Int_t iy);
56 // Returns true if a pad with given indices exists
58 // Transform from pad (wire) to real coordinates and vice versa
60 virtual Float_t GetAnod(Float_t xhit) const;
61 // Anode wire coordinate closest to xhit
62 virtual void GetPadI(Float_t x, Float_t y, Float_t z, Int_t& ix, Int_t& iy);
63 virtual void GetPadI(Float_t x, Float_t y , Int_t &ix, Int_t &iy) ;
64 // Transform from pad to real coordinates
65 virtual void GetPadC(Int_t ix, Int_t iy, Float_t& x, Float_t& y, Float_t& z);
66 virtual void GetPadC(Int_t ix, Int_t iy, Float_t& x, Float_t& y);
67 // Transform from real to pad coordinates
72 virtual void Init(Int_t chamber);
76 virtual Float_t Dpx() const;
77 virtual Float_t Dpy() const;
79 virtual Float_t Dpx(Int_t isector) const;
80 virtual Float_t Dpy(Int_t isector) const;
81 // Pad size in x, y by Sector
82 virtual Int_t Npx() const;
83 virtual Int_t Npy() const;
84 // Maximum number of Pads in y
86 virtual void SetPad(Int_t ix, Int_t iy);
88 virtual void SetHit(Float_t xhit, Float_t yhit, Float_t zhit);
93 virtual void FirstPad(Float_t xhit, Float_t yhit, Float_t zhit,
94 Float_t dx, Float_t dy);
95 virtual void NextPad();
96 virtual Int_t MorePads();
98 virtual Float_t Distance2AndOffset(Int_t iX, Int_t iY,
99 Float_t X, Float_t Y, Int_t* dummy) ;
100 // Distance between 1 pad and a position
101 virtual void GetNParallelAndOffset(Int_t iX, Int_t iY,
102 Int_t* Nparallel, Int_t* Offset);
103 // Number of pads read in parallel and offset to add to x
104 // (specific to LYON, but mandatory for display)
105 virtual void Neighbours(Int_t iX, Int_t iY,
106 Int_t* Nlist, Int_t Xlist[10], Int_t Ylist[10]);
107 // Get next neighbours
113 // Current pad cursor during disintegration
115 virtual Int_t ISector();
118 virtual Int_t Sector(Int_t ix, Int_t iy);
119 virtual Int_t Sector(Float_t x, Float_t y);
120 // calculate sector from pad coordinates
122 virtual void IntegrationLimits(Float_t& x1, Float_t& x2,
123 Float_t& y1, Float_t& y2);
124 // Current integration limits
128 virtual Int_t SigGenCond(Float_t x, Float_t y, Float_t z);
129 // Signal Generation Condition during Stepping
130 virtual void SigGenInit(Float_t x, Float_t y, Float_t z);
131 // Initialise signal generation at coord (x,y,z)
134 virtual void GiveTestPoints(Int_t& n, Float_t* x, Float_t* y) const;
135 // Test points for auto calibration
136 virtual void Draw(const char *opt = "");
137 // Draw the segmentation zones
139 // Function for systematic corrections
141 virtual void SetCorrFunc(Int_t isec, TF1* func);
142 // Set the correction function
143 virtual TF1* CorrFunc(Int_t isec) const;
144 // Get the correction Function
147 AliMUONSt12QuadrantSegmentation(const AliMUONSt12QuadrantSegmentation& rhs);
150 AliMUONSt12QuadrantSegmentation& operator=(const AliMUONSt12QuadrantSegmentation & rhs);
154 void UpdateCurrentPadValues(const AliMpPad& pad);
157 static const Float_t fgkWireD; // default wire pitch
158 static const Float_t fgkLengthUnit;// conversion between length units
159 // from mapping (mm) to AliRoot (cm)
165 AliMpSector* fSector; // sector (from mapping)
166 AliMpSectorSegmentation* fSectorSegmentation;// sector segmentation (from mapping)
167 AliMpVPadIterator* fSectorIterator; // ! iterator over pads
171 Float_t fWireD; // wire pitch
172 // (smaller distance between anode wires)
174 // Reference to mother chamber
176 AliMUONChamber* fChamber; // ! Reference to mother chamber
177 Int_t fId; // Identifier
178 Float_t fRmin; // inner radius
179 Float_t fRmax; // outer radius
180 Float_t fZ; // z-position of chamber
182 // Current pad during integration (cursor for disintegration)
184 Int_t fIx; // ! pad coord. x
185 Int_t fIy; // ! pad coord. y
186 Float_t fX; // ! real coord. x
187 Float_t fY; // ! real ccord. y
188 Int_t fZone; // ! Current zone (sector in AliSegmentation naming)
190 // Current pad and wire during tracking (cursor at hit centre)
192 Float_t fXhit; // ! x-position of hit
193 Float_t fYhit; // ! y-position of hit
195 // Reference point to define signal generation condition
197 Int_t fIxt; // ! pad coord. x
198 Int_t fIyt; // ! pad coord. y
199 Int_t fIwt; // ! wire number
203 TObjArray* fCorrA; // ! Array of correction functions
205 ClassDef(AliMUONSt12QuadrantSegmentation,1) // Station1 segmentation
208 #endif //ALI_MUON_ST12_QUADRANT_SEGMENTATION_H