#include <MCTrajectory.h>
Public Types | |
typedef std::vector< std::pair< TLorentzVector, TLorentzVector > > | list_type |
typedef list_type::value_type | value_type |
typedef list_type::iterator | iterator |
typedef list_type::const_iterator | const_iterator |
typedef list_type::reverse_iterator | reverse_iterator |
typedef list_type::const_reverse_iterator | const_reverse_iterator |
typedef list_type::size_type | size_type |
typedef list_type::difference_type | difference_type |
typedef std::vector< std::pair< size_t, unsigned char > > | ProcessMap |
Public Member Functions | |
MCTrajectory () | |
MCTrajectory (const TLorentzVector &vertex, const TLorentzVector &momentum) | |
const TLorentzVector & | Position (const size_type) const |
The accessor methods described above. More... | |
const TLorentzVector & | Momentum (const size_type) const |
double | X (const size_type i) const |
double | Y (const size_type i) const |
double | Z (const size_type i) const |
double | T (const size_type i) const |
double | Px (const size_type i) const |
double | Py (const size_type i) const |
double | Pz (const size_type i) const |
double | E (const size_type i) const |
double | TotalLength () const |
iterator | begin () |
const_iterator | begin () const |
iterator | end () |
const_iterator | end () const |
reverse_iterator | rbegin () |
const_reverse_iterator | rbegin () const |
reverse_iterator | rend () |
const_reverse_iterator | rend () const |
size_type | size () const |
bool | empty () const |
void | swap (simb::MCTrajectory &other) |
void | clear () |
const value_type & | operator[] (const size_type i) const |
const value_type & | at (const size_type i) const |
void | push_back (value_type const &v) |
void | push_back (TLorentzVector const &p, TLorentzVector const &m) |
void | Add (TLorentzVector const &p, TLorentzVector const &m) |
void | Add (TLorentzVector const &p, TLorentzVector const &m, std::string const &process, bool keepTransportation=false) |
unsigned char | ProcessToKey (std::string const &process) const |
std::string | KeyToProcess (unsigned char const &key) const |
ProcessMap const & | TrajectoryProcesses () const |
void | Sparsify (double margin=.1, bool keep_second_to_last=false) |
Private Attributes | |
list_type | ftrajectory |
The list of trajectory points. More... | |
ProcessMap | fTrajectoryProcess |
Friends | |
std::ostream & | operator<< (std::ostream &output, const MCTrajectory &) |
Definition at line 58 of file MCTrajectory.h.
typedef list_type::const_iterator simb::MCTrajectory::const_iterator |
Definition at line 66 of file MCTrajectory.h.
typedef list_type::const_reverse_iterator simb::MCTrajectory::const_reverse_iterator |
Definition at line 68 of file MCTrajectory.h.
typedef list_type::difference_type simb::MCTrajectory::difference_type |
Definition at line 70 of file MCTrajectory.h.
typedef list_type::iterator simb::MCTrajectory::iterator |
Definition at line 65 of file MCTrajectory.h.
typedef std::vector< std::pair<TLorentzVector, TLorentzVector> > simb::MCTrajectory::list_type |
Some type definitions to make life easier, and to help "hide" the implementation details. (If you're not familiar with STL, you can ignore these definitions.)
Definition at line 63 of file MCTrajectory.h.
typedef std::vector< std::pair<size_t, unsigned char> > simb::MCTrajectory::ProcessMap |
Definition at line 71 of file MCTrajectory.h.
typedef list_type::reverse_iterator simb::MCTrajectory::reverse_iterator |
Definition at line 67 of file MCTrajectory.h.
typedef list_type::size_type simb::MCTrajectory::size_type |
Definition at line 69 of file MCTrajectory.h.
typedef list_type::value_type simb::MCTrajectory::value_type |
Definition at line 64 of file MCTrajectory.h.
simb::MCTrajectory::MCTrajectory | ( | ) |
Standard constructor: Start with initial position and momentum of the particle.
Definition at line 24 of file MCTrajectory.cxx.
simb::MCTrajectory::MCTrajectory | ( | const TLorentzVector & | vertex, |
const TLorentzVector & | momentum | ||
) |
Definition at line 29 of file MCTrajectory.cxx.
void simb::MCTrajectory::Add | ( | TLorentzVector const & | p, |
TLorentzVector const & | m | ||
) |
void simb::MCTrajectory::Add | ( | TLorentzVector const & | p, |
TLorentzVector const & | m, | ||
std::string const & | process, | ||
bool | keepTransportation = false |
||
) |
Definition at line 136 of file MCTrajectory.cxx.
|
inline |
Definition at line 175 of file MCTrajectory.h.
|
inline |
Standard STL methods, to make this class look like an STL map. Again, if you don't know STL, you can just ignore these methods.
Definition at line 158 of file MCTrajectory.h.
|
inline |
Definition at line 159 of file MCTrajectory.h.
|
inline |
Definition at line 168 of file MCTrajectory.h.
|
inline |
Definition at line 156 of file MCTrajectory.h.
|
inline |
Definition at line 167 of file MCTrajectory.h.
|
inline |
Definition at line 160 of file MCTrajectory.h.
|
inline |
Definition at line 161 of file MCTrajectory.h.
std::string simb::MCTrajectory::KeyToProcess | ( | unsigned char const & | key | ) | const |
Definition at line 117 of file MCTrajectory.cxx.
const TLorentzVector & simb::MCTrajectory::Momentum | ( | const size_type | index | ) | const |
Definition at line 44 of file MCTrajectory.cxx.
|
inline |
Definition at line 172 of file MCTrajectory.h.
const TLorentzVector & simb::MCTrajectory::Position | ( | const size_type | index | ) | const |
The accessor methods described above.
Definition at line 36 of file MCTrajectory.cxx.
unsigned char simb::MCTrajectory::ProcessToKey | ( | std::string const & | process | ) | const |
Definition at line 97 of file MCTrajectory.cxx.
void simb::MCTrajectory::push_back | ( | value_type const & | v | ) |
The only "set" methods for this class; once you've added a trajectory point, you can't take it back.
void simb::MCTrajectory::push_back | ( | TLorentzVector const & | p, |
TLorentzVector const & | m | ||
) |
|
inline |
Definition at line 153 of file MCTrajectory.h.
|
inline |
Definition at line 154 of file MCTrajectory.h.
|
inline |
Definition at line 155 of file MCTrajectory.h.
|
inline |
Definition at line 162 of file MCTrajectory.h.
|
inline |
Definition at line 163 of file MCTrajectory.h.
|
inline |
Definition at line 164 of file MCTrajectory.h.
|
inline |
Definition at line 165 of file MCTrajectory.h.
|
inline |
Definition at line 166 of file MCTrajectory.h.
void simb::MCTrajectory::Sparsify | ( | double | margin = .1 , |
bool | keep_second_to_last = false |
||
) |
Remove points from trajectory. Straight line interpolation between the remaining points will pass no further than margin from removed points.
Definition at line 160 of file MCTrajectory.cxx.
|
inline |
Definition at line 169 of file MCTrajectory.h.
|
inline |
Definition at line 152 of file MCTrajectory.h.
double simb::MCTrajectory::TotalLength | ( | ) | const |
Definition at line 52 of file MCTrajectory.cxx.
|
inline |
Definition at line 188 of file MCTrajectory.h.
|
inline |
Definition at line 149 of file MCTrajectory.h.
|
inline |
Definition at line 150 of file MCTrajectory.h.
|
inline |
Definition at line 151 of file MCTrajectory.h.
|
friend |
Definition at line 67 of file MCTrajectory.cxx.
|
private |
The list of trajectory points.
Definition at line 77 of file MCTrajectory.h.
|
private |
map of the scattering process to index in ftrajectory for a given point
Definition at line 78 of file MCTrajectory.h.