source: tags/Mars-V1.1/macros/optim/optimenergy.C

Last change on this file was 7409, checked in by tbretz, 19 years ago
*** empty log message ***
File size: 1.1 KB
Line 
1void optimenergy()
2{
3 MJOptimizeEnergy opt;
4 opt.SetDebug(2);
5 opt.SetOptimizer(MJOptimize::kMigrad);
6 opt.EnableTestTrain();
7
8 // -------------------- Setup ----------------------------
9 opt.AddParameter("MHillas.fSize");
10
11 opt.FixParameter(0, 0.9, 0, 2); //0.562676
12
13 char *r = "[0]*M[0]";
14
15 // -------------------- Run ----------------------------
16
17 MStatusDisplay *d = new MStatusDisplay;
18 opt.SetDisplay(d);
19
20 /*
21 -------------------- Magic-Cuts ----------------------
22 MFMagicCuts cuts;
23 cuts.SetHadronnessCut(MFMagicCuts::kArea);
24 cuts.SetThetaCut(MFMagicCuts::kOn);
25
26 TArrayD arr(10);
27 arr[0]= 1.3245;
28 arr[1]= 0.208700;
29 arr[2]= 0.229200;
30 arr[3]= 5.305200;
31 arr[4]= 0.098930;
32 arr[5]= -0.082950;
33 arr[6]= 8.2957;
34 arr[7]= 0.8677;
35
36 cuts.SetVariables(arr);
37
38 opt.AddPreCut(&cuts);
39
40 -------------------- Energy Slope --------------------
41 MFEnergySlope slope(-2.8);
42 opt.AddPreCut(&slope);
43
44 -------------------- Other cuts ----------------------
45 opt.AddPreCut("MPointingPos.fZd<7");
46 */
47
48 opt.RunEnergy("ganymedmcpart.root", r);
49}
Note: See TracBrowser for help on using the repository browser.