source: trunk/MagicSoft/Mars/mtemp/MStarLocalPos.cc@ 3827

Last change on this file since 3827 was 3808, checked in by jlopez, 21 years ago
*** empty log message ***
File size: 2.8 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 "MStarLocalPos.h"
25
26#include <TEllipse.h>
27
28#include "MLog.h"
29#include "MLogManip.h"
30
31ClassImp(MStarLocalPos);
32
33using namespace std;
34
35MStarLocalPos::MStarLocalPos(const char *name, const char *title)
36{
37
38 fName = name ? name : "MStarLocalPos";
39 fTitle = title ? title : "";
40
41 Reset();
42}
43
44void MStarLocalPos::Reset()
45{
46
47 //Expected position on camera
48 fMagExp = 0.;
49 fXExp = 0.;
50 fYExp = 0.;
51
52 //Info from calculation
53
54 fMagCalc = 0.;
55 fMeanXCalc = 0.;
56 fMeanYCalc = 0.;
57 fSigmaMinorAxisCalc = 0.;
58 fSigmaMajorAxisCalc = 0.;
59
60 //Info from fit
61
62 fMagFit = 0.;
63 fMeanXFit = 0.;
64 fMeanYFit = 0.;
65 fSigmaMinorAxisFit = 0.;
66 fSigmaMajorAxisFit = 0.;
67 fChisquarenDof = 0.;
68
69}
70
71void MStarLocalPos::SetExpValues(Float_t mag, Float_t x, Float_t y)
72{
73 fMagExp = mag;
74 fXExp = x;
75 fYExp = y;
76}
77
78void MStarLocalPos::SetCalcValues(Float_t mag, Float_t x, Float_t y, Float_t sigmaMinorAxis, Float_t sigmaMajorAxis)
79{
80 fMagCalc = mag;
81 fMeanXCalc = x;
82 fMeanYCalc = y;
83 fSigmaMinorAxisCalc = sigmaMinorAxis;
84 fSigmaMajorAxisCalc = sigmaMajorAxis;
85}
86
87void MStarLocalPos::SetFitValues(Float_t mag, Float_t x, Float_t y, Float_t sigmaMinorAxis, Float_t sigmaMajorAxis)
88{
89 fMagFit = mag;
90 fMeanXFit = x;
91 fMeanYFit = y;
92 fSigmaMinorAxisFit = sigmaMinorAxis;
93 fSigmaMajorAxisFit = sigmaMajorAxis;
94}
95
96void MStarLocalPos::Paint(Option_t *opt)
97{}
98
99void MStarLocalPos::Print(Option_t *opt) const
100{
101 *fLog << inf << "Star expected position:" << endl;
102 *fLog << inf << " X " << fXExp << " mm \tY " << fYExp << " mm" << endl;
103 *fLog << inf << "Star calculated position:" << endl;
104 *fLog << inf << " X " << fMeanXCalc << " mm \tY " << fMeanYCalc << " mm" << endl;
105 *fLog << inf << "Star fitted position:" << endl;
106 *fLog << inf << " X " << fXExp << " mm \tY " << fYExp << " mm" << endl;
107}
Note: See TracBrowser for help on using the repository browser.