146 {
147
148 TString opt = option;
149 opt.ToUpper();
150
151
153 if (view == 0) cout << "no view found" << endl;
154
155
156 Int_t np = fNSegment;
157
158 if (f_innerCircleX){
159 delete [] f_innerCircleX;
160 f_innerCircleX = NULL;
161 }
162 if (f_innerCircleY){
163 delete [] f_innerCircleY;
164 f_innerCircleY = NULL;
165 }
166 if (f_outerCircleX){
167 delete [] f_outerCircleX;
168 f_outerCircleX = NULL;
169 }
170 if (f_outerCircleY){
171 delete [] f_outerCircleY;
172 f_outerCircleY = NULL;
173 }
174 if (f_areaX) {
175 delete [] f_areaX;
176 f_areaX = NULL;
177 }
178 if (f_areaY) {
179 delete [] f_areaY;
180 f_areaY = NULL;
181 }
182
183 f_innerCircleX = new Double_t[np+1];
184 f_innerCircleY = new Double_t[np+1];
185 f_outerCircleX = new Double_t[np+1];
186 f_outerCircleY = new Double_t[np+1];
187 f_areaX = new Double_t[4*np];
188 f_areaY = new Double_t[4*np];
189
190 TAttLine::Modify();
191 TAttFill::Modify();
192
193 Double_t angle;
194 Double_t dphi = 2*TMath::Pi()/(np);
195 Double_t pointWC[3],pointNDC[3];
196
197 for (Int_t i=0; i< np ; i++) {
198 angle = Double_t(i)*dphi;
199
200
201
202 pointWC[0] = fCenter[0] + fInnerRadius * TMath::Cos(angle);
203 pointWC[1] = fCenter[1] + fInnerRadius * TMath::Sin(angle);
204 pointWC[2] = fCenter[2];
205 view->
WCtoNDC(pointWC,pointNDC);
206 f_innerCircleX[i] = pointNDC[0];
207 f_innerCircleY[i] = pointNDC[1];
208 f_areaX[4*i] = pointNDC[0];
209 f_areaY[4*i] = pointNDC[1];
210 if ( i == 0 ) {
211 f_areaX[4*np - 3] = pointNDC[0];
212 f_areaY[4*np - 3] = pointNDC[1];
213 } else {
214 f_areaX[4*i - 3] = pointNDC[0];
215 f_areaY[4*i - 3] = pointNDC[1];
216 }
217
218
219
220 pointWC[0] = fCenter[0] + fOuterRadius * TMath::Cos(angle);
221 pointWC[1] = fCenter[1] + fOuterRadius * 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)