Changeset 1668 for trunk/MagicSoft/Mars/mhist/MHHadronness.cc
- Timestamp:
- 11/25/02 09:12:47 (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhist/MHHadronness.cc
r1610 r1668 45 45 // - black: acceptance of gammas (Ag) vs. the hadroness 46 46 // - red: acceptance of non gammas (Ah) vs. the hadroness 47 // - blue: 2D distance of (acceptance_hadrons, acceptances_gammas)48 // to optimum (0, 1)49 // 1-sqrt(Ag*Ag + (1-Ah)*(1-Ah))50 47 // * Bottom Left Corner: 51 48 // Naive quality factor: Ag/sqrt(Ah) … … 56 53 //////////////////////////////////////////////////////////////////////////// 57 54 #include "MHHadronness.h" 55 56 /* 57 // - blue: 2D distance of (acceptance_hadrons, acceptances_gammas) 58 // to optimum (0, 1): 1-sqrt(Ag*Ag + (1-Ah)*(1-Ah)) 59 */ 58 60 59 61 #include <TPad.h> … … 113 115 fQfac->SetTitle(" Naive Quality factor "); 114 116 115 fMinDist = new TH1D("MinDist", "Minimum Dist to (0, 1)", nbins, 0, 1); 116 fMinDist->SetXTitle("Hadronness"); 117 fMinDist->SetYTitle("Distance"); 117 /* 118 fMinDist = new TH1D("MinDist", "Minimum Dist to (0, 1)", nbins, 0, 1); 119 fMinDist->SetXTitle("Hadronness"); 120 fMinDist->SetYTitle("Distance"); 121 */ 118 122 119 123 //fQfac->SetDirectory(NULL); 120 124 fGhness->SetDirectory(NULL); 121 125 fPhness->SetDirectory(NULL); 122 fMinDist->SetDirectory(NULL);126 //fMinDist->SetDirectory(NULL); 123 127 fIntGhness->SetDirectory(NULL); 124 128 fIntPhness->SetDirectory(NULL); … … 136 140 delete fIntPhness; 137 141 delete fQfac; 138 delete fMinDist;142 // delete fMinDist; 139 143 delete fGraph; 140 144 } … … 266 270 continue; 267 271 268 fMinDist->SetBinContent(i, 1-sqrt(ip*ip + (ig-1)*(ig-1)));269 270 Double_t val = ig/sqrt(ip);272 //fMinDist->SetBinContent(i, 1-sqrt(ip*ip + (ig-1)*(ig-1))); 273 274 const Double_t val = ig/sqrt(ip); 271 275 fQfac->SetPoint(i, ig, val); 272 276 … … 360 364 361 365 *fLog << "Used " << fGhness->GetEntries() << " Gammas and " << fPhness->GetEntries() << " Hadrons." << endl; 362 *fLog << " acc(hadron) acc(gamma)" << endl <<endl;363 364 *fLog << " 0.005 " << Form("%6.3f", GetGammaAcceptance(0.005)) << endl;365 *fLog << " 0.02 " << Form("%6.3f", GetGammaAcceptance(0.02))<< endl;366 *fLog << " 0.05 " << Form("%6.3f", GetGammaAcceptance(0.05))<< endl;367 *fLog << " 0.1 " << Form("%6.3f", GetGammaAcceptance(0.1 ))<< endl;368 *fLog << " 0.2 " << Form("%6.3f", GetGammaAcceptance(0.2 ))<< endl;369 *fLog << " 0.3 " << Form("%6.3f", GetGammaAcceptance(0.3 ))<< endl;370 *fLog << Form("%6.3f", GetHadronAcceptance(0.1)) << " 0.1 " << endl;371 *fLog << Form("%6.3f", GetHadronAcceptance(0.2)) << " 0.2 " << endl;372 *fLog << Form("%6.3f", GetHadronAcceptance(0.3)) << " 0.3 " << endl;373 *fLog << Form("%6.3f", GetHadronAcceptance(0.4)) << " 0.4 " << endl;374 *fLog << Form("%6.3f", GetHadronAcceptance(0.5)) << " 0.5 " << endl;375 *fLog << Form("%6.3f", GetHadronAcceptance(0.6)) << " 0.6 " << endl;376 *fLog << Form("%6.3f", GetHadronAcceptance(0.7)) << " 0.7 " << endl;377 *fLog << Form("%6.3f", GetHadronAcceptance(0.8)) << " 0.8 " << endl;366 *fLog << "acc(hadron) acc(gamma) acc(g)/acc(h)" << endl <<endl; 367 368 *fLog << " 0.005 " << Form("%6.3f", GetGammaAcceptance(0.005)) << " " << Form("%6.3f", GetGammaAcceptance(0.005)/0.005) << endl; 369 *fLog << " 0.02 " << Form("%6.3f", GetGammaAcceptance(0.02)) << " " << Form("%6.3f", GetGammaAcceptance(0.02)/0.02) << endl; 370 *fLog << " 0.05 " << Form("%6.3f", GetGammaAcceptance(0.05)) << " " << Form("%6.3f", GetGammaAcceptance(0.05)/0.05) << endl; 371 *fLog << " 0.1 " << Form("%6.3f", GetGammaAcceptance(0.1 )) << " " << Form("%6.3f", GetGammaAcceptance(0.1)/0.1) << endl; 372 *fLog << " 0.2 " << Form("%6.3f", GetGammaAcceptance(0.2 )) << " " << Form("%6.3f", GetGammaAcceptance(0.2)/0.2) << endl; 373 *fLog << " 0.3 " << Form("%6.3f", GetGammaAcceptance(0.3 )) << " " << Form("%6.3f", GetGammaAcceptance(0.3)/0.3) << endl; 374 *fLog << Form("%6.3f", GetHadronAcceptance(0.1)) << " 0.1 " << endl; 375 *fLog << Form("%6.3f", GetHadronAcceptance(0.2)) << " 0.2 " << endl; 376 *fLog << Form("%6.3f", GetHadronAcceptance(0.3)) << " 0.3 " << endl; 377 *fLog << Form("%6.3f", GetHadronAcceptance(0.4)) << " 0.4 " << endl; 378 *fLog << Form("%6.3f", GetHadronAcceptance(0.5)) << " 0.5 " << endl; 379 *fLog << Form("%6.3f", GetHadronAcceptance(0.6)) << " 0.6 " << endl; 380 *fLog << Form("%6.3f", GetHadronAcceptance(0.7)) << " 0.7 " << endl; 381 *fLog << Form("%6.3f", GetHadronAcceptance(0.8)) << " 0.8 " << endl; 378 382 *fLog << endl; 379 383 380 const Int_t h = fMinDist->GetMaximumBin(); 381 *fLog << "Minimum Distance to (0, 1): " << Form("%.2f", 1-fMinDist->GetMaximum()) << " @ H=" << fMinDist->GetBinCenter(h) << endl; 382 *fLog << " Acc Gammas = " << Form("%3.0f", fIntGhness->GetBinContent(h)*100) << "%, "; 383 *fLog << "Acc Hadrons = " << Form("%3.0f", fIntPhness->GetBinContent(h)*100) << "%" << endl; 384 /* 385 const Int_t h = fMinDist->GetMaximumBin(); 386 *fLog << "Minimum Distance to (0, 1): " << Form("%.2f", 1-fMinDist->GetMaximum()) << " @ H=" << fMinDist->GetBinCenter(h) << endl; 387 *fLog << " Acc Gammas = " << Form("%3.0f", fIntGhness->GetBinContent(h)*100) << "%, "; 388 *fLog << "Acc Hadrons = " << Form("%3.0f", fIntPhness->GetBinContent(h)*100) << "%" << endl; 389 */ 384 390 385 391 *fLog << "Q-Factor @ Acc Gammas=0.5: Q(0.5)=" << Form("%.1f", GetQ05()) << endl; … … 412 418 Getiphness()->SetLineColor(kRed); 413 419 Getiphness()->DrawCopy("same"); 414 fMinDist->SetLineColor(kBlue); 415 fMinDist->DrawCopy("same"); 420 /* 421 fMinDist->SetLineColor(kBlue); 422 fMinDist->DrawCopy("same"); 423 */ 416 424 c.cd(3); 417 425 //GetQfac()->DrawCopy(); … … 449 457 gPad->Update(); 450 458 } 459 /* 451 460 const Int_t h = fMinDist->GetMaximumBin(); 452 461 TMarker *m = new TMarker(fIntPhness->GetBinContent(h), … … 455 464 m->SetBit(kCanDelete); 456 465 m->Draw(); 466 */ 457 467 return &c; 458 468 } … … 482 492 Getiphness()->SetLineColor(kRed); 483 493 Getiphness()->Draw("same"); 484 fMinDist->SetLineColor(kBlue); 485 fMinDist->Draw("same"); 494 /* 495 fMinDist->SetLineColor(kBlue); 496 fMinDist->Draw("same"); 497 */ 486 498 gPad->cd(3); 487 499 //GetQfac()->Draw(); … … 516 528 gPad->Update(); 517 529 } 530 /* 518 531 const Int_t h = fMinDist->GetMaximumBin(); 519 532 TMarker *m = new TMarker(fIntPhness->GetBinContent(h), … … 522 535 m->SetBit(kCanDelete); 523 536 m->Draw(); 524 } 537 */ 538 }
Note:
See TracChangeset
for help on using the changeset viewer.