Belle II Software development
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#include <framework/logging/Logger.h>
12
13//root
14#include <Math/Vector3D.h>
15#include <TMatrixDSym.h>
16
17namespace rave {
18 class KinematicTreeFactory;
19 class VertexFactory;
20}
21
22namespace Belle2 {
27
28 namespace analysis {
34 class RaveSetup {
35
36 public:
37 friend class RaveVertexFitter;
38 friend class RaveKinematicVertexFitter;
41 {
42 RaveSetup* instance = getRawInstance();
43 if (!instance->m_initialized) {
44 B2FATAL("RaveSetup::initialize was not called. It has to be called before RaveSetup or RaveVertexFitter are used");
45 }
46 return instance;
47 }
48
49 static void initialize(int verbosity = 1, double MagneticField = 1.5);
51 void setBeamSpot(const ROOT::Math::XYZVector& beamSpot, const TMatrixDSym& beamSpotCov);
53 void unsetBeamSpot();
54
56 void reset();
57
59 static void Print();
60
61 protected:
63 static RaveSetup* getRawInstance();
65 RaveSetup();
67 ~RaveSetup();
68
70 ROOT::Math::XYZVector m_beamSpot;
71 TMatrixDSym m_beamSpotCov;
72
73 rave::VertexFactory*
75
76 //GFRaveVertexFactory* m_GFRaveVertexFactory;
78 rave::KinematicTreeFactory* m_raveKinematicTreeFactory;
79
81 };
82
83 }
84
86}
87
Magnetic field map.
The RaveSetup class is part of the RaveInterface together with RaveVertexFitter It holds all global o...
Definition RaveSetup.h:34
TMatrixDSym m_beamSpotCov
beam spot position covariance matrix.
Definition RaveSetup.h:71
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:78
bool m_useBeamSpot
flag determines if beam spot information should be used for vertex fit.
Definition RaveSetup.h:69
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:80
ROOT::Math::XYZVector m_beamSpot
beam spot position.
Definition RaveSetup.h:70
static RaveSetup * getInstance()
get the pointer to the instance to get/set any of options stored in RaveSetup
Definition RaveSetup.h:40
rave::VertexFactory * m_raveVertexFactory
The RAVE vertex factory is the principal interface offered by the RAVE vertex fitting library.
Definition RaveSetup.h:74
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.