BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Reconstruction/MdcPatRec/MdcRecoUtil/include/MdcRecoUtil/DifIndepPar.h
Go to the documentation of this file.
1//--------------------------------------------------------------------------
2// File and Version Information:
3// $Id: DifIndepPar.h,v 1.3 2009/12/23 02:59:56 zhangy Exp $
4//
5// Description:
6// Class Header for |DifIndepPar|
7// Container class for a set of independ parameters
8//
9// Environment:
10// Software developed for the BaBar Detector at the SLAC B-Factory.
11//
12// Author List:
13// A. Snyder
14//
15// Copyright Information:
16// Copyright (C) 1996 SLAC
17//
18// History:
19// Migration for BESIII MDC
20//
21//------------------------------------------------------------------------
22
23#ifndef DifIndepPar_HH
24#define DifIndepPar_HH
25
26// #include "BaBar/BaBar.hh"
27#include <assert.h>
28#include <stdlib.h>
29
30#include "CLHEP/Matrix/SymMatrix.h"
31#include "CLHEP/Matrix/Vector.h"
32using CLHEP::HepSymMatrix;
33using CLHEP::HepVector;
34
35#include <iosfwd>
36class DifArray;
37class DifNumber;
38
39class DifIndepPar {
40
41public:
42 DifIndepPar( int n ); // create slots for n parameters
43 DifIndepPar( const HepVector& a ); // from a vector of doubles
44 DifIndepPar( const HepVector& pvec,
45 const HepSymMatrix& pcov ); // from a vector and an error matrix
46 DifIndepPar( const DifIndepPar& rhs ); // new set via copy of existing set
47
48 DifArray difParameters() const; // return (by copy) array of indep parameters
49 DifNumber difPar( int i ) const; // fetch parameter i
50
51 HepVector& parameter() { return parvec; }
52 const HepVector& parameter() const { return parvec; }
53 HepSymMatrix& covariance() { return parcov; }
54 const HepSymMatrix& covariance() const { return parcov; }
55 int nPar() const { return parvec.num_row(); }
56
57 // io
58 void print( std::ostream& os = std::cout ) const;
59 void printAll( std::ostream& os = std::cout ) const;
60
61private:
62 // data
63 HepVector parvec; // Vector of parameters
64 HepSymMatrix parcov; // Covariance matrix on the parameters
65
66 // private functions
67 // void setDerives(); // make numbers point at this
68};
69
70// io
71inline std::ostream& operator<<( std::ostream& o, const DifIndepPar& i ) {
72 i.print( o );
73 return o;
74}
75
76#endif
const Int_t n
std::ostream & operator<<(std::ostream &o, const DifIndepPar &i)
DifIndepPar(int n)
void print(std::ostream &os=std::cout) const
DifIndepPar(const DifIndepPar &rhs)
DifArray difParameters() const
DifIndepPar(const HepVector &pvec, const HepSymMatrix &pcov)
DifIndepPar(const HepVector &a)
void printAll(std::ostream &os=std::cout) const
DifNumber difPar(int i) const