LArSoft
v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
|
#include "ParticleList.h"
Classes | |
struct | archived_info_type |
Public Types | |
typedef std::map< int, simb::MCParticle * > | list_type |
typedef list_type::key_type | key_type |
typedef list_type::mapped_type | mapped_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 list_type::key_compare | key_compare |
typedef list_type::allocator_type | allocator_type |
Public Member Functions | |
ParticleList () | |
virtual | ~ParticleList () |
ParticleList (const ParticleList &rhs)=delete | |
ParticleList & | operator= (const ParticleList &rhs)=delete |
ParticleList (ParticleList &&rhs)=default | |
ParticleList & | operator= (ParticleList &&rhs)=default |
ParticleList | MakeCopy () const |
Returns a copy of this object. More... | |
void | Cut (const double &) |
const key_type & | TrackId (const size_type) const |
mapped_type const & | Particle (const size_type) const |
mapped_type | Particle (const size_type) |
bool | HasParticle (int trackID) const |
Returns whether we have this particle, live (with full information) More... | |
bool | KnownParticle (int trackID) const |
Returns whether we have had this particle, archived or live. More... | |
bool | IsPrimary (int trackID) const |
int | NumberOfPrimaries () const |
std::vector< const simb::MCParticle * > | GetPrimaries () const |
const simb::MCParticle * | Primary (const int) const |
simb::MCParticle * | Primary (const int) |
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 (ParticleList &other) |
iterator | find (const key_type &key) |
const_iterator | find (const key_type &key) const |
iterator | upper_bound (const key_type &key) |
const_iterator | upper_bound (const key_type &key) const |
iterator | lower_bound (const key_type &key) |
const_iterator | lower_bound (const key_type &key) const |
mapped_type const & | operator[] (const key_type &key) const |
mapped_type | operator[] (const key_type &key) |
mapped_type | at (const key_type &key) |
mapped_type const & | at (const key_type &key) const |
key_type | key (mapped_type const &part) const |
Extracts the key from the specified value. More... | |
void | insert (simb::MCParticle *value) |
void | Add (simb::MCParticle *value) |
void | Archive (const key_type &key) |
Removes the particle from the list, keeping minimal info of it. More... | |
void | Archive (const mapped_type &key) |
int | GetMotherOf (const key_type &key) const |
This function seeks for the exact key, not its absolute value. More... | |
void | clear () |
size_type | erase (const key_type &key) |
iterator | erase (iterator key) |
int | EveId (const int trackID) const |
Static Public Member Functions | |
static void | AdoptEveIdCalculator (EveIdCalculator *) |
Private Types | |
typedef std::set< int > | primaries_type |
typedef std::map< int, archived_info_type > | archive_type |
typedef primaries_type::iterator | primaries_iterator |
typedef primaries_type::const_iterator | primaries_const_iterator |
Private Attributes | |
list_type | m_particleList |
Sorted list of particles in the event. More... | |
primaries_type | m_primaries |
archive_type | m_archive |
archive of the particles no longer among us More... | |
Friends | |
std::ostream & | operator<< (std::ostream &output, const ParticleList &) |
std::ostream & | operator<< (std::ostream &output, const ParticleList::archived_info_type &) |
Definition at line 122 of file ParticleList.h.
typedef list_type::allocator_type sim::ParticleList::allocator_type |
Definition at line 138 of file ParticleList.h.
|
private |
Definition at line 166 of file ParticleList.h.
typedef list_type::const_iterator sim::ParticleList::const_iterator |
Definition at line 132 of file ParticleList.h.
typedef list_type::const_reverse_iterator sim::ParticleList::const_reverse_iterator |
Definition at line 134 of file ParticleList.h.
typedef list_type::difference_type sim::ParticleList::difference_type |
Definition at line 136 of file ParticleList.h.
typedef list_type::iterator sim::ParticleList::iterator |
Definition at line 131 of file ParticleList.h.
typedef list_type::key_compare sim::ParticleList::key_compare |
Definition at line 137 of file ParticleList.h.
typedef list_type::key_type sim::ParticleList::key_type |
Definition at line 128 of file ParticleList.h.
typedef std::map<int,simb::MCParticle*> sim::ParticleList::list_type |
Definition at line 127 of file ParticleList.h.
typedef list_type::mapped_type sim::ParticleList::mapped_type |
Definition at line 129 of file ParticleList.h.
Definition at line 168 of file ParticleList.h.
|
private |
Definition at line 167 of file ParticleList.h.
|
private |
Definition at line 165 of file ParticleList.h.
typedef list_type::reverse_iterator sim::ParticleList::reverse_iterator |
Definition at line 133 of file ParticleList.h.
typedef list_type::size_type sim::ParticleList::size_type |
Definition at line 135 of file ParticleList.h.
typedef list_type::value_type sim::ParticleList::value_type |
Definition at line 130 of file ParticleList.h.
sim::ParticleList::ParticleList | ( | ) |
Definition at line 30 of file ParticleList.cxx.
Referenced by ClusteringValidation::ClusterAnalyser::Analyse().
|
virtual |
Definition at line 36 of file ParticleList.cxx.
References clear().
|
delete |
|
default |
|
inline |
Definition at line 315 of file ParticleList.h.
References insert().
Referenced by KnownParticle(), larg4::ParticleListAction::PreTrackingAction(), and cheat::PhotonBackTracker::Rebuild().
|
static |
Definition at line 418 of file ParticleList.cxx.
Referenced by EveId(), KnownParticle(), cheat::PhotonBackTracker::Rebuild(), cheat::PhotonBackTracker::SetEveIdCalculator(), and cheat::ParticleInventory::SetEveIdCalculator().
void sim::ParticleList::Archive | ( | const key_type & | key | ) |
Removes the particle from the list, keeping minimal info of it.
Definition at line 295 of file ParticleList.cxx.
References key(), m_archive, m_particleList, and part.
Referenced by Archive(), KnownParticle(), and larg4::ParticleListAction::PostTrackingAction().
void sim::ParticleList::Archive | ( | const mapped_type & | key | ) |
Definition at line 310 of file ParticleList.cxx.
References Archive(), and key().
|
inline |
Definition at line 330 of file ParticleList.h.
References m_particleList.
Referenced by cluster::DBclusterAna::analyze(), hit::HitFinderAna::analyze(), KnownParticle(), and operator[]().
|
inline |
Definition at line 332 of file ParticleList.h.
References m_particleList.
|
inline |
Definition at line 305 of file ParticleList.h.
References m_particleList.
Referenced by ClusteringValidation::ClusterAnalyser::Analyse(), cluster::ClusterAna::analyze(), pfpf::PFPAna::analyze(), cluster::DBclusterAna::analyze(), larg4::ParticleListAction::EndOfEventAction(), opreco::OpticalRecoAna::get_MC_particle_list(), tca::TrajClusterAlg::GetHitCollection(), larg4::ParticleListAction::GetList(), cheat::PhotonBackTracker::GetSetOfEveIDs(), cheat::ParticleInventory::GetSetOfTrackIds(), ems::MCinfo::Info(), KnownParticle(), tca::TruthMatcher::MatchTrueHits(), sim::operator<<(), DUNE::NeutrinoShowerEff::processEff(), DUNE::NeutrinoTrackingEff::processEff(), DUNE::MuonTrackingEff::processEff(), trkf::TrackKalmanCheater::produce(), tca::TruthMatcher::StudyPiZeros(), and larg4::ParticleListAction::YieldList().
|
inline |
Definition at line 306 of file ParticleList.h.
References m_particleList.
void sim::ParticleList::clear | ( | void | ) |
Definition at line 323 of file ParticleList.cxx.
References m_archive, m_particleList, and m_primaries.
Referenced by larg4::ParticleListAction::BeginOfEventAction(), cheat::ParticleInventory::ClearEvent(), KnownParticle(), cheat::PhotonBackTracker::Rebuild(), and ~ParticleList().
void sim::ParticleList::Cut | ( | const double & | cut | ) |
Definition at line 59 of file ParticleList.cxx.
References simb::MCParticle::E(), erase(), and m_particleList.
|
inline |
Definition at line 314 of file ParticleList.h.
References m_particleList.
Referenced by tca::TrajClusterAlg::GetHitCollection(), KnownParticle(), tca::TruthMatcher::MatchTrueHits(), and cheat::ParticleInventory::ParticleListReady().
|
inline |
Definition at line 307 of file ParticleList.h.
References m_particleList.
Referenced by ClusteringValidation::ClusterAnalyser::Analyse(), larg4::LArG4Ana::analyze(), cluster::ClusterAna::analyze(), pfpf::PFPAna::analyze(), cluster::DBclusterAna::analyze(), hit::HitFinderAna::analyze(), opdet::SimPhotonCounter::analyze(), larg4::ParticleListAction::EndOfEventAction(), opreco::OpticalRecoAna::get_MC_particle_list(), tca::TrajClusterAlg::GetHitCollection(), larg4::ParticleListAction::GetList(), cheat::PhotonBackTracker::GetSetOfEveIDs(), cheat::ParticleInventory::GetSetOfTrackIds(), HasParticle(), ems::MCinfo::Info(), KnownParticle(), tca::TruthMatcher::MatchTrueHits(), sim::operator<<(), sim::ParticleHistory::ParticleHistory(), DUNE::NeutrinoShowerEff::processEff(), DUNE::NeutrinoTrackingEff::processEff(), DUNE::MuonTrackingEff::processEff(), trkf::TrackKalmanCheater::produce(), tca::TruthMatcher::StudyPiZeros(), cheat::PhotonBackTracker::TrackIDToParticle(), cheat::ParticleInventory::TrackIdToParticle_P(), and larg4::ParticleListAction::YieldList().
|
inline |
Definition at line 308 of file ParticleList.h.
References m_particleList.
ParticleList::size_type sim::ParticleList::erase | ( | const key_type & | key | ) |
Definition at line 342 of file ParticleList.cxx.
References m_particleList.
Referenced by Cut(), and KnownParticle().
ParticleList::iterator sim::ParticleList::erase | ( | iterator | key | ) |
Definition at line 336 of file ParticleList.cxx.
References m_particleList.
int sim::ParticleList::EveId | ( | const int | trackID | ) | const |
Definition at line 392 of file ParticleList.cxx.
References AdoptEveIdCalculator().
Referenced by cheat::CheckBackTracking::analyze(), cheat::PhotonBackTracker::GetSetOfEveIDs(), cheat::ParticleInventory::GetSetOfEveIds(), KnownParticle(), tca::MCParticleListUtils::MakeCheatShower(), tca::TruthMatcher::MatchTruth(), cheat::PhotonBackTracker::OpHitToEveSDPs(), tca::MCParticleListUtils::PrimaryElectronPFPID(), tca::MCParticleListUtils::PrimaryElectronStart(), tca::MCParticleListUtils::PrimaryElectronTjID(), tca::TruthMatcher::StudyPiZeros(), tca::TruthMatcher::StudyShowerParents(), cheat::ParticleInventory::TrackIdToEveTrackId(), cheat::PhotonBackTracker::TrackIDToMotherParticle(), and cheat::ParticleInventory::TrackIdToMotherParticle_P().
|
inline |
Definition at line 318 of file ParticleList.h.
References m_particleList.
Referenced by larg4::LArG4Ana::analyze(), hit::HitFinderAna::analyze(), opdet::SimPhotonCounter::analyze(), HasParticle(), KnownParticle(), sim::ParticleHistory::ParticleHistory(), cheat::PhotonBackTracker::TrackIDToParticle(), and cheat::ParticleInventory::TrackIdToParticle_P().
|
inline |
Definition at line 320 of file ParticleList.h.
References m_particleList.
int sim::ParticleList::GetMotherOf | ( | const key_type & | key | ) | const |
This function seeks for the exact key, not its absolute value.
Definition at line 315 of file ParticleList.cxx.
References m_archive, m_particleList, and part.
Referenced by KnownParticle().
std::vector< const simb::MCParticle * > sim::ParticleList::GetPrimaries | ( | ) | const |
Definition at line 156 of file ParticleList.cxx.
References m_particleList, and m_primaries.
Referenced by KnownParticle().
|
inline |
Returns whether we have this particle, live (with full information)
Definition at line 208 of file ParticleList.h.
void sim::ParticleList::insert | ( | simb::MCParticle * | value | ) |
Definition at line 267 of file ParticleList.cxx.
References key(), m_particleList, m_primaries, and simb::MCParticle::Process().
Referenced by Add(), KnownParticle(), and MakeCopy().
bool sim::ParticleList::IsPrimary | ( | int | trackID | ) | const |
Definition at line 109 of file ParticleList.cxx.
References m_primaries.
Referenced by KnownParticle(), and sim::ParticleHistory::ParticleHistory().
|
inline |
Extracts the key from the specified value.
Definition at line 338 of file ParticleList.h.
Referenced by Archive(), insert(), and KnownParticle().
|
inline |
Returns whether we have had this particle, archived or live.
Definition at line 215 of file ParticleList.h.
References Add(), AdoptEveIdCalculator(), Archive(), at(), begin(), clear(), empty(), end(), erase(), EveId(), find(), GetMotherOf(), GetPrimaries(), insert(), IsPrimary(), key(), lower_bound(), NumberOfPrimaries(), sim::ParticleList::archived_info_type::operator<<, operator[](), fhicl::other, part, Primary(), rbegin(), rend(), size(), swap(), upper_bound(), and fhicl::detail::atom::value().
Referenced by larg4::ParticleListAction::PreTrackingAction().
|
inline |
Definition at line 326 of file ParticleList.h.
References m_particleList.
Referenced by KnownParticle().
|
inline |
Definition at line 328 of file ParticleList.h.
References m_particleList.
ParticleList sim::ParticleList::MakeCopy | ( | ) | const |
Returns a copy of this object.
Definition at line 44 of file ParticleList.cxx.
References insert(), m_archive, and m_particleList.
int sim::ParticleList::NumberOfPrimaries | ( | ) | const |
Definition at line 115 of file ParticleList.cxx.
References m_primaries.
Referenced by KnownParticle().
|
delete |
|
default |
|
inline |
Definition at line 336 of file ParticleList.h.
References at().
Referenced by KnownParticle().
|
inline |
Definition at line 334 of file ParticleList.h.
References at().
ParticleList::mapped_type const & sim::ParticleList::Particle | ( | const size_type | index | ) | const |
Definition at line 93 of file ParticleList.cxx.
References m_particleList.
ParticleList::mapped_type sim::ParticleList::Particle | ( | const size_type | index | ) |
Definition at line 101 of file ParticleList.cxx.
References m_particleList.
const simb::MCParticle * sim::ParticleList::Primary | ( | const int | index | ) | const |
Definition at line 121 of file ParticleList.cxx.
References m_particleList, and m_primaries.
Referenced by KnownParticle().
simb::MCParticle * sim::ParticleList::Primary | ( | const int | index | ) |
Definition at line 138 of file ParticleList.cxx.
References m_particleList, and m_primaries.
|
inline |
Definition at line 309 of file ParticleList.h.
References m_particleList.
Referenced by KnownParticle().
|
inline |
Definition at line 310 of file ParticleList.h.
References m_particleList.
|
inline |
Definition at line 311 of file ParticleList.h.
References m_particleList.
Referenced by KnownParticle().
|
inline |
Definition at line 312 of file ParticleList.h.
References m_particleList.
|
inline |
Definition at line 313 of file ParticleList.h.
References m_particleList.
Referenced by larg4::LArG4Ana::analyze(), simfilter::FilterPrimaryPDG::filter(), larg4::ParticleListAction::GetList(), KnownParticle(), tca::TruthMatcher::MatchTrueHits(), sim::operator<<(), and larg4::ParticleListAction::YieldList().
|
inline |
Definition at line 316 of file ParticleList.h.
References m_archive, m_particleList, and m_primaries.
Referenced by KnownParticle().
const ParticleList::key_type & sim::ParticleList::TrackId | ( | const size_type | index | ) | const |
Definition at line 86 of file ParticleList.cxx.
References m_particleList.
Referenced by tca::TrajClusterAlg::GetHitCollection().
|
inline |
Definition at line 322 of file ParticleList.h.
References m_particleList.
Referenced by KnownParticle().
|
inline |
Definition at line 324 of file ParticleList.h.
References m_particleList.
|
friend |
Definition at line 352 of file ParticleList.cxx.
|
friend |
Definition at line 425 of file ParticleList.cxx.
|
private |
archive of the particles no longer among us
Definition at line 173 of file ParticleList.h.
Referenced by Archive(), clear(), GetMotherOf(), MakeCopy(), sim::operator<<(), and swap().
|
private |
Sorted list of particles in the event.
Definition at line 170 of file ParticleList.h.
Referenced by Archive(), at(), begin(), clear(), Cut(), empty(), end(), erase(), find(), GetMotherOf(), GetPrimaries(), insert(), lower_bound(), MakeCopy(), Particle(), Primary(), rbegin(), rend(), size(), swap(), TrackId(), and upper_bound().
|
private |
Sorted list of the track IDs of primary particles.
Definition at line 171 of file ParticleList.h.
Referenced by clear(), GetPrimaries(), insert(), IsPrimary(), NumberOfPrimaries(), Primary(), and swap().