Changeset 8890


Ignore:
Timestamp:
05/15/08 13:26:40 (17 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r8888 r8890  
    1818
    1919                                                 -*-*- END OF LINE -*-*-
     20
     21 2008/05/15 Thomas Bretz
     22
     23   * mfilter/MFMagicCuts.[h,cc]:
     24     - fixed a few typos in comments and in the output
     25     - added an option kAreaLin with a linear cut in area for special studies
     26
     27
    2028
    2129 2008/05/14 Thomas Bretz
  • trunk/MagicSoft/Mars/NEWS

    r8889 r8890  
    3939   * the Random Forest Train-classes (MJTRain*) now store the used datasets
    4040     in the output file
     41
     42   * the MFMagicCuts have a new option to allow a linear area cut (for
     43     special studies)
    4144
    4245 ;merpp
  • trunk/MagicSoft/Mars/mfilter/MFMagicCuts.cc

    r8658 r8890  
    5757//          sign2       = (dist-c[7])*c[6]-slope
    5858//          disp        = sign1<0 ||sign2<0 ? -disp : disp
    59 //          thetasq     = disp^2 + dist^2 - 2*disp*dist*alpha
     59//          thetasq     = disp^2 + dist^2 - 2*disp*dist*cos(alpha)
    6060//
    6161//    And the values with respect to the antisource position respectively.
     
    195195    }
    196196
     197    // Geometry in SPONDE?
     198
    197199    fMm2Deg = cam->GetConvMm2Deg();
    198200
     
    448450    fDisp->SetVal(-p*sign);
    449451
     452    // FIXME: Allow to use ThetaSq from INPUT!
     453
    450454    // Calculate corresponding Theta^2
    451455    const Double_t thetasq = GetThetaSq(p, dist, alpha);
     
    461465    {
    462466        const Double_t area = fMatrix ? GetVal(kEArea) : fHil->GetArea()*fMm2Deg*fMm2Deg;
    463         const Double_t A    = lgsize>c[3] ? c[2] : c[2]*(1 - c[4]*(lgsize-c[3])*(lgsize-c[3]));
     467        const Double_t A    = (c[2]*c[4]>0 ? (lgsize>c[3]) : (lgsize<c[3])) ?
     468            c[2] : c[2]*(1 - c[4]*(lgsize-c[3])*(lgsize-c[3]));
     469        //const Double_t A    = lgsize>c[3] ? c[2] : c[2] - c[4]/c[2]*(lgsize-c[3])*(lgsize-c[3]));
     470        if (area>=A)
     471            return kTRUE;
     472    }
     473
     474    if (fHadronnessCut&kAreaLin)
     475    {
     476        const Double_t area = fMatrix ? GetVal(kEArea) : fHil->GetArea()*fMm2Deg*fMm2Deg;
     477        const Double_t A    = c[2] + c[4]*(lgsize-c[3]);
    464478        if (area>=A)
    465479            return kTRUE;
     
    556570        *fLog << "hadronness" << endl;
    557571        break;
     572    case kAreaLin:
     573        *fLog << "arealin" << endl;
     574        break;
    558575    case kAll:
    559576        *fLog << "all" << endl;
     
    561578    }
    562579    if (fCalcDisp)
    563         *fLog << "Disp is calculated from c0, c7, c8." << endl;
     580        *fLog << "Disp is calculated from c0, c8-c11." << endl;
    564581    else
    565582        *fLog << "Disp.fVal from the parameter list is used as disp." << endl;
    566583    if (fCalcGhostbuster)
    567         *fLog << "Ghostbusting is calculated from c5, c6, c7." << endl;
     584        *fLog << "Ghostbusting is calculated from c5-c7." << endl;
    568585    else
    569586        *fLog << "Ghostbuster.fVal from the parameter list is used for ghostbusting." << endl;
  • trunk/MagicSoft/Mars/mfilter/MFMagicCuts.h

    r8658 r8890  
    3535        kArea      =BIT(1),
    3636        kHadronness=BIT(2),
     37        kAreaLin   =BIT(3),
    3738        kAll       =kArea|kHadronness
    3839    };
Note: See TracChangeset for help on using the changeset viewer.