source: trunk/Mars/mtemp/mifae/library/MPSFFit.cc@ 19867

Last change on this file since 19867 was 3947, checked in by rico, 21 years ago
*** empty log message ***
File size: 2.5 KB
Line 
1/* ======================================================================== *\
2!
3! *
4! * This file is part of MARS, the MAGIC Analysis and Reconstruction
5! * Software. It is distributed to you in the hope that it can be a useful
6! * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
7! * It is distributed WITHOUT ANY WARRANTY.
8! *
9! * Permission to use, copy, modify and distribute this software and its
10! * documentation for any purpose is hereby granted without fee,
11! * provided that the above copyright notice appear in all copies and
12! * that both that copyright notice and this permission notice appear
13! * in supporting documentation. It is provided "as is" without express
14! * or implied warranty.
15! *
16!
17!
18! Author(s): Javier López , 4/2004 <mailto:jlopez@ifae.es>
19!
20! Copyright: MAGIC Software Development, 2000-2004
21!
22!
23\* ======================================================================== */
24#include "MPSFFit.h"
25
26#include <TEllipse.h>
27
28#include "MLog.h"
29#include "MLogManip.h"
30
31ClassImp(MPSFFit);
32
33using namespace std;
34
35MPSFFit::MPSFFit(const char *name, const char *title)
36{
37
38 fName = name ? name : "MPSFFit";
39 fTitle = title ? title : "Container that holds the values of the PSF fit.";
40
41 fMaximun = -666.;
42 fMeanMinorAxis = -666.;
43 fMeanMajorAxis = -666.;
44 fSigmaMinorAxis = -666.;
45 fSigmaMajorAxis = -666.;
46 fChisquare = -666.;
47}
48
49void MPSFFit::Print(Option_t *opt) const
50{
51
52 *fLog << all << GetDescriptor() << " " << GetTitle() << endl;
53
54 *fLog << all << " Maximun \t " << fMaximun << " uA" << endl;
55 *fLog << all << " Mean Minor Axis \t " << fMeanMinorAxis << " mm \t";
56 *fLog << all << " Sigma Minor Axis \t " << fSigmaMinorAxis << " mm" << endl;
57 *fLog << all << " Mean Major Axis \t " << fMeanMajorAxis << " mm \t";
58 *fLog << all << " Sigma Major Axis \t " << fSigmaMajorAxis << " mm" << endl;
59 *fLog << all << " Chi Square \t " << fChisquare;
60 *fLog << all << endl;
61
62}
63
64// --------------------------------------------------------------------------
65//
66// Paint the ellipse corresponding to the parameters
67//
68void MPSFFit::Paint(Option_t *opt)
69{
70 if (fSigmaMinorAxis<0 || fSigmaMajorAxis<0)
71 return;
72
73 TEllipse e(fMeanMinorAxis, fMeanMajorAxis, fSigmaMinorAxis, fSigmaMajorAxis, 0, 360, 0);
74 e.SetLineWidth(2);
75 e.Paint();
76}
77
78void MPSFFit::Reset()
79{
80 SetMaximun(0.0);
81 SetMeanMinorAxis(0.0);
82 SetMeanMajorAxis(0.0);
83 SetSigmaMinorAxis(0.0);
84 SetSigmaMajorAxis(0.0);
85 SetChisquare(0.0);
86}
Note: See TracBrowser for help on using the repository browser.