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.);
49 ALIPlane plate = getPlate(
true,
true );
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(
true );
66 plate = getRotatedPlate(
false );
72 plate = getPlate(
false,
true );
74 lightray.
refract( plate, refra_ind2, refra_ind1 );
92 ALIPlane plate = getPlate(
true,
true);
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(
true,
false);
104 lightray.
refract( plate, refra_ind2, refra_ind1 );
106 lightray.
dumpData(
"Refracted in first plate");
124 ALIPlane plate = getPlate(
false,
false);
128 lightray.
dumpData(
"Intersected in plate");
162 ALIPlane plate = getPlate(
false,
false);
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);
void detailedTraversesLightRay(LightRay &lightray) override
void fastDeviatesLightRay(LightRay &lightray) override
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()
void fastTraversesLightRay(LightRay &lightray) override
int getGlobalOptionValue(const ALIstring &sstr, ALIdouble &val)
--— Search a string in theGlobalOptions and return 1 if found
void detailedDeviatesLightRay(LightRay &lightray) override
ALIPlane getRotatedPlate(const ALIbool forwardPlate)
static void dump3v(const CLHEP::Hep3Vector &vec, const std::string &msg)
void intersect(const ALIPlane &plane)
virtual void fillIguana()
static unsigned int const shift
void dumpData(const ALIstring &str) const
void reflect(const ALIPlane &plane)
void constructSolidShape() override