CMS 3D CMS Logo

Public Member Functions

OptOPlateSplitter Class Reference

#include <OptOPlateSplitter.h>

Inheritance diagram for OptOPlateSplitter:
OpticalObject

List of all members.

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)
 OptOPlateSplitter (OpticalObject *parent, const ALIstring &type, const ALIstring &name, const ALIbool copy_data)
 OptOPlateSplitter ()
 ~OptOPlateSplitter ()

Detailed Description

Definition at line 18 of file OptOPlateSplitter.h.


Constructor & Destructor Documentation

OptOPlateSplitter::OptOPlateSplitter ( ) [inline]

Definition at line 23 of file OptOPlateSplitter.h.

{ };
OptOPlateSplitter::OptOPlateSplitter ( OpticalObject parent,
const ALIstring type,
const ALIstring name,
const ALIbool  copy_data 
) [inline]

Definition at line 24 of file OptOPlateSplitter.h.

                                                                                                                  : 
  OpticalObject( parent, type, name, copy_data){ };
OptOPlateSplitter::~OptOPlateSplitter ( ) [inline]

Definition at line 26 of file OptOPlateSplitter.h.

{ };

Member Function Documentation

void OptOPlateSplitter::constructSolidShape ( ) [virtual]

Reimplemented from OpticalObject.

Definition at line 186 of file OptOPlateSplitter.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*1.*cm/m ); //COCOA internal units are meters
}
void OptOPlateSplitter::detailedDeviatesLightRay ( LightRay lightray) [virtual]

Reimplemented from OpticalObject.

Definition at line 26 of file OptOPlateSplitter.cc.

References gather_cfg::cout, ALIUtils::debug, ALIUtils::dump3v(), LightRay::dumpData(), mergeVDriftHistosByStation::name, and LightRay::reflect().

{
  if (ALIUtils::debug >= 2) std::cout << "LR: DETAILED REFLECTION IN PLATE SPLITTER " << name() << std::endl;
  if (ALIUtils::debug >= 3) ALIUtils::dump3v( centreGlob(), " centre Global RF ");

  //---------- Get forward plate
  ALIPlane plate = getPlate(1, 1);
  //---------- Reflect
  lightray.reflect( plate );
  if (ALIUtils::debug >= 2) {
    std::cout << "Reflected in plate" << std::endl;
    lightray.dumpData(" "); 
  }

}
void OptOPlateSplitter::detailedTraversesLightRay ( LightRay lightray) [virtual]

Reimplemented from OpticalObject.

Definition at line 51 of file OptOPlateSplitter.cc.

References gather_cfg::cout, ALIUtils::debug, LightRay::dumpData(), mergeVDriftHistosByStation::name, LightRay::refract(), and tablePrinter::width.

{
  if (ALIUtils::debug >= 2) std::cout << "LR: DETAILED TRAVERSE IN PLATE SPLITTER " << name() << std::endl;

  //---------- Get forward plate
  ALIPlane plate = getPlate(1, 1);
  //---------- If width is 0, just keep the same point 
  ALIdouble width = findExtraEntryValue("width");
  if( width == 0 ) {
    if(ALIUtils::debug >= 3) lightray.dumpData("Traversed with 0 width"); 
    return;
  }

  //---------- Refract while entering splitter
  ALIdouble refra_ind1 = 1.;
  ALIdouble refra_ind2 = findExtraEntryValue("refra_ind");
  lightray.refract( plate, refra_ind1, refra_ind2 );
  if (ALIUtils::debug >= 2) {
    lightray.dumpData("Refracted in first plate"); 
  }

  //---------- Get backward plate
  plate = getPlate(0, 1);
  //---------- Refract while exiting splitter
  lightray.refract( plate, refra_ind2, refra_ind1 );
  if (ALIUtils::debug >= 2) {
    lightray.dumpData("Refracted in first plate"); 
  }

}
void OptOPlateSplitter::fastDeviatesLightRay ( LightRay lightray) [virtual]

Reimplemented from OpticalObject.

Definition at line 90 of file OptOPlateSplitter.cc.

References gather_cfg::cout, ALIUtils::debug, LightRay::dumpData(), mergeVDriftHistosByStation::name, LightRay::reflect(), and LightRay::shiftAndDeviateWhileTraversing().

{
  if (ALIUtils::debug >= 2) std::cout << "LR: REFLECTION IN PLATE SPLITTER " << name() << std::endl;

  //---------- Get forward plate
  ALIPlane plate = getPlate(1, 0);
  //---------- Reflect in plate (including intersection with it)
  lightray.reflect( plate );
  if (ALIUtils::debug >= 2) {
    lightray.dumpData("Reflected in plate"); 
  }
  //---------- Deviate Lightray 
  ALIdouble deviRX = findExtraEntryValue("deviRX");
  ALIdouble deviRY = findExtraEntryValue("deviRY");
  ALIdouble deviR;
  ALIbool bb = findExtraEntryValueIfExists("deviR", deviR);
  if( bb ) {
    deviRX = deviR;
    deviRY = deviR;
  }

  //  lightray.shiftAndDeviateWhileTraversing( this, 0., 0., 0., deviRX, deviRY, 0.);
  lightray.shiftAndDeviateWhileTraversing( this, 'R' );
  if (ALIUtils::debug >= 2) {
    lightray.dumpData("Deviated ");
  }
  
}
void OptOPlateSplitter::fastTraversesLightRay ( LightRay lightray) [virtual]

Reimplemented from OpticalObject.

Definition at line 129 of file OptOPlateSplitter.cc.

References gather_cfg::cout, ALIUtils::debug, LightRay::dumpData(), LightRay::intersect(), mergeVDriftHistosByStation::name, edm::shift, and LightRay::shiftAndDeviateWhileTraversing().

{
  if (ALIUtils::debug >= 2) std::cout << "LR: TRAVERSE PLATE SPLITTER  " << 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
  ALIdouble shiftX = findExtraEntryValue("shiftTX");
  ALIdouble shiftY = findExtraEntryValue("shiftTY");
  ALIdouble shift;
  ALIbool bb = findExtraEntryValueIfExists("shiftT", shift);
  if( bb ) {
    shiftX = shift;
    shiftY = shift;
  }

  ALIdouble deviTX = findExtraEntryValue("deviTX");
  ALIdouble deviTY = findExtraEntryValue("deviTY");
  ALIdouble deviT;
  bb = findExtraEntryValueIfExists("deviT", deviT);
  if( bb ) {
    deviTX = deviT;
    deviTY = deviT;
  }

  //  lightray.shiftAndDeviateWhileTraversing( this, shiftX, shiftY, 0., deviTX, deviTY, 0.);
  lightray.shiftAndDeviateWhileTraversing( this, 'T' );
  if (ALIUtils::debug >= 2) {
    lightray.dumpData("Shifted and Deviated");
  }

}