12 #include "CLHEP/Units/GlobalSystemOfUnits.h"
14 #include "Alignment/IgCocoaFileWriter/interface/IgCocoaFileMgr.h"
15 #include "Alignment/CocoaVisMgr/interface/ALIColour.h"
36 lightray.
dumpData(
"Reflected in plate");
67 lightray.
dumpData(
"Intersected with plate");
78 lightray.
dumpData(
"Shifted and Deviated");
107 lightray.
refract( plate, refra_ind1, refra_ind2 );
117 lightray.
dumpData(
"Reflected in plate");
124 lightray.
refract( plate, refra_ind2, refra_ind1 );
127 lightray.
dumpData(
"After CubeSplitter");
151 lightray.
refract( plate, refra_ind1, refra_ind2 );
153 lightray.
dumpData(
"Refracted in first plate");
159 lightray.
refract( plate, refra_ind2, refra_ind1 );
161 lightray.
dumpData(
"Refracted in first plate");
180 anglePlanes = acos(0.)/2.;
183 CLHEP::Hep3Vector Axis(0., 0., 1.);
184 CLHEP::Hep3Vector XAxis(1., 0., 0.);
185 Axis.rotate( anglePlanes, XAxis);
186 CLHEP::HepRotation rmt =
rmGlob();
187 CLHEP::Hep3Vector plate_normal = rmt*Axis;
196 return ALIPlane(plate_point, plate_normal);
211 CLHEP::Hep3Vector Axis(0., 1., 0.);
212 CLHEP::HepRotation rmt =
rmGlob();
213 CLHEP::Hep3Vector plate_normal = rmt*Axis;
220 plate_point += width/2. * plate_normal;
223 return ALIPlane(plate_point, plate_normal);
232 ALIColour*
col =
new ALIColour( 0., 0., 0., 0. );
235 if( !wexists ) width = 4.;
237 std::vector<ALIdouble> spar;
238 spar.push_back(width);
239 spar.push_back(width);
240 spar.push_back(width);
241 IgCocoaFileMgr::getInstance().addSolid( *
this,
"BOX", spar, col);
CocoaSolidShape * theSolidShape
void constructSolidShape()
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()
const CLHEP::HepRotation & rmGlob() const
int getGlobalOptionValue(const ALIstring &sstr, ALIdouble &val)
--— Search a string in theGlobalOptions and return 1 if found
virtual void fastDeviatesLightRay(LightRay &lightray)
virtual void fastTraversesLightRay(LightRay &lightray)
const ALIdouble findExtraEntryValue(const ALIstring &eename) const
static void dump3v(const CLHEP::Hep3Vector &vec, const std::string &msg)
void intersect(const ALIPlane &plane)
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)
virtual void detailedDeviatesLightRay(LightRay &lightray)
virtual void detailedTraversesLightRay(LightRay &lightray)