Ignore:
Timestamp:
11/11/02 10:21:55 (22 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mhist
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mhist/MH3.cc

    r1574 r1599  
    420420TObject *MH3::DrawClone(Option_t *opt) const
    421421{
    422     TCanvas &c = *MH::MakeDefCanvas(fHist);
    423 
    424     //
    425     // This is necessary to get the expected bahviour of DrawClone
    426     //
    427     gROOT->SetSelectedPad(NULL);
    428 
    429422    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    }
    430434
    431435    if (str.Contains("COL", TString::kIgnoreCase))
     
    439443    {
    440444        TProfile *p = ((TH2*)fHist)->ProfileX("_pfx", -1, 9999, "s");
     445        p->SetLineColor(kBlue);
    441446        p->Draw(only?"":"same");
    442447        p->SetBit(kCanDelete);
     
    446451    {
    447452        TProfile *p = ((TH2*)fHist)->ProfileY("_pfy", -1, 9999, "s");
     453        p->SetLineColor(kBlue);
    448454        p->Draw(only?"":"same");
    449455        p->SetBit(kCanDelete);
     
    451457    }
    452458
    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;
    461467}
    462468
     
    493499    {
    494500        TProfile *p = ((TH2*)fHist)->ProfileX("_pfx", -1, 9999, "s");
     501        p->SetLineColor(kBlue);
    495502        p->Draw(only?"":"same");
    496503        p->SetBit(kCanDelete);
     
    500507    {
    501508        TProfile *p = ((TH2*)fHist)->ProfileY("_pfy", -1, 9999, "s");
     509        p->SetLineColor(kBlue);
    502510        p->Draw(only?"":"same");
    503511        p->SetBit(kCanDelete);
  • trunk/MagicSoft/Mars/mhist/MHHadronness.cc

    r1574 r1599  
    182182// histogram dependant on the particle id.
    183183//
     184// Sometimes a distance is calculated as NaN (not a number). Such events
     185// are skipped at the moment.
     186//
    184187Bool_t MHHadronness::Fill(const MParContainer *par)
    185188{
     189    // Preliminary Workaround: FIXME!
     190
     191    const Double_t h = fHadronness->GetHadronness();
     192
     193    if (TMath::IsNaN(h))
     194        return kCONTINUE;
     195
    186196    if (fMcEvt->GetPartId()==kGAMMA)
    187         fGhness->Fill(fHadronness->GetHadronness());
     197        fGhness->Fill(h);
    188198    else
    189         fPhness->Fill(fHadronness->GetHadronness());
     199        fPhness->Fill(h);
    190200
    191201    return kTRUE;
Note: See TracChangeset for help on using the changeset viewer.