ATLAS Offline Software
PileUpEventInfo.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3  */
4 
5 /* -C++- */
6 #ifndef EVENTINFO_PILEUPEVENTINFO_H
7 # define EVENTINFO_PILEUPEVENTINFO_H 1
8 
20 #include <cassert>
21 #include "EventInfo/EventInfo.h"
23 #include "GaudiKernel/ClassID.h"
24 
25 #include <list>
26 class StoreGateSvc;
27 class MsgStream;
28 
37 class PileUpEventInfo: public EventInfo {
38 public:
40 
42 
45 
46  virtual ~PileUpEventInfo();
48 
52  struct SubEvent {
53  private:
55  public:
58 
62 
63  SubEvent();
64  ~SubEvent();
65  SubEvent(const SubEvent&);
66  SubEvent& operator = (const SubEvent&);
67  SubEvent(SubEvent&&);
69  SubEvent(time_type t, const EventInfo* pse, StoreGateSvc* psg);
71  const EventInfo* pse, StoreGateSvc* psg);
74  const EventInfo* pse, StoreGateSvc* psg);
75  SubEvent(time_type t, unsigned int BCID, index_type index,
77  const EventInfo& rse, StoreGateSvc* psg);
78 
79  SubEvent(time_type t, std::unique_ptr<EventInfo> pse, StoreGateSvc* psg);
81  std::unique_ptr<EventInfo> pse, StoreGateSvc* psg);
84  std::unique_ptr<EventInfo> pse, StoreGateSvc* psg);
85  SubEvent(time_type t, unsigned int BCID, index_type index,
87  std::unique_ptr<EventInfo> pse, StoreGateSvc* psg);
88 
90  time_type time() const {return m_timeIndex.time();}
91  index_type index() const {return m_timeIndex.index();}
92 
93  unsigned int BCID() const;
95  pileup_type type() const {return m_timeIndex.type();}
96 
97  typedef std::list<SubEvent>::const_iterator const_iterator;
99  };
100 
105  const EventInfo* pse, StoreGateSvc* psg) {
106  m_subEvents.emplace_back(t, m_subEvents.size(), puType, pse, psg);
107  }
108 
110  std::unique_ptr<EventInfo> pse, StoreGateSvc* psg) {
111  m_subEvents.emplace_back(t, m_subEvents.size(), puType, std::move(pse), psg);
112  }
113 
115  void addSubEvt(time_type t, unsigned int BCID,
117  const EventInfo& rse, StoreGateSvc* psg) {
118  m_subEvents.emplace_back(t, BCID, m_subEvents.size(), puType, rse, psg);
119  }
120 
121  void addSubEvt(time_type t, unsigned int BCID,
123  std::unique_ptr<EventInfo>& pse, StoreGateSvc* psg) {
124  m_subEvents.emplace_back(t, BCID, m_subEvents.size(), puType, std::move(pse), psg);
125  }
126 
127  //NO INSERTIONS only push_backs in m_subEvents!
128 
130 
136 private:
137  std::list<SubEvent> m_subEvents; //FIXME should become a vector
138 };
139 
140 #include "AthenaKernel/CLASS_DEF.h"
141 CLASS_DEF(PileUpEventInfo, 2102, 1)
142 
143 #include "AthenaKernel/BaseInfo.h"
145 
146 #endif // EVENTINFO_PILEUPEVENTINFO_H
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
PileUpEventInfo::time_type
SubEvent::time_type time_type
Definition: PileUpEventInfo.h:101
PileUpEventInfo::PileUpEventInfo
PileUpEventInfo()
Definition: PileUpEventInfo.cxx:18
PileUpEventInfo::SubEvent::pSubEvt
EventInfo * pSubEvt
redundant but handy e.g. for persist. FIXME OWNED COPY
Definition: PileUpEventInfo.h:56
PileUpTimeEventIndex::index_type
unsigned long index_type
Definition: PileUpTimeEventIndex.h:25
PileUpEventInfo::SubEvent::index
index_type index() const
Definition: PileUpEventInfo.h:91
index
Definition: index.py:1
EventType
This class represents the "type of event" where the type is given by one or more "characteristics".
Definition: EventType.h:92
PileUpEventInfo::endSubEvt
SubEvent::const_iterator endSubEvt() const
Definition: PileUpEventInfo.h:134
PileUpEventInfo::addSubEvt
void addSubEvt(time_type t, unsigned int BCID, PileUpTimeEventIndex::PileUpType puType, const EventInfo &rse, StoreGateSvc *psg)
setter for the subEvt collection t=0(ns) for the original event
Definition: PileUpEventInfo.h:115
PileUpTimeEventIndex::PileUpType
PileUpType
Definition: PileUpTimeEventIndex.h:14
PileUpTimeEventIndex::index
index_type index() const
the index of the component event in PileUpEventInfo
Definition: PileUpTimeEventIndex.cxx:76
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
PileUpEventInfo::SubEvent::type
pileup_type type() const
pileup event proveance
Definition: PileUpEventInfo.h:95
PileUpEventInfo::index_type
SubEvent::index_type index_type
Definition: PileUpEventInfo.h:102
PileUpEventInfo::SubEvent::time_type
PileUpTimeEventIndex::time_type time_type
Definition: PileUpEventInfo.h:59
PileUpTimeEventIndex.h
PileUpEventInfo::SubEvent::time
time_type time() const
t0 wrto original event (hence original evt time == 0)
Definition: PileUpEventInfo.h:90
PixelByteStreamErrors::BCID
@ BCID
Definition: PixelByteStreamErrors.h:13
PileUpEventInfo::SubEvent::operator=
SubEvent & operator=(const SubEvent &)
Definition: PileUpEventInfo.cxx:49
PileUpEventInfo::SubEvent::BCID
unsigned int BCID() const
Definition: PileUpEventInfo.cxx:151
PileUpEventInfo::beginSubEvt
SubEvent::iterator beginSubEvt()
Definition: PileUpEventInfo.h:131
StoreGateSvc
The Athena Transient Store API.
Definition: StoreGateSvc.h:125
PileUpEventInfo::~PileUpEventInfo
virtual ~PileUpEventInfo()
Definition: PileUpEventInfo.cxx:31
PileUpEventInfo::SubEvent::index_type
PileUpTimeEventIndex::index_type index_type
Definition: PileUpEventInfo.h:60
PileUpEventInfo::m_subEvents
std::list< SubEvent > m_subEvents
Definition: PileUpEventInfo.h:137
PileUpTimeEventIndex::time_type
long time_type
Definition: PileUpTimeEventIndex.h:24
PileUpEventInfo::addSubEvt
void addSubEvt(time_type t, PileUpTimeEventIndex::PileUpType puType, const EventInfo *pse, StoreGateSvc *psg)
setter for the subEvt collection t=0(ns) for the original event
Definition: PileUpEventInfo.h:104
PileUpEventInfo::addSubEvt
void addSubEvt(time_type t, unsigned int BCID, PileUpTimeEventIndex::PileUpType puType, std::unique_ptr< EventInfo > &pse, StoreGateSvc *psg)
Definition: PileUpEventInfo.h:121
SG_ADD_BASE
SG_ADD_BASE(PileUpEventInfo, EventInfo)
PileUpEventInfo::beginSubEvt
SubEvent::const_iterator beginSubEvt() const
Definition: PileUpEventInfo.h:133
PileUpEventInfo::SubEvent::m_timeIndex
PileUpTimeEventIndex m_timeIndex
Definition: PileUpEventInfo.h:54
TriggerInfo
This class contains trigger related information.
Definition: TriggerInfo.h:77
PileUpTimeEventIndex::time
time_type time() const
bunch xing time in ns
Definition: PileUpTimeEventIndex.cxx:71
PileUpEventInfo::SubEvent::SubEvent
SubEvent()
Definition: PileUpEventInfo.cxx:34
EventInfo
This class provides general information about an event. Event information is provided by the accessor...
Definition: EventInfo/EventInfo/EventInfo.h:43
PileUpEventInfo::SubEvent::iterator
std::list< SubEvent >::iterator iterator
Definition: PileUpEventInfo.h:98
PileUpEventInfo
This class provides information about an overlaid event. It extends EventInfo with a list of sub-evts...
Definition: PileUpEventInfo.h:37
PileUpEventInfo::SubEvent::const_iterator
std::list< SubEvent >::const_iterator const_iterator
Definition: PileUpEventInfo.h:97
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
PileUpEventInfo::addSubEvt
void addSubEvt(time_type t, PileUpTimeEventIndex::PileUpType puType, std::unique_ptr< EventInfo > pse, StoreGateSvc *psg)
Definition: PileUpEventInfo.h:109
CLASS_DEF
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Definition: Control/AthenaKernel/AthenaKernel/CLASS_DEF.h:64
EventID
This class provides a unique identification for each event, in terms of run/event number and/or a tim...
Definition: EventID.h:35
PileUpTimeEventIndex
a struct encapsulating the identifier of a pile-up event
Definition: PileUpTimeEventIndex.h:12
PileUpTimeEventIndex::type
PileUpType type() const
the pileup type - minbias, cavern, beam halo, signal?
Definition: PileUpTimeEventIndex.cxx:81
PileUpEventInfo::SubEvent
a triple allowing access to a sub-event
Definition: PileUpEventInfo.h:52
PileUpEventInfo::SubEvent::pileup_type
PileUpTimeEventIndex::PileUpType pileup_type
Definition: PileUpEventInfo.h:61
CLASS_DEF.h
macros to associate a CLID to a type
PileUpEventInfo::SubEvent::~SubEvent
~SubEvent()
Definition: PileUpEventInfo.cxx:78
PileUpEventInfo::endSubEvt
SubEvent::iterator endSubEvt()
Definition: PileUpEventInfo.h:132
PileUpEventInfo::SubEvent::pSubEvtSG
StoreGateSvc * pSubEvtSG
the sub event store
Definition: PileUpEventInfo.h:57