BOSS 7.1.2
BESIII Offline Software System
Loading...
Searching...
No Matches
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::HepVector;
33using CLHEP::HepSymMatrix;
34
35#include <iosfwd>
36class DifArray;
37class DifNumber;
38
40
41public:
42
43 DifIndepPar(int n); // create slots for n parameters
44 DifIndepPar(const HepVector& a);// from a vector of doubles
45 DifIndepPar(const HepVector& pvec, 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
71//io
72inline std::ostream& operator<<(std::ostream& o,const DifIndepPar& i){ i.print(o); return o; }
73
74#endif
const Int_t n
std::ostream & operator<<(std::ostream &o, const DifIndepPar &i)
Definition DifIndepPar.h:72
DifIndepPar(int n)
const HepSymMatrix & covariance() const
Definition DifIndepPar.h:54
HepVector & parameter()
Definition DifIndepPar.h:51
const HepVector & parameter() const
Definition DifIndepPar.h:52
void print(std::ostream &os=std::cout) const
DifArray difParameters() const
HepSymMatrix & covariance()
Definition DifIndepPar.h:53
int nPar() const
Definition DifIndepPar.h:55
void printAll(std::ostream &os=std::cout) const
DifNumber difPar(int i) const