source: trunk/MagicSoft/Mars/mtemp/mifae/library/MDisp.cc@ 4328

Last change on this file since 4328 was 4316, checked in by domingo, 21 years ago
*** empty log message ***
File size: 3.0 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): Eva Domingo 02/2004 <mailto:domingo@ifae.es>
19! Author(s): Josep Flix 02/2004 <mailto:jflix@ifae.es>
20!
21! Copyright: MAGIC Software Development, 2004
22!
23!
24\* ======================================================================== */
25
26/////////////////////////////////////////////////////////////////////////////
27//
28// MDisp
29//
30// Storage Container for image parameters
31//
32// Disp method for extended sources analysis related image parameters
33//
34//
35// Version 1:
36// ----------
37// fDisp Distance along the major axis from the centroid to the suspected position of the source
38// fPosDisp1 Position of Disp evaluated point 1 in the camera in [mm]
39// fPosDisp2 Position of Disp evaluated point 2 in the camera in [mm]
40//
41//
42/////////////////////////////////////////////////////////////////////////////
43
44#include "MDisp.h"
45
46#include <iostream.h>
47//#include <TArrayF.h>
48
49#include "MLog.h"
50#include "MLogManip.h"
51
52ClassImp(MDisp);
53
54
55// --------------------------------------------------------------------------
56//
57// Default constructor.
58//
59MDisp::MDisp(const char *name, const char *title)
60{
61 fName = name ? name : "MDisp";
62 fTitle = title ? title : "Parameter related to Disp method for extended sources analysis";
63
64}
65
66void MDisp::SetPosDisp(char *var, Float_t value)
67{
68
69 if ( !strcmp(var,"X1") )
70 fX1 = value;
71 else if ( !strcmp(var,"Y1") )
72 fY1 = value;
73 else if ( !strcmp(var,"X2") )
74 fX2 = value;
75 else if ( !strcmp(var,"Y2") )
76 fY2 = value;
77 else
78 cout << "SetPosDisp:: Coordinate argument WRONG!" << endl;
79
80};
81
82
83Float_t MDisp::GetPosDisp(char *var)
84{
85
86 if ( !strcmp(var,"X1") )
87 return fX1;
88 else if ( !strcmp(var,"Y1") )
89 return fY1;
90 else if ( !strcmp(var,"X2") )
91 return fX2;
92 else if ( !strcmp(var,"Y2") )
93 return fY2;
94 else
95 {
96 cout << "GetPosDisp:: Coordinate argument WRONG!" << endl;
97 return -9999.;
98 }
99};
100
101
102void MDisp::Print(Option_t *opt) const
103{
104 *fLog << all << GetDescriptor() << ":" << endl;
105 *fLog << "Disp [mm] = " << fDisp << ": ";
106 *fLog << "DX1 [mm] = " << fX1 << ": ";
107 *fLog << "DY1 [mm] = " << fY1 << ": ";
108 *fLog << "DX2 [mm] = " << fX2 << ": ";
109 *fLog << "DY2 [mm] = " << fY2 << ": ";
110 *fLog << "PsiEvent[mm] =" << fPsiEvent << ": " << endl;
111};
Note: See TracBrowser for help on using the repository browser.