FairRoot/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 
23  public:
24  // polar coordinates
26  Rho = 0,
27  Theta = 1,
28  Phi = 2,
30  };
31 
33  C_Rho = 0,
34  C_Zeta = 1,
35  C_Phi = 2,
37  };
38  // argumentless constructor:
39  RhoVector3Err();
40 
41  // auto casting constructor
42  RhoVector3Err ( const TVector3& p );
43  RhoVector3Err ( const TVector3& p, const RhoError& covMat );
44 
45  // copy constructor:
46  RhoVector3Err ( const RhoVector3Err& v );
47 
48  // destructor MAY be needed later
49  virtual ~RhoVector3Err() {};
50 
51  // assignment operator:
53 
55 
57 
59 
60  RhoVector3Err& Transform ( const TRotation& rot );
61 
62  Double_t DetermineChisq ( const TVector3& refVector );
63  // returns Chisquare
64  // refVector refers to the same origin as the TVector3 of this
65  // ie refVector is not relative to this Vector
66 
67 
68  inline const RhoError& CovMatrix() const {
69  return fCovMatrix;
70  }
71 
72  //TError CovRTPMatrix() const;
73  // returns the covariance Matrix in spherical coordinate
74  // use PolarCoordinateIndex enum to get the components
75 
76  //TError CovRZPMatrix() const;
77  // returns the covariance Matrix in cylindrical coordinate
78  // use CylindricalCoordinateIndex enum to get the components
79 
80  inline void SetCovMatrix ( const RhoError& v ) {
81  fCovMatrix = v;
82  }
83 
84  // void printOn( std::ostream& o=std::cout ) const;
85 
86  private:
87 
89 
90  public:
91  ClassDef ( RhoVector3Err,1 ) // Add errors to a vector
92 };
93 
94 
96 
98 
99 std::ostream& operator<< ( std::ostream& stream, const RhoVector3Err& verr );
101 
102 #endif
RhoError fCovMatrix
Definition: RhoVector3Err.h:88
void SetCovMatrix(const RhoError &v)
Definition: RhoVector3Err.h:80
RhoVector3Err operator+(const RhoVector3Err &, const RhoVector3Err &)
RhoVector3Err & operator+=(const RhoVector3Err &v)
std::ostream & operator<<(std::ostream &stream, const RhoVector3Err &verr)
RhoVector3Err & operator-=(const RhoVector3Err &v)
__m128 v
Definition: P4_F32vec4.h:4
Double_t p
Definition: anasim.C:58
RhoVector3Err operator-(const RhoVector3Err &, const RhoVector3Err &)
Double_t DetermineChisq(const TVector3 &refVector)
RhoVector3Err & operator-()
Double_t
RhoVector3Err & operator=(const RhoVector3Err &v)
RhoVector3Err & Transform(const TRotation &rot)
std::istream & operator>>(std::istream &stream, RhoVector3Err &verr)
virtual ~RhoVector3Err()
Definition: RhoVector3Err.h:49
TGeoRotation rot
const RhoError & CovMatrix() const
Definition: RhoVector3Err.h:68