source: trunk/MagicSoft/Mars/mgeom/MGeomCamMagic.cc@ 9386

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