All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Public Attributes | List of all members
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)
 
 MCMiniPart (const sim::MCParticleLite &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 27 of file MCRecoPart.h.

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

Definition at line 29 of file MCRecoPart.h.

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

Definition at line 82 of file MCRecoPart.h.

82  {
83  Reset();
84  _track_id = p.TrackId();
85  _pdgcode = p.PdgCode();
86  _mother = p.Mother();
87  _process = p.Process();
88  _start_vtx = p.Position();
89  _start_mom = 1.e3 * p.Momentum(); // Change units to (MeV, cm, us)
90  _end_vtx = p.EndPosition();
91  _end_mom = 1.e3 * p.EndMomentum(); // idem as above
92  }
std::string _process
Definition: MCRecoPart.h:32
pdgs p
Definition: selectors.fcl:22
TLorentzVector _start_vtx
Definition: MCRecoPart.h:36
TLorentzVector _start_mom
Definition: MCRecoPart.h:37
TLorentzVector _end_mom
Definition: MCRecoPart.h:39
TLorentzVector _end_vtx
Definition: MCRecoPart.h:38
unsigned int _mother
Definition: MCRecoPart.h:33
unsigned int _track_id
Definition: MCRecoPart.h:31
sim::MCMiniPart::MCMiniPart ( const sim::MCParticleLite p)
inline

Definition at line 94 of file MCRecoPart.h.

94  {
95  Reset();
96  _track_id = p.TrackID();
97  _pdgcode = p.PdgCode();
98  _mother = p.Mother();
99  _process = p.Process();
100  _start_vtx = p.StartVtx();
101  _start_mom = 1.e3 * p.StartMom(); // Change units to (MeV, cm, us)
102  _end_vtx = p.EndVtx();
103  _end_mom = 1.e3 * p.EndMom(); // idem as above
104  }
std::string _process
Definition: MCRecoPart.h:32
const TLorentzVector & EndVtx() const
const TLorentzVector & EndMom() const
const TLorentzVector & StartVtx() const
TLorentzVector _start_vtx
Definition: MCRecoPart.h:36
TLorentzVector _start_mom
Definition: MCRecoPart.h:37
const std::string & Process() const
unsigned int Mother() const
int PdgCode() const
TLorentzVector _end_mom
Definition: MCRecoPart.h:39
TLorentzVector _end_vtx
Definition: MCRecoPart.h:38
unsigned int _mother
Definition: MCRecoPart.h:33
unsigned int TrackID() const
unsigned int _track_id
Definition: MCRecoPart.h:31
const TLorentzVector & StartMom() const

Member Function Documentation

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

Definition at line 66 of file MCRecoPart.h.

66  {
67  _daughters.insert(d);
68  }
std::set< unsigned int > _daughters
Definition: MCRecoPart.h:41
bool sim::MCMiniPart::HasDaughter ( unsigned int  d) const
inline

Definition at line 62 of file MCRecoPart.h.

62  {
63  return std::find(_daughters.begin(), _daughters.end(), d) != _daughters.end();
64  }
std::set< unsigned int > _daughters
Definition: MCRecoPart.h:41
sim::MCMiniPart::operator simb::MCParticle ( ) const
inline

Definition at line 70 of file MCRecoPart.h.

70  {
71  simb::MCParticle mcpart(_track_id,
72  _pdgcode,
73  _process,
74  _mother);
75  // Also converting back from LArSoft units
76  mcpart.AddTrajectoryPoint(_start_vtx, 1.e-3 * _start_mom);
77  mcpart.AddTrajectoryPoint(_end_vtx, 1.e-3 * _end_mom);
78  for (auto const & d : _daughters) mcpart.AddDaughter(d);
79  return mcpart;
80  }
std::string _process
Definition: MCRecoPart.h:32
TLorentzVector _start_vtx
Definition: MCRecoPart.h:36
TLorentzVector _start_mom
Definition: MCRecoPart.h:37
TLorentzVector _end_mom
Definition: MCRecoPart.h:39
TLorentzVector _end_vtx
Definition: MCRecoPart.h:38
unsigned int _mother
Definition: MCRecoPart.h:33
do i e
unsigned int _track_id
Definition: MCRecoPart.h:31
std::set< unsigned int > _daughters
Definition: MCRecoPart.h:41
void sim::MCMiniPart::Reset ( )
inline

Definition at line 44 of file MCRecoPart.h.

44  {
47  _process = "";
48  _origin = ::simb::kUnknown;
49 
50  TLorentzVector invalid(kINVALID_DOUBLE,
54  _start_vtx = invalid;
55  _start_mom = invalid;
56  _end_vtx = invalid;
57  _end_mom = invalid;
58  _daughters.clear();
59  _det_path.clear();
60  }
std::string _process
Definition: MCRecoPart.h:32
const double kINVALID_DOUBLE
Definition: MCLimits.h:10
const int kINVALID_INT
Definition: MCLimits.h:16
TLorentzVector _start_vtx
Definition: MCRecoPart.h:36
std::vector< std::pair< TLorentzVector, TLorentzVector > > _det_path
Definition: MCRecoPart.h:40
TLorentzVector _start_mom
Definition: MCRecoPart.h:37
TLorentzVector _end_mom
Definition: MCRecoPart.h:39
TLorentzVector _end_vtx
Definition: MCRecoPart.h:38
::simb::Origin_t _origin
Definition: MCRecoPart.h:42
unsigned int _mother
Definition: MCRecoPart.h:33
const unsigned int kINVALID_UINT
Definition: MCLimits.h:14
unsigned int _track_id
Definition: MCRecoPart.h:31
std::set< unsigned int > _daughters
Definition: MCRecoPart.h:41
unsigned int _ancestor
Definition: MCRecoPart.h:34

Member Data Documentation

unsigned int sim::MCMiniPart::_ancestor

Definition at line 34 of file MCRecoPart.h.

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

Definition at line 41 of file MCRecoPart.h.

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

Definition at line 40 of file MCRecoPart.h.

TLorentzVector sim::MCMiniPart::_end_mom

Definition at line 39 of file MCRecoPart.h.

TLorentzVector sim::MCMiniPart::_end_vtx

Definition at line 38 of file MCRecoPart.h.

unsigned int sim::MCMiniPart::_mother

Definition at line 33 of file MCRecoPart.h.

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

Definition at line 42 of file MCRecoPart.h.

int sim::MCMiniPart::_pdgcode

Definition at line 35 of file MCRecoPart.h.

std::string sim::MCMiniPart::_process

Definition at line 32 of file MCRecoPart.h.

TLorentzVector sim::MCMiniPart::_start_mom

Definition at line 37 of file MCRecoPart.h.

TLorentzVector sim::MCMiniPart::_start_vtx

Definition at line 36 of file MCRecoPart.h.

unsigned int sim::MCMiniPart::_track_id

Definition at line 31 of file MCRecoPart.h.


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