LArSoft  v06_80_00
Liquid Argon Software toolkit - http://larsoft.org/
recob::Event Class Reference

#include "Event.h"

Public Member Functions

 Event ()
 
 Event (int id)
 
double Energy () const
 
double SigmaEnergy () const
 
const recob::VertexPrimaryVertex (std::vector< const recob::Vertex * > &vtxs) const
 
int ID () const
 

Private Attributes

int fID
 id for this event More...
 

Friends

std::ostream & operator<< (std::ostream &o, const Event &a)
 
bool operator< (const Event &a, const Event &b)
 

Detailed Description

Definition at line 21 of file Event.h.

Constructor & Destructor Documentation

recob::Event::Event ( )

Definition at line 23 of file Event.cxx.

24  :
26  {
27  }
constexpr int kBogusI
obviously bogus integer value
recob::Event::Event ( int  id)
explicit

Definition at line 30 of file Event.cxx.

31  : fID(id)
32  {
33  }
int fID
id for this event
Definition: Event.h:28

Member Function Documentation

double recob::Event::Energy ( ) const

Definition at line 36 of file Event.cxx.

References util::kBogusD.

Referenced by recob::operator<(), and recob::operator<<().

37  {
38  // loop over all vertex objects and get the
39  mf::LogWarning("Event") << "Event::Energy() is not yet defined. Need to decide "
40  << " how to calculate energy of Vertex"
41  << " Return util:kBogusD for now.";
42 
43  return util::kBogusD;
44  }
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning
constexpr double kBogusD
obviously bogus double value
int recob::Event::ID ( ) const
inline

Definition at line 47 of file Event.h.

References fID.

47 { return fID; }
int fID
id for this event
Definition: Event.h:28
const recob::Vertex * recob::Event::PrimaryVertex ( std::vector< const recob::Vertex * > &  vtxs) const

Definition at line 58 of file Event.cxx.

59  {
60  // sort the vertices, set the first one in z to be the primary
61  std::sort(vtxs.begin(), vtxs.end());
62  return vtxs.front();
63  }
double recob::Event::SigmaEnergy ( ) const

Definition at line 47 of file Event.cxx.

References util::kBogusD.

Referenced by recob::operator<<().

48  {
49  // loop over all vertex objects and get the
50  mf::LogWarning("Event") << "Event::SigmaEnergy() is not yet defined. Need to decide "
51  << " how to calculate uncertainty in energy of Prong/Vertex"
52  << " Return util:kBogusD for now.";
53 
54  return util::kBogusD;
55  }
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning
constexpr double kBogusD
obviously bogus double value

Friends And Related Function Documentation

bool operator< ( const Event a,
const Event b 
)
friend

Definition at line 82 of file Event.cxx.

83  {
84 
85  return a.Energy() < b.Energy();
86 
87  }
std::ostream& operator<< ( std::ostream &  o,
const Event a 
)
friend

Definition at line 68 of file Event.cxx.

69  {
70 
71  o << std::setprecision(5);
72  o << "Event " << a.fID << std::setw(5)
73  << " Energy = " << a.Energy() << " +/- " << a.SigmaEnergy() << std::endl;
74 
75  return o;
76  }

Member Data Documentation

int recob::Event::fID
private

id for this event

Definition at line 28 of file Event.h.

Referenced by ID(), and recob::operator<<().


The documentation for this class was generated from the following files: