00001
00002
00003
00004
00005
00006
00007
00008 #include "Alignment/CocoaModel/interface/OptOLens.h"
00009 #include <iostream>
00010 #include <iomanip>
00011 #include "CLHEP/Units/SystemOfUnits.h"
00012 #ifdef COCOA_VIS
00013 #include "Alignment/IgCocoaFileWriter/interface/IgCocoaFileMgr.h"
00014 #include "Alignment/CocoaVisMgr/interface/ALIColour.h"
00015 #endif
00016 #include "Alignment/CocoaDDLObjects/interface/CocoaSolidShapeTubs.h"
00017 #include "Alignment/CocoaUtilities/interface/GlobalOptionMgr.h"
00018
00019
00020 OptOLens::OptOLens()
00021 {
00022 setRmGlobalOriginal( CLHEP::HepRotation() );
00023 setRmGlobal( CLHEP::HepRotation() );
00024 }
00025
00026
00027 void OptOLens::participateInMeasurement( LightRay& lightray, Measurement& meas, const ALIstring& behav )
00028 {
00029 std::cerr << "object not implemented yet " << std::endl;
00030 exit(1);
00031 }
00032
00033 #ifdef COCOA_VIS
00034
00035 void OptOLens::fillIguana()
00036 {
00037 ALIColour* col = new ALIColour( 0.5, 1., 0.5, 0. );
00038 std::vector<ALIdouble> spar;
00039 spar.push_back(1.);
00040 spar.push_back(0.1);
00041 CLHEP::HepRotation rm;
00042 rm.rotateX( 90.*deg);
00043 IgCocoaFileMgr::getInstance().addSolid( *this, "CYLINDER", spar, col, CLHEP::Hep3Vector(), rm);
00044 }
00045 #endif
00046
00047
00048
00049 void OptOLens::constructSolidShape()
00050 {
00051 ALIdouble go;
00052 GlobalOptionMgr* gomgr = GlobalOptionMgr::getInstance();
00053 gomgr->getGlobalOptionValue("VisScale", go );
00054
00055 theSolidShape = new CocoaSolidShapeTubs( "Tubs", go*0.*cm/m, go*5.*cm/m, go*1.*cm/m );
00056 }