1 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2 * See cxx source for full Copyright notice */
7 // Class AliMUONGeometrySegmentation
8 // ----------------------------------
9 // New class for the geometry segmentation
10 // composed of the segmentations of detection elements.
11 // Applies transformations defined in geometry.
13 // Author:Ivana Hrivnacova, IPN Orsay
15 #ifndef ALI_MUON_GEOMETRY_SEGMENTATION_H
16 #define ALI_MUON_GEOMETRY_SEGMENTATION_H
23 class AliSegmentation;
25 class AliMUONGeometryModule;
26 class AliMUONGeometryStore;
27 class AliMUONGeometryDetElement;
29 class AliMUONGeometrySegmentation : public TObject
32 AliMUONGeometrySegmentation(AliMUONGeometryModule* geometry);
33 AliMUONGeometrySegmentation();
34 virtual ~AliMUONGeometrySegmentation();
37 void Add(Int_t detElemId, AliSegmentation* segmentation);
40 // redefined methods from AliSegmentation interface
43 // Set Chamber Segmentation Parameters
45 virtual void SetPadSize(Float_t p1, Float_t p2);
47 virtual void SetDAnod(Float_t D);
50 // Transform from pad (wire) to real coordinates and vice versa
52 virtual Float_t GetAnod(Int_t detElemId, Float_t xlhit) const;
53 // Anode wire coordinate closest to xhit
54 virtual void GetPadI(Int_t detElemId,
55 Float_t xg, Float_t yg, Float_t zg,
56 Int_t& ix, Int_t& iy);
57 // Transform from pad to real coordinates
58 virtual void GetPadC(Int_t detElemId,
60 Float_t& x, Float_t& y, Float_t& z);
61 // Transform from real to pad coordinates
65 virtual void Init(Int_t chamber);
69 virtual Float_t Dpx(Int_t detElemId) const;
70 virtual Float_t Dpy(Int_t detElemId) const ;
72 virtual Float_t Dpx(Int_t detElemId, Int_t isector) const;
73 virtual Float_t Dpy(Int_t detElemId, Int_t isector) const;
74 // Pad size in x, y by Sector
75 virtual Int_t Npx(Int_t detElemId) const;
76 virtual Int_t Npy(Int_t detElemId) const;
77 // Maximum number of Pads in y
79 virtual void SetPad(Int_t detElemId, Int_t ix, Int_t iy);
81 virtual void SetHit(Int_t detElemId, Float_t xghit, Float_t yghit, Float_t zghit);
86 virtual void FirstPad(Int_t detElemId,
87 Float_t xghit, Float_t yghit, Float_t zghit,
88 Float_t dx, Float_t dy);
89 virtual void NextPad(Int_t detElemId);
90 virtual Int_t MorePads(Int_t detElemId);
92 virtual Float_t Distance2AndOffset(Int_t detElemId,
94 Float_t xg, Float_t yg, Float_t zg,
96 // Distance between 1 pad and a position
97 virtual void GetNParallelAndOffset(Int_t detElemId,
99 Int_t* nparallel, Int_t* offset);
100 // Number of pads read in parallel and offset to add to x
101 // (specific to LYON, but mandatory for display)
102 virtual void Neighbours(Int_t detElemId,
104 Int_t* nlist, Int_t xlist[10], Int_t ylist[10]);
105 // Get next neighbours
111 virtual Int_t DetElemId();
112 // Current pad cursor during disintegration
114 virtual Int_t ISector();
117 virtual Int_t Sector(Int_t detElemId,
119 virtual Int_t Sector(Int_t detElemId,
120 Float_t xg, Float_t yg, Float_t zg);
121 // calculate sector from pad coordinates
123 virtual void IntegrationLimits(Int_t detElemId,
124 Float_t& x1, Float_t& x2,
125 Float_t& y1, Float_t& y2);
126 // Current integration limits
130 virtual Int_t SigGenCond(Int_t detElemId,
131 Float_t xg, Float_t yg, Float_t zg);
132 // Signal Generation Condition during Stepping
133 virtual void SigGenInit(Int_t detElemId,
134 Float_t xg, Float_t yg, Float_t zg);
135 // Initialise signal generation at coord (x,y,z)
138 virtual void GiveTestPoints(Int_t detElemId,
139 Int_t& n, Float_t* xg, Float_t* yg) const;
140 // Test points for auto calibration
141 virtual void Draw(Int_t detElemId,
142 const char *opt = "") const;
143 // Draw the segmentation zones
145 // Function for systematic corrections
147 virtual void SetCorrFunc(Int_t detElemId,
148 Int_t isec, TF1* func);
149 // Set the correction function
150 virtual TF1* CorrFunc(Int_t detElemId, Int_t isec) const;
151 // Get the correction Function
154 AliMUONGeometrySegmentation(const AliMUONGeometrySegmentation& rhs);
157 AliMUONGeometrySegmentation& operator=(const AliMUONGeometrySegmentation & rhs);
161 Bool_t Notify(Int_t detElemId) const;
164 mutable Int_t fCurrentDetElemId;
165 mutable AliMUONGeometryDetElement* fCurrentDetElement;
166 mutable AliSegmentation* fCurrentSegmentation;
167 AliMUONGeometryModule* fGeometryModule;
168 AliMUONGeometryStore* fDESegmentations;
170 ClassDef(AliMUONGeometrySegmentation,1) // Station1 segmentation
173 #endif //ALI_MUON_GEOMETRY_SEGMENTATION_H