LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
PxUtils.h
Go to the documentation of this file.
1 #include <iostream>
2 #include <sstream>
3 #ifndef UTIL_PXUTILS_H
4 #define UTIL_PXUTILS_H
5 
6 namespace util {
7  class PxPoint {
8  public:
9  double w; // wire distance in cm
10  double t; // time distance in cm (drift distance)
11  unsigned int plane; // plane 0, 1, 2
12 
14  {
15  Clear();
16  // std::cout<< "This is the default point ctor." << std::endl;
17  }
18 
19  // FIXME: changed order wrt. data member declarations
20  PxPoint(unsigned int pp, double ww, double tt)
21  {
22  plane = pp;
23  w = ww;
24  t = tt;
25  }
26 
27  void Clear()
28  {
29  plane = 0;
30  w = 0;
31  t = 0;
32  }
33 
34  ~PxPoint() {}
35  };
36 
37  class PxHit : public PxPoint {
38 
39  public:
40  double charge;
41  double sumADC;
42  double peak;
43 
44  PxHit() { Clear(); }
45 
46  PxHit(unsigned int pp, double ww, double tt, double chrg, double sumadc, double pk)
47  : PxPoint(pp, ww, tt), charge(chrg), sumADC(sumadc), peak(pk)
48  {}
49 
50  void Clear()
51  {
53  charge = 0;
54  peak = 0;
55  }
56  };
57 
58  //helper class needed for the seeding
59  class PxLine {
60  public:
61  PxPoint pt0() { return PxPoint(plane, w0, t0); }
62  PxPoint pt1() { return PxPoint(plane, w1, t1); }
63 
64  double w0;
65  double t0;
66  double w1;
67  double t1;
68  unsigned int plane;
69 
70  PxLine(unsigned int pp, double ww0, double tt0, double ww1, double tt1)
71  {
72  Clear();
73  plane = pp;
74  w0 = ww0;
75  t0 = tt0;
76  w1 = ww1;
77  t1 = tt1;
78  }
79 
80  PxLine() { Clear(); }
81 
82  void Clear()
83  {
84  plane = 0;
85  w0 = 0;
86  t0 = 0;
87  w1 = 0;
88  t1 = 0;
89  }
90  };
91 
92 }
93 
94 #endif
code to link reconstructed objects back to the MC truth information
Namespace for general, non-LArSoft-specific utilities.
Definition: PIDAAlg.h:26
void Clear()
Definition: PxUtils.h:50
double t1
defined to be the ending t-position (of line or seed depending)
Definition: PxUtils.h:67
TTree * t1
Definition: plottest35.C:26
PxLine(unsigned int pp, double ww0, double tt0, double ww1, double tt1)
Definition: PxUtils.h:70
PxPoint pt1()
Definition: PxUtils.h:62
double w0
defined to be the vertex w-position
Definition: PxUtils.h:64
void Clear()
Definition: PxUtils.h:82
double w1
defined to be the ending w-position (of line or seed depending)
Definition: PxUtils.h:66
PxHit(unsigned int pp, double ww, double tt, double chrg, double sumadc, double pk)
Definition: PxUtils.h:46
Definition: type_traits.h:61
PxPoint(unsigned int pp, double ww, double tt)
Definition: PxUtils.h:20
void Clear()
Definition: PxUtils.h:27
double t
Definition: PxUtils.h:10
double w
Definition: PxUtils.h:9
double charge
area charge
Definition: PxUtils.h:40
PxPoint pt0()
Definition: PxUtils.h:61
double sumADC
sum of ADCs
Definition: PxUtils.h:41
double peak
peak amplitude
Definition: PxUtils.h:42
unsigned int plane
Definition: PxUtils.h:68
double t0
defined to be the vertex t-position
Definition: PxUtils.h:65
unsigned int plane
Definition: PxUtils.h:11