15 #include "Alignment/IgCocoaFileWriter/interface/IgCocoaFileMgr.h"
16 #include "Alignment/CocoaVisMgr/interface/ALIColour.h"
21 using namespace CLHEP;
30 std::cout <<
"$$$$$ LR: DETAILED DEVIATION IN MODIFIED RHOMBOID PRISM " <<
name() << std::endl;
32 CLHEP::Hep3Vector XAxis(1., 0., 0.);
33 CLHEP::HepRotation rmt = rmGlob();
35 CLHEP::Hep3Vector YAxis(0., 1., 0.);
37 CLHEP::Hep3Vector ZAxis(0., 0., 1.);
48 std::cout <<
"$$$ LR: REFRACTION IN FORWARD PLATE " << std::endl;
50 ALIPlane plate = getPlate(
true,
true);
53 ALIdouble refra_ind2 = findExtraEntryValueMustExist(
"refra_ind");
54 lightray.
refract(plate, refra_ind1, refra_ind2);
56 lightray.
dumpData(
"LightRay after Refraction at entering: ");
60 std::cout << std::endl <<
"$$$ LR: REFLECTION IN FIRST PLATE " << std::endl;
62 plate = getRotatedPlate(
true);
67 std::cout << std::endl <<
"$$$ LR: REFLECTION IN SECOND PLATE " << std::endl;
69 plate = getRotatedPlate(
false);
74 std::cout << std::endl <<
"$$$ LR: REFRACTION IN BACKWARD PLATE " << std::endl;
76 plate = getPlate(
false,
true);
78 lightray.
refract(plate, refra_ind2, refra_ind1);
91 std::cout <<
"LR: DETAILED TRAVERSE MODIFIED RHOMBOID PRISM " <<
name() << std::endl;
94 ALIPlane plate = getPlate(
true,
true);
97 ALIdouble refra_ind2 = findExtraEntryValueMustExist(
"refra_ind");
98 lightray.
refract(plate, refra_ind1, refra_ind2);
100 lightray.
dumpData(
"Refracted in first plate");
104 plate = getPlate(
true,
false);
106 lightray.
refract(plate, refra_ind2, refra_ind1);
108 lightray.
dumpData(
"Refracted in first plate");
121 std::cout <<
"LR: FAST REFLECTION IN MODIFIED RHOMBOID PRISM " <<
name() << std::endl;
124 ALIPlane plate = getPlate(
false,
false);
128 lightray.
dumpData(
"Intersected in plate");
157 std::cout <<
"LR: FAST TRAVERSE MODIFIED RHOMBOID PRISM " <<
name() << std::endl;
160 ALIPlane plate = getPlate(
false,
false);
163 lightray.
dumpData(
"Intersected with plate");
174 lightray.
dumpData(
"Shifted and Deviated");
189 std::cout <<
"% LR: GET ROTATED PLATE " <<
name() << std::endl;
192 ALIdouble wedgeR = findExtraEntryValue(
"wedgeR");
196 CLHEP::Hep3Vector plate_point = centreGlob();
198 ALIdouble normal_sign = -forwardPlate * 2 + 1;
199 CLHEP::Hep3Vector YAxis(0., 1., 0.);
200 CLHEP::HepRotation rmt = rmGlob();
202 plate_point += normal_sign *
shift / 2. * YAxis;
206 CLHEP::Hep3Vector ZAxis(0., 0., 1.);
208 ALIbool we = findExtraEntryValueIfExists(
"anglePlanes", anglePlanes);
212 ZAxis.rotateX(anglePlanes);
215 CLHEP::Hep3Vector plate_normal = rmt * ZAxis;
224 CLHEP::Hep3Vector XAxis(0., 0., 1.);
226 plate_normal.rotate(normal_sign * wedgeR / 2., XAxis);
230 YAxis = CLHEP::Hep3Vector(0., 1., 0.);
231 YAxis.rotateX(anglePlanes);
233 plate_normal.rotate(normal_sign * wedgeR / 2., YAxis);
238 return ALIPlane(plate_point, plate_normal);
244 ALIColour*
col =
new ALIColour(0., 0., 1., 0.);
246 ALIbool wexists = findExtraEntryValueIfExists(
"width",
width);
250 wexists = findExtraEntryValueIfExists(
"shift",
shift);
253 std::vector<ALIdouble> spar;
254 spar.push_back(
shift);
255 spar.push_back(
shift);
256 spar.push_back(
width);
260 IgCocoaFileMgr::getInstance().addSolid(*
this,
"PARAL", spar,
col);
262 std::vector<ALIdouble> spar2;
263 spar2.push_back(
width);
264 spar2.push_back(
width);
266 spar2.push_back(
width);
267 spar2.push_back(
width);
268 IgCocoaFileMgr::getInstance().addSolid(*
this,
"TRD", spar2,
col);
280 "Box", go * 5. * cm /
m, go * 5. * cm /
m, go * 5. * cm /
m);