BOSS 7.0.6
BESIII Offline Software System
Loading...
Searching...
No Matches
NeutParams.cxx
Go to the documentation of this file.
1//--------------------------------------------------------------------------
2//
3// Description:
4// Code for the NeutParams neutral track parameterization class
5//
6// Environment:
7// Software developed for the BaBar Detector at the SLAC B-Factory.
8//
9// Author(s): Justin Albert, Valery Miftahov (based on HelixParams.cc by
10// Dave Brown)
11//
12//------------------------------------------------------------------------
13#include "TrkBase/NeutParams.h"
15#include <iostream>
16using namespace std;
17// construct from vector and covariance matrix
18//------------------------------------------------------------------------
19NeutParams::NeutParams(const HepVector& pvec,const HepSymMatrix& pcov) :
20 TrkParams(pvec,pcov){
21//------------------------------------------------------------------------
22
23// Make sure the dimensions of the input matrix and vector are correct
24
25 if( pvec.num_row() != _nneutprm ||
26 pcov.num_row() != _nneutprm ){
27 cout<<"ErrMsg(error)" <<
28 "NeutParams: incorrect constructor vector/matrix dimension" << endl;
29 parameter() = HepVector(_nneutprm,0);
30 covariance() = HepSymMatrix(_nneutprm,0);
31 }
32}
33
34// Construct from the fit parameters directly
35//------------------------------------------------------------------------
36NeutParams::NeutParams(double n_d0,double n_phi0,double n_p,double n_z0,
37 double n_tanDip,double n_s0) :
38//------------------------------------------------------------------------
39 TrkParams(_nneutprm) {
40 d0() = n_d0;
41 phi0() = n_phi0;
42 p() = n_p;
43 z0() = n_z0;
44 s0() = n_s0;
45 tanDip() = n_tanDip;
46}
47
48
49// Copy constructor
50//------------------------------------------------------------------------
52//------------------------------------------------------------------------
53 TrkParams(old){
54}
55//------------------------------------------------------------------------
56double
58//------------------------------------------------------------------------
59 return sin(parameter()[_phi0]);
60}
61
62//------------------------------------------------------------------------
63double
65//------------------------------------------------------------------------
66 return cos(parameter()[_phi0]);
67}
68
69//------------------------------------------------------------------------
70double
72//------------------------------------------------------------------------
73 return sqrt(1. + parameter()[_tanDip] * parameter()[_tanDip]);
74}
75
76//------------------------------------------------------------------------
78{}
79//------------------------------------------------------------------------
80
double sin(const BesAngle a)
Definition: BesAngle.h:210
double cos(const BesAngle a)
Definition: BesAngle.h:213
HepVector & parameter()
Definition: DifIndepPar.h:51
double sinPhi0() const
Definition: NeutParams.cxx:57
double & s0()
Definition: NeutParams.h:42
NeutParams(const HepVector &, const HepSymMatrix &)
Definition: NeutParams.cxx:19
double arcRatio() const
Definition: NeutParams.cxx:71
double cosPhi0() const
Definition: NeutParams.cxx:64
double & phi0()
Definition: NeutParams.h:38
double & z0()
Definition: NeutParams.h:40
double & tanDip()
Definition: NeutParams.h:41
double & p()
Definition: NeutParams.h:39
double & d0()
Definition: NeutParams.h:37
HepSymMatrix & covariance()
Definition: TrkParams.h:54