ATLAS Offline Software
Loading...
Searching...
No Matches
Analysis::ElectronAssociation Class Referenceabstract

#include <ElectronAssociation.h>

Inheritance diagram for Analysis::ElectronAssociation:
Collaboration diagram for Analysis::ElectronAssociation:

Public Types

typedef JetKeyDescriptor::key_t name_t
typedef name_t NameType
typedef typename NavigationDefaults::DefaultChildColl< ElectronContainer, double >::type constituent_coll
typedef constituent_coll::iterator constituent_iter
typedef constituent_coll::const_iterator constituent_const_iter
typedef ElectronContainer container_type
 Object container type.
typedef double parameter_type
 \ brief Relational parameter type
typedef NavigationDefaults::DefaultChildColl< container_type, parameter_typenavhelper_t
 Collection manager type.
typedef ElectronContainer::base_value_type constituent_type
typedef ElectronContainer::reference constituent_ptr_ref
typedef ElectronContainer::const_reference constituent_const_ptr_ref
typedef ElectronContainer::value_type constituent_ptr
typedef SG::GenerateIndexingPolicy< ElectronContainer >::type::index_type external_index_type
typedef NavigableIterator< ElectronContainer, double, typename NavigationDefaults::DefaultChildColl< ElectronContainer, double >::typeobject_iter

Public Member Functions

 ElectronAssociation ()=default
 constructor
 ElectronAssociation (const NameType &name)
 constructor
 ~ElectronAssociation ()=default
virtual JetAssociationBaseclone () const
 a clone method for the proper workings of the copy constructor
const Electronelectron () const
 get electron directly without token
void set_electron (const ElectronContainer *theContainer, const Electron *the_electron, double weight=1)
void set_electron (const ElectronContainer *theContainer, const index_type &theIndex, double weight=1)
void set_association (const ElectronContainer *theContainer, const Electron *the_electron, double weight=1)
void set_association (const ElectronContainer *theContainer, const index_type &theIndex, double weight=1)
double getElectronWeight (const Electron *the_electron) const
double getElectronWeight (const ElectronContainer *theContainer, const index_type &theIndex) const
void setName (const name_t &name)
const name_tname () const
size_t keyIndex () const
virtual void fillToken (INavigationToken &navToken) const
void putElement (const ElectronContainer *objectContainer, const constituent_type *constituentObject, const double &objectParameter=double(), size_t sizeHint=0)
void insertElement (const ElectronContainer *objectContainer, const constituent_type *constituentObject, const double &objectParameter=double(), size_t sizeHint=0)
void reweight (const constituent_type *constituentObject, const double &objectParameter=double())
bool remove (const constituent_type *aConstituent)
bool removeAll ()
bool replace (const ElectronContainer *newObjectContainer)
 replace old object container with a new container assumes that all objects have been or will be inserted to the new container
bool contains (const constituent_type *aConstituent) const
virtual object_iter begin () const
virtual object_iter end () const
virtual unsigned int size () const
double getParameter (const constituent_type *aConstituent) const
const ElectronContainergetContainer (const constituent_type *aConstituent) const
bool getIndex (const constituent_type *aConstituent, external_index_type &theIndex) const
virtual void fillToken (INavigationToken &thisToken, const std::any &weight) const =0

Protected Member Functions

const constituent_collgetConstituents () const
const constituent_collgetPtrToConstituents () const
virtual const constituent_typegetConstituentPtr (constituent_iter iter) const
virtual double getConstituentPar (constituent_iter iter) const
void dumpStore () const

Protected Attributes

size_t m_keyIndex
JetKeyDescriptorInstancem_jetKeyDescr

Private Types

typedef Navigable< ElectronContainer, double >::external_index_type index_type
typedef Navigable< ElectronContainer, double >::constituent_iter iter_type

Private Member Functions

virtual void apply (NavigationToken< constituent_type > &navToken) const
virtual void toKidsAfterAccept (INavigationToken &navToken) const
virtual void toKidsAfterReject (INavigationToken &navToken) const

Private Attributes

constituent_coll m_constituents

Detailed Description

Definition at line 25 of file ElectronAssociation.h.

Member Typedef Documentation

◆ constituent_coll

Definition at line 101 of file Navigable.h.

◆ constituent_const_iter

typedef constituent_coll::const_iterator Navigable< ElectronContainer, double, typename NavigationDefaults::DefaultChildColl<ElectronContainer, double>::type >::constituent_const_iter
inherited

Definition at line 103 of file Navigable.h.

◆ constituent_const_ptr_ref

typedef ElectronContainer::const_reference Navigable< ElectronContainer, double, typename NavigationDefaults::DefaultChildColl<ElectronContainer, double>::type >::constituent_const_ptr_ref
inherited

Definition at line 151 of file Navigable.h.

◆ constituent_iter

typedef constituent_coll::iterator Navigable< ElectronContainer, double, typename NavigationDefaults::DefaultChildColl<ElectronContainer, double>::type >::constituent_iter
inherited

Definition at line 102 of file Navigable.h.

◆ constituent_ptr

Definition at line 152 of file Navigable.h.

◆ constituent_ptr_ref

Definition at line 150 of file Navigable.h.

◆ constituent_type

Definition at line 149 of file Navigable.h.

◆ container_type

typedef ElectronContainer Navigable< ElectronContainer, double, typename NavigationDefaults::DefaultChildColl<ElectronContainer, double>::type >::container_type
inherited

Object container type.

Definition at line 110 of file Navigable.h.

◆ external_index_type

◆ index_type

◆ iter_type

◆ name_t

Definition at line 28 of file JetAssociationBase.h.

◆ NameType

Definition at line 29 of file JetAssociationBase.h.

◆ navhelper_t

Collection manager type.

Definition at line 114 of file Navigable.h.

◆ object_iter

◆ parameter_type

typedef double Navigable< ElectronContainer, double, typename NavigationDefaults::DefaultChildColl<ElectronContainer, double>::type >::parameter_type
inherited

\ brief Relational parameter type

Definition at line 112 of file Navigable.h.

Constructor & Destructor Documentation

◆ ElectronAssociation() [1/2]

Analysis::ElectronAssociation::ElectronAssociation ( )
default

constructor

◆ ElectronAssociation() [2/2]

Analysis::ElectronAssociation::ElectronAssociation ( const NameType & name)

constructor

Definition at line 10 of file ElectronAssociation.cxx.

11 {
12 this->setName(name);
13 }
void setName(const name_t &name)
const name_t & name() const

◆ ~ElectronAssociation()

Analysis::ElectronAssociation::~ElectronAssociation ( )
default

Member Function Documentation

◆ apply()

virtual void Navigable< ElectronContainer, double, typename NavigationDefaults::DefaultChildColl<ElectronContainer, double>::type >::apply ( NavigationToken< constituent_type > & navToken) const
privatevirtualinherited

◆ begin()

virtual object_iter Navigable< ElectronContainer, double, typename NavigationDefaults::DefaultChildColl<ElectronContainer, double>::type >::begin ( ) const
virtualinherited

◆ clone()

JetAssociationBase * Analysis::ElectronAssociation::clone ( ) const
virtual

a clone method for the proper workings of the copy constructor

Implements JetAssociationBase.

Definition at line 15 of file ElectronAssociation.cxx.

16 {
17 return new ElectronAssociation( *this );
18 }
ElectronAssociation()=default
constructor

◆ contains()

bool Navigable< ElectronContainer, double, typename NavigationDefaults::DefaultChildColl<ElectronContainer, double>::type >::contains ( const constituent_type * aConstituent) const
inherited

◆ dumpStore()

void Navigable< ElectronContainer, double, typename NavigationDefaults::DefaultChildColl<ElectronContainer, double>::type >::dumpStore ( ) const
protectedinherited

◆ electron()

const Electron * Analysis::ElectronAssociation::electron ( ) const

get electron directly without token

Definition at line 20 of file ElectronAssociation.cxx.

21 {
22 //get electron from Navigable
23 if (this->size() ==0)
24 return nullptr;
25 if (this->size() > 1)
26 return nullptr;
27 // this shouldn't happen
28 else
29 return getConstituentPtr((this->getConstituents()).begin());
30 }
const constituent_coll & getConstituents() const
Definition Navigable.h:290
virtual unsigned int size() const
virtual object_iter begin() const
virtual const constituent_type * getConstituentPtr(constituent_iter iter) const

◆ end()

virtual object_iter Navigable< ElectronContainer, double, typename NavigationDefaults::DefaultChildColl<ElectronContainer, double>::type >::end ( ) const
virtualinherited

◆ fillToken() [1/2]

virtual void INavigable::fillToken ( INavigationToken & thisToken,
const std::any & weight ) const
pure virtualinherited

Implemented in Analysis::ISvxAssociation, Analysis::ISvxConstituent, Analysis::Muon, Analysis::MuonAssociation, Analysis::ParticleShallowClone, Analysis::TauJet, CaloClusterNavigable, constituent_iter< ElectronContainer, double >, constituent_iter< INavigable4MomentumCollection, double >, constituent_iter< JetCollection, double >, constituent_iter< MuonContainer, double >, constituent_iter< PhotonContainer, double >, constituent_iter< TrackParticleContainer, double >, eflowObject, egamma, external_index_type< CaloCellContainer, double >, external_index_type< ElectronContainer, double >, external_index_type< INavigable4MomentumCollection, double >, external_index_type< JetCollection, double >, external_index_type< MuonContainer, double >, external_index_type< PhotonContainer, double >, external_index_type< TrackParticleContainer, double >, Jet, Nav4MomWrapper< Navigable_t, P4Momentum_t >, Navigable< CONT, RPAR, COLL >, Navigable< CaloClusterContainer >, Navigable< collection_t, weight_t >, Navigable< INavigable4MomentumCollection, double >, NavigableTerminalNode, object_iter< CaloCellContainer, double >, object_iter< TrackParticleContainer, double >, ParticleImpl< INavigable_t, I4Momentum_t, IParticle_t >, ParticleImpl< ::Analysis::MuonNavigation, ::P4ImplIPtCotThPhiM >, ParticleImpl< ::Analysis::TauJetNavigation, ::P4ImplEEtaPhiM >, ParticleImpl< CompositeParticleNavigation, P4ImplPxPyPzE, ParticleEvent::Base >, ParticleImpl< egammaNavigation, P4ImplEEtaPhiM >, ParticleImpl< INavigable_t, I4Momentum_t, IParticle_t >, ParticleImpl< NavigableTerminalNode, P4ImplEEtaPhiM, ParticleEvent::Base >, ParticleImpl< NavigableTerminalNode, P4ImplIPtCotThPhiM, ParticleEvent::Base >, ParticleImpl< NavigableTerminalNode, P4ImplPxPyPzE, ParticleEvent::Base >, ParticleImpl< NeutrinoNavigation, P4ImplPxPyPzE >, ParticleImpl< TruthParticleNavigation, TruthParticleMomentum, TruthParticleBase >, ParticleSigStateImpl< INavigable_t, I4Momentum_t, IParticle_t >, ParticleSigStateImpl< INavigable_t, I4Momentum_t, IParticle_t >, and ParticleSigStateImpl< Navigable< INavigable4MomentumCollection, double >, P4ImplPxPyPzE, ParticleEvent::Base >.

◆ fillToken() [2/2]

virtual void Navigable< ElectronContainer, double, typename NavigationDefaults::DefaultChildColl<ElectronContainer, double>::type >::fillToken ( INavigationToken & navToken) const
virtualinherited

Implements INavigable.

◆ getConstituentPar()

virtual double Navigable< ElectronContainer, double, typename NavigationDefaults::DefaultChildColl<ElectronContainer, double>::type >::getConstituentPar ( constituent_iter iter) const
protectedvirtualinherited

◆ getConstituentPtr()

virtual const constituent_type * Navigable< ElectronContainer, double, typename NavigationDefaults::DefaultChildColl<ElectronContainer, double>::type >::getConstituentPtr ( constituent_iter iter) const
protectedvirtualinherited

◆ getConstituents()

const constituent_coll & Navigable< ElectronContainer, double, typename NavigationDefaults::DefaultChildColl<ElectronContainer, double>::type >::getConstituents ( ) const
inlineprotectedinherited

Definition at line 290 of file Navigable.h.

290{ return m_constituents; }

◆ getContainer()

const ElectronContainer * Navigable< ElectronContainer, double, typename NavigationDefaults::DefaultChildColl<ElectronContainer, double>::type >::getContainer ( const constituent_type * aConstituent) const
inherited

◆ getElectronWeight() [1/2]

double Analysis::ElectronAssociation::getElectronWeight ( const Electron * the_electron) const

Definition at line 68 of file ElectronAssociation.cxx.

69 {
70 // from Navigable
71 return (this->contains(the_electron) )
72 ? this->getParameter(the_electron)
73 : 0.;
74 }
double getParameter(const constituent_type *aConstituent) const
bool contains(const constituent_type *aConstituent) const

◆ getElectronWeight() [2/2]

double Analysis::ElectronAssociation::getElectronWeight ( const ElectronContainer * theContainer,
const index_type & theIndex ) const

Definition at line 76 of file ElectronAssociation.cxx.

78 {
79 // from Navigable
80 return (this->contains(theContainer,theIndex))
81 ? this->getParameter(theContainer,theIndex)
82 : 0.;
83 }

◆ getIndex()

bool Navigable< ElectronContainer, double, typename NavigationDefaults::DefaultChildColl<ElectronContainer, double>::type >::getIndex ( const constituent_type * aConstituent,
external_index_type & theIndex ) const
inherited

◆ getParameter()

double Navigable< ElectronContainer, double, typename NavigationDefaults::DefaultChildColl<ElectronContainer, double>::type >::getParameter ( const constituent_type * aConstituent) const
inherited

◆ getPtrToConstituents()

const constituent_coll * Navigable< ElectronContainer, double, typename NavigationDefaults::DefaultChildColl<ElectronContainer, double>::type >::getPtrToConstituents ( ) const
inlineprotectedinherited

Definition at line 294 of file Navigable.h.

295 { return &m_constituents; }

◆ insertElement()

void Navigable< ElectronContainer, double, typename NavigationDefaults::DefaultChildColl<ElectronContainer, double>::type >::insertElement ( const ElectronContainer * objectContainer,
const constituent_type * constituentObject,
const double & objectParameter = RPAR(),
size_t sizeHint = 0 )
inherited

◆ keyIndex()

size_t JetAssociationBase::keyIndex ( ) const
inlineinherited

Definition at line 35 of file JetAssociationBase.h.

35{ return m_keyIndex; }

◆ name()

const JetAssociationBase::name_t & JetAssociationBase::name ( ) const
inherited

Definition at line 20 of file JetAssociationBase.cxx.

21{
23}
JetKeyDescriptorInstance * m_jetKeyDescr
static const key_t AssoCat
Index category for jet associations.

◆ putElement()

void Navigable< ElectronContainer, double, typename NavigationDefaults::DefaultChildColl<ElectronContainer, double>::type >::putElement ( const ElectronContainer * objectContainer,
const constituent_type * constituentObject,
const double & objectParameter = RPAR(),
size_t sizeHint = 0 )
inherited

◆ remove()

bool Navigable< ElectronContainer, double, typename NavigationDefaults::DefaultChildColl<ElectronContainer, double>::type >::remove ( const constituent_type * aConstituent)
inherited

◆ removeAll()

bool Navigable< ElectronContainer, double, typename NavigationDefaults::DefaultChildColl<ElectronContainer, double>::type >::removeAll ( )
inlineinherited

Definition at line 237 of file Navigable.h.

237{ m_constituents.clear(); return this->size() == 0 ; }

◆ replace()

bool Navigable< ElectronContainer, double, typename NavigationDefaults::DefaultChildColl<ElectronContainer, double>::type >::replace ( const ElectronContainer * newObjectContainer)
inherited

replace old object container with a new container assumes that all objects have been or will be inserted to the new container

◆ reweight()

void Navigable< ElectronContainer, double, typename NavigationDefaults::DefaultChildColl<ElectronContainer, double>::type >::reweight ( const constituent_type * constituentObject,
const double & objectParameter = RPAR() )
inherited

◆ set_association() [1/2]

void Analysis::ElectronAssociation::set_association ( const ElectronContainer * theContainer,
const Electron * the_electron,
double weight = 1 )
inline

Definition at line 51 of file ElectronAssociation.h.

53 {set_electron(theContainer, the_electron, weight);}
void set_electron(const ElectronContainer *theContainer, const Electron *the_electron, double weight=1)

◆ set_association() [2/2]

void Analysis::ElectronAssociation::set_association ( const ElectronContainer * theContainer,
const index_type & theIndex,
double weight = 1 )
inline

Definition at line 55 of file ElectronAssociation.h.

58 {set_electron(theContainer, theIndex, weight);}

◆ set_electron() [1/2]

void Analysis::ElectronAssociation::set_electron ( const ElectronContainer * theContainer,
const Electron * the_electron,
double weight = 1 )

Definition at line 32 of file ElectronAssociation.cxx.

35 {
36 double newWeight = weight;
37 // electron already in collection
38 if ( this->contains(the_electron) )
39 {
40 // update weight
41 newWeight *= this->getElectronWeight(the_electron);
42 // remove the previous electron
43 this->remove(the_electron);
44 }
45
46 // from Navigable base
47 this->putElement(theContainer,the_electron,newWeight);
48 }
double getElectronWeight(const Electron *the_electron) const
bool remove(const constituent_type *aConstituent)
void putElement(const ElectronContainer *objectContainer, const constituent_type *constituentObject, const double &objectParameter=double(), size_t sizeHint=0)

◆ set_electron() [2/2]

void Analysis::ElectronAssociation::set_electron ( const ElectronContainer * theContainer,
const index_type & theIndex,
double weight = 1 )

Definition at line 50 of file ElectronAssociation.cxx.

53 {
54 double newWeight = weight;
55 // electron already in collection
56 if ( this->contains(theContainer,theIndex) )
57 {
58 // update weight
59 newWeight *= this->getElectronWeight(theContainer,theIndex);
60 // remove the previous electron
61 this->remove(theContainer,theIndex);
62 }
63
64 // from Navigable base
65 this->putElement(theContainer,theIndex,newWeight);
66 }

◆ setName()

void JetAssociationBase::setName ( const name_t & name)
inherited

Definition at line 15 of file JetAssociationBase.cxx.

◆ size()

virtual unsigned int Navigable< ElectronContainer, double, typename NavigationDefaults::DefaultChildColl<ElectronContainer, double>::type >::size ( ) const
virtualinherited

◆ toKidsAfterAccept()

virtual void Navigable< ElectronContainer, double, typename NavigationDefaults::DefaultChildColl<ElectronContainer, double>::type >::toKidsAfterAccept ( INavigationToken & navToken) const
privatevirtualinherited

◆ toKidsAfterReject()

virtual void Navigable< ElectronContainer, double, typename NavigationDefaults::DefaultChildColl<ElectronContainer, double>::type >::toKidsAfterReject ( INavigationToken & navToken) const
privatevirtualinherited

Member Data Documentation

◆ m_constituents

constituent_coll Navigable< ElectronContainer, double, typename NavigationDefaults::DefaultChildColl<ElectronContainer, double>::type >::m_constituents
privateinherited

Definition at line 345 of file Navigable.h.

◆ m_jetKeyDescr

JetKeyDescriptorInstance* JetAssociationBase::m_jetKeyDescr
protectedinherited

Definition at line 57 of file JetAssociationBase.h.

◆ m_keyIndex

size_t JetAssociationBase::m_keyIndex
protectedinherited

Definition at line 56 of file JetAssociationBase.h.


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