ATLAS Offline Software
Public Types | Public Member Functions | Protected Attributes | List of all members
jet::IndexedConstituentUserInfo Class Reference

#include <IndexedConstituentUserInfo.h>

Inheritance diagram for jet::IndexedConstituentUserInfo:
Collaboration diagram for jet::IndexedConstituentUserInfo:

Public Types

typedef int Index
 
typedef std::string Label
 

Public Member Functions

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

Protected Attributes

const xAOD::IParticlem_ppar
 
int m_idx
 
const LabelIndexm_pli
 

Detailed Description

Definition at line 28 of file IndexedConstituentUserInfo.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

◆ IndexedConstituentUserInfo() [1/2]

IndexedConstituentUserInfo::IndexedConstituentUserInfo ( )

Definition at line 18 of file IndexedConstituentUserInfo.cxx.

19 : m_ppar(nullptr) { }

◆ IndexedConstituentUserInfo() [2/2]

jet::IndexedConstituentUserInfo::IndexedConstituentUserInfo ( const xAOD::IParticle par,
Index  idx,
const LabelIndex pli 
)

Constructor from IParticle, index and map.

Member Function Documentation

◆ constitScale()

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

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 }

◆ element()

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

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 }

◆ index()

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

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
virtualinherited

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
virtualinherited

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
virtualinherited

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()

const xAOD::IParticle * IndexedConstituentUserInfo::particle ( ) const
virtual

Return the particle pointer.

Implements jet::IConstituentUserInfo.

Definition at line 30 of file IndexedConstituentUserInfo.cxx.

30  {
31  return m_ppar;
32 }

Member Data Documentation

◆ m_idx

int jet::BaseIndexedConstituentUserInfo::m_idx
protectedinherited

Definition at line 60 of file BaseIndexedConstituentUserInfo.h.

◆ m_pli

const LabelIndex* jet::BaseIndexedConstituentUserInfo::m_pli
protectedinherited

Definition at line 61 of file BaseIndexedConstituentUserInfo.h.

◆ m_ppar

const xAOD::IParticle* jet::IndexedConstituentUserInfo::m_ppar
protected

Definition at line 44 of file IndexedConstituentUserInfo.h.


The documentation for this class was generated from the following files:
jet::LabelIndex::constitScale
xAOD::JetConstitScale constitScale(Index idx) const
Fetch the constit scale corresponding to the index.
Definition: LabelIndex.cxx:49
jet::BaseIndexedConstituentUserInfo::m_pli
const LabelIndex * m_pli
Definition: BaseIndexedConstituentUserInfo.h:61
jet::IndexedConstituentUserInfo::m_ppar
const xAOD::IParticle * m_ppar
Definition: IndexedConstituentUserInfo.h:44
jet::IConstituentUserInfo::particle
virtual const xAOD::IParticle * particle() const =0
jet::BaseIndexedConstituentUserInfo::m_idx
int m_idx
Definition: BaseIndexedConstituentUserInfo.h:60
jet::LabelIndex::label
Label label(Index idx) const
Fetch the label for an index.
Definition: LabelIndex.cxx:41
xAOD::CalibratedJetConstituent
@ CalibratedJetConstituent
Definition: JetTypes.h:22