BOSS
8.0.0
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 <Bob_Jacobsen@lbl.gov> or
27
// Forest Rouse <rouse@ucdhep.ucdavis.edu>
28
//
29
// =====================================================================
30
// Name Change description
31
// Date
32
// Version
33
// =====================================================================
34
// #include "BaBar/BaBar.h"
35
36
#include "MdcRecoUtil/BesPointErr.h"
37
#include "MdcRecoUtil/DifArray.h"
38
#include "MdcRecoUtil/DifNumber.h"
39
#include <float.h>
40
#include <stdio.h>
41
using
std::istream;
42
using
std::ostream;
43
44
BesPointErr
operator+
(
const
BesPointErr
&
v
,
const
BesVectorErr
&
w
) {
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
50
BesPointErr
operator+
(
const
BesVectorErr
&
w
,
const
BesPointErr
&
v
) {
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
56
BesPointErr
operator-
(
const
BesPointErr
&
v
,
const
BesVectorErr
&
w
) {
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
62
BesVectorErr
operator-
(
const
BesPointErr
&
v
,
const
BesPointErr
&
w
) {
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
68
ostream&
operator<<
( ostream& stream,
const
BesPointErr
& verr ) {
69
stream << (
const
HepPoint3D
&)verr <<
", "
<< verr.
covMatrix
();
70
71
return
stream;
72
}
73
74
istream&
operator>>
( istream& stream,
BesPointErr
& verr ) {
75
BesError
mat( verr.SIZE );
76
stream >> (
HepPoint3D
&)verr >> mat;
77
verr.
setCovMatrix
( mat );
78
79
return
stream;
80
}
81
82
BesError
BesPointErr::covRTPMatrix
()
const
{
83
// protect against 0's
84
double
xv =
x
() == 0 ? FLT_MIN :
x
();
85
double
yv = y() == 0 ? FLT_MIN : y();
86
double
zv = z() == 0 ? FLT_MIN : z();
87
DifNumber
xDF( xv, X + 1, 3 ), yDF( yv, Y + 1, 3 ), zDF( zv, Z + 1, 3 );
88
DifArray
pars( 3,
NUM_PCOORDINATES
);
89
pars[
Rho
] = sqrt( xDF * xDF + yDF * yDF + zDF * zDF );
90
pars[
Phi
] = atan2( yDF, xDF );
91
pars[
Theta
] = acos( zDF / pars[
Rho
] );
92
return
covMatrix
().
similarity
( pars.
jacobian
() );
93
}
94
95
BesError
BesPointErr::covRZPMatrix
()
const
{
96
// protect against 0's
97
double
xv =
x
() == 0 ? FLT_MIN :
x
();
98
double
yv = y() == 0 ? FLT_MIN : y();
99
double
zv = z() == 0 ? FLT_MIN : z();
100
DifNumber
xDF( xv, X + 1, 3 ), yDF( yv, Y + 1, 3 ), zDF( zv, Z + 1, 3 );
101
DifArray
pars( 3,
NUM_CCOORDINATES
);
102
pars[
C_Rho
] = sqrt( xDF * xDF + yDF * yDF );
103
pars[
C_Phi
] = atan2( yDF, xDF );
104
pars[
C_Zeta
] = zDF;
105
return
covMatrix
().
similarity
( pars.
jacobian
() );
106
}
operator<<
ostream & operator<<(ostream &stream, const BesPointErr &verr)
Definition
BesPointErr.cxx:68
operator+
BesPointErr operator+(const BesPointErr &v, const BesVectorErr &w)
Definition
BesPointErr.cxx:44
operator-
BesPointErr operator-(const BesPointErr &v, const BesVectorErr &w)
Definition
BesPointErr.cxx:56
operator>>
istream & operator>>(istream &stream, BesPointErr &verr)
Definition
BesPointErr.cxx:74
HepPoint3D
HepGeom::Point3D< double > HepPoint3D
Definition
CosmicGenerator.h:36
x
Double_t x[10]
Definition
DataBase/tau_mode.c:49
w
double w
Definition
EvtPhokharaDef.hh:28
v
**********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
Definition
InstallArea/x86_64-el9-gcc13-dbg/include/MdcRecoUtil/BesError.h:45
BesError::similarity
BesError similarity(const HepRotation &rot) const
Definition
BesError.cxx:49
BesPointErr
Definition
InstallArea/x86_64-el9-gcc13-dbg/include/MdcRecoUtil/BesPointErr.h:43
BesPointErr::covMatrix
const BesError & covMatrix() const
Definition
InstallArea/x86_64-el9-gcc13-dbg/include/MdcRecoUtil/BesPointErr.h:72
BesPointErr::covRTPMatrix
BesError covRTPMatrix() const
Definition
BesPointErr.cxx:82
BesPointErr::Phi
@ Phi
Definition
InstallArea/x86_64-el9-gcc13-dbg/include/MdcRecoUtil/BesPointErr.h:45
BesPointErr::Theta
@ Theta
Definition
InstallArea/x86_64-el9-gcc13-dbg/include/MdcRecoUtil/BesPointErr.h:45
BesPointErr::NUM_PCOORDINATES
@ NUM_PCOORDINATES
Definition
InstallArea/x86_64-el9-gcc13-dbg/include/MdcRecoUtil/BesPointErr.h:45
BesPointErr::Rho
@ Rho
Definition
InstallArea/x86_64-el9-gcc13-dbg/include/MdcRecoUtil/BesPointErr.h:45
BesPointErr::C_Phi
@ C_Phi
Definition
InstallArea/x86_64-el9-gcc13-dbg/include/MdcRecoUtil/BesPointErr.h:46
BesPointErr::C_Zeta
@ C_Zeta
Definition
InstallArea/x86_64-el9-gcc13-dbg/include/MdcRecoUtil/BesPointErr.h:46
BesPointErr::NUM_CCOORDINATES
@ NUM_CCOORDINATES
Definition
InstallArea/x86_64-el9-gcc13-dbg/include/MdcRecoUtil/BesPointErr.h:46
BesPointErr::C_Rho
@ C_Rho
Definition
InstallArea/x86_64-el9-gcc13-dbg/include/MdcRecoUtil/BesPointErr.h:46
BesPointErr::covRZPMatrix
BesError covRZPMatrix() const
Definition
BesPointErr.cxx:95
BesPointErr::setCovMatrix
void setCovMatrix(const BesError &v)
Definition
InstallArea/x86_64-el9-gcc13-dbg/include/MdcRecoUtil/BesPointErr.h:73
BesVectorErr
Definition
InstallArea/x86_64-el9-gcc13-dbg/include/MdcRecoUtil/BesVectorErr.h:38
DifArray
Definition
InstallArea/x86_64-el9-gcc13-dbg/include/MdcRecoUtil/DifArray.h:36
DifArray::jacobian
HepMatrix jacobian() const
Definition
DifArray.cxx:70
DifNumber
Definition
InstallArea/x86_64-el9-gcc13-dbg/include/MdcRecoUtil/DifNumber.h:41
8.0.0
BOSS_Source
Reconstruction
MdcPatRec
MdcRecoUtil
src
BesPointErr.cxx
Generated by
1.16.1