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;
32 class AliMUONSegmentManuIndex;
36 class AliMUONSt12QuadrantSegmentation : public AliMUONVGeometryDESegmentation
39 AliMUONSt12QuadrantSegmentation(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 AliMpSectorSegmentation* 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
80 // get pad for a given connection
81 virtual void GetPadE(Int_t &/*ix*/, Int_t &/*iy*/, AliMUONSegmentManuIndex* /*connect*/) {return;}
82 virtual AliMUONSegmentManuIndex* GetMpConnection(Int_t /*ix*/, Int_t /*iy*/) {return 0x0;}
83 // get electronics connection for given pad
86 virtual void Init(Int_t chamber);
90 virtual Float_t Dpx() const;
91 virtual Float_t Dpy() const;
93 virtual Float_t Dpx(Int_t isector) const;
94 virtual Float_t Dpy(Int_t isector) const;
95 // Pad size in x, y by Sector
96 virtual Int_t Npx() const;
97 virtual Int_t Npy() const;
98 // Maximum number of Pads in y
100 virtual void SetPad(Int_t ix, Int_t iy);
102 virtual void SetHit(Float_t xhit, Float_t yhit, Float_t zhit);
107 virtual void FirstPad(Float_t xhit, Float_t yhit, Float_t zhit,
108 Float_t dx, Float_t dy);
109 virtual void NextPad();
110 virtual Int_t MorePads();
112 virtual Float_t Distance2AndOffset(Int_t iX, Int_t iY,
113 Float_t X, Float_t Y, Int_t* dummy) ;
114 // Distance between 1 pad and a position
115 virtual void GetNParallelAndOffset(Int_t iX, Int_t iY,
116 Int_t* Nparallel, Int_t* Offset);
117 // Number of pads read in parallel and offset to add to x
118 // (specific to LYON, but mandatory for display)
119 virtual void Neighbours(Int_t iX, Int_t iY,
120 Int_t* Nlist, Int_t Xlist[10], Int_t Ylist[10]);
121 // Get next neighbours
127 // Current pad cursor during disintegration
129 virtual Int_t ISector();
132 virtual Int_t Sector(Int_t ix, Int_t iy);
133 virtual Int_t Sector(Float_t x, Float_t y);
134 // calculate sector from pad coordinates
136 virtual void IntegrationLimits(Float_t& x1, Float_t& x2,
137 Float_t& y1, Float_t& y2);
138 // Current integration limits
142 virtual Int_t SigGenCond(Float_t x, Float_t y, Float_t z);
143 // Signal Generation Condition during Stepping
144 virtual void SigGenInit(Float_t x, Float_t y, Float_t z);
145 // Initialise signal generation at coord (x,y,z)
148 virtual void GiveTestPoints(Int_t& n, Float_t* x, Float_t* y) const;
149 // Test points for auto calibration
150 virtual void Draw(const char *opt = "");
151 // Draw the segmentation zones
153 // Function for systematic corrections
155 virtual void SetCorrFunc(Int_t isec, TF1* func);
156 // Set the correction function
157 virtual TF1* CorrFunc(Int_t isec) const;
158 // Get the correction Function
161 AliMUONSt12QuadrantSegmentation(const AliMUONSt12QuadrantSegmentation& rhs);
164 AliMUONSt12QuadrantSegmentation& operator=(const AliMUONSt12QuadrantSegmentation & rhs);
168 void UpdateCurrentPadValues(const AliMpPad& pad);
169 void ReadMappingData();
172 static const Float_t fgkWireD; // default wire pitch
173 static const Float_t fgkLengthUnit;// conversion between length units
174 // from mapping (mm) to AliRoot (cm)
179 AliMpStationType fStationType; // station type
180 AliMpPlaneType fPlaneType; // plane type
181 AliMpSector* fSector; // ! sector (from mapping)
182 AliMpSectorSegmentation* fSectorSegmentation;// ! sector segmentation (from mapping)
183 AliMpVPadIterator* fSectorIterator; // ! iterator over pads
187 Float_t fWireD; // wire pitch
188 // (smaller distance between anode wires)
190 // Reference to mother chamber
192 AliMUONChamber* fChamber; // ! Reference to mother chamber
193 Int_t fId; // Identifier
194 Float_t fRmin; // inner radius
195 Float_t fRmax; // outer radius
196 Float_t fZ; // z-position of chamber
198 // Current pad during integration (cursor for disintegration)
200 Int_t fIx; // ! pad coord. x
201 Int_t fIy; // ! pad coord. y
202 Float_t fX; // ! real coord. x
203 Float_t fY; // ! real ccord. y
204 Int_t fZone; // ! Current zone (sector in AliSegmentation naming)
206 // Current pad and wire during tracking (cursor at hit centre)
208 Float_t fXhit; // ! x-position of hit
209 Float_t fYhit; // ! y-position of hit
211 // Reference point to define signal generation condition
213 Int_t fIxt; // ! pad coord. x
214 Int_t fIyt; // ! pad coord. y
215 Int_t fIwt; // ! wire number
219 TObjArray* fCorrA; // ! Array of correction functions
221 ClassDef(AliMUONSt12QuadrantSegmentation,1) // Station1 segmentation
224 #endif //ALI_MUON_ST12_QUADRANT_SEGMENTATION_H