source: trunk/Mars/mimage/MImagePar.cc@ 13449

Last change on this file since 13449 was 7554, checked in by tbretz, 19 years ago
*** empty log message ***
File size: 3.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 express
14! * or implied warranty.
15! *
16!
17!
18! Author(s): Thomas Bretz, 8/2004 <mailto:tbretz@astro.uni-wuerzburg.de>
19!
20! Copyright: MAGIC Software Development, 2000-2004
21!
22!
23\* ======================================================================== */
24
25/////////////////////////////////////////////////////////////////////////////
26//
27// MImagePar
28//
29// Storage Container for new image parameters
30//
31// Class Version 2:
32// ----------------
33// - added Short_t fNumSinglePixels;
34// - added Float_t fSizeSinglePixels;
35// - added Float_t fSizeSubIslands;
36//
37// Class Version 1:
38// ----------------
39// Short_t fNumIslands; // number of islands found
40//
41// Short_t fNumHGSaturatedPixels; // number of pixels with saturating hi-gains
42// Short_t fNumSaturatedPixels; // number of pixels with saturating lo-gains
43//
44/////////////////////////////////////////////////////////////////////////////
45#include "MImagePar.h"
46
47#include "MLog.h"
48#include "MLogManip.h"
49
50#include "MSignalCam.h"
51
52ClassImp(MImagePar);
53
54using namespace std;
55
56// --------------------------------------------------------------------------
57//
58// Default constructor.
59//
60MImagePar::MImagePar(const char *name, const char *title)
61{
62 fName = name ? name : "MImagePar";
63 fTitle = title ? title : "New image parameters";
64
65 Reset();
66}
67
68// --------------------------------------------------------------------------
69//
70void MImagePar::Reset()
71{
72 fNumIslands = -1;
73 fNumSinglePixels = -1;
74
75 fNumSatPixelsHG = -1;
76 fNumSatPixelsLG = -1;
77
78 fSizeSinglePixels = -1;
79 fSizeSubIslands = -1;
80 fSizeMainIsland = -1;
81}
82
83// --------------------------------------------------------------------------
84//
85// Calculation of new image parameters
86//
87void MImagePar::Calc(const MSignalCam &evt)
88{
89 // Get number of saturating pixels
90 fNumSatPixelsHG = evt.GetNumPixelsSaturatedHiGain();
91 fNumSatPixelsLG = evt.GetNumPixelsSaturatedLoGain();
92
93 // Get number of islands
94 fNumIslands = evt.GetNumIslands();
95 fNumSinglePixels = evt.GetNumSinglePixels();
96 fSizeSinglePixels = evt.GetSizeSinglePixels();
97 fSizeSubIslands = evt.GetSizeSubIslands();
98 fSizeMainIsland = evt.GetSizeMainIsland();
99
100 SetReadyToSave();
101}
102
103// --------------------------------------------------------------------------
104//
105void MImagePar::Print(Option_t *) const
106{
107 *fLog << all;
108 *fLog << GetDescriptor() << endl;
109 *fLog << " - Num Islands [#] = " << fNumIslands << " Islands" << endl;
110 *fLog << " - Sat.Pixels (HG) [#] = " << fNumSatPixelsHG << " Pixels" << endl;
111 *fLog << " - Sat.Pixels (LG) [#] = " << fNumSatPixelsLG << " Pixels" << endl;
112 *fLog << " - No rmvd CorePx [#] = " << fNumSinglePixels << " Pixels" << endl;
113 *fLog << " - Sz rmvd CorePx [phe] = " << fSizeSinglePixels << endl;
114 *fLog << " - Sz Sub Islands [phe] = " << fSizeSubIslands << endl;
115 *fLog << " - Sz Main Island [phe] = " << fSizeMainIsland << endl;
116}
Note: See TracBrowser for help on using the repository browser.