ATLAS Offline Software
Public Types | Public Member Functions | Protected Attributes | List of all members
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. 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...
 
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 ( )

Definition at line 12 of file BaseIndexedConstituentUserInfo.cxx.

13 : m_idx(0), m_pli(nullptr) { }

◆ 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 }

◆ 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 }

◆ 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:
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::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
LArNewCalib_DelayDump_OFC_Cali.idx
idx
Definition: LArNewCalib_DelayDump_OFC_Cali.py:69