11 #include <framework/dataobjects/MCInitialParticles.h>
12 #include <TMatrixDSym.h>
34 std::copy_n(b.m_covHER, 6,
m_covHER);
35 std::copy_n(b.m_covLER, 6,
m_covLER);
42 std::copy_n(b.m_covHER, 6,
m_covHER);
43 std::copy_n(b.m_covLER, 6,
m_covLER);
52 auto floatcmp = [](
double dbl_a,
double dbl_b) {
return (
float)dbl_a == (float)dbl_b; };
88 void setHER(
double energy,
double angleX,
double angleY,
const std::vector<double>& cov);
106 void setLER(
double energy,
double angleX,
double angleY,
const std::vector<double>& cov);
122 void setVertex(
const TVector3& vertex,
const std::vector<double>& cov);
149 static TLorentzVector
getFourVector(
double energy,
double angleX,
double angleY);
169 static void setCovMatrix(Double32_t* member,
const std::vector<double>& cov,
bool common);
This class contains the nominal beam parameters and the parameters used for smearing of the primary v...
void setHER(double energy, double angleX, double angleY, const std::vector< double > &cov)
Set the HER FourVector and error matrix from beam energy, angle and covariance entries.
Double32_t m_covLER[6]
Covariance matrix of the low energy beam at the IP.
TMatrixDSym getCovVertex() const
Get the covariance matrix of the vertex position.
Double32_t m_covHER[6]
Covariance matrix of the high energy beam at the IP.
ClassDef(BeamParameters, 2)
nominal beam and primary vertex parameters (including smearing).
static TLorentzVector getFourVector(double energy, double angleX, double angleY)
Return energy smearing of LER.
void setLER(double energy, double angleX, double angleY, const std::vector< double > &cov)
Set the LER FourVector and error matrix from beam energy, angle and covariance entries.
static void setCovMatrix(Double32_t *member, const TMatrixDSym &cov)
Set covariance matrix from ROOT Matrix object.
BeamParameters(const BeamParameters &b)
copy constructor
void setCovLER(const TMatrixDSym &cov)
Set the covariance matrix for LER (E, theta_x, theta_y) where E is the energy, theta_x is the horizon...
static TMatrixDSym getCovMatrix(const Double32_t *member)
Obtain covariance matrix from a given float array.
Double32_t m_covVertex[6]
Covariance matrix of the vertex position.
void setVertex(const TVector3 &vertex, const std::vector< double > &cov)
Set the vertex position and error matrix.
void setCovHER(const TMatrixDSym &cov)
Set the covariance matrix for HER (E, theta_x, theta_y) where E is the energy, theta_x is the horizon...
static void setCovMatrix(Double32_t *member, const std::vector< double > &cov, bool common)
Set covariance matrix from vector of entries.
TMatrixDSym getCovLER() const
Get the covariance matrix of LER (E, theta_x, theta_y) where E is the energy, theta_x is the horizont...
TMatrixDSym getCovHER() const
Get the covariance matrix of HER (E, theta_x, theta_y) where E is the energy, theta_x is the horizont...
bool operator==(const BeamParameters &b) const
equality operator
BeamParameters()
default constructor
void setCovVertex(const TMatrixDSym &cov)
Set the covariance matrix of the vertex position.
BeamParameters & operator=(const BeamParameters &b)
assignment operator
This class contains the initial state for the given event.
bool operator==(const MCInitialParticles &b) const
Equality operator.
void setLER(const TLorentzVector &ler)
Set the Low Energy Beam 4-momentum.
void setVertex(const TVector3 &vertex)
Set the vertex position.
void setHER(const TLorentzVector &her)
Set the High Energy Beam 4-momentum.
MCInitialParticles & operator=(const MCInitialParticles &b)
Assignment operator.
Abstract base class for different kinds of events.