Changeset 8708 for trunk/MagicSoft/Mars/macros/train
- Timestamp:
- 08/24/07 19:00:47 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/macros/train/trainenergy.C
r8706 r8708 118 118 119 119 /* 120 -------------------- Energy Slope -------------------- 121 // This is a way to throw away events to a different slope 122 MFEnergySlope slope(-4.0); // New slope for mc spectrum 123 opt.AddPreCut(&slope); // throw away events to change slope 124 125 // This is a way to weight the events to a different spectrum 126 MMcSpectrumWeight weight; 127 weight.SetFormula("pow(X/300, -2.31-0.26*log10(X/300))"); 128 opt.SetWeights(&weight); 129 130 -------------------- Other cuts ---------------------- 131 opt.AddPreCut("MHillasSrc.fDist*MGeomCam.fConvMm2Deg<1.0"); 132 opt.AddPreCut("MHillas.fSize>200"); 133 134 ------------------ Zd distribution ------------------- 135 TFile file("ganymed00001111.root"); 136 137 MStatusArray arr; 138 if (arr.Read()<=0) 139 return; 140 TH1D *vstime = (TH1D*)arr.FindObjectInCanvas("Theta", "TH1D", "OnTime"); 141 if (!vstime) 142 return -1; 143 144 MMcSpectrumWeight weight; 145 weight.SetWeightsZd(vstime); 146 opt.AddPreTask(&weight); 147 148 ---------------------- Histogram -------------------- 120 // ---------------------- Histogram -------------------- 149 121 MHn hist("MyHist", "Energy Residual (lg E_{est} - lg E_{mc})"); 150 122 … … 161 133 opt.AddTestTask(&fill); 162 134 163 ------------------------------------------------------ 135 // -------------------- Other cuts ---------------------- 136 opt.AddPreCut("MHillasSrc.fDist*MGeomCam.fConvMm2Deg<1.0"); 137 opt.AddPreCut("MHillas.fSize>200"); 138 139 // -------------------- Energy Slope -------------------- 140 // Note, that weight normally doesn't improve anything here. 141 // This is a way to throw away events to a different slope 142 MFEnergySlope slope(-4.0); // New slope for mc spectrum 143 opt.AddPreCut(&slope); // throw away events to change slope 144 145 // This is a way to weight the events to a different spectrum 146 MMcSpectrumWeight weight; 147 weight.SetFormula("pow(X/300, -2.31-0.26*log10(X/300))"); 148 opt.SetWeights(&weight); 149 150 // ------------------ Zd distribution ------------------- 151 TFile file("ganymed00001111.root"); 152 153 MStatusArray arr; 154 if (arr.Read()<=0) 155 return; 156 TH1D *vstime = (TH1D*)arr.FindObjectInCanvas("Theta", "TH1D", "OnTime"); 157 if (!vstime) 158 return -1; 159 160 MMcSpectrumWeight weight; 161 weight.SetWeightsZd(vstime); 162 opt.AddPreTask(&weight); 163 164 // ------------------------------------------------------ 164 165 */ 165 166
Note:
See TracChangeset
for help on using the changeset viewer.