1#include "Tracking/Digitization/GaussianDistribution2D.h"
5GaussianDistribution2D::GaussianDistribution2D(
6 double normalization,
const Acts::Vector3& mean,
7 const Acts::Vector3& major_axis,
const Acts::Vector3& minor_axis) {
8 normalization_ = normalization;
11 if (std::abs(major_axis.dot(minor_axis)) < 1.e-9) {
12 major_axis_ = major_axis;
13 minor_axis_ = minor_axis;
15 std::cout << __PRETTY_FUNCTION__ <<
"FAILURE: Axes are not perpendicular"
20void GaussianDistribution2D::transform(
const Acts::Transform3& transform) {
21 mean_ = transform * mean_;
22 major_axis_ = transform * major_axis_;
23 minor_axis_ = transform * minor_axis_;
27 const Acts::Transform3& transform) {
28 Acts::Vector3 t_mean = transform * mean_;
29 Acts::Vector3 t_major_axis = transform * major_axis_;
30 Acts::Vector3 t_minor_axis = transform * minor_axis_;
36double GaussianDistribution2D::sigma1D(
const Acts::Vector3& axis) {
37 Acts::Vector3 uaxis = axis / axis.norm();
38 return std::sqrt(std::pow(uaxis.dot(major_axis_), 2) +
39 std::pow(uaxis.dot(minor_axis_), 2));
42double GaussianDistribution2D::covxy(
const Acts::Vector3& xaxis,
43 const Acts::Vector3 yaxis) {
45 if (std::abs(xaxis.dot(yaxis) > 1e-9))
46 std::cout <<
"ERROR:: Pixel axes are not orthogonal" << std::endl;
49 double cth = (xaxis / xaxis.norm()).dot((major_axis_ / major_axis_.norm()));
50 double sth = (yaxis / yaxis.norm()).dot((major_axis_ / major_axis_.norm()));
53 return sth * cth * (major_axis_.squaredNorm() - minor_axis_.squaredNorm());
56double GaussianDistribution2D::upperIntegral1D(
const Acts::Vector3& axis,
57 double integration_limit) {
58 std::cout <<
"UPPER INTEGRAL 1D TO BE IMPLEMENTED" << std::endl;