Changeset 1215 for trunk/MagicSoft/Mars/mhist/MHAlphaEnergyTheta.cc
- Timestamp:
- 01/23/02 19:37:56 (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhist/MHAlphaEnergyTheta.cc
r1211 r1215 102 102 103 103 fHist.Fill(hil.GetAlpha(), fEnergy->GetEnergy(), fMcEvt->GetTheta()*kRad2Deg); 104 104 105 return kTRUE; 105 106 } … … 108 109 { 109 110 if (!gPad) 110 MakeDefCanvas("AlphaEnergyTheta", "Distrib of \\alpha, E, \\Theta");111 MakeDefCanvas("AlphaEnergyTheta", "Distrib of alpha, E, Theta"); 111 112 112 113 gPad->Divide(2,2); 113 114 115 TH1 *h; 116 114 117 gPad->cd(1); 115 fHist.Project3D("x")->Draw(opt); 118 h = fHist.Project3D("x"); 119 h->Draw(opt); 120 h->SetBit(kCanDelete); 116 121 117 122 gPad->cd(2); 118 fHist.Project3D("y")->Draw(opt); 123 h = fHist.Project3D("y"); 124 h->Draw(opt); 125 h->SetBit(kCanDelete); 119 126 120 127 gPad->cd(3); 121 fHist.Project3D("z")->Draw(opt); 128 h = fHist.Project3D("z"); 129 h->Draw(opt); 130 h->SetBit(kCanDelete); 122 131 123 132 gPad->cd(4); … … 130 139 TObject *MHAlphaEnergyTheta::DrawClone(Option_t *opt) const 131 140 { 132 TCanvas *c = MakeDefCanvas(" DiffTimeTheta", "Distrib of \\Delta t, \\Theta");141 TCanvas *c = MakeDefCanvas("AlphaEnergyTheta", "Distrib of alpha, E, Theta"); 133 142 c->Divide(2, 2); 134 143 … … 138 147 // FIXME: ProjectionX,Y is not const within root 139 148 // 149 TH1 *h; 150 140 151 c->cd(1); 141 ((TH3*)(&fHist))->Project3D("x")->DrawCopy(opt); 152 h = ((TH3*)(&fHist))->Project3D("x"); 153 h->Draw(opt); 154 h->SetBit(kCanDelete); 142 155 143 156 c->cd(2); 144 ((TH3*)(&fHist))->Project3D("y")->DrawCopy(opt); 157 h = ((TH3*)(&fHist))->Project3D("y"); 158 h->Draw(opt); 159 h->SetBit(kCanDelete); 145 160 146 161 c->cd(3); 147 ((TH3*)(&fHist))->Project3D("z")->DrawCopy(opt); 162 h = ((TH3*)(&fHist))->Project3D("z"); 163 h->Draw(opt); 164 h->SetBit(kCanDelete); 148 165 149 166 c->cd(4); … … 158 175 void MHAlphaEnergyTheta::Substract(const TH3D *h1, const TH3D *h2) 159 176 { 160 MH::SetBinning(&fHist, h1);177 MH::SetBinning(&fHist, (TH1*)h1); 161 178 162 179 fHist.Sumw2();
Note:
See TracChangeset
for help on using the changeset viewer.