Ignore:
Timestamp:
10/16/01 16:18:29 (23 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mhist
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mhist/MFillH.cc

    r953 r967  
    150150        if (!fParContainer)
    151151        {
    152             *fLog << dbginf << fParContainerName << " not found... aborting." << endl;
     152            *fLog << dbginf << fParContainerName << " [MParContainer] not found... aborting." << endl;
    153153            return kFALSE;
    154154        }
  • trunk/MagicSoft/Mars/mhist/MHMcCollectionArea.cc

    r959 r967  
    5252
    5353
    54     fHistAll = new TH2D("All Events", "All showers - Radius vs log(E) distribution",
     54    fHistAll = new TH2D("AllEvents", "All showers - Radius vs log(E) distribution",
    5555                        50, 0., 5.,
    5656                        50, 0., 500.);
     
    6060    fHistAll->SetZTitle("N");
    6161
    62     fHistSel = new TH2D("Selected Events", "Selected showers - Radius vs log(E) distribution",
     62    fHistSel = new TH2D("SelectedEvents", "Selected showers - Radius vs log(E) distribution",
    6363                        50, 0., 5.,
    6464                        50, 0., 500.);
     
    6868    fHistSel->SetYTitle("N");
    6969
    70     fHistCol = new TH1D("Area", "Collection Area vs. log(E)",
     70    fHistCol = new TH1D("CollectionArea", "Collection Area vs. log(E)",
    7171                        50, 0., 5.);
    7272
    7373    fHistCol->SetXTitle("log(E/GeV)");
    74     fHistCol->SetYTitle("A/m^2");
     74    fHistCol->SetYTitle("A/m^{2}");
    7575}
    7676
     
    204204        for (Int_t iy=1; iy<=nbiny; iy++)
    205205        {
    206             const Float_t Ns = fHistSel->GetCellContent(ix, iy);
    207206            const Float_t Na = fHistAll->GetCellContent(ix, iy);
    208207
     
    210209                continue;
    211210
     211            const Float_t Ns = fHistSel->GetCellContent(ix, iy);
     212
    212213            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);
    214219
    215220            fHistSel->SetCellContent(ix, iy, eff);
     
    229234        for (Int_t iy=1; iy<=nbiny; iy++)
    230235        {
    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);
    233240
    234241            const Double_t A   = TMath::Pi() * (r2*r2 - r1*r1);
Note: See TracChangeset for help on using the changeset viewer.