PandaRoot
RhoLorentzVectorErr.h
Go to the documentation of this file.
1 #ifndef RHOLORENTZVECTORERR_H
2 #define RHOLORENTZVECTORERR_H
3 // //
5 // RhoLorentzVectorErr //
6 // //
7 // LorentzVector w/ error //
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 class RhoVector3Err;
16 
17 #include <iostream>
18 
19 #include "RhoError.h"
20 #include "TLorentzVector.h"
21 #include "TLorentzRotation.h"
22 
23 class RhoLorentzVectorErr : public TLorentzVector {
24  public:
25  enum MPolarCoordinateIndex { Mom = 0, Theta = 1, Phi = 2, Mass = 3, NUM_MPCOORDINATES = 4 };
26  enum EPolarCoordinateIndex { Energy = 0, ETheta = 1, EPhi = 2, EMom = 3, NUM_EPCOORDINATES = 4 };
27  // argumentless constructor:
29 
30  // auto casting constructor
31  RhoLorentzVectorErr(const TLorentzVector &p);
32 
33  RhoLorentzVectorErr(const TLorentzVector &p, const RhoError &covMat);
34 
35  // Useful constructor for tracks:
36  RhoLorentzVectorErr(const RhoVector3Err &p3, Double_t mass);
37 
38  // copy constructor
40 
41  // destructor MAY be needed later
43  {
44  if (fCovMatrix)
45  delete fCovMatrix;
46  }
47 
48  // assignment operator:
50 
51  // mathematical modifiers:
53 
55 
57 
58  // can't implement this since there is no
59  // TLorentzVector::transform(const HepTranslation):
60  //
61  // RhoLorentzVectorErr& transform(const HepTranslation& trans){
62  // TLorentzVector::transform(trans);
63  // return *this;
64  // }
65 
66  RhoLorentzVectorErr &Transform(const TRotation &rot);
67 
68  RhoLorentzVectorErr &Transform(const TLorentzRotation &rot);
69 
70  // can't implement this since there is no
71  // TLorentzVector::transform(const HepTransformation):
72  //
73  // RhoLorentzVectorErr& transform(const HepTransformation& transf){
74  // TLorentzVector::transform(transf);
75  // fCovMatrix = fCovMatrix.similarity(transf.rot_mat());
76  // return *this;
77  // }
78 
79  Double_t DetermineChisq(const TLorentzVector &refVector);
80  // returns Chisquare
81  // refVector refers to the same origin as the LorentzVector of this
82  // ie refVector is not relative to this Vector
83 
84  // TError covMRTPMatrix() const;
85  // returns the covariance Matrix in spherical coordinate and mass
86  // use MPolarCoordinateIndex enum to get the components
87  // TError covETPRMatrix() const;
88  // returns the covariance Matrix in spherical coordinate and mass
89  // use EPolarCoordinateIndex enum to get the components
90  // note: it is different from the others because of the different EMC convention
91 
92  inline const RhoError &CovMatrix() const { return *fCovMatrix; }
93  inline void SetCovMatrix(const RhoError &v)
94  {
95  if (fCovMatrix)
96  delete fCovMatrix;
97  fCovMatrix = new RhoError(v);
98  }
99 
100  void PrintOn(std::ostream &o = std::cout) const;
101 
102  private:
103  RhoError *fCovMatrix;
104 
105  public:
106  ClassDef(RhoLorentzVectorErr, 1) // Add errors to a LorentzVector
107 };
108 
109 // globals:
111 
113 
114 std::ostream &operator<<(std::ostream &stream, const RhoLorentzVectorErr &verr);
115 
116 #endif
RhoLorentzVectorErr & operator-=(const RhoLorentzVectorErr &v)
void PrintOn(std::ostream &o=std::cout) const
const RhoError & CovMatrix() const
RhoLorentzVectorErr & operator+=(const RhoLorentzVectorErr &v)
std::ostream & operator<<(std::ostream &stream, const RhoLorentzVectorErr &verr)
RhoLorentzVectorErr operator+(const RhoLorentzVectorErr &, const RhoLorentzVectorErr &)
__m128 v
Definition: P4_F32vec4.h:3
RhoLorentzVectorErr & Transform(const TRotation &rot)
void SetCovMatrix(const RhoError &v)
RhoLorentzVectorErr & operator=(const RhoLorentzVectorErr &v)
Double_t DetermineChisq(const TLorentzVector &refVector)
RhoLorentzVectorErr & operator-()