Belle II Software development
BeamSpot.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 <TMatrixDSym.h>
12#include <TVector3.h>
13
14namespace Belle2 {
22 class BeamSpot: public TObject {
23 public:
24
33 { }
34
37
38
40 bool operator==(const BeamSpot& b) const
41 {
42 return
43 b.m_IPPosition == m_IPPosition &&
44 b.m_IPPositionCovMatrix == m_IPPositionCovMatrix &&
45 b.m_sizeCovMatrix == m_sizeCovMatrix;
46 }
47
50 void setSizeCovMatrix(const TMatrixDSym& size)
51 {
52 m_sizeCovMatrix = size;
53 }
54
59 void setIP(const TVector3& ipPosition, const TMatrixDSym& covariance)
60 {
61 m_IPPosition = ipPosition;
62 m_IPPositionCovMatrix = covariance;
63 }
64
66 const TVector3& getIPPosition() const
67 {
68 return m_IPPosition;
69 }
70
72 const TMatrixDSym& getIPPositionCovMatrix() const
73 {
75 }
76
78 const TMatrixDSym& getSizeCovMatrix() const
79 {
80 return m_sizeCovMatrix;
81 }
82
85 TMatrixDSym getCovVertex() const
86 {
88 }
89
91 static unsigned short getGlobalUniqueID() { return 1; }
92
93 private:
94
97 TVector3 m_IPPosition;
98
101
104 TMatrixDSym m_sizeCovMatrix;
105
107 };
108
110} //Belle2 namespace
This class contains the beam spot position and size modeled as a gaussian distribution in space.
Definition: BeamSpot.h:22
static unsigned short getGlobalUniqueID()
Return unique ID of BeamSpot in global Millepede calibration (1)
Definition: BeamSpot.h:91
void setSizeCovMatrix(const TMatrixDSym &size)
Set the covariance matrix of the size of the IP position.
Definition: BeamSpot.h:50
TMatrixDSym getCovVertex() const
Get the total covariance matrix of theIP position (for compatibility with BeamParameters)
Definition: BeamSpot.h:85
const TMatrixDSym & getSizeCovMatrix() const
Get the covariance matrix of the size of the IP position modeled as a gaussian.
Definition: BeamSpot.h:78
BeamSpot()
default constructor IP position at the nominal origin error on the position 0 in all directions Lumin...
Definition: BeamSpot.h:30
~BeamSpot()
Destructor.
Definition: BeamSpot.h:36
void setIP(const TVector3 &ipPosition, const TMatrixDSym &covariance)
Set the IP position and its error matrix.
Definition: BeamSpot.h:59
bool operator==(const BeamSpot &b) const
equality operator
Definition: BeamSpot.h:40
TVector3 m_IPPosition
Beam spot position defined as the average position of the primary vertex.
Definition: BeamSpot.h:97
TMatrixDSym m_IPPositionCovMatrix
CovMatrix of the measured beam spot position.
Definition: BeamSpot.h:100
const TMatrixDSym & getIPPositionCovMatrix() const
Get the covariance matrix of the measured IP position.
Definition: BeamSpot.h:72
const TVector3 & getIPPosition() const
Get the IP position.
Definition: BeamSpot.h:66
TMatrixDSym m_sizeCovMatrix
Size of the luminous region modeled with a three dimensional gaussian.
Definition: BeamSpot.h:104
ClassDef(BeamSpot, 2)
beam spot position and size
Abstract base class for different kinds of events.