Changeset 8709 for trunk/MagicSoft/Mars/macros/train
- Timestamp:
- 08/25/07 16:30:26 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/macros/train/traindisp.C
r8706 r8709 88 88 89 89 /* 90 -------------------- Magic-Cuts ----------------------90 // -------------------- Magic-Cuts ---------------------- 91 91 MFMagicCuts cuts; 92 92 cuts.SetHadronnessCut(MFMagicCuts::kArea); … … 111 111 opt.AddPreCut(&cuts); 112 112 113 -------------------- Energy Slope -------------------- 114 MFEnergySlope slope(-2.8); 115 opt.AddPreCut(&slope); 116 117 -------------------- Other cuts ---------------------- 113 // -------------------- Other cuts ---------------------- 118 114 opt.AddPreCut("MNewImagePar.fLeakage1<0.0001"); 119 115 opt.AddPreCut("MHillas.fSize>200"); … … 121 117 opt.AddPreCut("MPointingPos.fZd<25"); 122 118 123 ------------------ Zd distribution ------------------- 124 TFile file("ganymed00001111.root"); 125 126 MStatusArray arr; 127 if (arr.Read()<=0) 128 return; 129 TH1D *vstime = (TH1D*)arr.FindObjectInCanvas("Theta", "TH1D", "OnTime"); 130 if (!vstime) 131 return; 132 133 MMcSpectrumWeight weight; 134 weight.SetWeightsZd(vstime); 135 opt.AddPreTask(&weight); 136 137 ---------------------- Histogram -------------------- 138 119 // ---------------------- Histogram -------------------- 139 120 MHn hist("MyHist", "Energy Residual (lg E_{est} - lg E_{mc})"); 140 121 … … 157 138 opt.AddTestTask(&fill); 158 139 159 ------------------------------------------------------ 140 // -------------------- Energy Slope -------------------- 141 // Note, that weight normally doesn't improve anything here. 142 // This is a way to throw away events to a different slope 143 MFEnergySlope slope(-4.0); // New slope for mc spectrum 144 opt.AddPreCut(&slope); // throw away events to change slope 145 146 // This is a way to weight the events to a different spectrum 147 MMcSpectrumWeight weight; 148 weight.SetFormula("pow(X/300, -2.31-0.26*log10(X/300))"); 149 opt.SetWeights(&weight); 150 151 // ------------------ Zd distribution ------------------- 152 TFile file("ganymed00001111.root"); 153 154 MStatusArray arr; 155 if (arr.Read()<=0) 156 return; 157 TH1D *vstime = (TH1D*)arr.FindObjectInCanvas("Theta", "TH1D", "OnTime"); 158 if (!vstime) 159 return -1; 160 161 MMcSpectrumWeight weight; 162 weight.SetWeightsZd(vstime); 163 opt.AddPreTask(&weight); 164 165 // ------------------------------------------------------ 160 166 */ 161 167
Note:
See TracChangeset
for help on using the changeset viewer.