Changeset 7775 for trunk


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

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r7771 r7775  
    1919                                                 -*-*- END OF LINE -*-*-
    2020
     21 2006/07/03 Thomas Bretz
     22
     23   * mhflux/MHThetaSqN.[h,cc]:
     24     - added counter and output some statistics afterwards
     25
     26
     27
    2128 2006/06/29 Thomas Bretz
    2229
    2330   * mmain/MEventDisplay.cc:
    2431     - added decoding of calibration pattern
     32
     33   * mbase/MContinue.cc:
     34     - small change to some output
     35
     36   * mmc/MMcTrig.hxx, mmc/MMcTrigHeader.hxx:
     37     - increased version number
     38
     39   * mmc/Mdefine.h:
     40     - increased CAMERA_PIXELS from 3500 to 3800
    2541
    2642
  • trunk/MagicSoft/Mars/mhflux/MHThetaSqN.cc

    r7721 r7775  
    6868MHThetaSqN::MHThetaSqN(const char *name, const char *title)
    6969    : MHAlpha(name, title), fDisp(0), fSrcPosCam(0), fSignificanceCutLevel(1.7),
    70     fNumBinsSignal(3), fNumBinsTotal(75), fNumOffSourcePos(3), fDoOffCut(kTRUE)
     70    fNumBinsSignal(3), fNumBinsTotal(75), fNumOffSourcePos(3), fDoOffCut(kTRUE),
     71    fCounter(4)
    7172{
    7273    //
     
    176177
    177178    fThetaSqCut = fSignificanceCutLevel*fFit.GetSignalIntegralMax()/1.7;
     179
     180    fCounter.Reset();
    178181
    179182    return kTRUE;
     
    280283
    281284        const Double_t dist = src0.Mod()*TMath::Sin(rad/2);
    282         if (dist<TMath::Sqrt(fFit.GetSignalIntegralMax()))
     285        const Double_t cut  = TMath::Sqrt(fFit.GetSignalIntegralMax());
     286        if (dist<cut)
    283287        {
    284             *fLog << warn << "WARNING - Source regions overlap: ";
    285             *fLog << "distance " << dist << " less than theta-sq cut ";
    286             *fLog << TMath::Sqrt(fFit.GetSignalIntegralMax()) << "!" << endl;
     288            *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                fCounter[3]++;
     292            else
     293                if (dist*1.7<cut*1.5)
     294                    fCounter[2]++;
     295                else
     296                    fCounter[1]++;
     297
    287298        }
     299        else
     300            fCounter[0]++;
    288301    }
    289302
    290303    return kTRUE;
     304}
     305
     306// --------------------------------------------------------------------------
     307//
     308// Print execution statistics
     309//
     310Bool_t MHThetaSqN::Finalize()
     311{
     312    if (GetNumExecutions()>0)
     313    {
     314        *fLog << inf << endl;
     315        *fLog << GetDescriptor() << " execution statistics:" << endl;
     316        PrintSkipped(fCounter[3], "Region distance below 1.0sigma (68.3%)");
     317        PrintSkipped(fCounter[2], "Region distance below 1.5sigma (86.6%)");
     318        PrintSkipped(fCounter[1], "Region distance below 1.7sigma (91.1%)");
     319        *fLog << " " << (int)fCounter[0] << " (" << Form("%5.1f", 100.*fCounter[0]/GetNumExecutions()) << "%) Evts ok!" << endl;
     320        //*fLog << " " << (int)fCounter[0] << " (" << Form("%5.1f", 100.*fCounter[0]/GetNumExecutions()) << "%) Evts survived calculation!" << endl;
     321        *fLog << endl;
     322    }
     323
     324    return MHAlpha::Finalize();
    291325}
    292326
  • trunk/MagicSoft/Mars/mhflux/MHThetaSqN.h

    r7720 r7775  
    2727    Bool_t fDoOffCut;
    2828
     29    TArrayI fCounter;        //!
     30
    2931    // MHThetaSqN
    3032    TVector2 GetVec(const TVector2 &v, Int_t n1) const;
     
    4547
    4648    // MH
    47     Bool_t   SetupFill(const MParList *pl);
    48     Bool_t   Fill(const MParContainer *par, const Stat_t weight);
     49    Bool_t SetupFill(const MParList *pl);
     50    Bool_t Fill(const MParContainer *par, const Stat_t weight);
     51    Bool_t Finalize();
    4952
    5053    // MParContainer
     
    6164    void SetNumOffSourcePos(UInt_t n=3)  { fNumOffSourcePos=TMath::Max(n, 1U); }
    6265
    63     void SetSignificanceCutLevel(Double_t l=1.7)  { fSignificanceCutLevel=l; }
     66    void SetSignificanceCutLevel(Double_t l=1.7) { fSignificanceCutLevel=l; }
    6467
    6568    void SetDoOffCut(Bool_t b=kTRUE)     { fDoOffCut = b; }
Note: See TracChangeset for help on using the changeset viewer.