Ignore:
Timestamp:
03/31/03 10:37:56 (22 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mhist
Files:
4 edited

Legend:

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

    r1879 r1880  
    5959#include <TLegend.h>
    6060#include <TPaveStats.h>
     61#if ROOT_VERSION_CODE > ROOT_VERSION(3,04,01)
     62#include <THLimitsFinder.h>
     63#endif
    6164
    6265#include "MLog.h"
     
    469472void MH::FindGoodLimits(Int_t nbins, Int_t &newbins, Double_t &xmin, Double_t &xmax, Bool_t isInteger)
    470473{
     474#if ROOT_VERSION_CODE > ROOT_VERSION(3,04,01)
     475    THLimitsFinder::OptimizeLimits(nbins, newbins, xmin, xmax, isInteger);
     476#else
    471477//*-*-*-*-*-*-*-*-*Find reasonable bin values*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
    472478//*-*              ==========================
     
    486492    Double_t binwidth=0;
    487493
    488 #if ROOT_VERSION_CODE < ROOT_VERSION(3,03,01)
    489494    TGaxis::Optimize(umin, umax, nbins, binlow, binhigh, nbins, binwidth, "");
    490 #else
    491     gLog << all << "*********************************************************" << endl;
    492     gLog << all << "ERROR, because Abelardo removed TGaxis::Optimize from" << endl;
    493     gLog << all << " MH::FindGoodLimits to be able to compile Mars with newer" << endl;
    494     gLog << all << " root versions, whatever you are trying to do will fail!!!" << endl;
    495     gLog << all << "*********************************************************" << endl;
    496 #endif
    497495
    498496    if (binwidth <= 0 || binwidth > 1.e+39)
     
    532530
    533531    newbins = nbins;
     532#endif
    534533}
    535534
  • trunk/MagicSoft/Mars/mhist/MHRanForest.cc

    r1870 r1880  
    114114
    115115    Int_t ntrees=fRanForest->GetNumTrees();
    116     //cout<<"filling"<<endl;
     116
    117117    for (Int_t i=0;i<ntrees;i++)
    118118    {
     
    120120            hest+=fRanForest->GetTreeHad(j);
    121121
    122         hest/=Double_t(i+1);
     122        hest/=i+1;
    123123        fSigma[i]+=(htrue-hest)*(htrue-hest);
    124124    }
     
    177177        g.GetXaxis()->SetTitle("Number of Trees");
    178178        g.GetYaxis()->SetTitle("Standard deviation of estimated hadronness");
    179         g.SetMarkerStyle(kFullDotlarge);
    180         g.Draw("P");
    181 
     179        g.SetMarkerStyle(kFullDotMedium);
     180        gPad->Modified();
     181        gPad->Update();
     182        //g.Draw("P");
    182183    }
    183184    gPad->SetGrid();
     
    209210
    210211        fGraphSigma->SetMarkerStyle(kFullDotSmall);
    211         fGraphSigma->Draw("P");
     212        //fGraphSigma->Draw("P");
    212213        gPad->Modified();
    213214        gPad->Update();
  • trunk/MagicSoft/Mars/mhist/MHRanForestGini.cc

    r1870 r1880  
    121121    for (Int_t i=0; i<n; i++)
    122122    {
     123        fGini[i]/=fRanForest->GetNumTrees();
     124        fGini[i]/=fRanForest->GetNumData();
     125
    123126        Stat_t ip = i+1.;
    124         fGini[i]/=Stat_t(fRanForest->GetNumTrees());
    125         fGini[i]/=Stat_t(fRanForest->GetNumData());
    126127        Stat_t ig = fGini[i];
     128
    127129        max=TMath::Max(max,ig);
    128130        min=TMath::Min(min,ig);
     131
    129132        fGraphGini->SetPoint(i,ip,ig);
    130133    }
     
    157160        g.GetXaxis()->SetTitle("No. of RF-input parameter");
    158161        g.GetYaxis()->SetTitle("Mean decrease in Gini-index [a.u.]");
    159         g.SetMarkerStyle(kFullDotlarge);
    160         g.Draw("P");
    161 
     162        g.SetMarkerStyle(kFullDotMedium);
     163        //g.Draw("P");
     164        gPad->Modified();
     165        gPad->Update();
    162166    }
    163167    gPad->SetGrid();
     
    189193
    190194        fGraphGini->SetMarkerStyle(kFullDotSmall);
    191         fGraphGini->Draw("P");
     195        //fGraphGini->Draw("P");
    192196        gPad->Modified();
    193197        gPad->Update();
  • trunk/MagicSoft/Mars/mhist/MHRanForestGini.h

    r1870 r1880  
    1919{
    2020private:
    21     MRanForest *fRanForest;
     21    MRanForest *fRanForest;  //!
    2222
    23     TArrayF fGini;
    24     TGraph *fGraphGini;
     23    TArrayF fGini;           //!
     24    TGraph *fGraphGini;      //->
    2525
    2626public:
Note: See TracChangeset for help on using the changeset viewer.