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 AliMUONGeometryModule;
24 class AliMUONGeometryStore;
25 class AliMUONGeometryDetElement;
26 class AliMUONVGeometryDESegmentation;
28 class AliMUONGeometrySegmentation : public TObject
31 AliMUONGeometrySegmentation(AliMUONGeometryModule* geometry);
32 AliMUONGeometrySegmentation();
33 virtual ~AliMUONGeometrySegmentation();
36 void Add(Int_t detElemId,
37 AliMUONVGeometryDESegmentation* segmentation);
40 AliMUONGeometryModule* GetGeometry() const;
43 // redefined methods from AliSegmentation interface
46 // Set Chamber Segmentation Parameters
48 virtual void SetPadSize(Float_t p1, Float_t p2);
50 virtual void SetDAnod(Float_t D);
53 // Transform from pad (wire) to real coordinates and vice versa
55 virtual Float_t GetAnod(Int_t detElemId, Float_t xlhit) const;
56 // Anode wire coordinate closest to xhit
57 virtual Bool_t GetPadI(Int_t detElemId,
58 Float_t xg, Float_t yg, Float_t zg,
59 Int_t& ix, Int_t& iy);
60 // Transform from pad to real coordinates
61 virtual Bool_t GetPadC(Int_t detElemId,
63 Float_t& x, Float_t& y, Float_t& z);
64 // Transform from real to pad coordinates
68 virtual void Init(Int_t chamber);
72 virtual Float_t Dpx(Int_t detElemId) const;
73 virtual Float_t Dpy(Int_t detElemId) const ;
75 virtual Float_t Dpx(Int_t detElemId, Int_t isector) const;
76 virtual Float_t Dpy(Int_t detElemId, Int_t isector) const;
77 // Pad size in x, y by Sector
78 virtual Int_t Npx(Int_t detElemId) const;
79 virtual Int_t Npy(Int_t detElemId) const;
80 // Maximum number of Pads in y
82 virtual void SetPad(Int_t detElemId, Int_t ix, Int_t iy);
84 virtual void SetHit(Int_t detElemId, Float_t xghit, Float_t yghit, Float_t zghit);
89 virtual void FirstPad(Int_t detElemId,
90 Float_t xghit, Float_t yghit, Float_t zghit,
91 Float_t dx, Float_t dy);
92 virtual void NextPad(Int_t detElemId);
93 virtual Int_t MorePads(Int_t detElemId);
95 virtual Float_t Distance2AndOffset(Int_t detElemId,
97 Float_t xg, Float_t yg, Float_t zg,
99 // Distance between 1 pad and a position
100 virtual void GetNParallelAndOffset(Int_t detElemId,
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 detElemId,
107 Int_t* nlist, Int_t xlist[10], Int_t ylist[10]);
108 // Get next neighbours
114 virtual Int_t DetElemId();
115 // Current pad cursor during disintegration
117 virtual Int_t ISector();
120 virtual Int_t Sector(Int_t detElemId,
122 virtual Int_t Sector(Int_t detElemId,
123 Float_t xg, Float_t yg, Float_t zg);
124 // calculate sector from pad coordinates
126 virtual void IntegrationLimits(Int_t detElemId,
127 Float_t& x1, Float_t& x2,
128 Float_t& y1, Float_t& y2);
129 // Current integration limits
133 virtual Int_t SigGenCond(Int_t detElemId,
134 Float_t xg, Float_t yg, Float_t zg);
135 // Signal Generation Condition during Stepping
136 virtual void SigGenInit(Int_t detElemId,
137 Float_t xg, Float_t yg, Float_t zg);
138 // Initialise signal generation at coord (x,y,z)
141 virtual void GiveTestPoints(Int_t detElemId,
142 Int_t& n, Float_t* xg, Float_t* yg) const;
143 // Test points for auto calibration
144 virtual void Draw(Int_t detElemId,
145 const char *opt = "") const;
146 // Draw the segmentation zones
148 // Function for systematic corrections
150 virtual void SetCorrFunc(Int_t detElemId,
151 Int_t isec, TF1* func);
152 // Set the correction function
153 virtual TF1* CorrFunc(Int_t detElemId, Int_t isec) const;
154 // Get the correction Function
157 AliMUONGeometrySegmentation(const AliMUONGeometrySegmentation& rhs);
160 AliMUONGeometrySegmentation& operator=(const AliMUONGeometrySegmentation & rhs);
164 Bool_t Notify(Int_t detElemId) const;
167 mutable Int_t fCurrentDetElemId;
168 mutable AliMUONGeometryDetElement* fCurrentDetElement;
169 mutable AliMUONVGeometryDESegmentation* fCurrentSegmentation;
170 AliMUONGeometryModule* fGeometryModule;
171 AliMUONGeometryStore* fDESegmentations;
173 ClassDef(AliMUONGeometrySegmentation,2) // Geometry segmentation
178 inline AliMUONGeometryModule* AliMUONGeometrySegmentation::GetGeometry() const
179 { return fGeometryModule; }
181 #endif //ALI_MUON_GEOMETRY_SEGMENTATION_H