source: trunk/MagicSoft/Mars/manalysis/MCT1Supercuts.cc@ 2347

Last change on this file since 2347 was 2318, checked in by wittek, 22 years ago
*** empty log message ***
File size: 5.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): Wolfgang Wittek, 08/2003 <mailto:wittek@mppmu.mpg.de>
19! Author(s): Thomas Bretz, 08/2003 <mailto:tbretz@astro.uni-wuerzburg.de>
20!
21! Copyright: MAGIC Software Development, 2000-2003
22!
23!
24\* ======================================================================== */
25
26/////////////////////////////////////////////////////////////////////////////
27// //
28// MCT1Supercuts //
29// //
30// this is the container for the parameters of the supercuts //
31// //
32/////////////////////////////////////////////////////////////////////////////
33#include "MCT1Supercuts.h"
34
35#include <math.h>
36#include <fstream>
37
38#include "MParList.h"
39
40#include "MLog.h"
41#include "MLogManip.h"
42
43ClassImp(MCT1Supercuts);
44
45using namespace std;
46
47// --------------------------------------------------------------------------
48//
49// constructor
50//
51MCT1Supercuts::MCT1Supercuts(const char *name, const char *title)
52 : fParameters(72),
53 fLengthUp(fParameters.GetArray()), fLengthLo(fParameters.GetArray()+8),
54 fWidthUp(fParameters.GetArray()+16), fWidthLo(fParameters.GetArray()+24),
55 fDistUp(fParameters.GetArray()+32), fDistLo(fParameters.GetArray()+40),
56 fAsymUp(fParameters.GetArray()+48), fAsymLo(fParameters.GetArray()+56),
57 fAlphaUp(fParameters.GetArray()+64)
58{
59 fName = name ? name : "MCT1Supercuts";
60 fTitle = title ? title : "Container for the supercut parameters";
61
62 // set supercut parameters to their default values
63 InitParameters();
64}
65
66
67// --------------------------------------------------------------------------
68//
69// set default values for the supercut parameters
70//
71void MCT1Supercuts::InitParameters()
72{
73 fLengthUp[0] = 0.315585;
74 fLengthUp[1] = 0.001455;
75 fLengthUp[2] = 0.203198;
76 fLengthUp[3] = 0.005532;
77 fLengthUp[4] = -0.001670;
78 fLengthUp[5] = -0.020362;
79 fLengthUp[6] = 0.007388;
80 fLengthUp[7] = -0.013463;
81
82 fWidthUp[0] = 0.145412;
83 fWidthUp[1] = -0.001771;
84 fWidthUp[2] = 0.054462;
85 fWidthUp[3] = 0.022280;
86 fWidthUp[4] = -0.009893;
87 fWidthUp[5] = 0.056353;
88 fWidthUp[6] = 0.020711;
89 fWidthUp[7] = -0.016703;
90
91 fDistUp[0] = 1.787943;
92 fDistUp[1] = 0;
93 fDistUp[2] = 2.942310;
94 fDistUp[3] = 0.199815;
95 fDistUp[4] = 0;
96 fDistUp[5] = 0.249909;
97 fDistUp[6] = 0.189697;
98 fDistUp[7] = 0;
99
100 fLengthLo[0] = 0.151530;
101 fLengthLo[1] = 0.028323;
102 fLengthLo[2] = 0.510707;
103 fLengthLo[3] = 0.053089;
104 fLengthLo[4] = 0.013708;
105 fLengthLo[5] = 2.357993;
106 fLengthLo[6] = 0.000080;
107 fLengthLo[7] = -0.007157;
108
109 fWidthLo[0] = 0.089187;
110 fWidthLo[1] = -0.006430;
111 fWidthLo[2] = 0.074442;
112 fWidthLo[3] = 0.003738;
113 fWidthLo[4] = -0.004256;
114 fWidthLo[5] = -0.014101;
115 fWidthLo[6] = 0.006126;
116 fWidthLo[7] = -0.002849;
117
118 fDistLo[0] = 0.589406;
119 fDistLo[1] = 0;
120 fDistLo[2] = -0.083964;
121 fDistLo[3] = -0.007975;
122 fDistLo[4] = 0;
123 fDistLo[5] = 0.045374;
124 fDistLo[6] = -0.001750;
125 fDistLo[7] = 0;
126
127 fAsymUp[0] = 0.061267;
128 fAsymUp[1] = 0.014462;
129 fAsymUp[2] = 0.014327;
130 fAsymUp[3] = 0.014540;
131 fAsymUp[4] = 0.013391;
132 fAsymUp[5] = 0.012319;
133 fAsymUp[6] = 0.010444;
134 fAsymUp[7] = 0.008328;
135
136 fAsymLo[0] = -0.012055;
137 fAsymLo[1] = 0.009157;
138 fAsymLo[2] = 0.005441;
139 fAsymLo[3] = 0.000399;
140 fAsymLo[4] = 0.001433;
141 fAsymLo[5] = -0.002050;
142 fAsymLo[6] = -0.000104;
143 fAsymLo[7] = -0.001188;
144
145 fAlphaUp[0] = 13.123440;
146 fAlphaUp[1] = 0;
147 fAlphaUp[2] = 0;
148 fAlphaUp[3] = 0;
149 fAlphaUp[4] = 0;
150 fAlphaUp[5] = 0;
151 fAlphaUp[6] = 0;
152 fAlphaUp[7] = 0;
153}
154
155
156// --------------------------------------------------------------------------
157//
158// Set the parameter values from the array 'd'
159//
160//
161Bool_t MCT1Supercuts::SetParameters(const TArrayD &d)
162{
163 if (d.GetSize() != fParameters.GetSize())
164 {
165 *fLog << err << "Sizes of d and of fParameters are different : "
166 << d.GetSize() << ", " << fParameters.GetSize() << endl;
167 return kFALSE;
168 }
169
170 fParameters = d;
171
172 return kTRUE;
173}
174
175
176
177
178
179
180
181
182
183
184
185
Note: See TracBrowser for help on using the repository browser.