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

Last change on this file since 19344 was 5466, checked in by aliu, 20 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 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 // cout << "Creo 1 isla" << endl;
40 Reset();
41}
42MImgIsland::~MImgIsland()
43{
44 // cout << "Destruyo 1 isla" << endl;
45}
46
47void MImgIsland::Reset()
48{
49 fPixNum = 0;
50 fSigToNoise = -1;
51 fTimeSpread = -1;
52 fMeanX = -1000;
53 fMeanY = -1000;
54 fDist = -1;
55 fDistW = -1;
56 fDistL = -1;
57 fDistS = -1;
58
59 fWidth = -1;
60 fLength = -1;
61 fSizeIsl = -1;
62 fAlpha = -1000;
63
64 fPixList.Reset(-1);
65 fPeakPulse.Reset(-1);
66
67}
68
69// -------------------------------------------------------------------------
70//
71// Initialize
72//
73void MImgIsland::InitSize(Int_t i)
74{
75 fPixList.Set(i);
76 fPeakPulse.Set(i);
77}
78
79
80// -------------------------------------------------------------------------
81//
82// Set the pixels id in the island
83//
84void MImgIsland::SetPixList(const Int_t i, const Int_t idx)
85{
86 fPixList[i] = idx;
87}
88
89
90
91
92// -------------------------------------------------------------------------
93//
94// Set the arrival time in one pixel of the island
95//
96void MImgIsland::SetPeakPulse(const Int_t i, const Float_t t)
97{
98 fPeakPulse[i] = t;
99}
100
101
102// -------------------------------------------------------------------------
103//
104// Print the island information
105//
106void MImgIsland::Print(Option_t *opt) const
107{
108
109 // TString o = opt;
110
111 *fLog << inf << " Number of pixels = " << fPixNum << endl;
112 *fLog << inf << " Signal-To-Noise =" << fSigToNoise << endl;
113 *fLog << inf << " Time Spread (Core pixels) = " << fTimeSpread << endl;
114 *fLog << inf << " DistL = " << fDistL << endl;
115 *fLog << inf << " DistW = " << fDistW << endl;
116 *fLog << inf << " DistS = " << fDistS << endl;
117 *fLog << inf << " Alpha = " << fAlpha << endl;
118
119}
120
121
122
123
124
125
Note: See TracBrowser for help on using the repository browser.