Changeset 2004 for trunk


Ignore:
Timestamp:
04/24/03 13:10:43 (22 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r2003 r2004  
    3030   * mhist/MH.h:
    3131     - fixed a bug in the overloading of DrawClone
     32
     33   * mimage/MHillasSrc.[h,cc], mimage/MHHillasSrc.[h,cc]:
     34     - like suggested by Wolfgang: removed Head-Tail
    3235
    3336
  • trunk/MagicSoft/Mars/mimage/MHHillasSrc.cc

    r1992 r2004  
    7070    fAlpha    = new TH1F("Alpha",    "Alpha of Ellipse",            181,  -90,  90);
    7171    fDist     = new TH1F("Dist",     "Dist of Ellipse",             100,    0, 445);
    72     fHeadTail = new TH1F("HeadTail", "HeadTail of Ellipse",         101, -445, 445);
    7372    fCosDA    = new TH1F("CosDA",    "cos(Delta,Alpha) of Ellipse", 101,   -1,   1);
    7473
    7574    fAlpha->SetDirectory(NULL);
    7675    fDist->SetDirectory(NULL);
    77     fHeadTail->SetDirectory(NULL);
    7876    fCosDA->SetDirectory(NULL);
    7977
    8078    fAlpha->SetXTitle("\\alpha [\\circ]");
    8179    fDist->SetXTitle("Dist [mm]");
    82     fHeadTail->SetXTitle("Head-Tail [mm]");
    8380    fCosDA->SetXTitle("cos(\\delta,\\alpha)");
    8481
    8582    fAlpha->SetYTitle("Counts");
    8683    fDist->SetYTitle("Counts");
    87     fHeadTail->SetYTitle("Counts");
    8884    fCosDA->SetYTitle("Counts");
    8985}
     
    9793    delete fAlpha;
    9894    delete fDist;
    99     delete fHeadTail;
    10095    delete fCosDA;
    10196}
     
    124119    ApplyBinning(*plist, "Alpha",    fAlpha);
    125120    ApplyBinning(*plist, "Dist",     fDist);
    126     ApplyBinning(*plist, "HeadTail", fHeadTail);
    127121
    128122    return kTRUE;
     
    138132    const MHillasSrc &h = *(MHillasSrc*)par;
    139133
    140     fAlpha   ->Fill(h.GetAlpha());
    141     fDist    ->Fill(fUseMmScale ? h.GetDist() : fMm2Deg*h.GetDist());
    142     fHeadTail->Fill(fUseMmScale ? h.GetHeadTail() : fMm2Deg*h.GetHeadTail());
    143     fCosDA   ->Fill(h.GetCosDeltaAlpha());
     134    fAlpha->Fill(h.GetAlpha());
     135    fDist ->Fill(fUseMmScale ? h.GetDist() : fMm2Deg*h.GetDist());
     136    fCosDA->Fill(h.GetCosDeltaAlpha());
    144137
    145138    return kTRUE;
     
    184177
    185178    const Double_t scale = mmscale ? 1./fMm2Deg : fMm2Deg;
    186     MH::ScaleAxis(fDist,     scale);
    187     MH::ScaleAxis(fHeadTail, scale);
    188 
    189     if (mmscale)
    190     {
    191         fDist->SetXTitle("Dist [mm]");
    192         fHeadTail->SetXTitle("Head-Tail [mm]");
    193     }
    194     else
    195     {
    196         fDist->SetXTitle("Dist [\\circ]");
    197         fHeadTail->SetXTitle("Head-Tail [\\circ]");
    198     }
     179    MH::ScaleAxis(fDist, scale);
     180
     181    fDist->SetXTitle(mmscale ? "Dist [mm]" : "Dist [\\circ]");
    199182
    200183    fUseMmScale = mmscale;
     
    239222    fDist->Draw();
    240223
    241     pad->cd(3);
    242     gPad->SetBorderMode(0);
    243     fHeadTail->Draw();
    244 
    245224    pad->cd(4);
    246225    gPad->SetBorderMode(0);
     
    258237    if (name.Contains("Dist", TString::kIgnoreCase))
    259238        return fDist;
    260     if (name.Contains("HeadTail", TString::kIgnoreCase))
    261         return fHeadTail;
    262239    if (name.Contains("CosDA", TString::kIgnoreCase))
    263240        return fCosDA;
  • trunk/MagicSoft/Mars/mimage/MHHillasSrc.h

    r1992 r2004  
    1414    TH1F *fAlpha;     //->
    1515    TH1F *fDist;      //->
    16     TH1F *fHeadTail;  //->   
    1716    TH1F *fCosDA;     //->
    1817
     
    3433    TH1F *GetHistAlpha()         { return fAlpha; }
    3534    TH1F *GetHistDist()          { return fDist; }
    36     TH1F *GetHistHeadTail()      { return fHeadTail; }
    3735    TH1F *GetHistCosDeltaAlpha() { return fCosDA; }
    3836
  • trunk/MagicSoft/Mars/mimage/MHillasSrc.cc

    r1940 r2004  
    5151//                     defined with positive x-component
    5252//
     53// Version 4:
     54// ----------
     55//
     56// fHeadTail        removed
     57//
     58//
    5359/////////////////////////////////////////////////////////////////////////////
    5460#include "MHillasSrc.h"
     
    7884    fDist          = -1;
    7985    fAlpha         =  0;
    80     fHeadTail      =  0;
    8186    fCosDeltaAlpha =  0;
    8287}
     
    103108    const Double_t tand = tan(GetDelta());       // [1]
    104109
    105     fHeadTail = cd*sx + sd*sy;                   // [mm]
     110    const Double_t headtail = cd*sx + sd*sy;     // [mm]
    106111
    107112    //
     
    126131
    127132    fAlpha         = asin(arg)*kRad2Deg;        // [deg]
    128     fCosDeltaAlpha = fHeadTail/dist;            // [1]
     133    fCosDeltaAlpha = headtail/dist;             // [1]
    129134    fDist          = dist;                      // [mm]
    130135
     
    140145    *fLog << " - Dist          [mm]  = " << fDist << endl;
    141146    *fLog << " - Alpha         [deg] = " << fAlpha << endl;
    142     *fLog << " - HeadTail      [mm]  = " << fHeadTail << endl;
    143147    *fLog << " - CosDeltaAlpha       = " << fCosDeltaAlpha << endl;
    144148}
     
    150154void MHillasSrc::Set(const TArrayF &arr)
    151155{
    152     if (arr.GetSize() != 4)
     156    if (arr.GetSize() != 3)
    153157        return;
    154158
    155159    fAlpha = arr.At(0);         // [deg]  angle of major axis with vector to src
    156160    fDist  = arr.At(1);         // [mm]   distance between src and center of ellipse
    157     fHeadTail  = arr.At(2);     // [mm]
    158     fCosDeltaAlpha = arr.At(3); // [1]    cosine of angle between d and a
     161    fCosDeltaAlpha = arr.At(2); // [1]    cosine of angle between d and a
    159162}
    160163
  • trunk/MagicSoft/Mars/mimage/MHillasSrc.h

    r1940 r2004  
    1616    Float_t fAlpha;         // [deg]  angle of major axis with vector to src
    1717    Float_t fDist;          // [mm]   distance between src and center of ellipse
    18     Float_t fHeadTail;      // [mm]
    1918    Float_t fCosDeltaAlpha; // [1]    cosine of angle between d and a
    2019
     
    3534    Float_t GetAlpha()         const { return fAlpha; }
    3635    Float_t GetDist()          const { return fDist; }
    37     Float_t GetHeadTail()      const { return fHeadTail; }
    3836    Float_t GetCosDeltaAlpha() const { return fCosDeltaAlpha; }
    3937
     
    4745    //virtual void AsciiWrite(ofstream &fout) const;
    4846
    49     ClassDef(MHillasSrc, 3) // Container to hold source position dependant parameters
     47    ClassDef(MHillasSrc, 4) // Container to hold source position dependant parameters
    5048};
    5149
  • trunk/MagicSoft/Mars/mimage/MHillasSrcCalc.cc

    r1940 r2004  
    5555// of type MHillasSrc (or derived) in which the parameters are stored
    5656// The default is "MHillasSrc"
    57 //
    58 //MHillasSrcCalc::MHillasSrcCalc(const char *src, const char *hil,
    59 //                               const char *name, const char *title)
    60 //    : fHillas(NULL), fSrcPos(NULL), fHillasSrc(NULL)
    61 //{
    62 //    fName  = name  ? name  : gsDefName.Data();
    63 //    fTitle = title ? title : gsDefTitle.Data();
    64 
    65 //    fSrcName    = src;
    66 //    fHillasName = hil;
    67 //    fHillasInput = "MHillas";
    68 //}
    69 // -------------------------------------------------------------------------
    7057//
    7158MHillasSrcCalc::MHillasSrcCalc(const char *src, const char *hil,
  • trunk/MagicSoft/Mars/mimage/MHillasSrcCalc.h

    r1940 r2004  
    3030
    3131public:
    32     //    MHillasSrcCalc(const char *src="MSrcPosCam", const char *hil="MHillasSrc",
    33     //               const char *name=NULL, const char *title=NULL);
    34 
    3532    MHillasSrcCalc(const char *src="MSrcPosCam", const char *hil="MHillasSrc",
    3633                   const char *name=NULL, const char *title=NULL);
Note: See TracChangeset for help on using the changeset viewer.