/* ======================================================================== *\ ! ! * ! * 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): Christoph Kolodziejski, 12/2004 ! Author(s): Thomas Bretz, 12/2004 ! ! Copyright: MAGIC Software Development, 2004-2008 ! ! \* ======================================================================== */ ///////////////////////////////////////////////////////////////////////////// // // MGeomCamMagicXT // // This class stores the geometry information of the 'extended' Magic // camera. The extended geometry has also small pixels in the outer region. // To convert MCerPhotEvt from MGeomCamMagic to MGeomCamMagicXT use // MGeomCamMagicExtend. // //////////////////////////////////////////////////////////////////////////// #include "MGeomCamMagicXT.h" #include #include "MGeomPix.h" ClassImp(MGeomCamMagicXT); // -------------------------------------------------------------------------- // // Magic camera has 577 pixels. For geometry and Next Neighbor info see // CreateCam and CreateNN // MGeomCamMagicXT::MGeomCamMagicXT(const char *name) : MGeomCam(1141, 17, name, "Geometry information of Magic Camera") { CreateCam(); CreateNN(); InitGeometry(); } // -------------------------------------------------------------------------- // // This fills the geometry information from a table into the pixel objects. // void MGeomCamMagicXT::CreateCam() { // // fill the geometry class with the coordinates of the CT1 camera // //*fLog << inf << " Create CT1 geometry " << endl; // // this algorithm is from Martin Kestel originally // it was punt into a root/C++ context by Harald Kornmayer and Thomas Bretz const Float_t diameter = 30; // units are mm const Float_t kS32 = sqrt(3)/2; // // add the first pixel to the list // Int_t pixnum = 0; (*this)[pixnum++].Set(0, 0, diameter); for (Int_t ring=1; ring<20; ring++) { // // calc. coords for this ring counting from the // starting number to the ending number // for (int i=0; i1140) n[0] = -1; if (n[1]>1140) n[1] = -1; if (n[2]>1140) n[2] = -1; if (n[3]>1140) n[3] = -1; if (n[4]>1140) n[4] = -1; if (n[5]>1140) n[5] = -1; TMath::Sort(6, n, idx); (*this)[i].SetNeighbors(n[idx[0]], n[idx[1]], n[idx[2]], n[idx[3]], n[idx[4]], n[idx[5]]); } pos += ring; } } }