40 #define G_READ_XML "GCTAPointing::read(GXmlElement&)"
41 #define G_WRITE_XML "GCTAPointing::write(GXmlElement&)"
241 #if defined(G_USE_VECTORS)
277 inst_direction.
detx(detx);
278 inst_direction.
dety(dety);
281 return inst_direction;
299 double inst_x = instdir.
detx();
300 double inst_y = instdir.
dety();
303 double theta =
std::sqrt(inst_x * inst_x + inst_y * inst_y);
311 GVector native(-cos_phi*sin_theta, sin_phi*sin_theta, cos_theta);
373 std::string msg =
"Attributes \"ra\" and \"dec\" or \"lon\" and"
374 " \"lat\"not found in XML parameter \"Pointing\"."
375 " Please verify the XML format.";
427 result.append(
"=== GCTAPointing ===");
513 m_Rback = (Ry * Rz).transpose();
void clear(void)
Clear CTA pointing.
GMatrix m_Rback
Rotation matrix.
double dec_deg(void) const
Returns Declination in degrees.
void detx(const double &x)
Set DETX coordinate (in radians)
XML element node class interface definition.
GSkyDir skydir(const GCTAInstDir &instdir) const
Get sky direction direction from instrument direction.
Sky direction class interface definition.
GVector cos(const GVector &vector)
Computes cosine of vector elements.
Generic matrix class definition.
CTA pointing class interface definition.
virtual ~GCTAPointing(void)
Destructor.
double acos(const double &arg)
Computes acos by avoiding NaN due to rounding errors.
void free_members(void)
Delete class members.
void read(const GXmlElement &xml)
Read pointing from XML element.
void write(GXmlElement &xml) const
Write pointing information into XML element.
void eulery(const double &angle)
Set Euler rotation matrix around y axis.
virtual void clear(void)
Clear matrix.
bool m_has_cache
Has transformation cache.
GVector sqrt(const GVector &vector)
Computes square root of vector elements.
double m_zenith
Pointing zenith angle (deg)
const GMatrix & rot(void) const
Return rotation matrix.
const GXmlAttribute * attribute(const int &index) const
Return attribute.
GMatrix transpose(void) const
Return transposed matrix.
double m_azimuth
Pointing azimuth angle (deg)
void eulerz(const double &angle)
Set Euler rotation matrix around z axis.
bool has_attribute(const std::string &name) const
Check if element has a given attribute.
void celvector(const GVector &vector)
Set sky direction from 3D vector in celestial coordinates.
GCTAInstDir instdir(const GSkyDir &skydir) const
Get instrument direction from sky direction.
GXmlElement * xml_need_par(const std::string &origin, GXmlElement &xml, const std::string &name)
Return pointer to parameter with given name in XML element.
GCTAPointing * clone(void) const
Clone CTA pointing.
CTA instrument direction class interface definition.
double ra_deg(void) const
Returns Right Ascension in degrees.
virtual GCTAPointing & operator=(const GCTAPointing &pnt)
Assignment operator.
void radec_deg(const double &ra, const double &dec)
Set equatorial sky direction (degrees)
GVector asin(const GVector &vector)
Computes arcsin of vector elements.
double posang(const GSkyDir &dir, const std::string &coordsys="CEL") const
Compute position angle between sky directions in radians.
void clear(void)
Clear sky direction.
bool m_valid
Validity flag.
std::string print(const GChatter &chatter=NORMAL) const
Print CTA pointing information.
void lb_deg(const double &l, const double &b)
Set galactic sky direction (degrees)
GVector sin(const GVector &vector)
Computes sine of vector elements.
double dist(const GSkyDir &dir) const
Compute angular distance between sky directions in radians.
double atan2(const double &y, const double &x)
Compute arc tangens in radians.
void copy_members(const GCTAPointing &pnt)
Copy class members.
CTA instrument direction class.
const GSkyDir & dir(void) const
Return pointing sky direction.
void dety(const double &y)
Set DETY coordinate (in radians)
Generic matrix class definition.
std::string parformat(const std::string &s, const int &indent=0)
Convert string in parameter format.
void update(void) const
Update coordinate transformation cache.
const GXmlElement * xml_get_par(const std::string &origin, const GXmlElement &xml, const std::string &name)
Return pointer to parameter with given name in XML element.
Filename class interface definition.
double todouble(const std::string &arg)
Convert string into double precision value.
GSkyDir m_dir
Pointing direction in sky coordinates.
GCTAPointing(void)
Void constructor.
std::string str(const unsigned short int &value)
Convert unsigned short integer value into string.
void init_members(void)
Initialise class members.