FairRoot/PandaRoot
Macros | Functions
GFDetPlane.cxx File Reference
#include "GFDetPlane.h"
#include "assert.h"
#include <iostream>
#include <cmath>
#include "TMath.h"
#include "TRandom3.h"

Go to the source code of this file.

Macros

#define DETPLANE_EPSILON   1.E-5
 

Functions

bool operator== (const GFDetPlane &lhs, const GFDetPlane &rhs)
 
bool operator!= (const GFDetPlane &lhs, const GFDetPlane &rhs)
 

Macro Definition Documentation

#define DETPLANE_EPSILON   1.E-5

Definition at line 258 of file GFDetPlane.cxx.

Referenced by operator==().

Function Documentation

bool operator!= ( const GFDetPlane lhs,
const GFDetPlane rhs 
)

Definition at line 278 of file GFDetPlane.cxx.

278  {
279  return !(lhs==rhs);
280 }
bool operator== ( const GFDetPlane lhs,
const GFDetPlane rhs 
)

this operator is called very often in Kalman filtering. It checks equality of planes by comparing the 9 double values that define them.

Definition at line 259 of file GFDetPlane.cxx.

References DETPLANE_EPSILON, fabs(), GFDetPlane::fO, GFDetPlane::fU, and GFDetPlane::fV.

259  {
260  if(
261  fabs( (lhs.fO.X()-rhs.fO.X()) ) > DETPLANE_EPSILON ||
262  fabs( (lhs.fO.Y()-rhs.fO.Y()) ) > DETPLANE_EPSILON ||
263  fabs( (lhs.fO.Z()-rhs.fO.Z()) ) > DETPLANE_EPSILON
264  ) return false;
265  else if(
266  fabs( (lhs.fU.X()-rhs.fU.X()) ) > DETPLANE_EPSILON ||
267  fabs( (lhs.fU.Y()-rhs.fU.Y()) ) > DETPLANE_EPSILON ||
268  fabs( (lhs.fU.Z()-rhs.fU.Z()) ) > DETPLANE_EPSILON
269  ) return false;
270  else if(
271  fabs( (lhs.fV.X()-rhs.fV.X()) ) > DETPLANE_EPSILON ||
272  fabs( (lhs.fV.Y()-rhs.fV.Y()) ) > DETPLANE_EPSILON ||
273  fabs( (lhs.fV.Z()-rhs.fV.Z()) ) > DETPLANE_EPSILON
274  ) return false;
275  return true;
276 }
TVector3 fO
Definition: GFDetPlane.h:151
TVector3 fV
Definition: GFDetPlane.h:154
#define DETPLANE_EPSILON
Definition: GFDetPlane.cxx:258
TVector3 fU
Definition: GFDetPlane.h:153
friend F32vec4 fabs(const F32vec4 &a)
Definition: P4_F32vec4.h:47