Changeset 7675


Ignore:
Timestamp:
04/30/06 21:48:49 (19 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mjtrain/MJTrainSeparation.cc

    r7674 r7675  
    9292    h.SetTitle("Hadronness-Distribution vs. Size");
    9393    res1.SetTitle("Significance Li/Ma");
    94     res2.SetTitle("Significance Li/Ma * log_{10}(excess)");
     94    res1.SetXTitle("Size [phe]");
     95    res1.SetYTitle("Hadronness");
     96    res2.SetTitle("Significance-Distribution");
     97    res2.SetXTitle("Size-Cut [phe]");
     98    res2.SetYTitle("Hadronness-Cut");
     99    res1.SetContour(50);
     100    res2.SetContour(50);
    95101
    96102    const Int_t nx = h.GetNbinsX();
     
    128134
    129135            res1.SetBinContent(x+1, y+1, sig1);
    130             res2.SetBinContent(x+1, y+1, sig2);
    131136        }
    132137
     
    134139        gr2.SetPoint(x, h.GetXaxis()->GetBinCenter(x+1), h.GetYaxis()->GetBinCenter(maxy2+1));
    135140
     141        delete hx;
     142        delete gx;
     143    }
     144
     145    for (int x=0; x<nx; x++)
     146    {
     147        TH1 *hx = h.ProjectionY("H_py", x+1);
     148        TH1 *gx = g.ProjectionY("G_py", x+1);
     149        for (int y=0; y<ny; y++)
     150        {
     151            const Float_t s = gx->Integral(1, y+1);
     152            const Float_t b = hx->Integral(1, y+1);
     153            const Float_t sig = MMath::SignificanceLiMa(s+b, b);
     154            res2.SetBinContent(x+1, y+1, sig);
     155        }
    136156        delete hx;
    137157        delete gx;
     
    203223    gPad->SetGridy();
    204224    gPad->AddExec("color", "gStyle->SetPalette(1, 0);");
     225    res2.SetMaximum(res2.GetMaximum()*1.075);
    205226    res2.DrawCopy("colz");
    206227}
Note: See TracChangeset for help on using the changeset viewer.