Ignore:
Timestamp:
08/08/02 11:58:59 (22 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mhist/MHHillas.cc

    r1487 r1489  
    6767    fTitle = title ? title : "Source independent image parameters";
    6868
    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);
    7375
    7476    fLength->SetDirectory(NULL);
     
    7678    fDistC->SetDirectory(NULL);
    7779    fDelta->SetDirectory(NULL);
     80    fUsedPix->SetDirectory(NULL);
     81    fCorePix->SetDirectory(NULL);
    7882
    7983    fLength->SetXTitle("Length [mm]");
     
    8185    fDistC->SetXTitle("Distance [mm]");
    8286    fDelta->SetXTitle("Delta [\\circ]");
     87    fUsedPix->SetXTitle("Number of Pixels");
     88    fCorePix->SetXTitle("Number of Pixels");
    8389
    8490    fLength->SetYTitle("Counts");
     
    8692    fDistC->SetYTitle("Counts");
    8793    fDelta->SetYTitle("Counts");
     94    fUsedPix->SetYTitle("Counts");
     95    fCorePix->SetYTitle("Counts");
    8896
    8997    MBinning bins;
     
    122130    delete fSize;
    123131    delete fCenter;
     132
     133    delete fUsedPix;
     134    delete fCorePix;
    124135}
    125136
     
    150161    ApplyBinning(*plist, "Delta",  fDelta);
    151162    ApplyBinning(*plist, "Size",   fSize);
     163    ApplyBinning(*plist, "Pixels", fUsedPix);
     164    ApplyBinning(*plist, "Pixels", fCorePix);
    152165
    153166    const MBinning *bins = (MBinning*)plist->FindObject("BinningCamera");
     
    235248    const Double_t scale = fUseMmScale ? 1 : fMm2Deg;
    236249
    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());
    243258
    244259    return kTRUE;
     
    269284TObject *MHHillas::DrawClone(Option_t *opt) const
    270285{
    271     TCanvas *c = MakeDefCanvas("Hillas", fTitle, 720, 810);
     286    TCanvas *c = MakeDefCanvas(this, 720, 810);
    272287    c->Divide(2,3);
    273288
     
    275290
    276291    c->cd(1);
    277     fLength->DrawCopy();
     292    fWidth->DrawCopy();
     293    fLength->SetLineColor(kBlue);
     294    fLength->DrawCopy("same");
    278295
    279296    c->cd(2);
    280     fWidth->DrawCopy();
    281 
    282     c->cd(3);
    283297    gPad->SetLogx();
    284298    fSize->DrawCopy();
     299
     300    c->cd(3);
     301    fCorePix->SetLineColor(kRed);
     302    fCorePix->DrawCopy();
     303    fUsedPix->SetLineColor(kGreen);
     304    fUsedPix->DrawCopy("same");
    285305
    286306    c->cd(4);
     
    309329{
    310330    if (!gPad)
    311         MakeDefCanvas("Hillas", fTitle, 720, 810);
     331        MakeDefCanvas(this, 720, 810);
    312332
    313333    gPad->Divide(2,3);
    314334
    315335    gPad->cd(1);
    316     fLength->Draw();
     336    fWidth->Draw();
     337    fLength->SetLineColor(kBlue);
     338    fLength->Draw("same");
    317339
    318340    gPad->cd(2);
    319     fWidth->Draw();
    320 
    321     gPad->cd(3);
    322341    gPad->SetLogx();
    323342    fSize->Draw();
     343
     344    gPad->cd(3);
     345    fCorePix->SetLineColor(kRed);
     346    fCorePix->Draw();
     347    fUsedPix->SetLineColor(kGreen);
     348    fUsedPix->Draw("same");
    324349
    325350    gPad->cd(4);
Note: See TracChangeset for help on using the changeset viewer.