LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
OpFlash.cxx
Go to the documentation of this file.
1 //
3 // \brief Definition of OpFlash reconstruction object
4 //
5 // \author bjpjones@mit.edu
6 // cschiu@mit.edu
7 //
9 
11 
12 #include <cstddef> // std::size_t
13 
14 namespace recob{
15 
16  //----------------------------------------------------------------------
18  : fTime( 0. )
19  {
20 
21  }
22 
23  //----------------------------------------------------------------------
24  OpFlash::OpFlash(double time, double timewidth, double abstime, unsigned int frame,
25  std::vector<double> PEperOpDet,
26  bool InBeamFrame, int onBeamTime, double FastToTotal,
27  double yCenter, double yWidth,
28  double zCenter, double zWidth,
29  std::vector<double> WireCenters,
30  std::vector<double> WireWidths)
31  {
32  for (unsigned int i = 0; i < PEperOpDet.size(); ++i)
33  fPEperOpDet.push_back(PEperOpDet[i]);
34  fFrame = frame;
35  fAbsTime = abstime;
36  fTimeWidth = timewidth;
37  fTime = time;
38  fYCenter = yCenter;
39  fYWidth = yWidth;
40  fZCenter = zCenter;
41  fZWidth = zWidth;
46  fOnBeamTime = onBeamTime;
47  }
48 
49  //----------------------------------------------------------------------
50  bool operator < (const OpFlash & a, const OpFlash & b)
51  {
52  return a.Time() < b.Time();
53  }
54 
55  //----------------------------------------------------------------------
56  double OpFlash::TotalPE() const
57  {
58  double theTotalPE=0;
59  for(size_t i=0; i!=fPEperOpDet.size(); ++i)
60  theTotalPE+=fPEperOpDet.at(i);
61  return theTotalPE;
62  }
63 
64 
65 
66 }
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 fZCenter
Definition: OpFlash.h:33
double fZWidth
Definition: OpFlash.h:34
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
unsigned int fFrame
Definition: OpFlash.h:27
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
bool fInBeamFrame
Definition: OpFlash.h:36
double TotalPE() const
Definition: OpFlash.cxx:56
int fOnBeamTime
Definition: OpFlash.h:37
std::vector< double > fWireCenters
Definition: OpFlash.h:29
double fTimeWidth
Definition: OpFlash.h:25
bool InBeamFrame() const
Definition: OpFlash.h:96