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 
7 namespace util{
8  class PxPoint {
9  public:
10  double w; // wire distance in cm
11  double t; // time distance in cm (drift distance)
12  unsigned int plane; // plane 0, 1, 2
13 
15  Clear();
16  // std::cout<< "This is the default point ctor." << std::endl;
17  }
18 
19  PxPoint(unsigned int pp,double ww,double tt){
20  plane=pp;
21  w=ww;
22  t=tt;
23  }
24 
25  void Clear()
26  {
27  plane = 0;
28  w = 0;
29  t = 0;
30  }
31 
33  };
34 
35  class PxHit : public PxPoint {
36 
37  public:
38 
39  double charge; ///< area charge
40  double sumADC; ///< sum of ADCs
41  double peak; ///< peak amplitude
42 
43  PxHit(){
44  Clear();
45  }
46 
47  PxHit(unsigned int pp,double ww,double tt,
48  double chrg, double sumadc, double pk):
49  PxPoint(pp, ww, tt), charge(chrg), sumADC(sumadc), peak(pk)
50  {}
51 
52  void Clear()
53  {
55  charge = 0;
56  peak = 0;
57  }
58 
59  };
60 
61 
62  //helper class needed for the seeding
63  class PxLine {
64  public:
65 
66  PxPoint pt0() { return PxPoint(plane,w0,t0); }
67  PxPoint pt1() { return PxPoint(plane,w1,t1); }
68 
69  double w0; ///<defined to be the vertex w-position
70  double t0; ///<defined to be the vertex t-position
71  double w1; ///<defined to be the ending w-position (of line or seed depending)
72  double t1; ///<defined to be the ending t-position (of line or seed depending)
73  unsigned int plane;
74 
75  PxLine(unsigned int pp,double ww0,double tt0, double ww1, double tt1){
76  Clear();
77  plane=pp;
78  w0=ww0;
79  t0=tt0;
80  w1=ww1;
81  t1=tt1;
82  }
83 
84  PxLine(){Clear();}
85 
86  void Clear()
87  {
88  plane=0;
89  w0=0;
90  t0=0;
91  w1=0;
92  t1=0;
93  }
94 
95  };
96 
97 }
98 
99 
100 
101 #endif
code to link reconstructed objects back to the MC truth information
Namespace for general, non-LArSoft-specific utilities.
void Clear()
Definition: PxUtils.h:52
double t1
defined to be the ending t-position (of line or seed depending)
Definition: PxUtils.h:72
PxLine(unsigned int pp, double ww0, double tt0, double ww1, double tt1)
Definition: PxUtils.h:75
PxPoint pt1()
Definition: PxUtils.h:67
double w0
defined to be the vertex w-position
Definition: PxUtils.h:69
void Clear()
Definition: PxUtils.h:86
double w1
defined to be the ending w-position (of line or seed depending)
Definition: PxUtils.h:71
PxHit(unsigned int pp, double ww, double tt, double chrg, double sumadc, double pk)
Definition: PxUtils.h:47
Definition: type_traits.h:61
PxPoint(unsigned int pp, double ww, double tt)
Definition: PxUtils.h:19
void Clear()
Definition: PxUtils.h:25
double t
Definition: PxUtils.h:11
double w
Definition: PxUtils.h:10
double charge
area charge
Definition: PxUtils.h:39
PxPoint pt0()
Definition: PxUtils.h:66
double sumADC
sum of ADCs
Definition: PxUtils.h:40
double peak
peak amplitude
Definition: PxUtils.h:41
unsigned int plane
Definition: PxUtils.h:73
double t0
defined to be the vertex t-position
Definition: PxUtils.h:70
unsigned int plane
Definition: PxUtils.h:12