Changeset 8701
- Timestamp:
- 08/23/07 16:14:54 (17 years ago)
- Location:
- trunk/MagicSoft/Mars/mjobs
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mjobs/MJSpectrum.cc
r8680 r8701 54 54 // Container 55 55 #include "MH3.h" 56 #include "MHn.h" 56 57 #include "MBinning.h" 57 58 #include "MDataSet.h" … … 595 596 // Compare both histograms 596 597 *fLog << inf << "Comparing theta distributions for data and MCs." << endl; 598 597 599 const Double_t prob = proj.Chi2Test(theta, "P"); 598 600 if (prob==1) … … 1235 1237 line.SetLineStyle(kDashed); 1236 1238 line.DrawLine(cut.GetBinLowEdge(1), 50, cut.GetBinLowEdge(cut.GetNbinsX()+1), 50); 1239 } 1240 1241 void MJSpectrum::SetupHistEvtDist(MHn &hist) const 1242 { 1243 hist.AddHist("MMcEvt.fEnergy"); 1244 hist.InitName("EnergyDist;EnergyEst"); 1245 hist.InitTitle("Unweighted event distribution (Real statistics);E [GeV];Counts;"); 1246 1247 hist.AddHist("MPointingPos.fZd"); 1248 hist.InitName("ZdDist;Theta"); 1249 hist.InitTitle("Unweighted event distribution (Real statistics);Zd [\\circ];Counts;"); 1250 } 1251 1252 void MJSpectrum::SetupHistEnergyEst(MHn &hist) const 1253 { 1254 hist.AddHist("MHillas.fSize", "log10(MEnergyEst.fVal)-log10(MMcEvt.fEnergy)"); 1255 hist.InitName("ResSize;Size;EnergyResidual"); 1256 hist.InitTitle(";S [phe];\\Delta lg E;"); 1257 hist.SetDrawOption("colz profx"); 1258 1259 hist.AddHist("MPointingPos.fZd", "log10(MEnergyEst.fVal)-log10(MMcEvt.fEnergy)"); 1260 hist.InitName("ResTheta;Theta;EnergyResidual"); 1261 hist.InitTitle(";Zd [\\circ];\\Delta lg E;"); 1262 hist.SetDrawOption("colz profx"); 1263 1264 hist.AddHist("MNewImagePar.fLeakage1", "log10(MEnergyEst.fVal)-log10(MMcEvt.fEnergy)"); 1265 hist.InitName("ResLeak;Leakage;EnergyResidual"); 1266 hist.InitTitle(";Leak;\\Delta lg E;"); 1267 hist.SetDrawOption("colz profx"); 1268 1269 hist.AddHist("MHillasSrc.fDist*3.37e-3", "log10(MEnergyEst.fVal)-log10(MMcEvt.fEnergy)"); 1270 hist.InitName("ResDist;Dist;EnergyResidual"); 1271 hist.InitTitle(";D [\\circ];\\Delta lg E;"); 1272 hist.SetDrawOption("colz profx"); 1273 } 1274 1275 void MJSpectrum::SetupHistDisp(MHn &hist) const 1276 { 1277 hist.AddHist("MHillas.fSize", "MHillasSrc.fDist*3.37e-3/Disp.fVal"); 1278 hist.InitName("ResSize;Size;Xi"); 1279 hist.InitTitle(";S [phe];\\Delta Xi;"); 1280 hist.SetDrawOption("colz profx"); 1281 1282 hist.AddHist("MPointingPos.fZd", "MHillasSrc.fDist*3.37e-3/Disp.fVal"); 1283 hist.InitName("ResTheta;Theta;Xi"); 1284 hist.InitTitle(";Zd [\\circ];\\Delta Xi;"); 1285 hist.SetDrawOption("colz profx"); 1286 1287 hist.AddHist("MNewImagePar.fLeakage1", "MHillasSrc.fDist*3.37e-3/Disp.fVal"); 1288 hist.InitName("ResLeak;Leakage;Xi"); 1289 hist.InitTitle(";Leak;\\Delta Xi;"); 1290 hist.SetDrawOption("colz profx"); 1291 1292 hist.AddHist("MHillasExt.fSlopeLong*sign(MHillasSrc.fCosDeltaAlpha)/3.37e-3", "MHillasSrc.fDist*3.37e-3/Disp.fVal"); 1293 hist.InitName("ResSlope;Slope;Xi"); 1294 hist.InitTitle(";Slope;\\Delta Xi;"); 1295 hist.SetDrawOption("colz profx"); 1237 1296 } 1238 1297 … … 1339 1398 // MC distribution. Unfortunately this must be done manually 1340 1399 // because we are multiplying column by column 1341 for (int y=0; y< hist.GetNbinsY(); y++)1342 for (int x=0; x< hist.GetNbinsX(); x++)1400 for (int y=0; y<=hist.GetNbinsY()+1; y++) 1401 for (int x=0; x<=hist.GetNbinsX()+1; x++) 1343 1402 { 1344 1403 hist.SetBinContent(x, y, hist.GetBinContent(x, y)*htheta.GetBinContent(x)); … … 1421 1480 fill5.SetNameTab("Threshold"); 1422 1481 1482 /* 1423 1483 MH3 henergy("MMcEvt.fEnergy"); 1424 1484 henergy.SetName("EventDist;EnergyEst"); 1425 1485 henergy.SetTitle("Unweighted event distribution (Real statistics);E [GeV];Counts;"); 1426 1486 henergy.Sumw2(); 1487 */ 1488 1489 // --------------------------------------------------------- 1490 1491 MBinning binsA(50, 10, 100000, "BinningSize", "log"); 1492 MBinning binsB(50, -1, 1, "BinningEnergyResidual", "lin"); 1493 MBinning binsC(50, 0, 0.3, "BinningLeakage", "lin"); 1494 MBinning binsD(50, 0, 3, "BinningXi", "lin"); 1495 1496 plist.AddToList(&binsA); 1497 plist.AddToList(&binsB); 1498 plist.AddToList(&binsC); 1499 plist.AddToList(&binsD); 1500 1501 MHn heest("Energy", "Energy Residual (lg E_{est} - lg E_{mc})"); 1502 SetupHistEnergyEst(heest); 1503 1504 MHn hdisp("Disp", "Xi (Dist/Disp)"); 1505 SetupHistDisp(hdisp); 1506 1507 MHn henergy("EvtDist"); 1508 SetupHistEvtDist(henergy); 1509 1510 MFillH fill4b(&heest, "", "FillEnergyResidual"); 1511 fill4b.SetWeight(); 1512 1513 MFillH fill4c(&hdisp, "", "FillDispResidual"); 1514 fill4c.SetWeight(); 1515 1516 // --------------------------------------------------------- 1427 1517 1428 1518 MH3 hsize("MHillas.fSize"); … … 1433 1523 plist.AddToList(&hsize); 1434 1524 plist.AddToList(&bins); 1525 1526 // --------------------------------------------------------- 1435 1527 1436 1528 MFillH fill0a(&henergy, "", "FillEventDist"); … … 1461 1553 fill8a.SetWeight(); 1462 1554 1555 // FIXME: To be done: A task checking the lower 1% after the lower 1556 // energy limit! 1557 1463 1558 MTaskEnv taskenv0("CalcHadronness"); 1464 1559 taskenv0.SetDefault(fCalcHadronness); … … 1490 1585 tlist2.AddToList(&fill31); 1491 1586 tlist2.AddToList(&fill4); 1587 tlist2.AddToList(&fill4b); 1588 tlist2.AddToList(&fill4c); 1492 1589 tlist2.AddToList(&fill5); 1493 1590 tlist2.AddToList(&fill0a); -
trunk/MagicSoft/Mars/mjobs/MJSpectrum.h
r8680 r8701 12 12 13 13 class MH3; 14 class MHn; 14 15 class MTask; 15 16 class MParList; … … 34 35 35 36 Bool_t fForceTheta; 37 38 // Setup Histograms 39 void SetupHistEvtDist(MHn &hist) const; 40 void SetupHistEnergyEst(MHn &hist) const; 41 void SetupHistDisp(MHn &hist) const; 36 42 37 43 // Read Input
Note:
See TracChangeset
for help on using the changeset viewer.