TrdMCClusterR Fit Classifier
Point.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <cmath>
4 
5 namespace Point
6 {
7  //____________________________________________________________________________
8  struct Point2D
9  {
10  double x, y;
11 
12  Point2D() : x(0.0), y(0.0) {}
13  Point2D(double x, double y) : x(x), y(y) {}
14  };
15 
16 
17  struct Point2DwID
18  {
20 
21  double x;
22  double y;
23  int trkID;
24  int PID;
25  double closedis;
26 
28  Point2DwID() : x(-99999999), y(-99999999), trkID(-99999999), PID(-99999999), closedis(-99) {}
29 
31  Point2DwID(double x, double y, int trkID, int PID, double closedis) : x(x), y(y), trkID(trkID), PID(PID), closedis(closedis) {}
32  };
33 
34 
35  //____________________________________________________________________________
36  struct Point3D
37  {
38  double x, y, z;
39  };
40 
41 
42  //____________________________________________________________________________
43  double GetDistance2D(double x1, double y1, double x2, double y2)
44  {
45  return std::sqrt(std::pow(x2 - x1, 2) + std::pow(y2 - y1, 2));
46  }
47 }
Definition: Point.h:6
double GetDistance2D(double x1, double y1, double x2, double y2)
Definition: Point.h:43
Definition: Point.h:9
double y
Definition: Point.h:10
Point2D()
Definition: Point.h:12
Point2D(double x, double y)
Definition: Point.h:13
double x
Definition: Point.h:10
Definition: Point.h:18
double x
Point2D with identifier fields: x, y, trkID, PID.
Definition: Point.h:21
int trkID
Definition: Point.h:23
Point2DwID()
closest distance
Definition: Point.h:28
double closedis
Definition: Point.h:25
int PID
Definition: Point.h:24
double y
Definition: Point.h:22
Point2DwID(double x, double y, int trkID, int PID, double closedis)
A constructor for convenient initialization: x, y, trkID, PID, closedis.
Definition: Point.h:31
Definition: Point.h:37
double x
Definition: Point.h:38
double z
Definition: Point.h:38
double y
Definition: Point.h:38