Alignment
CocoaModel
src
OptOLens.cc
Go to the documentation of this file.
1
// COCOA class implementation file
2
//Id: OptOLens.cc
3
//CAT: Model
4
//
5
// History: v1.0
6
// Pedro Arce
7
8
#include "
Alignment/CocoaModel/interface/OptOLens.h
"
9
#include <iostream>
10
#include <iomanip>
11
#include <cstdlib>
12
#include "CLHEP/Units/GlobalSystemOfUnits.h"
13
#ifdef COCOA_VIS
14
#include "Alignment/IgCocoaFileWriter/interface/IgCocoaFileMgr.h"
15
#include "Alignment/CocoaVisMgr/interface/ALIColour.h"
16
#endif
17
#include "
Alignment/CocoaDDLObjects/interface/CocoaSolidShapeTubs.h
"
18
#include "
Alignment/CocoaUtilities/interface/GlobalOptionMgr.h
"
19
20
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
21
OptOLens::OptOLens
() {
22
setRmGlobalOriginal
(CLHEP::HepRotation());
23
setRmGlobal
(CLHEP::HepRotation());
24
}
25
26
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
27
void
OptOLens::participateInMeasurement
(
LightRay
& lightray,
Measurement
& meas,
const
ALIstring
& behav) {
28
std::cerr
<<
"object not implemented yet "
<< std::endl;
29
exit
(1);
30
}
31
32
#ifdef COCOA_VIS
33
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
34
void
OptOLens::fillIguana
() {
35
ALIColour*
col
=
new
ALIColour(0.5, 1., 0.5, 0.);
36
std::vector<ALIdouble> spar;
37
spar.push_back(1.);
38
spar.push_back(0.1);
39
CLHEP::HepRotation
rm
;
40
rm
.rotateX(90. * deg);
41
IgCocoaFileMgr::getInstance().addSolid(*
this
,
"CYLINDER"
, spar,
col
, CLHEP::Hep3Vector(),
rm
);
42
}
43
#endif
44
45
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
46
void
OptOLens::constructSolidShape
() {
47
ALIdouble
go;
48
GlobalOptionMgr
* gomgr =
GlobalOptionMgr::getInstance
();
49
gomgr->
getGlobalOptionValue
(
"VisScale"
, go);
50
51
theSolidShape
=
new
CocoaSolidShapeTubs
(
52
"Tubs"
, go * 0. * cm /
m
, go * 5. * cm /
m
, go * 1. * cm /
m
);
//COCOA internal units are meters
53
}
OpticalObject::setRmGlobalOriginal
void setRmGlobalOriginal(const CLHEP::HepRotation &rm)
Definition:
OpticalObject.h:102
GlobalOptionMgr
Definition:
GlobalOptionMgr.h:18
GlobalOptionMgr::getInstance
static GlobalOptionMgr * getInstance()
Definition:
GlobalOptionMgr.cc:18
OptOLens.h
cuy.col
col
Definition:
cuy.py:1010
ALIstring
std::string ALIstring
Definition:
CocoaGlobals.h:9
GlobalOptionMgr.h
GlobalOptionMgr::getGlobalOptionValue
int getGlobalOptionValue(const ALIstring &sstr, ALIdouble &val)
--— Search a string in theGlobalOptions and return 1 if found
Definition:
GlobalOptionMgr.cc:115
OpticalObject::theSolidShape
CocoaSolidShape * theSolidShape
Definition:
OpticalObject.h:315
CocoaSolidShapeTubs
Definition:
CocoaSolidShapeTubs.h:14
visualization-live-secondInstance_cfg.m
m
Definition:
visualization-live-secondInstance_cfg.py:72
Measurement
Definition:
Measurement.h:27
submit.rm
rm
Definition:
submit.py:77
OptOLens::OptOLens
OptOLens()
Definition:
OptOLens.cc:21
OpticalObject::fillIguana
virtual void fillIguana()
Definition:
OpticalObject.h:55
LightRay
Definition:
LightRay.h:20
beam_dqm_sourceclient-live_cfg.cerr
cerr
Definition:
beam_dqm_sourceclient-live_cfg.py:17
ALIdouble
long double ALIdouble
Definition:
CocoaGlobals.h:11
OptOLens::participateInMeasurement
void participateInMeasurement(LightRay &lightray, Measurement &meas, const ALIstring &behav) override
Definition:
OptOLens.cc:27
CocoaSolidShapeTubs.h
beamvalidation.exit
def exit(msg="")
Definition:
beamvalidation.py:53
OpticalObject::setRmGlobal
void setRmGlobal(const CLHEP::HepRotation &rm)
Definition:
OpticalObject.h:108
OptOLens::constructSolidShape
void constructSolidShape() override
Definition:
OptOLens.cc:46
Generated for CMSSW Reference Manual by
1.8.16