LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
PmaHit3D.h
Go to the documentation of this file.
1 
12 #ifndef PmaHit3D_h
13 #define PmaHit3D_h
14 
16 
19 
20 #include <functional>
21 
22 #include "TVector2.h"
23 #include "TVector3.h"
24 
25 namespace pma
26 {
27  class Hit3D;
28  struct bTrajectory3DOrderLess;
29 
30  class Track3D;
31 }
32 
34 {
35  friend class Track3D;
36  friend struct bTrajectory3DOrderLess;
37 
38 public:
39  Hit3D(void);
41  Hit3D(unsigned int wire, unsigned int view, unsigned int tpc, unsigned int cryo,
42  float peaktime, float ampl, float area);
43  Hit3D(const pma::Hit3D& src);
44  virtual ~Hit3D(void) {}
45 
46  art::Ptr< recob::Hit > const & Hit2DPtr(void) const { return fHit; }
47 
48  TVector3 const & Point3D(void) const { return fPoint3D; }
49 
50  void SetPoint3D(const TVector3& p3d) { fPoint3D = p3d; }
51  void SetPoint3D(double x, double y, double z) { fPoint3D.SetXYZ(x, y, z); }
52 
53  TVector2 const & Point2D(void) const { return fPoint2D; }
54  TVector2 const & Projection2D(void) const { return fProjection2D; }
55 
56  unsigned int Cryo(void) const { return fCryo; }
57  unsigned int TPC(void) const { return fTPC; }
58  unsigned int View2D(void) const { return fPlane; }
59  unsigned int Wire(void) const { return fWire; }
60  float PeakTime(void) const { return fPeakTime; }
61 
62  float SummedADC(void) const { return fArea; }
63  float GetAmplitude(void) const { return fAmpl; }
64  float GetSigmaFactor(void) const { return fSigmaFactor; }
66 
67  double Dx(void) const { return fDx; }
68 
69  double GetDistToProj(void) const { return sqrt(GetDist2ToProj()); }
70  double GetDist2ToProj(void) const;
71 
72  float GetSegFraction() const { return fSegFraction; }
73  void SetProjection(const TVector2& p, float b)
74  {
75  fProjection2D.Set(p); fSegFraction = b;
76  }
77  void SetProjection(double x, double y, float b)
78  {
79  fProjection2D.Set(x, y); fSegFraction = b;
80  }
81 
82  bool IsEnabled(void) const { return (fEnabled && !fOutlier); }
83  void SetEnabled(bool state) { fEnabled = state; }
84 
85  bool IsOutlier(void) const { return fOutlier; }
86  virtual void TagOutlier(bool state) { fOutlier = state; }
87 
88 private:
89 
90  art::Ptr< recob::Hit > fHit; // source 2D hit
91 
92  unsigned int fCryo, fTPC, fPlane, fWire;
94 
95  TVector3 fPoint3D; // hit position in 3D space
96  TVector2 fPoint2D; // hit position in 2D wire view, scaled to [cm]
97  TVector2 fProjection2D; // projection to polygonal line in 2D wire view, scaled to [cm]
98  float fSegFraction; // segment fraction set by the projection
99  float fSigmaFactor; // impact factor on the objective function
100 
101  double fDx; // dx seen by corresponding 2D hit, set during dQ/dx sequece calculation
102 
103  bool fEnabled; // used or not in the optimisation - due to various reasons
104  bool fOutlier; // tagged as a not really hit of this track (like delta ray)
105 
106  pma::Track3D* fParent; // track which contains this hit
107 };
108 
109 #endif
110 
Float_t x
Definition: compare.C:6
unsigned int TPC(void) const
Definition: PmaHit3D.h:57
double GetDistToProj(void) const
Definition: PmaHit3D.h:69
unsigned int fCryo
Definition: PmaHit3D.h:92
unsigned int Cryo(void) const
Definition: PmaHit3D.h:56
unsigned int View2D(void) const
Definition: PmaHit3D.h:58
void SetProjection(double x, double y, float b)
Definition: PmaHit3D.h:77
pma::Track3D * fParent
Definition: PmaHit3D.h:106
TVector2 fProjection2D
Definition: PmaHit3D.h:97
float fArea
Definition: PmaHit3D.h:93
bool IsEnabled(void) const
Definition: PmaHit3D.h:82
Declaration of signal hit object.
Float_t y
Definition: compare.C:6
Double_t z
Definition: plot.C:279
float fSegFraction
Definition: PmaHit3D.h:98
Hit3D(void)
Definition: PmaHit3D.cxx:14
void SetPoint3D(double x, double y, double z)
Definition: PmaHit3D.h:51
bool IsOutlier(void) const
Definition: PmaHit3D.h:85
float GetAmplitude(void) const
Definition: PmaHit3D.h:63
TVector2 const & Projection2D(void) const
Definition: PmaHit3D.h:54
virtual ~Hit3D(void)
Definition: PmaHit3D.h:44
TVector3 fPoint3D
Definition: PmaHit3D.h:95
art::Ptr< recob::Hit > const & Hit2DPtr(void) const
Definition: PmaHit3D.h:46
unsigned int Wire(void) const
Definition: PmaHit3D.h:59
float GetSegFraction() const
Definition: PmaHit3D.h:72
unsigned int fTPC
Definition: PmaHit3D.h:92
double fDx
Definition: PmaHit3D.h:101
bool fOutlier
Definition: PmaHit3D.h:104
unsigned int fPlane
Definition: PmaHit3D.h:92
float fAmpl
Definition: PmaHit3D.h:93
float fPeakTime
Definition: PmaHit3D.h:93
double GetDist2ToProj(void) const
Definition: PmaHit3D.cxx:83
void SetEnabled(bool state)
Definition: PmaHit3D.h:83
float SummedADC(void) const
Definition: PmaHit3D.h:62
void SetProjection(const TVector2 &p, float b)
Definition: PmaHit3D.h:73
TVector2 const & Point2D(void) const
Definition: PmaHit3D.h:53
TVector3 const & Point3D(void) const
Definition: PmaHit3D.h:48
float GetSigmaFactor(void) const
Definition: PmaHit3D.h:64
Implementation of the Projection Matching Algorithm.
std::string value(boost::any const &)
void SetSigmaFactor(float value)
Definition: PmaHit3D.h:65
virtual void TagOutlier(bool state)
Definition: PmaHit3D.h:86
float fSigmaFactor
Definition: PmaHit3D.h:99
void SetPoint3D(const TVector3 &p3d)
Definition: PmaHit3D.h:50
art::Ptr< recob::Hit > fHit
Definition: PmaHit3D.h:90
double Dx(void) const
Definition: PmaHit3D.h:67
bool fEnabled
Definition: PmaHit3D.h:103
float PeakTime(void) const
Definition: PmaHit3D.h:60
TVector2 fPoint2D
Definition: PmaHit3D.h:96
unsigned int fWire
Definition: PmaHit3D.h:92