LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
lar_content::LayerFitContribution Class Reference

LayerFitContribution class. More...

#include "LArTwoDSlidingFitObjects.h"

Public Member Functions

 LayerFitContribution ()
 Default constructor. More...
 
void AddPoint (const float l, const float t)
 Add point to layer fit. More...
 
double GetSumT () const
 Get the sum t. More...
 
double GetSumL () const
 Get the sum l. More...
 
double GetSumTT () const
 Get the sum t * t. More...
 
double GetSumLT () const
 Get the sum l * t. More...
 
double GetSumLL () const
 Get the sum l * l. More...
 
unsigned int GetNPoints () const
 Get the number of points used. More...
 

Private Attributes

double m_sumT
 The sum t. More...
 
double m_sumL
 The sum l. More...
 
double m_sumTT
 The sum t * t. More...
 
double m_sumLT
 The sum l * t. More...
 
double m_sumLL
 The sum l * l. More...
 
unsigned int m_nPoints
 The number of points used. More...
 

Detailed Description

LayerFitContribution class.

Definition at line 91 of file LArTwoDSlidingFitObjects.h.

Constructor & Destructor Documentation

lar_content::LayerFitContribution::LayerFitContribution ( )
inline

Default constructor.

Definition at line 334 of file LArTwoDSlidingFitObjects.h.

334  :
335  m_sumT(0.),
336  m_sumL(0.),
337  m_sumTT(0.),
338  m_sumLT(0.),
339  m_sumLL(0.),
340  m_nPoints(0)
341 {
342 }
unsigned int m_nPoints
The number of points used.

Member Function Documentation

void lar_content::LayerFitContribution::AddPoint ( const float  l,
const float  t 
)
inline

Add point to layer fit.

Parameters
lthe longitudinal coordinate
tthe transverse coordinate

Definition at line 346 of file LArTwoDSlidingFitObjects.h.

References m_nPoints, m_sumL, m_sumLL, m_sumLT, m_sumT, and m_sumTT.

347 {
348  const double T = static_cast<double>(t);
349  const double L = static_cast<double>(l);
350 
351  m_sumT += T;
352  m_sumL += L;
353  m_sumTT += T * T;
354  m_sumLT += L * T;
355  m_sumLL += L * L;
356  ++m_nPoints;
357 }
unsigned int m_nPoints
The number of points used.
unsigned int lar_content::LayerFitContribution::GetNPoints ( ) const
inline

Get the number of points used.

Returns
the number of points used

Definition at line 396 of file LArTwoDSlidingFitObjects.h.

References m_nPoints.

397 {
398  return m_nPoints;
399 }
unsigned int m_nPoints
The number of points used.
double lar_content::LayerFitContribution::GetSumL ( ) const
inline

Get the sum l.

Returns
the sum l

Definition at line 368 of file LArTwoDSlidingFitObjects.h.

References m_sumL.

369 {
370  return m_sumL;
371 }
double lar_content::LayerFitContribution::GetSumLL ( ) const
inline

Get the sum l * l.

Returns
the sum z * z

Definition at line 382 of file LArTwoDSlidingFitObjects.h.

References m_sumLL.

383 {
384  return m_sumLL;
385 }
double lar_content::LayerFitContribution::GetSumLT ( ) const
inline

Get the sum l * t.

Returns
the sum l * t

Definition at line 375 of file LArTwoDSlidingFitObjects.h.

References m_sumLT.

376 {
377  return m_sumLT;
378 }
double lar_content::LayerFitContribution::GetSumT ( ) const
inline

Get the sum t.

Returns
the sum t

Definition at line 361 of file LArTwoDSlidingFitObjects.h.

References m_sumT.

362 {
363  return m_sumT;
364 }
double lar_content::LayerFitContribution::GetSumTT ( ) const
inline

Get the sum t * t.

Returns
the sum t * t

Definition at line 389 of file LArTwoDSlidingFitObjects.h.

References m_sumTT.

390 {
391  return m_sumTT;
392 }

Member Data Documentation

unsigned int lar_content::LayerFitContribution::m_nPoints
private

The number of points used.

Definition at line 155 of file LArTwoDSlidingFitObjects.h.

Referenced by AddPoint(), and GetNPoints().

double lar_content::LayerFitContribution::m_sumL
private

The sum l.

Definition at line 151 of file LArTwoDSlidingFitObjects.h.

Referenced by AddPoint(), and GetSumL().

double lar_content::LayerFitContribution::m_sumLL
private

The sum l * l.

Definition at line 154 of file LArTwoDSlidingFitObjects.h.

Referenced by AddPoint(), and GetSumLL().

double lar_content::LayerFitContribution::m_sumLT
private

The sum l * t.

Definition at line 153 of file LArTwoDSlidingFitObjects.h.

Referenced by AddPoint(), and GetSumLT().

double lar_content::LayerFitContribution::m_sumT
private

The sum t.

Definition at line 150 of file LArTwoDSlidingFitObjects.h.

Referenced by AddPoint(), and GetSumT().

double lar_content::LayerFitContribution::m_sumTT
private

The sum t * t.

Definition at line 152 of file LArTwoDSlidingFitObjects.h.

Referenced by AddPoint(), and GetSumTT().


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