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

Last change on this file since 5295 was 5170, checked in by aliu, 21 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//
61// Initialize
62//
63void MImgIsland::InitSize(Int_t i)
64{
65 fPixList.Set(i);
66 fPeakPulse.Set(i);
67}
68
69
70// -------------------------------------------------------------------------
71//
72// Set the pixels id in the island
73//
74void MImgIsland::SetPixList(const Int_t i, const Int_t idx)
75{
76 fPixList[i] = idx;
77}
78
79
80
81
82// -------------------------------------------------------------------------
83//
84// Set the arrival time in one pixel of the island
85//
86void MImgIsland::SetPeakPulse(const Int_t i, const Float_t t)
87{
88 fPeakPulse[i] = t;
89}
90
91
92// -------------------------------------------------------------------------
93//
94// Print the island information
95//
96void MImgIsland::Print(Option_t *opt) const
97{
98
99 // TString o = opt;
100
101 *fLog << inf << " Number of pixels = " << fPixNum << endl;
102 *fLog << inf << " Signal-To-Noise =" << fSigToNoise << endl;
103 *fLog << inf << " Time Spread (Core pixels) = " << fTimeSpread << endl;
104 *fLog << inf << " DistL = " << fDistL << endl;
105 *fLog << inf << " DistW = " << fDistW << endl;
106 *fLog << inf << " DistS = " << fDistS << endl;
107
108}
109
110
111
112
113
114
Note: See TracBrowser for help on using the repository browser.