ElasticArms.cxx File Reference

The basic elastic arms energy function. More...

`#include "ElasticArms/func/ElasticArms.h"`
`#include "GeometryObjects/PlaneGeo.h"`
`#include <iostream>`
`#include <cmath>`
`#include <cstdlib>`
`#include <cassert>`

Go to the source code of this file.

## Functions

static double sqr (double x)

static double dsqrtoline (double x0, double y0, double x1, double y1, double x2, double y2)

## Detailed Description

The basic elastic arms energy function.

Version
Id
ElasticArms.cxx,v 1.5 2012-05-31 01:08:49 messier Exp

Definition in file ElasticArms.cxx.

## Function Documentation

 static double dsqrtoline ( double x0, double y0, double x1, double y1, double x2, double y2 )
static

Definition at line 21 of file ElasticArms.cxx.

References ana::assert(), dx, dy, sqr(), x1, and y1.

Referenced by earms::ElasticArms::UpdateMia().

24 {
25  assert(x1!=x2 || y1!=y2);
26  double dx = x2-x1;
27  double dy = y2-y1;
28  return sqr(dx*(y1-y0)-dy*(x1-x0)) / (dx*dx+dy*dy);
29 }
Float_t y1[n_points_granero]
Definition: compare.C:5
Float_t x1[n_points_granero]
Definition: compare.C:5
double dy[NP][NC]
double dx[NP][NC]
static double sqr(double x)
Definition: ElasticArms.cxx:20
assert(nhit_max >=nhit_nbins)
 static double sqr ( double x )
static

Definition at line 20 of file ElasticArms.cxx.

References submit_syst::x.

20 { return x*x; }