Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008 #include "Alignment/CocoaModel/interface/OptOLaser.h"
00009 #include "Alignment/CocoaModel/interface/LightRay.h"
00010 #include "Alignment/CocoaModel/interface/Measurement.h"
00011 #ifdef COCOA_VIS
00012 #include "Alignment/CocoaVisMgr/interface/ALIVRMLMgr.h"
00013 #include "Alignment/IgCocoaFileWriter/interface/IgCocoaFileMgr.h"
00014 #endif
00015 #include "CLHEP/Units/GlobalSystemOfUnits.h"
00016 #include "Alignment/CocoaDDLObjects/interface/CocoaSolidShapeTubs.h"
00017 #include "Alignment/CocoaUtilities/interface/GlobalOptionMgr.h"
00018
00019
00020
00021
00022
00023 void OptOLaser::defaultBehaviour( LightRay& lightray, Measurement& meas )
00024 {
00025 if(ALIUtils::debug >= 3) std::cout << "create laser lightray " << std::endl;
00026 lightray.startLightRay( this );
00027
00028 }
00029
00030
00031 #ifdef COCOA_VIS
00032
00033 void OptOLaser::fillVRML()
00034 {
00035 ALIVRMLMgr& vrmlmgr = ALIVRMLMgr::getInstance();
00036 ALIColour* col = new ALIColour( 1., 0., 0., 0. );
00037 vrmlmgr.AddBox( *this, 0.2, 0.2, 0.5,col);
00038 vrmlmgr.SendReferenceFrame( *this, 0.12);
00039 vrmlmgr.SendName( *this, 0.1 );
00040
00041 }
00042
00043
00044
00045 void OptOLaser::fillIguana()
00046 {
00047 ALIColour* col = new ALIColour( 1., 0., 0., 0. );
00048 std::vector<ALIdouble> spar;
00049 spar.push_back(1.);
00050 spar.push_back(5.);
00051 CLHEP::HepRotation rm;
00052 rm.rotateX( 90.*deg);
00053 IgCocoaFileMgr::getInstance().addSolid( *this, "CYLINDER", spar, col, CLHEP::Hep3Vector(), rm);
00054 }
00055 #endif
00056
00057
00058
00059 void OptOLaser::constructSolidShape()
00060 {
00061 ALIdouble go;
00062 GlobalOptionMgr* gomgr = GlobalOptionMgr::getInstance();
00063 gomgr->getGlobalOptionValue("VisScale", go );
00064
00065 theSolidShape = new CocoaSolidShapeTubs( "Tubs", go*0.*cm/m, go*1.*cm/m, go*5.*cm/m );
00066 }