13 #include "Alignment/CocoaVisMgr/interface/ALIVRMLMgr.h"
14 #include "Alignment/IgCocoaFileWriter/interface/IgCocoaFileMgr.h"
19 using namespace CLHEP;
26 makeMeasurement( lightray, meas);
39 CLHEP::HepRotation rmt = rmGlob();
40 CLHEP::Hep3Vector ZAxisl(0.,0.,1.);
49 CLHEP::Hep3Vector XAxisg(1.,0.,0.);
50 CLHEP::Hep3Vector ZAxisg(0.,0.,1.);
51 CLHEP::Hep3Vector ZAxis_proj = (ZAxisl*XAxisg) * XAxisg + (ZAxisl*ZAxisg) * ZAxisg;
52 ZAxis_proj *= (1. / ZAxis_proj.mag() );
55 ALIdouble measvalue = acos(ZAxisl*ZAxis_proj / ZAxisl.mag() / ZAxis_proj.mag());
57 if( ZAxisl.y() != 0 ) measvalue *= (ZAxisl.y() / fabs(ZAxisl.y()) );
63 ALIUtils::dump3v(ZAxis_proj,
" Projection of Local Z axis on global XZ plane ");
65 <<
" (mrad) " << (
this)->
name() << std::endl;
66 std::cout <<
"REAL value: TA: " << std::setprecision(8) << 1000*meas.
value()[0]
67 <<
" (mrad) " << (
this)->
name() << std::endl;
118 ALIVRMLMgr& vrmlmgr = ALIVRMLMgr::getInstance();
119 ALIColour*
col =
new ALIColour( 1., 1., 0., 0. );
120 vrmlmgr.AddBox( *
this, .2, .2, 1., col);
121 vrmlmgr.SendReferenceFrame( *
this, 0.6);
122 vrmlmgr.SendName( *
this, 0.01 );
129 ALIColour* col =
new ALIColour( 1., 0., 0.9, 0. );
130 std::vector<ALIdouble> spar;
134 IgCocoaFileMgr::getInstance().addSolid( *
this,
"BOX", spar, col);
static void dumprm(const CLHEP::HepRotation &rm, const std::string &msg, std::ostream &out=std::cout)
static GlobalOptionMgr * getInstance()
int getGlobalOptionValue(const ALIstring &sstr, ALIdouble &val)
--— Search a string in theGlobalOptions and return 1 if found
virtual void makeMeasurement(LightRay &lightray, Measurement &meas)
void setValueSimulated(ALIint coor, ALIdouble value)
virtual void defaultBehaviour(LightRay &lightray, Measurement &meas)
static void dump3v(const CLHEP::Hep3Vector &vec, const std::string &msg)
virtual void fillIguana()
const ALIdouble * value() const
const ALIdouble valueSimulated(ALIuint ii) const
void constructSolidShape()