16 #include "Alignment/CocoaVisMgr/interface/ALIVRMLMgr.h" 17 #include "Alignment/IgCocoaFileWriter/interface/IgCocoaFileMgr.h" 18 #include "Alignment/IgCocoaFileWriter/interface/ALIVisLightPath.h" 32 std::vector<OpticalObject*>::const_iterator vocite =
OptOList().begin();
38 if( (*vocite)->type() ==
"distance_target" 39 && ( (*(vocite+1))->type() ==
"distancemeter" ||
40 (*(vocite+1))->type() ==
"distancemeter1dim" ) ) {
44 if( !right_objects ) {
45 std::cerr <<
"!!! ERROR in MeasurementDistancemeter: " <<
name() <<
" There should only be two objects of type 'distance_target' and 'distancemeter' " << std::endl;
46 std::cerr <<
" 1st: " << (*vocite)->name() <<
" 2nd: " << (*vocite+1)->
name() << std::endl;
47 std::cerr <<
" 1st " << (*vocite)->type() <<
" 2nd " << (*vocite+1)->
type() << std::endl;
54 ALIVisLightPath* vispath = 0;
58 vispath = IgCocoaFileMgr::getInstance().newLightPath(
name() );
73 (*vocite)->participateInMeasurement( lightray, *
this, behav);
79 ALIVRMLMgr::getInstance().addLightPoint( lightray.
point() );
83 vispath->addLightPoint( lightray.
point(), *vocite );
89 std::cerr <<
"ERROR DE PROGRAMACION EN GetSimulatedValue" << std::endl;
107 if(wordlist.size() == 1)
return;
108 if( wordlist.size() != 4
111 std::cerr <<
"!! Distancemeter Measurement setConversionFactor: WRONG FORMAT "<< std::endl
112 <<
"It should be: DISTANCEMETER factor +- error " << std::endl
123 }
else if( dimfac == 1 ) {
125 }
else if( dimfac == 2 ) {
128 std::cerr <<
" !!!EXITING: error in global option distancemeter_meas_value_dimension, it can only take values 0,1,2, not " << dimfac;
143 if(
ALIUtils::debug >= 4)
std::cout <<
"MeasurementDistancemeter::correctValueAndSigma: old value" << val <<
" +- " << sig << std::endl;
149 if(
ALIUtils::debug >= 4)
std::cout <<
"MeasuremenDistancemeter::correctValueAndSigma: new value " << val <<
" +- " << sig << std::endl;
virtual void calculateSimulatedValue(ALIbool firstTime)
void setValue(ALIint coor, ALIdouble val)
virtual void setConversionFactor(const std::vector< ALIstring > &wordlist)
static GlobalOptionMgr * getInstance()
ALIstring getMeasuringBehaviour(const std::vector< OpticalObject * >::const_iterator vocite)
void setSigma(ALIint coor, ALIdouble val)
static int IsNumber(const ALIstring &str)
const ALIdouble * sigma() const
const CLHEP::Hep3Vector & point() const
virtual void correctValueAndSigma()
const std::vector< OpticalObject * > & OptOList() const
static ALIbool getFirstTime()
static void dumpVS(const std::vector< ALIstring > &wl, const std::string &msg, std::ostream &outs=std::cout)
dumps a vector of strings with a message to outs
const ALIdouble * value() const
const ALIstring & type() const
void printStartCalculateSimulatedValue(const Measurement *meas)
const ALIstring & name() const
std::map< ALIstring, ALIdouble, std::less< ALIstring > > & GlobalOptions()