/*############################################################# *# # *# Author: G.Carminati # *# First Release: Mar 2009 # *# # *############################################################# */ #ifndef READDETECTOR_h #define READDETECTOR_h #include #include #include "io_gcc.hh" /* by J.Brunner */ #include "Geometry.hh" /* by T.Stolarczyk */ //! cluster_map is a set of OM_cluster mapped by un unsigned identifier typedef std::map > cluster_map; //! cluster_iterator is an iterator on a cluster_map typedef cluster_map::iterator cluster_iterator; class ReadDetector { private: std::string name_; //!< Name of the file describing the Detector /* enviroment */ double latitude_; double longitude_; double magnetic_declination_; /* OM_cluster_data */ double phi_; double theta_; double psi_; cluster_map OM_clusters_; //!< OM_clusters_[Id] is the OM_cluster identified by Id public: ReadDetector(std::string filename); //!< constructor virtual ~ReadDetector(){}; //!< virtual destructor /* enviroment */ double surface_z; //!< Surface position relative to used reference system double ground_z; //!< Ground position relative to used reference system /* OM_cluster_data */ unsigned id; //!< Identifier of the OM_cluster double x_; //!< x position of the OM_cluster double y_; //!< y position of the OM_cluster double z_; //!< z position of the OM_cluster //! Read detector from a specific file void read(std::string filename); //! Return the center of gravity of the detector Vec3D compute_cg(); //! Return the maximum radius of the detector wrt to center of gravity double compute_radius(const Vec3D& ref); //! Return the minimum and the maximum z position of the detector wrt to center of gravity Vec2D compute_Z(const Vec3D& ref); }; /*! \class ReadDetector * \brief A class to read the detector file * (based on OM_detector class in antcc) * * G.Carminati - First release: Mar 2009 */ #endif /*READDETECTOR_h*/