当前位置: 首页>>代码示例>>C++>>正文


C++ Trajectory::quality方法代码示例

本文整理汇总了C++中Trajectory::quality方法的典型用法代码示例。如果您正苦于以下问题:C++ Trajectory::quality方法的具体用法?C++ Trajectory::quality怎么用?C++ Trajectory::quality使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Trajectory的用法示例。


在下文中一共展示了Trajectory::quality方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: ComputeSeed

//*************************************************************
void fitter::ComputeSeed(const Trajectory& traj, State& seedState, int firsthit) {
  //*************************************************************

  _m.message("+++ computeSeed function ++++",bhep::VERBOSE);

  //use position slightly offset from first meas as seed 
  ///_lastIso is the total no of candidate muon hits inside Traj in free section 
  
  if ( (double)(traj.quality("lastIso"))/(double)traj.size() > _min_iso_prop )
    firsthit = (int)traj.size() - (int)(traj.quality("lastIso"));

  EVector v(6,0), v2(1,0);
  EMatrix C(6,6,0), C2(1,1,0);
    
  // take the position from the first hit
  v[0] = traj.nodes()[firsthit]->measurement().position()[0];
  v[1] = traj.nodes()[firsthit]->measurement().position()[1];
  v[2] = traj.nodes()[firsthit]->measurement().position()[2];   

  // Estime the momentum from range
  ComputeMomFromRange( traj, (int)traj.size(), firsthit, v);

  double pSeed;
  double wFe = _geom.get_Fe_prop();
  //Approximate p from plot of p vs. no. hits, then approx. de_dx from this.
  if (v[5] == 0) { //pSeed = (double)(0.060*traj.nmeas())*bhep::GeV;
    pSeed = (13300-11200*wFe) + (-128+190*wFe)*(double)traj.size();
    v[5] = 1.0/pSeed;
  }
  
  // But use a larger covariance matrix
  // diagonal covariance matrix
  C[0][0] = C[1][1] = 9.*cm*cm;
  C[2][2] = EGeo::zero_cov()/2;
  C[3][3] = C[4][4] = 1.;
  C[5][5] = pow(v[5],2)*3;
  
  // seedState.set_name(RP::particle_helix);
  seedState.set_name(RP::representation,RP::slopes_curv_z);
  
  v2[0] = 1;
  seedState.set_hv(RP::sense,HyperVector(v2,C2,RP::x));
  seedState.set_hv(HyperVector(v,C,RP::slopes_curv_z));

  _m.message("++ Seed estate after setSeed() in fitter:",seedState,bhep::VERBOSE);
}
开发者ID:sonia3994,项目名称:SaRoMaN,代码行数:47,代码来源:fitter.cpp

示例2: CheckQuality

//*************************************************************
bool fitter::CheckQuality(const Trajectory& traj){
  //*************************************************************
    
  bool ok = true;
    
  if (traj.quality()>_chi2fit_max) ok=false;
       
  return ok;

}
开发者ID:sonia3994,项目名称:SaRoMaN,代码行数:11,代码来源:fitter.cpp


注:本文中的Trajectory::quality方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。