Ignore:
Timestamp:
11/06/04 18:52:16 (20 years ago)
Author:
mazin
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mtemp/mmpi
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mtemp/mmpi/MSkyPlot.cc

    r5313 r5349  
    367367}
    368368
     369// --------------------------------------------------------------------------
     370//
     371// Set the upper and lower limit for the background region in the alpha plot
     372// to estimate the number of background events
     373//
     374void MSkyPlot::SetAlphaBGLimits(Float_t alphalow, Float_t alphaup)
     375{
     376    Float_t alphatemp;
     377    if (alphalow<0)
     378        *fLog << warn << "Alpha<0... taking absolute value." << endl;
     379
     380    if (alphaup<0)
     381        *fLog << warn << "Alpha<0... taking absolute value." << endl;
     382
     383    if (TMath::Abs(alphaup)<TMath::Abs(alphalow)) {
     384        *fLog << warn << "AlphaLow > AlphaUp... exchanging limits." << endl;
     385        alphatemp = alphaup;
     386        alphaup = alphalow;
     387        alphalow = alphatemp;
     388    }
     389
     390    fAlphaBgLow = TMath::Abs(alphalow);
     391    fAlphaBgUp  = TMath::Abs(alphaup);
     392}
     393
    369394// calculate the values for the cuts:
    370395Double_t MSkyPlot::CalcLimit(Double_t *a, Double_t ls, Double_t ls2, Double_t dd2)
     
    701726
    702727         // fit parabola to a background region
    703          (*alpha_iterator).Fit(fitbgpar,"NWR");  // NWR OK?????????????????????????
     728         (*alpha_iterator).Fit(fitbgpar,"EQRN");  // NWR OK?????????????????????????
    704729         // get Chi2
    705730         chisquarefit = fitbgpar->GetChisquare();
  • trunk/MagicSoft/Mars/mtemp/mmpi/MSkyPlot.h

    r5323 r5349  
    144144
    145145    void SetAlphaCut(Float_t alpha);
     146    void SetAlphaBGLimits(Float_t alphalow, Float_t alphalup);
    146147
    147148    //std::vector <TH1D>::iterator  GetAlphaPlots()      { std::vector <TH1D>::iterator iter; return  iter = fHistAlpha.begin()  ; }
Note: See TracChangeset for help on using the changeset viewer.