LArSoft  v09_90_00
Liquid Argon Software toolkit - https://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 19 of file Event.h.

Constructor & Destructor Documentation

recob::Event::Event ( )

Definition at line 20 of file Event.cxx.

20 : Event(util::kBogusI) {}
constexpr int kBogusI
obviously bogus integer value
recob::Event::Event ( int  id)
explicit

Definition at line 23 of file Event.cxx.

23 : fID(id) {}
int fID
id for this event
Definition: Event.h:25

Member Function Documentation

double recob::Event::Energy ( ) const

Definition at line 26 of file Event.cxx.

References util::kBogusD.

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

27  {
28  // loop over all vertex objects and get the
29  mf::LogWarning("Event") << "Event::Energy() is not yet defined. Need to decide "
30  << " how to calculate energy of Vertex"
31  << " Return util:kBogusD for now.";
32 
33  return util::kBogusD;
34  }
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning
constexpr double kBogusD
obviously bogus double value
int recob::Event::ID ( ) const
inline

Definition at line 40 of file Event.h.

References fID.

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

Definition at line 48 of file Event.cxx.

49  {
50  // sort the vertices, set the first one in z to be the primary
51  std::sort(vtxs.begin(), vtxs.end());
52  return vtxs.front();
53  }
double recob::Event::SigmaEnergy ( ) const

Definition at line 37 of file Event.cxx.

References util::kBogusD.

Referenced by recob::operator<<().

38  {
39  // loop over all vertex objects and get the
40  mf::LogWarning("Event") << "Event::SigmaEnergy() is not yet defined. Need to decide "
41  << " how to calculate uncertainty in energy of Prong/Vertex"
42  << " Return util:kBogusD for now.";
43 
44  return util::kBogusD;
45  }
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 71 of file Event.cxx.

72  {
73  return a.Energy() < b.Energy();
74  }
std::ostream& operator<< ( std::ostream &  o,
const Event a 
)
friend

Definition at line 58 of file Event.cxx.

59  {
60 
61  o << std::setprecision(5);
62  o << "Event " << a.fID << std::setw(5) << " Energy = " << a.Energy() << " +/- "
63  << a.SigmaEnergy() << std::endl;
64 
65  return o;
66  }

Member Data Documentation

int recob::Event::fID
private

id for this event

Definition at line 25 of file Event.h.

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


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