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_v1ptr () 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_v1m_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 443 of file EventInfo_v1.cxx.

446 : m_time( time ), m_index( index ), m_type( type ), m_link( link ) {
447
448 }
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 455 of file EventInfo_v1.cxx.

455 {
456
457 return m_index;
458 }

◆ 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 496 of file EventInfo_v1.cxx.

496 {
497
498 return m_link;
499 }

◆ ptr()

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

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

Definition at line 501 of file EventInfo_v1.cxx.

501 {
502
503 if( m_link.isValid() ) {
504 return *m_link;
505 } else {
506 return nullptr;
507 }
508 }

◆ time()

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

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

Definition at line 450 of file EventInfo_v1.cxx.

450 {
451
452 return m_time;
453 }

◆ type()

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

Get the type of the pileup event.

Definition at line 460 of file EventInfo_v1.cxx.

460 {
461
462 return m_type;
463 }

◆ typeName()

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

The string name of the type.

Definition at line 465 of file EventInfo_v1.cxx.

465 {
466
467 // This is a really inefficienct implementation, but didn't
468 // feel like writing a short and efficient implementation for C++11,
469 // and a longer but still efficient version for C++03. This is a
470 // medium-sized, slow implementation that works everywhere... :-P
471 if( m_type == Signal ) {
472 static const std::string name = "Signal";
473 return name;
474 } else if( m_type == MinimumBias ) {
475 static const std::string name = "MinimumBias";
476 return name;
477 } else if( m_type == Cavern ) {
478 static const std::string name = "Cavern";
479 return name;
480 } else if( m_type == HaloGas ) {
481 static const std::string name = "HaloGas";
482 return name;
483 } else if( m_type == HighPtMinimumBias ) {
484 static const std::string name = "HighPtMinimumBias";
485 return name;
486 } else if( m_type == ZeroBias ) {
487 static const std::string name = "ZeroBias";
488 return name;
489 } else {
490 static const std::string name = "Unknown";
491 return name;
492 }
493 }
@ 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: