ATLAS Offline Software
Functions
SelectedParticlesUtil Namespace Reference

Functions

template<class Container , class Contained >
void getContainerInfo (const SelectedParticles *sel, const Container *coll, std::vector< const Contained * > &objs, std::vector< int > &indices)
 
template<class Container >
void getParticleLinks (const SelectedParticles *selparts, const Container *particles, ParticleLinks< Container > &links)
 
template<class Container >
void getSelectedParticles (const ParticleLinks< Container > *links, SelectedParticles &selparts)
 

Function Documentation

◆ getContainerInfo()

template<class Container , class Contained >
void SelectedParticlesUtil::getContainerInfo ( const SelectedParticles sel,
const Container coll,
std::vector< const Contained * > &  objs,
std::vector< int > &  indices 
)

◆ getParticleLinks()

template<class Container >
void SelectedParticlesUtil::getParticleLinks ( const SelectedParticles selparts,
const Container particles,
ParticleLinks< Container > &  links 
)

Definition at line 51 of file SelectedParticlesUtil.h.

52  {
53  typename Container::const_iterator ipItr = particles->begin();
54  typename Container::const_iterator ipEnd = particles->end();
55  links.reserve(selparts->numGood());
56  unsigned ipart=0;
57  for(; ipItr != ipEnd; ++ipItr) {
58  if(selparts->isGood(ipart++)){
60  links.push_back(el);
61  }
62  }
63  }

◆ getSelectedParticles()

template<class Container >
void SelectedParticlesUtil::getSelectedParticles ( const ParticleLinks< Container > *  links,
SelectedParticles selparts 
)

Definition at line 66 of file SelectedParticlesUtil.h.

66  {
67  typedef ParticleLinks<Container> Links;
68  selparts.SetMaxBits(links->size());
69  typename Links::const_iterator ilItr = links->begin();
70  typename Links::const_iterator ilEnd = links->end();
71  for(; ilItr != ilEnd; ++ilItr) {
72  selparts.SetBit((*ilItr).index());
73  }
74 
75  }
SelectedParticles::SetBit
void SetBit(unsigned i, bool good=true)
Definition: SelectedParticles.cxx:19
SelectedParticles::SetMaxBits
void SetMaxBits(unsigned maxbits)
Definition: SelectedParticles.cxx:39
SelectedParticles::isGood
bool isGood(unsigned i) const
Definition: SelectedParticles.cxx:84
DMTest::links
links
Definition: CLinks_v1.cxx:22
plotIsoValidation.el
el
Definition: plotIsoValidation.py:197
LArG4FSStartPointFilter.particles
list particles
Definition: LArG4FSStartPointFilter.py:84
SelectedParticles::numGood
unsigned numGood() const
Definition: SelectedParticles.cxx:112