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

Last change on this file since 4043 was 4037, checked in by jlopez, 21 years ago
*** empty log message ***
File size: 3.1 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 position:" << endl;
102 *fLog << inf << " Expected \t X " << setw(4) << fXExp << " mm \tY " << setw(4) << fYExp << " mm" << endl;
103 *fLog << inf << " Calcultated \t X " << setw(4) << fMeanXCalc << " mm \tY " << setw(4) << fMeanYCalc << " mm" << endl;
104 *fLog << inf << " Fitted \t X " << setw(4) << fMeanXFit << " mm \tY " << setw(4) << fMeanYFit << " mm" << endl;
105 *fLog << inf << "Star size:" << endl;
106 *fLog << inf << " Calcultated \t X " << setw(4) << fSigmaMinorAxisCalc << " mm \tY " << setw(4) << fSigmaMajorAxisCalc << " mm" << endl;
107 *fLog << inf << " Fitted \t X " << setw(4) << fSigmaMinorAxisFit << " mm \tY " << setw(4) << fSigmaMajorAxisFit << " mm" << endl;
108}
Note: See TracBrowser for help on using the repository browser.