Ignore:
Timestamp:
11/25/02 09:12:47 (22 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

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

    r1610 r1668  
    4545//    - black: acceptance of gammas (Ag) vs. the hadroness
    4646//    - red:   acceptance of non gammas (Ah) vs. the hadroness
    47 //    - blue:  2D distance of (acceptance_hadrons, acceptances_gammas)
    48 //             to optimum (0, 1)
    49 //             1-sqrt(Ag*Ag + (1-Ah)*(1-Ah))
    5047//  * Bottom Left Corner:
    5148//    Naive quality factor: Ag/sqrt(Ah)
     
    5653////////////////////////////////////////////////////////////////////////////
    5754#include "MHHadronness.h"
     55
     56/*
     57 // - blue:  2D distance of (acceptance_hadrons, acceptances_gammas)
     58 //          to optimum (0, 1):  1-sqrt(Ag*Ag + (1-Ah)*(1-Ah))
     59 */
    5860
    5961#include <TPad.h>
     
    113115    fQfac->SetTitle(" Naive Quality factor ");
    114116
    115     fMinDist = new TH1D("MinDist", "Minimum Dist to (0, 1)", nbins, 0, 1);
    116     fMinDist->SetXTitle("Hadronness");
    117     fMinDist->SetYTitle("Distance");
     117    /*
     118     fMinDist = new TH1D("MinDist", "Minimum Dist to (0, 1)", nbins, 0, 1);
     119     fMinDist->SetXTitle("Hadronness");
     120     fMinDist->SetYTitle("Distance");
     121     */
    118122
    119123    //fQfac->SetDirectory(NULL);
    120124    fGhness->SetDirectory(NULL);
    121125    fPhness->SetDirectory(NULL);
    122     fMinDist->SetDirectory(NULL);
     126    //fMinDist->SetDirectory(NULL);
    123127    fIntGhness->SetDirectory(NULL);
    124128    fIntPhness->SetDirectory(NULL);
     
    136140    delete fIntPhness;
    137141    delete fQfac;
    138     delete fMinDist;
     142    //    delete fMinDist;
    139143    delete fGraph;
    140144}
     
    266270            continue;
    267271
    268         fMinDist->SetBinContent(i, 1-sqrt(ip*ip + (ig-1)*(ig-1)));
    269 
    270         Double_t val = ig/sqrt(ip);
     272        //fMinDist->SetBinContent(i, 1-sqrt(ip*ip + (ig-1)*(ig-1)));
     273
     274        const Double_t val = ig/sqrt(ip);
    271275        fQfac->SetPoint(i, ig, val);
    272276
     
    360364
    361365    *fLog << "Used " << fGhness->GetEntries() << " Gammas and " << fPhness->GetEntries() << " Hadrons." << endl;
    362     *fLog << " acc(hadron)  acc(gamma)" << endl <<endl;
    363 
    364     *fLog << "    0.005   "  << Form("%6.3f", GetGammaAcceptance(0.005)) << endl;
    365     *fLog << "    0.02    "  << Form("%6.3f", GetGammaAcceptance(0.02)) << endl;
    366     *fLog << "    0.05    "  << Form("%6.3f", GetGammaAcceptance(0.05)) << endl;
    367     *fLog << "    0.1     "  << Form("%6.3f", GetGammaAcceptance(0.1 )) << endl;
    368     *fLog << "    0.2     "  << Form("%6.3f", GetGammaAcceptance(0.2 )) << endl;
    369     *fLog << "    0.3     "  << Form("%6.3f", GetGammaAcceptance(0.3 )) << endl;
    370     *fLog << Form("%6.3f", GetHadronAcceptance(0.1)) << "       0.1  " << endl;
    371     *fLog << Form("%6.3f", GetHadronAcceptance(0.2)) << "       0.2  " << endl;
    372     *fLog << Form("%6.3f", GetHadronAcceptance(0.3)) << "       0.3  " << endl;
    373     *fLog << Form("%6.3f", GetHadronAcceptance(0.4)) << "       0.4  " << endl;
    374     *fLog << Form("%6.3f", GetHadronAcceptance(0.5)) << "       0.5  " << endl;
    375     *fLog << Form("%6.3f", GetHadronAcceptance(0.6)) << "       0.6  " << endl;
    376     *fLog << Form("%6.3f", GetHadronAcceptance(0.7)) << "       0.7  " << endl;
    377     *fLog << Form("%6.3f", GetHadronAcceptance(0.8)) << "       0.8  " << endl;
     366    *fLog << "acc(hadron)  acc(gamma)  acc(g)/acc(h)" << endl <<endl;
     367
     368    *fLog << "    0.005    " << Form("%6.3f", GetGammaAcceptance(0.005)) << "    " << Form("%6.3f", GetGammaAcceptance(0.005)/0.005) << endl;
     369    *fLog << "    0.02     " << Form("%6.3f", GetGammaAcceptance(0.02))  << "    " << Form("%6.3f", GetGammaAcceptance(0.02)/0.02) << endl;
     370    *fLog << "    0.05     " << Form("%6.3f", GetGammaAcceptance(0.05))  << "    " << Form("%6.3f", GetGammaAcceptance(0.05)/0.05) << endl;
     371    *fLog << "    0.1      " << Form("%6.3f", GetGammaAcceptance(0.1 ))  << "    " << Form("%6.3f", GetGammaAcceptance(0.1)/0.1) << endl;
     372    *fLog << "    0.2      " << Form("%6.3f", GetGammaAcceptance(0.2 ))  << "    " << Form("%6.3f", GetGammaAcceptance(0.2)/0.2) << endl;
     373    *fLog << "    0.3      " << Form("%6.3f", GetGammaAcceptance(0.3 ))  << "    " << Form("%6.3f", GetGammaAcceptance(0.3)/0.3) << endl;
     374    *fLog << Form("%6.3f", GetHadronAcceptance(0.1)) << "        0.1  " << endl;
     375    *fLog << Form("%6.3f", GetHadronAcceptance(0.2)) << "        0.2  " << endl;
     376    *fLog << Form("%6.3f", GetHadronAcceptance(0.3)) << "        0.3  " << endl;
     377    *fLog << Form("%6.3f", GetHadronAcceptance(0.4)) << "        0.4  " << endl;
     378    *fLog << Form("%6.3f", GetHadronAcceptance(0.5)) << "        0.5  " << endl;
     379    *fLog << Form("%6.3f", GetHadronAcceptance(0.6)) << "        0.6  " << endl;
     380    *fLog << Form("%6.3f", GetHadronAcceptance(0.7)) << "        0.7  " << endl;
     381    *fLog << Form("%6.3f", GetHadronAcceptance(0.8)) << "        0.8  " << endl;
    378382    *fLog << endl;
    379383
    380     const Int_t h = fMinDist->GetMaximumBin();
    381     *fLog << "Minimum Distance to (0, 1): " << Form("%.2f", 1-fMinDist->GetMaximum()) << " @ H=" << fMinDist->GetBinCenter(h) << endl;
    382     *fLog << "  Acc Gammas = " << Form("%3.0f", fIntGhness->GetBinContent(h)*100) << "%, ";
    383     *fLog << "Acc Hadrons = " << Form("%3.0f", fIntPhness->GetBinContent(h)*100) << "%" << endl;
     384    /*
     385     const Int_t h = fMinDist->GetMaximumBin();
     386     *fLog << "Minimum Distance to (0, 1): " << Form("%.2f", 1-fMinDist->GetMaximum()) << " @ H=" << fMinDist->GetBinCenter(h) << endl;
     387     *fLog << "  Acc Gammas = " << Form("%3.0f", fIntGhness->GetBinContent(h)*100) << "%, ";
     388     *fLog << "Acc Hadrons = " << Form("%3.0f", fIntPhness->GetBinContent(h)*100) << "%" << endl;
     389     */
    384390
    385391    *fLog << "Q-Factor @ Acc Gammas=0.5: Q(0.5)=" << Form("%.1f", GetQ05()) << endl;
     
    412418    Getiphness()->SetLineColor(kRed);
    413419    Getiphness()->DrawCopy("same");
    414     fMinDist->SetLineColor(kBlue);
    415     fMinDist->DrawCopy("same");
     420    /*
     421     fMinDist->SetLineColor(kBlue);
     422     fMinDist->DrawCopy("same");
     423     */
    416424    c.cd(3);
    417425    //GetQfac()->DrawCopy();
     
    449457        gPad->Update();
    450458    }
     459    /*
    451460    const Int_t h = fMinDist->GetMaximumBin();
    452461    TMarker *m = new TMarker(fIntPhness->GetBinContent(h),
     
    455464    m->SetBit(kCanDelete);
    456465    m->Draw();
     466    */
    457467    return &c;
    458468}
     
    482492    Getiphness()->SetLineColor(kRed);
    483493    Getiphness()->Draw("same");
    484     fMinDist->SetLineColor(kBlue);
    485     fMinDist->Draw("same");
     494    /*
     495     fMinDist->SetLineColor(kBlue);
     496     fMinDist->Draw("same");
     497     */
    486498    gPad->cd(3);
    487499    //GetQfac()->Draw();
     
    516528        gPad->Update();
    517529    }
     530    /*
    518531    const Int_t h = fMinDist->GetMaximumBin();
    519532    TMarker *m = new TMarker(fIntPhness->GetBinContent(h),
     
    522535    m->SetBit(kCanDelete);
    523536    m->Draw();
    524 }
     537    */
     538}
Note: See TracChangeset for help on using the changeset viewer.