Belle II Software  release-08-01-10
BeamParametersFitter Class Reference

Fitter calculating BeamParameters from CollisionBoostVector and CollisionInvariantMass. More...

#include <BeamParametersFitter.h>

Collaboration diagram for BeamParametersFitter:

Public Member Functions

 BeamParametersFitter ()
 Constructor.
 
 ~BeamParametersFitter ()
 Destructor.
 
void setIntervalOfValidity (const IntervalOfValidity &iov)
 Set interval of validity.
 
void setAngleHER (double angleHER)
 Set HER angle.
 
void setAngleLER (double angleLER)
 Set LER angle.
 
void setAngleError (double angleError)
 Set angle error.
 
void setBoostError (double boostError)
 Set boost error.
 
void setInvariantMassError (double invariantMassError)
 Set invariant-mass error.
 
void setVerbose (bool verbose)
 Set whether to be verbose (print Minuit output).
 
BeamParameters getBeamParameters () const
 Get beam parameters.
 
void setBeamParameters (const BeamParameters *beamParameters)
 Set beam parameters.
 
void fit ()
 Perform the fit.
 
void fillVertexData (double covarianceXX, double covarianceYY)
 Fill beam spot (vertex) data. More...
 
void importBeamParameters ()
 Import beam parameters.
 

Protected Member Functions

void setupDatabase ()
 Setup database.
 

Protected Attributes

IntervalOfValidity m_IntervalOfValidity
 Interval of validity.
 
double m_AngleHER = 0
 HER angle.
 
double m_AngleLER = 0
 LER angle.
 
double m_AngleError = 0
 Angle error.
 
double m_BoostError = 0.0001
 Boost error (use only if inverse error matrix is not available).
 
double m_InvariantMassError = 0.0001
 Invariant-mass error (use only if error is 0).
 
bool m_Verbose = false
 Whether to be verbose (print Minuit output).
 
BeamParameters m_BeamParameters
 Beam parameters.
 
DBObjPtr< BeamSpotm_BeamSpot
 Beam spot.
 
DBObjPtr< CollisionBoostVectorm_CollisionBoostVector
 Collision boost vector.
 
DBObjPtr< CollisionInvariantMassm_CollisionInvariantMass
 Collision invariant mass.
 

Detailed Description

Fitter calculating BeamParameters from CollisionBoostVector and CollisionInvariantMass.

Definition at line 31 of file BeamParametersFitter.h.

Member Function Documentation

◆ fillVertexData()

void fillVertexData ( double  covarianceXX,
double  covarianceYY 
)

Fill beam spot (vertex) data.

The covariance matrix is rescaled to nominal XX and YY covariances. If covariances are negative, then no rescaling is performed.

Parameters
[in]covarianceXXCovariance-matrix XX element.
[in]covarianceYYCovariance-matrix YY element.

Definition at line 296 of file BeamParametersFitter.cc.

298 {
299  setupDatabase();
300  m_BeamParameters.setVertex(ROOT::Math::XYZVector(m_BeamSpot->getIPPosition()));
301  TMatrixDSym beamSize = m_BeamSpot->getSizeCovMatrix();
302  double xScale, yScale;
303  if (covarianceXX < 0)
304  xScale = 1;
305  else
306  xScale = sqrt(covarianceXX / beamSize[0][0]);
307  if (covarianceYY < 0)
308  yScale = 1;
309  else
310  yScale = sqrt(covarianceYY / beamSize[1][1]);
311  for (int i = 0; i < 3; ++i) {
312  beamSize[0][i] *= xScale;
313  beamSize[i][0] *= xScale;
314  beamSize[1][i] *= yScale;
315  beamSize[i][1] *= yScale;
316  }
317  m_BeamParameters.setCovVertex(beamSize);
318 }
BeamParameters m_BeamParameters
Beam parameters.
void setupDatabase()
Setup database.
DBObjPtr< BeamSpot > m_BeamSpot
Beam spot.
void setVertex(const ROOT::Math::XYZVector &vertex, const std::vector< double > &cov)
Set the vertex position and error matrix.
void setCovVertex(const TMatrixDSym &cov)
Set the covariance matrix of the vertex position.
double sqrt(double a)
sqrt for double
Definition: beamHelpers.h:28

The documentation for this class was generated from the following files: