Changeset 7176


Ignore:
Timestamp:
07/08/05 11:46:47 (19 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r7174 r7176  
    2121
    2222                                                 -*-*- END OF LINE -*-*-
     23
     24 2005/07/08 Thomas Bretz
     25
     26   * showplot.cc:
     27     - implemented the possibility to open a root interpreter
     28
     29   * mbase/MMath.cc:
     30     - added sanity checks in GaussProb
     31
     32   * mimage/MHillasExt.[h,cc]:
     33     - fixed some units
     34     - added Paint
     35
     36   * mimage/MNewImagePar.cc:
     37     - fixed Print output
     38
     39   * mmain/MEventDisplay.cc:
     40     - print a separator between two events
     41     - Draw MHillasExt, too
     42
     43   * mmuon/MMuonCalibPar.cc, mmuon/MMuonSearchPar.cc:
     44     - fixed Print output
     45
     46
    2347
    2448 2005/06/28 Thomas Bretz
  • trunk/MagicSoft/Mars/NEWS

    r7173 r7176  
    1414
    1515   - general: MH::SetPalette offers a lot of new palettes
     16
     17   - showplot: got a new option to start a root interpreter, too
     18
     19   - mars: now displays a rough estimate of Disp and the third moment
    1620
    1721   - callisto: MCalibrationHiLoCam can now be printed from its context
  • trunk/MagicSoft/Mars/mbase/MMath.cc

    r6078 r7176  
    132132{
    133133    static const Double_t sqrt2 = TMath::Sqrt(2.);
    134     return TMath::Erf((x-mean)/(sigma*sqrt2));
     134
     135    const Double_t rc = TMath::Erf((x-mean)/(sigma*sqrt2));
     136
     137    if (rc<0)
     138        return 0;
     139    if (rc>1)
     140        return 1;
     141
     142    return rc;
    135143}
    136144
  • 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}
  • trunk/MagicSoft/Mars/mimage/MHillasExt.h

    r6855 r7176  
    3939    void Print(const MGeomCam &geom) const;
    4040
     41    void Paint(Option_t *o="");
     42
    4143    void Set(const TArrayF &arr);
    4244
  • trunk/MagicSoft/Mars/mimage/MNewImagePar.cc

    r6869 r7176  
    228228    *fLog << all;
    229229    *fLog << GetDescriptor() << endl;
    230     *fLog << " - Leakage1       [1]   = " << fLeakage1             << endl;
    231     *fLog << " - Leakage2       [1]   = " << fLeakage2             << endl;
    232     *fLog << " - InnerLeakage1  [1]   = " << fInnerLeakage1        << endl;
    233     *fLog << " - InnerLeakage2  [1]   = " << fInnerLeakage2        << endl;
    234     *fLog << " - InnerSize      [#]   = " << fInnerSize            << " CerPhot" << endl;
    235     *fLog << " - Conc           [1]   = " << fConc                 << " (ratio)" << endl;
    236     *fLog << " - Conc1          [1]   = " << fConc1                << " (ratio)" << endl;
    237     *fLog << " - Used Pixels    [#]   = " << fNumUsedPixels        << " Pixels" << endl;
    238     *fLog << " - Core Pixels    [#]   = " << fNumCorePixels        << " Pixels" << endl;
    239     *fLog << " - Used Area     [mm^2] = " << fUsedArea             << endl;
    240     *fLog << " - Core Area     [mm^2] = " << fCoreArea             << endl;
     230    *fLog << " - Leakage1         [1] = " << fLeakage1      << endl;
     231    *fLog << " - Leakage2         [1] = " << fLeakage2      << endl;
     232    *fLog << " - InnerLeakage1    [1] = " << fInnerLeakage1 << endl;
     233    *fLog << " - InnerLeakage2    [1] = " << fInnerLeakage2 << endl;
     234    *fLog << " - InnerSize      [phe] = " << fInnerSize    << endl;
     235    *fLog << " - Conc             [1] = " << fConc          << endl;
     236    *fLog << " - Conc1            [1] = " << fConc1        << endl;
     237    *fLog << " - Num Used Pixels  [#] = " << fNumUsedPixels << endl;
     238    *fLog << " - Num Core Pixels  [#] = " << fNumCorePixels << endl;
     239    *fLog << " - Used Area     [mm^2] = " << fUsedArea      << endl;
     240    *fLog << " - Core Area     [mm^2] = " << fCoreArea      << endl;
    241241}
    242242
     
    250250    *fLog << all;
    251251    *fLog << GetDescriptor() << endl;
    252     *fLog << " - Leakage1       [1]   = " << fLeakage1             << endl;
    253     *fLog << " - Leakage2       [1]   = " << fLeakage2             << endl;
    254     *fLog << " - InnerLeakage1  [1]   = " << fInnerLeakage1        << endl;
    255     *fLog << " - InnerLeakage2  [1]   = " << fInnerLeakage2        << endl;
    256     *fLog << " - InnerSize      [#]   = " << fInnerSize            << " CerPhot" << endl;
    257     *fLog << " - Conc           [1]   = " << fConc                 << " (ratio)" << endl;
    258     *fLog << " - Conc1          [1]   = " << fConc1                << " (ratio)" << endl;
    259     *fLog << " - Used Pixels    [#]   = " << fNumUsedPixels        << " Pixels" << endl;
    260     *fLog << " - Core Pixels    [#]   = " << fNumCorePixels        << " Pixels" << endl;
     252    *fLog << " - Leakage1         [1] = " << fLeakage1      << endl;
     253    *fLog << " - Leakage2         [1] = " << fLeakage2      << endl;
     254    *fLog << " - InnerLeakage1    [1] = " << fInnerLeakage1 << endl;
     255    *fLog << " - InnerLeakage2    [1] = " << fInnerLeakage2 << endl;
     256    *fLog << " - InnerSize      [phe] = " << fInnerSize    << endl;
     257    *fLog << " - Conc             [1] = " << fConc          << endl;
     258    *fLog << " - Conc1            [1] = " << fConc1        << endl;
     259    *fLog << " - Num Used Pixels  [#] = " << fNumUsedPixels << endl;
     260    *fLog << " - Num Core Pixels  [#] = " << fNumCorePixels << endl;
    261261    *fLog << " - Used Area    [deg^2] = " << fUsedArea*geom.GetConvMm2Deg()*geom.GetConvMm2Deg() << endl;
    262262    *fLog << " - Core Area    [deg^2] = " << fCoreArea*geom.GetConvMm2Deg()*geom.GetConvMm2Deg() << endl;
  • trunk/MagicSoft/Mars/mmain/MEventDisplay.cc

    r7135 r7176  
    549549    // Print parameters
    550550    //
     551    *fLog << all;
     552    fLog->Separator(Form("Entry %d", reader->GetNumEntry()+1));
    551553    ((MHillas*)     plist->FindObject("MHillas"))->Print(*geom);
    552554    ((MHillasExt*)  plist->FindObject("MHillasExt"))->Print(*geom);
     
    603605    TObject *hillas1 = plist->FindObject("MHillas");
    604606    TObject *hillas2 = plist->FindObject("MHillasSrc");
     607    TObject *hillas3 = plist->FindObject("MHillasExt");
    605608    TObject *hmuon   = plist->FindObject("MMuonSearchPar");
    606609    for (int i=1; i<7;i++)
     
    611614        hillas1->Draw();
    612615        hillas2->Draw();
     616        hillas3->Draw();
    613617    }
    614618}
  • trunk/MagicSoft/Mars/mmuon/MMuonCalibPar.cc

    r7134 r7176  
    7474{
    7575    *fLog << all;
    76     *fLog << "Muon Parameters (" << GetName() << ")"       << endl;
    77 //    *fLog << " - Arc Length    [deg]   = " << fArcLength   << endl;
    78     *fLog << " - Arc Phi      [deg]   = " << fArcPhi      << endl;
    79     *fLog << " - Arc Width    [deg]   = " << fArcWidth    << endl;
    80     *fLog << " - Chi Arc Phi  [x2/ndf]= " << fChiArcPhi   << endl;
    81     *fLog << " - Chi Arc Width[x2/ndf]= " << fChiArcWidth << endl;
    82 //    *fLog << " - Est. I. P.    [m]     = " << fEstImpact   << endl;
    83     *fLog << " - Size of muon [phe]   = " << fMuonSize    << endl;
    84     *fLog << " - Peak Phi     [deg]   = " << fPeakPhi     << endl;
     76    *fLog << GetDescriptor() << endl;
     77    *fLog << " - Arc Phi        [deg] = " << fArcPhi      << endl;
     78    *fLog << " - Arc Width      [deg] = " << fArcWidth    << endl;
     79    *fLog << " - Red ChiSq Arc Phi    = " << fChiArcPhi   << endl;
     80    *fLog << " - Red ChiSq Arc Width  = " << fChiArcWidth << endl;
     81    *fLog << " - Size of muon   [phe] = " << fMuonSize    << endl;
     82    *fLog << " - Peak Phi       [deg] = " << fPeakPhi     << endl;
    8583}
    8684
  • trunk/MagicSoft/Mars/mmuon/MMuonSearchPar.cc

    r7134 r7176  
    261261{
    262262    *fLog << all;
    263     *fLog << "Muon Parameters (" << GetName() << ")" << endl;
     263    *fLog << GetDescriptor() << endl;
    264264    *fLog << " - Est. Radius     [mm] = " << fRadius  << endl;
    265265    *fLog << " - Deviation       [mm] = " << fDeviation  << endl;
     
    271271{
    272272    *fLog << all;
    273     *fLog << "Muon Parameters (" << GetName() << ")" << endl;
     273    *fLog << GetDescriptor() << endl;
    274274    *fLog << " - Est. Radius    [deg] = " << fRadius*geom.GetConvMm2Deg()   << endl;
    275275    *fLog << " - Deviation      [deg] = " << fDeviation*geom.GetConvMm2Deg()   << endl;
  • trunk/MagicSoft/Mars/showplot.cc

    r7122 r7176  
    22#include <TClass.h>
    33#include <TGClient.h>
    4 #include <TApplication.h>
     4#include <TRint.h>
    55
    66#include "MLog.h"
     
    3333    gLog << " Root Options:" << endl;
    3434    gLog << "   -b                        Batch mode (no graphical output to screen)" << endl<<endl;
     35    gLog << "   -r                        Start the root interpreter" << endl<<endl;
    3536    gLog << " Options: "<< endl;
    3637    gLog.Usage();
     
    9596    const Bool_t kQuit       = arg.HasOnlyAndRemove("-q");
    9697    const Bool_t kBatch      = arg.HasOnlyAndRemove("-b");
     98    const Bool_t kRoot       = arg.HasOnlyAndRemove("-r");
    9799
    98100    const Int_t  kTab        = arg.GetIntAndRemove("--tab=", -1);
     
    139141    }
    140142
    141     TApplication app("showplot", &argc, argv);
     143    TApplication *app = kRoot ? new TRint("showplot", &argc, argv) : new TApplication("showplot", &argc, argv);
    142144    if (!gROOT->IsBatch() && !gClient || gROOT->IsBatch() && !kBatch)
    143145    {
     
    212214
    213215    // Wait until the user decides to exit the application
    214     app.Run(kFALSE);
     216    app->Run(kFALSE);
     217    delete app;
    215218    return 0;
    216219}
Note: See TracChangeset for help on using the changeset viewer.