Ignore:
Timestamp:
04/28/03 15:39:40 (22 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

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

    r1992 r2026  
    7070    fDistC   = new TH1F("DistC",   "Distance from center of camera",  100,   0, 445);
    7171    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);
    7472
    7573    fLength->SetLineColor(kBlue);
    76     fCorePix->SetLineColor(kRed);
    77     fUsedPix->SetLineColor(kGreen);
    7874
    7975    fLength->SetDirectory(NULL);
     
    8177    fDistC->SetDirectory(NULL);
    8278    fDelta->SetDirectory(NULL);
    83     fUsedPix->SetDirectory(NULL);
    84     fCorePix->SetDirectory(NULL);
    8579
    8680    fLength->SetXTitle("Length [mm]");
     
    8882    fDistC->SetXTitle("Distance [mm]");
    8983    fDelta->SetXTitle("Delta [\\circ]");
    90     fUsedPix->SetXTitle("Number of Pixels");
    91     fCorePix->SetXTitle("Number of Pixels");
    9284
    9385    fLength->SetYTitle("Counts");
     
    9587    fDistC->SetYTitle("Counts");
    9688    fDelta->SetYTitle("Counts");
    97     fUsedPix->SetYTitle("Counts");
    98     fCorePix->SetYTitle("Counts");
    9989
    10090    MBinning bins;
     
    134124    delete fSize;
    135125    delete fCenter;
    136 
    137     delete fUsedPix;
    138     delete fCorePix;
    139126}
    140127
     
    165152    ApplyBinning(*plist, "Delta",  fDelta);
    166153    ApplyBinning(*plist, "Size",   fSize);
    167     ApplyBinning(*plist, "Pixels", fUsedPix);
    168     ApplyBinning(*plist, "Pixels", fCorePix);
    169154
    170155    const MBinning *bins = (MBinning*)plist->FindObject("BinningCamera");
     
    262247    const Double_t scale = fUseMmScale ? 1 : fMm2Deg;
    263248
    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);
    272255
    273256    return kTRUE;
     
    289272// --------------------------------------------------------------------------
    290273//
    291 // Draw clones of four histograms. So that the object can be deleted
    292 // and the histograms are still visible in the canvas.
    293 // The cloned object are deleted together with the canvas if the canvas is
    294 // destroyed. If you want to handle dostroying the canvas you can get a
    295 // pointer to it from this function
    296 //
    297 TObject *MHHillas::DrawClone(Option_t *opt) const
    298 {
    299     return MH::DrawClone(opt, 720, 810);
    300 }
    301 
    302 // --------------------------------------------------------------------------
    303 //
    304274// Creates a new canvas and draws the four histograms into it.
    305275// Be careful: The histograms belongs to this object and won't get deleted
     
    308278void MHHillas::Draw(Option_t *)
    309279{
    310     TVirtualPad *pad = gPad ? gPad : MakeDefCanvas(this, 720, 810);
     280    TVirtualPad *pad = gPad ? gPad : MakeDefCanvas(this);
    311281    pad->SetBorderMode(0);
    312282
     
    320290
    321291    pad->cd(2);
     292    gPad->SetBorderMode(0);
     293    fDistC->Draw();
     294
     295    pad->cd(3);
    322296    gPad->SetBorderMode(0);
    323297    gPad->SetLogx();
    324298    fSize->Draw();
    325299
    326     pad->cd(3);
    327     gPad->SetBorderMode(0);
    328     MH::Draw(*fCorePix, *fUsedPix, "Number of core/used Pixels");
    329 
    330300    pad->cd(4);
    331301    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);
    340303    SetColors();
    341304    fCenter->Draw("colz");
     305
     306    pad->cd(5);
     307    gPad->SetBorderMode(0);
     308    fDelta->Draw();
     309
     310    pad->cd(6);
     311    delete gPad;
    342312
    343313    pad->Modified();
     
    353323    if (name.Contains("Size", TString::kIgnoreCase))
    354324        return fSize;
    355     if (name.Contains("Core", TString::kIgnoreCase))
    356         return fCorePix;
    357     if (name.Contains("Used", TString::kIgnoreCase))
    358         return fUsedPix;
    359325    if (name.Contains("Delta", TString::kIgnoreCase))
    360326        return fDelta;
Note: See TracChangeset for help on using the changeset viewer.