- Timestamp:
- 10/24/02 17:04:13 (22 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r1553 r1554 8 8 * mhist/MHMatrix.cc: 9 9 - changed the Print member function to be more flexible 10 11 * mhist/MHHadroness.[h,cc]: 12 - changed fQfac from TH to TGraph 13 - changed the Qfactor-plot x-axis from Hadronness to Gamma-Acceptance 10 14 11 15 -
trunk/MagicSoft/Mars/macros/multidimdist.C
r1553 r1554 98 98 tlist.PrintStatistics(); 99 99 100 fillmat.Print("size");101 fillmat2.Print("size");100 matrix.Print("size"); 101 matrix2.Print("size"); 102 102 103 103 // --------------------------------------------------------- … … 112 112 113 113 MMultiDimDistCalc calc; 114 calc.SetUseNumRows( 0);115 calc.SetUseKernelMethod(kTRUE);114 calc.SetUseNumRows(15); 115 //calc.SetUseKernelMethod(kTRUE); 116 116 tlist2.AddToList(&calc); 117 117 -
trunk/MagicSoft/Mars/mgui/MCamDisplay.cc
r1540 r1554 190 190 // 191 191 const Float_t ratio = fGeomCam->GetPixRatio(i); 192 const Float_t pnum = ratio*pix.GetErrorPhot();192 const Float_t pnum = sqrt(ratio)*pix.GetErrorPhot(); 193 193 194 194 (*this)[pix.GetPixId()].SetFillColor(GetColor(pnum, min, max)); -
trunk/MagicSoft/Mars/mhist/MHHadroness.cc
r1354 r1554 105 105 fIntPhness->SetYTitle("Acceptance"); 106 106 107 /* 107 108 fQfac = new TH1D("Qfac", "Naive Quality factor", nbins, 0, 1); 108 109 fQfac->SetXTitle("Hadroness"); 109 110 fQfac->SetYTitle("Quality"); 111 */ 112 fQfac = new TGraph; 113 fQfac->SetTitle(" Naive Quality factor "); 110 114 111 115 fMinDist = new TH1D("MinDist", "Minimum Dist to (0, 1)", nbins, 0, 1); … … 113 117 fMinDist->SetYTitle("Distance"); 114 118 115 fQfac->SetDirectory(NULL);119 //fQfac->SetDirectory(NULL); 116 120 fGhness->SetDirectory(NULL); 117 121 fPhness->SetDirectory(NULL); … … 200 204 201 205 fGraph->Set(n); 206 fQfac->Set(n); 202 207 203 208 const Stat_t sumg = fGhness->Integral(1, n+1); … … 218 223 219 224 fMinDist->SetBinContent(i, 1-sqrt(ip*ip + (ig-1)*(ig-1))); 220 fQfac->SetBinContent(i, ig/sqrt(ip)); 225 fQfac->SetPoint(i, ig, ig/sqrt(ip)); 226 //fQfac->SetBinContent(fQfac->FindBin(ig), ig/sqrt(ip)); 227 *fLog << all << i << ": " << ig << " " << ig/sqrt(ip) << endl; 221 228 } 222 229 … … 279 286 *fLog << " Acc Gammas = " << Form("%3.0f", fIntGhness->GetBinContent(h)*100) << "%, "; 280 287 *fLog << "Acc Hadrons = " << Form("%3.0f", fIntPhness->GetBinContent(h)*100) << "%" << endl; 281 const Int_t q = GetQfac()->GetMaximumBin(); 282 *fLog << "Maximum Q-Factor: " << GetQfac()->GetMaximum() << " @ H="; 283 *fLog << GetQfac()->GetBinCenter(q) << endl;; 284 *fLog << " Acc Gammas = " << Form("%3.0f", fIntGhness->GetBinContent(q)*100) << "%, "; 285 *fLog << "Acc Hadrons = " << Form("%3.0f", fIntPhness->GetBinContent(q)*100) << "%" << endl; 288 /* 289 const Int_t q = GetQfac()->GetMaximumBin(); 290 *fLog << "Maximum Q-Factor: " << GetQfac()->GetMaximum() << " @ H="; 291 *fLog << GetQfac()->GetBinCenter(q) << endl;; 292 *fLog << " Acc Gammas = " << Form("%3.0f", fIntGhness->GetBinContent(q)*100) << "%, "; 293 *fLog << "Acc Hadrons = " << Form("%3.0f", fIntPhness->GetBinContent(q)*100) << "%" << endl; 294 */ 286 295 *fLog << endl; 287 296 } … … 303 312 Getphness()->SetLineColor(kRed); 304 313 Getphness()->DrawCopy("same"); 305 c.cd(4);306 TGraph &g = (TGraph&)*fGraph->DrawClone("AC");307 g.SetBit(kCanDelete);308 gPad->Modified();309 gPad->Update();310 if (g.GetHistogram())311 {312 g.GetXaxis()->SetRangeUser(0, 1);313 g.GetXaxis()->SetTitle("Acceptance Hadrons");314 g.GetYaxis()->SetTitle("Acceptance Gammas");315 g.SetMarkerStyle(kFullDotSmall);316 g.Draw("P");317 318 gPad->Modified();319 gPad->Update();320 }321 const Int_t h = fMinDist->GetMaximumBin();322 TMarker *m = new TMarker(fIntPhness->GetBinContent(h),323 fIntGhness->GetBinContent(h), kStar);324 m->SetMarkerColor(kBlue);325 m->SetBit(kCanDelete);326 m->Draw();327 314 c.cd(2); 328 315 gStyle->SetOptStat(0); … … 333 320 fMinDist->DrawCopy("same"); 334 321 c.cd(3); 335 GetQfac()->DrawCopy(); 336 337 return &c; 338 } 339 340 // -------------------------------------------------------------------------- 341 // 342 // Draw all histograms. (For the Meaning see class description) 343 // 344 void MHHadroness::Draw(Option_t *) 345 { 346 if (!gPad) 347 MakeDefCanvas("Hadroness", fTitle); 348 349 gPad->Divide(2, 2); 350 351 gPad->cd(1); 352 gStyle->SetOptStat(10); 353 Getghness()->Draw(); 354 Getphness()->SetLineColor(kRed); 355 Getphness()->Draw("same"); 356 gPad->cd(4); 357 fGraph->Draw("AC"); 358 gPad->Modified(); 359 gPad->Update(); 360 if (fGraph->GetHistogram()) 361 { 362 fGraph->GetXaxis()->SetRangeUser(0, 1); 363 fGraph->GetXaxis()->SetTitle("Acceptance Hadrons"); 364 fGraph->GetYaxis()->SetTitle("Acceptance Gammas"); 365 fGraph->SetMarkerStyle(kFullDotSmall); 366 fGraph->Draw("P"); 322 //GetQfac()->DrawCopy(); 323 TGraph &g2 = (TGraph&)*fQfac->DrawClone("AC"); 324 g2.SetBit(kCanDelete); 325 gPad->Modified(); 326 gPad->Update(); 327 if (g2.GetHistogram()) 328 { 329 g2.GetXaxis()->SetRangeUser(0, 1); 330 g2.GetXaxis()->SetTitle("Acceptance Gammas"); 331 g2.GetYaxis()->SetTitle("Quality"); 332 g2.SetMarkerStyle(kFullDotSmall); 333 g2.Draw("P"); 334 335 gPad->Modified(); 336 gPad->Update(); 337 } 338 c.cd(4); 339 gPad->Modified(); 340 gPad->Update(); 341 TGraph &g = (TGraph&)*fGraph->DrawClone("AC"); 342 g.SetBit(kCanDelete); 343 gPad->Modified(); 344 gPad->Update(); 345 if (g.GetHistogram()) 346 { 347 g.GetXaxis()->SetRangeUser(0, 1); 348 g.GetXaxis()->SetTitle("Acceptance Hadrons"); 349 g.GetYaxis()->SetTitle("Acceptance Gammas"); 350 g.SetMarkerStyle(kFullDotSmall); 351 g.Draw("P"); 352 367 353 gPad->Modified(); 368 354 gPad->Update(); … … 374 360 m->SetBit(kCanDelete); 375 361 m->Draw(); 362 return &c; 363 } 364 365 // -------------------------------------------------------------------------- 366 // 367 // Draw all histograms. (For the Meaning see class description) 368 // 369 void MHHadroness::Draw(Option_t *) 370 { 371 if (!gPad) 372 MakeDefCanvas("Hadroness", fTitle); 373 374 gPad->Divide(2, 2); 375 376 gPad->cd(1); 377 gStyle->SetOptStat(10); 378 Getghness()->Draw(); 379 Getphness()->SetLineColor(kRed); 380 Getphness()->Draw("same"); 376 381 gPad->cd(2); 377 382 gStyle->SetOptStat(0); … … 382 387 fMinDist->Draw("same"); 383 388 gPad->cd(3); 384 GetQfac()->Draw(); 385 } 389 //GetQfac()->Draw(); 390 fQfac->Draw("AC"); 391 gPad->Modified(); 392 gPad->Update(); 393 if (fQfac->GetHistogram()) 394 { 395 fQfac->GetXaxis()->SetRangeUser(0, 1); 396 fQfac->GetXaxis()->SetTitle("Acceptance Gammas"); 397 fQfac->GetYaxis()->SetTitle("Quality"); 398 fQfac->SetMarkerStyle(kFullDotSmall); 399 fQfac->Draw("P"); 400 401 gPad->Modified(); 402 gPad->Update(); 403 } 404 gPad->cd(4); 405 gPad->Modified(); 406 gPad->Update(); 407 fGraph->Draw("AC"); 408 gPad->Modified(); 409 gPad->Update(); 410 if (fGraph->GetHistogram()) 411 { 412 fGraph->GetXaxis()->SetRangeUser(0, 1); 413 fGraph->GetXaxis()->SetTitle("Acceptance Hadrons"); 414 fGraph->GetYaxis()->SetTitle("Acceptance Gammas"); 415 fGraph->SetMarkerStyle(kFullDotSmall); 416 fGraph->Draw("P"); 417 gPad->Modified(); 418 gPad->Update(); 419 } 420 const Int_t h = fMinDist->GetMaximumBin(); 421 TMarker *m = new TMarker(fIntPhness->GetBinContent(h), 422 fIntGhness->GetBinContent(h), kStar); 423 m->SetMarkerColor(kBlue); 424 m->SetBit(kCanDelete); 425 m->Draw(); 426 } -
trunk/MagicSoft/Mars/mhist/MHHadroness.h
r1336 r1554 22 22 TH1D* fIntPhness; // Hadrons Acceptance 23 23 TH1D* fIntGhness; // Gammas Acceptance 24 TH1D* fQfac; // Quality factor25 24 TH1D* fMinDist; // Minimum Distance to optimum acceptance 26 25 26 TGraph *fQfac; // Quality factor 27 27 TGraph *fGraph; // gamma acceptance vs. hadron acceptance 28 28 … … 33 33 Double_t GetGammaAcceptance(Double_t acchad) const; 34 34 35 TH1D *GetQfac() const { return fQfac; }36 35 TH1D *Getghness() const { return fGhness; } 37 36 TH1D *Getphness() const { return fPhness; } -
trunk/MagicSoft/Mars/mhist/MHMatrix.cc
r1553 r1554 324 324 TString str(o); 325 325 326 *fLog << all << flush; 327 326 328 if (str.Contains("size", TString::kIgnoreCase)) 327 329 { 328 *fLog << all <<GetDescriptor() << ": NumColumns=" << fM.GetNcols();330 *fLog << GetDescriptor() << ": NumColumns=" << fM.GetNcols(); 329 331 *fLog << " NumRows=" << fM.GetNrows() << endl; 330 332 } 331 333 332 334 if (!fData && str.Contains("cols", TString::kIgnoreCase)) 333 *fLog << all <<"Sorry, no column information available." << endl;335 *fLog << "Sorry, no column information available." << endl; 334 336 335 337 if (fData && str.Contains("cols", TString::kIgnoreCase))
Note:
See TracChangeset
for help on using the changeset viewer.