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 "RhoError.h"
22 
24  public:
26  static void SetVerbose(Int_t level) { fVerbose = level; }
27 
29  static Double_t GetBz(const TVector3 &position);
30 
32  static void ForceConstantBz(Double_t bz = 0.)
33  {
34  fBz = bz;
35  fBzSet = kTRUE;
36  };
38  static void UnForceConstantBz() { fBzSet = kFALSE; };
39 
40  /**********************************************************
41  Description: Class PndAnaCovTool
42  Taken from Base class for particles used for Vertex fitting
43  Authors: Dipak K. Mishra
44  R. Kliemt (taking away the cov converters)
45  ***********************************************************/
46  static TMatrixDSym GetConverted6(TMatrixDSym);
49  static TMatrixDSym GetCovMat(TMatrixD);
50  static TMatrixDSym GetCovMat1(TMatrixD);
51  static TMatrixDSym GetFitError(TMatrixDSym);
52  static TMatrixD GetFitError(TLorentzVector, TMatrixD);
53 
55  // static Bool_t FillHelixParams(RhoCandidate* cand, Bool_t skipcov=kFALSE);
56  static Bool_t
57  P7toHelix(const TVector3 &pos, const TLorentzVector &p4, const Double_t Q, const TMatrixD &cov77, Float_t *helixparams, TMatrixD &helixCov, Bool_t skipcov = kFALSE);
58  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,
59  TMatrixD &jacobian, Bool_t skipcov = kFALSE);
60  // static Bool_t SDtoHelix(FairTrackParH* par, RhoCandidate* cand, Bool_t skipcov=kFALSE);
61  static Bool_t P6FromTrajectory(TVectorD &mom6, TMatrixDSym &cov6, RhoCandidate *cand, double z, double ztolerance);
62  static Double_t StateFromTrajectory(TVectorD &state, TMatrixDSym &cov, RhoCandidate *track, double vx, double vy, double vz, double ztolerance);
63 
64  static void TransportToZ(RhoCandidate *cand, Double_t z = 0);
65  static void PrintMatrix(TMatrixT<double> m);
66  static void PrintMatrix(TMatrixTSym<double> m);
67  static void PrintMatrix(RhoError m);
68 
69  private:
70  static std::ostream &bold_on(std::ostream &os) { return os << "\e[1m"; }
71 
72  static std::ostream &bold_off(std::ostream &os) { return os << "\e[0m"; }
73 
76 
77  static Double_t fBz;
78  static Int_t fVerbose;
79  static Bool_t fBzSet;
80 };
81 
82 #endif
__m128 m
Definition: P4_F32vec4.h:26
static void UnForceConstantBz()
Release the B field to be fetched from the database.
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.
static TMatrixDSym GetConverted6(TMatrixDSym)
static TMatrixD GetConverted7(TMatrixD)
static Bool_t P6FromTrajectory(TVectorD &mom6, TMatrixDSym &cov6, RhoCandidate *cand, double z, double ztolerance)
static TMatrixDSym GetCovMat(TMatrixD)
static void ForceConstantBz(Double_t bz=0.)
Force a constant B field value for all positions.
static TMatrixDSym GetCovMat1(TMatrixD)
static TMatrixDSym GetFitError(TMatrixDSym)
static void PrintMatrix(TMatrixT< double > m)
static Double_t GetBz(const TVector3 &position)
Return the magnetic field along the z-axis in kGs
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)
static void TransportToZ(RhoCandidate *cand, Double_t z=0)
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.
TMatrixT< double > TMatrixD
Definition: PndLmdDim.h:52