BOSS 6.6.4.p03
BESIII Offline Software System
Loading...
Searching...
No Matches
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., [email protected]
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([email protected]) Migrate to BESIII
27// Zhang Yao([email protected]) Upgrade to CLHEP2.0.4.5 2010-03-25
28//
29//------------------------------------------------------------------------
30#ifndef BESPOINTERR_H
31#define BESPOINTERR_H
32
35#include "CLHEP/Vector/Rotation.h"
36#include "CLHEP/Geometry/Point3D.h"
37#ifndef ENABLE_BACKWARDS_COMPATIBILITY
39#endif
40
41using namespace CLHEP;
42
43
44class BesPointErr : public HepPoint3D
45{
46 public:
48 Rho = 0,
49 Theta = 1,
50 Phi = 2,
52 };
54 C_Rho = 0,
55 C_Zeta = 1,
56 C_Phi = 2,
58 };
59 BesPointErr() : HepPoint3D(), _covMatrix(3) {}
61 _covMatrix(3) {}
62 BesPointErr(const HepPoint3D &p, const BesError& covMat) : HepPoint3D(p),
63 _covMatrix(3) { _covMatrix=covMat; }
64
65 // new constructors for this class
66 BesPointErr(const BesPointErr& v) : HepPoint3D(),_covMatrix(3) {*this = v;}
67
68 double determineChisq(const HepPoint3D& diffPoint) const
69 {
70 HepVector temp(3);
71 temp[0] = diffPoint.x()-this->x();
72 temp[1] = diffPoint.y()-this->y();
73 temp[2] = diffPoint.z()-this->z();
74 return _covMatrix.determineChisq(temp);
75 }
76
77 BesError covRTPMatrix() const;
78 // returns the covariance Matrix in spherical coordinate
79 // use PolarCoordinateIndex enum to get the components
80 BesError covRZPMatrix() const;
81 // returns the covariance Matrix in cylindrical coordinate
82 // use CylindricalCoordinateIndex enum to get the components
83
84 inline const BesError& covMatrix() const { return _covMatrix; }
85 inline void setCovMatrix(const BesError& v) { _covMatrix = v; }
86
87 // void printOn(ostream& out=cout) const;
88
89 private:
90
91 BesError _covMatrix;
92};
93
95
97
99
101
102std::ostream & operator<<(std::ostream & stream, const BesPointErr & verr);
103std::istream & operator>>(std::istream & stream, BesPointErr & verr);
104
105
106#endif
107
108
109
110
111
HepGeom::Point3D< double > HepPoint3D
Definition: BesPointErr.h:38
std::istream & operator>>(std::istream &stream, BesPointErr &verr)
BesPointErr operator+(const BesPointErr &, const BesVectorErr &)
Definition: BesPointErr.cxx:44
BesPointErr operator-(const BesPointErr &, const BesVectorErr &)
Definition: BesPointErr.cxx:56
std::ostream & operator<<(std::ostream &stream, const BesPointErr &verr)
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
double determineChisq(const HepVector &diff) const
Definition: BesError.cxx:109
BesPointErr(const HepPoint3D &p)
Definition: BesPointErr.h:60
const BesError & covMatrix() const
Definition: BesPointErr.h:84
BesError covRTPMatrix() const
Definition: BesPointErr.cxx:83
@ NUM_PCOORDINATES
Definition: BesPointErr.h:51
BesPointErr(const HepPoint3D &p, const BesError &covMat)
Definition: BesPointErr.h:62
BesPointErr(const BesPointErr &v)
Definition: BesPointErr.h:66
CylindricalCoordinateIndex
Definition: BesPointErr.h:53
@ NUM_CCOORDINATES
Definition: BesPointErr.h:57
double determineChisq(const HepPoint3D &diffPoint) const
Definition: BesPointErr.h:68
BesError covRZPMatrix() const
Definition: BesPointErr.cxx:96
void setCovMatrix(const BesError &v)
Definition: BesPointErr.h:85