LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
MCBase

Files

file  MCBaseException.h
 Class def header for exception classes for MC data products.
 
file  MCParticleLite.h
 Class def header for MCParticleLite data container.
 
file  MCShower.h
 Class def header for MCShower data container.
 
file  MCStep.h
 Class def header for mcstep data container.
 
file  MCTrack.h
 Class def header for mctrack data container.
 

Namespaces

 sim
 Monte Carlo Simulation.
 

Classes

class  sim::MCParticleLite
 

Functions

 sim::MCParticleLite::MCParticleLite ()
 
virtual sim::MCParticleLite::~MCParticleLite ()
 
void sim::MCParticleLite::AddDaughter (unsigned int d)
 
bool sim::MCParticleLite::HasDaughter (unsigned int d) const
 
const simb::Origin_tsim::MCParticleLite::Origin () const
 
int sim::MCParticleLite::PdgCode () const
 
unsigned int sim::MCParticleLite::TrackID () const
 
const std::string & sim::MCParticleLite::Process () const
 
unsigned int sim::MCParticleLite::Mother () const
 
unsigned int sim::MCParticleLite::Ancestor () const
 
const TLorentzVector & sim::MCParticleLite::StartVtx () const
 
const TLorentzVector & sim::MCParticleLite::StartMom () const
 
const TLorentzVector & sim::MCParticleLite::EndVtx () const
 
const TLorentzVector & sim::MCParticleLite::EndMom () const
 
const std::vector< std::pair< TLorentzVector, TLorentzVector > > & sim::MCParticleLite::DetPath () const
 
const std::vector< unsigned int > & sim::MCParticleLite::Daughters () const
 
void sim::MCParticleLite::Origin (simb::Origin_t o)
 
void sim::MCParticleLite::PdgCode (int id)
 
void sim::MCParticleLite::TrackID (unsigned int id)
 
void sim::MCParticleLite::Process (const std::string &name)
 
void sim::MCParticleLite::Mother (unsigned int id)
 
void sim::MCParticleLite::Ancestor (unsigned int id)
 
void sim::MCParticleLite::StartVtx (const TLorentzVector &vtx)
 
void sim::MCParticleLite::StartMom (const TLorentzVector &mom)
 
void sim::MCParticleLite::EndVtx (const TLorentzVector &vtx)
 
void sim::MCParticleLite::EndMom (const TLorentzVector &mom)
 
void sim::MCParticleLite::DetPath (const std::vector< std::pair< TLorentzVector, TLorentzVector >> &p)
 
void sim::MCParticleLite::DetPath (std::vector< std::pair< TLorentzVector, TLorentzVector >> &&p)
 
void sim::MCParticleLite::Daughters (const std::vector< unsigned int > &d)
 
void sim::MCParticleLite::Daughters (std::vector< unsigned int > &&d)
 
virtual sim::MCParticleLite::operator simb::MCParticle () const
 
 sim::MCParticleLite::MCParticleLite (const simb::MCParticle &p)
 

Variables

unsigned int sim::MCParticleLite::_track_id {kINVALID_UINT}
 
std::string sim::MCParticleLite::_process {}
 
unsigned int sim::MCParticleLite::_mother {kINVALID_UINT}
 
unsigned int sim::MCParticleLite::_ancestor {kINVALID_UINT}
 
int sim::MCParticleLite::_pdgcode {kINVALID_INT}
 
TLorentzVector sim::MCParticleLite::_start_vtx
 
TLorentzVector sim::MCParticleLite::_start_mom
 Start momentum in GeV. More...
 
TLorentzVector sim::MCParticleLite::_end_vtx
 
TLorentzVector sim::MCParticleLite::_end_mom
 End momentum in GeV. More...
 
std::vector< std::pair< TLorentzVector, TLorentzVector > > sim::MCParticleLite::_det_path
 
std::vector< unsigned int > sim::MCParticleLite::_daughters
 
::simb::Origin_t sim::MCParticleLite::_origin {::simb::kUnknown}
 

Detailed Description

Function Documentation

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

Definition at line 41 of file MCParticleLite.h.

References sim::MCParticleLite::_daughters, and sim::MCParticleLite::HasDaughter().

42  {
43  if (!this->HasDaughter(d)) _daughters.push_back(d);
44  }
std::vector< unsigned int > _daughters
bool HasDaughter(unsigned int d) const
Float_t d
Definition: plot.C:235
unsigned int sim::MCParticleLite::Ancestor ( ) const
inline

Definition at line 56 of file MCParticleLite.h.

References sim::MCParticleLite::_ancestor.

56 { return _ancestor; }
unsigned int _ancestor
void sim::MCParticleLite::Ancestor ( unsigned int  id)
inline

Definition at line 73 of file MCParticleLite.h.

References sim::MCParticleLite::_ancestor.

73 { _ancestor = id; }
unsigned int _ancestor
const std::vector<unsigned int>& sim::MCParticleLite::Daughters ( ) const
inline

Definition at line 65 of file MCParticleLite.h.

References sim::MCParticleLite::_daughters.

65 { return _daughters; }
std::vector< unsigned int > _daughters
void sim::MCParticleLite::Daughters ( const std::vector< unsigned int > &  d)
inline

Definition at line 83 of file MCParticleLite.h.

References sim::MCParticleLite::_daughters, and d.

83 { _daughters = d; }
std::vector< unsigned int > _daughters
Float_t d
Definition: plot.C:235
void sim::MCParticleLite::Daughters ( std::vector< unsigned int > &&  d)
inline

Definition at line 84 of file MCParticleLite.h.

References sim::MCParticleLite::_daughters, and d.

84 { _daughters = std::move(d); }
std::vector< unsigned int > _daughters
const std::vector<std::pair<TLorentzVector, TLorentzVector> >& sim::MCParticleLite::DetPath ( ) const
inline

Definition at line 61 of file MCParticleLite.h.

References sim::MCParticleLite::_det_path.

62  {
63  return _det_path;
64  }
std::vector< std::pair< TLorentzVector, TLorentzVector > > _det_path
void sim::MCParticleLite::DetPath ( const std::vector< std::pair< TLorentzVector, TLorentzVector >> &  p)
inline

Definition at line 78 of file MCParticleLite.h.

References sim::MCParticleLite::_det_path.

78 { _det_path = p; }
std::vector< std::pair< TLorentzVector, TLorentzVector > > _det_path
void sim::MCParticleLite::DetPath ( std::vector< std::pair< TLorentzVector, TLorentzVector >> &&  p)
inline

Definition at line 79 of file MCParticleLite.h.

References sim::MCParticleLite::_det_path.

80  {
81  _det_path = std::move(p);
82  }
std::vector< std::pair< TLorentzVector, TLorentzVector > > _det_path
const TLorentzVector& sim::MCParticleLite::EndMom ( ) const
inline

Definition at line 60 of file MCParticleLite.h.

References sim::MCParticleLite::_end_mom.

60 { return _end_mom; }
TLorentzVector _end_mom
End momentum in GeV.
void sim::MCParticleLite::EndMom ( const TLorentzVector &  mom)
inline

Definition at line 77 of file MCParticleLite.h.

References sim::MCParticleLite::_end_mom.

77 { _end_mom = mom; }
TLorentzVector _end_mom
End momentum in GeV.
const TLorentzVector& sim::MCParticleLite::EndVtx ( ) const
inline

Definition at line 59 of file MCParticleLite.h.

References sim::MCParticleLite::_end_vtx.

59 { return _end_vtx; }
TLorentzVector _end_vtx
void sim::MCParticleLite::EndVtx ( const TLorentzVector &  vtx)
inline

Definition at line 76 of file MCParticleLite.h.

References sim::MCParticleLite::_end_vtx.

76 { _end_vtx = vtx; }
TLorentzVector _end_vtx
bool sim::MCParticleLite::HasDaughter ( unsigned int  d) const
inline

Definition at line 45 of file MCParticleLite.h.

References sim::MCParticleLite::_daughters, and d.

Referenced by sim::MCParticleLite::AddDaughter().

46  {
47  return std::find(_daughters.begin(), _daughters.end(), d) != _daughters.end();
48  }
std::vector< unsigned int > _daughters
Float_t d
Definition: plot.C:235
sim::MCParticleLite::MCParticleLite ( )
inline

Definition at line 38 of file MCParticleLite.h.

38 {};
sim::MCParticleLite::MCParticleLite ( const simb::MCParticle p)
inline

Definition at line 96 of file MCParticleLite.h.

References sim::MCParticleLite::_daughters, sim::MCParticleLite::_det_path, sim::MCParticleLite::_end_mom, sim::MCParticleLite::_end_vtx, sim::MCParticleLite::_mother, sim::MCParticleLite::_pdgcode, sim::MCParticleLite::_process, sim::MCParticleLite::_start_mom, sim::MCParticleLite::_start_vtx, sim::MCParticleLite::_track_id, simb::MCParticle::EndMomentum(), simb::MCParticle::EndPosition(), simb::MCParticle::Momentum(), simb::MCParticle::Mother(), simb::MCParticle::PdgCode(), simb::MCParticle::Position(), simb::MCParticle::Process(), and simb::MCParticle::TrackId().

97  {
98  _daughters.clear();
99  _det_path.clear();
100  _track_id = (unsigned int)p.TrackId();
101  _pdgcode = p.PdgCode();
102  _mother = (unsigned int)p.Mother();
103  _process = p.Process();
104  _start_vtx = p.Position();
105  _start_mom = p.Momentum();
106  _end_vtx = p.EndPosition();
107  _end_mom = p.EndMomentum();
108  }
unsigned int _mother
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
TLorentzVector _end_mom
End momentum in GeV.
int Mother() const
Definition: MCParticle.h:214
unsigned int _track_id
std::vector< unsigned int > _daughters
std::string Process() const
Definition: MCParticle.h:216
std::vector< std::pair< TLorentzVector, TLorentzVector > > _det_path
int TrackId() const
Definition: MCParticle.h:211
TLorentzVector _end_vtx
TLorentzVector _start_vtx
TLorentzVector _start_mom
Start momentum in GeV.
const TLorentzVector & Momentum(const int i=0) const
Definition: MCParticle.h:221
const TLorentzVector & EndMomentum() const
Definition: MCParticle.h:241
unsigned int sim::MCParticleLite::Mother ( ) const
inline

Definition at line 55 of file MCParticleLite.h.

References sim::MCParticleLite::_mother.

55 { return _mother; }
unsigned int _mother
void sim::MCParticleLite::Mother ( unsigned int  id)
inline

Definition at line 72 of file MCParticleLite.h.

References sim::MCParticleLite::_mother.

72 { _mother = id; }
unsigned int _mother
virtual sim::MCParticleLite::operator simb::MCParticle ( ) const
inlinevirtual

Definition at line 86 of file MCParticleLite.h.

References sim::MCParticleLite::_daughters, sim::MCParticleLite::_end_mom, sim::MCParticleLite::_end_vtx, sim::MCParticleLite::_mother, sim::MCParticleLite::_pdgcode, sim::MCParticleLite::_process, sim::MCParticleLite::_start_mom, sim::MCParticleLite::_start_vtx, sim::MCParticleLite::_track_id, simb::MCParticle::AddDaughter(), simb::MCParticle::AddTrajectoryPoint(), and d.

87  {
89  mcpart.AddTrajectoryPoint(_start_vtx, _start_mom);
90  mcpart.AddTrajectoryPoint(_end_vtx, _end_mom);
91  for (auto const& d : _daughters)
92  mcpart.AddDaughter(d);
93  return mcpart;
94  }
unsigned int _mother
TLorentzVector _end_mom
End momentum in GeV.
unsigned int _track_id
std::vector< unsigned int > _daughters
TLorentzVector _end_vtx
Float_t d
Definition: plot.C:235
TLorentzVector _start_vtx
TLorentzVector _start_mom
Start momentum in GeV.
const simb::Origin_t& sim::MCParticleLite::Origin ( ) const
inline

Definition at line 51 of file MCParticleLite.h.

References sim::MCParticleLite::_origin.

Referenced by larg4::LArG4::produce().

51 { return _origin; }
::simb::Origin_t _origin
void sim::MCParticleLite::Origin ( simb::Origin_t  o)
inline

Definition at line 68 of file MCParticleLite.h.

References sim::MCParticleLite::_origin.

68 { _origin = o; }
::simb::Origin_t _origin
int sim::MCParticleLite::PdgCode ( ) const
inline

Definition at line 52 of file MCParticleLite.h.

References sim::MCParticleLite::_pdgcode.

52 { return _pdgcode; }
void sim::MCParticleLite::PdgCode ( int  id)
inline

Definition at line 69 of file MCParticleLite.h.

References sim::MCParticleLite::_pdgcode.

69 { _pdgcode = id; }
const std::string& sim::MCParticleLite::Process ( ) const
inline

Definition at line 54 of file MCParticleLite.h.

References sim::MCParticleLite::_process.

54 { return _process; }
void sim::MCParticleLite::Process ( const std::string &  name)
inline

Definition at line 71 of file MCParticleLite.h.

References sim::MCParticleLite::_process.

71 { _process = name; }
const TLorentzVector& sim::MCParticleLite::StartMom ( ) const
inline

Definition at line 58 of file MCParticleLite.h.

References sim::MCParticleLite::_start_mom.

58 { return _start_mom; }
TLorentzVector _start_mom
Start momentum in GeV.
void sim::MCParticleLite::StartMom ( const TLorentzVector &  mom)
inline

Definition at line 75 of file MCParticleLite.h.

References sim::MCParticleLite::_start_mom.

75 { _start_mom = mom; }
TLorentzVector _start_mom
Start momentum in GeV.
const TLorentzVector& sim::MCParticleLite::StartVtx ( ) const
inline

Definition at line 57 of file MCParticleLite.h.

References sim::MCParticleLite::_start_vtx.

57 { return _start_vtx; }
TLorentzVector _start_vtx
void sim::MCParticleLite::StartVtx ( const TLorentzVector &  vtx)
inline

Definition at line 74 of file MCParticleLite.h.

References sim::MCParticleLite::_start_vtx.

74 { _start_vtx = vtx; }
TLorentzVector _start_vtx
unsigned int sim::MCParticleLite::TrackID ( ) const
inline

Definition at line 53 of file MCParticleLite.h.

References sim::MCParticleLite::_track_id.

53 { return _track_id; }
unsigned int _track_id
void sim::MCParticleLite::TrackID ( unsigned int  id)
inline

Definition at line 70 of file MCParticleLite.h.

References sim::MCParticleLite::_track_id.

70 { _track_id = id; }
unsigned int _track_id
virtual sim::MCParticleLite::~MCParticleLite ( )
inlinevirtual

Definition at line 39 of file MCParticleLite.h.

39 {};

Variable Documentation

unsigned int sim::MCParticleLite::_ancestor {kINVALID_UINT}
protected

Definition at line 114 of file MCParticleLite.h.

Referenced by sim::MCParticleLite::Ancestor().

std::vector<std::pair<TLorentzVector, TLorentzVector> > sim::MCParticleLite::_det_path
protected
TLorentzVector sim::MCParticleLite::_end_mom
protected
TLorentzVector sim::MCParticleLite::_end_vtx
protected
unsigned int sim::MCParticleLite::_mother {kINVALID_UINT}
protected
::simb::Origin_t sim::MCParticleLite::_origin {::simb::kUnknown}
protected

Definition at line 130 of file MCParticleLite.h.

Referenced by sim::MCParticleLite::Origin().

int sim::MCParticleLite::_pdgcode {kINVALID_INT}
protected
std::string sim::MCParticleLite::_process {}
protected
TLorentzVector sim::MCParticleLite::_start_mom
protected
TLorentzVector sim::MCParticleLite::_start_vtx
protected
unsigned int sim::MCParticleLite::_track_id {kINVALID_UINT}
protected