source: trunk/MagicSoft/Mars/mtemp/mifae/library/MImgIsland.cc@ 5463

Last change on this file since 5463 was 5379, checked in by aliu, 20 years ago
*** empty log message ***
File size: 2.6 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 expressed
14! * or implied warranty.
15! *
16!
17!
18! Author(s): Ester Aliu , 9/2004 <mailto:aliu@ifae.es>
19!
20!
21! Copyright: MAGIC Software Development, 2000-2004
22!
23!
24\* ======================================================================== */
25#include "MImgIsland.h"
26
27#include "MLog.h"
28#include "MLogManip.h"
29
30ClassImp(MImgIsland);
31
32using namespace std;
33
34MImgIsland::MImgIsland(const char *name, const char *title)
35{
36
37 fName = name ? name : "MImgIsland";
38 fTitle = title ? title : "Storage container for one island information";
39
40 Reset();
41}
42
43void MImgIsland::Reset()
44{
45 fPixNum = 0;
46 fSigToNoise = 0;
47 fTimeSpread = 0;
48 fMeanX = 0;
49 fMeanY = 0;
50 fDist = 0;
51 fDistW = 0;
52 fDistL = 0;
53
54 fPixList.Reset(-1);
55 fPeakPulse.Reset(-1);
56}
57
58// -------------------------------------------------------------------------
59//
60// Initialize
61//
62void MImgIsland::InitSize(Int_t i)
63{
64 fPixList.Set(i);
65 fPeakPulse.Set(i);
66}
67
68
69// -------------------------------------------------------------------------
70//
71// Set the pixels id in the island
72//
73void MImgIsland::SetPixList(const Int_t i, const Int_t idx)
74{
75 fPixList[i] = idx;
76}
77
78
79
80
81// -------------------------------------------------------------------------
82//
83// Set the arrival time in one pixel of the island
84//
85void MImgIsland::SetPeakPulse(const Int_t i, const Float_t t)
86{
87 fPeakPulse[i] = t;
88}
89
90
91// -------------------------------------------------------------------------
92//
93// Print the island information
94//
95void MImgIsland::Print(Option_t *opt) const
96{
97
98 // TString o = opt;
99
100 *fLog << inf << " Number of pixels = " << fPixNum << endl;
101 *fLog << inf << " Signal-To-Noise =" << fSigToNoise << endl;
102 *fLog << inf << " Time Spread (Core pixels) = " << fTimeSpread << endl;
103 *fLog << inf << " DistL = " << fDistL << endl;
104 *fLog << inf << " DistW = " << fDistW << endl;
105 *fLog << inf << " DistS = " << fDistS << endl;
106 *fLog << inf << " Alpha = " << fAlpha << endl;
107
108}
109
110
111
112
113
114
Note: See TracBrowser for help on using the repository browser.