12 #include "CLHEP/Units/GlobalSystemOfUnits.h"
14 #include "Alignment/IgCocoaFileWriter/interface/IgCocoaFileMgr.h"
15 #include "Alignment/CocoaVisMgr/interface/ALIColour.h"
29 std::cout <<
"LR: FAST REFLECTION IN CUBE SPLITTER " <<
name() << std::endl;
36 lightray.
dumpData(
"Reflected in plate");
59 std::cout <<
"LR: FAST TRAVERSE CUBE SPLITTER " <<
name() << std::endl;
65 lightray.
dumpData(
"Intersected with plate");
76 lightray.
dumpData(
"Shifted and Deviated");
92 std::cout <<
"LR: DETAILED REFLECTION IN CUBE SPLITTER " <<
name() << std::endl;
98 std::cout <<
"%%%%% refracting at entering first plate " << std::endl;
100 std::cout <<
"%%% getting first plate " << std::endl;
106 lightray.
refract(plate, refra_ind1, refra_ind2);
110 std::cout <<
"%%%%% reflecting in middle plate " << std::endl;
112 std::cout <<
"%%% getting middle plate " << std::endl;
118 lightray.
dumpData(
"Reflected in plate");
123 std::cout <<
"%%%%% getting second plate " << std::endl;
126 std::cout <<
"%%%%% refracting at exiting second plate " << std::endl;
127 lightray.
refract(plate, refra_ind2, refra_ind1);
130 lightray.
dumpData(
"After CubeSplitter");
144 std::cout <<
"LR: DETAILED TRAVERSE CUBE SPLITTER " <<
name() << std::endl;
152 lightray.
refract(plate, refra_ind1, refra_ind2);
154 lightray.
dumpData(
"Refracted in first plate");
160 lightray.
refract(plate, refra_ind2, refra_ind1);
162 lightray.
dumpData(
"Refracted in first plate");
173 std::cout <<
"%%% LR: GET MIDDLE PLATE " <<
name() << std::endl;
183 std::cout <<
"anglePlanes default = " << anglePlanes / deg << std::endl;
185 CLHEP::Hep3Vector Axis(0., 0., 1.);
186 CLHEP::Hep3Vector XAxis(1., 0., 0.);
187 Axis.rotate(anglePlanes, XAxis);
188 CLHEP::HepRotation rmt =
rmGlob();
189 CLHEP::Hep3Vector plate_normal = rmt * Axis;
198 return ALIPlane(plate_point, plate_normal);
212 CLHEP::Hep3Vector Axis(0., 1., 0.);
213 CLHEP::HepRotation rmt =
rmGlob();
214 CLHEP::Hep3Vector plate_normal = rmt * Axis;
221 plate_point += width / 2. * plate_normal;
224 return ALIPlane(plate_point, plate_normal);
230 ALIColour*
col =
new ALIColour(0., 0., 0., 0.);
236 std::vector<ALIdouble> spar;
237 spar.push_back(width);
238 spar.push_back(width);
239 spar.push_back(width);
240 IgCocoaFileMgr::getInstance().addSolid(*
this,
"BOX", spar, col);
251 "Box", go * 5. * cm /
m, go * 5. * cm /
m, go * 5. * cm /
m);
void fastTraversesLightRay(LightRay &lightray) override
CocoaSolidShape * theSolidShape
void shiftAndDeviateWhileTraversing(const OpticalObject *opto, char behav)
static void dumprm(const CLHEP::HepRotation &rm, const std::string &msg, std::ostream &out=std::cout)
const ALIbool findExtraEntryValueIfExists(const ALIstring &eename, ALIdouble &value) const
void refract(const ALIPlane &plate, const ALIdouble refra_ind1, const ALIdouble refra_ind2)
static GlobalOptionMgr * getInstance()
void detailedDeviatesLightRay(LightRay &lightray) override
const CLHEP::HepRotation & rmGlob() const
int getGlobalOptionValue(const ALIstring &sstr, ALIdouble &val)
--— Search a string in theGlobalOptions and return 1 if found
void constructSolidShape() override
const ALIdouble findExtraEntryValue(const ALIstring &eename) const
void detailedTraversesLightRay(LightRay &lightray) override
static void dump3v(const CLHEP::Hep3Vector &vec, const std::string &msg)
void intersect(const ALIPlane &plane)
void fastDeviatesLightRay(LightRay &lightray) override
virtual void fillIguana()
const CLHEP::Hep3Vector & centreGlob() const
ALIPlane getPlate(const ALIbool forwardPlate, const ALIbool applyWedge)
void dumpData(const ALIstring &str) const
ALIPlane getMiddlePlate()
const ALIstring & name() const
void reflect(const ALIPlane &plane)