Ignore:
Timestamp:
10/17/06 18:18:40 (18 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mhflux
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mhflux/MHFalseSource.cc

    r7287 r8106  
    11/* ======================================================================== *\
     2! $Name: not supported by cvs2svn $:$Id: MHFalseSource.cc,v 1.20 2006-10-17 17:16:00 tbretz Exp $
     3! --------------------------------------------------------------------------
    24!
    35! *
     
    393395// the same number of bins than for on-data
    394396//
    395 void MHFalseSource::ProjectOff(const TH3D &src, TH2D *h2, TH2D *all)
     397void MHFalseSource::ProjectOff(const TH3D &src, TH2D *h2, TH2D *hall)
    396398{
    397399    TAxis &axe = *src.GetZaxis();
     
    415417    // Move contents from projection to h2
    416418    h2->Reset();
    417     h2->Add(p, all->GetMaximum());
    418     h2->Divide(all);
     419    h2->Add(p, hall->GetMaximum());
     420    h2->Divide(hall);
    419421
    420422    // Delete p
     
    434436// range (0, fAlphaCut)
    435437//
    436 void MHFalseSource::ProjectOn(const TH3D &src, TH2D *h3, TH2D *all)
     438void MHFalseSource::ProjectOn(const TH3D &src, TH2D *h3, TH2D *hall)
    437439{
    438440    TAxis &axe = *src.GetZaxis();
     
    452454    // Move contents from projection to h3
    453455    h3->Reset();
    454     h3->Add(p, all->GetMaximum());
    455     h3->Divide(all);
     456    h3->Add(p, hall->GetMaximum());
     457    h3->Divide(hall);
    456458
    457459    // Delete p
     
    603605            h->SetTitle(Form("Distribution of \\alpha for x=%.2f y=%.2f (S_{max}=%.1f\\sigma)", x, y, s));
    604606
    605             TH1D *h0=0;
    606             if ((h0 = (TH1D*)gPad->FindObject("AlphaOff_z")))
     607            TH1D *ho=0;
     608            if ((ho = (TH1D*)gPad->FindObject("AlphaOff_z")))
    607609            {
    608610                fHistOff->ProjectionZ("AlphaOff_z", maxx, maxx, maxy, maxy);
    609611
    610612                /* ============= local scaling ================ */
    611                 const Int_t f = h0->GetXaxis()->FindFixBin(fBgMean-1.5*fAlphaCut);
    612                 const Int_t l = h0->GetXaxis()->FindFixBin(fAlphaCut*3)+f-1;
    613                 h0->Scale(h1->Integral(f, l)/h0->Integral(f, l));
     613                const Int_t f = ho->GetXaxis()->FindFixBin(fBgMean-1.5*fAlphaCut);
     614                const Int_t l = ho->GetXaxis()->FindFixBin(fAlphaCut*3)+f-1;
     615                ho->Scale(h1->Integral(f, l)/ho->Integral(f, l));
    614616
    615617
  • trunk/MagicSoft/Mars/mhflux/MHThetaSqN.cc

    r7784 r8106  
    11/* ======================================================================== *\
     2! $Name: not supported by cvs2svn $:$Id: MHThetaSqN.cc,v 1.8 2006-10-17 17:16:00 tbretz Exp $
     3! --------------------------------------------------------------------------
    24!
    35! *
     
    282284        //  2: 0.346  ~98%   0.260
    283285
    284         const Double_t dist = src0.Mod()*TMath::Sin(rad/2);
    285         const Double_t cut  = TMath::Sqrt(fFit.GetSignalIntegralMax());
    286         if (dist<cut)
     286        const Double_t dis = src0.Mod()*TMath::Sin(rad/2);
     287        const Double_t cut = TMath::Sqrt(fFit.GetSignalIntegralMax());
     288        if (dis<cut)
    287289        {
    288290            *fLog << warn << "WARNING - Source regions overlap: distance ";
    289             *fLog << dist << " less than theta-sq cut " << cut << "!" << endl;
    290             if (dist*1.7<cut*1.0)
     291            *fLog << dis << " less than theta-sq cut " << cut << "!" << endl;
     292            if (dis*1.7<cut*1.0)
    291293                fCounter[3]++;
    292294            else
    293                 if (dist*1.7<cut*1.5)
     295                if (dis*1.7<cut*1.5)
    294296                    fCounter[2]++;
    295297                else
Note: See TracChangeset for help on using the changeset viewer.