Changeset 8656 for trunk/MagicSoft/Mars/macros/optim
- Timestamp:
- 08/03/07 13:00:52 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/macros/optim/optimdisp.C
r7409 r8656 8 8 9 9 // -------------------- Setup ---------------------------- 10 opt.AddParameter("1-(MHillas.fWidth/MHillas.fLength)"); // M[0]11 opt.AddParameter("log10(MNewImagePar.fLeakage1+1)"); // M[1]12 10 13 opt.SetParameter(0, 1.30871); // Setup [0] 14 opt.SetParameter(1, 5.81119); // Setup [1] 15 opt.SetParameter(2, 0.763486); // Setup [2] 11 opt.AddParameter("1-MHillas.fWidth/MHillas.fLength"); // M[0] 12 opt.AddParameter("MHillasExt.fSlopeLong*sign(MHillasSrc.fCosDeltaAlpha)/MGeomCam.fConvMm2Deg"); // M[1] 13 opt.AddParameter("MNewImagePar.fLeakage1"); // M[2] 14 opt.AddParameter("log10(MHillas.fSize)"); // M[3] 16 15 17 char *r = "([0]+([1]*pow(M[1], [2])))*M[0]"; // Rule to calc Disp 16 // -------------- Parametrization -------------------- 17 18 char *r = "M[0]*([0] + [1]*M[1] + [2]*M[2] + (M[3]>[3])*[4]*(M[3]-[3])^2)"; 19 20 opt.FixParameter(0, 1.266195); 21 opt.FixParameter(1, 0.100577); 22 opt.FixParameter(2, 1.80309); 23 opt.FixParameter(3, 2.87177); 24 opt.FixParameter(4, 0.616823); 25 26 opt.AddPreCut("MNewImagePar.fLeakage1>0"); 27 opt.AddPreCut("log10(MHillas.fSize)<3.2"); 28 29 //opt.AddPreCut("abs(MHillasSrc.fDCA*MGeomCam.fConvMm2Deg)<0.2"); 30 //opt.AddPreCut("(MHillasSrc.fDist*MGeomCam.fConvMm2Deg-0.5)*7.2>MHillasExt.fSlopeLong*sign(MHillasSrc.fCosDeltaAlpha)/MGeomCam.fConvMm2Deg"); 31 opt.AddPreCut("MHillasExt.fM3Long*sign(MHillasSrc.fCosDeltaAlpha)*MGeomCam.fConvMm2Deg>-0.07"); 32 opt.AddPreCut("DataType.fVal>0.5"); 18 33 19 34 // -------------------- Run ---------------------------- … … 26 41 MFMagicCuts cuts; 27 42 cuts.SetHadronnessCut(MFMagicCuts::kArea); 28 cuts.SetThetaCut(MFMagicCuts::k On);43 cuts.SetThetaCut(MFMagicCuts::kNone); 29 44 30 45 TArrayD arr(10); 31 46 arr[0]= 1.3245; 32 47 arr[1]= 0.208700; 33 arr[2]= 0.229200; 34 arr[3]= 5.305200; 35 arr[4]= 0.098930; 36 arr[5]= -0.082950; 37 arr[6]= 8.2957; 38 arr[7]= 0.8677; 48 arr[2]= 0.0836169; 49 arr[3]= 5.63973; 50 arr[4]= 0.0844195; 51 arr[5]= -0.07; 52 arr[6]= 13.2; 53 arr[7]= 1.0; 54 arr[8]= 7.2; 55 arr[9]= 0.5; 39 56 40 57 cuts.SetVariables(arr); … … 47 64 48 65 -------------------- Other cuts ---------------------- 49 opt.AddPreCut("MNewImagePar.fLeakage1<0.0001"); 50 */ 66 */ 51 67 52 opt.RunDisp("ganymed mcpart.root", r);68 opt.RunDisp("ganymed00000001-summary.root", r); 53 69 } 54 70 55 71 /* ------------------ Good strategy ------------------- 56 1) first fix parameters: 57 opt.FixParameter(1, 0); 58 opt.FixParameter(2, 1); 59 and process only showers without leakage 60 opt.AddPreCut("MNewImagePar.fLeakage1<0.0001"); 61 2) release parameters 1 and 2 and fix 0 to the result of 1) 62 opt.FixParameter(0, 0.8362); 63 opt.SetParameter(1, 2.0); 64 opt.SetParameter(2, 0.8); 65 and process only showers with leakage 66 opt.AddPreCut("MNewImagePar.fLeakage1>0.0001"); 67 3) release all parameters and start with the result of 1) and 2) 68 opt.SetParameter(0, 0.8362); 69 opt.SetParameter(1, 5.84); 70 opt.SetParameter(2, 0.76); 71 and process all showers. (Comment out opt.PreCuts()) 72 */ 72 73 Par | 0 1 2 3 4 | Cut 74 -------+---------------------------------+----------------------- 75 Fit 1 | 1.3 0.8 fix=0 fix=0 fix=0 | Leak1==0 lgSize<2.5 76 Fit 2 | fix fix fix=0 2.4 0.3 | Leak1==0 77 Fit 2 | fix fix 1.8 fix fix | Leak1>0 78 Fit 3 | free free fix fix fix | -/- 79 -------+---------------------------------+----------------------- 80 */
Note:
See TracChangeset
for help on using the changeset viewer.