Changeset 1216 for trunk/MagicSoft/Mars/mhist/MHHillasSrc.cc
- Timestamp:
- 02/13/02 16:40:37 (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhist/MHHillasSrc.cc
r1210 r1216 38 38 #include <TCanvas.h> 39 39 40 #include "MLog.h" 41 #include "MLogManip.h" 42 43 #include "MGeomCam.h" 44 40 45 #include "MParList.h" 41 46 … … 62 67 // connect all the histogram with the container fHist 63 68 // 64 fAlpha = new TH1F("Alpha [deg]", "Alpha of Hillas", 90, 0, 90);65 fDist = new TH1F("Dist [mm]", "Dist of Hillas", 100, 0, 600);69 fAlpha = new TH1F("Alpha", "Alpha of Ellipse", 90, 0, 90); 70 fDist = new TH1F("Dist", "Dist of Ellipse", 100, 0, 600); 66 71 67 72 fAlpha->SetDirectory(NULL); … … 90 95 // instances of MBinning (with the names 'BinningAlpha' and 'BinningDist') 91 96 // are found in the parameter list 97 // Use this function if you want to set the conversion factor which 98 // is used to convert the mm-scale in the camera plain into the deg-scale 99 // used for histogram presentations. The conversion factor is part of 100 // the camera geometry. Please create a corresponding MGeomCam container. 92 101 // 93 102 Bool_t MHHillasSrc::SetupFill(const MParList *plist) … … 95 104 const MBinning* binsa = (MBinning*)plist->FindObject("BinningAlpha"); 96 105 const MBinning* binsd = (MBinning*)plist->FindObject("BinningDist"); 97 98 if (binsa) 99 SetBinning(fAlpha, binsa); 100 101 if (binsd) 102 SetBinning(fDist, binsd); 106 if (!binsa || !binsd) 107 { 108 *fLog << err << dbginf << "At least one MBinning not found... aborting." << endl; 109 return kFALSE; 110 } 111 112 SetBinning(fAlpha, binsa); 113 SetBinning(fDist, binsd); 114 115 const MGeomCam *geom = (MGeomCam*)plist->FindObject("MGeomCam"); 116 if (!geom) 117 { 118 *fLog << warn << dbginf << "No Camera Geometry available. Using mm-scale for histograms." << endl; 119 return kTRUE; 120 } 121 122 fDist->GetXaxis()->SetTitle("Dist [\\circ]"); 123 124 fMm2Deg = geom->GetConvMm2Deg(); 103 125 104 126 return kTRUE; … … 115 137 116 138 fAlpha->Fill(fabs(h.GetAlpha())); 117 fDist ->Fill( h.GetDist());139 fDist ->Fill(fUseMmScale ? h.GetDist() : fMm2Deg*h.GetDist()); 118 140 119 141 return kTRUE;
Note:
See TracChangeset
for help on using the changeset viewer.