LArSoft  v08_29_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 20 of file Event.cxx.

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

Definition at line 27 of file Event.cxx.

28  : fID(id)
29  {
30  }
int fID
id for this event
Definition: Event.h:28

Member Function Documentation

double recob::Event::Energy ( ) const

Definition at line 33 of file Event.cxx.

References util::kBogusD.

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

34  {
35  // loop over all vertex objects and get the
36  mf::LogWarning("Event") << "Event::Energy() is not yet defined. Need to decide "
37  << " how to calculate energy of Vertex"
38  << " Return util:kBogusD for now.";
39 
40  return util::kBogusD;
41  }
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 55 of file Event.cxx.

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

Definition at line 44 of file Event.cxx.

References util::kBogusD.

Referenced by recob::operator<<().

45  {
46  // loop over all vertex objects and get the
47  mf::LogWarning("Event") << "Event::SigmaEnergy() is not yet defined. Need to decide "
48  << " how to calculate uncertainty in energy of Prong/Vertex"
49  << " Return util:kBogusD for now.";
50 
51  return util::kBogusD;
52  }
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 79 of file Event.cxx.

80  {
81 
82  return a.Energy() < b.Energy();
83 
84  }
std::ostream& operator<< ( std::ostream &  o,
const Event a 
)
friend

Definition at line 65 of file Event.cxx.

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

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: