Ignore:
Timestamp:
06/13/05 09:41:57 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mhflux
Files:
2 edited

Legend:

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

    r7125 r7147  
    3434// For more detailes see MHAlpha.
    3535//
     36// Version 2:
     37// ---------
     38//  + UInt_t fNumBinsSignal;
     39//  + UInt_t fNumBinsTotal;
     40//
    3641//////////////////////////////////////////////////////////////////////////////
    3742#include "MHThetaSq.h"
     
    5762//
    5863MHThetaSq::MHThetaSq(const char *name, const char *title)
    59     : MHAlpha(name, title), fThetaSq(0)
     64    : MHAlpha(name, title), fThetaSq(0), fNumBinsSignal(3), fNumBinsTotal(45)
    6065{
    6166    //
     
    120125    // Calculate bining which fits alpha-cut
    121126    const Double_t intmax = fit->GetSignalIntegralMax();
    122     const UInt_t   nbins  = 75;
    123     const UInt_t   nsig   =  5;
     127    const UInt_t   nbins  = fNumBinsTotal;
     128    const UInt_t   nsig   = fNumBinsSignal;
    124129
    125130    MBinning binsa(nbins, 0, nbins*intmax/nsig);
     
    201206   //     fMap[4] = fMatrix->AddColumn("MTime.GetAxisTime");
    202207}
     208
     209Int_t MHThetaSq::ReadEnv(const TEnv &env, TString prefix, Bool_t print)
     210{
     211    Int_t rc = MHAlpha::ReadEnv(env, prefix, print);
     212    if (rc==kERROR)
     213        return kERROR;
     214
     215    if (IsEnvDefined(env, prefix, "NumBinsSignal", print))
     216    {
     217        SetNumBinsSignal(GetEnvValue(env, prefix, "NumBinsSignal", (Int_t)fNumBinsSignal));
     218        rc = kTRUE;
     219    }
     220    if (IsEnvDefined(env, prefix, "NumBinsTotal", print))
     221    {
     222        SetNumBinsTotal(GetEnvValue(env, prefix, "NumBinsTotal", (Int_t)fNumBinsTotal));
     223        rc = kTRUE;
     224    }
     225    return rc;
     226}
  • trunk/MagicSoft/Mars/mhflux/MHThetaSq.h

    r7125 r7147  
    1313    MParameterD  *fThetaSq; //!
    1414
     15    UInt_t fNumBinsSignal;
     16    UInt_t fNumBinsTotal;
     17
    1518    Bool_t      GetParameter(const MParList &pl);
    1619    Double_t    GetVal() const;
     
    2326    void InitMapping(MHMatrix *mat, Int_t type=0);
    2427
     28    // MParContainer
     29    Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print=kFALSE);
     30
    2531public:
    2632    MHThetaSq(const char *name=NULL, const char *title=NULL);
    2733
    28     ClassDef(MHThetaSq, 1) // Theta-Plot which is fitted online
     34    void SetNumBinsSignal(UInt_t n) { fNumBinsSignal=TMath::Max(n, 1U); }
     35    void SetNumBinsTotal(UInt_t n)  { fNumBinsTotal =TMath::Max(n, 1U); }
     36
     37    ClassDef(MHThetaSq, 2) // Theta-Plot which is fitted online
    2938};
    3039
Note: See TracChangeset for help on using the changeset viewer.