Changeset 8173 for trunk/MagicSoft


Ignore:
Timestamp:
10/27/06 20:12:39 (18 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r8172 r8173  
    3434     - added reading and usage of "CalcHadronness" when processing
    3535       the MCs
     36     - added a plot for the Cut efficiency
    3637
    3738
  • trunk/MagicSoft/Mars/mjobs/MJSpectrum.cc

    r8172 r8173  
    3636#include <TH1.h>
    3737#include <TH2.h>
     38#include <TLine.h>
    3839#include <TFile.h>
    3940#include <TChain.h>
     
    972973
    973974    return kTRUE;
     975}
     976
     977// --------------------------------------------------------------------------
     978//
     979void MJSpectrum::DisplayCutEfficiency(const MHCollectionArea &area0, const MHCollectionArea &area1) const
     980{
     981    if (!fDisplay)
     982        return;
     983
     984    const TH1D &trig = area0.GetHEnergy();
     985    TH1D &cut = (TH1D&)*area1.GetHEnergy().Clone();
     986
     987    fDisplay->AddTab("CutEff");
     988
     989    gPad->SetBorderMode(0);
     990    gPad->SetFrameBorderMode(0);
     991    gPad->SetLogx();
     992    gPad->SetGridx();
     993    gPad->SetGridy();
     994
     995    cut.Divide(&trig);
     996    cut.Scale(100);
     997    cut.SetNameTitle("CutEff", "Background Supression: Cut efficiency (after star)");
     998    cut.SetYTitle("\\eta [%]");
     999    cut.SetDirectory(0);
     1000    cut.SetMinimum(0);
     1001    cut.SetMaximum(100);
     1002    cut.SetBit(kCanDelete);
     1003    cut.Draw();
     1004
     1005    TLine line;
     1006    line.SetLineColor(kBlue);
     1007    line.SetLineWidth(2);
     1008    line.SetLineStyle(kDashed);
     1009    line.DrawLine(cut.GetBinLowEdge(1), 50, cut.GetBinLowEdge(cut.GetNbinsX()+1), 50);
    9741010}
    9751011
     
    12741310    cout << "MC normalization factor:  " << scale << endl;
    12751311
     1312    // Display cut efficiency
     1313    DisplayCutEfficiency(area0, area1);
     1314
    12761315    // Overlay normalized plots
    12771316    DisplaySize(plist, scale);
  • trunk/MagicSoft/Mars/mjobs/MJSpectrum.h

    r8172 r8173  
    5151    TArrayD DisplaySpectrum(MHCollectionArea &area, TH1D &excess, MHEnergyEst &hest, Double_t ontime) const;
    5252    Bool_t  DisplaySize(MParList &plist, Double_t scale) const;
     53    void    DisplayCutEfficiency(const MHCollectionArea &area0, const MHCollectionArea &area1) const;
    5354    Bool_t  PlotSame(MStatusArray &arr, MParList &plist, const char *name, const char *tab, const char *plot, Double_t scale) const;
    5455
Note: See TracChangeset for help on using the changeset viewer.