ATLAS Offline Software
Loading...
Searching...
No Matches
EventInfoFromxAOD.h File Reference
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.
EventType eventTypeFromxAOD (const xAOD::EventInfo *xaod)
 Create EventType object from xAOD::EventInfo.

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}
This class provides a unique identification for each event, in terms of run/event number and/or a tim...
Definition EventID.h:35
uint32_t lumiBlock() const
The current event's luminosity block number.
uint32_t bcid() const
The bunch crossing ID of the event.
uint32_t timeStamp() const
POSIX time in seconds from 1970. January 1st.
uint32_t runNumber() const
The current event's run number.
uint32_t timeStampNSOffset() const
Nanosecond time offset wrt. the time stamp.
uint64_t eventNumber() const
The current event's event number.

◆ 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{
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 }
50 }
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}
This class represents the "type of event" where the type is given by one or more "characteristics".
Definition EventType.h:92
static const EventTypeCode IS_CALIBRATION
true: IS_CALIBRATION, false: IS_PHYSICS
Definition EventType.h:162
static const EventTypeCode IS_SIMULATION
true: IS_SIMULATION, false: IS_DATA
Definition EventType.h:156
static const EventTypeCode IS_TESTBEAM
true: IS_TESTBEAM, false: IS_FROM_ATLAS_DET
Definition EventType.h:159
uint64_t mcEventNumber() const
The MC generator's event number.
const std::vector< float > & mcEventWeights() const
The weights of all the MC events used in the simulation.
bool eventType(EventType type) const
Check for one particular bitmask value.
@ IS_CALIBRATION
true: calibration, false: physics
@ IS_SIMULATION
true: simulation, false: data
@ IS_TESTBEAM
true: testbeam, false: full detector
uint32_t mcChannelNumber() const
The MC generator's channel number.
float mcEventWeight(size_t i=0) const
The weight of one specific MC event used in the simulation.
const DetDescrTags_t & detDescrTags() const
The detector description tags.
Extra patterns decribing particle interation process.