PandaRoot
RhoCalculationTools.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 RHOCALCULATIONTOOLS_H
14 #define RHOCALCULATIONTOOLS_H
15 // //
17 // RhoCalculationTools //
18 // //
19 // Toolset to calculate things centrally. //
20 // - Magnetic Field Access //
21 // //
22 // Authors: //
23 // Ralf Kliemt, HIM/GSI Feb.2013 //
24 // //
26 
27 #include "RhoCandidate.h"
28 
29 #include "TVector3.h"
30 #include "TLorentzVector.h"
31 #include "TMatrixD.h"
32 #include "TMatrixDSym.h"
33 #include "RhoError.h"
34 
36  public:
38  static void SetVerbose(Int_t level) { fVerbose = level; }
39 
41  static Double_t GetBz(const TVector3 &position);
42 
44  static void ForceConstantBz(Double_t bz = 0.)
45  {
46  fBz = bz;
47  fBzSet = kTRUE;
48  };
50  static void UnForceConstantBz() { fBzSet = kFALSE; };
51 
52  /**********************************************************
53  Description: Class PndAnaCovTool
54  Taken from Base class for particles used for Vertex fitting
55  Authors: Dipak K. Mishra
56  R. Kliemt (taking away the cov converters)
57  ***********************************************************/
58  static TMatrixDSym GetConverted6(TMatrixDSym);
61  static TMatrixDSym GetCovMat(TMatrixD);
62  static TMatrixDSym GetCovMat1(TMatrixD);
63  static TMatrixDSym GetFitError(TMatrixDSym);
64  static TMatrixD GetFitError(TLorentzVector, TMatrixD);
65 
67  // static Bool_t FillHelixParams(RhoCandidate* cand, Bool_t skipcov=kFALSE);
68  static Bool_t
69  P7toHelix(const TVector3 &pos, const TLorentzVector &p4, const Double_t Q, const TMatrixD &cov77, Float_t *helixparams, TMatrixD &helixCov, Bool_t skipcov = kFALSE);
70  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,
71  TMatrixD &jacobian, Bool_t skipcov = kFALSE);
72  // static Bool_t SDtoHelix(FairTrackParH* par, RhoCandidate* cand, Bool_t skipcov=kFALSE);
73  static Bool_t P6FromTrajectory(TVectorD &mom6, TMatrixDSym &cov6, RhoCandidate *cand, double z, double ztolerance);
74  static Double_t StateFromTrajectory(TVectorD &state, TMatrixDSym &cov, RhoCandidate *track, double vx, double vy, double vz, double ztolerance);
75 
76  static void TransportToZ(RhoCandidate *cand, Double_t z = 0);
77  static void PrintMatrix(TMatrixT<double> m);
78  static void PrintMatrix(TMatrixTSym<double> m);
79  static void PrintMatrix(RhoError m);
80 
81  private:
82  static std::ostream &bold_on(std::ostream &os) { return os << "\e[1m"; }
83 
84  static std::ostream &bold_off(std::ostream &os) { return os << "\e[0m"; }
85 
88 
89  static Double_t fBz;
90  static Int_t fVerbose;
91  static Bool_t fBzSet;
92 };
93 
94 #endif
__m128 m
Definition: P4_F32vec4.h:38
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:64