Changeset 8669 for trunk/MagicSoft
- Timestamp:
- 08/15/07 18:06:11 (17 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r8668 r8669 32 32 - fixed a bug in the quality cuts (all showers with saturating 33 33 hi-gains were removed) 34 35 * mhbase/MH3.cc: 36 - allow to split the histogram name and the binning name 37 - set a different line color in case of the "same" option 34 38 35 39 -
trunk/MagicSoft/Mars/mhbase/MH3.cc
r8082 r8669 18 18 ! Author(s): Thomas Bretz 2002 <mailto:tbretz@astro.uni-wuerzburg.de> 19 19 ! 20 ! Copyright: MAGIC Software Development, 2000-200 220 ! Copyright: MAGIC Software Development, 2000-2007 21 21 ! 22 22 ! … … 41 41 // "MyHillas.fLength" 42 42 // 43 // If you want to use a different unit for histogramming use SetScaleX, 44 // SetScaleY and SetScaleZ. 45 // 46 // 47 // Binning name 48 // ============ 49 // 43 50 // The axis binning is retrieved from the parameter list, too. Create a 44 51 // MBinning with the name "Binning" plus the name of your MH3 container 45 52 // plus the axis name ("X", "Y" or "Z") and add it to the parameter list. 46 53 // 47 // If you want to use a different unit for histogramming use SetScaleX, 48 // SetScaleY and SetScaleZ. 54 // If the binning should have a different name than the histogram name 55 // the binning name can be added to the name, eg.: 56 // SetName("MyHistName;MyBinning") 57 // Instead of BinningMyHistName[XYZ] the parameter list will be searched 58 // for BinningMyBinning[XYZ]. 49 59 // 50 60 // … … 59 69 // the axis titles. For more information see TH1::SetTitle, eg. 60 70 // SetTitle("MyHist;x[mm];y[cm];Counts"); 71 // 61 72 // 62 73 // For example: … … 301 312 fHist->Reset(); 302 313 314 const Int_t split = fName.First(';'); 315 316 const TString name = split<0 ? fName : fName(0, split); 317 const TString bins = split<0 ? fName : fName(split+1, fName.Length()); 318 303 319 TString bname("Binning"); 304 bname += fName;320 bname += bins; 305 321 306 322 MBinning *binsx = NULL; … … 364 380 365 381 TString title("Histogram for "); 366 title += fName;382 title += name; 367 383 title += Form(" (%dD)", fDimension); 368 384 369 fHist->SetName( fName);385 fHist->SetName(name); 370 386 fHist->SetTitle(fTitle==gsDefTitle ? title : fTitle); 371 387 fHist->SetDirectory(0); … … 577 593 578 594 const Bool_t only = str.Contains("only") && fDimension==2; 579 const Bool_t same = str.Contains("same") && fDimension ==2;595 const Bool_t same = str.Contains("same") && fDimension<3; 580 596 const Bool_t blue = str.Contains("blue") && fDimension==2; 581 597 const Bool_t profx = str.Contains("profx") && fDimension==2; … … 587 603 str.ReplaceAll("profy", ""); 588 604 str.ReplaceAll(" ", ""); 605 606 if (same && fDimension==1) 607 { 608 fHist->SetLineColor(kBlue); 609 fHist->SetMarkerColor(kBlue); 610 } 589 611 590 612 // FIXME: We may have to remove all our own options from str! -
trunk/MagicSoft/Mars/mjobs/MJCut.cc
r8662 r8669 760 760 MSrcPosRndm srcrndm; 761 761 762 MH3 hvs("MPointingPos.fZd"); 763 hvs.SetName("ThetaOff;Theta"); 764 hvs.SetTitle("Effective On-Time vs. Zenith Angle;\\Theta [\\circ];T_{on} [s]"); 765 766 MFillH fillvs(&hvs, "", "FillOnTime"); 767 if (!set.IsMonteCarlo()) 768 fillvs.SetWeight("MEffectiveOnTime"); 769 fillvs.SetNameTab("OnTime"); 770 771 // It is not really necessary to re-calculate the image parameters 772 // for the the on-source for MCs, but it is done for symmetry reasons 773 if (set.IsMonteCarlo()) 774 tlist2.AddToList(&fillvs); 775 762 776 tlist2.AddToList(&scalc); 763 777 tlist2.AddToList(&scor); … … 808 822 809 823 tlist.AddToList(&readoff); 824 if (!set.IsMonteCarlo()) 825 tlist.AddToList(&fillvs, "EffectiveOnTime"); 810 826 if (gLog.GetDebugLevel()>4) 811 827 tlist.AddToList(&print2, "EffectiveOnTime"); … … 917 933 fillvs.SetNameTab("OnTime"); 918 934 */ 919 MH3 hvs("MPointingPos.fZd");920 hvs.SetName("Theta");921 hvs.SetTitle("Effective On-Time vs. Zenith Angle;\\Theta [\\circ];T_{on} [s]");922 MFillH fillvs(&hvs, "", "FillOnTime");923 if (!set.IsMonteCarlo())924 fillvs.SetWeight("MEffectiveOnTime");925 fillvs.SetNameTab("OnTime");926 935 927 936 /* … … 962 971 if (set.IsWobbleMode() && !set.IsMonteCarlo()) 963 972 tlist2.AddToListBefore(&fillsrc, &hcalc); 973 974 MH3 hvs2("MPointingPos.fZd"); 975 hvs2.SetName("Theta"); 976 hvs2.SetTitle("Effective On-Time vs. Zenith Angle;\\Theta [\\circ];T_{on} [s]"); 977 978 MFillH fillvs2(&hvs2, "", "FillOnTime"); 979 if (!set.IsMonteCarlo()) 980 fillvs2.SetWeight("MEffectiveOnTime"); 981 fillvs2.SetNameTab("OnTime"); 982 fillvs2.SetDrawOption(set.HasOffSequences()||set.IsWobbleMode()?"same":""); 964 983 965 984 if (!fWriteOnly) … … 995 1014 996 1015 if (!set.IsMonteCarlo()) 997 tlist. AddToList(&fillvs, "EffectiveOnTime");1016 tlist.Replace(&fillvs2); 998 1017 else 999 // It is not really necessary to re-calculate the image parameters 1000 // for the the on-source for MCs, but it is done for symmetry reasons 1001 tlist2.AddToListBefore(&fillvs, &scalc); 1018 tlist2.Replace(&fillvs2); 1002 1019 } 1003 1020
Note:
See TracChangeset
for help on using the changeset viewer.