FairRoot/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 {
25  public:
27  Mom = 0,
28  Theta = 1,
29  Phi = 2,
30  Mass = 3,
32  };
34  Energy = 0,
35  ETheta = 1,
36  EPhi = 2,
37  EMom = 3,
39  };
40  // argumentless constructor:
42 
43  // auto casting constructor
44  RhoLorentzVectorErr ( const TLorentzVector& p );
45 
46  RhoLorentzVectorErr ( const TLorentzVector& p, const RhoError& covMat );
47 
48  // Useful constructor for tracks:
49  RhoLorentzVectorErr ( const RhoVector3Err& p3, Double_t mass );
50 
51  // copy constructor
53 
54  // destructor MAY be needed later
56  if(fCovMatrix)delete fCovMatrix;
57  }
58 
59  // assignment operator:
61 
62  // mathematical modifiers:
64 
66 
68 
69  // can't implement this since there is no
70  // TLorentzVector::transform(const HepTranslation):
71  //
72  // RhoLorentzVectorErr& transform(const HepTranslation& trans){
73  // TLorentzVector::transform(trans);
74  // return *this;
75  // }
76 
77  RhoLorentzVectorErr& Transform ( const TRotation& rot );
78 
79  RhoLorentzVectorErr& Transform ( const TLorentzRotation& rot );
80 
81  // can't implement this since there is no
82  // TLorentzVector::transform(const HepTransformation):
83  //
84  // RhoLorentzVectorErr& transform(const HepTransformation& transf){
85  // TLorentzVector::transform(transf);
86  // fCovMatrix = fCovMatrix.similarity(transf.rot_mat());
87  // return *this;
88  // }
89 
90  Double_t DetermineChisq ( const TLorentzVector& refVector );
91  // returns Chisquare
92  // refVector refers to the same origin as the LorentzVector of this
93  // ie refVector is not relative to this Vector
94 
95  //TError covMRTPMatrix() const;
96  // returns the covariance Matrix in spherical coordinate and mass
97  // use MPolarCoordinateIndex enum to get the components
98  //TError covETPRMatrix() const;
99  // returns the covariance Matrix in spherical coordinate and mass
100  // use EPolarCoordinateIndex enum to get the components
101  // note: it is different from the others because of the different EMC convention
102 
103  inline const RhoError& CovMatrix() const {
104  return *fCovMatrix;
105  }
106  inline void SetCovMatrix ( const RhoError& v ) {
107  if(fCovMatrix)delete fCovMatrix;
108  fCovMatrix = new RhoError ( v );
109  }
110 
111  void PrintOn ( std::ostream& o=std::cout ) const;
112 
113  private:
114 
116 
117  public:
118  ClassDef ( RhoLorentzVectorErr,1 ) // Add errors to a LorentzVector
119 };
120 
121 // globals:
123  const RhoLorentzVectorErr& );
124 
126  const RhoLorentzVectorErr& );
127 
129 
130 #endif
const RhoError & CovMatrix() const
RhoLorentzVectorErr & operator-()
std::ostream & operator<<(std::ostream &stream, const RhoLorentzVectorErr &verr)
RhoLorentzVectorErr operator+(const RhoLorentzVectorErr &, const RhoLorentzVectorErr &)
__m128 v
Definition: P4_F32vec4.h:4
Double_t p
Definition: anasim.C:58
void PrintOn(std::ostream &o=std::cout) const
Double_t
RhoLorentzVectorErr & operator-=(const RhoLorentzVectorErr &v)
RhoLorentzVectorErr & Transform(const TRotation &rot)
RhoLorentzVectorErr & operator=(const RhoLorentzVectorErr &v)
void SetCovMatrix(const RhoError &v)
Double_t DetermineChisq(const TLorentzVector &refVector)
TGeoRotation rot
RhoLorentzVectorErr operator-(const RhoLorentzVectorErr &, const RhoLorentzVectorErr &)
RhoLorentzVectorErr & operator+=(const RhoLorentzVectorErr &v)