Changeset 1489 for trunk/MagicSoft/Mars/mhist/MHHillas.cc
- Timestamp:
- 08/08/02 11:58:59 (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhist/MHHillas.cc
r1487 r1489 67 67 fTitle = title ? title : "Source independent image parameters"; 68 68 69 fLength = new TH1F("Length", "Length of Ellipse", 100, 0, 296.7); 70 fWidth = new TH1F("Width", "Width of Ellipse", 100, 0, 296.7); 71 fDistC = new TH1F("DistC", "Distance from center of camera", 100, 0, 445); 72 fDelta = new TH1F("Delta", "Angle (Main axis - x-axis)", 101, -90, 90); 69 fLength = new TH1F("Length", "Length of Ellipse", 100, 0, 296.7); 70 fWidth = new TH1F("Width", "Width of Ellipse", 100, 0, 296.7); 71 fDistC = new TH1F("DistC", "Distance from center of camera", 100, 0, 445); 72 fDelta = new TH1F("Delta", "Angle (Main axis - x-axis)", 101, -90, 90); 73 fUsedPix = new TH1F("UsedPix", "Number of used pixels", 150, 0, 150); 74 fCorePix = new TH1F("CorePix", "Number of core pixels", 150, 0, 150); 73 75 74 76 fLength->SetDirectory(NULL); … … 76 78 fDistC->SetDirectory(NULL); 77 79 fDelta->SetDirectory(NULL); 80 fUsedPix->SetDirectory(NULL); 81 fCorePix->SetDirectory(NULL); 78 82 79 83 fLength->SetXTitle("Length [mm]"); … … 81 85 fDistC->SetXTitle("Distance [mm]"); 82 86 fDelta->SetXTitle("Delta [\\circ]"); 87 fUsedPix->SetXTitle("Number of Pixels"); 88 fCorePix->SetXTitle("Number of Pixels"); 83 89 84 90 fLength->SetYTitle("Counts"); … … 86 92 fDistC->SetYTitle("Counts"); 87 93 fDelta->SetYTitle("Counts"); 94 fUsedPix->SetYTitle("Counts"); 95 fCorePix->SetYTitle("Counts"); 88 96 89 97 MBinning bins; … … 122 130 delete fSize; 123 131 delete fCenter; 132 133 delete fUsedPix; 134 delete fCorePix; 124 135 } 125 136 … … 150 161 ApplyBinning(*plist, "Delta", fDelta); 151 162 ApplyBinning(*plist, "Size", fSize); 163 ApplyBinning(*plist, "Pixels", fUsedPix); 164 ApplyBinning(*plist, "Pixels", fCorePix); 152 165 153 166 const MBinning *bins = (MBinning*)plist->FindObject("BinningCamera"); … … 235 248 const Double_t scale = fUseMmScale ? 1 : fMm2Deg; 236 249 237 fLength->Fill(scale*h.GetLength()); 238 fWidth ->Fill(scale*h.GetWidth()); 239 fDistC ->Fill(scale*d); 240 fCenter->Fill(scale*h.GetMeanX(), scale*h.GetMeanY()); 241 fDelta ->Fill(kRad2Deg*h.GetDelta()); 242 fSize ->Fill(h.GetSize()); 250 fLength ->Fill(scale*h.GetLength()); 251 fWidth ->Fill(scale*h.GetWidth()); 252 fDistC ->Fill(scale*d); 253 fCenter ->Fill(scale*h.GetMeanX(), scale*h.GetMeanY()); 254 fDelta ->Fill(kRad2Deg*h.GetDelta()); 255 fSize ->Fill(h.GetSize()); 256 fUsedPix->Fill(h.GetNumUsedPixels()); 257 fCorePix->Fill(h.GetNumCorePixels()); 243 258 244 259 return kTRUE; … … 269 284 TObject *MHHillas::DrawClone(Option_t *opt) const 270 285 { 271 TCanvas *c = MakeDefCanvas( "Hillas", fTitle, 720, 810);286 TCanvas *c = MakeDefCanvas(this, 720, 810); 272 287 c->Divide(2,3); 273 288 … … 275 290 276 291 c->cd(1); 277 fLength->DrawCopy(); 292 fWidth->DrawCopy(); 293 fLength->SetLineColor(kBlue); 294 fLength->DrawCopy("same"); 278 295 279 296 c->cd(2); 280 fWidth->DrawCopy();281 282 c->cd(3);283 297 gPad->SetLogx(); 284 298 fSize->DrawCopy(); 299 300 c->cd(3); 301 fCorePix->SetLineColor(kRed); 302 fCorePix->DrawCopy(); 303 fUsedPix->SetLineColor(kGreen); 304 fUsedPix->DrawCopy("same"); 285 305 286 306 c->cd(4); … … 309 329 { 310 330 if (!gPad) 311 MakeDefCanvas( "Hillas", fTitle, 720, 810);331 MakeDefCanvas(this, 720, 810); 312 332 313 333 gPad->Divide(2,3); 314 334 315 335 gPad->cd(1); 316 fLength->Draw(); 336 fWidth->Draw(); 337 fLength->SetLineColor(kBlue); 338 fLength->Draw("same"); 317 339 318 340 gPad->cd(2); 319 fWidth->Draw();320 321 gPad->cd(3);322 341 gPad->SetLogx(); 323 342 fSize->Draw(); 343 344 gPad->cd(3); 345 fCorePix->SetLineColor(kRed); 346 fCorePix->Draw(); 347 fUsedPix->SetLineColor(kGreen); 348 fUsedPix->Draw("same"); 324 349 325 350 gPad->cd(4);
Note:
See TracChangeset
for help on using the changeset viewer.