ATLAS Offline Software
Functions
EventInfoFromxAOD.h File Reference
#include "EventInfo/EventID.h"
#include "EventInfo/EventType.h"
#include "xAODEventInfo/EventInfo.h"
Include dependency graph for EventInfoFromxAOD.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

EventID eventIDFromxAOD (const xAOD::EventInfo *xaod)
 Create EventID object from xAOD::EventInfo. More...
 
EventType eventTypeFromxAOD (const xAOD::EventInfo *xaod)
 Create EventType object from xAOD::EventInfo. More...
 

Function Documentation

◆ eventIDFromxAOD()

EventID eventIDFromxAOD ( const xAOD::EventInfo xaod)

Create EventID object from xAOD::EventInfo.

Parameters
xaodThe xAOD::EventInfo object
Returns
EventID

Definition at line 16 of file EventInfoFromxAOD.cxx.

17 {
18  return EventID( xaod->runNumber(),
19  xaod->eventNumber(),
20  xaod->timeStamp(),
21  xaod->timeStampNSOffset(),
22  xaod->lumiBlock(),
23  xaod->bcid() );
24 }

◆ eventTypeFromxAOD()

EventType eventTypeFromxAOD ( const xAOD::EventInfo xaod)

Create EventType object from xAOD::EventInfo.

Parameters
xaodThe xAOD::EventInfo object
Returns
EventType

Definition at line 34 of file EventInfoFromxAOD.cxx.

35 {
36  EventType et;
37  // Copy DetDescr tags
38  std::string ddtags;
39  for( const auto& ddtag: xaod->detDescrTags() ) {
40  //MN FIX: this is only my guess how it should look like
41  ddtags += '#' + ddtag.first + '#' + ddtag.second;
42  }
43  et.set_user_type( ddtags );
44 
46  et.add_type(EventType::IS_TESTBEAM);
47  }
49  et.add_type(EventType::IS_CALIBRATION);
50  }
52  et.add_type(EventType::IS_SIMULATION);
53 
54  et.set_mc_channel_number( xaod->mcChannelNumber() );
55  et.set_mc_event_number( xaod->mcEventNumber() );
56  for( size_t i=0; i< xaod->mcEventWeights().size(); i++ ) {
57  et.set_mc_event_weight( xaod->mcEventWeight(i), i, xaod->mcEventWeights().size() );
58  }
59  }
60 
61  return et;
62 }
et
Extra patterns decribing particle interation process.
xAOD::EventInfo_v1::eventNumber
uint64_t eventNumber() const
The current event's event number.
xAOD::et
et
Definition: TrigEMCluster_v1.cxx:25
xAOD::EventInfo_v1::mcEventWeights
const std::vector< float > & mcEventWeights() const
The weights of all the MC events used in the simulation.
EventType
This class represents the "type of event" where the type is given by one or more "characteristics".
Definition: EventType.h:92
xAOD::EventInfo_v1::IS_CALIBRATION
@ IS_CALIBRATION
true: calibration, false: physics
Definition: EventInfo_v1.h:155
xAOD::EventInfo_v1::timeStampNSOffset
uint32_t timeStampNSOffset() const
Nanosecond time offset wrt. the time stamp.
xAOD::EventInfo_v1::IS_SIMULATION
@ IS_SIMULATION
true: simulation, false: data
Definition: EventInfo_v1.h:151
xAOD::EventInfo_v1::runNumber
uint32_t runNumber() const
The current event's run number.
xAOD::EventInfo_v1::mcChannelNumber
uint32_t mcChannelNumber() const
The MC generator's channel number.
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
lumiFormat.i
int i
Definition: lumiFormat.py:92
EventType::IS_CALIBRATION
static const EventTypeCode IS_CALIBRATION
true: IS_CALIBRATION, false: IS_PHYSICS
Definition: EventType.h:157
xAOD::EventInfo_v1::lumiBlock
uint32_t lumiBlock() const
The current event's luminosity block number.
EventType::IS_SIMULATION
static const EventTypeCode IS_SIMULATION
true: IS_SIMULATION, false: IS_DATA
Definition: EventType.h:151
xAOD::EventInfo_v1::detDescrTags
const DetDescrTags_t & detDescrTags() const
The detector description tags.
EventType::IS_TESTBEAM
static const EventTypeCode IS_TESTBEAM
true: IS_TESTBEAM, false: IS_FROM_ATLAS_DET
Definition: EventType.h:154
EventID
This class provides a unique identification for each event, in terms of run/event number and/or a tim...
Definition: EventID.h:35
xAOD::EventInfo_v1::timeStamp
uint32_t timeStamp() const
POSIX time in seconds from 1970. January 1st.
xAOD::EventInfo_v1::mcEventWeight
float mcEventWeight(size_t i=0) const
The weight of one specific MC event used in the simulation.
Definition: EventInfo_v1.cxx:203
xAOD::EventInfo_v1::bcid
uint32_t bcid() const
The bunch crossing ID of the event.
xAOD::EventInfo_v1::IS_TESTBEAM
@ IS_TESTBEAM
true: testbeam, false: full detector
Definition: EventInfo_v1.h:153
xAOD::EventInfo_v1::mcEventNumber
uint64_t mcEventNumber() const
The MC generator's event number.
xAOD::EventInfo_v1::eventType
bool eventType(EventType type) const
Check for one particular bitmask value.