Changeset 8030


Ignore:
Timestamp:
10/09/06 10:28:06 (18 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r8029 r8030  
    3232     - fixed a bug which caused the spectra to be normalized at 1GeV
    3333       by default instead of the integral
     34     - allow the MC slope to be -1. With the current code this should
     35       not be a problem anymore.
    3436
    3537   * mbase/MMath.cc, mbase/MAGIC.cc:
  • trunk/MagicSoft/Mars/NEWS

    r8027 r8030  
    162162     was not using the integral anymore but a normalization energy of
    163163     1GeV. It is now the integral again.
     164
     165   - sponde: Fixed a problem in the weighting which did not allow
     166     a MC slope of -1.
    164167
    165168
  • trunk/MagicSoft/Mars/mhflux/MMcSpectrumWeight.cc

    r8027 r8030  
    107107    fNameMcEvt   = "MMcEvt";
    108108
    109     fNewSlope    = -1;
    110     fOldSlope    = -1;
     109    fNewSlope    = -9;
     110    fOldSlope    = -9;
    111111
    112112    fEnergyMin   = -1;
     
    379379    }
    380380
    381     //
    382     // Sanity checks to be sure that we won't divide by zero later on
    383     //
    384     if (rh.GetSlopeSpec()==-1)
    385     {
    386         *fLog << err << "The MC Slope of the power law must be different of -1... exit" << endl;
    387         return kFALSE;
    388     }
    389 
    390381    fOldSlope  = rh.GetSlopeSpec();
    391382    fEnergyMin = rh.GetELowLim();
    392383    fEnergyMax = rh.GetEUppLim();
    393384
    394     if (fNewSlope==-1)
    395     {
    396         *fLog << inf << "The new slope of the power law is -1... no weighting applied." << endl;
     385    if (fNewSlope==-9)
     386    {
     387        *fLog << inf << "The new slope of the power law is undefined (-9)... no weighting applied." << endl;
    397388        fNewSlope = fOldSlope;
    398389    }
    399390
    400391    TString form(GetFormulaWeightsX());
    401 
    402392    if (fFunc)
    403393        delete fFunc;
Note: See TracChangeset for help on using the changeset viewer.