BOSS 8.0.0
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"
14#include "TrkBase/TrkExchangePar.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 || pcov.num_row() != _nneutprm )
26 {
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, double n_tanDip,
37 double n_s0 )
38 : //------------------------------------------------------------------------
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// Copy constructor
49//------------------------------------------------------------------------
51 : //------------------------------------------------------------------------
52 TrkParams( old ) {}
53//------------------------------------------------------------------------
54double NeutParams::sinPhi0() const {
55 //------------------------------------------------------------------------
56 return sin( parameter()[_phi0] );
57}
58
59//------------------------------------------------------------------------
60double NeutParams::cosPhi0() const {
61 //------------------------------------------------------------------------
62 return cos( parameter()[_phi0] );
63}
64
65//------------------------------------------------------------------------
66double NeutParams::arcRatio() const {
67 //------------------------------------------------------------------------
68 return sqrt( 1. + parameter()[_tanDip] * parameter()[_tanDip] );
69}
70
71//------------------------------------------------------------------------
73//------------------------------------------------------------------------
double sinPhi0() const
NeutParams(const HepVector &, const HepSymMatrix &)
double arcRatio() const
double cosPhi0() const
TrkParams(int nParam)
Definition TrkParams.cxx:21