// $Id: EsafRefFrame.cc,v 1.3 2005/10/04 02:50:53 thea Exp $
// Author: Alessandro Thea 2005/03/21
/*****************************************************************************
* ESAF: Euso Simulation and Analysis Framework *
* *
* Id: EsafRefFrame *
* Package: <packagename> *
* Coordinator: <coordinator> *
* *
*****************************************************************************/
//_____________________________________________________________________________
//
// EsafRefFrame
//
// <extensive class description>
//
#include "EsafRefFrame.hh"
ClassImp(EsafRefFrame)
//_____________________________________________________________________________
EsafRefFrame::EsafRefFrame() {// const TVector3& p, const TVector3& x, const TVector3& y, const TVector3& z ) {
//
// Constructor
//
SetAxes(TVector3(1.,0.,0.),TVector3(0.,1.,0.),TVector3(0.,0.,1.));
}
//_____________________________________________________________________________
EsafRefFrame::~EsafRefFrame() {
//
// Destructor
//
}
//______________________________________________________________________________
void EsafRefFrame::Copy( EsafRefFrame& other ) const {
//
// copies this to other
//
other.fPos = fPos;
other.fXaxis = fXaxis;
other.fYaxis = fYaxis;
other.fZaxis = fZaxis;
other.fRot2Global = fRot2Global;
other.fRot2Local = fRot2Local;
}
//______________________________________________________________________________
void EsafRefFrame::SetXEulerRotation( Double_t phi, Double_t theta, Double_t psi) {
//
// Set the reference frame axis orientation from through the euler axis
//
fXaxis.SetXYZ(1.,0.,0.);
fYaxis.SetXYZ(0.,1.,0.);
fZaxis.SetXYZ(0.,0.,1.);
// fRot2Local.SetXEulerAngles(phi,theta,psi);
// fRot2Global = fRot2Local.Inverse();
fRot2Global.SetXEulerAngles(phi,theta,psi);
fRot2Local = fRot2Global.Inverse();
fXaxis *= fRot2Global;
fYaxis *= fRot2Global;
fZaxis *= fRot2Global;
}
//______________________________________________________________________________
void EsafRefFrame::SetYEulerRotation( Double_t phi, Double_t theta, Double_t psi) {
//
// Set the reference frame axis orientation from through the euler axis
//
fXaxis.SetXYZ(1.,0.,0.);
fYaxis.SetXYZ(0.,1.,0.);
fZaxis.SetXYZ(0.,0.,1.);
// fRot2Local.SetYEulerAngles(phi,theta,psi);
// fRot2Global = fRot2Local.Inverse();
fRot2Global.SetYEulerAngles(phi,theta,psi);
fRot2Local = fRot2Global.Inverse();
fXaxis *= fRot2Global;
fYaxis *= fRot2Global;
fZaxis *= fRot2Global;
}