Changeset 17909


Ignore:
Timestamp:
06/11/14 15:25:09 (10 years ago)
Author:
Daniela Dorner
Message:
adapted DrawNicePlot for FACT
Location:
trunk/Mars/mhflux
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/mhflux/MHAlpha.cc

    r9851 r17909  
    963963
    964964    const Double_t imax = fFit.GetSignalIntegralMax();
    965     if (imax<1)
    966         h->GetXaxis()->SetRangeUser(0, 0.6*0.6);
     965//    cout << "-----> IMAX " << imax << endl;
     966//    cout << " bins: " << binlo << " " << binhi << endl;
     967//    cout << " max: " << hon->GetMaximum() << " " << hoff->GetMaximum() << endl;
     968//    if (imax<1)
     969//        h->GetXaxis()->SetRangeUser(0, 0.6*0.6);
     970
     971    //to avoid that '0.3' is not displayed properly
     972    h->GetXaxis()->SetRangeUser(0, 0.29);
    967973
    968974    // scale off-data
     
    971977    fit.ScaleAndFit(*hon, hoff);
    972978
     979//    cout << " max: " << hon->GetMaximum() << " " << hoff->GetMaximum() << endl;
    973980    hon->SetMinimum(0);
    974981    hoff->SetMinimum(0);
     
    978985    {
    979986        hoff->SetMaximum(TMath::Max(hon->GetMaximum(),hoff->GetMaximum())*1.1);
     987//        cout << "setting max to " << TMath::Max(hon->GetMaximum(),hoff->GetMaximum())*1.1 << endl;
    980988        hoff->Draw("bar");
    981989        hon->Draw("same");
     
    10211029
    10221030    TText *ptxt = pave->AddText(" ");
    1023     ptxt->SetTextAlign(23);
    1024 
    1025     ptxt = pave->AddText(MString::Format("Significance %.1f\\sigma,  off-scale %.2f",
     1031    ptxt->SetTextAlign(20);
     1032
     1033    ptxt = pave->AddText(MString::Format("Significance  %.1f#sigma,  off-scale %.2f",
    10261034                                         fit.GetSignificance(), fit.GetScaleFactor()));
    1027     ptxt->SetTextAlign(23);
     1035//    ptxt = pave->AddText(MString::Format("Significance  %.1f,  off-scale  %.2f",
     1036//                                         fit.GetSignificance(), fit.GetScaleFactor()));
     1037    ptxt->SetTextAlign(21);
     1038    //ptxt->SetTextFont(4);
     1039    //ptxt->SetTextSize(0.2);
    10281040
    10291041    ptxt = pave->AddText(MString::Format("%.1f excess events,  %.1f background events",
    10301042                                         fit.GetEventsExcess(), fit.GetEventsBackground()));
    1031     ptxt->SetTextAlign(23);
     1043
     1044    ptxt->SetTextAlign(21);
     1045    //ptxt->SetTextFont(4);
     1046    //ptxt->SetTextSize(20);
     1047
    10321048    pave->SetBit(kCanDelete);
    10331049    pave->Draw();
  • trunk/Mars/mhflux/MHAlpha.h

    r9303 r17909  
    139139    }
    140140
    141     void DrawNicePlot(const char *title="MAGIC Telescope observation", const char *watermark="preliminary", Int_t binlo=-1, Int_t binhi=9999) { DrawNicePlot(kTRUE, title, watermark, binlo, binhi); } //*MENU*
     141    void DrawNicePlot(const char *title="FACT observation", const char *watermark="preliminary", Int_t binlo=-1, Int_t binhi=9999) { DrawNicePlot(kTRUE, title, watermark, binlo, binhi); } //*MENU*
    142142    void DrawNicePlot(Bool_t newc, const char *title=0, const char *watermark=0, Int_t binlo=-1, Int_t binhi=9999);
    143143    void DrawAll() { DrawAll(kTRUE); } //*MENU*
Note: See TracChangeset for help on using the changeset viewer.