Ignore:
Timestamp:
04/28/03 09:52:57 (21 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

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

    r1992 r2015  
    126126void MHAlphaEnergyTheta::Draw(Option_t *opt)
    127127{
    128     if (!gPad)
    129         MakeDefCanvas("AlphaEnergyTheta", fTitle);
     128    TVirtualPad *pad = gPad ? gPad : MakeDefCanvas(this);
     129    pad->SetBorderMode(0);
    130130
    131     gPad->Divide(2,2);
     131    AppendPad("");
     132
     133    pad->Divide(2,2);
    132134
    133135    TH1 *h;
    134136
    135     gPad->cd(1);
     137    pad->cd(1);
     138    gPad->SetBorderMode(0);
    136139    h = fHist.Project3D("expro");
    137 
    138140    h->SetTitle("Distribution of \\alpha [\\circ]");
    139141    h->SetXTitle("\\alpha [\\circ]");
    140142    h->SetYTitle("Counts");
    141 
    142143    h->Draw(opt);
    143144    h->SetBit(kCanDelete);
    144145
    145     gPad->cd(2);
     146    pad->cd(2);
     147    gPad->SetBorderMode(0);
     148    gPad->SetLogx();
    146149    h = fHist.Project3D("eypro");
    147 
    148150    h->SetTitle("Distribution of E-est [GeV]");
    149151    h->SetXTitle("E_{est} [GeV]");
    150152    h->SetYTitle("Counts");
    151 
    152153    h->Draw(opt);
    153154    h->SetBit(kCanDelete);
    154     gPad->SetLogx();
    155155
    156     gPad->cd(3);
     156    pad->cd(3);
     157    gPad->SetBorderMode(0);
    157158    h = fHist.Project3D("ezpro");
    158 
    159159    h->SetTitle("Distribution of \\Theta [\\circ]");
    160160    h->SetXTitle("\\Theta [\\circ]");
    161161    h->SetYTitle("Counts");
    162 
    163162    h->Draw(opt);
    164163    h->SetBit(kCanDelete);
    165164
    166     gPad->cd(4);
     165    pad->cd(4);
     166    gPad->SetBorderMode(0);
    167167    fHist.Draw(opt);
    168168
    169     gPad->Modified();
    170     gPad->Update();
     169    pad->Modified();
     170    pad->Update();
    171171}
    172 
    173 // --------------------------------------------------------------------------
    174 //
    175 // Draw copies of the histogram
    176 //
    177 TObject *MHAlphaEnergyTheta::DrawClone(Option_t *opt) const
    178 {
    179     TCanvas &c = *MakeDefCanvas("AlphaEnergyTheta", fTitle);
    180     c.Divide(2, 2);
    181 
    182     gROOT->SetSelectedPad(NULL);
    183 
    184     TH1 *h;
    185 
    186     c.cd(1);
    187     h = ((TH3*)(&fHist))->Project3D(fName+"_expro");
    188 
    189     h->SetTitle("Distribution of \\alpha [\\circ]");
    190     h->SetXTitle("\\alpha [\\circ]");
    191     h->SetYTitle("Counts");
    192 
    193     h->Draw(opt);
    194     h->SetBit(kCanDelete);
    195 
    196     c.cd(2);
    197     h = ((TH3*)(&fHist))->Project3D(fName+"_eypro");
    198 
    199     h->SetTitle("Distribution of E-est [GeV]");
    200     h->SetXTitle("E_{est} [GeV]");
    201     h->SetYTitle("Counts");
    202 
    203     h->Draw(opt);
    204     h->SetBit(kCanDelete);
    205     gPad->SetLogx();
    206 
    207     c.cd(3);
    208     h = ((TH3*)(&fHist))->Project3D(fName+"_ezpro");
    209 
    210     h->SetTitle("Distribution of \\Theta [\\circ]");
    211     h->SetXTitle("\\Theta [\\circ]");
    212     h->SetYTitle("Counts");
    213 
    214     h->Draw(opt);
    215     h->SetBit(kCanDelete);
    216 
    217     c.cd(4);
    218     ((TH3&)fHist).DrawCopy(opt);
    219 
    220     c.Modified();
    221     c.Update();
    222 
    223     return &c;
    224 }
    225 
Note: See TracChangeset for help on using the changeset viewer.