ATLAS Offline Software
Loading...
Searching...
No Matches
TimedHitPtr< HIT > Class Template Reference

a smart pointer to a hit that also provides access to the extended timing info of the host event. More...

#include <TimedHitPtr.h>

Collaboration diagram for TimedHitPtr< HIT >:

Public Types

using element_type = std::add_const_t<HIT>
using value_type = HIT
using const_value_type = element_type

Public Member Functions

 TimedHitPtr ()=default
 STL required constructors.
 TimedHitPtr (const TimedHitPtr< HIT > &rhs)=default
 TimedHitPtr (TimedHitPtr< HIT > &&rhs)=default
 TimedHitPtr (float eventTime, const HIT *pHit, int pileupType=0)
 minimal constructor: pass only t0 offset of bunch xing
 TimedHitPtr (float eventTime, unsigned short eventId, const HIT *pHit, int pileupType=0)
 use this constructor when hit has a PileUpTimeEventIndex
TimedHitPtr< HIT > & operator= (const TimedHitPtr< HIT > &rhs)=default
 assignment operator
TimedHitPtr< HIT > & operator= (TimedHitPtr< HIT > &&rhs)=default
const HIT & operator* () const
 smart pointer interface
const HIT * operator-> () const
const HIT * get () const
 operator bool () const
unsigned short eventId () const
 the index of the component event in PileUpEventInfo.
int pileupType () const
 the type of event which the hit came from (signal, low pt minbias, high pt minbias, cavern bg, etc.)
float eventTime () const
 t0 offset of the bunch xing containing the hit in ns.

Private Attributes

float m_eventTime {0.f}
 t0 offset of the bunch xing in ns
unsigned short m_eventId {0u}
 the index in PileUpEventInfo of the component event hosting this hit
int m_pileupType {0}
const HIT * m_pHit {nullptr}

Friends

template<class FHIT>
float hitTime (const TimedHitPtr< FHIT > &)

Detailed Description

template<typename HIT>
class TimedHitPtr< HIT >

a smart pointer to a hit that also provides access to the extended timing info of the host event.

For a pu event this is taken from the event PileUpTimeEventIndex usually accessed via PileUpMergeSvc::TimedList

Definition at line 18 of file TimedHitPtr.h.

Member Typedef Documentation

◆ const_value_type

template<typename HIT>
using TimedHitPtr< HIT >::const_value_type = element_type

Definition at line 22 of file TimedHitPtr.h.

◆ element_type

template<typename HIT>
using TimedHitPtr< HIT >::element_type = std::add_const_t<HIT>

Definition at line 20 of file TimedHitPtr.h.

◆ value_type

template<typename HIT>
using TimedHitPtr< HIT >::value_type = HIT

Definition at line 21 of file TimedHitPtr.h.

Constructor & Destructor Documentation

◆ TimedHitPtr() [1/5]

template<typename HIT>
TimedHitPtr< HIT >::TimedHitPtr ( )
default

STL required constructors.

◆ TimedHitPtr() [2/5]

template<typename HIT>
TimedHitPtr< HIT >::TimedHitPtr ( const TimedHitPtr< HIT > & rhs)
default

◆ TimedHitPtr() [3/5]

template<typename HIT>
TimedHitPtr< HIT >::TimedHitPtr ( TimedHitPtr< HIT > && rhs)
default

◆ TimedHitPtr() [4/5]

template<typename HIT>
TimedHitPtr< HIT >::TimedHitPtr ( float eventTime,
const HIT * pHit,
int pileupType = 0 )
inline

minimal constructor: pass only t0 offset of bunch xing

Definition at line 30 of file TimedHitPtr.h.

30 :
a smart pointer to a hit that also provides access to the extended timing info of the host event.
Definition TimedHitPtr.h:18
float m_eventTime
t0 offset of the bunch xing in ns
Definition TimedHitPtr.h:60
int pileupType() const
the type of event which the hit came from (signal, low pt minbias, high pt minbias,...
Definition TimedHitPtr.h:51
const HIT * m_pHit
Definition TimedHitPtr.h:64
unsigned short m_eventId
the index in PileUpEventInfo of the component event hosting this hit
Definition TimedHitPtr.h:62
float eventTime() const
t0 offset of the bunch xing containing the hit in ns.
Definition TimedHitPtr.h:55

◆ TimedHitPtr() [5/5]

template<typename HIT>
TimedHitPtr< HIT >::TimedHitPtr ( float eventTime,
unsigned short eventId,
const HIT * pHit,
int pileupType = 0 )
inline

use this constructor when hit has a PileUpTimeEventIndex

Definition at line 33 of file TimedHitPtr.h.

33 :
unsigned short eventId() const
the index of the component event in PileUpEventInfo.
Definition TimedHitPtr.h:47

Member Function Documentation

◆ eventId()

template<typename HIT>
unsigned short TimedHitPtr< HIT >::eventId ( ) const
inline

the index of the component event in PileUpEventInfo.

Allows, in principle, to navigate back to the parent event

Definition at line 47 of file TimedHitPtr.h.

47{ return m_eventId; }

◆ eventTime()

template<typename HIT>
float TimedHitPtr< HIT >::eventTime ( ) const
inline

t0 offset of the bunch xing containing the hit in ns.

This is an integer multiple of the bunch xing distance for a certain event (e.g. N*25ns)

Definition at line 55 of file TimedHitPtr.h.

55{ return m_eventTime; }

◆ get()

template<typename HIT>
const HIT * TimedHitPtr< HIT >::get ( ) const
inline

Definition at line 42 of file TimedHitPtr.h.

42{ return m_pHit; }

◆ operator bool()

template<typename HIT>
TimedHitPtr< HIT >::operator bool ( ) const
inline

Definition at line 44 of file TimedHitPtr.h.

44{ return m_pHit != nullptr; }

◆ operator*()

template<typename HIT>
const HIT & TimedHitPtr< HIT >::operator* ( ) const
inline

smart pointer interface

Definition at line 40 of file TimedHitPtr.h.

40{ return *m_pHit; }

◆ operator->()

template<typename HIT>
const HIT * TimedHitPtr< HIT >::operator-> ( ) const
inline

Definition at line 41 of file TimedHitPtr.h.

41{ return m_pHit; }

◆ operator=() [1/2]

template<typename HIT>
TimedHitPtr< HIT > & TimedHitPtr< HIT >::operator= ( const TimedHitPtr< HIT > & rhs)
default

assignment operator

◆ operator=() [2/2]

template<typename HIT>
TimedHitPtr< HIT > & TimedHitPtr< HIT >::operator= ( TimedHitPtr< HIT > && rhs)
default

◆ pileupType()

template<typename HIT>
int TimedHitPtr< HIT >::pileupType ( ) const
inline

the type of event which the hit came from (signal, low pt minbias, high pt minbias, cavern bg, etc.)

Definition at line 51 of file TimedHitPtr.h.

51{ return m_pileupType; }

◆ hitTime

template<typename HIT>
template<class FHIT>
float hitTime ( const TimedHitPtr< FHIT > & )
friend

Member Data Documentation

◆ m_eventId

template<typename HIT>
unsigned short TimedHitPtr< HIT >::m_eventId {0u}
private

the index in PileUpEventInfo of the component event hosting this hit

Definition at line 62 of file TimedHitPtr.h.

62{0u};

◆ m_eventTime

template<typename HIT>
float TimedHitPtr< HIT >::m_eventTime {0.f}
private

t0 offset of the bunch xing in ns

Definition at line 60 of file TimedHitPtr.h.

60{0.f};

◆ m_pHit

template<typename HIT>
const HIT* TimedHitPtr< HIT >::m_pHit {nullptr}
private

Definition at line 64 of file TimedHitPtr.h.

64{nullptr}; //don't own

◆ m_pileupType

template<typename HIT>
int TimedHitPtr< HIT >::m_pileupType {0}
private

Definition at line 63 of file TimedHitPtr.h.

63{0};

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