ATLAS Offline Software
PileUpType.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 
9  m_particleList = collection;
10 }
11 
12 
13 const HepMC::GenEvent * PileUpType::signal_mc_event() const {
14  if ( m_particleList->size() > 0 ) return m_particleList->at(0);
15  else return NULL;
16 }
17 
18 
22  if ( (ibegin!=iend) && (m_particleList->size()>1) ) {
23  ++ibegin;
24  return ibegin;
25  }
26  else return iend;
27 }
28 
29 
33  for ( ; ibegin != iend; ++ibegin ) {
34  if ( (*ibegin)->event_number() == -1 && HepMC::signal_process_id(*ibegin) == 0 ) break;
35  }
36  return ibegin;
37 }
38 
39 
41  return m_particleList->begin();
42 }
43 
44 
46  return this->in_time_minimum_bias_event_end();
47 }
48 
49 
51  return m_particleList->begin();
52 }
53 
54 
56  return this->in_time_minimum_bias_event_end(); //FIXME - we want ALL the in-time McEvents
57 }
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:513
PileUpType::in_time_event_begin
McEventCollection::const_iterator in_time_event_begin() const
the in-time particles - this includes in the signal
Definition: PileUpType.cxx:50
PileUpType::PileUpType
PileUpType(const McEventCollection *collection)
need to pass the McEvntCollection this class does not own this collection and will NOT delete it at t...
Definition: PileUpType.cxx:8
PileUpType::in_time_event_end
McEventCollection::const_iterator in_time_event_end() const
Definition: PileUpType.cxx:55
PileUpType.h
PileUpType::signal_and_in_time_minimum_bias_event_end
McEventCollection::const_iterator signal_and_in_time_minimum_bias_event_end() const
Definition: PileUpType.cxx:45
McEventCollection
This defines the McEventCollection, which is really just an ObjectVector of McEvent objects.
Definition: McEventCollection.h:33
PileUpType::m_particleList
const McEventCollection * m_particleList
Definition: PileUpType.h:88
PileUpType::in_time_minimum_bias_event_begin
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 ...
Definition: PileUpType.cxx:19
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
PileUpType::signal_and_in_time_minimum_bias_event_begin
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 o...
Definition: PileUpType.cxx:40
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.
PileUpType::signal_mc_event
const HepMC::GenEvent * signal_mc_event() const
Definition: PileUpType.cxx:13
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.