LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
OpFlash.h
Go to the documentation of this file.
1 //
3 // \brief Definition of OpFlash object for LArSoft
4 //
5 // \author bjpjones@mit.edu
6 // cschiu@mit.edu
7 //
9 #ifndef OPFLASH_H
10 #define OPFLASH_H
11 
12 #include <vector>
13 
14 namespace recob {
15 
16  // subevents are groupings of OpDet pulse peaks. Each peak comes from an OpDet and
17  // has a certain number of PE; each subevent has a time associated with it
18  class OpFlash {
19  public:
20  OpFlash(); // Default constructor
21 
22 private:
23 
24  double fTime; // Time relative to trigger
25  double fTimeWidth; // Width of the flash in time
26  double fAbsTime; // Time by PMT readout clock
27  unsigned int fFrame; // Frame number
28  std::vector< double > fPEperOpDet; // Number of PE on each PMT
29  std::vector< double > fWireCenters; // Geometric center in each view
30  std::vector< double > fWireWidths; // Geometric width in each view
31  double fYCenter; // Geometric center in y
32  double fYWidth; // Geometric width in y
33  double fZCenter; // Geometric center in z
34  double fZWidth; // Geometric width in z
35  double fFastToTotal; // Fast to total light ratio
36  bool fInBeamFrame; // Is this in the beam frame?
37  int fOnBeamTime; // Is this in time with beam?
38 
39 
40 
41 
42  public:
43  OpFlash(double time, double timewidth, double abstime, unsigned int frame,
44  std::vector< double > PEperOpDet,
45  bool InBeamFrame=0, int OnBeamTime=0, double FastToTotal=1,
46  double yCenter=0, double yWidth=0,
47  double zCenter=0, double zWidth=0,
48  std::vector<double> WireCenters = std::vector<double>(0),
49  std::vector<double> WireWidths = std::vector<double>(0));
50 
51  // Get Methods
52  double Time() const;
53  double TimeWidth() const;
54  double AbsTime() const;
55  unsigned int Frame() const;
56  double PE(unsigned int i) const;
57 
59  std::vector<double> const& PEs() const;
60 
61  double YCenter() const;
62  double YWidth() const;
63  double ZCenter() const;
64  double ZWidth() const;
65 
66  bool InBeamFrame() const;
67  int OnBeamTime() const;
68 
69  std::vector<double> WireCenters() const;
70  std::vector<double> WireWidths() const;
71 
72  friend bool operator < (const OpFlash & a, const OpFlash & b);
73 
74  double TotalPE() const;
75  double FastToTotal() const;
76 
77 
78  };
79 
80 }
81 
82 
83 inline double recob::OpFlash::Time() const { return fTime; }
84 inline double recob::OpFlash::TimeWidth() const { return fTimeWidth; }
85 inline double recob::OpFlash::AbsTime() const { return fAbsTime; }
86 inline unsigned int recob::OpFlash::Frame() const { return fFrame; }
87 inline double recob::OpFlash::PE(unsigned int i) const { return fPEperOpDet[i]; }
88 inline std::vector<double> const& recob::OpFlash::PEs() const { return fPEperOpDet; }
89 inline double recob::OpFlash::YCenter() const { return fYCenter; }
90 inline double recob::OpFlash::YWidth() const { return fYWidth; }
91 inline double recob::OpFlash::ZCenter() const { return fZCenter; }
92 inline double recob::OpFlash::ZWidth() const { return fZWidth; }
93 inline double recob::OpFlash::FastToTotal() const { return fFastToTotal; }
94 inline std::vector<double> recob::OpFlash::WireCenters() const { return fWireCenters; }
95 inline std::vector<double> recob::OpFlash::WireWidths() const { return fWireWidths; }
96 inline bool recob::OpFlash::InBeamFrame() const { return fInBeamFrame; }
97 inline int recob::OpFlash::OnBeamTime() const { return fOnBeamTime; }
98 
99 namespace recob{
101  bool operator() (recob::OpFlash i, recob::OpFlash j){ return i.Time() < j.Time(); }
102  };
103 }
104 
105 
106 #endif
std::vector< double > fPEperOpDet
Definition: OpFlash.h:28
double fYCenter
Definition: OpFlash.h:31
double fTime
Definition: OpFlash.h:24
Reconstruction base classes.
double FastToTotal() const
Definition: OpFlash.h:93
double TimeWidth() const
Definition: OpFlash.h:84
double fZCenter
Definition: OpFlash.h:33
double PE(unsigned int i) const
Definition: OpFlash.h:87
double fZWidth
Definition: OpFlash.h:34
double ZCenter() const
Definition: OpFlash.h:91
double Time() const
Definition: OpFlash.h:83
friend bool operator<(const OpFlash &a, const OpFlash &b)
Definition: OpFlash.cxx:50
double fYWidth
Definition: OpFlash.h:32
int OnBeamTime() const
Definition: OpFlash.h:97
unsigned int fFrame
Definition: OpFlash.h:27
unsigned int Frame() const
Definition: OpFlash.h:86
std::vector< double > WireCenters() const
Definition: OpFlash.h:94
double fFastToTotal
Definition: OpFlash.h:35
double fAbsTime
Definition: OpFlash.h:26
std::vector< double > WireWidths() const
Definition: OpFlash.h:95
std::vector< double > fWireWidths
Definition: OpFlash.h:30
double YWidth() const
Definition: OpFlash.h:90
std::vector< double > const & PEs() const
Returns a vector with a number of photoelectrons per channel.
Definition: OpFlash.h:88
bool fInBeamFrame
Definition: OpFlash.h:36
double TotalPE() const
Definition: OpFlash.cxx:56
double YCenter() const
Definition: OpFlash.h:89
int fOnBeamTime
Definition: OpFlash.h:37
std::vector< double > fWireCenters
Definition: OpFlash.h:29
double AbsTime() const
Definition: OpFlash.h:85
double fTimeWidth
Definition: OpFlash.h:25
double ZWidth() const
Definition: OpFlash.h:92
bool InBeamFrame() const
Definition: OpFlash.h:96