LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
artg4tk::GenParticle Class Reference

#include "GenParticle.hh"

Public Types

enum  status_type { undefined = -1, alive = 0, decayed = 1 }
 
typedef art::PtrVector< GenParticlechildren_type
 

Public Member Functions

 GenParticle ()
 
 GenParticle (PDGCode::type pdgId, art::Ptr< GenParticle > const &parent, CLHEP::Hep3Vector const &position, CLHEP::HepLorentzVector const &momentum, status_type status)
 
PDGCode::type pdgId () const
 
art::Ptr< GenParticle > const & parent () const
 
children_type const & children () const
 
art::Ptr< GenParticle > const & child (size_t i) const
 
CLHEP::Hep3Vector const & position () const
 
CLHEP::HepLorentzVector const & momentum () const
 
status_type status () const
 
void addChild (art::Ptr< GenParticle > const &child)
 
bool operator< (GenParticle const &) const
 

Private Attributes

PDGCode::type _pdgId
 
art::Ptr< GenParticle_parent
 
children_type _children
 
CLHEP::Hep3Vector _position
 
CLHEP::HepLorentzVector _momentum
 
status_type _status
 

Detailed Description

Definition at line 20 of file GenParticle.hh.

Member Typedef Documentation

Member Enumeration Documentation

Enumerator
undefined 
alive 
decayed 

Definition at line 23 of file GenParticle.hh.

Constructor & Destructor Documentation

artg4tk::GenParticle::GenParticle ( )

Definition at line 8 of file GenParticle.cc.

10 {}
PDGCode::type _pdgId
Definition: GenParticle.hh:84
status_type _status
Definition: GenParticle.hh:94
CLHEP::HepLorentzVector _momentum
Definition: GenParticle.hh:92
art::Ptr< GenParticle > _parent
Definition: GenParticle.hh:87
children_type _children
Definition: GenParticle.hh:88
CLHEP::Hep3Vector _position
Definition: GenParticle.hh:91
artg4tk::GenParticle::GenParticle ( PDGCode::type  pdgId,
art::Ptr< GenParticle > const &  parent,
CLHEP::Hep3Vector const &  position,
CLHEP::HepLorentzVector const &  momentum,
status_type  status 
)

Definition at line 12 of file GenParticle.cc.

17  : _pdgId(pdgId)
18  , _parent(parent)
19  , _children()
22  , _status(status)
23 {}
CLHEP::Hep3Vector const & position() const
Definition: GenParticle.hh:55
PDGCode::type _pdgId
Definition: GenParticle.hh:84
status_type _status
Definition: GenParticle.hh:94
PDGCode::type pdgId() const
Definition: GenParticle.hh:35
CLHEP::HepLorentzVector const & momentum() const
Definition: GenParticle.hh:60
CLHEP::HepLorentzVector _momentum
Definition: GenParticle.hh:92
art::Ptr< GenParticle > _parent
Definition: GenParticle.hh:87
status_type status() const
Definition: GenParticle.hh:65
children_type _children
Definition: GenParticle.hh:88
CLHEP::Hep3Vector _position
Definition: GenParticle.hh:91

Member Function Documentation

void artg4tk::GenParticle::addChild ( art::Ptr< GenParticle > const &  child)

Definition at line 26 of file GenParticle.cc.

References _children, and art::PtrVector< T >::push_back().

Referenced by status().

27 {
28  _children.push_back(child);
29 }
void push_back(Ptr< U > const &p)
Definition: PtrVector.h:435
children_type _children
Definition: GenParticle.hh:88
art::Ptr<GenParticle> const& artg4tk::GenParticle::child ( size_t  i) const
inline

Definition at line 50 of file GenParticle.hh.

References _children, and art::PtrVector< T >::at().

Referenced by artg4tk::operator<<(), and status().

51  {
52  return _children.at(i);
53  }
reference at(size_type n)
Definition: PtrVector.h:359
children_type _children
Definition: GenParticle.hh:88
children_type const& artg4tk::GenParticle::children ( ) const
inline

Definition at line 45 of file GenParticle.hh.

References _children.

Referenced by artg4tk::operator<<().

46  {
47  return _children;
48  }
children_type _children
Definition: GenParticle.hh:88
CLHEP::HepLorentzVector const& artg4tk::GenParticle::momentum ( ) const
inline

Definition at line 60 of file GenParticle.hh.

References _momentum.

Referenced by artg4tk::CheckGenParticle::analyze(), and artg4tk::operator<<().

61  {
62  return _momentum;
63  }
CLHEP::HepLorentzVector _momentum
Definition: GenParticle.hh:92
bool artg4tk::GenParticle::operator< ( GenParticle const &  ) const
inline

Definition at line 77 of file GenParticle.hh.

78  {
79  return true;
80  }
art::Ptr<GenParticle> const& artg4tk::GenParticle::parent ( ) const
inline

Definition at line 40 of file GenParticle.hh.

References _parent.

Referenced by artg4tk::operator<<().

41  {
42  return _parent;
43  }
art::Ptr< GenParticle > _parent
Definition: GenParticle.hh:87
PDGCode::type artg4tk::GenParticle::pdgId ( ) const
inline

Definition at line 35 of file GenParticle.hh.

References _pdgId.

Referenced by artg4tk::CheckGenParticle::analyze(), and artg4tk::operator<<().

36  {
37  return _pdgId;
38  }
PDGCode::type _pdgId
Definition: GenParticle.hh:84
CLHEP::Hep3Vector const& artg4tk::GenParticle::position ( ) const
inline

Definition at line 55 of file GenParticle.hh.

References _position.

Referenced by artg4tk::operator<<().

56  {
57  return _position;
58  }
CLHEP::Hep3Vector _position
Definition: GenParticle.hh:91
status_type artg4tk::GenParticle::status ( ) const
inline

Definition at line 65 of file GenParticle.hh.

References _status, addChild(), and child().

Referenced by artg4tk::operator<<().

66  {
67  return _status;
68  }
status_type _status
Definition: GenParticle.hh:94

Member Data Documentation

children_type artg4tk::GenParticle::_children
private

Definition at line 88 of file GenParticle.hh.

Referenced by addChild(), child(), and children().

CLHEP::HepLorentzVector artg4tk::GenParticle::_momentum
private

Definition at line 92 of file GenParticle.hh.

Referenced by momentum().

art::Ptr<GenParticle> artg4tk::GenParticle::_parent
private

Definition at line 87 of file GenParticle.hh.

Referenced by parent().

PDGCode::type artg4tk::GenParticle::_pdgId
private

Definition at line 84 of file GenParticle.hh.

Referenced by pdgId().

CLHEP::Hep3Vector artg4tk::GenParticle::_position
private

Definition at line 91 of file GenParticle.hh.

Referenced by position().

status_type artg4tk::GenParticle::_status
private

Definition at line 94 of file GenParticle.hh.

Referenced by status().


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