BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Reconstruction/MdcPatRec/MdcRecoUtil/include/MdcRecoUtil/BesPointErr.h
Go to the documentation of this file.
1//--------------------------------------------------------------------------
2// File and Version Information:
3// $Id: BesPointErr.h,v 1.4 2010/03/25 09:55:57 zhangy Exp $
4//
5// Description:
6// Endow a Point class with a covariance matrix
7//
8//
9// Environment:
10// Software developed for the BaBar Detector at the SLAC B-Factory.
11//
12// Author List:
13// Forest Rouse
14// Victoria Novotny
15// Ed Frank University of Penn., efrank@upenn5.hep.upenn.edu
16//
17// History
18// 14 Oct 96 Ed Frank Simple mod to make unary - compile under
19// native SunOS5 compiler.
20//
21// Copyright Information:
22// Copyright (C) 1996 U.C. Davis
23//
24// History:
25// Migration for BESIII MDC
26// Zhang Yao(zhangyao@ihep.ac.cn) Migrate to BESIII
27// Zhang Yao(zhangyao@ihep.ac.cn) Upgrade to CLHEP2.0.4.5 2010-03-25
28//
29//------------------------------------------------------------------------
30#ifndef BESPOINTERR_H
31#define BESPOINTERR_H
32
33#include "CLHEP/Geometry/Point3D.h"
34#include "CLHEP/Vector/Rotation.h"
35#include "MdcRecoUtil/BesError.h"
36#include "MdcRecoUtil/BesVectorErr.h"
37#ifndef ENABLE_BACKWARDS_COMPATIBILITY
38typedef HepGeom::Point3D<double> HepPoint3D;
39#endif
40
41using namespace CLHEP;
42
43class BesPointErr : public HepPoint3D {
44public:
45 enum PolarCoordinateIndex { Rho = 0, Theta = 1, Phi = 2, NUM_PCOORDINATES = 3 };
47 BesPointErr() : HepPoint3D(), _covMatrix( 3 ) {}
48 BesPointErr( const HepPoint3D& p ) : HepPoint3D( p ), _covMatrix( 3 ) {}
49 BesPointErr( const HepPoint3D& p, const BesError& covMat )
50 : HepPoint3D( p ), _covMatrix( 3 ) {
51 _covMatrix = covMat;
52 }
53
54 // new constructors for this class
55 BesPointErr( const BesPointErr& v ) : HepPoint3D(), _covMatrix( 3 ) { *this = v; }
56
57 double determineChisq( const HepPoint3D& diffPoint ) const {
58 HepVector temp( 3 );
59 temp[0] = diffPoint.x() - this->x();
60 temp[1] = diffPoint.y() - this->y();
61 temp[2] = diffPoint.z() - this->z();
62 return _covMatrix.determineChisq( temp );
63 }
64
66 // returns the covariance Matrix in spherical coordinate
67 // use PolarCoordinateIndex enum to get the components
69 // returns the covariance Matrix in cylindrical coordinate
70 // use CylindricalCoordinateIndex enum to get the components
71
72 inline const BesError& covMatrix() const { return _covMatrix; }
73 inline void setCovMatrix( const BesError& v ) { _covMatrix = v; }
74
75 // void printOn(ostream& out=cout) const;
76
77private:
78 BesError _covMatrix;
79};
80
82
84
86
88
89std::ostream& operator<<( std::ostream& stream, const BesPointErr& verr );
90std::istream& operator>>( std::istream& stream, BesPointErr& verr );
91
92#endif
HepGeom::Point3D< double > HepPoint3D
Double_t x[10]
**********Class see also m_nmax DOUBLE PRECISION m_amel DOUBLE PRECISION m_x2 DOUBLE PRECISION m_alfinv DOUBLE PRECISION m_Xenph INTEGER m_KeyWtm INTEGER m_idyfs DOUBLE PRECISION m_zini DOUBLE PRECISION m_q2 DOUBLE PRECISION m_Wt_KF DOUBLE PRECISION m_WtCut INTEGER m_KFfin *COMMON c_KarLud $ !Input CMS energy[GeV] $ !CMS energy after beam spread beam strahlung[GeV] $ !Beam energy spread[GeV] $ !z boost due to beam spread $ !electron beam mass *ff pair spectrum $ !minimum v
Definition KarLud.h:35
std::istream & operator>>(std::istream &stream, BesPointErr &verr)
BesPointErr operator+(const BesPointErr &, const BesVectorErr &)
BesPointErr operator-(const BesPointErr &, const BesVectorErr &)
std::ostream & operator<<(std::ostream &stream, const BesPointErr &verr)
BesError covRTPMatrix() const
BesPointErr(const HepPoint3D &p, const BesError &covMat)
double determineChisq(const HepPoint3D &diffPoint) const
BesError covRZPMatrix() const