本文整理汇总了C++中Measurement::set_position方法的典型用法代码示例。如果您正苦于以下问题:C++ Measurement::set_position方法的具体用法?C++ Measurement::set_position怎么用?C++ Measurement::set_position使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Measurement
的用法示例。
在下文中一共展示了Measurement::set_position方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getMeasurement
Measurement* getMeasurement(bhep::hit& hit)
{
EVector hit_pos(2,0);
EVector meas_pos(3,0);
meas_pos[0] = hit.x()[0];
meas_pos[1] = hit.x()[1];
meas_pos[2] = hit.x()[2];
hit_pos[0] = meas_pos[0];
hit_pos[1] = meas_pos[1];
//covariance and meastype hardwired for now.
EMatrix cov(2,2,0);
cov[0][0] = 1.; cov[1][1] = 1.;
string meastype = "xy";
Measurement* me = new Measurement();
me->set_name(meastype);
me->set_hv(HyperVector(hit_pos,cov));
me->set_name("volume", "Detector");
me->set_position( meas_pos );
//Add the hit energy deposit as a key to the Measurement.
const dict::Key Edep = "E_dep";
const dict::Key EdepVal = hit.data("E_dep");
me->set_name(Edep, EdepVal);
return me;
}
示例2:
Entity::Entity()
{
Measurement m;
m.set_position(Eigen::Vector2d(-1,-1));
this->init(-1,m);
}