Changeset 19360


Ignore:
Timestamp:
Nov 7, 2018, 9:15:01 PM (5 months ago)
Author:
tbretz
Message:
Implemented the display of the hillas ellipse.
Location:
trunk/Mars/mhist
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/mhist/MHEvent.cc

    r18271 r19360  
    4848#include <TStyle.h>
    4949#include <TCanvas.h>
     50#include <TEllipse.h>
    5051#include <TPaveText.h>
    5152
     
    5657#include "MMcTrig.hxx"
    5758
     59#include "MHillas.h"
    5860#include "MHCamera.h"
    5961#include "MParList.h"
     
    7476// --------------------------------------------------------------------------
    7577//
    76 MHEvent::MHEvent(EventType_t type) : fHist(NULL), fType(type),
    77     fMinimum(-1111), fMaximum(-1111)
     78MHEvent::MHEvent(EventType_t type) : fHist(NULL),
     79    fType(type), fMinimum(-1111), fMaximum(-1111)
    7880{
    7981    fName = "MHEvent";
     
    8284    fClone   = new MRawEvtData("MHEventData");
    8385    fTrigCpy = new MTriggerPattern;
     86    fEllipse = new TEllipse;
    8487}
    8588
     
    9396    delete fClone;
    9497    delete fTrigCpy;
     98    delete fEllipse;
    9599}
    96100
     
    103107    fTime        = (MTime*)plist->FindObject("MTime");
    104108    fTrigger     = (MTriggerPattern*)plist->FindObject("MTriggerPattern");
     109    fHillas      = (MHillas*)plist->FindObject("MHillas");
    105110
    106111    fRawEvtData = (MRawEvtData*)plist->FindObject("MRawEvtData");
     
    250255    if (fRawEvtData)
    251256        fRawEvtData->Copy(*fClone);
     257
     258    if (fHillas && fEllipse)
     259    {
     260        TEllipse(fHillas->GetMeanX(),  fHillas->GetMeanY(),
     261                 fHillas->GetLength(), fHillas->GetWidth(),
     262                 0, 360, fHillas->GetDelta()*TMath::RadToDeg()).Copy(*fEllipse);
     263        fEllipse->SetLineWidth(2);
     264        fEllipse->SetFillStyle(1);
     265    }
    252266
    253267    switch (fType)
     
    417431    gPad->SetBorderMode(0);
    418432    fHist->Draw();
     433    if (fEllipse && fHillas)
     434        fEllipse->Draw();
    419435
    420436    AppendPad("1");
  • trunk/Mars/mhist/MHEvent.h

    r18271 r19360  
    55#include "MH.h"
    66#endif
     7
     8class TEllipse;
    79
    810class MHCamera;
     
    1416class MMcEvt;
    1517class MMcTrig;
     18class MHillas;
    1619class MSignalCam;
    1720class MImgCleanStd;
     
    4245    MImgCleanStd     *fImgCleanStd;   //!
    4346    MTriggerPattern  *fTrigger;       //!
     47    MHillas          *fHillas;        //!
    4448
    4549    MRawEvtData      *fClone;         //->
     
    4751
    4852    MHCamera *fHist;
     53    TEllipse *fEllipse;
    4954
    5055    EventType_t fType;
Note: See TracChangeset for help on using the changeset viewer.