ROOTPWA
TCovEllipse.h
Go to the documentation of this file.
1 
2 //
3 // Copyright 2009 Sebastian Neubert
4 //
5 // This file is part of rootpwa
6 //
7 // rootpwa is free software: you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License as published by
9 // the Free Software Foundation, either version 3 of the License, or
10 // (at your option) any later version.
11 //
12 // rootpwa is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU General Public License for more details.
16 //
17 // You should have received a copy of the GNU General Public License
18 // along with rootpwa. If not, see <http://www.gnu.org/licenses/>.
19 //
21 //-----------------------------------------------------------
22 // File and Version Information:
23 // $Id$
24 //
25 // Description:
26 // A covariance ellipse
27 //
28 //
29 // Environment:
30 // Software developed for the PANDA Detector at FAIR.
31 //
32 // Author List:
33 // Sebastian Neubert TUM (original author)
34 //
35 //
36 //-----------------------------------------------------------
37 
38 #ifndef TCOVELLIPSE_HH
39 #define TCOVELLIPSE_HH
40 
41 // Base Class Headers ----------------
42 #include "TEllipse.h"
43 
44 // Collaborating Class Headers -------
45 #include "TMatrixT.h"
46 
47 // Collaborating Class Declarations --
48 
49 
50 
51 class TCovEllipse : public TEllipse{
52 public:
53 
54  // Constructors/Destructors ---------
55  TCovEllipse();
56  TCovEllipse(const TMatrixT<double>& cov,
57  double x0=0, double y0=0,
58  int i=0, int j=1);
59  virtual ~TCovEllipse(){}
60 
61  // Operators
62 
63 
64  // Accessors -----------------------
65  TMatrixT<double> getCov() const {return _cov;}
66 
67  // Modifiers -----------------------
68  void setCov(const TMatrixT<double>& cov);
69  void setMean(double x, double y);
70  void select(int i, int j){_i=i;_j=j;recalc();}
71 
72  // Operations ----------------------
73 
74 private:
75 
76  // Private Data Members ------------
77  TMatrixT<double> _cov;
78  double _sig;
79  double _x0;
80  double _y0;
81 
82  int _i,_j; // row and column index to be plotted
83 
84  // Private Methods -----------------
85  void recalc();
86 
87 public:
88  ClassDef(TCovEllipse,1)
89 
90 };
91 
92 #endif
93 
94 //--------------------------------------------------------------
95 // $Log$
96 //--------------------------------------------------------------