Belle II Software prerelease-10-00-00a
RaveSetup.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9#pragma once
10
11//std
12#include <string>
13
14#include <framework/logging/Logger.h>
15
16//root
17#include <Math/Vector3D.h>
18#include <TMatrixDSym.h>
19
20namespace rave {
21 class KinematicTreeFactory;
22 class VertexFactory;
23}
24
25namespace Belle2 {
30
31 namespace analysis {
37 class RaveSetup {
38
39 public:
40 friend class RaveVertexFitter;
41 friend class RaveKinematicVertexFitter;
44 {
45 RaveSetup* instance = getRawInstance();
46 if (!instance->m_initialized) {
47 B2FATAL("RaveSetup::initialize was not called. It has to be called before RaveSetup or RaveVertexFitter are used");
48 }
49 return instance;
50 }
51
52 static void initialize(int verbosity = 1, double MagneticField = 1.5);
54 void setBeamSpot(const ROOT::Math::XYZVector& beamSpot, const TMatrixDSym& beamSpotCov);
56 void unsetBeamSpot();
57
59 void reset();
60
62 static void Print();
63
64 protected:
66 static RaveSetup* getRawInstance();
68 RaveSetup();
70 ~RaveSetup();
71
73 ROOT::Math::XYZVector m_beamSpot;
74 TMatrixDSym m_beamSpotCov;
75
76 rave::VertexFactory*
78
79 //GFRaveVertexFactory* m_GFRaveVertexFactory;
81 rave::KinematicTreeFactory* m_raveKinematicTreeFactory;
82
84 };
85
86 }
87
89}
90
Magnetic field map.
The RaveSetup class is part of the RaveInterface together with RaveVertexFitter It holds all global o...
Definition RaveSetup.h:37
TMatrixDSym m_beamSpotCov
beam spot position covariance matrix.
Definition RaveSetup.h:74
RaveSetup()
default constructor
Definition RaveSetup.cc:50
void unsetBeamSpot()
unset beam spot constraint
Definition RaveSetup.cc:82
rave::KinematicTreeFactory * m_raveKinematicTreeFactory
< The RAVE Kinematic Tree factory is the principal interface offered by the RAVE for kinematic vertex...
Definition RaveSetup.h:81
bool m_useBeamSpot
flag determines if beam spot information should be used for vertex fit.
Definition RaveSetup.h:72
static void initialize(int verbosity=1, double MagneticField=1.5)
Set everything up so everything needed for vertex fitting is there.
Definition RaveSetup.cc:35
static RaveSetup * getRawInstance()
Same as getInstance(), but no check if the instance is initialised.
Definition RaveSetup.cc:29
bool m_initialized
Has initialize() been called?
Definition RaveSetup.h:83
ROOT::Math::XYZVector m_beamSpot
beam spot position.
Definition RaveSetup.h:73
static RaveSetup * getInstance()
get the pointer to the instance to get/set any of options stored in RaveSetup
Definition RaveSetup.h:43
rave::VertexFactory * m_raveVertexFactory
The RAVE vertex factory is the principal interface offered by the RAVE vertex fitting library.
Definition RaveSetup.h:77
static void Print()
Print() writes all RaveSetup member variables to the terminal.
Definition RaveSetup.cc:89
void setBeamSpot(const ROOT::Math::XYZVector &beamSpot, const TMatrixDSym &beamSpotCov)
The beam spot position and covariance is known you can set it here so that and a vertex in the beam s...
Definition RaveSetup.cc:74
~RaveSetup()
default destructor
Definition RaveSetup.cc:55
void reset()
frees memory allocated by initialize().
Definition RaveSetup.cc:60
Abstract base class for different kinds of events.