//=========================================================================
// fill vertex stuff
//=========================================================================
StatusCode TupleToolGeometry::fillVertex( const LHCb::VertexBase* vtx,
                                          const std::string& vtx_name,
                                          Tuples::Tuple& tuple ) const
{
  bool test = true ;

  // decay vertex information:
  if ( !vtx )
  {
    Gaudi::XYZPoint pt(-999.,-999.,-999.) ; // arbitrary point
    test &= tuple->column(  vtx_name+"_", pt );
    test &= tuple->column(  vtx_name + "_XERR", -999. );
    test &= tuple->column(  vtx_name + "_YERR", -999. );
    test &= tuple->column(  vtx_name + "_ZERR", -999. );
    test &= tuple->column(  vtx_name + "_CHI2", -999. );
    test &= tuple->column(  vtx_name + "_NDOF", -1 );
    test &= tuple->matrix(  vtx_name + "_COV_", Gaudi::SymMatrix3x3()  );
  }
  else
  {
    test &= tuple->column( vtx_name+"_", vtx->position() );
    const Gaudi::SymMatrix3x3 & m = vtx->covMatrix ();
    test &= tuple->column(  vtx_name + "_XERR", std::sqrt( m(0,0) ) );
    test &= tuple->column(  vtx_name + "_YERR", std::sqrt( m(1,1) ) );
    test &= tuple->column(  vtx_name + "_ZERR", std::sqrt( m(2,2) ) );
    test &= tuple->column(  vtx_name + "_CHI2", vtx->chi2() );
    test &= tuple->column(  vtx_name + "_NDOF", vtx->nDoF() );
    test &= tuple->matrix(  vtx_name + "_COV_", m );
  }

  // --------------------------------------------------
  if (!test) Warning("Error in fillVertex "+vtx_name,1).ignore();
  return StatusCode(test) ;

}
Beispiel #2
0
// ============================================================================
StatusCode GaudiPython::TupleDecorator::matrix
( const Tuples::Tuple&       tuple ,
  const std::string&         name  ,
  const Gaudi::SymMatrix9x9& data  )
{
  if ( !tuple.valid() ) { return StatusCode::FAILURE ; }
  return tuple->matrix ( name , data ) ;
}
Beispiel #3
0
// ============================================================================
StatusCode GaudiPython::TupleDecorator::matrix
( const Tuples::Tuple&            tuple ,
  const std::string&              name   ,
  const CLHEP::HepGenMatrix&      data  )
{
  if ( !tuple.valid() ) { return StatusCode::FAILURE ; }
  if ( 1 > data.num_col()   )
  { return tuple ->
      Error  ("GP:matrix(2): illegal fixed matrix num_col" ) ; }
  if ( 1 > data.num_row()   )
  { return tuple ->
      Error  ("GP:matrix(2): illegal fixed matrix num_row" ) ; }
  return tuple->matrix( name , data , data.num_row() , data.num_col() ) ;
}