BOSS 7.1.2
BESIII Offline Software System
Loading...
Searching...
No Matches
BesPointErr.cxx
Go to the documentation of this file.
1//--------------------------------------------------------------------------
2// File and Version Information:
3// $Id: BesPointErr.cxx,v 1.2 2009/12/23 02:59:56 zhangy Exp $
4//
5// Description:
6// Class BbrPointErr
7//
8// Environment:
9// Software developed for the BaBar Detector at the SLAC B-Factory.
10//
11// Author List:
12// Forest Rouse February 1996
13// Victoria Novotny August 1996
14//
15// Copyright Information:
16// Copyright (C) 1996 U.C. Davis
17//
18// History:
19// Migration for BESIII MDC
20//
21//------------------------------------------------------------------------
22// File BbrPointErr.cc
23// Source file for class BbrPointErr
24//
25// For advice, input, or any questions then please contact either
26// Bob Jacobsen <[email protected]> or
27// Forest Rouse <[email protected]>
28//
29// =====================================================================
30// Name Change description
31// Date
32// Version
33// =====================================================================
34//#include "BaBar/BaBar.h"
35
36#include <stdio.h>
37#include <float.h>
41using std::istream;
42using std::ostream;
43
45 BesPointErr pe(HepPoint3D(v.x()+w.x(),v.y()+w.y(),v.z()+w.z()),
46 (v.covMatrix()+w.covMatrix()));
47 return pe;
48 }
49
51 BesPointErr pe(HepPoint3D(v.x()+w.x(),v.y()+w.y(),v.z()+w.z()),
52 (v.covMatrix()+w.covMatrix()));
53 return pe;
54}
55
57 BesPointErr pe(HepPoint3D(v.x()-w.x(),v.y()-w.y(),v.z()-w.z()),
58 (v.covMatrix()+w.covMatrix()));
59 return pe;
60}
61
63 BesVectorErr ve(Hep3Vector(v.x()-w.x(),v.y()-w.y(),v.z()-w.z()),
64 (v.covMatrix()+w.covMatrix()));
65 return ve;
66}
67
68ostream & operator<<(ostream & stream, const BesPointErr & verr) {
69 stream << (const HepPoint3D&)verr
70 << ", " << verr.covMatrix();
71
72 return stream;
73}
74
75istream & operator>>(istream & stream, BesPointErr & verr) {
76 BesError mat(verr.SIZE);
77 stream >> (HepPoint3D&)verr >> mat;
78 verr.setCovMatrix(mat);
79
80 return stream;
81}
82
84 // protect against 0's
85 double xv = x()==0 ? FLT_MIN : x();
86 double yv = y()==0 ? FLT_MIN : y();
87 double zv = z()==0 ? FLT_MIN : z();
88 DifNumber xDF(xv,X+1,3), yDF(yv,Y+1,3), zDF(zv,Z+1,3);
90 pars[Rho] = sqrt(xDF*xDF + yDF*yDF + zDF*zDF);
91 pars[Phi] = atan2(yDF,xDF);
92 pars[Theta] = acos(zDF/pars[Rho]);
93 return covMatrix().similarity(pars.jacobian());
94}
95
97 // protect against 0's
98 double xv = x()==0 ? FLT_MIN : x();
99 double yv = y()==0 ? FLT_MIN : y();
100 double zv = z()==0 ? FLT_MIN : z();
101 DifNumber xDF(xv,X+1,3), yDF(yv,Y+1,3), zDF(zv,Z+1,3);
103 pars[C_Rho] = sqrt(xDF*xDF + yDF*yDF );
104 pars[C_Phi] = atan2(yDF,xDF);
105 pars[C_Zeta] = zDF;
106 return covMatrix().similarity(pars.jacobian());
107}
108
ostream & operator<<(ostream &stream, const BesPointErr &verr)
BesPointErr operator+(const BesPointErr &v, const BesVectorErr &w)
BesPointErr operator-(const BesPointErr &v, const BesVectorErr &w)
istream & operator>>(istream &stream, BesPointErr &verr)
Double_t x[10]
double w
HepGeom::Point3D< double > HepPoint3D
Definition Gam4pikp.cxx:37
**********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
BesError similarity(const HepRotation &rot) const
Definition BesError.cxx:51
const BesError & covMatrix() const
Definition BesPointErr.h:84
BesError covRTPMatrix() const
BesError covRZPMatrix() const
void setCovMatrix(const BesError &v)
Definition BesPointErr.h:85
HepMatrix jacobian() const
Definition DifArray.cxx:72
double y[1000]