BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Reconstruction/MdcPatRec/MdcRecoUtil/include/MdcRecoUtil/BesVectorErr.h
Go to the documentation of this file.
1//--------------------------------------------------------------------------
2// File and Version Information:
3// $Id: BesVectorErr.h,v 1.5 2010/03/25 09:55:57 zhangy Exp $
4//
5// Description:
6// Add errors to a vector. Used for direction errors
7// BaBar native class
8//
9// Environment:
10// Software developed for the BaBar Detector at the SLAC B-Factory.
11//
12// Author List:
13// Forest Rouse February 1996
14// Victoria Novotny August 1996
15// Ed Frank University of Pennsylvania, efrank@upenn5.hep.upenn.edu
16//
17// History
18// 14 Oct 96 Ed Frank Simple mod to make unary - compile under
19// Sun's CC 4.0.1
20// 19 Jan 2002 Sasha Telnov Added operator * (scaling by a real number)
21//
22// Copyright Information:
23// Copyright (C) 1996
24//
25// History:
26// Migration for BESIII MDC
27//
28//------------------------------------------------------------------------
29#ifndef BESVECTORERR_H
30#define BESVECTORERR_H
31
32#include "CLHEP/Vector/Rotation.h"
33#include "MdcRecoUtil/BesError.h"
34#include <iosfwd>
35
36using namespace CLHEP;
37
38class BesVectorErr : public Hep3Vector {
39
40public:
41 // polar coordinates
42 enum PolarCoordinateIndex { Rho = 0, Theta = 1, Phi = 2, NUM_PCOORDINATES = 3 };
43
45 // argumentless constructor:
46 BesVectorErr() : Hep3Vector(), _covMatrix( NUM_COORDINATES ) {}
47
48 // auto casting constructor
49 BesVectorErr( const Hep3Vector& p ) : Hep3Vector( p ), _covMatrix( NUM_COORDINATES ) {}
50 BesVectorErr( const Hep3Vector& p, const BesError& covMat )
51 : Hep3Vector( p ), _covMatrix( NUM_COORDINATES ) {
52 _covMatrix = covMat;
53 }
54
55 // copy constructor:
56 BesVectorErr( const BesVectorErr& v ) : Hep3Vector( v ), _covMatrix( v.covMatrix() ) {}
57
58 // destructor MAY be needed later
59 // virtual ~BesVectorErr() {};
60
61 // assignment operator:
63 if ( this != &v )
64 {
65 Hep3Vector::operator=( v );
66 _covMatrix = v.covMatrix();
67 }
68 return *this;
69 }
70
72 Hep3Vector t = *this;
73 return BesVectorErr( -t, _covMatrix ); // _covMatrix remains unaltered
74 }
75
77 Hep3Vector::operator+=( v );
78 _covMatrix += v.covMatrix();
79 return *this;
80 }
81
83 Hep3Vector::operator-=( v );
84 _covMatrix += v.covMatrix();
85 return *this;
86 }
87 /*
88 BesVectorErr& transform(const HepTranslation& trans){
89 Hep3Vector::transform(trans);
90 return *this;
91 }
92
93 BesVectorErr& transform(const HepRotation& rot){
94 Hep3Vector::transform(rot);
95 _covMatrix = _covMatrix.similarity(rot);
96 return *this;
97 }
98
99 BesVectorErr& transform(const HepTransformation& transf){
100 Hep3Vector::transform(transf);
101 _covMatrix = _covMatrix.similarity(transf.rot_mat());
102 return *this;
103 }
104 */
105 double determineChisq( const Hep3Vector& refVector ) const;
106 // returns Chisquare
107 // refVector refers to the same origin as the Hep3Vector of this
108 // ie refVector is not relative to this Vector
109
110 inline const BesError& covMatrix() const { return _covMatrix; }
111
113 // returns the covariance Matrix in spherical coordinate
114 // use PolarCoordinateIndex enum to get the components
115
117 // returns the covariance Matrix in cylindrical coordinate
118 // use CylindricalCoordinateIndex enum to get the components
119
120 inline void setCovMatrix( const BesError& v ) { _covMatrix = v; }
121
122 // void printOn(ostream& out=cout) const;
123
124private:
125 BesError _covMatrix;
126};
127
129
131
132// Added by Sasha Telnov
133BesVectorErr operator*( const BesVectorErr&, double a );
134BesVectorErr operator*( double a, const BesVectorErr& );
135
136std::ostream& operator<<( std::ostream& stream, const BesVectorErr& verr );
137std::istream& operator>>( std::istream& stream, BesVectorErr& verr );
138
139#endif
**********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::ostream & operator<<(std::ostream &stream, const BesVectorErr &verr)
std::istream & operator>>(std::istream &stream, BesVectorErr &verr)
BesVectorErr operator+(const BesVectorErr &, const BesVectorErr &)
BesVectorErr operator-(const BesVectorErr &, const BesVectorErr &)
BesVectorErr operator*(const BesVectorErr &, double a)
BesError covRZPMatrix() const
BesVectorErr(const Hep3Vector &p, const BesError &covMat)
double determineChisq(const Hep3Vector &refVector) const
BesError covRTPMatrix() const
int t()
Definition t.c:1