Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 10:38:44

0001 //   COCOA class implementation file

0002 //Id:  OptOScreen.cc

0003 //CAT: Model

0004 //

0005 //   History: v1.0

0006 //   Pedro Arce

0007 
0008 #include "Alignment/CocoaModel/interface/OptOScreen.h"
0009 #include <iostream>
0010 #include <iomanip>
0011 #ifdef COCOA_VIS
0012 #include "Alignment/CocoaVisMgr/interface/ALIVRMLMgr.h"
0013 #include "Alignment/IgCocoaFileWriter/interface/IgCocoaFileMgr.h"
0014 #endif
0015 #include "Alignment/CocoaDDLObjects/interface/CocoaSolidShapeBox.h"
0016 #include "Alignment/CocoaUtilities/interface/GlobalOptionMgr.h"
0017 
0018 using namespace CLHEP;
0019 
0020 //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

0021 //@@ do nothing

0022 //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

0023 void OptOScreen::defaultBehaviour(LightRay& lightray, Measurement& meas) {}
0024 #ifdef COCOA_VIS
0025 
0026 //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

0027 void OptOScreen::fillVRML() {
0028   //-  std::cout << " filling optosensor " << std::endl;

0029   ALIVRMLMgr& vrmlmgr = ALIVRMLMgr::getInstance();
0030   ALIColour* col = new ALIColour(1., 0., 0.5, 0.);
0031   vrmlmgr.AddBox(*this, .6, .6, .1, col);
0032   vrmlmgr.SendReferenceFrame(*this, 0.6);
0033   vrmlmgr.SendName(*this, 0.01);
0034 }
0035 
0036 //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

0037 void OptOScreen::fillIguana() {
0038   ALIColour* col = new ALIColour(0., 1., 1., 0.);
0039   std::vector<ALIdouble> spar;
0040   spar.push_back(6.);
0041   spar.push_back(6.);
0042   spar.push_back(1.);
0043   IgCocoaFileMgr::getInstance().addSolid(*this, "BOX", spar, col);
0044 }
0045 #endif
0046 
0047 //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

0048 void OptOScreen::constructSolidShape() {
0049   ALIdouble go;
0050   GlobalOptionMgr* gomgr = GlobalOptionMgr::getInstance();
0051   gomgr->getGlobalOptionValue("VisScale", go);
0052 
0053   theSolidShape = new CocoaSolidShapeBox(
0054       "Box", go * 8. * cm / m, go * 8. * cm / m, go * 1. * cm / m);  //COCOA internal units are meters

0055 }