PandaRoot
RhoVector3Err.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
13 #ifndef RHOVECTORERR_H
14 #define RHOVECTORERR_H
15 // //
17 // RhoVectorErr //
18 // //
19 // Vector w/ error class //
20 // //
21 // Author: Marcel Kunze, RUB, Nov. 99 //
22 // Copyright (C) 1999-2001, Ruhr-University Bochum. //
23 // Ralf Kliemt, HIM/GSI Feb.2013 (Cleanup & Restructuring) //
24 // //
26 
27 #include <iostream>
28 
29 #include "RhoError.h"
30 #include "TRotation.h"
31 
32 class RhoVector3Err : public TVector3 {
33 
34  public:
35  // polar coordinates
36  enum PolarCoordinateIndex { Rho = 0, Theta = 1, Phi = 2, NUM_PCOORDINATES = 3 };
37 
39  // argumentless constructor:
40  RhoVector3Err();
41 
42  // auto casting constructor
43  RhoVector3Err(const TVector3 &p);
44  RhoVector3Err(const TVector3 &p, const RhoError &covMat);
45 
46  // copy constructor:
48 
49  // destructor MAY be needed later
50  virtual ~RhoVector3Err(){};
51 
52  // assignment operator:
54 
56 
58 
60 
61  RhoVector3Err &Transform(const TRotation &rot);
62 
63  Double_t DetermineChisq(const TVector3 &refVector);
64  // returns Chisquare
65  // refVector refers to the same origin as the TVector3 of this
66  // ie refVector is not relative to this Vector
67 
68  inline const RhoError &CovMatrix() const { return fCovMatrix; }
69 
70  // TError CovRTPMatrix() const;
71  // returns the covariance Matrix in spherical coordinate
72  // use PolarCoordinateIndex enum to get the components
73 
74  // TError CovRZPMatrix() const;
75  // returns the covariance Matrix in cylindrical coordinate
76  // use CylindricalCoordinateIndex enum to get the components
77 
78  inline void SetCovMatrix(const RhoError &v) { fCovMatrix = v; }
79 
80  // void printOn( std::ostream& o=std::cout ) const;
81 
82  private:
83  RhoError fCovMatrix;
84 
85  public:
86  ClassDef(RhoVector3Err, 1) // Add errors to a vector
87 };
88 
90 
92 
93 std::ostream &operator<<(std::ostream &stream, const RhoVector3Err &verr);
94 std::istream &operator>>(std::istream &stream, RhoVector3Err &verr);
95 
96 #endif
void SetCovMatrix(const RhoError &v)
Definition: RhoVector3Err.h:78
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:15
const RhoError & CovMatrix() const
Definition: RhoVector3Err.h:68
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:50
RhoVector3Err & Transform(const TRotation &rot)