ATLAS Offline Software
Loading...
Searching...
No Matches
xAOD::EventInfo_v1::SubEvent Class Reference

Class describing the properties of one pileup sub-event. More...

#include <EventInfo_v1.h>

Collaboration diagram for xAOD::EventInfo_v1::SubEvent:

Public Member Functions

 SubEvent (int16_t time, uint16_t index, PileUpType type, const ElementLink< EventInfoContainer_v1 > &link)
 Constructor giving all relevant information to the object.
int16_t time () const
 Get the time wrt. the signal event (which has time() == 0).
uint16_t index () const
 Get the index of the sub-event.
PileUpType type () const
 Get the type of the pileup event.
const std::string & typeName () const
 The string name of the type.
const ElementLink< EventInfoContainer_v1 > & link () const
 Get a link to the EventInfo object describing the pileup event.
const EventInfo_v1 * ptr () const
 Get a pointer to the EventInfo object describing the pileup event.

Private Attributes

int16_t m_time
 The time wrt. the signal event.
uint16_t m_index
 The index of the pileup event.
PileUpType m_type
 The type of the pileup event.
ElementLink< EventInfoContainer_v1 > m_link
 Link to the EventInfo object in question.

Detailed Description

Class describing the properties of one pileup sub-event.

This class mirrors the setup of PileUpEventInfo::SubEvent. But uses a bit simpler structure on its inside.

Definition at line 286 of file EventInfo_v1.h.

Constructor & Destructor Documentation

◆ SubEvent()

xAOD::EventInfo_v1::SubEvent::SubEvent ( int16_t time,
uint16_t index,
PileUpType type,
const ElementLink< EventInfoContainer_v1 > & link )

Constructor giving all relevant information to the object.

Definition at line 411 of file EventInfo_v1.cxx.

414 : m_time( time ), m_index( index ), m_type( type ), m_link( link ) {
415
416 }
uint16_t m_index
The index of the pileup event.
PileUpType m_type
The type of the pileup event.
ElementLink< EventInfoContainer_v1 > m_link
Link to the EventInfo object in question.
uint16_t index() const
Get the index of the sub-event.
const ElementLink< EventInfoContainer_v1 > & link() const
Get a link to the EventInfo object describing the pileup event.
int16_t m_time
The time wrt. the signal event.
int16_t time() const
Get the time wrt. the signal event (which has time() == 0).
PileUpType type() const
Get the type of the pileup event.

Member Function Documentation

◆ index()

uint16_t xAOD::EventInfo_v1::SubEvent::index ( ) const

Get the index of the sub-event.

Definition at line 423 of file EventInfo_v1.cxx.

423 {
424
425 return m_index;
426 }

◆ link()

const ElementLink< EventInfoContainer_v1 > & xAOD::EventInfo_v1::SubEvent::link ( ) const

Get a link to the EventInfo object describing the pileup event.

Definition at line 464 of file EventInfo_v1.cxx.

464 {
465
466 return m_link;
467 }

◆ ptr()

const EventInfo_v1 * xAOD::EventInfo_v1::SubEvent::ptr ( ) const

Get a pointer to the EventInfo object describing the pileup event.

Definition at line 469 of file EventInfo_v1.cxx.

469 {
470
471 if( m_link.isValid() ) {
472 return *m_link;
473 } else {
474 return nullptr;
475 }
476 }

◆ time()

int16_t xAOD::EventInfo_v1::SubEvent::time ( ) const

Get the time wrt. the signal event (which has time() == 0).

Definition at line 418 of file EventInfo_v1.cxx.

418 {
419
420 return m_time;
421 }

◆ type()

EventInfo_v1::PileUpType xAOD::EventInfo_v1::SubEvent::type ( ) const

Get the type of the pileup event.

Definition at line 428 of file EventInfo_v1.cxx.

428 {
429
430 return m_type;
431 }

◆ typeName()

const std::string & xAOD::EventInfo_v1::SubEvent::typeName ( ) const

The string name of the type.

Definition at line 433 of file EventInfo_v1.cxx.

433 {
434
435 // This is a really inefficienct implementation, but didn't
436 // feel like writing a short and efficient implementation for C++11,
437 // and a longer but still efficient version for C++03. This is a
438 // medium-sized, slow implementation that works everywhere... :-P
439 if( m_type == Signal ) {
440 static const std::string name = "Signal";
441 return name;
442 } else if( m_type == MinimumBias ) {
443 static const std::string name = "MinimumBias";
444 return name;
445 } else if( m_type == Cavern ) {
446 static const std::string name = "Cavern";
447 return name;
448 } else if( m_type == HaloGas ) {
449 static const std::string name = "HaloGas";
450 return name;
451 } else if( m_type == HighPtMinimumBias ) {
452 static const std::string name = "HighPtMinimumBias";
453 return name;
454 } else if( m_type == ZeroBias ) {
455 static const std::string name = "ZeroBias";
456 return name;
457 } else {
458 static const std::string name = "Unknown";
459 return name;
460 }
461 }
@ HaloGas
Halo-gas non-collision background.
@ HighPtMinimumBias
High pT Minimum bias pileup event.
@ MinimumBias
(Low pT) Minimum bias pileup event
@ ZeroBias
Zero bias pileup event.
@ Signal
The signal event.
@ Cavern
Cavern background pileup event.

Member Data Documentation

◆ m_index

uint16_t xAOD::EventInfo_v1::SubEvent::m_index
private

The index of the pileup event.

Definition at line 309 of file EventInfo_v1.h.

◆ m_link

ElementLink< EventInfoContainer_v1 > xAOD::EventInfo_v1::SubEvent::m_link
private

Link to the EventInfo object in question.

Definition at line 312 of file EventInfo_v1.h.

◆ m_time

int16_t xAOD::EventInfo_v1::SubEvent::m_time
private

The time wrt. the signal event.

Definition at line 308 of file EventInfo_v1.h.

◆ m_type

PileUpType xAOD::EventInfo_v1::SubEvent::m_type
private

The type of the pileup event.

Definition at line 310 of file EventInfo_v1.h.


The documentation for this class was generated from the following files: