RecoHit.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 // \file RecoHit.h
3 // \brief A RecoHit contains information about the hit that requires some level
4 // of reconstruction. In particular, the location of the hit in
5 // the orthogonal view is used to set this stuff.
6 // \version $Id: RecoHit.h,v 1.6 2012-03-07 22:13:19 bckhouse Exp $
7 // \author $Author: bckhouse $
8 ////////////////////////////////////////////////////////////////////////
9 #ifndef RBRECOHIT_H
10 #define RBRECOHIT_H
11 
12 #include <ostream>
13 
14 namespace rb
15 {
16  /// \brief Calibrated quantities relying on position in the orthogonal view.
17  /// To generate a \ref rb::CellHit from a \ref rb::RecoHit you need a
18  /// reconstructed object to provide the assumed W position.
19  class RecoHit
20  {
21  public:
22  RecoHit(); // Default constructor
23  ~RecoHit();
24 
25 #ifndef __GCCXML__
26 
27  /// You MUST check here before accessing \ref PECorr, \ref MIP or \ref GeV
28  bool IsCalibrated() const;
29 
30  void Print() const;
31 
32  // Getters
33  float PECorr() const;
34  float MIP () const;
35  float GeV () const;
36  float X () const { return fX; }
37  float Y () const { return fY; }
38  float Z () const { return fZ; }
39  float T () const { return fT; }
40 
41  // Setters
42  void SetPECorr(float PECorr) { fPECorr = PECorr; }
43  void SetMIP (float MIP ) { fMIP = MIP; }
44  void SetGeV (float GeV ) { fGeV = GeV; }
45  void SetX (float X ) { fX = X; }
46  void SetY (float Y ) { fY = Y; }
47  void SetZ (float Z ) { fZ = Z; }
48  void SetT (float T ) { fT = T; }
49 
50  friend std::ostream& operator << (std::ostream& o, const RecoHit& r);
51 #endif // __GCCXML__
52 
53  protected:
54  float fPECorr; ///< PE with attenuation corrections added
55  float fMIP; ///< pulseheight normalized to a MIP
56  float fGeV; ///< energy deposition represented by this hit
57  float fX; ///< spacetime location of deposition, x (cm)
58  float fY; ///< spacetime location of deposition, y (cm)
59  float fZ; ///< spacetime location of deposition, z (cm)
60  float fT; ///< spacetime location of deposition, t (ns)
61  };
62 
63 } // end namespace rb
64 
65 #endif // RBRECOHIT_H
66 
67 ////////////////////////////////////////////////////////////////////////
float T() const
Definition: RecoHit.h:39
float fZ
spacetime location of deposition, z (cm)
Definition: RecoHit.h:59
void SetGeV(float GeV)
Definition: RecoHit.h:44
void SetMIP(float MIP)
Definition: RecoHit.h:43
float Z() const
Definition: RecoHit.h:38
void SetX(float X)
Definition: RecoHit.h:45
friend std::ostream & operator<<(std::ostream &o, const RecoHit &r)
Definition: RecoHit.cxx:80
void SetT(float T)
Definition: RecoHit.h:48
float fY
spacetime location of deposition, y (cm)
Definition: RecoHit.h:58
float fPECorr
PE with attenuation corrections added.
Definition: RecoHit.h:54
Calibrated quantities relying on position in the orthogonal view. To generate a rb::CellHit from a rb...
Definition: RecoHit.h:19
float fT
spacetime location of deposition, t (ns)
Definition: RecoHit.h:60
float fX
spacetime location of deposition, x (cm)
Definition: RecoHit.h:57
bool IsCalibrated() const
You MUST check here before accessing PECorr, MIP or GeV.
Definition: RecoHit.cxx:35
void Print() const
Definition: RecoHit.cxx:41
Perform a "2 point" Hough transform on a collection of hits.
float fGeV
energy deposition represented by this hit
Definition: RecoHit.h:56
float MIP() const
Definition: RecoHit.cxx:58
void SetY(float Y)
Definition: RecoHit.h:46
float GeV() const
Definition: RecoHit.cxx:69
float X() const
Definition: RecoHit.h:36
TRandom3 r(0)
void SetPECorr(float PECorr)
Definition: RecoHit.h:42
float Y() const
Definition: RecoHit.h:37
float PECorr() const
Definition: RecoHit.cxx:47
void SetZ(float Z)
Definition: RecoHit.h:47
float fMIP
pulseheight normalized to a MIP
Definition: RecoHit.h:55