Changeset 7749 for trunk/MagicSoft/Mars/mjtrain
- Timestamp:
- 05/29/06 15:58:38 (19 years ago)
- Location:
- trunk/MagicSoft/Mars/mjtrain
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mjtrain/MJTrainDisp.cc
r7552 r7749 115 115 MHMatrix train("Train"); 116 116 train.AddColumns(fRules); 117 if (fEnableWeights) 118 train.AddColumn("MWeight.fVal"); 117 119 train.AddColumn("MHillasSrc.fDist*MGeomCam.fConvMm2Deg"); 118 120 //train.AddColumn("TMath::Hypot(MHillasSrc.fDCA, MHillasSrc.fDist)*MGeomCam.fConvMm2Deg"); … … 126 128 fill.AddPreCuts(fPreCuts); 127 129 fill.AddPreCuts(fTrainCuts); 130 fill.AddPreTasks(fPreTasks); 131 fill.AddPostTasks(fPostTasks); 128 132 if (!fill.Process()) 129 133 return kFALSE; … … 135 139 rf.SetNumTry(fNumTry); 136 140 rf.SetNumObsoleteVariables(1); 141 rf.SetLastDataColumnHasWeights(fEnableWeights); 137 142 rf.SetDisplay(fDisplay); 138 143 rf.SetLogStream(fLog); … … 191 196 MFillH fillh(&hist, "", "FillThetaSq"); 192 197 198 // 0 = disp^2 - 2*disp*dist*cos(alpha) + dist^2 199 200 // cos^2 -1 = - sin^2 201 202 // disp = +dist* (cos(alpha) +/- sqrt(cos^2(alpha) - 1) ) 203 193 204 const char *rule = "(MHillasSrc.fDist*MGeomCam.fConvMm2Deg)^2 + (Disp.fVal)^2 - (2*MHillasSrc.fDist*MGeomCam.fConvMm2Deg*Disp.fVal*cos(MHillasSrc.fAlpha*kDeg2Rad))"; 194 205 … … 199 210 eval.SetY1("sqrt(ThetaSquared.fVal)"); 200 211 201 MH3 hdisp("MHillas.fSize", "sqrt(ThetaSquared.fVal)"); 202 hdisp.SetTitle("\\vartheta distribution vs. Size:Size [phe]:\\vartheta [\\circ]"); 203 204 MBinning binsx(100, 10, 100000, "BinningMH3X", "log"); 205 MBinning binsy(100, 0, 2, "BinningMH3Y", "lin"); 212 MH3 hdisp1("MHillas.fSize", "sqrt(ThetaSquared.fVal)"); 213 MH3 hdisp2("MMcEvt.fEnergy", "sqrt(ThetaSquared.fVal)"); 214 hdisp1.SetTitle("\\vartheta distribution vs. Size:Size [phe]:\\vartheta [\\circ]"); 215 hdisp2.SetTitle("\\vartheta distribution vs. Energy:Enerhy [GeV]:\\vartheta [\\circ]"); 216 217 MBinning binsx(50, 10, 100000, "BinningMH3X", "log"); 218 MBinning binsy(50, 0, 1, "BinningMH3Y", "lin"); 206 219 207 220 plist.AddToList(&binsx); 208 221 plist.AddToList(&binsy); 209 222 210 MFillH fillh2(&hdisp, "", "FillMH3"); 211 fillh2.SetDrawOption("blue profx"); 223 MFillH fillh2a(&hdisp1, "", "FillSize"); 224 MFillH fillh2b(&hdisp2, "", "FillEnergy"); 225 fillh2a.SetDrawOption("blue profx"); 226 fillh2b.SetDrawOption("blue profx"); 227 fillh2a.SetNameTab("Size"); 228 fillh2b.SetNameTab("Energy"); 212 229 213 230 tlist.AddToList(&readtst); … … 216 233 tlist.AddToList(&calcthetasq); 217 234 tlist.AddToList(&fillh); 218 tlist.AddToList(&fillh2); 235 tlist.AddToList(&fillh2a); 236 tlist.AddToList(&fillh2b); 219 237 tlist.AddToList(&eval); 220 238 -
trunk/MagicSoft/Mars/mjtrain/MJTrainRanForest.cc
r7710 r7749 18 18 ! Author(s): Thomas Bretz 11/2005 <mailto:tbretz@astro.uni-wuerzburg.de> 19 19 ! 20 ! Copyright: MAGIC Software Development, 2005 20 ! Copyright: MAGIC Software Development, 2005-2006 21 21 ! 22 22 ! … … 31 31 ///////////////////////////////////////////////////////////////////////////// 32 32 #include "MJTrainRanForest.h" 33 34 #include <TFile.h> 33 35 34 36 #include "MLog.h"
Note:
See TracChangeset
for help on using the changeset viewer.