source: branches/removing_cpp11_features/mgeom/MGeomCamMagic.cc@ 18086

Last change on this file since 18086 was 9402, checked in by tbretz, 16 years ago
*** empty log message ***
File size: 44.9 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 12/2000 <mailto:tbretz@astro.uni-wuerzburg.de>
19! Author(s): Harald Kornmayer 1/2001
20!
21! Copyright: MAGIC Software Development, 2000-2008
22!
23!
24\* ======================================================================== */
25
26/////////////////////////////////////////////////////////////////////////////
27//
28// MGeomCamMagic
29//
30// This class stores the geometry information of the Magic camera.
31// All information are copied from tables, see source code.
32//
33////////////////////////////////////////////////////////////////////////////
34#include "MGeomCamMagic.h"
35
36#include <TMath.h>
37
38#include "MGeomPix.h"
39
40ClassImp(MGeomCamMagic);
41
42// --------------------------------------------------------------------------
43//
44// Magic camera has 577 pixels. For geometry and Next Neighbor info see
45// CreateCam and CreateNN
46//
47MGeomCamMagic::MGeomCamMagic(const char *name)
48 : MGeomCam(577, 17, name, "Geometry information of Magic Camera")
49{
50 CreateCam();
51 InitGeometry();
52}
53
54// --------------------------------------------------------------------------
55//
56// Magic camera has 577 pixels. For geometry and Next Neighbor info see
57// CreateCam and CreateNN. You can give the distance dist from
58// the mirror center to the focal plane.
59//
60MGeomCamMagic::MGeomCamMagic(Double_t dist, const char *name)
61 : MGeomCam(577, dist, name, "Geometry information of Magic Camera")
62{
63 CreateCam();
64 InitGeometry();
65}
66
67// --------------------------------------------------------------------------
68//
69// Check if the photon which is flying along the trajectory u has passed
70// (or will pass) the frame of the camera (and consequently get
71// absorbed). The position p and direction u must be in the
72// telescope coordinate frame, which is z parallel to the focal plane,
73// x to the right and y upwards, looking from the mirror towards the camera.
74//
75Bool_t MGeomCamMagic::HitFrame(MQuaternion p, const MQuaternion &u) const
76{
77 // z is defined from the mirror (0) to the camera (z>0).
78 // Thus we just propagate to the focal plane (z=fDist)
79 p.PropagateZ(u, GetCameraDist()*100);
80
81 return TMath::Abs(p.X())<65 && TMath::Abs(p.Y())<65;
82}
83
84// --------------------------------------------------------------------------
85//
86// This fills the geometry information from a table into the pixel objects.
87//
88void MGeomCamMagic::CreateCam()
89{
90 //
91 // fill the geometry class with the coordinates of the MAGIC camera
92 //
93 //*fLog << inf << " Creating Magic geometry " << endl ;
94
95 //
96 // here define the hardwire things of the magic telescope
97 //
98 const Float_t xtemp[577] = {
99 +000.000, 30.000, 15.000, -15.000, -30.000, -15.000, 15.000, 60.000, // 0
100 +045.000, 30.000, 0.000, -30.000, -45.000, -60.000, -45.000, -30.000, // 8
101 +000.000, 30.000, 45.000, 90.000, 75.000, 60.000, 45.000, 15.000, // 16
102 -015.000, -45.000, -60.000, -75.000, -90.000, -75.000, -60.000, -45.000, // 24
103 -015.000, 15.000, 45.000, 60.000, 75.000, 120.000, 105.000, 90.000, // 32
104 +075.000, 60.000, 30.000, 0.000, -30.000, -60.000, -75.000, -90.000, // 40
105 -105.000, -120.000, -105.000, -90.000, -75.000, -60.000, -30.000, 0.000, // 48
106 +030.000, 60.000, 75.000, 90.000, 105.000, 150.000, 135.000, 120.000, // 56
107 +105.000, 90.000, 75.000, 45.000, 15.000, -15.000, -45.000, -75.000, // 64
108 -090.000, -105.000, -120.000, -135.000, -150.000, -135.000, -120.000, -105.000, // 72
109 -090.000, -75.000, -45.000, -15.000, 15.000, 45.000, 75.000, 90.000, // 80
110 +105.000, 120.000, 135.000, 180.000, 165.000, 150.000, 135.000, 120.000, // 88
111 +105.000, 90.000, 60.000, 30.000, 0.000, -30.000, -60.000, -90.000, // 96
112 -105.000, -120.000, -135.000, -150.000, -165.000, -180.000, -165.000, -150.000, // 104
113 -135.000, -120.000, -105.000, -90.000, -60.000, -30.000, 0.000, 30.000, // 112
114 +060.000, 90.000, 105.000, 120.000, 135.000, 150.000, 165.000, 210.000, // 120
115 +195.000, 180.000, 165.000, 150.000, 135.000, 120.000, 105.000, 75.000, // 128
116 +045.000, 15.000, -15.000, -45.000, -75.000, -105.000, -120.000, -135.000, // 136
117 -150.000, -165.000, -180.000, -195.000, -210.000, -195.000, -180.000, -165.000, // 144
118 -150.000, -135.000, -120.000, -105.000, -75.000, -45.000, -15.000, 15.000, // 152
119 +045.000, 75.000, 105.000, 120.000, 135.000, 150.000, 165.000, 180.000, // 160
120 +195.000, 240.000, 225.000, 210.000, 195.000, 180.000, 165.000, 150.000, // 168
121 +135.000, 120.000, 90.000, 60.000, 30.000, 0.000, -30.000, -60.000, // 176
122 -090.000, -120.000, -135.000, -150.000, -165.000, -180.000, -195.000, -210.000, // 184
123 -225.000, -240.000, -225.000, -210.000, -195.000, -180.000, -165.000, -150.000, // 192
124 -135.000, -120.000, -90.000, -60.000, -30.000, 0.000, 30.000, 60.000, // 200
125 +090.000, 120.000, 135.000, 150.000, 165.000, 180.000, 195.000, 210.000, // 208
126 +225.000, 270.000, 255.000, 240.000, 225.000, 210.000, 195.000, 180.000, // 216
127 +165.000, 150.000, 135.000, 105.000, 75.000, 45.000, 15.000, -15.000, // 224
128 -045.000, -75.000, -105.000, -135.000, -150.000, -165.000, -180.000, -195.000, // 232
129 -210.000, -225.000, -240.000, -255.000, -270.000, -255.000, -240.000, -225.000, // 240
130 -210.000, -195.000, -180.000, -165.000, -150.000, -135.000, -105.000, -75.000, // 248
131 -045.000, -15.000, 15.000, 45.000, 75.000, 105.000, 135.000, 150.000, // 256
132 +165.000, 180.000, 195.000, 210.000, 225.000, 240.000, 255.000, 300.000, // 264
133 +285.000, 270.000, 255.000, 240.000, 225.000, 210.000, 195.000, 180.000, // 272
134 +165.000, 150.000, 120.000, 90.000, 60.000, 30.000, 0.000, -30.000, // 280
135 -060.000, -90.000, -120.000, -150.000, -165.000, -180.000, -195.000, -210.000, // 288
136 -225.000, -240.000, -255.000, -270.000, -285.000, -300.000, -285.000, -270.000, // 296
137 -255.000, -240.000, -225.000, -210.000, -195.000, -180.000, -165.000, -150.000, // 304
138 -120.000, -90.000, -60.000, -30.000, 0.000, 30.000, 60.000, 90.000, // 312
139 +120.000, 150.000, 165.000, 180.000, 195.000, 210.000, 225.000, 240.000, // 320
140 +255.000, 270.000, 285.000, 330.000, 315.000, 300.000, 285.000, 270.000, // 328
141 +255.000, 240.000, 225.000, 210.000, 195.000, 180.000, 165.000, 135.000, // 336
142 +105.000, 75.000, 45.000, 15.000, -15.000, -45.000, -75.000, -105.000, // 344
143 -135.000, -165.000, -180.000, -195.000, -210.000, -225.000, -240.000, -255.000, // 352
144 -270.000, -285.000, -300.000, -315.000, -330.000, -315.000, -300.000, -285.000, // 360
145 -270.000, -255.000, -240.000, -225.000, -210.000, -195.000, -180.000, -165.000, // 368
146 -135.000, -105.000, -75.000, -45.000, -15.000, 15.000, 45.000, 75.000, // 376
147 +105.000, 135.000, 165.000, 180.000, 195.000, 210.000, 225.000, 240.000, // 384
148 +255.000, 270.000, 285.000, 300.000, 315.000, 360.000, 330.000, 300.000, // 392
149 +270.000, 240.000, 210.000, 150.000, 90.000, 30.000, -30.000, -90.000, // 400
150 -150.000, -210.000, -240.000, -270.000, -300.000, -330.000, -360.000, -360.000, // 408
151 -330.000, -300.000, -270.000, -240.000, -210.000, -150.000, -90.000, -30.000, // 416
152 +030.000, 90.000, 150.000, 210.000, 240.000, 270.000, 300.000, 330.000, // 424
153 +360.000, 420.000, 390.000, 360.000, 330.000, 300.000, 270.000, 240.000, // 432
154 +180.000, 120.000, 60.000, 0.000, -60.000, -120.000, -180.000, -240.000, // 440
155 -270.000, -300.000, -330.000, -360.000, -390.000, -420.000, -420.000, -390.000, // 448
156 -360.000, -330.000, -300.000, -270.000, -240.000, -180.000, -120.000, -60.000, // 456
157 +000.000, 60.000, 120.000, 180.000, 240.000, 270.000, 300.000, 330.000, // 464
158 +360.000, 390.000, 420.000, 480.000, 450.000, 420.000, 390.000, 360.000, // 472
159 +330.000, 300.000, 270.000, 210.000, 150.000, 90.000, 30.000, -30.000, // 480
160 -090.000, -150.000, -210.000, -270.000, -300.000, -330.000, -360.000, -390.000, // 488
161 -420.000, -450.000, -480.000, -480.000, -450.000, -420.000, -390.000, -360.000, // 496
162 -330.000, -300.000, -270.000, -210.000, -150.000, -90.000, -30.000, 30.000, // 504
163 +090.000, 150.000, 210.000, 270.000, 300.000, 330.000, 360.000, 390.000, // 512
164 +420.000, 450.000, 480.000, 540.000, 510.000, 480.000, 450.000, 420.000, // 520
165 +390.000, 360.000, 330.000, 300.000, 240.000, 180.000, 120.000, 60.000, // 528
166 +000.000, -60.000, -120.000, -180.000, -240.000, -300.000, -330.000, -360.000, // 536
167 -390.000, -420.000, -450.000, -480.000, -510.000, -540.000, -540.000, -510.000, // 544
168 -480.000, -450.000, -420.000, -390.000, -360.000, -330.000, -300.000, -240.000, // 552
169 -180.000, -120.000, -60.000, 0.000, 60.000, 120.000, 180.000, 240.000, // 560
170 +300.000, 330.000, 360.000, 390.000, 420.000, 450.000, 480.000, 510.000, // 568
171 +540.000 // 576
172 };
173
174 const Float_t ytemp[577] = {
175 +000.000, 0.000, 25.981, 25.981, 0.000, -25.981, -25.981, 0.000, // 0
176 +025.981, 51.961, 51.961, 51.961, 25.981, 0.000, -25.981, -51.961, // 8
177 -051.961, -51.961, -25.981, 0.000, 25.981, 51.961, 77.942, 77.942, // 16
178 +077.942, 77.942, 51.961, 25.981, 0.000, -25.981, -51.961, -77.942, // 24
179 -077.942, -77.942, -77.942, -51.961, -25.981, 0.000, 25.981, 51.961, // 32
180 +077.942, 103.923, 103.923, 103.923, 103.923, 103.923, 77.942, 51.961, // 40
181 +025.981, 0.000, -25.981, -51.961, -77.942, -103.923, -103.923, -103.923, // 48
182 -103.923, -103.923, -77.942, -51.961, -25.981, 0.000, 25.981, 51.961, // 56
183 +077.942, 103.923, 129.904, 129.904, 129.904, 129.904, 129.904, 129.904, // 64
184 +103.923, 77.942, 51.961, 25.981, 0.000, -25.981, -51.961, -77.942, // 72
185 -103.923, -129.904, -129.904, -129.904, -129.904, -129.904, -129.904, -103.923, // 80
186 -077.942, -51.961, -25.981, 0.000, 25.981, 51.961, 77.942, 103.923, // 88
187 +129.904, 155.885, 155.885, 155.885, 155.885, 155.885, 155.885, 155.885, // 96
188 +129.904, 103.923, 77.942, 51.961, 25.981, 0.000, -25.981, -51.961, // 104
189 -077.942, -103.923, -129.904, -155.885, -155.885, -155.885, -155.885, -155.885, // 112
190 -155.885, -155.885, -129.904, -103.923, -77.942, -51.961, -25.981, 0.000, // 120
191 +025.981, 51.961, 77.942, 103.923, 129.904, 155.885, 181.865, 181.865, // 128
192 +181.865, 181.865, 181.865, 181.865, 181.865, 181.865, 155.885, 129.904, // 136
193 +103.923, 77.942, 51.961, 25.981, 0.000, -25.981, -51.961, -77.942, // 144
194 -103.923, -129.904, -155.885, -181.865, -181.865, -181.865, -181.865, -181.865, // 152
195 -181.865, -181.865, -181.865, -155.885, -129.904, -103.923, -77.942, -51.961, // 160
196 -025.981, 0.000, 25.981, 51.961, 77.942, 103.923, 129.904, 155.885, // 168
197 +181.865, 207.846, 207.846, 207.846, 207.846, 207.846, 207.846, 207.846, // 176
198 +207.846, 207.846, 181.865, 155.885, 129.904, 103.923, 77.942, 51.961, // 184
199 +025.981, 0.000, -25.981, -51.961, -77.942, -103.923, -129.904, -155.885, // 192
200 -181.865, -207.846, -207.846, -207.846, -207.846, -207.846, -207.846, -207.846, // 200
201 -207.846, -207.846, -181.865, -155.885, -129.904, -103.923, -77.942, -51.961, // 208
202 -025.981, 0.000, 25.981, 51.961, 77.942, 103.923, 129.904, 155.885, // 216
203 +181.865, 207.846, 233.827, 233.827, 233.827, 233.827, 233.827, 233.827, // 224
204 +233.827, 233.827, 233.827, 233.827, 207.846, 181.865, 155.885, 129.904, // 232
205 +103.923, 77.942, 51.961, 25.981, 0.000, -25.981, -51.961, -77.942, // 240
206 -103.923, -129.904, -155.885, -181.865, -207.846, -233.827, -233.827, -233.827, // 248
207 -233.827, -233.827, -233.827, -233.827, -233.827, -233.827, -233.827, -207.846, // 256
208 -181.865, -155.885, -129.904, -103.923, -77.942, -51.961, -25.981, 0.000, // 264
209 +025.981, 51.961, 77.942, 103.923, 129.904, 155.885, 181.865, 207.846, // 272
210 +233.827, 259.808, 259.808, 259.808, 259.808, 259.808, 259.808, 259.808, // 280
211 +259.808, 259.808, 259.808, 259.808, 233.827, 207.846, 181.865, 155.885, // 288
212 +129.904, 103.923, 77.942, 51.961, 25.981, 0.000, -25.981, -51.961, // 296
213 -077.942, -103.923, -129.904, -155.885, -181.865, -207.846, -233.827, -259.808, // 304
214 -259.808, -259.808, -259.808, -259.808, -259.808, -259.808, -259.808, -259.808, // 312
215 -259.808, -259.808, -233.827, -207.846, -181.865, -155.885, -129.904, -103.923, // 320
216 -077.942, -51.961, -25.981, 0.000, 25.981, 51.961, 77.942, 103.923, // 328
217 +129.904, 155.885, 181.865, 207.846, 233.827, 259.808, 285.788, 285.788, // 336
218 +285.788, 285.788, 285.788, 285.788, 285.788, 285.788, 285.788, 285.788, // 344
219 +285.788, 285.788, 259.808, 233.827, 207.846, 181.865, 155.885, 129.904, // 352
220 +103.923, 77.942, 51.961, 25.981, 0.000, -25.981, -51.961, -77.942, // 360
221 -103.923, -129.904, -155.885, -181.865, -207.846, -233.827, -259.808, -285.788, // 368
222 -285.788, -285.788, -285.788, -285.788, -285.788, -285.788, -285.788, -285.788, // 376
223 -285.788, -285.788, -285.788, -259.808, -233.827, -207.846, -181.865, -155.885, // 384
224 -129.904, -103.923, -77.942, -51.961, -25.981, 34.641, 86.603, 138.564, // 392
225 +190.526, 242.487, 294.449, 329.090, 329.090, 329.090, 329.090, 329.090, // 400
226 +329.090, 294.449, 242.487, 190.526, 138.564, 86.603, 34.641, -34.641, // 408
227 -086.603, -138.564, -190.526, -242.487, -294.449, -329.090, -329.090, -329.090, // 416
228 -329.090, -329.090, -329.090, -294.449, -242.487, -190.526, -138.564, -86.603, // 424
229 -034.641, 34.641, 86.603, 138.564, 190.526, 242.487, 294.449, 346.410, // 432
230 +381.051, 381.051, 381.051, 381.051, 381.051, 381.051, 381.051, 346.410, // 440
231 +294.449, 242.487, 190.526, 138.564, 86.603, 34.641, -34.641, -86.603, // 448
232 -138.564, -190.526, -242.487, -294.449, -346.410, -381.051, -381.051, -381.051, // 456
233 -381.051, -381.051, -381.051, -381.051, -346.410, -294.449, -242.487, -190.526, // 464
234 -138.564, -86.603, -34.641, 34.641, 86.603, 138.564, 190.526, 242.487, // 472
235 +294.449, 346.410, 398.372, 433.013, 433.013, 433.013, 433.013, 433.013, // 480
236 +433.013, 433.013, 433.013, 398.372, 346.410, 294.449, 242.487, 190.526, // 488
237 +138.564, 86.603, 34.641, -34.641, -86.603, -138.564, -190.526, -242.487, // 496
238 -294.449, -346.410, -398.372, -433.013, -433.013, -433.013, -433.013, -433.013, // 504
239 -433.013, -433.013, -433.013, -398.372, -346.410, -294.449, -242.487, -190.526, // 512
240 -138.564, -86.603, -34.641, 34.641, 86.603, 138.564, 190.526, 242.487, // 520
241 +294.449, 346.410, 398.372, 450.333, 484.974, 484.974, 484.974, 484.974, // 528
242 +484.974, 484.974, 484.974, 484.974, 484.974, 450.333, 398.372, 346.410, // 536
243 +294.449, 242.487, 190.526, 138.564, 86.603, 34.641, -34.641, -86.603, // 544
244 -138.564, -190.526, -242.487, -294.449, -346.410, -398.372, -450.333, -484.974, // 552
245 -484.974, -484.974, -484.974, -484.974, -484.974, -484.974, -484.974, -484.974, // 560
246 -450.333, -398.372, -346.410, -294.449, -242.487, -190.526, -138.564, -86.603, // 568
247 -034.641 // 576
248 };
249
250 const Byte_t sector[577] = {
251 0, 1, 2, 3, 4, 5, 6, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6,
252 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 1,
253 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5,
254 6, 6, 6, 6, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3,
255 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 1, 1, 1, 1,
256 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4,
257 4, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 1, 1, 1, 1, 1, 1,
258 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4,
259 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 1, 1,
260 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3,
261 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5,
262 6, 6, 6, 6, 6, 6, 6, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2,
263 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4,
264 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6,
265 6, 6, 6, 6, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2,
266 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4,
267 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6,
268 6, 6, 6, 6, 6, 6, 6, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
269 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3,
270 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5,
271 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 1, 1,
272 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4,
273 4, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 1, 1, 1, 1,
274 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4,
275 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6,
276 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3,
277 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5,
278 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1,
279 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4,
280 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6,
281 6, 6, 6, 6, 6, 6, 6 };
282
283 //
284 // fill the pixels list with this data
285 //
286 for (UInt_t i=0; i<GetNumPixels(); i++)
287 SetAt(i, MGeomPix(xtemp[i], ytemp[i], i>396?60:30, sector[i], i>396?1:0));
288 // (*this)[i].Set(xtemp[i], ytemp[i], i>396?60:30, i>396?sector[i]+6:sector[i]);
289}
290
291// --------------------------------------------------------------------------
292//
293// This fills the next neighbor information from a table into the pixel
294// objects.
295//
296void MGeomCamMagic::CreateNN()
297{
298 const Short_t nn[577][6] = { // Neighbors of #
299 { 1, 2, 3, 4, 5, 6}, // 0
300 { 0, 2, 6, 7, 8, 18},
301 { 0, 1, 3, 8, 9, 10},
302 { 0, 2, 4, 10, 11, 12},
303 { 0, 3, 5, 12, 13, 14},
304 { 0, 4, 6, 14, 15, 16},
305 { 0, 1, 5, 16, 17, 18},
306 { 1, 8, 18, 19, 20, 36},
307 { 1, 2, 7, 9, 20, 21},
308 { 2, 8, 10, 21, 22, 23},
309 { 2, 3, 9, 11, 23, 24},
310 { 3, 10, 12, 24, 25, 26},
311 { 3, 4, 11, 13, 26, 27},
312 { 4, 12, 14, 27, 28, 29},
313 { 4, 5, 13, 15, 29, 30},
314 { 5, 14, 16, 30, 31, 32},
315 { 5, 6, 15, 17, 32, 33},
316 { 6, 16, 18, 33, 34, 35},
317 { 1, 6, 7, 17, 35, 36},
318 { 7, 20, 36, 37, 38, 60},
319 { 7, 8, 19, 21, 38, 39}, // 20
320 { 8, 9, 20, 22, 39, 40},
321 { 9, 21, 23, 40, 41, 42},
322 { 9, 10, 22, 24, 42, 43},
323 { 10, 11, 23, 25, 43, 44},
324 { 11, 24, 26, 44, 45, 46},
325 { 11, 12, 25, 27, 46, 47},
326 { 12, 13, 26, 28, 47, 48},
327 { 13, 27, 29, 48, 49, 50},
328 { 13, 14, 28, 30, 50, 51},
329 { 14, 15, 29, 31, 51, 52},
330 { 15, 30, 32, 52, 53, 54},
331 { 15, 16, 31, 33, 54, 55},
332 { 16, 17, 32, 34, 55, 56},
333 { 17, 33, 35, 56, 57, 58},
334 { 17, 18, 34, 36, 58, 59},
335 { 7, 18, 19, 35, 59, 60},
336 { 19, 38, 60, 61, 62, 90},
337 { 19, 20, 37, 39, 62, 63},
338 { 20, 21, 38, 40, 63, 64},
339 { 21, 22, 39, 41, 64, 65}, // 40
340 { 22, 40, 42, 65, 66, 67},
341 { 22, 23, 41, 43, 67, 68},
342 { 23, 24, 42, 44, 68, 69},
343 { 24, 25, 43, 45, 69, 70},
344 { 25, 44, 46, 70, 71, 72},
345 { 25, 26, 45, 47, 72, 73},
346 { 26, 27, 46, 48, 73, 74},
347 { 27, 28, 47, 49, 74, 75},
348 { 28, 48, 50, 75, 76, 77},
349 { 28, 29, 49, 51, 77, 78},
350 { 29, 30, 50, 52, 78, 79},
351 { 30, 31, 51, 53, 79, 80},
352 { 31, 52, 54, 80, 81, 82},
353 { 31, 32, 53, 55, 82, 83},
354 { 32, 33, 54, 56, 83, 84},
355 { 33, 34, 55, 57, 84, 85},
356 { 34, 56, 58, 85, 86, 87},
357 { 34, 35, 57, 59, 87, 88},
358 { 35, 36, 58, 60, 88, 89},
359 { 19, 36, 37, 59, 89, 90}, // 60
360 { 37, 62, 90, 91, 92, 126},
361 { 37, 38, 61, 63, 92, 93},
362 { 38, 39, 62, 64, 93, 94},
363 { 39, 40, 63, 65, 94, 95},
364 { 40, 41, 64, 66, 95, 96},
365 { 41, 65, 67, 96, 97, 98},
366 { 41, 42, 66, 68, 98, 99},
367 { 42, 43, 67, 69, 99, 100},
368 { 43, 44, 68, 70, 100, 101},
369 { 44, 45, 69, 71, 101, 102},
370 { 45, 70, 72, 102, 103, 104},
371 { 45, 46, 71, 73, 104, 105},
372 { 46, 47, 72, 74, 105, 106},
373 { 47, 48, 73, 75, 106, 107},
374 { 48, 49, 74, 76, 107, 108},
375 { 49, 75, 77, 108, 109, 110},
376 { 49, 50, 76, 78, 110, 111},
377 { 50, 51, 77, 79, 111, 112},
378 { 51, 52, 78, 80, 112, 113},
379 { 52, 53, 79, 81, 113, 114}, // 80
380 { 53, 80, 82, 114, 115, 116},
381 { 53, 54, 81, 83, 116, 117},
382 { 54, 55, 82, 84, 117, 118},
383 { 55, 56, 83, 85, 118, 119},
384 { 56, 57, 84, 86, 119, 120},
385 { 57, 85, 87, 120, 121, 122},
386 { 57, 58, 86, 88, 122, 123},
387 { 58, 59, 87, 89, 123, 124},
388 { 59, 60, 88, 90, 124, 125},
389 { 37, 60, 61, 89, 125, 126},
390 { 61, 92, 126, 127, 128, 168},
391 { 61, 62, 91, 93, 128, 129},
392 { 62, 63, 92, 94, 129, 130},
393 { 63, 64, 93, 95, 130, 131},
394 { 64, 65, 94, 96, 131, 132},
395 { 65, 66, 95, 97, 132, 133},
396 { 66, 96, 98, 133, 134, 135},
397 { 66, 67, 97, 99, 135, 136},
398 { 67, 68, 98, 100, 136, 137},
399 { 68, 69, 99, 101, 137, 138}, // 100
400 { 69, 70, 100, 102, 138, 139},
401 { 70, 71, 101, 103, 139, 140},
402 { 71, 102, 104, 140, 141, 142},
403 { 71, 72, 103, 105, 142, 143},
404 { 72, 73, 104, 106, 143, 144},
405 { 73, 74, 105, 107, 144, 145},
406 { 74, 75, 106, 108, 145, 146},
407 { 75, 76, 107, 109, 146, 147},
408 { 76, 108, 110, 147, 148, 149},
409 { 76, 77, 109, 111, 149, 150},
410 { 77, 78, 110, 112, 150, 151},
411 { 78, 79, 111, 113, 151, 152},
412 { 79, 80, 112, 114, 152, 153},
413 { 80, 81, 113, 115, 153, 154},
414 { 81, 114, 116, 154, 155, 156},
415 { 81, 82, 115, 117, 156, 157},
416 { 82, 83, 116, 118, 157, 158},
417 { 83, 84, 117, 119, 158, 159},
418 { 84, 85, 118, 120, 159, 160},
419 { 85, 86, 119, 121, 160, 161}, // 120
420 { 86, 120, 122, 161, 162, 163},
421 { 86, 87, 121, 123, 163, 164},
422 { 87, 88, 122, 124, 164, 165},
423 { 88, 89, 123, 125, 165, 166},
424 { 89, 90, 124, 126, 166, 167},
425 { 61, 90, 91, 125, 167, 168},
426 { 91, 128, 168, 169, 170, 216},
427 { 91, 92, 127, 129, 170, 171},
428 { 92, 93, 128, 130, 171, 172},
429 { 93, 94, 129, 131, 172, 173},
430 { 94, 95, 130, 132, 173, 174},
431 { 95, 96, 131, 133, 174, 175},
432 { 96, 97, 132, 134, 175, 176},
433 { 97, 133, 135, 176, 177, 178},
434 { 97, 98, 134, 136, 178, 179},
435 { 98, 99, 135, 137, 179, 180},
436 { 99, 100, 136, 138, 180, 181},
437 { 100, 101, 137, 139, 181, 182},
438 { 101, 102, 138, 140, 182, 183},
439 { 102, 103, 139, 141, 183, 184}, // 140
440 { 103, 140, 142, 184, 185, 186},
441 { 103, 104, 141, 143, 186, 187},
442 { 104, 105, 142, 144, 187, 188},
443 { 105, 106, 143, 145, 188, 189},
444 { 106, 107, 144, 146, 189, 190},
445 { 107, 108, 145, 147, 190, 191},
446 { 108, 109, 146, 148, 191, 192},
447 { 109, 147, 149, 192, 193, 194},
448 { 109, 110, 148, 150, 194, 195},
449 { 110, 111, 149, 151, 195, 196},
450 { 111, 112, 150, 152, 196, 197},
451 { 112, 113, 151, 153, 197, 198},
452 { 113, 114, 152, 154, 198, 199},
453 { 114, 115, 153, 155, 199, 200},
454 { 115, 154, 156, 200, 201, 202},
455 { 115, 116, 155, 157, 202, 203},
456 { 116, 117, 156, 158, 203, 204},
457 { 117, 118, 157, 159, 204, 205},
458 { 118, 119, 158, 160, 205, 206},
459 { 119, 120, 159, 161, 206, 207}, // 160
460 { 120, 121, 160, 162, 207, 208},
461 { 121, 161, 163, 208, 209, 210},
462 { 121, 122, 162, 164, 210, 211},
463 { 122, 123, 163, 165, 211, 212},
464 { 123, 124, 164, 166, 212, 213},
465 { 124, 125, 165, 167, 213, 214},
466 { 125, 126, 166, 168, 214, 215},
467 { 91, 126, 127, 167, 215, 216},
468 { 127, 170, 216, 217, 218, 270},
469 { 127, 128, 169, 171, 218, 219},
470 { 128, 129, 170, 172, 219, 220},
471 { 129, 130, 171, 173, 220, 221},
472 { 130, 131, 172, 174, 221, 222},
473 { 131, 132, 173, 175, 222, 223},
474 { 132, 133, 174, 176, 223, 224},
475 { 133, 134, 175, 177, 224, 225},
476 { 134, 176, 178, 225, 226, 227},
477 { 134, 135, 177, 179, 227, 228},
478 { 135, 136, 178, 180, 228, 229},
479 { 136, 137, 179, 181, 229, 230}, // 180
480 { 137, 138, 180, 182, 230, 231},
481 { 138, 139, 181, 183, 231, 232},
482 { 139, 140, 182, 184, 232, 233},
483 { 140, 141, 183, 185, 233, 234},
484 { 141, 184, 186, 234, 235, 236},
485 { 141, 142, 185, 187, 236, 237},
486 { 142, 143, 186, 188, 237, 238},
487 { 143, 144, 187, 189, 238, 239},
488 { 144, 145, 188, 190, 239, 240},
489 { 145, 146, 189, 191, 240, 241},
490 { 146, 147, 190, 192, 241, 242},
491 { 147, 148, 191, 193, 242, 243},
492 { 148, 192, 194, 243, 244, 245},
493 { 148, 149, 193, 195, 245, 246},
494 { 149, 150, 194, 196, 246, 247},
495 { 150, 151, 195, 197, 247, 248},
496 { 151, 152, 196, 198, 248, 249},
497 { 152, 153, 197, 199, 249, 250},
498 { 153, 154, 198, 200, 250, 251},
499 { 154, 155, 199, 201, 251, 252}, // 200
500 { 155, 200, 202, 252, 253, 254},
501 { 155, 156, 201, 203, 254, 255},
502 { 156, 157, 202, 204, 255, 256},
503 { 157, 158, 203, 205, 256, 257},
504 { 158, 159, 204, 206, 257, 258},
505 { 159, 160, 205, 207, 258, 259},
506 { 160, 161, 206, 208, 259, 260},
507 { 161, 162, 207, 209, 260, 261},
508 { 162, 208, 210, 261, 262, 263},
509 { 162, 163, 209, 211, 263, 264},
510 { 163, 164, 210, 212, 264, 265},
511 { 164, 165, 211, 213, 265, 266},
512 { 165, 166, 212, 214, 266, 267},
513 { 166, 167, 213, 215, 267, 268},
514 { 167, 168, 214, 216, 268, 269},
515 { 127, 168, 169, 215, 269, 270},
516 { 169, 218, 270, 271, 272, 330},
517 { 169, 170, 217, 219, 272, 273},
518 { 170, 171, 218, 220, 273, 274},
519 { 171, 172, 219, 221, 274, 275}, // 220
520 { 172, 173, 220, 222, 275, 276},
521 { 173, 174, 221, 223, 276, 277},
522 { 174, 175, 222, 224, 277, 278},
523 { 175, 176, 223, 225, 278, 279},
524 { 176, 177, 224, 226, 279, 280},
525 { 177, 225, 227, 280, 281, 282},
526 { 177, 178, 226, 228, 282, 283},
527 { 178, 179, 227, 229, 283, 284},
528 { 179, 180, 228, 230, 284, 285},
529 { 180, 181, 229, 231, 285, 286},
530 { 181, 182, 230, 232, 286, 287},
531 { 182, 183, 231, 233, 287, 288},
532 { 183, 184, 232, 234, 288, 289},
533 { 184, 185, 233, 235, 289, 290},
534 { 185, 234, 236, 290, 291, 292},
535 { 185, 186, 235, 237, 292, 293},
536 { 186, 187, 236, 238, 293, 294},
537 { 187, 188, 237, 239, 294, 295},
538 { 188, 189, 238, 240, 295, 296},
539 { 189, 190, 239, 241, 296, 297}, // 240
540 { 190, 191, 240, 242, 297, 298},
541 { 191, 192, 241, 243, 298, 299},
542 { 192, 193, 242, 244, 299, 300},
543 { 193, 243, 245, 300, 301, 302},
544 { 193, 194, 244, 246, 302, 303},
545 { 194, 195, 245, 247, 303, 304},
546 { 195, 196, 246, 248, 304, 305},
547 { 196, 197, 247, 249, 305, 306},
548 { 197, 198, 248, 250, 306, 307},
549 { 198, 199, 249, 251, 307, 308},
550 { 199, 200, 250, 252, 308, 309},
551 { 200, 201, 251, 253, 309, 310},
552 { 201, 252, 254, 310, 311, 312},
553 { 201, 202, 253, 255, 312, 313},
554 { 202, 203, 254, 256, 313, 314},
555 { 203, 204, 255, 257, 314, 315},
556 { 204, 205, 256, 258, 315, 316},
557 { 205, 206, 257, 259, 316, 317},
558 { 206, 207, 258, 260, 317, 318},
559 { 207, 208, 259, 261, 318, 319}, // 260
560 { 208, 209, 260, 262, 319, 320},
561 { 209, 261, 263, 320, 321, 322},
562 { 209, 210, 262, 264, 322, 323},
563 { 210, 211, 263, 265, 323, 324},
564 { 211, 212, 264, 266, 324, 325},
565 { 212, 213, 265, 267, 325, 326},
566 { 213, 214, 266, 268, 326, 327},
567 { 214, 215, 267, 269, 327, 328},
568 { 215, 216, 268, 270, 328, 329},
569 { 169, 216, 217, 269, 329, 330},
570 { 217, 272, 330, 331, 332, 396},
571 { 217, 218, 271, 273, 332, 333},
572 { 218, 219, 272, 274, 333, 334},
573 { 219, 220, 273, 275, 334, 335},
574 { 220, 221, 274, 276, 335, 336},
575 { 221, 222, 275, 277, 336, 337},
576 { 222, 223, 276, 278, 337, 338},
577 { 223, 224, 277, 279, 338, 339},
578 { 224, 225, 278, 280, 339, 340},
579 { 225, 226, 279, 281, 340, 341}, // 280
580 { 226, 280, 282, 341, 342, 343},
581 { 226, 227, 281, 283, 343, 344},
582 { 227, 228, 282, 284, 344, 345},
583 { 228, 229, 283, 285, 345, 346},
584 { 229, 230, 284, 286, 346, 347},
585 { 230, 231, 285, 287, 347, 348},
586 { 231, 232, 286, 288, 348, 349},
587 { 232, 233, 287, 289, 349, 350},
588 { 233, 234, 288, 290, 350, 351},
589 { 234, 235, 289, 291, 351, 352},
590 { 235, 290, 292, 352, 353, 354},
591 { 235, 236, 291, 293, 354, 355},
592 { 236, 237, 292, 294, 355, 356},
593 { 237, 238, 293, 295, 356, 357},
594 { 238, 239, 294, 296, 357, 358},
595 { 239, 240, 295, 297, 358, 359},
596 { 240, 241, 296, 298, 359, 360},
597 { 241, 242, 297, 299, 360, 361},
598 { 242, 243, 298, 300, 361, 362},
599 { 243, 244, 299, 301, 362, 363}, // 300
600 { 244, 300, 302, 363, 364, 365},
601 { 244, 245, 301, 303, 365, 366},
602 { 245, 246, 302, 304, 366, 367},
603 { 246, 247, 303, 305, 367, 368},
604 { 247, 248, 304, 306, 368, 369},
605 { 248, 249, 305, 307, 369, 370},
606 { 249, 250, 306, 308, 370, 371},
607 { 250, 251, 307, 309, 371, 372},
608 { 251, 252, 308, 310, 372, 373},
609 { 252, 253, 309, 311, 373, 374},
610 { 253, 310, 312, 374, 375, 376},
611 { 253, 254, 311, 313, 376, 377},
612 { 254, 255, 312, 314, 377, 378},
613 { 255, 256, 313, 315, 378, 379},
614 { 256, 257, 314, 316, 379, 380},
615 { 257, 258, 315, 317, 380, 381},
616 { 258, 259, 316, 318, 381, 382},
617 { 259, 260, 317, 319, 382, 383},
618 { 260, 261, 318, 320, 383, 384},
619 { 261, 262, 319, 321, 384, 385}, // 320
620 { 262, 320, 322, 385, 386, 387},
621 { 262, 263, 321, 323, 387, 388},
622 { 263, 264, 322, 324, 388, 389},
623 { 264, 265, 323, 325, 389, 390},
624 { 265, 266, 324, 326, 390, 391},
625 { 266, 267, 325, 327, 391, 392},
626 { 267, 268, 326, 328, 392, 393},
627 { 268, 269, 327, 329, 393, 394},
628 { 269, 270, 328, 330, 394, 395},
629 { 217, 270, 271, 329, 395, 396},
630 { 271, 332, 396, 397, 432, -1},
631 { 271, 272, 331, 333, 397, -1},
632 { 272, 273, 332, 334, 398, -1},
633 { 273, 274, 333, 335, 398, -1},
634 { 274, 275, 334, 336, 399, -1},
635 { 275, 276, 335, 337, 399, -1},
636 { 276, 277, 336, 338, 400, -1},
637 { 277, 278, 337, 339, 400, -1},
638 { 278, 279, 338, 340, 401, -1},
639 { 279, 280, 339, 341, 401, -1}, // 340
640 { 280, 281, 340, 342, 402, -1},
641 { 281, 341, 343, 402, 403, -1},
642 { 281, 282, 342, 344, 403, -1},
643 { 282, 283, 343, 345, 404, -1},
644 { 283, 284, 344, 346, 404, -1},
645 { 284, 285, 345, 347, 405, -1},
646 { 285, 286, 346, 348, 405, -1},
647 { 286, 287, 347, 349, 406, -1},
648 { 287, 288, 348, 350, 406, -1},
649 { 288, 289, 349, 351, 407, -1},
650 { 289, 290, 350, 352, 407, -1},
651 { 290, 291, 351, 353, 408, -1},
652 { 291, 352, 354, 408, 409, -1},
653 { 291, 292, 353, 355, 409, -1},
654 { 292, 293, 354, 356, 410, -1},
655 { 293, 294, 355, 357, 410, -1},
656 { 294, 295, 356, 358, 411, -1},
657 { 295, 296, 357, 359, 411, -1},
658 { 296, 297, 358, 360, 412, -1},
659 { 297, 298, 359, 361, 412, -1}, // 360
660 { 298, 299, 360, 362, 413, -1},
661 { 299, 300, 361, 363, 413, -1},
662 { 300, 301, 362, 364, 414, -1},
663 { 301, 363, 365, 414, 415, -1},
664 { 301, 302, 364, 366, 415, -1},
665 { 302, 303, 365, 367, 416, -1},
666 { 303, 304, 366, 368, 416, -1},
667 { 304, 305, 367, 369, 417, -1},
668 { 305, 306, 368, 370, 417, -1},
669 { 306, 307, 369, 371, 418, -1},
670 { 307, 308, 370, 372, 418, -1},
671 { 308, 309, 371, 373, 419, -1},
672 { 309, 310, 372, 374, 419, -1},
673 { 310, 311, 373, 375, 420, -1},
674 { 311, 374, 376, 420, 421, -1},
675 { 311, 312, 375, 377, 421, -1},
676 { 312, 313, 376, 378, 422, -1},
677 { 313, 314, 377, 379, 422, -1},
678 { 314, 315, 378, 380, 423, -1},
679 { 315, 316, 379, 381, 423, -1}, // 380
680 { 316, 317, 380, 382, 424, -1},
681 { 317, 318, 381, 383, 424, -1},
682 { 318, 319, 382, 384, 425, -1},
683 { 319, 320, 383, 385, 425, -1},
684 { 320, 321, 384, 386, 426, -1},
685 { 321, 385, 387, 426, 427, -1},
686 { 321, 322, 386, 388, 427, -1},
687 { 322, 323, 387, 389, 428, -1},
688 { 323, 324, 388, 390, 428, -1},
689 { 324, 325, 389, 391, 429, -1},
690 { 325, 326, 390, 392, 429, -1},
691 { 326, 327, 391, 393, 430, -1},
692 { 327, 328, 392, 394, 430, -1},
693 { 328, 329, 393, 395, 431, -1},
694 { 329, 330, 394, 396, 431, -1},
695 { 271, 330, 331, 395, 432, -1},
696 { 331, 332, 398, 432, 433, 434},
697 { 333, 334, 397, 399, 434, 435},
698 { 335, 336, 398, 400, 435, 436},
699 { 337, 338, 399, 401, 436, 437}, // 400
700 { 339, 340, 400, 402, 437, 438},
701 { 341, 342, 401, 403, 438, 439},
702 { 342, 343, 402, 404, 440, 441},
703 { 344, 345, 403, 405, 441, 442},
704 { 346, 347, 404, 406, 442, 443},
705 { 348, 349, 405, 407, 443, 444},
706 { 350, 351, 406, 408, 444, 445},
707 { 352, 353, 407, 409, 445, 446},
708 { 353, 354, 408, 410, 447, 448},
709 { 355, 356, 409, 411, 448, 449},
710 { 357, 358, 410, 412, 449, 450},
711 { 359, 360, 411, 413, 450, 451},
712 { 361, 362, 412, 414, 451, 452},
713 { 363, 364, 413, 415, 452, 453},
714 { 364, 365, 414, 416, 454, 455},
715 { 366, 367, 415, 417, 455, 456},
716 { 368, 369, 416, 418, 456, 457},
717 { 370, 371, 417, 419, 457, 458},
718 { 372, 373, 418, 420, 458, 459},
719 { 374, 375, 419, 421, 459, 460}, // 420
720 { 375, 376, 420, 422, 461, 462},
721 { 377, 378, 421, 423, 462, 463},
722 { 379, 380, 422, 424, 463, 464},
723 { 381, 382, 423, 425, 464, 465},
724 { 383, 384, 424, 426, 465, 466},
725 { 385, 386, 425, 427, 466, 467},
726 { 386, 387, 426, 428, 468, 469},
727 { 388, 389, 427, 429, 469, 470},
728 { 390, 391, 428, 430, 470, 471},
729 { 392, 393, 429, 431, 471, 472},
730 { 394, 395, 430, 432, 472, 473},
731 { 331, 396, 397, 431, 473, 474},
732 { 397, 434, 474, 475, 476, -1},
733 { 397, 398, 433, 435, 476, 477},
734 { 398, 399, 434, 436, 477, 478},
735 { 399, 400, 435, 437, 478, 479},
736 { 400, 401, 436, 438, 479, 480},
737 { 401, 402, 437, 439, 480, 481},
738 { 402, 438, 440, 481, 482, -1},
739 { 403, 439, 441, 483, 484, -1}, // 440
740 { 403, 404, 440, 442, 484, 485},
741 { 404, 405, 441, 443, 485, 486},
742 { 405, 406, 442, 444, 486, 487},
743 { 406, 407, 443, 445, 487, 488},
744 { 407, 408, 444, 446, 488, 489},
745 { 408, 445, 447, 489, 490, -1},
746 { 409, 446, 448, 491, 492, -1},
747 { 409, 410, 447, 449, 492, 493},
748 { 410, 411, 448, 450, 493, 494},
749 { 411, 412, 449, 451, 494, 495},
750 { 412, 413, 450, 452, 495, 496},
751 { 413, 414, 451, 453, 496, 497},
752 { 414, 452, 454, 497, 498, -1},
753 { 415, 453, 455, 499, 500, -1},
754 { 415, 416, 454, 456, 500, 501},
755 { 416, 417, 455, 457, 501, 502},
756 { 417, 418, 456, 458, 502, 503},
757 { 418, 419, 457, 459, 503, 504},
758 { 419, 420, 458, 460, 504, 505},
759 { 420, 459, 461, 505, 506, -1}, // 460
760 { 421, 460, 462, 507, 508, -1},
761 { 421, 422, 461, 463, 508, 509},
762 { 422, 423, 462, 464, 509, 510},
763 { 423, 424, 463, 465, 510, 511},
764 { 424, 425, 464, 466, 511, 512},
765 { 425, 426, 465, 467, 512, 513},
766 { 426, 466, 468, 513, 514, -1},
767 { 427, 467, 469, 515, 516, -1},
768 { 427, 428, 468, 470, 516, 517},
769 { 428, 429, 469, 471, 517, 518},
770 { 429, 430, 470, 472, 518, 519},
771 { 430, 431, 471, 473, 519, 520},
772 { 431, 432, 472, 474, 520, 521},
773 { 432, 433, 473, 521, 522, -1},
774 { 433, 476, 522, 523, 524, -1},
775 { 433, 434, 475, 477, 524, 525},
776 { 434, 435, 476, 478, 525, 526},
777 { 435, 436, 477, 479, 526, 527},
778 { 436, 437, 478, 480, 527, 528},
779 { 437, 438, 479, 481, 528, 529}, // 480
780 { 438, 439, 480, 482, 529, 530},
781 { 439, 481, 483, 530, 531, -1},
782 { 440, 482, 484, 532, 533, -1},
783 { 440, 441, 483, 485, 533, 534},
784 { 441, 442, 484, 486, 534, 535},
785 { 442, 443, 485, 487, 535, 536},
786 { 443, 444, 486, 488, 536, 537},
787 { 444, 445, 487, 489, 537, 538},
788 { 445, 446, 488, 490, 538, 539},
789 { 446, 489, 491, 539, 540, -1},
790 { 447, 490, 492, 541, 542, -1},
791 { 447, 448, 491, 493, 542, 543},
792 { 448, 449, 492, 494, 543, 544},
793 { 449, 450, 493, 495, 544, 545},
794 { 450, 451, 494, 496, 545, 546},
795 { 451, 452, 495, 497, 546, 547},
796 { 452, 453, 496, 498, 547, 548},
797 { 453, 497, 499, 548, 549, -1},
798 { 454, 498, 500, 550, 551, -1},
799 { 454, 455, 499, 501, 551, 552}, // 500
800 { 455, 456, 500, 502, 552, 553},
801 { 456, 457, 501, 503, 553, 554},
802 { 457, 458, 502, 504, 554, 555},
803 { 458, 459, 503, 505, 555, 556},
804 { 459, 460, 504, 506, 556, 557},
805 { 460, 505, 507, 557, 558, -1},
806 { 461, 506, 508, 559, 560, -1},
807 { 461, 462, 507, 509, 560, 561},
808 { 462, 463, 508, 510, 561, 562},
809 { 463, 464, 509, 511, 562, 563},
810 { 464, 465, 510, 512, 563, 564},
811 { 465, 466, 511, 513, 564, 565},
812 { 466, 467, 512, 514, 565, 566},
813 { 467, 513, 515, 566, 567, -1},
814 { 468, 514, 516, 568, 569, -1},
815 { 468, 469, 515, 517, 569, 570},
816 { 469, 470, 516, 518, 570, 571},
817 { 470, 471, 517, 519, 571, 572},
818 { 471, 472, 518, 520, 572, 573},
819 { 472, 473, 519, 521, 573, 574}, // 520
820 { 473, 474, 520, 522, 574, 575},
821 { 474, 475, 521, 575, 576, -1},
822 { 475, 524, 576, -1, -1, -1},
823 { 475, 476, 523, 525, -1, -1},
824 { 476, 477, 524, 526, -1, -1},
825 { 477, 478, 525, 527, -1, -1},
826 { 478, 479, 526, 528, -1, -1},
827 { 479, 480, 527, 529, -1, -1},
828 { 480, 481, 528, 530, -1, -1},
829 { 481, 482, 529, 531, -1, -1},
830 { 482, 530, 532, -1, -1, -1},
831 { 483, 531, 533, -1, -1, -1},
832 { 483, 484, 532, 534, -1, -1},
833 { 484, 485, 533, 535, -1, -1},
834 { 485, 486, 534, 536, -1, -1},
835 { 486, 487, 535, 537, -1, -1},
836 { 487, 488, 536, 538, -1, -1},
837 { 488, 489, 537, 539, -1, -1},
838 { 489, 490, 538, 540, -1, -1},
839 { 490, 539, 541, -1, -1, -1}, // 540
840 { 491, 540, 542, -1, -1, -1},
841 { 491, 492, 541, 543, -1, -1},
842 { 492, 493, 542, 544, -1, -1},
843 { 493, 494, 543, 545, -1, -1},
844 { 494, 495, 544, 546, -1, -1},
845 { 495, 496, 545, 547, -1, -1},
846 { 496, 497, 546, 548, -1, -1},
847 { 497, 498, 547, 549, -1, -1},
848 { 498, 548, 550, -1, -1, -1},
849 { 499, 549, 551, -1, -1, -1},
850 { 499, 500, 550, 552, -1, -1},
851 { 500, 501, 551, 553, -1, -1},
852 { 501, 502, 552, 554, -1, -1},
853 { 502, 503, 553, 555, -1, -1},
854 { 503, 504, 554, 556, -1, -1},
855 { 504, 505, 555, 557, -1, -1},
856 { 505, 506, 556, 558, -1, -1},
857 { 506, 557, 559, -1, -1, -1},
858 { 507, 558, 560, -1, -1, -1},
859 { 507, 508, 559, 561, -1, -1}, // 560
860 { 508, 509, 560, 562, -1, -1},
861 { 509, 510, 561, 563, -1, -1},
862 { 510, 511, 562, 564, -1, -1},
863 { 511, 512, 563, 565, -1, -1},
864 { 512, 513, 564, 566, -1, -1},
865 { 513, 514, 565, 567, -1, -1},
866 { 514, 566, 568, -1, -1, -1},
867 { 515, 567, 569, -1, -1, -1},
868 { 515, 516, 568, 570, -1, -1},
869 { 516, 517, 569, 571, -1, -1}, // 570
870 { 517, 518, 570, 572, -1, -1},
871 { 518, 519, 571, 573, -1, -1},
872 { 519, 520, 572, 574, -1, -1},
873 { 520, 521, 573, 575, -1, -1},
874 { 521, 522, 574, 576, -1, -1},
875 { 522, 523, 575, -1, -1, -1} // 576
876 };
877
878 for (Int_t i=0; i<577; i++)
879 (*this)[i].SetNeighbors(nn[i][0], nn[i][1], nn[i][2],
880 nn[i][3], nn[i][4], nn[i][5]);
881
882 SortNeighbors();
883}
884
885// --------------------------------------------------------------------------
886//
887// Magic camera has 913 pixels. For geometry and Next Neighbor info see
888// CreateCam and CreateNN
889//
890MGeomCamMagicII::MGeomCamMagicII(const char *name)
891 : MGeomCamDwarf(505., 30, 17, name)
892{
893 SetTitle("Geometry information of Magic II Camera");
894 Rotate();
895}
896
897// --------------------------------------------------------------------------
898//
899// Magic II camera has 913 pixels. For geometry and Next Neighbor info see
900// CreateCam and CreateNN. You can give the distance dist from
901// the mirror center to the focal plane.
902//
903MGeomCamMagicII::MGeomCamMagicII(Double_t dist, const char *name)
904 : MGeomCamDwarf(505., 30, dist, name)
905{
906 SetTitle("Geometry information of Magic II Camera");
907 Rotate();
908}
909
910// --------------------------------------------------------------------------
911//
912// Rotate all pixels by 30deg
913//
914void MGeomCamMagicII::Rotate()
915{
916 const Double_t phi = 30*TMath::DegToRad();
917
918 const TVector2 v(TMath::Cos(phi), TMath::Sin(phi));
919
920 for (UInt_t i=0; i<GetNumPixels(); i++)
921 {
922 MGeomPix &pix = static_cast<MGeomPix&>(operator[](i));
923
924 pix.SetP(pix.GetP()*v, pix.GetP()^v);
925 pix.SetPhi(phi);
926 }
927}
928
929// --------------------------------------------------------------------------
930//
931// Check if the photon which is flying along the trajectory u has passed
932// (or will pass) the frame of the camera (and consequently get
933// absorbed). The position p and direction u must be in the
934// telescope coordinate frame, which is z parallel to the focal plane,
935// x to the right and y upwards, looking from the mirror towards the camera.
936//
937Bool_t MGeomCamMagicII::HitFrame(MQuaternion p, const MQuaternion &u) const
938{
939 // z is defined from the mirror (0) to the camera (z>0).
940 // Thus we just propagate to the focal plane (z=fDist)
941 p.PropagateZ(u, GetCameraDist()*100);
942
943 return TMath::Abs(p.X())<65 && TMath::Abs(p.Y())<65;
944}
Note: See TracBrowser for help on using the repository browser.