Changeset 967 for trunk/MagicSoft/Mars/mhist
- Timestamp:
- 10/16/01 16:18:29 (23 years ago)
- Location:
- trunk/MagicSoft/Mars/mhist
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhist/MFillH.cc
r953 r967 150 150 if (!fParContainer) 151 151 { 152 *fLog << dbginf << fParContainerName << " not found... aborting." << endl;152 *fLog << dbginf << fParContainerName << " [MParContainer] not found... aborting." << endl; 153 153 return kFALSE; 154 154 } -
trunk/MagicSoft/Mars/mhist/MHMcCollectionArea.cc
r959 r967 52 52 53 53 54 fHistAll = new TH2D("All 54 fHistAll = new TH2D("AllEvents", "All showers - Radius vs log(E) distribution", 55 55 50, 0., 5., 56 56 50, 0., 500.); … … 60 60 fHistAll->SetZTitle("N"); 61 61 62 fHistSel = new TH2D("Selected 62 fHistSel = new TH2D("SelectedEvents", "Selected showers - Radius vs log(E) distribution", 63 63 50, 0., 5., 64 64 50, 0., 500.); … … 68 68 fHistSel->SetYTitle("N"); 69 69 70 fHistCol = new TH1D(" Area", "Collection Area vs. log(E)",70 fHistCol = new TH1D("CollectionArea", "Collection Area vs. log(E)", 71 71 50, 0., 5.); 72 72 73 73 fHistCol->SetXTitle("log(E/GeV)"); 74 fHistCol->SetYTitle("A/m^ 2");74 fHistCol->SetYTitle("A/m^{2}"); 75 75 } 76 76 … … 204 204 for (Int_t iy=1; iy<=nbiny; iy++) 205 205 { 206 const Float_t Ns = fHistSel->GetCellContent(ix, iy);207 206 const Float_t Na = fHistAll->GetCellContent(ix, iy); 208 207 … … 210 209 continue; 211 210 211 const Float_t Ns = fHistSel->GetCellContent(ix, iy); 212 212 213 const Double_t eff = Ns/Na; 213 const Double_t err = sqrt(Na + Na*Ns - Ns*Ns - Ns) / (Na*Na); 214 const Double_t err = sqrt((1.-eff)*Ns)/Na; 215 216 // old calculation from Harald: 217 // const Double_t eff = Ns/Na; 218 // const Double_t err = sqrt(Na + Na*Ns - Ns*Ns - Ns) / (Na*Na); 214 219 215 220 fHistSel->SetCellContent(ix, iy, eff); … … 229 234 for (Int_t iy=1; iy<=nbiny; iy++) 230 235 { 231 const Double_t r1 = fHistSel->GetYaxis()->GetBinLowEdge(iy); 232 const Double_t r2 = fHistSel->GetYaxis()->GetBinLowEdge(iy+1); 236 TAxis *yaxis = fHistSel->GetYaxis(); 237 238 const Double_t r1 = yaxis->GetBinLowEdge(iy); 239 const Double_t r2 = yaxis->GetBinLowEdge(iy+1); 233 240 234 241 const Double_t A = TMath::Pi() * (r2*r2 - r1*r1);
Note:
See TracChangeset
for help on using the changeset viewer.