CMS 3D CMS Logo

Public Member Functions

OptOPinhole Class Reference

#include <OptOPinhole.h>

Inheritance diagram for OptOPinhole:
OpticalObject

List of all members.

Public Member Functions

void constructSolidShape ()
void defaultBehaviour (LightRay &lightray, Measurement &meas)
 OptOPinhole (OpticalObject *parent, const ALIstring &type, const ALIstring &name, const ALIbool copy_data)
 OptOPinhole ()
 ~OptOPinhole ()

Detailed Description

Definition at line 18 of file OptOPinhole.h.


Constructor & Destructor Documentation

OptOPinhole::OptOPinhole ( ) [inline]

Definition at line 23 of file OptOPinhole.h.

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

Definition at line 24 of file OptOPinhole.h.

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

Definition at line 26 of file OptOPinhole.h.

{ };

Member Function Documentation

void OptOPinhole::constructSolidShape ( ) [virtual]

Reimplemented from OpticalObject.

Definition at line 64 of file OptOPinhole.cc.

References GlobalOptionMgr::getGlobalOptionValue(), GlobalOptionMgr::getInstance(), m, and OpticalObject::theSolidShape.

{
  ALIdouble go;
  GlobalOptionMgr* gomgr = GlobalOptionMgr::getInstance();
  gomgr->getGlobalOptionValue("VisScale", go );

  theSolidShape = new CocoaSolidShapeTubs( "Tubs", go*0.*cm/m, go*1.*cm/m, go*1.*cm/m ); //COCOA internal units are meters
}
void OptOPinhole::defaultBehaviour ( LightRay lightray,
Measurement meas 
) [virtual]

Reimplemented from OpticalObject.

Definition at line 26 of file OptOPinhole.cc.

References OpticalObject::centreGlob(), gather_cfg::cout, ALIUtils::debug, ALIUtils::dump3v(), LightRay::dumpData(), OpticalObject::name(), LightRay::point(), LightRay::setDirection(), LightRay::setPoint(), and LaserTracksInput_cfi::source.

{
  if (ALIUtils::debug >= 2) std::cout << "LR: TRAVERSE PINHOLE  " << name() << std::endl;
  
  //----------- Direction is the one that links the source and the pinhole
  CLHEP::Hep3Vector source = lightray.point();
  CLHEP::Hep3Vector pinhole = centreGlob();
  lightray.setDirection( pinhole - source );
  lightray.setPoint( pinhole );

  if (ALIUtils::debug >= 4) {
    ALIUtils::dump3v( source, " source centre ");
    ALIUtils::dump3v( pinhole, " pinhole centre ");
  }
  if (ALIUtils::debug >= 3) {
    lightray.dumpData( "lightray at pinhole ");
  }

}