Ignore:
Timestamp:
07/08/05 11:46:47 (19 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mimage/MHillasExt.cc

    r6869 r7176  
    6464
    6565#include <TArrayF.h>
     66#include <TMarker.h>
     67#include <TVirtualPad.h>
    6668
    6769#include "MGeomPix.h"
     
    218220    *fLog << all;
    219221    *fLog << GetDescriptor() << endl;
    220     *fLog << " - Asymmetry            = " << fAsym    << endl;
     222    *fLog << " - Asymmetry      [mm]  = " << fAsym    << endl;
    221223    *fLog << " - 3.Moment Long  [mm]  = " << fM3Long  << endl;
    222224    *fLog << " - 3.Moment Trans [mm]  = " << fM3Trans << endl;
     
    233235    *fLog << all;
    234236    *fLog << GetDescriptor() << endl;
    235     *fLog << " - Asymmetry            = " << fAsym   *geom.GetConvMm2Deg() << endl;
     237    *fLog << " - Asymmetry      [deg] = " << fAsym   *geom.GetConvMm2Deg() << endl;
    236238    *fLog << " - 3.Moment Long  [deg] = " << fM3Long *geom.GetConvMm2Deg() << endl;
    237239    *fLog << " - 3.Moment Trans [deg] = " << fM3Trans*geom.GetConvMm2Deg() << endl;
    238240    *fLog << " - Max.Dist       [deg] = " << fMaxDist*geom.GetConvMm2Deg() << endl;
    239241}
     242
     243// -------------------------------------------------------------------------
     244//
     245// Paint the 3rd moment on top of the shower. Therefor "MHillas" is needed.
     246// it is searched via gPad->FindObject. If opt is not IsNull an object with
     247// the name opt is searched.
     248//
     249void MHillasExt::Paint(Option_t *opt)
     250{
     251    const TString name(opt);
     252
     253    const MHillas *hil = dynamic_cast<const MHillas*>(gPad->FindObject(name.IsNull() ? "MHillas" : name));
     254    if (!hil)
     255        return;
     256
     257    TVector2 v(fM3Long, fM3Trans);
     258    v  = v.Rotate(hil->GetDelta()+TMath::Pi());
     259    v += hil->GetMean();
     260
     261    TMarker m;
     262    m.SetMarkerColor(15);
     263    m.SetMarkerStyle(kFullDotLarge);
     264    m.PaintMarker(v.X(), v.Y());
     265}
Note: See TracChangeset for help on using the changeset viewer.