148 {
149
150 TString opt = option;
151 opt.ToUpper();
152
153
155 if (view == 0) cout << "no view found" << endl;
156
157
158 Int_t np = fNSegment;
159
160 if (f_innerCircleX){
161 delete [] f_innerCircleX;
162 f_innerCircleX = NULL;
163 }
164 if (f_innerCircleY){
165 delete [] f_innerCircleY;
166 f_innerCircleY = NULL;
167 }
168 if (f_outerCircleX){
169 delete [] f_outerCircleX;
170 f_outerCircleX = NULL;
171 }
172 if (f_outerCircleY){
173 delete [] f_outerCircleY;
174 f_outerCircleY = NULL;
175 }
176 if (f_areaX) {
177 delete [] f_areaX;
178 f_areaX = NULL;
179 }
180 if (f_areaY) {
181 delete [] f_areaY;
182 f_areaY = NULL;
183 }
184
185 f_innerCircleX = new Double_t[np+1];
186 f_innerCircleY = new Double_t[np+1];
187 f_outerCircleX = new Double_t[np+1];
188 f_outerCircleY = new Double_t[np+1];
189 f_areaX = new Double_t[4*np];
190 f_areaY = new Double_t[4*np];
191
192 TAttLine::Modify();
193 TAttFill::Modify();
194
195 Double_t angle;
196 Double_t dphi = 2*TMath::Pi()/(np);
197 Double_t pointWC[3],pointNDC[3];
198
199 for (Int_t i=0; i< np ; i++) {
200 angle = Double_t(i)*dphi;
201
202
203 pointWC[0] = fCenter[0] + fInnerRadius[0]*TMath::Cos(angle);
204 pointWC[1] = fCenter[1] + fInnerRadius[0]*TMath::Sin(angle);
205 pointWC[2] = fCenter[2];
206 view->
WCtoNDC(pointWC,pointNDC);
207 f_innerCircleX[i] = pointNDC[0];
208 f_innerCircleY[i] = pointNDC[1];
209 f_areaX[4*i] = pointNDC[0];
210 f_areaY[4*i] = pointNDC[1];
211 if ( i == 0 ) {
212 f_areaX[4*np - 3] = pointNDC[0];
213 f_areaY[4*np - 3] = pointNDC[1];
214 } else {
215 f_areaX[4*i - 3] = pointNDC[0];
216 f_areaY[4*i - 3] = pointNDC[1];
217 }
218
219
220 pointWC[0] = fCenter[0] + fOuterRadius[0]*TMath::Cos(angle);
221 pointWC[1] = fCenter[1] + fOuterRadius[0]*TMath::Sin(angle);
222 pointWC[2] = fCenter[2];
223 view->
WCtoNDC(pointWC,pointNDC);
224 f_outerCircleX[i] = pointNDC[0];
225 f_outerCircleY[i] = pointNDC[1];
226 f_areaX[4*i + 3] = pointNDC[0];
227 f_areaY[4*i + 3] = pointNDC[1];
228 if ( i == 0 ) {
229 f_areaX[4*np - 2] = pointNDC[0];
230 f_areaY[4*np - 2] = pointNDC[1];
231 } else {
232 f_areaX[4*i - 2] = pointNDC[0];
233 f_areaY[4*i - 2] = pointNDC[1];
234 }
235
236 }
237
238
239 f_innerCircleX[np] = f_innerCircleX[0];
240 f_innerCircleY[np] = f_innerCircleY[0];
241 f_outerCircleX[np] = f_outerCircleX[0];
242 f_outerCircleY[np] = f_outerCircleY[0];
243
244
245 for (Int_t i = 0; i < np; i++ ) {
246 gPad->PaintFillArea(4,&f_areaX[4*i],&f_areaY[4*i]);
247 }
248
249
250
251 gPad->PaintPolyLine(np+1,f_innerCircleX,f_innerCircleY);
252 gPad->PaintPolyLine(np+1,f_outerCircleX,f_outerCircleY);
253
254}
virtual void WCtoNDC(const Float_t *pw, Float_t *pn)