#include <OptODistancemeter3dim.h>
Public Member Functions | |
void | constructSolidShape () |
virtual void | defaultBehaviour (LightRay &lightray, Measurement &meas) |
virtual void | makeMeasurement (LightRay &lightray, Measurement &meas) |
OptODistancemeter3dim (OpticalObject *parent, const ALIstring &type, const ALIstring &name, const ALIbool copy_data) | |
OptODistancemeter3dim () | |
~OptODistancemeter3dim () |
Definition at line 18 of file OptODistancemeter3dim.h.
OptODistancemeter3dim::OptODistancemeter3dim | ( | ) | [inline] |
Definition at line 23 of file OptODistancemeter3dim.h.
{ };
OptODistancemeter3dim::OptODistancemeter3dim | ( | OpticalObject * | parent, |
const ALIstring & | type, | ||
const ALIstring & | name, | ||
const ALIbool | copy_data | ||
) | [inline] |
Definition at line 24 of file OptODistancemeter3dim.h.
: OpticalObject( parent, type, name, copy_data){ };
OptODistancemeter3dim::~OptODistancemeter3dim | ( | ) | [inline] |
Definition at line 26 of file OptODistancemeter3dim.h.
{ };
void OptODistancemeter3dim::constructSolidShape | ( | ) | [virtual] |
Reimplemented from OpticalObject.
Definition at line 84 of file OptODistancemeter3dim.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*2.*cm/m, go*5.*cm/m ); //COCOA internal units are meters }
void OptODistancemeter3dim::defaultBehaviour | ( | LightRay & | lightray, |
Measurement & | meas | ||
) | [virtual] |
Reimplemented from OpticalObject.
Definition at line 24 of file OptODistancemeter3dim.cc.
References makeMeasurement().
{ makeMeasurement( lightray, meas); }
void OptODistancemeter3dim::makeMeasurement | ( | LightRay & | lightray, |
Measurement & | meas | ||
) | [virtual] |
Reimplemented from OpticalObject.
Definition at line 34 of file OptODistancemeter3dim.cc.
References OpticalObject::centreGlob(), gather_cfg::cout, ALIUtils::debug, ALIUtils::dump3v(), Measurement::getPreviousOptO(), OpticalObject::name(), Measurement::setValueSimulated(), Measurement::value(), and Measurement::valueSimulated().
Referenced by defaultBehaviour().
{ const OpticalObject* opto_prev = meas.getPreviousOptO( this ); CLHEP::Hep3Vector dm_centre = centreGlob(); dm_centre -= opto_prev->centreGlob(); if (ALIUtils::debug >= 4) { std::cout << "OptO " << name() << std::endl; ALIUtils::dump3v( centreGlob(), " centre Glob "); std::cout << "OptO " << opto_prev->name() << std::endl; ALIUtils::dump3v( opto_prev->centreGlob(), " previous OptO centre Glob "); ALIUtils::dump3v( dm_centre, " distance std::vector"); } meas.setValueSimulated (0 , dm_centre.mag() ); if (ALIUtils::debug >= 1) { std::cout << "SIMU value: D: " << meas.valueSimulated(0)*1000. << " (mm) " << (this)->name() << std::endl; std::cout << "REAL value: D: " << meas.value()[0]*1000. << " (mm) " << (this)->name() << std::endl; } }