Changeset 6956
- Timestamp:
- 04/19/05 13:53:46 (20 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r6955 r6956 26 26 * mjobs/MJCut.cc: 27 27 - fixed a problem when not enabling "--res" 28 29 * mimage/MHVsSize.[h,cc]: 30 - added more displayed variables 28 31 29 32 -
trunk/MagicSoft/Mars/mimage/MHVsSize.cc
r6948 r6956 45 45 #include "MHillas.h" 46 46 #include "MHillasSrc.h" 47 #include "MHillasExt.h" 47 48 #include "MNewImagePar.h" 48 49 #include "MGeomCam.h" … … 58 59 // 59 60 MHVsSize::MHVsSize(const char *name, const char *title) 60 : fHillas(NULL), f NewImagePar(NULL), fMm2Deg(1), fUseMmScale(kTRUE)61 : fHillas(NULL), fHillasExt(NULL), fNewImagePar(NULL), fMm2Deg(1), fUseMmScale(kTRUE) 61 62 { 62 63 // … … 70 71 fDist.SetNameTitle( "Dist", "Dist vs. Size"); 71 72 fConc1.SetNameTitle( "Conc1", "Conc1 vs. Size"); 73 fArea.SetNameTitle( "Area", "Area vs. Size"); 74 fM3Long.SetNameTitle("M3Long", "M3Long vs. Size"); 72 75 73 76 fLength.SetDirectory(NULL); … … 75 78 fDist.SetDirectory(NULL); 76 79 fConc1.SetDirectory(NULL); 80 fArea.SetDirectory(NULL); 81 fM3Long.SetDirectory(NULL); 77 82 78 83 fLength.SetXTitle("Size [phe]"); … … 80 85 fDist.SetXTitle("Size [phe]"); 81 86 fConc1.SetXTitle("Size [phe]"); 87 fArea.SetXTitle("Size [phe]"); 88 fM3Long.SetXTitle("Size [phe]"); 82 89 83 90 fLength.SetYTitle("Length [mm]"); … … 85 92 fDist.SetYTitle("Distance [mm]"); 86 93 fConc1.SetYTitle("Conc1 [ratio]"); 87 88 MBinning binse, binsl, binsd, binsc; 89 binse.SetEdgesLog(50, 10, 1e5); 90 binsl.SetEdges(100, 0, 296.7/2); 91 binsd.SetEdges(100, 0, 445); 92 binsc.SetEdgesLog(100, 1e-5, 5e-3); 94 fArea.SetYTitle("Conc1 [mm^{2}]"); 95 fM3Long.SetYTitle("M3Long [mm]"); 96 97 MBinning binse, binsl, binsd, binsc, binsa, binsm; 98 binse.SetEdgesLog( 50, 10, 1e5); 99 binsl.SetEdges( 100, 0, 296.7/2); 100 binsd.SetEdges( 100, 0, 600); 101 binsc.SetEdgesLog(100, 1e-5, 5e-3); 102 binsa.SetEdges( 100, 0, 445*45); 103 binsm.SetEdges( 100, -445, 445); 93 104 94 105 MH::SetBinning(&fLength, &binse, &binsl); … … 96 107 MH::SetBinning(&fDist, &binse, &binsd); 97 108 MH::SetBinning(&fConc1, &binse, &binsc); 109 MH::SetBinning(&fArea, &binse, &binsa); 110 MH::SetBinning(&fM3Long, &binse, &binsm); 98 111 99 112 fLength.UseCurrentStyle(); … … 101 114 fDist.UseCurrentStyle(); 102 115 fConc1.UseCurrentStyle(); 116 fArea.UseCurrentStyle(); 117 fM3Long.UseCurrentStyle(); 103 118 } 104 119 … … 131 146 } 132 147 148 fHillasExt = (MHillasExt*)plist->FindObject("MHillasExt"); 149 if (!fHillasExt) 150 { 151 *fLog << err << "MHillasExt not found... abort." << endl; 152 return kFALSE; 153 } 154 133 155 fNewImagePar = (MNewImagePar*)plist->FindObject("MNewImagePar"); 134 156 if (!fNewImagePar) … … 205 227 MH::ScaleAxis(&fWidth, 1, scale); 206 228 MH::ScaleAxis(&fDist, 1, scale); 229 MH::ScaleAxis(&fM3Long, 1, scale); 230 MH::ScaleAxis(&fArea, 1, scale*scale); 207 231 208 232 if (mmscale) … … 211 235 fWidth.SetYTitle("Width [mm]"); 212 236 fDist.SetYTitle("Distance [mm]"); 237 fArea.SetYTitle("Area [mm^{2}]"); 238 fM3Long.SetYTitle("M3Long [mm]"); 213 239 } 214 240 else … … 217 243 fWidth.SetYTitle("Width [\\circ]"); 218 244 fDist.SetYTitle("Distance [\\circ]"); 245 fArea.SetYTitle("Area [\\circ^{2}]"); 246 fM3Long.SetYTitle("M3Long [\\circ]"); 219 247 } 220 248 … … 232 260 if (!src) 233 261 { 234 *fLog << err << "MHVsSize::Fill: Pointer (!=NULL) expected." << endl;262 *fLog << err << "MHVsSize::Fill: Wrong argument... abort." << endl; 235 263 return kFALSE; 236 264 } … … 242 270 fDist.Fill( fHillas->GetSize(), scale*src->GetDist(), w); 243 271 fConc1.Fill( fHillas->GetSize(), scale*fNewImagePar->GetConc1(), w); 272 fArea.Fill( fHillas->GetSize(), scale*scale*fHillas->GetArea(), w); 273 fM3Long.Fill(fHillas->GetSize(), scale*fHillasExt->GetM3Long()*TMath::Sign(src->GetCosDeltaAlpha(),1.0f), w); 244 274 245 275 return kTRUE; … … 266 296 267 297 if (!same) 268 pad->Divide( 2,2);298 pad->Divide(3,2); 269 299 else 270 300 { … … 273 303 fDist.SetName("DistSame"); 274 304 fConc1.SetName("Conc1Same"); 305 fArea.SetName("AreaSame"); 306 fM3Long.SetName("M3LongSame"); 275 307 fDist.SetMarkerColor(kBlue); 276 308 fConc1.SetMarkerColor(kBlue); 277 309 fWidth.SetMarkerColor(kBlue); 278 310 fLength.SetMarkerColor(kBlue); 311 fArea.SetMarkerColor(kBlue); 312 fM3Long.SetMarkerColor(kBlue); 279 313 } 280 314 … … 298 332 299 333 pad->cd(4); 334 gPad->SetBorderMode(0); 335 gPad->SetLogx(); 336 RemoveFromPad("AreaSame"); 337 fArea.Draw(same?"same":""); 338 339 pad->cd(5); 340 gPad->SetBorderMode(0); 341 gPad->SetLogx(); 342 RemoveFromPad("M3LongSame"); 343 fM3Long.Draw(same?"same":""); 344 345 pad->cd(6); 300 346 gPad->SetBorderMode(0); 301 347 gPad->SetLogx(); … … 304 350 fConc1.Draw(same?"same":""); 305 351 } 306 307 void MHVsSize::Paint(Option_t *opt)308 {309 //SetColors();310 //MH::Paint();311 } -
trunk/MagicSoft/Mars/mimage/MHVsSize.h
r6890 r6956 11 11 12 12 class MHillas; 13 class MHillasExt; 13 14 class MNewImagePar; 14 15 … … 16 17 { 17 18 private: 18 MHillas *fHillas; //! 19 MHillas *fHillas; //! 20 MHillasExt *fHillasExt; //! 19 21 MNewImagePar *fNewImagePar; //! 20 22 … … 25 27 TH2F fConc1; // Angle between Length axis and x-axis 26 28 29 TH2F fM3Long; // 30 TH2F fArea; // 31 27 32 Float_t fMm2Deg; 28 33 Bool_t fUseMmScale; 29 30 void Paint(Option_t *opt="");31 34 32 35 public:
Note:
See TracChangeset
for help on using the changeset viewer.