BOSS 7.0.8
BESIII Offline Software System
Loading...
Searching...
No Matches
DifVector.cxx
Go to the documentation of this file.
1//--------------------------------------------------------------------------
2// File and Version Information:
3// $Id: DifVector.cxx,v 1.2 2009/12/23 02:59:56 zhangy Exp $
4//
5// Description:
6// Class Implementation for |DifVector|
7// What do i do ?
8// Environment:
9// Software developed for the BaBar Detector at the SLAC B-Factory.
10//
11// Author List:
12// A. Snyder
13//
14// Copyright Information:
15// Copyright (C) 1996 SLAC
16//
17// History:
18// Migration for BESIII MDC
19//
20//------------------------------------------------------------------------
21
24#include "CLHEP/Vector/ThreeVector.h"
25using std::cout;
26
27extern const DifVector xhat(1,0,0);
28extern const DifVector yhat(0,1,0);
29extern const DifVector zhat(0,0,1);
30extern const DifVector nullVec(0,0,0);
31
33 :x(0.0),y(0.0),z(0.0)
34{}
35
37(const DifNumber& X,const DifNumber& Y,const DifNumber& Z)
38 :x(X),y(Y),z(Z)
39{}
40
42(double X, double Y,double Z)
43 :x(X),y(Y),z(Z)
44{}
45
46DifVector::DifVector(const Hep3Vector& v)
47 :x(v.x()),y(v.y()),z(v.z())
48{}
49
51 :x(v.x),y(v.y),z(v.z)
52{}
53
54HepSymMatrix DifVector::errorMatrix(const HepSymMatrix& e)const {
55 HepSymMatrix temp(3);
56 temp(1,1)=correlation(x,x,e);
57 temp(1,2)=correlation(x,y,e);
58 temp(1,3)=correlation(x,z,e);
59 temp(2,2)=correlation(y,y,e);
60 temp(2,3)=correlation(y,z,e);
61 temp(3,3)=correlation(z,z,e);
62 return temp;
63}
64
65HepMatrix DifVector::jacobian()const{
66 int npar=x.nPar();
67 HepMatrix temp(3,npar);
68 for(int i=1; i<=npar; i++){
69 temp(1,i)=x.derivative(i);
70 temp(2,i)=y.derivative(i);
71 temp(3,i)=z.derivative(i);
72 } // (int i=1; i<=npar; i++)
73 return temp;
74}
75
77 r.rotate(*this); return *this;
78}
79
81 DifRotation(a,b,g).rotate(*this);
82 return *this;
83}
84
85void DifVector::print()const {
86 /*SKIP
87 cout << "x:" << x;
88 cout << "y:" << y;
89 cout << "z:" << z;
90 */
91 //yzhang TEMP
92 cout << "Yzhang::DifVector::print x,y,z SKIPED!\n";
93}
Double_t x[10]
double correlation(const DifNumber &a, const DifNumber &b)
Definition: DifNumber.cxx:72
const DifVector nullVec(0, 0, 0)
const DifVector xhat(1, 0, 0)
const DifVector yhat(0, 1, 0)
const DifVector zhat(0, 0, 1)
**********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 derivative(int i) const
Definition: DifNumber.h:90
int nPar() const
Definition: DifNumber.h:92
void rotate(DifVector &v) const
Definition: DifRotation.cxx:68
DifNumber y
Definition: DifVector.h:149
DifNumber x
Definition: DifVector.h:148
DifNumber z
Definition: DifVector.h:150
DifNumber r() const
DifVector & rotate(const DifVector &axis, const DifNumber &angle)
HepSymMatrix errorMatrix(const HepSymMatrix &e) const
Definition: DifVector.cxx:54
HepMatrix jacobian() const
Definition: DifVector.cxx:65
void print() const
Definition: DifVector.cxx:85
double y[1000]
const double b
Definition: slope.cxx:9