15 #include "Alignment/IgCocoaFileWriter/interface/IgCocoaFileMgr.h"
16 #include "Alignment/CocoaVisMgr/interface/ALIColour.h"
21 using namespace CLHEP;
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.);
52 ALIdouble refra_ind2 = findExtraEntryValueMustExist(
"refra_ind");
53 lightray.
refract( plate, refra_ind1, refra_ind2 );
55 lightray.
dumpData(
"LightRay after Refraction at entering: ");
60 plate = getRotatedPlate( 1 );
66 plate = getRotatedPlate( 0 );
72 plate = getPlate( 0, 1 );
74 lightray.
refract( plate, refra_ind2, refra_ind1 );
95 ALIdouble refra_ind2 = findExtraEntryValueMustExist(
"refra_ind");
96 lightray.
refract( plate, refra_ind1, refra_ind2 );
98 lightray.
dumpData(
"Refracted in first plate");
102 plate = getPlate(1, 0);
104 lightray.
refract( plate, refra_ind2, refra_ind1 );
106 lightray.
dumpData(
"Refracted in first plate");
128 lightray.
dumpData(
"Intersected in plate");
165 lightray.
dumpData(
"Intersected with plate");
176 lightray.
dumpData(
"Shifted and Deviated");
197 ALIdouble wedgeR = findExtraEntryValue(
"wedgeR");
201 CLHEP::Hep3Vector plate_point = centreGlob();
203 ALIdouble normal_sign = -forwardPlate*2 + 1;
204 CLHEP::Hep3Vector YAxis(0.,1.,0.);
205 CLHEP::HepRotation rmt = rmGlob();
207 plate_point += normal_sign * shift/2. * YAxis;
211 CLHEP::Hep3Vector ZAxis(0.,0.,1.);
213 ALIbool we = findExtraEntryValueIfExists(
"anglePlanes", anglePlanes);
217 ZAxis.rotateX( anglePlanes );
220 CLHEP::Hep3Vector plate_normal = rmt*ZAxis;
229 CLHEP::Hep3Vector XAxis(0.,0.,1.);
231 plate_normal.rotate( normal_sign * wedgeR/2., XAxis );
234 YAxis = CLHEP::Hep3Vector(0.,1.,0.);
235 YAxis.rotateX( anglePlanes );
237 plate_normal.rotate( normal_sign * wedgeR/2., YAxis );
241 return ALIPlane(plate_point, plate_normal);
251 ALIColour*
col =
new ALIColour( 0., 0., 1., 0. );
253 ALIbool wexists = findExtraEntryValueIfExists(
"width",width);
254 if( !wexists ) width = 1.;
256 wexists = findExtraEntryValueIfExists(
"shift",shift);
257 if( !wexists ) shift = 4.;
258 std::vector<ALIdouble> spar;
259 spar.push_back(shift);
260 spar.push_back(shift);
261 spar.push_back(width);
265 IgCocoaFileMgr::getInstance().addSolid( *
this,
"PARAL", spar, col);
267 std::vector<ALIdouble> spar2;
268 spar2.push_back(width);
269 spar2.push_back(width);
271 spar2.push_back(width);
272 spar2.push_back(width);
273 IgCocoaFileMgr::getInstance().addSolid( *
this,
"TRD", spar2, col);
virtual void fastTraversesLightRay(LightRay &lightray)
void shiftAndDeviateWhileTraversing(const OpticalObject *opto, char behav)
static void dumprm(const CLHEP::HepRotation &rm, const std::string &msg, std::ostream &out=std::cout)
void refract(const ALIPlane &plate, const ALIdouble refra_ind1, const ALIdouble refra_ind2)
static GlobalOptionMgr * getInstance()
virtual void fastDeviatesLightRay(LightRay &lightray)
int getGlobalOptionValue(const ALIstring &sstr, ALIdouble &val)
--— Search a string in theGlobalOptions and return 1 if found
virtual void detailedDeviatesLightRay(LightRay &lightray)
ALIPlane getRotatedPlate(const ALIbool forwardPlate)
virtual void detailedTraversesLightRay(LightRay &lightray)
static void dump3v(const CLHEP::Hep3Vector &vec, const std::string &msg)
void intersect(const ALIPlane &plane)
void constructSolidShape()
virtual void fillIguana()
static unsigned int const shift
void dumpData(const ALIstring &str) const
void reflect(const ALIPlane &plane)