Changeset 2015 for trunk/MagicSoft/Mars/mhist/MHAlphaEnergyTime.cc
- Timestamp:
- 04/28/03 09:52:57 (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhist/MHAlphaEnergyTime.cc
r1992 r2015 126 126 void MHAlphaEnergyTime::Draw(Option_t *opt) 127 127 { 128 if (!gPad)129 MakeDefCanvas("AlphaEnergyTime", fTitle);130 131 gPad->Divide(2,2);128 TVirtualPad *pad = gPad ? gPad : MakeDefCanvas(this); 129 pad->SetBorderMode(0); 130 131 pad->Divide(2,2); 132 132 133 133 TH1 *h; 134 134 135 gPad->cd(1); 135 pad->cd(1); 136 gPad->SetBorderMode(0); 136 137 h = fHist.Project3D("ex"); 137 138 138 h->SetTitle("Distribution of \\alpha [\\circ]"); 139 139 h->SetXTitle("\\alpha [\\circ]"); 140 140 h->SetYTitle("Counts"); 141 142 141 h->Draw(opt); 143 142 h->SetBit(kCanDelete); 144 143 145 gPad->cd(2); 144 pad->cd(2); 145 gPad->SetBorderMode(0); 146 gPad->SetLogx(); 146 147 h = fHist.Project3D("ey"); 147 148 148 h->SetTitle("Distribution of E-est [GeV]"); 149 149 h->SetXTitle("E-est [GeV] "); 150 150 h->SetYTitle("Counts"); 151 152 151 h->Draw(opt); 153 152 h->SetBit(kCanDelete); 154 gPad->SetLogx(); 155 156 gPad-> cd(3);153 154 pad->cd(3); 155 gPad->SetBorderMode(0); 157 156 h = fHist.Project3D("ez"); 158 159 157 h->SetTitle("Distribution of time [s]"); 160 158 h->SetXTitle("time [s]"); 161 159 h->SetYTitle("Counts"); 162 163 160 h->Draw(opt); 164 161 h->SetBit(kCanDelete); 165 162 166 gPad->cd(4); 163 pad->cd(4); 164 gPad->SetBorderMode(0); 167 165 fHist.Draw(opt); 168 166 169 gPad->Modified(); 170 gPad->Update(); 171 172 } 173 174 // -------------------------------------------------------------------------- 175 // 176 // Draw copies of the histogram 177 // 178 TObject *MHAlphaEnergyTime::DrawClone(Option_t *opt) const 179 { 180 TCanvas &c = *MakeDefCanvas("AlphaEnergyTime", fTitle); 181 182 c.Divide(2, 2); 183 184 gROOT->SetSelectedPad(NULL); 185 186 TH1 *h; 187 188 c.cd(1); 189 h = ((TH3D*)(&fHist))->Project3D("ex"); 190 191 h->SetTitle("Distribution of \\alpha [\\circ]"); 192 h->SetXTitle("\\alpha [\\circ]"); 193 h->SetYTitle("Counts"); 194 195 h->Draw(opt); 196 h->SetBit(kCanDelete); 197 198 c.cd(2); 199 h = ((TH3D*)(&fHist))->Project3D("ey"); 200 201 h->SetTitle("Distribution of E-est [GeV]"); 202 h->SetXTitle("E-est [GeV] "); 203 h->SetYTitle("Counts"); 204 205 h->Draw(opt); 206 h->SetBit(kCanDelete); 207 gPad->SetLogx(); 208 209 c.cd(3); 210 h = ((TH3D*)(&fHist))->Project3D("ez"); 211 212 h->SetTitle("Distribution of time [s]"); 213 h->SetXTitle("time [s]"); 214 h->SetYTitle("Counts"); 215 216 h->Draw(opt); 217 h->SetBit(kCanDelete); 218 219 c.cd(4); 220 ((TH3D&)fHist).DrawCopy(opt); 221 222 c.Modified(); 223 c.Update(); 224 225 return &c; 226 } 227 167 pad->Modified(); 168 pad->Update(); 169 170 } 228 171 229 172 // --------------------------------------------------------------------------
Note:
See TracChangeset
for help on using the changeset viewer.