/* ======================================================================== *\ ! ! * ! * 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 08/2010 ! ! Copyright: MAGIC Software Development, 2000-2010 ! ! \* ======================================================================== */ ///////////////////////////////////////////////////////////////////////////// // // MGeomCamFACT // // This class stores the geometry information of the final FACT camera. // MGeomCamFACT cam; // Creates the final FACT camera // //////////////////////////////////////////////////////////////////////////// #include "MGeomCamFACT.h" #include #include "MGeomPix.h" ClassImp(MGeomCamFACT); using namespace std; // -------------------------------------------------------------------------- // MGeomCamFACT::MGeomCamFACT(const char *name) : MGeomCam(1438, 4.90, name, "Geometry information of the final FACT Camera") { CreateCam(); InitGeometry(); } // -------------------------------------------------------------------------- // MGeomCamFACT::MGeomCamFACT(Double_t dist, const char *name) : MGeomCam(1438, dist, name, "Geometry information of the final FACT 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. // // The units are cm. // Bool_t MGeomCamFACT::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 -= 1700./u.Z()*u; p.PropagateZ(u, GetCameraDist()*100); // m->cm // Add 10% to the max radius and convert from mm to cm return p.R() 395.75) continue; MGeomPix pix(y*diameter, (x-0.5)*diameter, diameter); pix.SetPhi(TMath::Pi()/2); SetAt(cnt++, pix); } } } }