PandaRoot
RhoVector3Err.h
Go to the documentation of this file.
1 #ifndef RHOVECTORERR_H
2 #define RHOVECTORERR_H
3 // //
5 // RhoVectorErr //
6 // //
7 // Vector w/ error class //
8 // //
9 // Author: Marcel Kunze, RUB, Nov. 99 //
10 // Copyright (C) 1999-2001, Ruhr-University Bochum. //
11 // Ralf Kliemt, HIM/GSI Feb.2013 (Cleanup & Restructuring) //
12 // //
14 
15 #include <iostream>
16 
17 #include "RhoError.h"
18 #include "TRotation.h"
19 
20 class RhoVector3Err : public TVector3 {
21 
22  public:
23  // polar coordinates
24  enum PolarCoordinateIndex { Rho = 0, Theta = 1, Phi = 2, NUM_PCOORDINATES = 3 };
25 
27  // argumentless constructor:
28  RhoVector3Err();
29 
30  // auto casting constructor
31  RhoVector3Err(const TVector3 &p);
32  RhoVector3Err(const TVector3 &p, const RhoError &covMat);
33 
34  // copy constructor:
36 
37  // destructor MAY be needed later
38  virtual ~RhoVector3Err(){};
39 
40  // assignment operator:
42 
44 
46 
48 
49  RhoVector3Err &Transform(const TRotation &rot);
50 
51  Double_t DetermineChisq(const TVector3 &refVector);
52  // returns Chisquare
53  // refVector refers to the same origin as the TVector3 of this
54  // ie refVector is not relative to this Vector
55 
56  inline const RhoError &CovMatrix() const { return fCovMatrix; }
57 
58  // TError CovRTPMatrix() const;
59  // returns the covariance Matrix in spherical coordinate
60  // use PolarCoordinateIndex enum to get the components
61 
62  // TError CovRZPMatrix() const;
63  // returns the covariance Matrix in cylindrical coordinate
64  // use CylindricalCoordinateIndex enum to get the components
65 
66  inline void SetCovMatrix(const RhoError &v) { fCovMatrix = v; }
67 
68  // void printOn( std::ostream& o=std::cout ) const;
69 
70  private:
71  RhoError fCovMatrix;
72 
73  public:
74  ClassDef(RhoVector3Err, 1) // Add errors to a vector
75 };
76 
78 
80 
81 std::ostream &operator<<(std::ostream &stream, const RhoVector3Err &verr);
82 std::istream &operator>>(std::istream &stream, RhoVector3Err &verr);
83 
84 #endif
void SetCovMatrix(const RhoError &v)
Definition: RhoVector3Err.h:66
RhoVector3Err & operator=(const RhoVector3Err &v)
RhoVector3Err operator+(const RhoVector3Err &, const RhoVector3Err &)
std::ostream & operator<<(std::ostream &stream, const RhoVector3Err &verr)
__m128 v
Definition: P4_F32vec4.h:3
const RhoError & CovMatrix() const
Definition: RhoVector3Err.h:56
Double_t DetermineChisq(const TVector3 &refVector)
RhoVector3Err & operator+=(const RhoVector3Err &v)
RhoVector3Err & operator-=(const RhoVector3Err &v)
std::istream & operator>>(std::istream &stream, RhoVector3Err &verr)
RhoVector3Err & operator-()
virtual ~RhoVector3Err()
Definition: RhoVector3Err.h:38
RhoVector3Err & Transform(const TRotation &rot)