Changeset 2026 for trunk/MagicSoft/Mars/mimage/MHHillas.cc
- Timestamp:
- 04/28/03 15:39:40 (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mimage/MHHillas.cc
r1992 r2026 70 70 fDistC = new TH1F("DistC", "Distance from center of camera", 100, 0, 445); 71 71 fDelta = new TH1F("Delta", "Angle (Main axis - x-axis)", 101, -90, 90); 72 fUsedPix = new TH1F("UsedPix", "Number of used pixels", 150, 0, 150);73 fCorePix = new TH1F("CorePix", "Number of core pixels", 150, 0, 150);74 72 75 73 fLength->SetLineColor(kBlue); 76 fCorePix->SetLineColor(kRed);77 fUsedPix->SetLineColor(kGreen);78 74 79 75 fLength->SetDirectory(NULL); … … 81 77 fDistC->SetDirectory(NULL); 82 78 fDelta->SetDirectory(NULL); 83 fUsedPix->SetDirectory(NULL);84 fCorePix->SetDirectory(NULL);85 79 86 80 fLength->SetXTitle("Length [mm]"); … … 88 82 fDistC->SetXTitle("Distance [mm]"); 89 83 fDelta->SetXTitle("Delta [\\circ]"); 90 fUsedPix->SetXTitle("Number of Pixels");91 fCorePix->SetXTitle("Number of Pixels");92 84 93 85 fLength->SetYTitle("Counts"); … … 95 87 fDistC->SetYTitle("Counts"); 96 88 fDelta->SetYTitle("Counts"); 97 fUsedPix->SetYTitle("Counts");98 fCorePix->SetYTitle("Counts");99 89 100 90 MBinning bins; … … 134 124 delete fSize; 135 125 delete fCenter; 136 137 delete fUsedPix;138 delete fCorePix;139 126 } 140 127 … … 165 152 ApplyBinning(*plist, "Delta", fDelta); 166 153 ApplyBinning(*plist, "Size", fSize); 167 ApplyBinning(*plist, "Pixels", fUsedPix);168 ApplyBinning(*plist, "Pixels", fCorePix);169 154 170 155 const MBinning *bins = (MBinning*)plist->FindObject("BinningCamera"); … … 262 247 const Double_t scale = fUseMmScale ? 1 : fMm2Deg; 263 248 264 fLength ->Fill(scale*h.GetLength()); 265 fWidth ->Fill(scale*h.GetWidth()); 266 fDistC ->Fill(scale*d); 267 fCenter ->Fill(scale*h.GetMeanX(), scale*h.GetMeanY()); 268 fDelta ->Fill(kRad2Deg*h.GetDelta()); 269 fSize ->Fill(h.GetSize()); 270 fUsedPix->Fill(h.GetNumUsedPixels()); 271 fCorePix->Fill(h.GetNumCorePixels()); 249 fLength ->Fill(scale*h.GetLength(), w); 250 fWidth ->Fill(scale*h.GetWidth(), w); 251 fDistC ->Fill(scale*d, w); 252 fCenter ->Fill(scale*h.GetMeanX(), scale*h.GetMeanY(), w); 253 fDelta ->Fill(kRad2Deg*h.GetDelta(), w); 254 fSize ->Fill(h.GetSize(), w); 272 255 273 256 return kTRUE; … … 289 272 // -------------------------------------------------------------------------- 290 273 // 291 // Draw clones of four histograms. So that the object can be deleted292 // and the histograms are still visible in the canvas.293 // The cloned object are deleted together with the canvas if the canvas is294 // destroyed. If you want to handle dostroying the canvas you can get a295 // pointer to it from this function296 //297 TObject *MHHillas::DrawClone(Option_t *opt) const298 {299 return MH::DrawClone(opt, 720, 810);300 }301 302 // --------------------------------------------------------------------------303 //304 274 // Creates a new canvas and draws the four histograms into it. 305 275 // Be careful: The histograms belongs to this object and won't get deleted … … 308 278 void MHHillas::Draw(Option_t *) 309 279 { 310 TVirtualPad *pad = gPad ? gPad : MakeDefCanvas(this , 720, 810);280 TVirtualPad *pad = gPad ? gPad : MakeDefCanvas(this); 311 281 pad->SetBorderMode(0); 312 282 … … 320 290 321 291 pad->cd(2); 292 gPad->SetBorderMode(0); 293 fDistC->Draw(); 294 295 pad->cd(3); 322 296 gPad->SetBorderMode(0); 323 297 gPad->SetLogx(); 324 298 fSize->Draw(); 325 299 326 pad->cd(3);327 gPad->SetBorderMode(0);328 MH::Draw(*fCorePix, *fUsedPix, "Number of core/used Pixels");329 330 300 pad->cd(4); 331 301 gPad->SetBorderMode(0); 332 fDelta->Draw(); 333 334 pad->cd(5); 335 gPad->SetBorderMode(0); 336 fDistC->Draw(); 337 338 pad->cd(6); 339 gPad->SetBorderMode(0); 302 gPad->SetPad(0.51, 0.01, 0.99, 0.65); 340 303 SetColors(); 341 304 fCenter->Draw("colz"); 305 306 pad->cd(5); 307 gPad->SetBorderMode(0); 308 fDelta->Draw(); 309 310 pad->cd(6); 311 delete gPad; 342 312 343 313 pad->Modified(); … … 353 323 if (name.Contains("Size", TString::kIgnoreCase)) 354 324 return fSize; 355 if (name.Contains("Core", TString::kIgnoreCase))356 return fCorePix;357 if (name.Contains("Used", TString::kIgnoreCase))358 return fUsedPix;359 325 if (name.Contains("Delta", TString::kIgnoreCase)) 360 326 return fDelta;
Note:
See TracChangeset
for help on using the changeset viewer.