#include <iostream>
using namespace std;

#include "CLHEP/Matrix/Vector.h"
//#include "CLHEP/Vector/RotationX.h"
//#include "CLHEP/Vector/RotationY.h"
//#include "CLHEP/Vector/RotationZ.h"
#include "CLHEP/Geometry/Transform3D.h"
// Looks like envelope value  but number is too big.
//INFO AlignableTransform object /Indet/Align/ID
//INFO ID [1,0,0,0,0,0] Trans:(-0.0116,-0.0093,0.0172) Rot:{-0.892043,0.000151615,0.891935}
//INFO ID [2,-1,0,0,0,0] Trans:(-1.8095,2.181,-3.10001) Rot:{-0.464048,0.000111803,0.463648}
//INFO ID [2,0,0,0,0,0] Trans:(0.7,1.2,1.3) Rot:{-2.67875,0.000111803,2.67795}
//INFO ID [2,1,0,0,0,0] Trans:(2.1,-1.2525,1.80006) Rot:{0.0005,0.00025,-7.16347e-14}
// modules each. still big.
//INFO AlignableTransform object /Indet/Align/PIXEC1
//INFO ID [1,-1,0,0,0,0] Trans:(-0.00609543,-0.0264906,-0.0189705) Rot:{-2.64653,0.000656586,2.64559}
// level 1 big, level 2 OK, level3 big.
int main(void)
{
// level2 
//	double var[6]={-0.023347,0.002194,0,0, 0, 0.000394496};
// level1 SCTB from python file
      double var[6]={0.7e-3,1.2e-3,1.3e-3,0.1e-3,0.05e-3,0.8e-3};
               HepVector3D translation(var[0],var[1],var[2]);
                HepRotation rotation = HepRotationX(var[3])*HepRotationY(var[4])*HepRotationZ(var[5]);
                HepTransform3D trans = HepTransform3D(rotation, translation);

// from printDB getPhi, getTheta, getPsi . What is this?
        Hep3Vector shift=trans.getTranslation();
        HepRotation rot=trans.getRotation();
           cout <<  " Trans:(" <<
            shift.x() << "," << shift.y() << "," << shift.z() << ") Rot:{"
              << rot.getPhi() << "," << rot.getTheta() << "," <<
            rot.getPsi() << "}" << endl;
} 
