- Timestamp:
- 08/11/10 17:14:28 (14 years ago)
- Location:
- trunk/Mars
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars/Changelog
r9847 r9848 41 41 - added SetTrainExpSize member function 42 42 43 * mjtrain/MJTrainDisp.cc: 44 - made the display of the cut-lines a bit more flexible 45 - slightly changed the meaning of the plots 46 43 47 44 48 -
trunk/Mars/mjtrain/MJTrainDisp.cc
r9824 r9848 132 132 //gPad->SetRightMargin(0.12); 133 133 134 const Float_t cutval = hist.GetYaxis()->GetBinLowEdge(4); 134 const Int_t bin = 3; 135 const Float_t cutval = hist.GetYaxis()->GetBinUpEdge(bin); 135 136 136 137 TH1D heff; … … 143 144 MH::SetBinning(&heff, hist.GetXaxis()); 144 145 145 146 146 for (int x=0; x<=hist.GetNbinsX()+1; x++) 147 147 { 148 148 const Double_t n0 = hist.Integral(x, x, -1, -1); 149 149 if (n0>0) 150 heff.SetBinContent(x, hist.Integral(x, x, -1, 3)/n0);150 heff.SetBinContent(x, hist.Integral(x, x, -1, bin)/n0); 151 151 } 152 152 … … 155 155 heff.DrawCopy(); 156 156 157 line.DrawLine(10, 0.5, 31623, 0.5); 157 line.DrawLine(hist.GetXaxis()->GetXmin(), 0.5, 158 hist.GetXaxis()->GetXmax(), 0.5); 158 159 159 160 c.cd(i+0); … … 169 170 for (int x=0; x<=hist.GetNbinsX(); x++) 170 171 { 171 Float_t n = 0; 172 for (int y=1; y<=2; y++) 173 n += hist.GetBinContent(x,y); 174 172 const Float_t n = hist.GetBinContent(1); // + hist.GetBinContent(2) 175 173 if (n==0) 176 174 continue; 177 175 178 176 for (int y=0; y<=hist.GetNbinsY(); y++) 179 hist.SetBinContent(x, y, 200*hist.GetBinContent(x,y)/n);177 hist.SetBinContent(x, y, 100*hist.GetBinContent(x,y)/n); 180 178 } 181 179 … … 183 181 hist.DrawCopy("colz"); 184 182 185 line.DrawLine(10, 0.04, 31623, 0.04); 183 line.DrawLine(hist.GetXaxis()->GetXmin(), cutval, 184 hist.GetXaxis()->GetXmax(), cutval); 186 185 187 186 c.cd(i+2); … … 197 196 for (int x=0; x<=hist.GetNbinsX(); x++) 198 197 { 199 Float_t n = 0; 200 for (int y=0; y<=hist.GetNbinsY(); y++) 201 n += hist.GetBinContent(x,y); 202 198 const Float_t n = hist.Integral(x, x, -1, 9999); 203 199 if (n==0) 204 200 continue; … … 211 207 hist.DrawCopy("colz"); 212 208 213 line.DrawLine(10, 0.04, 31623, 0.04); 209 line.DrawLine(hist.GetXaxis()->GetXmin(), cutval, 210 hist.GetXaxis()->GetXmax(), cutval); 214 211 } 215 212
Note:
See TracChangeset
for help on using the changeset viewer.