#include <OptOModifiedRhomboidPrism.h>
Public Member Functions | |
void | constructSolidShape () |
virtual void | detailedDeviatesLightRay (LightRay &lightray) |
virtual void | detailedTraversesLightRay (LightRay &lightray) |
virtual void | fastDeviatesLightRay (LightRay &lightray) |
virtual void | fastTraversesLightRay (LightRay &lightray) |
ALIPlane | getRotatedPlate (const ALIbool forwardPlate) |
OptOModifiedRhomboidPrism () | |
OptOModifiedRhomboidPrism (OpticalObject *parent, const ALIstring &type, const ALIstring &name, const ALIbool copy_data) | |
~OptOModifiedRhomboidPrism () |
Definition at line 18 of file OptOModifiedRhomboidPrism.h.
OptOModifiedRhomboidPrism::OptOModifiedRhomboidPrism | ( | ) | [inline] |
Definition at line 23 of file OptOModifiedRhomboidPrism.h.
{ };
OptOModifiedRhomboidPrism::OptOModifiedRhomboidPrism | ( | OpticalObject * | parent, |
const ALIstring & | type, | ||
const ALIstring & | name, | ||
const ALIbool | copy_data | ||
) | [inline] |
Definition at line 24 of file OptOModifiedRhomboidPrism.h.
: OpticalObject( parent, type, name, copy_data){ };
OptOModifiedRhomboidPrism::~OptOModifiedRhomboidPrism | ( | ) | [inline] |
Definition at line 26 of file OptOModifiedRhomboidPrism.h.
{ };
void OptOModifiedRhomboidPrism::constructSolidShape | ( | ) | [virtual] |
Reimplemented from OpticalObject.
Definition at line 281 of file OptOModifiedRhomboidPrism.cc.
References GlobalOptionMgr::getGlobalOptionValue(), GlobalOptionMgr::getInstance(), and m.
{ ALIdouble go; GlobalOptionMgr* gomgr = GlobalOptionMgr::getInstance(); gomgr->getGlobalOptionValue("VisScale", go ); theSolidShape = new CocoaSolidShapeBox( "Box", go*5.*cm/m, go*5.*cm/m, go*5.*cm/m ); //COCOA internal units are meters }
void OptOModifiedRhomboidPrism::detailedDeviatesLightRay | ( | LightRay & | lightray | ) | [virtual] |
Reimplemented from OpticalObject.
Definition at line 28 of file OptOModifiedRhomboidPrism.cc.
References gather_cfg::cout, ALIUtils::debug, ALIUtils::dump3v(), LightRay::dumpData(), mergeVDriftHistosByStation::name, LightRay::reflect(), and LightRay::refract().
{ if (ALIUtils::debug >= 2) std::cout << "$$$$$ LR: DETAILED DEVIATION IN MODIFIED RHOMBOID PRISM " << name() << std::endl; CLHEP::Hep3Vector XAxis(1.,0.,0.); CLHEP::HepRotation rmt = rmGlob(); XAxis = rmt*XAxis; CLHEP::Hep3Vector YAxis(0.,1.,0.); YAxis = rmt*YAxis; CLHEP::Hep3Vector ZAxis(0.,0.,1.); ZAxis = rmt*ZAxis; ALIUtils::dump3v( XAxis , " x axis "); ALIUtils::dump3v( YAxis , " y axis "); ALIUtils::dump3v( ZAxis , " z axis "); if (ALIUtils::debug >= 5) { ALIUtils::dump3v( centreGlob(), " centre "); } if (ALIUtils::debug >= 2) std::cout << "$$$ LR: REFRACTION IN FORWARD PLATE " << std::endl; //---------- Get forward plate ALIPlane plate = getPlate( 1, 1 ); //---------- Refract in plate while entering ALIdouble refra_ind1 = 1.; ALIdouble refra_ind2 = findExtraEntryValueMustExist("refra_ind"); lightray.refract( plate, refra_ind1, refra_ind2 ); if (ALIUtils::debug >= 2) { lightray.dumpData("LightRay after Refraction at entering: "); } if (ALIUtils::debug >= 2) std::cout << std::endl << "$$$ LR: REFLECTION IN FIRST PLATE " << std::endl; //---------- Get up plate rotated plate = getRotatedPlate( 1 ); //---------- Reflect in plate lightray.reflect( plate ); if (ALIUtils::debug >= 2) std::cout << std::endl << "$$$ LR: REFLECTION IN SECOND PLATE " << std::endl; //---------- Get up plate rotated plate = getRotatedPlate( 0 ); //---------- Reflect in plate lightray.reflect( plate ); if (ALIUtils::debug >= 2) std::cout << std::endl << "$$$ LR: REFRACTION IN BACKWARD PLATE " << std::endl; //---------- Get backward plate plate = getPlate( 0, 1 ); //---------- Refract in plate while exiting lightray.refract( plate, refra_ind2, refra_ind1 ); }
void OptOModifiedRhomboidPrism::detailedTraversesLightRay | ( | LightRay & | lightray | ) | [virtual] |
Reimplemented from OpticalObject.
Definition at line 87 of file OptOModifiedRhomboidPrism.cc.
References gather_cfg::cout, ALIUtils::debug, LightRay::dumpData(), mergeVDriftHistosByStation::name, and LightRay::refract().
{ if (ALIUtils::debug >= 2) std::cout << "LR: DETAILED TRAVERSE MODIFIED RHOMBOID PRISM " << name() << std::endl; //---------- Get forward plate ALIPlane plate = getPlate(1, 1); //---------- Refract while entering splitter ALIdouble refra_ind1 = 1.; ALIdouble refra_ind2 = findExtraEntryValueMustExist("refra_ind"); lightray.refract( plate, refra_ind1, refra_ind2 ); if (ALIUtils::debug >= 2) { lightray.dumpData("Refracted in first plate"); } //---------- Get back ward plate (of triangular piiece) plate = getPlate(1, 0); //---------- Refract while exiting prism lightray.refract( plate, refra_ind2, refra_ind1 ); if (ALIUtils::debug >= 2) { lightray.dumpData("Refracted in first plate"); } }
void OptOModifiedRhomboidPrism::fastDeviatesLightRay | ( | LightRay & | lightray | ) | [virtual] |
Reimplemented from OpticalObject.
Definition at line 119 of file OptOModifiedRhomboidPrism.cc.
References gather_cfg::cout, ALIUtils::debug, LightRay::dumpData(), LightRay::intersect(), mergeVDriftHistosByStation::name, and LightRay::shiftAndDeviateWhileTraversing().
{ if (ALIUtils::debug >= 2) std::cout << "LR: FAST REFLECTION IN MODIFIED RHOMBOID PRISM " << name() << std::endl; //---------- Get backward plate ALIPlane plate = getPlate(0, 0); //---------- Intersect with plate lightray.intersect( plate ); if (ALIUtils::debug >= 2) { lightray.dumpData("Intersected in plate"); } //---------- Deviate Lightray lightray.shiftAndDeviateWhileTraversing( this, 'R'); /* ALIdouble deviRX = findExtraEntryValue("deviRX"); ALIdouble deviRY = findExtraEntryValue("deviRY"); ALIdouble shiftRX = findExtraEntryValue("shiftRX"); ALIdouble shiftRY = findExtraEntryValue("shiftRY"); lightray.shiftAndDeviateWhileTraversing( this, shiftRX, shiftRY, deviRX, deviRY); */ if (ALIUtils::debug >= 2) { // std::cout << " shiftRX " << shiftRX << " shiftRY " << shiftRY << std::endl; // std::cout << " deviRX " << deviRX << " deviRY " << deviRY << std::endl; lightray.dumpData("Deviated "); } }
void OptOModifiedRhomboidPrism::fastTraversesLightRay | ( | LightRay & | lightray | ) | [virtual] |
Reimplemented from OpticalObject.
Definition at line 157 of file OptOModifiedRhomboidPrism.cc.
References gather_cfg::cout, ALIUtils::debug, LightRay::dumpData(), LightRay::intersect(), mergeVDriftHistosByStation::name, and LightRay::shiftAndDeviateWhileTraversing().
{ if (ALIUtils::debug >= 2) std::cout << "LR: FAST TRAVERSE MODIFIED RHOMBOID PRISM " << name() << std::endl; //---------- Get backward plate ALIPlane plate = getPlate(0, 0); lightray.intersect( plate ); if (ALIUtils::debug >= 2) { lightray.dumpData("Intersected with plate"); } //---------- Shift and Deviate lightray.shiftAndDeviateWhileTraversing( this, 'T'); /* ALIdouble shiftTX = findExtraEntryValue("shiftTX"); ALIdouble shiftTY = findExtraEntryValue("shiftTY"); ALIdouble deviTX = findExtraEntryValue("deviTX"); ALIdouble deviTY = findExtraEntryValue("deviTY"); lightray.shiftAndDeviateWhileTraversing( this, shiftTX, shiftTY, deviTX, deviTY);*/ if (ALIUtils::debug >= 2) { lightray.dumpData("Shifted and Deviated"); } }
Definition at line 192 of file OptOModifiedRhomboidPrism.cc.
References gather_cfg::cout, ALIUtils::debug, ALIUtils::deg, ALIUtils::dump3v(), ALIUtils::dumprm(), mergeVDriftHistosByStation::name, and edm::shift.
{ if (ALIUtils::debug >= 4) std::cout << "% LR: GET ROTATED PLATE " << name() << std::endl; //---------- Get OptO variables const ALIdouble shift = (findExtraEntryValue("shiftRY")); ALIdouble wedgeR = findExtraEntryValue("wedgeR"); //---------- Get centre of plate //----- plate centre = OptO centre +/- 1/2 shift CLHEP::Hep3Vector plate_point = centreGlob(); //--- Add to it half of the shift following the direction of the prism Y. -1/2 if it is forward plate, +1/2 if it is backward plate ALIdouble normal_sign = -forwardPlate*2 + 1; CLHEP::Hep3Vector YAxis(0.,1.,0.); CLHEP::HepRotation rmt = rmGlob(); YAxis = rmt*YAxis; plate_point += normal_sign * shift/2. * YAxis; //---------- Get normal of plate //----- Plate normal before wedgeR (Z axis of OptO rotated 'angle' around X) CLHEP::Hep3Vector ZAxis(0.,0.,1.); ALIdouble anglePlanes; ALIbool we = findExtraEntryValueIfExists("anglePlanes", anglePlanes); if( !we ) { anglePlanes = 45.*ALIUtils::deg; } ZAxis.rotateX( anglePlanes ); //----- Rotate with global rotation matrix CLHEP::Hep3Vector plate_normal = rmt*ZAxis; if (ALIUtils::debug >= 3) { ALIUtils::dump3v( plate_point, "plate_point"); ALIUtils::dump3v( plate_normal, "plate_normal before wedge"); ALIUtils::dumprm( rmt, "rmt before wedge angles" ); } //----- Rotate plate normal by 1/2 wedgeR angles //--- Around X axis CLHEP::Hep3Vector XAxis(0.,0.,1.); XAxis = rmt*XAxis; plate_normal.rotate( normal_sign * wedgeR/2., XAxis ); if (ALIUtils::debug >= 3) ALIUtils::dump3v( plate_normal, "plate_normal after wedgeR around X "); //--- Around the axis obtained rotating the prism Y axis by 'anglePlanes' around the prism X axis YAxis = CLHEP::Hep3Vector(0.,1.,0.); YAxis.rotateX( anglePlanes ); YAxis = rmt*YAxis; plate_normal.rotate( normal_sign * wedgeR/2., YAxis ); if (ALIUtils::debug >= 3) ALIUtils::dump3v( plate_normal, "plate_normal after wedgeR around Y "); //---------- Return plate plane return ALIPlane(plate_point, plate_normal); }