/* ======================================================================== *\ ! ! * ! * This file is part of MARS, the MAGIC Analysis and Reconstruction ! * Software. It is distributed to you in the hope that it can be a useful ! * and timesaving tool in analysing Data of imaging Cerenkov telescopes. ! * It is distributed WITHOUT ANY WARRANTY. ! * ! * Permission to use, copy, modify and distribute this software and its ! * documentation for any purpose is hereby granted without fee, ! * provided that the above copyright notice appear in all copies and ! * that both that copyright notice and this permission notice appear ! * in supporting documentation. It is provided "as is" without express ! * or implied warranty. ! * ! ! ! Author(s): Thomas Bretz 12/2000 ! Author(s): Harald Kornmayer 1/2001 ! ! Copyright: MAGIC Software Development, 2000-2008 ! ! \* ======================================================================== */ ///////////////////////////////////////////////////////////////////////////// // // MGeomCamMagic // // This class stores the geometry information of the Magic camera. // All information are copied from tables, see source code. // //////////////////////////////////////////////////////////////////////////// #include "MGeomCamMagic.h" #include "MGeomPix.h" ClassImp(MGeomCamMagic); // -------------------------------------------------------------------------- // // Magic camera has 577 pixels. For geometry and Next Neighbor info see // CreateCam and CreateNN // MGeomCamMagic::MGeomCamMagic(const char *name) : MGeomCam(577, 17, name, "Geometry information of Magic Camera") { CreateCam(); InitGeometry(); } // -------------------------------------------------------------------------- // // Magic camera has 577 pixels. For geometry and Next Neighbor info see // CreateCam and CreateNN. You can give the distance dist from // the mirror center to the focal plane. // MGeomCamMagic::MGeomCamMagic(Double_t dist, const char *name) : MGeomCam(577, dist, name, "Geometry information of Magic Camera") { CreateCam(); InitGeometry(); } // -------------------------------------------------------------------------- // // Check if the photon which is flying along the trajectory u has passed // (or will pass) the frame of the camera (and consequently get // absorbed). The position p and direction u must be in the // telescope coordinate frame, which is z parallel to the focal plane, // x to the right and y upwards, looking from the mirror towards the camera. // Bool_t MGeomCamMagic::HitFrame(MQuaternion p, const MQuaternion &u) const { // z is defined from the mirror (0) to the camera (z>0). // Thus we just propagate to the focal plane (z=fDist) p.PropagateZ(u, GetCameraDist()*100); return TMath::Abs(p.X())<65 && TMath::Abs(p.Y())<65; } // -------------------------------------------------------------------------- // // This fills the geometry information from a table into the pixel objects. // void MGeomCamMagic::CreateCam() { // // fill the geometry class with the coordinates of the MAGIC camera // //*fLog << inf << " Creating Magic geometry " << endl ; // // here define the hardwire things of the magic telescope // const Float_t xtemp[577] = { +000.000, 30.000, 15.000, -15.000, -30.000, -15.000, 15.000, 60.000, // 0 +045.000, 30.000, 0.000, -30.000, -45.000, -60.000, -45.000, -30.000, // 8 +000.000, 30.000, 45.000, 90.000, 75.000, 60.000, 45.000, 15.000, // 16 -015.000, -45.000, -60.000, -75.000, -90.000, -75.000, -60.000, -45.000, // 24 -015.000, 15.000, 45.000, 60.000, 75.000, 120.000, 105.000, 90.000, // 32 +075.000, 60.000, 30.000, 0.000, -30.000, -60.000, -75.000, -90.000, // 40 -105.000, -120.000, -105.000, -90.000, -75.000, -60.000, -30.000, 0.000, // 48 +030.000, 60.000, 75.000, 90.000, 105.000, 150.000, 135.000, 120.000, // 56 +105.000, 90.000, 75.000, 45.000, 15.000, -15.000, -45.000, -75.000, // 64 -090.000, -105.000, -120.000, -135.000, -150.000, -135.000, -120.000, -105.000, // 72 -090.000, -75.000, -45.000, -15.000, 15.000, 45.000, 75.000, 90.000, // 80 +105.000, 120.000, 135.000, 180.000, 165.000, 150.000, 135.000, 120.000, // 88 +105.000, 90.000, 60.000, 30.000, 0.000, -30.000, -60.000, -90.000, // 96 -105.000, -120.000, -135.000, -150.000, -165.000, -180.000, -165.000, -150.000, // 104 -135.000, -120.000, -105.000, -90.000, -60.000, -30.000, 0.000, 30.000, // 112 +060.000, 90.000, 105.000, 120.000, 135.000, 150.000, 165.000, 210.000, // 120 +195.000, 180.000, 165.000, 150.000, 135.000, 120.000, 105.000, 75.000, // 128 +045.000, 15.000, -15.000, -45.000, -75.000, -105.000, -120.000, -135.000, // 136 -150.000, -165.000, -180.000, -195.000, -210.000, -195.000, -180.000, -165.000, // 144 -150.000, -135.000, -120.000, -105.000, -75.000, -45.000, -15.000, 15.000, // 152 +045.000, 75.000, 105.000, 120.000, 135.000, 150.000, 165.000, 180.000, // 160 +195.000, 240.000, 225.000, 210.000, 195.000, 180.000, 165.000, 150.000, // 168 +135.000, 120.000, 90.000, 60.000, 30.000, 0.000, -30.000, -60.000, // 176 -090.000, -120.000, -135.000, -150.000, -165.000, -180.000, -195.000, -210.000, // 184 -225.000, -240.000, -225.000, -210.000, -195.000, -180.000, -165.000, -150.000, // 192 -135.000, -120.000, -90.000, -60.000, -30.000, 0.000, 30.000, 60.000, // 200 +090.000, 120.000, 135.000, 150.000, 165.000, 180.000, 195.000, 210.000, // 208 +225.000, 270.000, 255.000, 240.000, 225.000, 210.000, 195.000, 180.000, // 216 +165.000, 150.000, 135.000, 105.000, 75.000, 45.000, 15.000, -15.000, // 224 -045.000, -75.000, -105.000, -135.000, -150.000, -165.000, -180.000, -195.000, // 232 -210.000, -225.000, -240.000, -255.000, -270.000, -255.000, -240.000, -225.000, // 240 -210.000, -195.000, -180.000, -165.000, -150.000, -135.000, -105.000, -75.000, // 248 -045.000, -15.000, 15.000, 45.000, 75.000, 105.000, 135.000, 150.000, // 256 +165.000, 180.000, 195.000, 210.000, 225.000, 240.000, 255.000, 300.000, // 264 +285.000, 270.000, 255.000, 240.000, 225.000, 210.000, 195.000, 180.000, // 272 +165.000, 150.000, 120.000, 90.000, 60.000, 30.000, 0.000, -30.000, // 280 -060.000, -90.000, -120.000, -150.000, -165.000, -180.000, -195.000, -210.000, // 288 -225.000, -240.000, -255.000, -270.000, -285.000, -300.000, -285.000, -270.000, // 296 -255.000, -240.000, -225.000, -210.000, -195.000, -180.000, -165.000, -150.000, // 304 -120.000, -90.000, -60.000, -30.000, 0.000, 30.000, 60.000, 90.000, // 312 +120.000, 150.000, 165.000, 180.000, 195.000, 210.000, 225.000, 240.000, // 320 +255.000, 270.000, 285.000, 330.000, 315.000, 300.000, 285.000, 270.000, // 328 +255.000, 240.000, 225.000, 210.000, 195.000, 180.000, 165.000, 135.000, // 336 +105.000, 75.000, 45.000, 15.000, -15.000, -45.000, -75.000, -105.000, // 344 -135.000, -165.000, -180.000, -195.000, -210.000, -225.000, -240.000, -255.000, // 352 -270.000, -285.000, -300.000, -315.000, -330.000, -315.000, -300.000, -285.000, // 360 -270.000, -255.000, -240.000, -225.000, -210.000, -195.000, -180.000, -165.000, // 368 -135.000, -105.000, -75.000, -45.000, -15.000, 15.000, 45.000, 75.000, // 376 +105.000, 135.000, 165.000, 180.000, 195.000, 210.000, 225.000, 240.000, // 384 +255.000, 270.000, 285.000, 300.000, 315.000, 360.000, 330.000, 300.000, // 392 +270.000, 240.000, 210.000, 150.000, 90.000, 30.000, -30.000, -90.000, // 400 -150.000, -210.000, -240.000, -270.000, -300.000, -330.000, -360.000, -360.000, // 408 -330.000, -300.000, -270.000, -240.000, -210.000, -150.000, -90.000, -30.000, // 416 +030.000, 90.000, 150.000, 210.000, 240.000, 270.000, 300.000, 330.000, // 424 +360.000, 420.000, 390.000, 360.000, 330.000, 300.000, 270.000, 240.000, // 432 +180.000, 120.000, 60.000, 0.000, -60.000, -120.000, -180.000, -240.000, // 440 -270.000, -300.000, -330.000, -360.000, -390.000, -420.000, -420.000, -390.000, // 448 -360.000, -330.000, -300.000, -270.000, -240.000, -180.000, -120.000, -60.000, // 456 +000.000, 60.000, 120.000, 180.000, 240.000, 270.000, 300.000, 330.000, // 464 +360.000, 390.000, 420.000, 480.000, 450.000, 420.000, 390.000, 360.000, // 472 +330.000, 300.000, 270.000, 210.000, 150.000, 90.000, 30.000, -30.000, // 480 -090.000, -150.000, -210.000, -270.000, -300.000, -330.000, -360.000, -390.000, // 488 -420.000, -450.000, -480.000, -480.000, -450.000, -420.000, -390.000, -360.000, // 496 -330.000, -300.000, -270.000, -210.000, -150.000, -90.000, -30.000, 30.000, // 504 +090.000, 150.000, 210.000, 270.000, 300.000, 330.000, 360.000, 390.000, // 512 +420.000, 450.000, 480.000, 540.000, 510.000, 480.000, 450.000, 420.000, // 520 +390.000, 360.000, 330.000, 300.000, 240.000, 180.000, 120.000, 60.000, // 528 +000.000, -60.000, -120.000, -180.000, -240.000, -300.000, -330.000, -360.000, // 536 -390.000, -420.000, -450.000, -480.000, -510.000, -540.000, -540.000, -510.000, // 544 -480.000, -450.000, -420.000, -390.000, -360.000, -330.000, -300.000, -240.000, // 552 -180.000, -120.000, -60.000, 0.000, 60.000, 120.000, 180.000, 240.000, // 560 +300.000, 330.000, 360.000, 390.000, 420.000, 450.000, 480.000, 510.000, // 568 +540.000 // 576 }; const Float_t ytemp[577] = { +000.000, 0.000, 25.981, 25.981, 0.000, -25.981, -25.981, 0.000, // 0 +025.981, 51.961, 51.961, 51.961, 25.981, 0.000, -25.981, -51.961, // 8 -051.961, -51.961, -25.981, 0.000, 25.981, 51.961, 77.942, 77.942, // 16 +077.942, 77.942, 51.961, 25.981, 0.000, -25.981, -51.961, -77.942, // 24 -077.942, -77.942, -77.942, -51.961, -25.981, 0.000, 25.981, 51.961, // 32 +077.942, 103.923, 103.923, 103.923, 103.923, 103.923, 77.942, 51.961, // 40 +025.981, 0.000, -25.981, -51.961, -77.942, -103.923, -103.923, -103.923, // 48 -103.923, -103.923, -77.942, -51.961, -25.981, 0.000, 25.981, 51.961, // 56 +077.942, 103.923, 129.904, 129.904, 129.904, 129.904, 129.904, 129.904, // 64 +103.923, 77.942, 51.961, 25.981, 0.000, -25.981, -51.961, -77.942, // 72 -103.923, -129.904, -129.904, -129.904, -129.904, -129.904, -129.904, -103.923, // 80 -077.942, -51.961, -25.981, 0.000, 25.981, 51.961, 77.942, 103.923, // 88 +129.904, 155.885, 155.885, 155.885, 155.885, 155.885, 155.885, 155.885, // 96 +129.904, 103.923, 77.942, 51.961, 25.981, 0.000, -25.981, -51.961, // 104 -077.942, -103.923, -129.904, -155.885, -155.885, -155.885, -155.885, -155.885, // 112 -155.885, -155.885, -129.904, -103.923, -77.942, -51.961, -25.981, 0.000, // 120 +025.981, 51.961, 77.942, 103.923, 129.904, 155.885, 181.865, 181.865, // 128 +181.865, 181.865, 181.865, 181.865, 181.865, 181.865, 155.885, 129.904, // 136 +103.923, 77.942, 51.961, 25.981, 0.000, -25.981, -51.961, -77.942, // 144 -103.923, -129.904, -155.885, -181.865, -181.865, -181.865, -181.865, -181.865, // 152 -181.865, -181.865, -181.865, -155.885, -129.904, -103.923, -77.942, -51.961, // 160 -025.981, 0.000, 25.981, 51.961, 77.942, 103.923, 129.904, 155.885, // 168 +181.865, 207.846, 207.846, 207.846, 207.846, 207.846, 207.846, 207.846, // 176 +207.846, 207.846, 181.865, 155.885, 129.904, 103.923, 77.942, 51.961, // 184 +025.981, 0.000, -25.981, -51.961, -77.942, -103.923, -129.904, -155.885, // 192 -181.865, -207.846, -207.846, -207.846, -207.846, -207.846, -207.846, -207.846, // 200 -207.846, -207.846, -181.865, -155.885, -129.904, -103.923, -77.942, -51.961, // 208 -025.981, 0.000, 25.981, 51.961, 77.942, 103.923, 129.904, 155.885, // 216 +181.865, 207.846, 233.827, 233.827, 233.827, 233.827, 233.827, 233.827, // 224 +233.827, 233.827, 233.827, 233.827, 207.846, 181.865, 155.885, 129.904, // 232 +103.923, 77.942, 51.961, 25.981, 0.000, -25.981, -51.961, -77.942, // 240 -103.923, -129.904, -155.885, -181.865, -207.846, -233.827, -233.827, -233.827, // 248 -233.827, -233.827, -233.827, -233.827, -233.827, -233.827, -233.827, -207.846, // 256 -181.865, -155.885, -129.904, -103.923, -77.942, -51.961, -25.981, 0.000, // 264 +025.981, 51.961, 77.942, 103.923, 129.904, 155.885, 181.865, 207.846, // 272 +233.827, 259.808, 259.808, 259.808, 259.808, 259.808, 259.808, 259.808, // 280 +259.808, 259.808, 259.808, 259.808, 233.827, 207.846, 181.865, 155.885, // 288 +129.904, 103.923, 77.942, 51.961, 25.981, 0.000, -25.981, -51.961, // 296 -077.942, -103.923, -129.904, -155.885, -181.865, -207.846, -233.827, -259.808, // 304 -259.808, -259.808, -259.808, -259.808, -259.808, -259.808, -259.808, -259.808, // 312 -259.808, -259.808, -233.827, -207.846, -181.865, -155.885, -129.904, -103.923, // 320 -077.942, -51.961, -25.981, 0.000, 25.981, 51.961, 77.942, 103.923, // 328 +129.904, 155.885, 181.865, 207.846, 233.827, 259.808, 285.788, 285.788, // 336 +285.788, 285.788, 285.788, 285.788, 285.788, 285.788, 285.788, 285.788, // 344 +285.788, 285.788, 259.808, 233.827, 207.846, 181.865, 155.885, 129.904, // 352 +103.923, 77.942, 51.961, 25.981, 0.000, -25.981, -51.961, -77.942, // 360 -103.923, -129.904, -155.885, -181.865, -207.846, -233.827, -259.808, -285.788, // 368 -285.788, -285.788, -285.788, -285.788, -285.788, -285.788, -285.788, -285.788, // 376 -285.788, -285.788, -285.788, -259.808, -233.827, -207.846, -181.865, -155.885, // 384 -129.904, -103.923, -77.942, -51.961, -25.981, 34.641, 86.603, 138.564, // 392 +190.526, 242.487, 294.449, 329.090, 329.090, 329.090, 329.090, 329.090, // 400 +329.090, 294.449, 242.487, 190.526, 138.564, 86.603, 34.641, -34.641, // 408 -086.603, -138.564, -190.526, -242.487, -294.449, -329.090, -329.090, -329.090, // 416 -329.090, -329.090, -329.090, -294.449, -242.487, -190.526, -138.564, -86.603, // 424 -034.641, 34.641, 86.603, 138.564, 190.526, 242.487, 294.449, 346.410, // 432 +381.051, 381.051, 381.051, 381.051, 381.051, 381.051, 381.051, 346.410, // 440 +294.449, 242.487, 190.526, 138.564, 86.603, 34.641, -34.641, -86.603, // 448 -138.564, -190.526, -242.487, -294.449, -346.410, -381.051, -381.051, -381.051, // 456 -381.051, -381.051, -381.051, -381.051, -346.410, -294.449, -242.487, -190.526, // 464 -138.564, -86.603, -34.641, 34.641, 86.603, 138.564, 190.526, 242.487, // 472 +294.449, 346.410, 398.372, 433.013, 433.013, 433.013, 433.013, 433.013, // 480 +433.013, 433.013, 433.013, 398.372, 346.410, 294.449, 242.487, 190.526, // 488 +138.564, 86.603, 34.641, -34.641, -86.603, -138.564, -190.526, -242.487, // 496 -294.449, -346.410, -398.372, -433.013, -433.013, -433.013, -433.013, -433.013, // 504 -433.013, -433.013, -433.013, -398.372, -346.410, -294.449, -242.487, -190.526, // 512 -138.564, -86.603, -34.641, 34.641, 86.603, 138.564, 190.526, 242.487, // 520 +294.449, 346.410, 398.372, 450.333, 484.974, 484.974, 484.974, 484.974, // 528 +484.974, 484.974, 484.974, 484.974, 484.974, 450.333, 398.372, 346.410, // 536 +294.449, 242.487, 190.526, 138.564, 86.603, 34.641, -34.641, -86.603, // 544 -138.564, -190.526, -242.487, -294.449, -346.410, -398.372, -450.333, -484.974, // 552 -484.974, -484.974, -484.974, -484.974, -484.974, -484.974, -484.974, -484.974, // 560 -450.333, -398.372, -346.410, -294.449, -242.487, -190.526, -138.564, -86.603, // 568 -034.641 // 576 }; const Byte_t sector[577] = { 0, 1, 2, 3, 4, 5, 6, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6 }; // // fill the pixels list with this data // for (UInt_t i=0; i396?60:30, sector[i], i>396?1:0)); // (*this)[i].Set(xtemp[i], ytemp[i], i>396?60:30, i>396?sector[i]+6:sector[i]); } // -------------------------------------------------------------------------- // // This fills the next neighbor information from a table into the pixel // objects. // void MGeomCamMagic::CreateNN() { const Short_t nn[577][6] = { // Neighbors of # { 1, 2, 3, 4, 5, 6}, // 0 { 0, 2, 6, 7, 8, 18}, { 0, 1, 3, 8, 9, 10}, { 0, 2, 4, 10, 11, 12}, { 0, 3, 5, 12, 13, 14}, { 0, 4, 6, 14, 15, 16}, { 0, 1, 5, 16, 17, 18}, { 1, 8, 18, 19, 20, 36}, { 1, 2, 7, 9, 20, 21}, { 2, 8, 10, 21, 22, 23}, { 2, 3, 9, 11, 23, 24}, { 3, 10, 12, 24, 25, 26}, { 3, 4, 11, 13, 26, 27}, { 4, 12, 14, 27, 28, 29}, { 4, 5, 13, 15, 29, 30}, { 5, 14, 16, 30, 31, 32}, { 5, 6, 15, 17, 32, 33}, { 6, 16, 18, 33, 34, 35}, { 1, 6, 7, 17, 35, 36}, { 7, 20, 36, 37, 38, 60}, { 7, 8, 19, 21, 38, 39}, // 20 { 8, 9, 20, 22, 39, 40}, { 9, 21, 23, 40, 41, 42}, { 9, 10, 22, 24, 42, 43}, { 10, 11, 23, 25, 43, 44}, { 11, 24, 26, 44, 45, 46}, { 11, 12, 25, 27, 46, 47}, { 12, 13, 26, 28, 47, 48}, { 13, 27, 29, 48, 49, 50}, { 13, 14, 28, 30, 50, 51}, { 14, 15, 29, 31, 51, 52}, { 15, 30, 32, 52, 53, 54}, { 15, 16, 31, 33, 54, 55}, { 16, 17, 32, 34, 55, 56}, { 17, 33, 35, 56, 57, 58}, { 17, 18, 34, 36, 58, 59}, { 7, 18, 19, 35, 59, 60}, { 19, 38, 60, 61, 62, 90}, { 19, 20, 37, 39, 62, 63}, { 20, 21, 38, 40, 63, 64}, { 21, 22, 39, 41, 64, 65}, // 40 { 22, 40, 42, 65, 66, 67}, { 22, 23, 41, 43, 67, 68}, { 23, 24, 42, 44, 68, 69}, { 24, 25, 43, 45, 69, 70}, { 25, 44, 46, 70, 71, 72}, { 25, 26, 45, 47, 72, 73}, { 26, 27, 46, 48, 73, 74}, { 27, 28, 47, 49, 74, 75}, { 28, 48, 50, 75, 76, 77}, { 28, 29, 49, 51, 77, 78}, { 29, 30, 50, 52, 78, 79}, { 30, 31, 51, 53, 79, 80}, { 31, 52, 54, 80, 81, 82}, { 31, 32, 53, 55, 82, 83}, { 32, 33, 54, 56, 83, 84}, { 33, 34, 55, 57, 84, 85}, { 34, 56, 58, 85, 86, 87}, { 34, 35, 57, 59, 87, 88}, { 35, 36, 58, 60, 88, 89}, { 19, 36, 37, 59, 89, 90}, // 60 { 37, 62, 90, 91, 92, 126}, { 37, 38, 61, 63, 92, 93}, { 38, 39, 62, 64, 93, 94}, { 39, 40, 63, 65, 94, 95}, { 40, 41, 64, 66, 95, 96}, { 41, 65, 67, 96, 97, 98}, { 41, 42, 66, 68, 98, 99}, { 42, 43, 67, 69, 99, 100}, { 43, 44, 68, 70, 100, 101}, { 44, 45, 69, 71, 101, 102}, { 45, 70, 72, 102, 103, 104}, { 45, 46, 71, 73, 104, 105}, { 46, 47, 72, 74, 105, 106}, { 47, 48, 73, 75, 106, 107}, { 48, 49, 74, 76, 107, 108}, { 49, 75, 77, 108, 109, 110}, { 49, 50, 76, 78, 110, 111}, { 50, 51, 77, 79, 111, 112}, { 51, 52, 78, 80, 112, 113}, { 52, 53, 79, 81, 113, 114}, // 80 { 53, 80, 82, 114, 115, 116}, { 53, 54, 81, 83, 116, 117}, { 54, 55, 82, 84, 117, 118}, { 55, 56, 83, 85, 118, 119}, { 56, 57, 84, 86, 119, 120}, { 57, 85, 87, 120, 121, 122}, { 57, 58, 86, 88, 122, 123}, { 58, 59, 87, 89, 123, 124}, { 59, 60, 88, 90, 124, 125}, { 37, 60, 61, 89, 125, 126}, { 61, 92, 126, 127, 128, 168}, { 61, 62, 91, 93, 128, 129}, { 62, 63, 92, 94, 129, 130}, { 63, 64, 93, 95, 130, 131}, { 64, 65, 94, 96, 131, 132}, { 65, 66, 95, 97, 132, 133}, { 66, 96, 98, 133, 134, 135}, { 66, 67, 97, 99, 135, 136}, { 67, 68, 98, 100, 136, 137}, { 68, 69, 99, 101, 137, 138}, // 100 { 69, 70, 100, 102, 138, 139}, { 70, 71, 101, 103, 139, 140}, { 71, 102, 104, 140, 141, 142}, { 71, 72, 103, 105, 142, 143}, { 72, 73, 104, 106, 143, 144}, { 73, 74, 105, 107, 144, 145}, { 74, 75, 106, 108, 145, 146}, { 75, 76, 107, 109, 146, 147}, { 76, 108, 110, 147, 148, 149}, { 76, 77, 109, 111, 149, 150}, { 77, 78, 110, 112, 150, 151}, { 78, 79, 111, 113, 151, 152}, { 79, 80, 112, 114, 152, 153}, { 80, 81, 113, 115, 153, 154}, { 81, 114, 116, 154, 155, 156}, { 81, 82, 115, 117, 156, 157}, { 82, 83, 116, 118, 157, 158}, { 83, 84, 117, 119, 158, 159}, { 84, 85, 118, 120, 159, 160}, { 85, 86, 119, 121, 160, 161}, // 120 { 86, 120, 122, 161, 162, 163}, { 86, 87, 121, 123, 163, 164}, { 87, 88, 122, 124, 164, 165}, { 88, 89, 123, 125, 165, 166}, { 89, 90, 124, 126, 166, 167}, { 61, 90, 91, 125, 167, 168}, { 91, 128, 168, 169, 170, 216}, { 91, 92, 127, 129, 170, 171}, { 92, 93, 128, 130, 171, 172}, { 93, 94, 129, 131, 172, 173}, { 94, 95, 130, 132, 173, 174}, { 95, 96, 131, 133, 174, 175}, { 96, 97, 132, 134, 175, 176}, { 97, 133, 135, 176, 177, 178}, { 97, 98, 134, 136, 178, 179}, { 98, 99, 135, 137, 179, 180}, { 99, 100, 136, 138, 180, 181}, { 100, 101, 137, 139, 181, 182}, { 101, 102, 138, 140, 182, 183}, { 102, 103, 139, 141, 183, 184}, // 140 { 103, 140, 142, 184, 185, 186}, { 103, 104, 141, 143, 186, 187}, { 104, 105, 142, 144, 187, 188}, { 105, 106, 143, 145, 188, 189}, { 106, 107, 144, 146, 189, 190}, { 107, 108, 145, 147, 190, 191}, { 108, 109, 146, 148, 191, 192}, { 109, 147, 149, 192, 193, 194}, { 109, 110, 148, 150, 194, 195}, { 110, 111, 149, 151, 195, 196}, { 111, 112, 150, 152, 196, 197}, { 112, 113, 151, 153, 197, 198}, { 113, 114, 152, 154, 198, 199}, { 114, 115, 153, 155, 199, 200}, { 115, 154, 156, 200, 201, 202}, { 115, 116, 155, 157, 202, 203}, { 116, 117, 156, 158, 203, 204}, { 117, 118, 157, 159, 204, 205}, { 118, 119, 158, 160, 205, 206}, { 119, 120, 159, 161, 206, 207}, // 160 { 120, 121, 160, 162, 207, 208}, { 121, 161, 163, 208, 209, 210}, { 121, 122, 162, 164, 210, 211}, { 122, 123, 163, 165, 211, 212}, { 123, 124, 164, 166, 212, 213}, { 124, 125, 165, 167, 213, 214}, { 125, 126, 166, 168, 214, 215}, { 91, 126, 127, 167, 215, 216}, { 127, 170, 216, 217, 218, 270}, { 127, 128, 169, 171, 218, 219}, { 128, 129, 170, 172, 219, 220}, { 129, 130, 171, 173, 220, 221}, { 130, 131, 172, 174, 221, 222}, { 131, 132, 173, 175, 222, 223}, { 132, 133, 174, 176, 223, 224}, { 133, 134, 175, 177, 224, 225}, { 134, 176, 178, 225, 226, 227}, { 134, 135, 177, 179, 227, 228}, { 135, 136, 178, 180, 228, 229}, { 136, 137, 179, 181, 229, 230}, // 180 { 137, 138, 180, 182, 230, 231}, { 138, 139, 181, 183, 231, 232}, { 139, 140, 182, 184, 232, 233}, { 140, 141, 183, 185, 233, 234}, { 141, 184, 186, 234, 235, 236}, { 141, 142, 185, 187, 236, 237}, { 142, 143, 186, 188, 237, 238}, { 143, 144, 187, 189, 238, 239}, { 144, 145, 188, 190, 239, 240}, { 145, 146, 189, 191, 240, 241}, { 146, 147, 190, 192, 241, 242}, { 147, 148, 191, 193, 242, 243}, { 148, 192, 194, 243, 244, 245}, { 148, 149, 193, 195, 245, 246}, { 149, 150, 194, 196, 246, 247}, { 150, 151, 195, 197, 247, 248}, { 151, 152, 196, 198, 248, 249}, { 152, 153, 197, 199, 249, 250}, { 153, 154, 198, 200, 250, 251}, { 154, 155, 199, 201, 251, 252}, // 200 { 155, 200, 202, 252, 253, 254}, { 155, 156, 201, 203, 254, 255}, { 156, 157, 202, 204, 255, 256}, { 157, 158, 203, 205, 256, 257}, { 158, 159, 204, 206, 257, 258}, { 159, 160, 205, 207, 258, 259}, { 160, 161, 206, 208, 259, 260}, { 161, 162, 207, 209, 260, 261}, { 162, 208, 210, 261, 262, 263}, { 162, 163, 209, 211, 263, 264}, { 163, 164, 210, 212, 264, 265}, { 164, 165, 211, 213, 265, 266}, { 165, 166, 212, 214, 266, 267}, { 166, 167, 213, 215, 267, 268}, { 167, 168, 214, 216, 268, 269}, { 127, 168, 169, 215, 269, 270}, { 169, 218, 270, 271, 272, 330}, { 169, 170, 217, 219, 272, 273}, { 170, 171, 218, 220, 273, 274}, { 171, 172, 219, 221, 274, 275}, // 220 { 172, 173, 220, 222, 275, 276}, { 173, 174, 221, 223, 276, 277}, { 174, 175, 222, 224, 277, 278}, { 175, 176, 223, 225, 278, 279}, { 176, 177, 224, 226, 279, 280}, { 177, 225, 227, 280, 281, 282}, { 177, 178, 226, 228, 282, 283}, { 178, 179, 227, 229, 283, 284}, { 179, 180, 228, 230, 284, 285}, { 180, 181, 229, 231, 285, 286}, { 181, 182, 230, 232, 286, 287}, { 182, 183, 231, 233, 287, 288}, { 183, 184, 232, 234, 288, 289}, { 184, 185, 233, 235, 289, 290}, { 185, 234, 236, 290, 291, 292}, { 185, 186, 235, 237, 292, 293}, { 186, 187, 236, 238, 293, 294}, { 187, 188, 237, 239, 294, 295}, { 188, 189, 238, 240, 295, 296}, { 189, 190, 239, 241, 296, 297}, // 240 { 190, 191, 240, 242, 297, 298}, { 191, 192, 241, 243, 298, 299}, { 192, 193, 242, 244, 299, 300}, { 193, 243, 245, 300, 301, 302}, { 193, 194, 244, 246, 302, 303}, { 194, 195, 245, 247, 303, 304}, { 195, 196, 246, 248, 304, 305}, { 196, 197, 247, 249, 305, 306}, { 197, 198, 248, 250, 306, 307}, { 198, 199, 249, 251, 307, 308}, { 199, 200, 250, 252, 308, 309}, { 200, 201, 251, 253, 309, 310}, { 201, 252, 254, 310, 311, 312}, { 201, 202, 253, 255, 312, 313}, { 202, 203, 254, 256, 313, 314}, { 203, 204, 255, 257, 314, 315}, { 204, 205, 256, 258, 315, 316}, { 205, 206, 257, 259, 316, 317}, { 206, 207, 258, 260, 317, 318}, { 207, 208, 259, 261, 318, 319}, // 260 { 208, 209, 260, 262, 319, 320}, { 209, 261, 263, 320, 321, 322}, { 209, 210, 262, 264, 322, 323}, { 210, 211, 263, 265, 323, 324}, { 211, 212, 264, 266, 324, 325}, { 212, 213, 265, 267, 325, 326}, { 213, 214, 266, 268, 326, 327}, { 214, 215, 267, 269, 327, 328}, { 215, 216, 268, 270, 328, 329}, { 169, 216, 217, 269, 329, 330}, { 217, 272, 330, 331, 332, 396}, { 217, 218, 271, 273, 332, 333}, { 218, 219, 272, 274, 333, 334}, { 219, 220, 273, 275, 334, 335}, { 220, 221, 274, 276, 335, 336}, { 221, 222, 275, 277, 336, 337}, { 222, 223, 276, 278, 337, 338}, { 223, 224, 277, 279, 338, 339}, { 224, 225, 278, 280, 339, 340}, { 225, 226, 279, 281, 340, 341}, // 280 { 226, 280, 282, 341, 342, 343}, { 226, 227, 281, 283, 343, 344}, { 227, 228, 282, 284, 344, 345}, { 228, 229, 283, 285, 345, 346}, { 229, 230, 284, 286, 346, 347}, { 230, 231, 285, 287, 347, 348}, { 231, 232, 286, 288, 348, 349}, { 232, 233, 287, 289, 349, 350}, { 233, 234, 288, 290, 350, 351}, { 234, 235, 289, 291, 351, 352}, { 235, 290, 292, 352, 353, 354}, { 235, 236, 291, 293, 354, 355}, { 236, 237, 292, 294, 355, 356}, { 237, 238, 293, 295, 356, 357}, { 238, 239, 294, 296, 357, 358}, { 239, 240, 295, 297, 358, 359}, { 240, 241, 296, 298, 359, 360}, { 241, 242, 297, 299, 360, 361}, { 242, 243, 298, 300, 361, 362}, { 243, 244, 299, 301, 362, 363}, // 300 { 244, 300, 302, 363, 364, 365}, { 244, 245, 301, 303, 365, 366}, { 245, 246, 302, 304, 366, 367}, { 246, 247, 303, 305, 367, 368}, { 247, 248, 304, 306, 368, 369}, { 248, 249, 305, 307, 369, 370}, { 249, 250, 306, 308, 370, 371}, { 250, 251, 307, 309, 371, 372}, { 251, 252, 308, 310, 372, 373}, { 252, 253, 309, 311, 373, 374}, { 253, 310, 312, 374, 375, 376}, { 253, 254, 311, 313, 376, 377}, { 254, 255, 312, 314, 377, 378}, { 255, 256, 313, 315, 378, 379}, { 256, 257, 314, 316, 379, 380}, { 257, 258, 315, 317, 380, 381}, { 258, 259, 316, 318, 381, 382}, { 259, 260, 317, 319, 382, 383}, { 260, 261, 318, 320, 383, 384}, { 261, 262, 319, 321, 384, 385}, // 320 { 262, 320, 322, 385, 386, 387}, { 262, 263, 321, 323, 387, 388}, { 263, 264, 322, 324, 388, 389}, { 264, 265, 323, 325, 389, 390}, { 265, 266, 324, 326, 390, 391}, { 266, 267, 325, 327, 391, 392}, { 267, 268, 326, 328, 392, 393}, { 268, 269, 327, 329, 393, 394}, { 269, 270, 328, 330, 394, 395}, { 217, 270, 271, 329, 395, 396}, { 271, 332, 396, 397, 432, -1}, { 271, 272, 331, 333, 397, -1}, { 272, 273, 332, 334, 398, -1}, { 273, 274, 333, 335, 398, -1}, { 274, 275, 334, 336, 399, -1}, { 275, 276, 335, 337, 399, -1}, { 276, 277, 336, 338, 400, -1}, { 277, 278, 337, 339, 400, -1}, { 278, 279, 338, 340, 401, -1}, { 279, 280, 339, 341, 401, -1}, // 340 { 280, 281, 340, 342, 402, -1}, { 281, 341, 343, 402, 403, -1}, { 281, 282, 342, 344, 403, -1}, { 282, 283, 343, 345, 404, -1}, { 283, 284, 344, 346, 404, -1}, { 284, 285, 345, 347, 405, -1}, { 285, 286, 346, 348, 405, -1}, { 286, 287, 347, 349, 406, -1}, { 287, 288, 348, 350, 406, -1}, { 288, 289, 349, 351, 407, -1}, { 289, 290, 350, 352, 407, -1}, { 290, 291, 351, 353, 408, -1}, { 291, 352, 354, 408, 409, -1}, { 291, 292, 353, 355, 409, -1}, { 292, 293, 354, 356, 410, -1}, { 293, 294, 355, 357, 410, -1}, { 294, 295, 356, 358, 411, -1}, { 295, 296, 357, 359, 411, -1}, { 296, 297, 358, 360, 412, -1}, { 297, 298, 359, 361, 412, -1}, // 360 { 298, 299, 360, 362, 413, -1}, { 299, 300, 361, 363, 413, -1}, { 300, 301, 362, 364, 414, -1}, { 301, 363, 365, 414, 415, -1}, { 301, 302, 364, 366, 415, -1}, { 302, 303, 365, 367, 416, -1}, { 303, 304, 366, 368, 416, -1}, { 304, 305, 367, 369, 417, -1}, { 305, 306, 368, 370, 417, -1}, { 306, 307, 369, 371, 418, -1}, { 307, 308, 370, 372, 418, -1}, { 308, 309, 371, 373, 419, -1}, { 309, 310, 372, 374, 419, -1}, { 310, 311, 373, 375, 420, -1}, { 311, 374, 376, 420, 421, -1}, { 311, 312, 375, 377, 421, -1}, { 312, 313, 376, 378, 422, -1}, { 313, 314, 377, 379, 422, -1}, { 314, 315, 378, 380, 423, -1}, { 315, 316, 379, 381, 423, -1}, // 380 { 316, 317, 380, 382, 424, -1}, { 317, 318, 381, 383, 424, -1}, { 318, 319, 382, 384, 425, -1}, { 319, 320, 383, 385, 425, -1}, { 320, 321, 384, 386, 426, -1}, { 321, 385, 387, 426, 427, -1}, { 321, 322, 386, 388, 427, -1}, { 322, 323, 387, 389, 428, -1}, { 323, 324, 388, 390, 428, -1}, { 324, 325, 389, 391, 429, -1}, { 325, 326, 390, 392, 429, -1}, { 326, 327, 391, 393, 430, -1}, { 327, 328, 392, 394, 430, -1}, { 328, 329, 393, 395, 431, -1}, { 329, 330, 394, 396, 431, -1}, { 271, 330, 331, 395, 432, -1}, { 331, 332, 398, 432, 433, 434}, { 333, 334, 397, 399, 434, 435}, { 335, 336, 398, 400, 435, 436}, { 337, 338, 399, 401, 436, 437}, // 400 { 339, 340, 400, 402, 437, 438}, { 341, 342, 401, 403, 438, 439}, { 342, 343, 402, 404, 440, 441}, { 344, 345, 403, 405, 441, 442}, { 346, 347, 404, 406, 442, 443}, { 348, 349, 405, 407, 443, 444}, { 350, 351, 406, 408, 444, 445}, { 352, 353, 407, 409, 445, 446}, { 353, 354, 408, 410, 447, 448}, { 355, 356, 409, 411, 448, 449}, { 357, 358, 410, 412, 449, 450}, { 359, 360, 411, 413, 450, 451}, { 361, 362, 412, 414, 451, 452}, { 363, 364, 413, 415, 452, 453}, { 364, 365, 414, 416, 454, 455}, { 366, 367, 415, 417, 455, 456}, { 368, 369, 416, 418, 456, 457}, { 370, 371, 417, 419, 457, 458}, { 372, 373, 418, 420, 458, 459}, { 374, 375, 419, 421, 459, 460}, // 420 { 375, 376, 420, 422, 461, 462}, { 377, 378, 421, 423, 462, 463}, { 379, 380, 422, 424, 463, 464}, { 381, 382, 423, 425, 464, 465}, { 383, 384, 424, 426, 465, 466}, { 385, 386, 425, 427, 466, 467}, { 386, 387, 426, 428, 468, 469}, { 388, 389, 427, 429, 469, 470}, { 390, 391, 428, 430, 470, 471}, { 392, 393, 429, 431, 471, 472}, { 394, 395, 430, 432, 472, 473}, { 331, 396, 397, 431, 473, 474}, { 397, 434, 474, 475, 476, -1}, { 397, 398, 433, 435, 476, 477}, { 398, 399, 434, 436, 477, 478}, { 399, 400, 435, 437, 478, 479}, { 400, 401, 436, 438, 479, 480}, { 401, 402, 437, 439, 480, 481}, { 402, 438, 440, 481, 482, -1}, { 403, 439, 441, 483, 484, -1}, // 440 { 403, 404, 440, 442, 484, 485}, { 404, 405, 441, 443, 485, 486}, { 405, 406, 442, 444, 486, 487}, { 406, 407, 443, 445, 487, 488}, { 407, 408, 444, 446, 488, 489}, { 408, 445, 447, 489, 490, -1}, { 409, 446, 448, 491, 492, -1}, { 409, 410, 447, 449, 492, 493}, { 410, 411, 448, 450, 493, 494}, { 411, 412, 449, 451, 494, 495}, { 412, 413, 450, 452, 495, 496}, { 413, 414, 451, 453, 496, 497}, { 414, 452, 454, 497, 498, -1}, { 415, 453, 455, 499, 500, -1}, { 415, 416, 454, 456, 500, 501}, { 416, 417, 455, 457, 501, 502}, { 417, 418, 456, 458, 502, 503}, { 418, 419, 457, 459, 503, 504}, { 419, 420, 458, 460, 504, 505}, { 420, 459, 461, 505, 506, -1}, // 460 { 421, 460, 462, 507, 508, -1}, { 421, 422, 461, 463, 508, 509}, { 422, 423, 462, 464, 509, 510}, { 423, 424, 463, 465, 510, 511}, { 424, 425, 464, 466, 511, 512}, { 425, 426, 465, 467, 512, 513}, { 426, 466, 468, 513, 514, -1}, { 427, 467, 469, 515, 516, -1}, { 427, 428, 468, 470, 516, 517}, { 428, 429, 469, 471, 517, 518}, { 429, 430, 470, 472, 518, 519}, { 430, 431, 471, 473, 519, 520}, { 431, 432, 472, 474, 520, 521}, { 432, 433, 473, 521, 522, -1}, { 433, 476, 522, 523, 524, -1}, { 433, 434, 475, 477, 524, 525}, { 434, 435, 476, 478, 525, 526}, { 435, 436, 477, 479, 526, 527}, { 436, 437, 478, 480, 527, 528}, { 437, 438, 479, 481, 528, 529}, // 480 { 438, 439, 480, 482, 529, 530}, { 439, 481, 483, 530, 531, -1}, { 440, 482, 484, 532, 533, -1}, { 440, 441, 483, 485, 533, 534}, { 441, 442, 484, 486, 534, 535}, { 442, 443, 485, 487, 535, 536}, { 443, 444, 486, 488, 536, 537}, { 444, 445, 487, 489, 537, 538}, { 445, 446, 488, 490, 538, 539}, { 446, 489, 491, 539, 540, -1}, { 447, 490, 492, 541, 542, -1}, { 447, 448, 491, 493, 542, 543}, { 448, 449, 492, 494, 543, 544}, { 449, 450, 493, 495, 544, 545}, { 450, 451, 494, 496, 545, 546}, { 451, 452, 495, 497, 546, 547}, { 452, 453, 496, 498, 547, 548}, { 453, 497, 499, 548, 549, -1}, { 454, 498, 500, 550, 551, -1}, { 454, 455, 499, 501, 551, 552}, // 500 { 455, 456, 500, 502, 552, 553}, { 456, 457, 501, 503, 553, 554}, { 457, 458, 502, 504, 554, 555}, { 458, 459, 503, 505, 555, 556}, { 459, 460, 504, 506, 556, 557}, { 460, 505, 507, 557, 558, -1}, { 461, 506, 508, 559, 560, -1}, { 461, 462, 507, 509, 560, 561}, { 462, 463, 508, 510, 561, 562}, { 463, 464, 509, 511, 562, 563}, { 464, 465, 510, 512, 563, 564}, { 465, 466, 511, 513, 564, 565}, { 466, 467, 512, 514, 565, 566}, { 467, 513, 515, 566, 567, -1}, { 468, 514, 516, 568, 569, -1}, { 468, 469, 515, 517, 569, 570}, { 469, 470, 516, 518, 570, 571}, { 470, 471, 517, 519, 571, 572}, { 471, 472, 518, 520, 572, 573}, { 472, 473, 519, 521, 573, 574}, // 520 { 473, 474, 520, 522, 574, 575}, { 474, 475, 521, 575, 576, -1}, { 475, 524, 576, -1, -1, -1}, { 475, 476, 523, 525, -1, -1}, { 476, 477, 524, 526, -1, -1}, { 477, 478, 525, 527, -1, -1}, { 478, 479, 526, 528, -1, -1}, { 479, 480, 527, 529, -1, -1}, { 480, 481, 528, 530, -1, -1}, { 481, 482, 529, 531, -1, -1}, { 482, 530, 532, -1, -1, -1}, { 483, 531, 533, -1, -1, -1}, { 483, 484, 532, 534, -1, -1}, { 484, 485, 533, 535, -1, -1}, { 485, 486, 534, 536, -1, -1}, { 486, 487, 535, 537, -1, -1}, { 487, 488, 536, 538, -1, -1}, { 488, 489, 537, 539, -1, -1}, { 489, 490, 538, 540, -1, -1}, { 490, 539, 541, -1, -1, -1}, // 540 { 491, 540, 542, -1, -1, -1}, { 491, 492, 541, 543, -1, -1}, { 492, 493, 542, 544, -1, -1}, { 493, 494, 543, 545, -1, -1}, { 494, 495, 544, 546, -1, -1}, { 495, 496, 545, 547, -1, -1}, { 496, 497, 546, 548, -1, -1}, { 497, 498, 547, 549, -1, -1}, { 498, 548, 550, -1, -1, -1}, { 499, 549, 551, -1, -1, -1}, { 499, 500, 550, 552, -1, -1}, { 500, 501, 551, 553, -1, -1}, { 501, 502, 552, 554, -1, -1}, { 502, 503, 553, 555, -1, -1}, { 503, 504, 554, 556, -1, -1}, { 504, 505, 555, 557, -1, -1}, { 505, 506, 556, 558, -1, -1}, { 506, 557, 559, -1, -1, -1}, { 507, 558, 560, -1, -1, -1}, { 507, 508, 559, 561, -1, -1}, // 560 { 508, 509, 560, 562, -1, -1}, { 509, 510, 561, 563, -1, -1}, { 510, 511, 562, 564, -1, -1}, { 511, 512, 563, 565, -1, -1}, { 512, 513, 564, 566, -1, -1}, { 513, 514, 565, 567, -1, -1}, { 514, 566, 568, -1, -1, -1}, { 515, 567, 569, -1, -1, -1}, { 515, 516, 568, 570, -1, -1}, { 516, 517, 569, 571, -1, -1}, // 570 { 517, 518, 570, 572, -1, -1}, { 518, 519, 571, 573, -1, -1}, { 519, 520, 572, 574, -1, -1}, { 520, 521, 573, 575, -1, -1}, { 521, 522, 574, 576, -1, -1}, { 522, 523, 575, -1, -1, -1} // 576 }; for (Int_t i=0; i<577; i++) (*this)[i].SetNeighbors(nn[i][0], nn[i][1], nn[i][2], nn[i][3], nn[i][4], nn[i][5]); SortNeighbors(); } // -------------------------------------------------------------------------- // // Magic camera has 913 pixels. For geometry and Next Neighbor info see // CreateCam and CreateNN // MGeomCamMagicII::MGeomCamMagicII(const char *name) : MGeomCamDwarf(475., 30, 17, name) { SetTitle("Geometry information of Magic II Camera"); Rotate(); } // -------------------------------------------------------------------------- // // Magic II camera has 913 pixels. For geometry and Next Neighbor info see // CreateCam and CreateNN. You can give the distance dist from // the mirror center to the focal plane. // MGeomCamMagicII::MGeomCamMagicII(Double_t dist, const char *name) : MGeomCamDwarf(475., 30, dist, name) { SetTitle("Geometry information of Magic II Camera"); Rotate(); } // -------------------------------------------------------------------------- // // Rotate all pixels by 30deg // void MGeomCamMagicII::Rotate() { const Double_t phi = 30*TMath::DegToRad(); const TVector2 v(TMath::Cos(phi), TMath::Sin(phi)); for (UInt_t i=0; i(operator[](i)); pix.SetP(pix.GetP()*v, pix.GetP()^v); pix.SetPhi(phi); } } // -------------------------------------------------------------------------- // // Check if the photon which is flying along the trajectory u has passed // (or will pass) the frame of the camera (and consequently get // absorbed). The position p and direction u must be in the // telescope coordinate frame, which is z parallel to the focal plane, // x to the right and y upwards, looking from the mirror towards the camera. // Bool_t MGeomCamMagicII::HitFrame(MQuaternion p, const MQuaternion &u) const { // z is defined from the mirror (0) to the camera (z>0). // Thus we just propagate to the focal plane (z=fDist) p.PropagateZ(u, GetCameraDist()*100); return TMath::Abs(p.X())<65 && TMath::Abs(p.Y())<65; }