コード例 #1
0
ファイル: fitter.cpp プロジェクト: sonia3994/SaRoMaN
//*************************************************************
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);
}
コード例 #2
0
ファイル: fitter.cpp プロジェクト: sonia3994/SaRoMaN
//*************************************************************
bool fitter::CheckQuality(const Trajectory& traj){
  //*************************************************************
    
  bool ok = true;
    
  if (traj.quality()>_chi2fit_max) ok=false;
       
  return ok;

}