24 Double_t dz, Double_t phi, Double_t* center ) {
32 fColorfulWire =
false;
36 Double_t r = 0.25 * ( rmax - rmin );
39 Double_t dx = fabs( r *
cos( phi ) );
40 Double_t dy = fabs( r *
sin( phi ) );
41 Double_t
P[12] = { center[0] - dx, center[1] - dy, center[2] - dz, center[0] + dx,
42 center[1] + dy, center[2] - dz, center[0] - dx, center[1] - dy,
43 center[2] + dz, center[0] + dx, center[1] + dy, center[2] + dz };
58 fColorfulWire =
false;
61 Double_t* tubeP = &
P[3 * N / 2];
66 for ( Int_t i = 0; i < 3; i++ )
68 fWestHole[i] = (
P[i] +
P[3 + i] +
P[6 + i] +
P[9 + i] ) / 4.0;
69 fEastHole[i] = (
P[12 + i] +
P[15 + i] +
P[18 + i] +
P[21 + i] ) / 4.0;
71 TVector3 westVec( fWestHole[0], fWestHole[1], fWestHole[2] );
72 TVector3 eastVec( fEastHole[0], fEastHole[1], fEastHole[2] );
73 fWestPhi = westVec.Phi() * TMath::RadToDeg();
74 fEastPhi = eastVec.Phi() * TMath::RadToDeg();
75 if ( fWestPhi < 0.0 ) fWestPhi += 360.0;
76 if ( fEastPhi < 0.0 ) fEastPhi += 360.0;
79 Double_t rMax = sqrt( (
P[4 * 3] -
P[7 * 3] ) * (
P[4 * 3] -
P[7 * 3] ) +
80 (
P[4 * 3 + 1] -
P[7 * 3 + 1] ) * (
P[4 * 3 + 1] -
P[7 * 3 + 1] ) +
81 (
P[4 * 3 + 2] -
P[7 * 3 + 2] ) * (
P[4 * 3 + 2] -
P[7 * 3 + 2] ) ) /
84 Double_t rMinRatio = 0.0001;
85 Double_t rMaxRatio = 0.8;
88 Double_t edge = rMaxRatio * 0.0001;
89 for ( Int_t i = 0; i < 3; i++ )
92 ( 0.5 + edge * rMinRatio ) * (
P[i] +
P[3 + i] ) * 0.5 +
93 ( 0.5 - edge * rMinRatio ) * (
P[6 + i] +
P[9 + i] ) * 0.5;
95 ( 0.5 - edge * rMinRatio ) * (
P[i] +
P[3 + i] ) * 0.5 +
96 ( 0.5 + edge * rMinRatio ) * (
P[6 + i] +
P[9 + i] ) * 0.5;
98 ( 0.5 + edge * rMaxRatio ) * (
P[12 + i] +
P[15 + i] ) * 0.5 +
99 ( 0.5 - edge * rMaxRatio ) * (
P[18 + i] +
P[21 + i] ) * 0.5;
101 ( 0.5 - edge * rMaxRatio ) * (
P[12 + i] +
P[15 + i] ) * 0.5 +
102 ( 0.5 + edge * rMaxRatio ) * (
P[18 + i] +
P[21 + i] ) * 0.5;
104 fWireCone =
new BesPolygon2D(
"WireCone",
"WireCone", 4, &newP[0] );
107 new BesCircle2D(
"WireBubble",
"WireBubble", 0.0, rMaxRatio * rMax, &fEastHole[0] );
111 new BesMarker2D(
"MdcZRPos",
"MdcZRPos", fEastHole[0], fEastHole[1], fEastHole[2] );
297 TString opt = option;
306 Double_t wcCenter[3], ncCenter[3];
307 fWireCircle->GetCenter( &wcCenter[0] );
308 view->
WCtoNDC( wcCenter, &ncCenter[0] );
309 Double_t x1, y1, x2, y2;
311 gPad->GetRange( x1, y1, x2, y2 );
314 if ( ncCenter[0] > x1 - d && ncCenter[0] < x2 + d && ncCenter[1] > y1 - d &&
315 ncCenter[1] < y2 + d )
317 if ( opt.Contains(
"TUBE" ) && fTube )
319 fTube->SetLineColor( lcTube );
320 fTube->SetLineWidth( lwTube );
321 fTube->SetFillColor( fcTube );
322 fTube->SetFillStyle( fsTube );
331 fWireCircle->SetLineColor( lcWireFired );
332 fWireCircle->SetLineWidth( lwCircleFired );
333 fWireCircle->SetFillColor( fcCircleFired );
334 fWireCircle->SetFillStyle( fsCircleFired );
338 fWireCone->SetLineColor( lcWireFired );
339 fWireCone->SetLineWidth( lwConeFired );
340 fWireCone->SetFillColor( fcConeFired );
341 fWireCone->SetFillStyle( fsConeFired );
348 fWireCone->SetLineColor( lcWire );
349 fWireCone->SetLineWidth( lwCone );
350 fWireCone->SetFillColor( fcCone );
351 fWireCone->SetFillStyle( fsCone );
355 fWireCircle->SetLineColor( lcWire );
356 fWireCircle->SetLineWidth( lwCircle );
357 fWireCircle->SetFillColor( fcCircle );
358 fWireCircle->SetFillStyle( fsCircle );
366 fWireCircle->SetLineColor( lcWireHL );
367 fWireCircle->SetLineWidth( lwCircleHL );
368 fWireCircle->SetFillColor( fcCircleHL );
369 fWireCircle->SetFillStyle( fsCircleHL );
373 fWireCone->SetLineColor( lcWireHL );
374 fWireCone->SetLineWidth( lwConeHL );
375 fWireCone->SetFillColor( fcConeHL );
376 fWireCone->SetFillStyle( fsConeHL );
379 if ( opt.Contains(
"WIRE" ) )
382 if (
IsFired() ) fWireCone->Paint();
383 if ( fWireCircle ) fWireCircle->Paint();
392 fZRPosMarker2D->SetWCX( fZRSectionPos[0] );
393 fZRPosMarker2D->SetWCY( fZRSectionPos[1] );
394 fZRPosMarker2D->SetWCZ( fZRSectionPos[2] );
395 fZRPosMarker2D->SetMarkerColor( cMarker );
396 fZRPosMarker2D->SetMarkerStyle( sMarker );
397 fZRPosMarker2D->SetMarkerSizeMultiple( sizeMarker );
401 if ( fZRPosMarker2D )
403 fZRPosMarker2D->SetMarkerColor( cMarkerFired );
404 fZRPosMarker2D->SetMarkerStyle( sMarkerFired );
409 if ( fZRPosMarker2D )
411 fZRPosMarker2D->SetMarkerColor( cMarker );
412 fZRPosMarker2D->SetMarkerStyle( sMarker );
418 if ( fZRPosMarker2D )
420 fZRPosMarker2D->SetMarkerColor( cMarkerHL );
421 fZRPosMarker2D->SetMarkerStyle( sMarkerHL );
425 if ( opt.Contains(
"WIRE" ) )
427 if ( fZRPosMarker2D ) fZRPosMarker2D->Paint();
445 if ( fWireType != 2 )
return false;
453 Double_t zrPhi = viewPhi - 90.0;
457 for ( Int_t i = 0; i < 2; i++ )
465 if ( fabs( fEastPhi - fWestPhi ) < 180.0 )
467 if ( ( fEastPhi - zrPhi ) * ( fWestPhi - zrPhi ) > 0.0 )
flag =
false;
470 Double_t factor = fabs( ( fEastPhi - zrPhi ) / ( fEastPhi - fWestPhi ) );
471 for ( Int_t i = 0; i < 3; i++ )
472 { fZRSectionPos[i] = factor * fWestHole[i] + ( 1.0 - factor ) * fEastHole[i]; }
479 if ( ( fEastPhi - zrPhi ) * ( fWestPhi - zrPhi ) < 0.0 )
flag =
false;
482 Double_t tempEastPhi = fEastPhi;
483 if ( tempEastPhi >= 180.0 ) tempEastPhi -= 360.0;
484 Double_t tempWestPhi = fWestPhi;
485 if ( tempWestPhi >= 180.0 ) tempWestPhi -= 360.0;
486 Double_t tempZRPhi = zrPhi;
487 if ( tempZRPhi >= 180.0 ) tempZRPhi -= 360.0;
489 Double_t factor = fabs( ( tempEastPhi - tempZRPhi ) / ( tempEastPhi - tempWestPhi ) );
490 for ( Int_t i = 0; i < 3; i++ )
491 { fZRSectionPos[i] = factor * fWestHole[i] + ( 1.0 - factor ) * fEastHole[i]; }
544 fColorfulWire = colorfulWire;
556 double tempMdcTime = mdcTime - evTime;
557 if ( fabs( evTime ) > 0.0001 ) tempMdcTime += 230;
558 if ( tempMdcTime > 10000 ) { tempColor = kGray; }
559 else if ( tempMdcTime > 2000 && tempMdcTime <= 10000 ) { tempColor = kRed; }
560 else if ( tempMdcTime < -10 ) { tempColor = kWhite; }
561 else { tempColor = 51 + (int)( tempMdcTime / 40 ); }
566 if ( mdcTime > 10000 ) { tempColor = kGray; }
567 else if ( mdcTime > 2000 && mdcTime <= 10000 ) { tempColor = kRed; }
568 else { tempColor = 51 + (int)( mdcTime / 40 ); }
570 lcWireFired = tempColor;
579 if ( mdcCharge > 30000 ) { tempColor = kGray; }
580 else if ( mdcCharge > 2000 && mdcCharge <= 30000 ) { tempColor = kRed; }
581 else { tempColor = 51 + (int)( mdcCharge / 40 ); }
582 if ( qOverflow ) { tempColor = kBlack; }
583 fcCircleFired = tempColor;
590 fcCircleFired = 9004;
cout<< "end eff5"<< endl;TGraph *gr1=new TGraphErrors(15, x, eff_ep, errx, err_ep);TGraph *gr2=new TGraphErrors(15, x, eff_em, errx, err_em);TGraph *gr3=new TGraphErrors(15, x, eff_ep2, errx, err_ep2);TGraph *gr4=new TGraphErrors(15, x, eff_em2, errx, err_em2);TGraph *gr5=new TGraphErrors(15, x, eff_ep3, errx, err_ep3);TGraph *gr6=new TGraphErrors(15, x, eff_em3, errx, err_em3);TGraph *gr7=new TGraphErrors(15, x, eff_ep4, errx, err_ep4);TGraph *gr8=new TGraphErrors(15, x, eff_em4, errx, err_em4);TGraph *gr9=new TGraphErrors(15, x, eff_ep5, errx, err_ep5);TGraph *gr10=new TGraphErrors(15, x, eff_em5, errx, err_em5);TCanvas *c1=new TCanvas("c1", "bhabha_eff", 100, 10, 600, 400);TMultiGraph *mg=new TMultiGraph();mg-> SetTitle("bhabha_eff")