Changeset 1599 for trunk/MagicSoft/Mars/mhist
- Timestamp:
- 11/11/02 10:21:55 (22 years ago)
- Location:
- trunk/MagicSoft/Mars/mhist
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhist/MH3.cc
r1574 r1599 420 420 TObject *MH3::DrawClone(Option_t *opt) const 421 421 { 422 TCanvas &c = *MH::MakeDefCanvas(fHist);423 424 //425 // This is necessary to get the expected bahviour of DrawClone426 //427 gROOT->SetSelectedPad(NULL);428 429 422 TString str(opt); 423 424 TVirtualPad *c = gPad; 425 if (!str.Contains("nonew", TString::kIgnoreCase)) 426 { 427 c = MH::MakeDefCanvas(fHist); 428 429 // 430 // This is necessary to get the expected bahviour of DrawClone 431 // 432 gROOT->SetSelectedPad(NULL); 433 } 430 434 431 435 if (str.Contains("COL", TString::kIgnoreCase)) … … 439 443 { 440 444 TProfile *p = ((TH2*)fHist)->ProfileX("_pfx", -1, 9999, "s"); 445 p->SetLineColor(kBlue); 441 446 p->Draw(only?"":"same"); 442 447 p->SetBit(kCanDelete); … … 446 451 { 447 452 TProfile *p = ((TH2*)fHist)->ProfileY("_pfy", -1, 9999, "s"); 453 p->SetLineColor(kBlue); 448 454 p->Draw(only?"":"same"); 449 455 p->SetBit(kCanDelete); … … 451 457 } 452 458 453 if (fHist->TestBit(kIsLogx)) c .SetLogx();454 if (fHist->TestBit(kIsLogy)) c .SetLogy();455 if (fHist->TestBit(kIsLogz)) c .SetLogz();456 457 c .Modified();458 c .Update();459 460 return &c;459 if (fHist->TestBit(kIsLogx)) c->SetLogx(); 460 if (fHist->TestBit(kIsLogy)) c->SetLogy(); 461 if (fHist->TestBit(kIsLogz)) c->SetLogz(); 462 463 c->Modified(); 464 c->Update(); 465 466 return c; 461 467 } 462 468 … … 493 499 { 494 500 TProfile *p = ((TH2*)fHist)->ProfileX("_pfx", -1, 9999, "s"); 501 p->SetLineColor(kBlue); 495 502 p->Draw(only?"":"same"); 496 503 p->SetBit(kCanDelete); … … 500 507 { 501 508 TProfile *p = ((TH2*)fHist)->ProfileY("_pfy", -1, 9999, "s"); 509 p->SetLineColor(kBlue); 502 510 p->Draw(only?"":"same"); 503 511 p->SetBit(kCanDelete); -
trunk/MagicSoft/Mars/mhist/MHHadronness.cc
r1574 r1599 182 182 // histogram dependant on the particle id. 183 183 // 184 // Sometimes a distance is calculated as NaN (not a number). Such events 185 // are skipped at the moment. 186 // 184 187 Bool_t MHHadronness::Fill(const MParContainer *par) 185 188 { 189 // Preliminary Workaround: FIXME! 190 191 const Double_t h = fHadronness->GetHadronness(); 192 193 if (TMath::IsNaN(h)) 194 return kCONTINUE; 195 186 196 if (fMcEvt->GetPartId()==kGAMMA) 187 fGhness->Fill( fHadronness->GetHadronness());197 fGhness->Fill(h); 188 198 else 189 fPhness->Fill( fHadronness->GetHadronness());199 fPhness->Fill(h); 190 200 191 201 return kTRUE;
Note:
See TracChangeset
for help on using the changeset viewer.