ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
PileUpType Class Reference

For details on how the MC particles are defined and organized see https://twiki.cern.ch/twiki/bin/view/Atlas/PileupPerformance#MC_Truth_Task_Force_Recommendati. More...

#include <PileUpType.h>

Collaboration diagram for PileUpType:

Public Member Functions

 PileUpType (const McEventCollection *collection)
 need to pass the McEvntCollection this class does not own this collection and will NOT delete it at the end More...
 
const HepMC::GenEvent * signal_mc_event () const
 
template<class Selector >
void signal_particles (std::vector< HepMC::ConstGenParticlePtr > &particleList, const Selector &select) const
 
McEventCollection::const_iterator in_time_minimum_bias_event_begin () const
 extract the in-time minimum bias McEvent Particles from the McEventCollection A pair of iterators is returned on all the McEventCollection More...
 
McEventCollection::const_iterator in_time_minimum_bias_event_end () const
 
McEventCollection::const_iterator signal_and_in_time_minimum_bias_event_begin () const
 extract the signal and the in-time minimum bias McEvent Particles from the McEventCollection A pair of iterators is returned on all the McEventCollection The signal is the first in the list More...
 
McEventCollection::const_iterator signal_and_in_time_minimum_bias_event_end () const
 
template<class Selector >
void in_time_minimum_bias_particles (std::vector< HepMC::ConstGenParticlePtr > &particleList, const Selector &select) const
 
McEventCollection::const_iterator in_time_event_begin () const
 the in-time particles - this includes in the signal More...
 
McEventCollection::const_iterator in_time_event_end () const
 
template<class Selector >
void in_time_particles (std::vector< HepMC::ConstGenParticlePtr > &particleList, const Selector &select) const
 
template<class Selector >
void particles_in_two_bunch_crossings (std::vector< HepMC::ConstGenParticlePtr > &particleList, const Selector &select) const
 return the MC events in [-2BC, +2BC], including the signal McEvent at BC=0 More...
 
template<class Selector >
void particles_outside_two_bunch_crossings (std::vector< HepMC::ConstGenParticlePtr > &particleList, const Selector &select) const
 return the MC events in [-inf,-2BC] and [2BC,+inf], excluding the cavern background and the beam halo More...
 
template<class Selector >
void cavern_background_particles (std::vector< HepMC::ConstGenParticlePtr > &particleList, const Selector &select) const
 return the MC events of the cavern background More...
 

Private Attributes

const McEventCollectionm_particleList
 

Detailed Description

For details on how the MC particles are defined and organized see https://twiki.cern.ch/twiki/bin/view/Atlas/PileupPerformance#MC_Truth_Task_Force_Recommendati.

Todo:
Move this elsewhere – it does not implement the GenAccessIO API.

Definition at line 33 of file PileUpType.h.

Constructor & Destructor Documentation

◆ PileUpType()

PileUpType::PileUpType ( const McEventCollection collection)

need to pass the McEvntCollection this class does not own this collection and will NOT delete it at the end

Definition at line 8 of file PileUpType.cxx.

8  {
9  m_particleList = collection;
10 }

Member Function Documentation

◆ cavern_background_particles()

template<class Selector >
void PileUpType::cavern_background_particles ( std::vector< HepMC::ConstGenParticlePtr > &  particleList,
const Selector &  select 
) const

return the MC events of the cavern background

◆ in_time_event_begin()

McEventCollection::const_iterator PileUpType::in_time_event_begin ( ) const

the in-time particles - this includes in the signal

Definition at line 50 of file PileUpType.cxx.

50  {
51  return m_particleList->begin();
52 }

◆ in_time_event_end()

McEventCollection::const_iterator PileUpType::in_time_event_end ( ) const

Definition at line 55 of file PileUpType.cxx.

55  {
56  return this->in_time_minimum_bias_event_end(); //FIXME - we want ALL the in-time McEvents
57 }

◆ in_time_minimum_bias_event_begin()

McEventCollection::const_iterator PileUpType::in_time_minimum_bias_event_begin ( ) const

extract the in-time minimum bias McEvent Particles from the McEventCollection A pair of iterators is returned on all the McEventCollection

Definition at line 19 of file PileUpType.cxx.

19  {
22  if ( (ibegin!=iend) && (m_particleList->size()>1) ) {
23  ++ibegin;
24  return ibegin;
25  }
26  else return iend;
27 }

◆ in_time_minimum_bias_event_end()

McEventCollection::const_iterator PileUpType::in_time_minimum_bias_event_end ( ) const

Definition at line 30 of file PileUpType.cxx.

30  {
33  for ( ; ibegin != iend; ++ibegin ) {
34  if ( (*ibegin)->event_number() == -1 && HepMC::signal_process_id(*ibegin) == 0 ) break;
35  }
36  return ibegin;
37 }

◆ in_time_minimum_bias_particles()

template<class Selector >
void PileUpType::in_time_minimum_bias_particles ( std::vector< HepMC::ConstGenParticlePtr > &  particleList,
const Selector &  select 
) const

◆ in_time_particles()

template<class Selector >
void PileUpType::in_time_particles ( std::vector< HepMC::ConstGenParticlePtr > &  particleList,
const Selector &  select 
) const

◆ particles_in_two_bunch_crossings()

template<class Selector >
void PileUpType::particles_in_two_bunch_crossings ( std::vector< HepMC::ConstGenParticlePtr > &  particleList,
const Selector &  select 
) const

return the MC events in [-2BC, +2BC], including the signal McEvent at BC=0

◆ particles_outside_two_bunch_crossings()

template<class Selector >
void PileUpType::particles_outside_two_bunch_crossings ( std::vector< HepMC::ConstGenParticlePtr > &  particleList,
const Selector &  select 
) const

return the MC events in [-inf,-2BC] and [2BC,+inf], excluding the cavern background and the beam halo

◆ signal_and_in_time_minimum_bias_event_begin()

McEventCollection::const_iterator PileUpType::signal_and_in_time_minimum_bias_event_begin ( ) const

extract the signal and the in-time minimum bias McEvent Particles from the McEventCollection A pair of iterators is returned on all the McEventCollection The signal is the first in the list

Definition at line 40 of file PileUpType.cxx.

40  {
41  return m_particleList->begin();
42 }

◆ signal_and_in_time_minimum_bias_event_end()

McEventCollection::const_iterator PileUpType::signal_and_in_time_minimum_bias_event_end ( ) const

Definition at line 45 of file PileUpType.cxx.

45  {
46  return this->in_time_minimum_bias_event_end();
47 }

◆ signal_mc_event()

const HepMC::GenEvent * PileUpType::signal_mc_event ( ) const

Definition at line 13 of file PileUpType.cxx.

13  {
14  if ( m_particleList->size() > 0 ) return m_particleList->at(0);
15  else return NULL;
16 }

◆ signal_particles()

template<class Selector >
void PileUpType::signal_particles ( std::vector< HepMC::ConstGenParticlePtr > &  particleList,
const Selector &  select 
) const

Member Data Documentation

◆ m_particleList

const McEventCollection* PileUpType::m_particleList
private

Definition at line 88 of file PileUpType.h.


The documentation for this class was generated from the following files:
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
HepMC::signal_process_id
int signal_process_id(const GenEvent &e)
Definition: GenEvent.h:635
PileUpType::m_particleList
const McEventCollection * m_particleList
Definition: PileUpType.h:88
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
PileUpType::in_time_minimum_bias_event_end
McEventCollection::const_iterator in_time_minimum_bias_event_end() const
Definition: PileUpType.cxx:30
DataVector::at
const T * at(size_type n) const
Access an element, as an rvalue.
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.