Changeset 1880 for trunk/MagicSoft/Mars/mhist
- Timestamp:
- 03/31/03 10:37:56 (22 years ago)
- Location:
- trunk/MagicSoft/Mars/mhist
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhist/MH.cc
r1879 r1880 59 59 #include <TLegend.h> 60 60 #include <TPaveStats.h> 61 #if ROOT_VERSION_CODE > ROOT_VERSION(3,04,01) 62 #include <THLimitsFinder.h> 63 #endif 61 64 62 65 #include "MLog.h" … … 469 472 void MH::FindGoodLimits(Int_t nbins, Int_t &newbins, Double_t &xmin, Double_t &xmax, Bool_t isInteger) 470 473 { 474 #if ROOT_VERSION_CODE > ROOT_VERSION(3,04,01) 475 THLimitsFinder::OptimizeLimits(nbins, newbins, xmin, xmax, isInteger); 476 #else 471 477 //*-*-*-*-*-*-*-*-*Find reasonable bin values*-*-*-*-*-*-*-*-*-*-*-*-*-*-* 472 478 //*-* ========================== … … 486 492 Double_t binwidth=0; 487 493 488 #if ROOT_VERSION_CODE < ROOT_VERSION(3,03,01)489 494 TGaxis::Optimize(umin, umax, nbins, binlow, binhigh, nbins, binwidth, ""); 490 #else491 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 #endif497 495 498 496 if (binwidth <= 0 || binwidth > 1.e+39) … … 532 530 533 531 newbins = nbins; 532 #endif 534 533 } 535 534 -
trunk/MagicSoft/Mars/mhist/MHRanForest.cc
r1870 r1880 114 114 115 115 Int_t ntrees=fRanForest->GetNumTrees(); 116 //cout<<"filling"<<endl; 116 117 117 for (Int_t i=0;i<ntrees;i++) 118 118 { … … 120 120 hest+=fRanForest->GetTreeHad(j); 121 121 122 hest/= Double_t(i+1);122 hest/=i+1; 123 123 fSigma[i]+=(htrue-hest)*(htrue-hest); 124 124 } … … 177 177 g.GetXaxis()->SetTitle("Number of Trees"); 178 178 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"); 182 183 } 183 184 gPad->SetGrid(); … … 209 210 210 211 fGraphSigma->SetMarkerStyle(kFullDotSmall); 211 fGraphSigma->Draw("P");212 //fGraphSigma->Draw("P"); 212 213 gPad->Modified(); 213 214 gPad->Update(); -
trunk/MagicSoft/Mars/mhist/MHRanForestGini.cc
r1870 r1880 121 121 for (Int_t i=0; i<n; i++) 122 122 { 123 fGini[i]/=fRanForest->GetNumTrees(); 124 fGini[i]/=fRanForest->GetNumData(); 125 123 126 Stat_t ip = i+1.; 124 fGini[i]/=Stat_t(fRanForest->GetNumTrees());125 fGini[i]/=Stat_t(fRanForest->GetNumData());126 127 Stat_t ig = fGini[i]; 128 127 129 max=TMath::Max(max,ig); 128 130 min=TMath::Min(min,ig); 131 129 132 fGraphGini->SetPoint(i,ip,ig); 130 133 } … … 157 160 g.GetXaxis()->SetTitle("No. of RF-input parameter"); 158 161 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(); 162 166 } 163 167 gPad->SetGrid(); … … 189 193 190 194 fGraphGini->SetMarkerStyle(kFullDotSmall); 191 fGraphGini->Draw("P");195 //fGraphGini->Draw("P"); 192 196 gPad->Modified(); 193 197 gPad->Update(); -
trunk/MagicSoft/Mars/mhist/MHRanForestGini.h
r1870 r1880 19 19 { 20 20 private: 21 MRanForest *fRanForest; 21 MRanForest *fRanForest; //! 22 22 23 TArrayF fGini; 24 TGraph *fGraphGini; 23 TArrayF fGini; //! 24 TGraph *fGraphGini; //-> 25 25 26 26 public:
Note:
See TracChangeset
for help on using the changeset viewer.