LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
sim::MCMiniPart Class Reference

#include "MCRecoPart.h"

Public Member Functions

 MCMiniPart ()
 
virtual ~MCMiniPart ()
 
void Reset ()
 
bool HasDaughter (unsigned int d) const
 
void AddDaughter (unsigned int d)
 
 operator simb::MCParticle () const
 
 MCMiniPart (const simb::MCParticle &p)
 

Public Attributes

unsigned int _track_id
 
std::string _process
 
unsigned int _mother
 
unsigned int _ancestor
 
int _pdgcode
 
TLorentzVector _start_vtx
 
TLorentzVector _start_mom
 
TLorentzVector _end_vtx
 
TLorentzVector _end_mom
 
std::vector< std::pair< TLorentzVector, TLorentzVector > > _det_path
 
std::set< unsigned int > _daughters
 
::simb::Origin_t _origin
 

Detailed Description

Definition at line 23 of file MCRecoPart.h.

Constructor & Destructor Documentation

sim::MCMiniPart::MCMiniPart ( )
inline

Definition at line 26 of file MCRecoPart.h.

References Reset().

26 { Reset(); }
virtual sim::MCMiniPart::~MCMiniPart ( )
inlinevirtual

Definition at line 28 of file MCRecoPart.h.

28 {}
sim::MCMiniPart::MCMiniPart ( const simb::MCParticle p)
inline

Definition at line 77 of file MCRecoPart.h.

References simb::MCParticle::EndMomentum(), simb::MCParticle::EndPosition(), simb::MCParticle::Momentum(), simb::MCParticle::Mother(), simb::MCParticle::PdgCode(), simb::MCParticle::Position(), simb::MCParticle::Process(), Reset(), and simb::MCParticle::TrackId().

78  {
79  Reset();
80  _track_id = p.TrackId();
81  _pdgcode = p.PdgCode();
82  _mother = p.Mother();
83  _process = p.Process();
84  _start_vtx = p.Position();
85  _start_mom = 1.e3 * p.Momentum(); // Change units to (MeV, cm, us)
86  _end_vtx = p.EndPosition();
87  _end_mom = 1.e3 * p.EndMomentum(); // idem as above
88  }
std::string _process
Definition: MCRecoPart.h:31
const TLorentzVector & Position(const int i=0) const
Definition: MCParticle.h:220
int PdgCode() const
Definition: MCParticle.h:213
const TLorentzVector & EndPosition() const
Definition: MCParticle.h:226
int Mother() const
Definition: MCParticle.h:214
std::string Process() const
Definition: MCParticle.h:216
TLorentzVector _start_vtx
Definition: MCRecoPart.h:35
int TrackId() const
Definition: MCParticle.h:211
TLorentzVector _start_mom
Definition: MCRecoPart.h:36
TLorentzVector _end_mom
Definition: MCRecoPart.h:38
TLorentzVector _end_vtx
Definition: MCRecoPart.h:37
unsigned int _mother
Definition: MCRecoPart.h:32
const TLorentzVector & Momentum(const int i=0) const
Definition: MCParticle.h:221
unsigned int _track_id
Definition: MCRecoPart.h:30
const TLorentzVector & EndMomentum() const
Definition: MCParticle.h:241

Member Function Documentation

void sim::MCMiniPart::AddDaughter ( unsigned int  d)
inline

Definition at line 64 of file MCRecoPart.h.

64 { _daughters.insert(d); }
Float_t d
Definition: plot.C:235
std::set< unsigned int > _daughters
Definition: MCRecoPart.h:40
bool sim::MCMiniPart::HasDaughter ( unsigned int  d) const
inline

Definition at line 59 of file MCRecoPart.h.

References d.

60  {
61  return std::find(_daughters.begin(), _daughters.end(), d) != _daughters.end();
62  }
Float_t d
Definition: plot.C:235
std::set< unsigned int > _daughters
Definition: MCRecoPart.h:40
sim::MCMiniPart::operator simb::MCParticle ( ) const
inline

Definition at line 66 of file MCRecoPart.h.

References simb::MCParticle::AddDaughter(), simb::MCParticle::AddTrajectoryPoint(), d, and e.

67  {
69  // Also converting back from LArSoft units
70  mcpart.AddTrajectoryPoint(_start_vtx, 1.e-3 * _start_mom);
71  mcpart.AddTrajectoryPoint(_end_vtx, 1.e-3 * _end_mom);
72  for (auto const& d : _daughters)
73  mcpart.AddDaughter(d);
74  return mcpart;
75  }
std::string _process
Definition: MCRecoPart.h:31
TLorentzVector _start_vtx
Definition: MCRecoPart.h:35
TLorentzVector _start_mom
Definition: MCRecoPart.h:36
TLorentzVector _end_mom
Definition: MCRecoPart.h:38
Float_t d
Definition: plot.C:235
TLorentzVector _end_vtx
Definition: MCRecoPart.h:37
unsigned int _mother
Definition: MCRecoPart.h:32
unsigned int _track_id
Definition: MCRecoPart.h:30
Float_t e
Definition: plot.C:35
std::set< unsigned int > _daughters
Definition: MCRecoPart.h:40
void sim::MCMiniPart::Reset ( )
inline

Definition at line 43 of file MCRecoPart.h.

References geoalgo::kINVALID_DOUBLE, sim::kINVALID_INT, sim::kINVALID_UINT, and geo::kUnknown.

44  {
47  _process = "";
49 
51  _start_vtx = invalid;
52  _start_mom = invalid;
53  _end_vtx = invalid;
54  _end_mom = invalid;
55  _daughters.clear();
56  _det_path.clear();
57  }
std::string _process
Definition: MCRecoPart.h:31
const double kINVALID_DOUBLE
Definition: MCLimits.h:10
const int kINVALID_INT
Definition: MCLimits.h:16
Unknown view.
Definition: geo_types.h:142
TLorentzVector _start_vtx
Definition: MCRecoPart.h:35
TLorentzVector _start_mom
Definition: MCRecoPart.h:36
TLorentzVector _end_mom
Definition: MCRecoPart.h:38
std::vector< std::pair< TLorentzVector, TLorentzVector > > _det_path
Definition: MCRecoPart.h:39
TLorentzVector _end_vtx
Definition: MCRecoPart.h:37
::simb::Origin_t _origin
Definition: MCRecoPart.h:41
unsigned int _mother
Definition: MCRecoPart.h:32
const unsigned int kINVALID_UINT
Definition: MCLimits.h:14
unsigned int _track_id
Definition: MCRecoPart.h:30
std::set< unsigned int > _daughters
Definition: MCRecoPart.h:40
unsigned int _ancestor
Definition: MCRecoPart.h:33

Member Data Documentation

unsigned int sim::MCMiniPart::_ancestor

Definition at line 33 of file MCRecoPart.h.

std::set<unsigned int> sim::MCMiniPart::_daughters

Definition at line 40 of file MCRecoPart.h.

std::vector<std::pair<TLorentzVector, TLorentzVector> > sim::MCMiniPart::_det_path

Definition at line 39 of file MCRecoPart.h.

TLorentzVector sim::MCMiniPart::_end_mom
TLorentzVector sim::MCMiniPart::_end_vtx
unsigned int sim::MCMiniPart::_mother

Definition at line 32 of file MCRecoPart.h.

::simb::Origin_t sim::MCMiniPart::_origin

Definition at line 41 of file MCRecoPart.h.

int sim::MCMiniPart::_pdgcode
std::string sim::MCMiniPart::_process
TLorentzVector sim::MCMiniPart::_start_mom
TLorentzVector sim::MCMiniPart::_start_vtx
unsigned int sim::MCMiniPart::_track_id

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