ATLAS Offline Software
Loading...
Searching...
No Matches
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
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
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
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
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
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
template<class Selector>
void cavern_background_particles (std::vector< HepMC::ConstGenParticlePtr > &particleList, const Selector &select) const
 return the MC events of the cavern background

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}
const McEventCollection * m_particleList
Definition PileUpType.h:88

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}
McEventCollection::const_iterator in_time_minimum_bias_event_end() const

◆ 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}
DataModel_detail::const_iterator< DataVector > const_iterator
Definition DataVector.h:838

◆ 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}
int signal_process_id(const GenEvent &e)
Definition GenEvent.h:637

◆ 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: