ATLAS Offline Software
Loading...
Searching...
No Matches
jet::BaseIndexedConstituentUserInfo Class Referenceabstract

#include <BaseIndexedConstituentUserInfo.h>

Inheritance diagram for jet::BaseIndexedConstituentUserInfo:
Collaboration diagram for jet::BaseIndexedConstituentUserInfo:

Public Types

typedef int Index
typedef std::string Label

Public Member Functions

 BaseIndexedConstituentUserInfo ()
 BaseIndexedConstituentUserInfo (Index idx, const LabelIndex *pli)
 Constructor from index and map.
const SG::AuxElementelement () const
 Return the particle pointer.
Label label () const
 Return the label.
Index index () const
 Return the index.
const LabelIndexlabelMap () const
 Return the index-to-label map.
bool isGhost () const
 Returns true if this constituent is a ghost.
xAOD::JetConstitScale constitScale () const
 Return the constituent scale used to build the PseudoJet.
virtual const xAOD::IParticleparticle () const =0

Protected Attributes

int m_idx
const LabelIndexm_pli

Detailed Description

Definition at line 29 of file BaseIndexedConstituentUserInfo.h.

Member Typedef Documentation

◆ Index

typedef int jet::IConstituentUserInfo::Index
inherited

Definition at line 30 of file IConstituentUserInfo.h.

◆ Label

typedef std::string jet::IConstituentUserInfo::Label
inherited

Definition at line 31 of file IConstituentUserInfo.h.

Constructor & Destructor Documentation

◆ BaseIndexedConstituentUserInfo() [1/2]

BaseIndexedConstituentUserInfo::BaseIndexedConstituentUserInfo ( )

◆ BaseIndexedConstituentUserInfo() [2/2]

BaseIndexedConstituentUserInfo::BaseIndexedConstituentUserInfo ( Index idx,
const LabelIndex * pli )

Constructor from index and map.

Definition at line 17 of file BaseIndexedConstituentUserInfo.cxx.

19: m_idx(idx), m_pli(pli) { }

Member Function Documentation

◆ constitScale()

xAOD::JetConstitScale BaseIndexedConstituentUserInfo::constitScale ( ) const
virtual

Return the constituent scale used to build the PseudoJet.

Reimplemented from jet::IConstituentUserInfo.

Definition at line 57 of file BaseIndexedConstituentUserInfo.cxx.

57 {
58 if ( m_pli == nullptr ) return xAOD::CalibratedJetConstituent;
59 return m_pli->constitScale( abs(m_idx) );
60}
@ CalibratedJetConstituent
Definition JetTypes.h:22

◆ element()

const SG::AuxElement * BaseIndexedConstituentUserInfo::element ( ) const
virtual

Return the particle pointer.

Method particle is implemented in subclass.

Implements jet::IConstituentUserInfo.

Reimplemented in jet::IndexedTConstituentUserInfo< T >.

Definition at line 23 of file BaseIndexedConstituentUserInfo.cxx.

23 {
24 return particle();
25}
virtual const xAOD::IParticle * particle() const =0

◆ index()

jet::BaseIndexedConstituentUserInfo::Index BaseIndexedConstituentUserInfo::index ( ) const
virtual

Return the index.

Reimplemented from jet::IConstituentUserInfo.

Definition at line 38 of file BaseIndexedConstituentUserInfo.cxx.

38 {
39 return abs(m_idx);
40}

◆ isGhost()

bool BaseIndexedConstituentUserInfo::isGhost ( ) const
virtual

Returns true if this constituent is a ghost.

Reimplemented from jet::IConstituentUserInfo.

Definition at line 50 of file BaseIndexedConstituentUserInfo.cxx.

50 {
51 // valid m_idx are guaranteed to be != 0 when constructed by LabelIndex
52 return m_idx < 0;
53}

◆ label()

jet::BaseIndexedConstituentUserInfo::Label BaseIndexedConstituentUserInfo::label ( ) const
virtual

Return the label.

Implements jet::IConstituentUserInfo.

Definition at line 30 of file BaseIndexedConstituentUserInfo.cxx.

30 {
31 if ( m_pli == nullptr ) return "";
32 return m_pli->label(abs(m_idx));
33}

◆ labelMap()

const jet::LabelIndex * BaseIndexedConstituentUserInfo::labelMap ( ) const
virtual

Return the index-to-label map.

Reimplemented from jet::IConstituentUserInfo.

Definition at line 44 of file BaseIndexedConstituentUserInfo.cxx.

44 {
45 return m_pli;
46}

◆ particle()

virtual const xAOD::IParticle * jet::IConstituentUserInfo::particle ( ) const
pure virtualinherited

Member Data Documentation

◆ m_idx

int jet::BaseIndexedConstituentUserInfo::m_idx
protected

Definition at line 60 of file BaseIndexedConstituentUserInfo.h.

◆ m_pli

const LabelIndex* jet::BaseIndexedConstituentUserInfo::m_pli
protected

Definition at line 61 of file BaseIndexedConstituentUserInfo.h.


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