ATTPCROOT  0.3.0-alpha
A ROOT-based framework for analyzing data from active target detectors
AtGaussian.cxx
Go to the documentation of this file.
1 #include "AtGaussian.h"
2 
3 #include "AtHit.h"
4 #include "AtSample.h" // for RandomSample
5 
6 #include <Math/PdfFuncMathCore.h>
7 #include <Math/Point3D.h> // for operator-
8 #include <Math/Vector3D.h> // for DisplacementVector3D
9 
10 #include <cmath> // for sqrt
11 
12 using namespace RandomSample;
13 std::vector<double> AtGaussian::PDF(const AtHit &hit)
14 {
15  auto dist = (fReferenceHit.GetPosition() - hit.GetPosition()).Mag2();
16  dist = std::sqrt(dist);
17  return {ROOT::Math::gaussian_pdf(dist, fSigma)};
18 }
RandomSample::AtGaussian::PDF
virtual std::vector< double > PDF(const AtHit &hit) override
Definition: AtGaussian.cxx:13
RandomSample
Definition: AtSampleConsensus.h:26
AtHit::GetPosition
const XYZPoint & GetPosition() const
Definition: AtHit.h:79
AtHit.h
RandomSample::AtSampleFromReference::fReferenceHit
AtHit fReferenceHit
Definition: AtSampleFromReference.h:20
AtGaussian.h
RandomSample::AtGaussian::fSigma
double fSigma
Definition: AtGaussian.h:20
AtSample.h
AtHit
Point in space with charge.
Definition: AtHit.h:27