FairRoot/PandaRoot
RhoCalculationTools.h
Go to the documentation of this file.
1 #ifndef RHOCALCULATIONTOOLS_H
2 #define RHOCALCULATIONTOOLS_H
3 // //
5 // RhoCalculationTools //
6 // //
7 // Toolset to calculate things centrally. //
8 // - Magnetic Field Access //
9 // //
10 // Authors: //
11 // Ralf Kliemt, HIM/GSI Feb.2013 //
12 // //
14 
15 #include "RhoCandidate.h"
16 
17 #include "TVector3.h"
18 #include "TLorentzVector.h"
19 #include "TMatrixD.h"
20 #include "TMatrixDSym.h"
21 #include "RhoMath/RhoError.h"
22 
24 {
25  public:
26 
28  static void SetVerbose ( Int_t level ) {
29  fVerbose = level;
30  }
31 
32 
34  static Double_t GetBz ( const TVector3& position );
35 
37  static void ForceConstantBz ( Double_t bz=0. ) {
38  fBz=bz;
39  fBzSet=kTRUE;
40  };
42  static void UnForceConstantBz() {
43  fBzSet=kFALSE;
44  };
45 
46 
47 /**********************************************************
48  Description: Class PndAnaCovTool
49  Taken from Base class for particles used for Vertex fitting
50  Authors: Dipak K. Mishra
51  R. Kliemt (taking away the cov converters)
52 ***********************************************************/
53  static TMatrixDSym GetConverted6(TMatrixDSym) ;
56  static TMatrixDSym GetCovMat(TMatrixD) ;
57  static TMatrixDSym GetCovMat1(TMatrixD) ;
58  static TMatrixDSym GetFitError(TMatrixDSym) ;
59  static TMatrixD GetFitError(TLorentzVector, TMatrixD) ;
60 
61 
62 
64 // static Bool_t FillHelixParams(RhoCandidate* cand, Bool_t skipcov=kFALSE);
65  static Bool_t P7toHelix(const TVector3& pos, const TLorentzVector& p4, const Double_t Q,
66  const TMatrixD& cov77, Float_t* helixparams, TMatrixD& helixCov, Bool_t skipcov=kFALSE);
67  static Bool_t P7toPRG(const TVector3& pos, const TLorentzVector& p4, const Double_t Q, const TMatrixD& cov77,
68  const TVector3& expPoint, Float_t* helixparams, TMatrixD& helixCov, TMatrixD& jacobian, Bool_t skipcov=kFALSE);
69 // static Bool_t SDtoHelix(FairTrackParH* par, RhoCandidate* cand, Bool_t skipcov=kFALSE);
70  static Bool_t P6FromTrajectory( TVectorD& mom6, TMatrixDSym& cov6, RhoCandidate* cand, double z, double ztolerance);
71  static Double_t StateFromTrajectory( TVectorD& state, TMatrixDSym& cov, RhoCandidate* track, double vx, double vy, double vz, double ztolerance );
72 
73  static void TransportToZ(RhoCandidate* cand, Double_t z=0);
74  static void PrintMatrix(TMatrixT<double> m);
75  static void PrintMatrix(TMatrixTSym<double> m);
76  static void PrintMatrix(RhoError m);
77 
78  private:
79 
81  {
82  return os << "\e[1m";
83  }
84 
86  {
87  return os << "\e[0m";
88  }
89 
92 
93  static Double_t fBz;
94  static Int_t fVerbose;
95  static Bool_t fBzSet;
96 };
97 
98 #endif
static Bool_t P6FromTrajectory(TVectorD &mom6, TMatrixDSym &cov6, RhoCandidate *cand, double z, double ztolerance)
TVector3 pos
static TMatrixDSym GetConverted6(TMatrixDSym)
static std::ostream & bold_on(std::ostream &os)
__m128 m
Definition: P4_F32vec4.h:28
static void UnForceConstantBz()
Release the B field to be fetched from the database.
static std::ostream & bold_off(std::ostream &os)
static void ForceConstantBz(Double_t bz=0.)
Force a constant B field value for all positions.
static Bool_t P7toPRG(const TVector3 &pos, const TLorentzVector &p4, const Double_t Q, const TMatrixD &cov77, const TVector3 &expPoint, Float_t *helixparams, TMatrixD &helixCov, TMatrixD &jacobian, Bool_t skipcov=kFALSE)
Double_t
static Bool_t P7toHelix(const TVector3 &pos, const TLorentzVector &p4, const Double_t Q, const TMatrixD &cov77, Float_t *helixparams, TMatrixD &helixCov, Bool_t skipcov=kFALSE)
Calculator functions.
PndMCTrack * track
Definition: anaLmdCluster.C:89
static void PrintMatrix(TMatrixT< double > m)
Double_t z
static TMatrixD GetConverted7(TMatrixD)
static Double_t GetBz(const TVector3 &position)
Return the magnetic field along the z-axis in kGs
static TMatrixDSym GetFitError(TMatrixDSym)
static TMatrixDSym GetCovMat1(TMatrixD)
static Double_t StateFromTrajectory(TVectorD &state, TMatrixDSym &cov, RhoCandidate *track, double vx, double vy, double vz, double ztolerance)
static void SetVerbose(Int_t level)
Allows debugging output for these utilities.
static void TransportToZ(RhoCandidate *cand, Double_t z=0)
static TMatrixDSym GetCovMat(TMatrixD)
TMatrixT< double > TMatrixD
Definition: PndLmdDim.h:52