- Timestamp:
- 06/30/03 11:02:21 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 5 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r2251 r2252 11 11 * mhist/MHCamera.h: 12 12 - small change 13 14 * mmontecarlo/MMcCollectionAreaCalc.cc: 15 - small simplifications 13 16 14 17 -
trunk/MagicSoft/Mars/mmontecarlo/MMcCollectionAreaCalc.cc
r2250 r2252 139 139 (pow(emax,expo) - pow(emin,expo)) ; 140 140 141 const Int_t nbinx = fCollArea->GetHistAll()->GetNbinsX(); 142 141 TH2 &hall = *fCollArea->GetHistAll(); 142 143 const Int_t nbinx = hall.GetNbinsX(); 144 145 TAxis &axe = *hall.GetXaxis(); 143 146 for (Int_t i = 1; i <= nbinx; i++) 144 147 { 145 const Float_t e1 = fCollArea->GetHistAll()->GetXaxis()->GetBinLowEdge(i);146 const Float_t e2 = fCollArea->GetHistAll()->GetXaxis()->GetBinLowEdge(i+1);148 const Float_t e1 = axe.GetBinLowEdge(i); 149 const Float_t e2 = axe.GetBinLowEdge(i+1); 147 150 148 151 if (e1 < emin || e2 > emax) … … 151 154 const Float_t events = k * (pow(e2, expo) - pow(e1, expo)); 152 155 // 153 // We fill the i th energy bin, with the total number of events156 // We fill the i-th energy bin, with the total number of events 154 157 // Second argument of Fill would be impact parameter of each 155 158 // event, but we don't really need it for the collection area, … … 158 161 159 162 const Float_t energy = (e1+e2)/2.; 160 fCollArea->GetHistAll()->Fill(energy, 1., events);163 hall.Fill(energy, 1., events); 161 164 } 162 165
Note:
See TracChangeset
for help on using the changeset viewer.