Ignore:
Timestamp:
03/20/06 12:48:14 (19 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

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

    r7287 r7616  
    3232// in the tasklist. Switching of the M3L cut in MFMagicCuts is recommended.
    3333//
     34// Class Version 3:
     35// ----------------
     36//  + Double_t fScaleMin;    // [deg] Minimum circle for integration of off-data for scaling
     37//  + Double_t fScaleMax;    // [deg] Maximum circle for integration of off-data for scaling
     38//
    3439//////////////////////////////////////////////////////////////////////////////
    3540#include "MHDisp.h"
     
    6570//
    6671MHDisp::MHDisp(const char *name, const char *title)
    67     : fDisp(0), fDeviation(0), fSmearing(-1), fWobble(kFALSE)
     72    : fDisp(0), fDeviation(0), fSmearing(-1), fWobble(kFALSE),
     73    fScaleMin(0.325), fScaleMax(0.475)
    6874{
    6975    //
     
    165171        if (!fHistOff)
    166172        {
    167             if (delta>165)
     173            if (delta>180-25)
    168174                return kTRUE;
    169175
     
    175181            // increased uncertainty
    176182            // FIXME: The delta stuff could be replaced by a 2*antitheta cut...
    177             w0 = delta>15 ? 1 : 2;
     183            w0 = delta>25 ? 1 : 2;
    178184        }
    179185
     
    331337}
    332338
     339// --------------------------------------------------------------------------
     340//
     341// Make sure that if the scale is changed by the context menu all subpads
     342// are redrawn.
     343//
     344void MHDisp::Update()
     345{
     346    TVirtualPad *pad = gPad;
     347    for (int i=1; i<=6; i++)
     348    {
     349        if (pad->GetPad(i))
     350            pad->GetPad(i)->Modified();
     351    }
     352}
    333353
    334354// --------------------------------------------------------------------------
     
    348368        {
    349369            const Double_t d = TMath::Hypot(axex.GetBinCenter(x+1), axey.GetBinCenter(y+1));
    350             if (d>0.325 && d<0.475)
     370            if (d>fScaleMin && d<fScaleMax)
    351371            {
    352372                sum += h.GetBinContent(x+1,y+1);
     
    354374            }
    355375        }
     376
    356377    return sum/cnt;
    357378}
     
    611632    // ----- Pad number 4 -----
    612633    TString name = Form("%s_4", pad->GetName());
    613     TPad *p = new TPad(name,name, 0.5025, 0.3355, 0.995, 0.995, col, 0, 0);
     634    TPad *p = new TPad(name,name, 0.525/*0.5025*/, 0.3355, 0.995, 0.995, col, 0, 0);
    614635    p->SetNumber(4);
    615636    p->Draw();
     
    631652    pad->cd();
    632653    name = Form("%s_1", pad->GetName());
    633     p = new TPad(name,name, 0.005, 0.3355, 0.4975, 0.995, col, 0, 0);
     654    p = new TPad(name,name, 0.005, 0.3355, 0.475/*0.4975*/, 0.995, col, 0, 0);
    634655    p->SetNumber(1);
    635656    p->Draw();
     
    733754        SetWobble(GetEnvValue(env, prefix, "Wobble", fWobble));
    734755    }
     756    if (IsEnvDefined(env, prefix, "ScaleMin", print))
     757    {
     758        rc = kTRUE;
     759        SetScaleMin(GetEnvValue(env, prefix, "ScaleMin", fScaleMin));
     760    }
     761    if (IsEnvDefined(env, prefix, "ScaleMax", print))
     762    {
     763        rc = kTRUE;
     764        SetScaleMax(GetEnvValue(env, prefix, "ScaleMax", fScaleMax));
     765    }
    735766
    736767    return rc;
Note: See TracChangeset for help on using the changeset viewer.