107 #ifndef SIM_PARTICLELIST_H 108 #define SIM_PARTICLELIST_H 120 class EveIdCalculator;
155 : parentID(part->
Mother())
160 friend std::ostream&
operator<<
201 void Cut(
const double& );
203 const key_type&
TrackId(
const size_type )
const;
204 mapped_type
const&
Particle(
const size_type )
const;
205 mapped_type
Particle(
const size_type );
210 auto iParticle =
find(trackID);
211 return (iParticle !=
end()) && (iParticle->second !=
nullptr);
216 {
return find(trackID) !=
end(); }
222 std::vector<const simb::MCParticle*>
GetPrimaries()
const;
231 const_iterator
begin()
const;
233 const_iterator
end()
const;
234 reverse_iterator
rbegin();
235 const_reverse_iterator
rbegin()
const;
236 reverse_iterator
rend();
237 const_reverse_iterator
rend()
const;
239 size_type
size()
const;
243 iterator
find(
const key_type&
key);
244 const_iterator
find(
const key_type& key)
const;
246 const_iterator
upper_bound(
const key_type& key)
const;
248 const_iterator
lower_bound(
const key_type& key)
const;
258 mapped_type
const&
operator[](
const key_type& key )
const;
261 mapped_type
operator[](
const key_type& key );
262 mapped_type
at(
const key_type& key);
263 mapped_type
const&
at(
const key_type& key)
const;
266 key_type
key(mapped_type
const&
part)
const;
277 void Archive(
const key_type& key );
278 void Archive(
const mapped_type& key );
284 size_type
erase(
const key_type& key );
285 iterator
erase( iterator key );
288 friend std::ostream&
operator<<
293 int EveId (
const int trackID )
const;
344 #endif // SIM_PARTICLELIST_H mapped_type const & operator[](const key_type &key) const
ParticleList & operator=(const ParticleList &rhs)=delete
void insert(simb::MCParticle *value)
friend std::ostream & operator<<(std::ostream &output, const ParticleList::archived_info_type &)
ParticleList MakeCopy() const
Returns a copy of this object.
key_type key(mapped_type const &part) const
Extracts the key from the specified value.
const key_type & TrackId(const size_type) const
primaries_type m_primaries
list_type::value_type value_type
list_type::const_iterator const_iterator
mapped_type at(const key_type &key)
list_type::iterator iterator
void Add(simb::MCParticle *value)
list_type::reverse_iterator reverse_iterator
primaries_type::const_iterator primaries_const_iterator
primaries_type::iterator primaries_iterator
int EveId(const int trackID) const
std::map< int, simb::MCParticle * > list_type
list_type::difference_type difference_type
iterator upper_bound(const key_type &key)
std::set< int > primaries_type
iterator find(const key_type &key)
iterator lower_bound(const key_type &key)
mapped_type const & Particle(const size_type) const
std::map< int, archived_info_type > archive_type
bool IsPrimary(int trackID) const
reverse_iterator rbegin()
archived_info_type(simb::MCParticle const *part)
list_type::const_reverse_iterator const_reverse_iterator
list_type::size_type size_type
int GetMotherOf(const key_type &key) const
This function seeks for the exact key, not its absolute value.
list_type::key_type key_type
archived_info_type()=default
archived_info_type(simb::MCParticle const &part)
std::string value(boost::any const &)
list_type::allocator_type allocator_type
std::vector< const simb::MCParticle * > GetPrimaries() const
list_type::key_compare key_compare
archived_info_type(int pid)
const simb::MCParticle * Primary(const int) const
size_type erase(const key_type &key)
bool KnownParticle(int trackID) const
Returns whether we have had this particle, archived or live.
void swap(ParticleList &other)
list_type m_particleList
Sorted list of particles in the event.
static void AdoptEveIdCalculator(EveIdCalculator *)
archive_type m_archive
archive of the particles no longer among us
int NumberOfPrimaries() const
list_type::mapped_type mapped_type
bool HasParticle(int trackID) const
Returns whether we have this particle, live (with full information)
void Archive(const key_type &key)
Removes the particle from the list, keeping minimal info of it.