- Timestamp:
- 09/03/07 15:07:42 (17 years ago)
- Location:
- trunk/MagicSoft/Mars/macros/train
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/macros/train/traindisp.C
r8718 r8729 94 94 MFMagicCuts cuts; 95 95 cuts.SetHadronnessCut(MFMagicCuts::kArea); 96 cuts.SetThetaCut(MFMagicCuts::k On);96 cuts.SetThetaCut(MFMagicCuts::kNone); 97 97 98 98 TArrayD arr(13); … … 112 112 cuts.SetVariables(arr); 113 113 114 opt.Add PreCut(&cuts);114 opt.AddTestCut(&cuts); 115 115 116 116 // -------------------- Other cuts ---------------------- … … 119 119 opt.AddPreCut("MHillasSrc.fDCA*MGeomCam.fConvMm2Deg<0.3"); 120 120 opt.AddPreCut("MPointingPos.fZd<25"); 121 opt.AddTestCut("MHillasExt.fM3Long *sign(MHillasSrc.fCosDeltaAlpha)*MGeomCam.fConvMm2Deg>-0.07"); 122 opt.AddTestCut("MHillasExt.fSlopeLong*sign(MHillasSrc.fCosDeltaAlpha)/MGeomCam.fConvMm2Deg<(MHillasSrc.fDist*MGeomCam.fConvMm2Deg-0.5)*7.2"); 121 123 122 124 // ---------------------- Histogram -------------------- 123 MHn hist("MyHist", " Energy Residual (lg E_{est} - lg E_{mc})");125 MHn hist("MyHist", "Dist Residual (Disp-Dist)"); 124 126 125 127 MBinning bins(50, -0.5, 0.5); … … 166 168 opt.AddPreTask(&weight); 167 169 170 // ------- A trick for testing the parametrization ------- 171 // This will overwrite the random forest calculated disp. 172 // Therefore you can test our disp-parametrization. 173 MParameterCalc calc("(1.15136 +" 174 "0.0681437*MHillasExt.fSlopeLong*sign(MHillasSrc.fCosDeltaAlpha)/3.37e-3 +" 175 "0.0507821*(log10(MHillas.fSize)-1.51279)^2*(log10(MHillas.fSize)>1.51279) +" 176 "2.62932*MNewImagePar.fLeakage1)*" 177 "(1-MHillas.fWidth/MHillas.fLength)"); 178 calc.SetNameParameter("Disp"); 179 opt.AddPostTask(&calc); 180 168 181 // ------------------------------------------------------ 169 182 */ 183 184 // To allow overwrite of existing files 185 // opt.SetOverwrite(); 170 186 171 187 // The number is the number of events read from the file -
trunk/MagicSoft/Mars/macros/train/trainenergy.C
r8708 r8729 165 165 */ 166 166 167 // To allow overwrite of existing files 168 // opt.SetOverwrite(); 169 167 170 opt.Train("rf-energy.root", set, 30000); 168 171 }
Note:
See TracChangeset
for help on using the changeset viewer.