BOSS 7.0.6
BESIII Offline Software System
Loading...
Searching...
No Matches
Emc2DCrystal.cxx
Go to the documentation of this file.
1#include <TString.h>
2#include <TColor.h>
3#include <iostream>
4#include "TMath.h"
5#include "math.h"
6
8#include "BesVisLib/BesView.h"
10
11using namespace std;
12
13#ifndef __CINT__
15#endif
16
17//_____________________________________________________
18
20
21}
22
23//_____________________________________________________
24
25Emc2DCrystal::Emc2DCrystal(const char* name, const char* title, Int_t N, Double_t *P, Int_t part, Int_t theta)
26{
27 SetName(name);
29 fTip = 0;
30 fHighlighted = false;
31 fFired = false;
32 fPart = part;
33 fTheta = theta;
34
35 fTime = 0.0;
36 fCharge = 0.0;
37
38 fZRSectionTolerance[1] = 0.1; // degree
39 fZRSectionTolerance[2] = fZRSectionTolerance[0] = 1.2; // degree
40
41 // ------XY------
42
43 Double_t Pxy[3*5]; // 4 side and 5 side shape in Emc End crystal
44 if (N == 8) { // 4 side
45 Int_t iXYSeq[4] = {0,2,6,4};
46 for (Int_t i = 0; i < 4; i++) {
47 if (part == 1) {
48 for (Int_t j = 0; j < 3; j++) {
49 Pxy[3*i+j] = ( P[3*iXYSeq[i]+j] + P[3*(iXYSeq[i]+1)+j] )/2.0;
50 }
51 }
52 else if (part == 0) {
53 SetXYPoint(&P[3*i], &P[3*(i+4)], &Pxy[3*i], ecXYPointZ);
54 //for (Int_t j = 0; j < 3; j++) Pxy[3*i+j] = P[3*i+j];
55 }
56 else if (part == 2) {
57 SetXYPoint(&P[3*i], &P[3*(i+4)], &Pxy[3*i], -ecXYPointZ);
58 //for (Int_t j = 0; j < 3; j++) Pxy[3*i+j] = P[3*i+j];
59 }
60 //cout << GetName() << endl;
61 //if (GetName() == TString("EastEcTheta5Phi0")) cout << Pxy[3*i] << " " << Pxy[3*i+1] << " " << Pxy[3*i+2] << endl;
62 }
63
64 fCrystalXY = new BesPolygon2D(name, title, 4, &Pxy[0]);
65 fCrystalXYFired = new BesPolygon2D(name, title, 4, &Pxy[0]);
66 }
67 if (N == 16) { // 5 side
68 Int_t iXYSeq[5] = {8,9,1,2,3}; // 9 10,1 2
69 for (Int_t i = 0; i < 5; i++) { // 8 11,0 3
70 if (part == 0) {
71 SetXYPoint(&P[3*iXYSeq[i]], &P[3*(iXYSeq[i]+4)], &Pxy[3*i], ecXYPointZ);
72 }
73 else if (part == 2) {
74 SetXYPoint(&P[3*iXYSeq[i]], &P[3*(iXYSeq[i]+4)], &Pxy[3*i], -ecXYPointZ);
75 }
76 //for (Int_t j = 0; j < 3; j++) Pxy[3*i+j] = P[3*iXYSeq[i]+j];
77 }
78
79 fCrystalXY = new BesPolygon2D(name, title, 5, &Pxy[0]);
80 fCrystalXYFired = new BesPolygon2D(name, title, 5, &Pxy[0]);
81 }
82
83 // ------ZR------
84
85 Double_t Pzr[3*4];
86 Int_t iSeq[8] = {0,3,1,2,5,6,4,7}; // center of 0+3, 1+2, 5+6, 4+7
87 for (Int_t i = 0; i < 4; i++) {
88 for (Int_t j = 0; j < 3; j++) {
89 Pzr[3*i+j] = (P[3*iSeq[2*i]+j] + P[3*iSeq[2*i+1]+j])/2.0;
90 }
91 //if (GetName() == TString("EastEcCrystal0")) cout << Pxy[i] << endl;
92 }
93
94
95 fCrystalZR = new BesPolygon2D(TString(name)+TString("zr"), title, 4, &Pzr[0]);
96 fCrystalZRFired = new BesPolygon2D(TString(name)+TString("zr"), title, 4, &Pzr[0]);
97
98 if (N == 8) {
99 if (GetPart() == 1) {
100 fPhiMin = GetAngle( P[3*0], P[3*0+1] );
101 fPhiMax = GetAngle( P[3*3], P[3*3+1] );
102 }
103 else {
104 fPhiMin = GetAngle( P[3*3], P[3*3+1] );
105 fPhiMax = GetAngle( P[3*0], P[3*0+1] );
106 }
107 }
108 else if (N == 16) {
109 fPhiMin = GetAngle( P[3*3], P[3*3+1] );
110 fPhiMax = GetAngle( P[3*8], P[3*8+1] );
111 }
112
113 //Long Peixun's update: Remove fabs()
114 if (fPhiMin > fPhiMax && fPhiMin - fPhiMax < 180.0)
115 { // not cross 0 degree
116 Double_t phiTemp = fPhiMin;
117 fPhiMin = fPhiMax;
118 fPhiMax = phiTemp;
119 }
120 //Long Peixun's update: Consider crossing 0 degree
121 if (fPhiMax > fPhiMin && fPhiMax - fPhiMin > 180.0)
122 {
123 Double_t phiTemp = fPhiMin;
124 fPhiMin = fPhiMax;
125 fPhiMax = phiTemp;
126 }
127 //cout << GetName() << " min "<< fPhiMin << " max " << fPhiMax << endl;
128
129 // ------Side------
130
131 Double_t Pside[3*5]; // 4 side and 5 side shape in Emc End crystal
132 if (N == 8) { // 4 side
133 //Int_t iSideSeq[4] = {0,1,2,3};
134 for (Int_t i = 0; i < 4; i++) {
135 if (part == 1) {
136 SetZRPoint(&P[3*i], &P[3*(i+4)], &Pside[3*i], brZRPointR);
137 }
138 else {
139 ProjectECToSide(&Pxy[3*i], &Pside[3*i]);
140 }
141 }
142
143 fCrystalSide = new BesPolygon2D(name, title, 4, &Pside[0]);
144 fCrystalSideFired = new BesPolygon2D(name, title, 4, &Pside[0]);
145 }
146 if (N == 16) { // 5 side
147 for (Int_t i = 0; i < 5; i++) {
148 ProjectECToSide(&Pxy[3*i], &Pside[3*i]);
149 }
150
151 fCrystalSide = new BesPolygon2D(name, title, 5, &Pside[0]);
152 fCrystalSideFired = new BesPolygon2D(name, title, 5, &Pside[0]);
153 }
154
155 // Init
156
157 SetStyle();
158
159 fTip = new BesPaveText(0, 0, 0.45, 0.08);
160 CloseInfo();
161}
162
163//_____________________________________________________
164
166 //Long Peixun's update: remove "if"
167 delete fCrystalXY;
168 delete fCrystalZR;
169 delete fCrystalXYFired;
170 delete fCrystalZRFired;
171}
172
174{
175 lcCrystal = 15;
176 lwCrystal = 1;
177 fcCrystal = 1005; // lightBlue
178 fsCrystal = 1001;
179 fsCrystalTrans = 4000;
180
181 lcCrystalFired = kRed;
182 lwCrystalFired = 1;
183 fcCrystalFired = kRed;
184 fsCrystalFired = 1001;
185
186 lcCrystalHL = lcCrystal;
187 lwCrystalHL = 1;
188 fcCrystalHL = kBlue;
189 fsCrystalHL = 1001;
190
191 lcCrystalFiredHL = kRed;
192 lwCrystalFiredHL = 2;
193 fcCrystalFiredHL = kWhite;
194 fsCrystalFiredHL = 4000;
195}
196
198{
199 fInfoCon.clear();
200 fTip->DeleteText();
201}
202
204{
205 if (fTip) {
206 fTip->Clear();
207
208 if (fInfoCon.size() == 0) fInfoCon.push_back(GetTitle());
209 fTip->SetText(fInfoCon);
210 }
211 else
212 cout << "Emc2DCrystal::CloseInfo, not initialized" << endl;
213}
214
215//_____________________________________________________
216
217Int_t Emc2DCrystal::DistancetoPrimitive(Int_t px, Int_t py) {
218
219 BesView *view = dynamic_cast<BesView*>(gPad->GetView());
220 if ( view->GetViewType() & kXYView ) {
221 if ( fCrystalXY && IsXYVisible() ) {
222 return fCrystalXY->DistancetoPrimitive(px, py);
223 }
224 }
225 else if ( view->GetViewType() & kZRView && fCrystalZR && fCrystalSide ) {
226 if (HasZRSection())
227 return fCrystalZR->DistancetoPrimitive(px, py);
228 else if ( IsSideVisible() &&
229 (view->GetVisEmcSide() || (view->GetVisEmcHitsSide() && IsFired())) )
230 return fCrystalSide->DistancetoPrimitive(px, py);
231 }
232
233 return 9999;
234}
235
236//_____________________________________________________
237
238void Emc2DCrystal::ExecuteEvent(Int_t event, Int_t px, Int_t py) {
239
240 //if (fWireType == 2 && fWireBubble[0] ) {
241 //if (fWireCone->GetLineWidth() > 1) // FIRED
242 //cout << GetName() << endl;
243
244 BesView *view = dynamic_cast<BesView*>(gPad->GetView());
245
246 if (gBesCursor->GetType() == kBesHand) {
247 if (view) view->ExecuteEvent(event, px, py);
248 }
249 else if (gBesCursor->GetType() == kBesPick){
250
251 if (gPad) gPad->SetCursor(kPointer);
252
253 switch (event) {
254
255 case kMouseEnter :
256 this->SetHighlighted(true);
257
258 //if (this->IsFired() || view->GetVisEmcHitsGlobal()) {
259 Draw();
260
261 fTip->SetPos(px, py);
262 view->UpdateView(0);
263
264 //Long Peixun's update: If ShowInfo is not checked, don't show tip text.
265 if (gBesCursor->GetShowInfo()) fTip->Draw("BR,SAME"); // "BR,ARC,SAME"
266 gPad->Modified();
267 gPad->Update();
268 break;
269
270 case kMouseLeave:
271 if (this->IsHighlighted()) {
272 this->SetHighlighted(false);
273 //if (view->GetVisEmcHitsGlobal())
274 Draw();
275
276 /*
277 if (fTip) {
278 delete fTip;
279 fTip = 0;
280 }
281 */
282
283 view->UpdateView(0);
284 gPad->Modified();
285 gPad->Update();
286 break;
287 }
288 }
289 }
290}
291
292//_____________________________________________________
293
294void Emc2DCrystal::Draw(Option_t *option) {
295 //
296 // Emc2DCrystal draw function
297 TString opt = option;
298 opt.ToUpper();
299
300 AppendPad(option);
301}
302
303//_____________________________________________________
304
305void Emc2DCrystal::Paint(Option_t *option) {
306
307 TString opt = option;
308 opt.ToUpper();
309
310 BesView *view = dynamic_cast<BesView*>(gPad->GetView());
311 if (view->GetViewType() & kXYView) {
312
313 if (fCrystalXY) {
314 fCrystalXY->SetLineColor(lcCrystal);
315 fCrystalXY->SetLineWidth(lwCrystal);
316 fCrystalXY->SetFillColor(fcCrystal);
317 fCrystalXY->SetFillStyle(fsCrystal);
318 }
319
320 if (this->IsFired()) {
321 if (fCrystalXY) {
322 fCrystalXY->SetFillStyle(fsCrystalTrans);
323 }
324 if (fCrystalXYFired) {
325 fCrystalXYFired->SetLineColor(lcCrystalFired);
326 fCrystalXYFired->SetLineWidth(lwCrystalFired);
327 fCrystalXYFired->SetFillColor(fcCrystalFired);
328 fCrystalXYFired->SetFillStyle(fsCrystalFired);
329 }
330 }
331
332 if (this->IsHighlighted()) {
333 if (fCrystalXY) {
334 fCrystalXY->SetLineColor(lcCrystalHL);
335 fCrystalXY->SetLineWidth(lwCrystalHL);
336 fCrystalXY->SetFillColor(fcCrystalHL);
337 fCrystalXY->SetFillStyle(fsCrystalHL);
338 }
339 if (fCrystalXYFired) {
340 fCrystalXYFired->SetLineColor(lcCrystalFiredHL);
341 fCrystalXYFired->SetLineWidth(lwCrystalFiredHL);
342 fCrystalXYFired->SetFillColor(fcCrystalFiredHL);
343 fCrystalXYFired->SetFillStyle(fsCrystalFiredHL);
344 }
345 }
346
347 if ( fCrystalXY && IsXYVisible() ) fCrystalXY->Paint();
348 if (this->IsFired()) {
349 if (view->GetVisEmcHitsGlobal() &&
350 ( (fPart == 0 && view->GetVisEmcHitsEast()) ||
351 (fPart == 1 && view->GetVisEmcHitsBarrel()) ||
352 (fPart == 2 && view->GetVisEmcHitsWest()) )) {
353 if (fCrystalXYFired) {
354 fCrystalXY->Paint();
355 //if (this->IsHighlighted()) cout << GetName() << " is highlighted " << endl;
356 //cout << "Emc fired Crystal size " << fCharge/fChargeMax << endl;
357 fCrystalXYFired->Restore(); // restore default size
358 fCrystalXYFired->SetSize(fCharge/fChargeMax);
359 fCrystalXYFired->Paint();
360 }
361 }
362 }
363 }
364
365 if (view->GetViewType() & kZRView) {
366 if (HasZRSection()) {
367 if (this->IsFired()) {
368 if (fCrystalZRFired) {
369 fCrystalZRFired->SetLineColor(lcCrystalFired);
370 fCrystalZRFired->SetLineWidth(lwCrystalFired);
371 fCrystalZRFired->SetFillColor(fcCrystalFired);
372 fCrystalZRFired->SetFillStyle(fsCrystalFired);
373 }
374 }
375
376 if (fCrystalZR) {
377 fCrystalZR->SetLineColor(lcCrystal);
378 fCrystalZR->SetLineWidth(lwCrystal);
379 fCrystalZR->SetFillColor(fcCrystal);
380 fCrystalZR->SetFillStyle(fsCrystal);
381 }
382
383 if (this->IsHighlighted()) {
384 if (fCrystalZR) {
385 fCrystalZR->SetLineColor(lcCrystalHL);
386 fCrystalZR->SetLineWidth(lwCrystalHL);
387 fCrystalZR->SetFillColor(fcCrystalHL);
388 fCrystalZR->SetFillStyle(fsCrystalHL);
389 }
390 if (fCrystalZRFired) {
391 fCrystalZRFired->SetLineColor(lcCrystalFiredHL);
392 fCrystalZRFired->SetLineWidth(lwCrystalFiredHL);
393 fCrystalZRFired->SetFillColor(fcCrystalFiredHL);
394 fCrystalZRFired->SetFillStyle(fsCrystalFiredHL);
395 }
396 }
397
398 if ( fCrystalZR ) fCrystalZR->Paint();
399 if (this->IsFired()) {
400 if (view->GetVisEmcHitsGlobal() &&
401 ( (fPart == 0 && view->GetVisEmcHitsEast()) ||
402 (fPart == 1 && view->GetVisEmcHitsBarrel()) ||
403 (fPart == 2 && view->GetVisEmcHitsWest()) )) {
404 if (fCrystalZRFired) {
405 //cout << "Emc fired Crystal size " << fCharge/fChargeMax << endl;
406 fCrystalZRFired->Restore(); // restore default size
407 fCrystalZRFired->SetSize(fCharge/fChargeMax);
408 fCrystalZRFired->Paint();
409 }
410 }
411 }
412 }
413
414 // side
415 if (this->IsFired()) {
416 if (fCrystalSideFired) {
417 fCrystalSideFired->SetLineColor(lcCrystalFired);
418 fCrystalSideFired->SetLineWidth(lwCrystalFired);
419 fCrystalSideFired->SetFillColor(fcCrystalFired);
420 fCrystalSideFired->SetFillStyle(fsCrystalFired);
421 }
422 }
423
424 if (fCrystalSide) {
425 fCrystalSide->SetLineColor(lcCrystal);
426 fCrystalSide->SetLineWidth(lwCrystal);
427 fCrystalSide->SetFillColor(fcCrystal);
428 fCrystalSide->SetFillStyle(fsCrystal);
429 }
430
431 if (this->IsHighlighted()) {
432 if (fCrystalSide) {
433 fCrystalSide->SetLineColor(lcCrystalHL);
434 fCrystalSide->SetLineWidth(lwCrystalHL);
435 fCrystalSide->SetFillColor(fcCrystalHL);
436 fCrystalSide->SetFillStyle(fsCrystalHL);
437 }
438 if (fCrystalSideFired) {
439 fCrystalSideFired->SetLineColor(lcCrystalFiredHL);
440 fCrystalSideFired->SetLineWidth(lwCrystalFiredHL);
441 fCrystalSideFired->SetFillColor(fcCrystalFiredHL);
442 fCrystalSideFired->SetFillStyle(fsCrystalFiredHL);
443 }
444 }
445
446 if ( IsSideVisible() ) {
447 if ( (view->GetVisEmcSide() || view->GetVisEmcHitsSide() && this->IsFired()) && fCrystalSide ) fCrystalSide->Paint();
448 if ( this->IsFired() ) {
449 if (view->GetVisEmcHitsGlobal() && view->GetVisEmcHitsSide()) {
450 if (fCrystalSideFired) {
451 //cout << "Emc fired Crystal size " << fCharge/fChargeMax << endl;
452 fCrystalSideFired->Restore(); // restore default size
453 fCrystalSideFired->SetSize(fCharge/fChargeMax);
454 fCrystalSideFired->Paint();
455 }
456 }
457 }
458 }
459 }
460}
461
462//_____________________________________________________
463
464char *Emc2DCrystal::GetObjectInfo(Int_t px, Int_t py) const {
465
466 BesView *view = dynamic_cast<BesView*>(gPad->GetView());
467 if (view) return view->GetObjectInfo(px, py);
468 else return TObject::GetObjectInfo(px, py);
469}
470
471//_____________________________________________________
472
474{
475 bool flag = false;
476 BesView *view = dynamic_cast<BesView*>(gPad->GetView());
477 Double_t viewPhi = view->GetLongitude();
478 viewPhi = Range360(viewPhi);
479 //if (GetName() == TString("Layer0Wire0")) cout << "view " << viewPhi << endl;
480
481 Double_t zrPhi = viewPhi-90.0;
482 zrPhi = Range360(zrPhi);
483 //if (GetName() == TString("Layer0Wire0")) cout << zrPhi << endl;
484
485 for (Int_t i = 0; i < 2; i++) {
486 if (i==1) {
487 zrPhi += 180.0;
488 zrPhi = Range360(zrPhi);
489 }
490
491 if (zrPhi >= fPhiMin-fZRSectionTolerance[GetPart()] &&
492 zrPhi <= fPhiMax+fZRSectionTolerance[GetPart()]) {
493 flag = true;
494 break;
495 }
496 else if (fPhiMin > fPhiMax) { // cross 0 degree
497 //cout << GetName() << " zrPhi " << zrPhi << " min " << fPhiMin << " max " << fPhiMax << endl;
498 if (zrPhi >= fPhiMin-fZRSectionTolerance[GetPart()] ||
499 zrPhi <= fPhiMax+fZRSectionTolerance[GetPart()]) {
500 flag = true;
501 break;
502 }
503 }
504 }
505
506 return flag;
507}
508
509//_____________________________________________________
510
511Double_t Emc2DCrystal::GetAngle(Double_t x, Double_t y) //degree
512{
513 Double_t angle = TMath::ACos( x/TMath::Sqrt(x*x+y*y) ) * TMath::RadToDeg();
514 if ( y<0.0 ) angle *= -1;
515 angle = Range360(angle);
516
517 return angle;
518}
519
520//_____________________________________________________
521
522Double_t Emc2DCrystal::Range360(Double_t input)
523{
524 if (input >= 360.0) {
525 do {
526 input -= 360.0;
527 }
528 while (input >= 360.0);
529 }
530 else if (input < 0.0) {
531 do {
532 input += 360.0;
533 }
534 while (input < 0.0);
535 }
536
537 return input;
538}
539
541{
542 if ( GetPart() != 1 || GetTheta() == 0 || IsFired() )
543 return true;
544 else
545 return false;
546}
547
549{
550 BesView *view = dynamic_cast<BesView*>(gPad->GetView());
551 Double_t viewPhi = view->GetLongitude();
552 Double_t viewPhiMin = viewPhi - sideDeltaPhi;
553 Double_t viewPhiMax = viewPhi + sideDeltaPhi;
554
555 viewPhi = Range360(viewPhi);
556 viewPhiMin = Range360(viewPhiMin);
557 viewPhiMax = Range360(viewPhiMax);
558 //if (GetName() == TString("Layer0Wire0")) cout << "view " << viewPhi << endl;
559
560 if (viewPhiMin < viewPhiMax) { // not cross 0 degree
561 if (fPhiMax > viewPhiMin && fPhiMax < viewPhiMax) return true;
562 }
563 else { // cross 0 degree
564 if (fPhiMax > viewPhiMin || fPhiMax < viewPhiMax) return true;
565 }
566
567 return false;
568}
569
570// the point newP is on the line connecting p1 and p2, cut point by the plane Z=z
571
572void Emc2DCrystal::SetXYPoint(Double_t *p1, Double_t *p2, Double_t *newP, Double_t z)
573{
574 Double_t ratio = fabs( (z-p1[2]) / (p2[2]-p1[2]) );
575 for (Int_t i = 0; i < 3; i++) {
576 newP[i] = p1[i] * (1.0-ratio) + p2[i] * ratio;
577 }
578}
579
580// the point newP is on the line connecting p1 and p2, cut point by the plane R=r
581
582void Emc2DCrystal::SetZRPoint(Double_t *p1, Double_t *p2, Double_t *newP, Double_t r)
583{
584 Double_t r1 = sqrt(p1[0]*p1[0] + p1[1]*p1[1]);
585 Double_t r2 = sqrt(p2[0]*p2[0] + p2[1]*p2[1]);
586
587 Double_t ratio = fabs( (r-r1) / (r2-r1) );
588 for (Int_t i = 0; i < 3; i++) {
589 newP[i] = p1[i] * (1.0-ratio) + p2[i] * ratio;
590 }
591}
592
593void Emc2DCrystal::ProjectECToSide(Double_t *p1, Double_t *newP)
594{
595 // ------ R ---------
596 // | --> |
597 // | r |
598
599 Double_t r1 = sqrt(p1[0]*p1[0] + p1[1]*p1[1]);
600 newP[0] = p1[0] * (brZRPointR/r1);
601 newP[1] = p1[1] * (brZRPointR/r1);
602
603 Double_t drToR = brZRPointR - r1;
604 newP[2] = fabs(ecXYPointZ + drToR) * (p1[2]/fabs(p1[2]));
605
606
607 //if (GetName() == TString("EastEcTheta0Phi0")) {
608 //cout << p1[0] << " " << p1[1] << " " << p1[2] << endl;
609 //cout << newP[0] << " " << newP[1] << " " << newP[2] << endl;
610 //}
611
612}
@ kBesHand
Definition: BesCursor.h:15
@ kBesPick
Definition: BesCursor.h:14
R__EXTERN BesCursor * gBesCursor
Definition: BesCursor.h:40
@ kXYView
Definition: BesStatus.h:15
@ kZRView
Definition: BesStatus.h:16
double P(RecMdcKalTrack *trk)
ClassImp(Emc2DCrystal) Emc2DCrystal
titledef title[20]
Bool_t GetShowInfo()
Definition: BesCursor.h:35
EBESCursorType GetType()
Definition: BesCursor.h:32
virtual void SetText(std::vector< TString > infoCon)
Definition: BesPaveText.cxx:35
virtual void SetPos(Int_t px, Int_t py)
Definition: BesPaveText.cxx:86
virtual void SetSize(Double_t size)
virtual void Paint(Option_t *option="")
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
virtual void Restore()
Double_t GetLongitude()
Definition: BesTView.h:95
Bool_t GetVisEmcHitsBarrel()
Definition: BesView.h:213
Bool_t GetVisEmcHitsGlobal()
Definition: BesView.h:211
virtual void UpdateView(Bool_t resetview=kFALSE)
Definition: BesView.cxx:657
Bool_t GetVisEmcHitsSide()
Definition: BesView.h:215
virtual char * GetObjectInfo(Int_t px, Int_t py) const
Definition: BesView.cxx:869
Bool_t GetVisEmcHitsWest()
Definition: BesView.h:214
EBESViewType GetViewType()
Definition: BesView.h:71
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Definition: BesView.cxx:366
Bool_t GetVisEmcHitsEast()
Definition: BesView.h:212
Bool_t GetVisEmcSide()
Definition: BesView.h:138
virtual void ProjectECToSide(Double_t *p1, Double_t *newP)
virtual void SetZRPoint(Double_t *p1, Double_t *p2, Double_t *newP, Double_t r)
virtual void SetStyle()
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual bool IsSideVisible()
virtual void CloseInfo()
Double_t GetAngle(Double_t x, Double_t y)
virtual char * GetObjectInfo(Int_t px, Int_t py) const
virtual void Draw(Option_t *option="")
virtual Int_t GetTheta()
Definition: Emc2DCrystal.h:50
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
virtual bool HasZRSection()
Double_t Range360(Double_t input)
virtual void SetHighlighted(bool status=true)
Definition: Emc2DCrystal.h:30
virtual Int_t GetPart()
Definition: Emc2DCrystal.h:49
virtual bool IsXYVisible()
virtual void Paint(Option_t *option="")
virtual bool IsHighlighted()
Definition: Emc2DCrystal.h:32
virtual void ClearInfo()
virtual bool IsFired()
Definition: Emc2DCrystal.h:33
virtual void SetXYPoint(Double_t *p1, Double_t *p2, Double_t *newP, Double_t z)
double y[1000]
double x[1000]
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")
legend Draw()