Changeset 2015 for trunk/MagicSoft/Mars/mhist/MHAlphaEnergyTheta.cc
- Timestamp:
- 04/28/03 09:52:57 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhist/MHAlphaEnergyTheta.cc
r1992 r2015 126 126 void MHAlphaEnergyTheta::Draw(Option_t *opt) 127 127 { 128 if (!gPad)129 MakeDefCanvas("AlphaEnergyTheta", fTitle);128 TVirtualPad *pad = gPad ? gPad : MakeDefCanvas(this); 129 pad->SetBorderMode(0); 130 130 131 gPad->Divide(2,2); 131 AppendPad(""); 132 133 pad->Divide(2,2); 132 134 133 135 TH1 *h; 134 136 135 gPad->cd(1); 137 pad->cd(1); 138 gPad->SetBorderMode(0); 136 139 h = fHist.Project3D("expro"); 137 138 140 h->SetTitle("Distribution of \\alpha [\\circ]"); 139 141 h->SetXTitle("\\alpha [\\circ]"); 140 142 h->SetYTitle("Counts"); 141 142 143 h->Draw(opt); 143 144 h->SetBit(kCanDelete); 144 145 145 gPad->cd(2); 146 pad->cd(2); 147 gPad->SetBorderMode(0); 148 gPad->SetLogx(); 146 149 h = fHist.Project3D("eypro"); 147 148 150 h->SetTitle("Distribution of E-est [GeV]"); 149 151 h->SetXTitle("E_{est} [GeV]"); 150 152 h->SetYTitle("Counts"); 151 152 153 h->Draw(opt); 153 154 h->SetBit(kCanDelete); 154 gPad->SetLogx();155 155 156 gPad->cd(3); 156 pad->cd(3); 157 gPad->SetBorderMode(0); 157 158 h = fHist.Project3D("ezpro"); 158 159 159 h->SetTitle("Distribution of \\Theta [\\circ]"); 160 160 h->SetXTitle("\\Theta [\\circ]"); 161 161 h->SetYTitle("Counts"); 162 163 162 h->Draw(opt); 164 163 h->SetBit(kCanDelete); 165 164 166 gPad->cd(4); 165 pad->cd(4); 166 gPad->SetBorderMode(0); 167 167 fHist.Draw(opt); 168 168 169 gPad->Modified();170 gPad->Update();169 pad->Modified(); 170 pad->Update(); 171 171 } 172 173 // --------------------------------------------------------------------------174 //175 // Draw copies of the histogram176 //177 TObject *MHAlphaEnergyTheta::DrawClone(Option_t *opt) const178 {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.