ATLAS Offline Software
Loading...
Searching...
No Matches
JetINav4MomAssociation Class Reference

A JetAssociation object for a generic object. More...

#include <JetINav4MomAssociation.h>

Inheritance diagram for JetINav4MomAssociation:
Collaboration diagram for JetINav4MomAssociation:

Public Types

typedef JetKeyDescriptor::key_t name_t
typedef name_t NameType
typedef typename NavigationDefaults::DefaultChildColl< INavigable4MomentumCollection, double >::type constituent_coll
typedef constituent_coll::iterator constituent_iter
typedef constituent_coll::const_iterator constituent_const_iter
typedef INavigable4MomentumCollection 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 INavigable4MomentumCollection::base_value_type constituent_type
typedef INavigable4MomentumCollection::reference constituent_ptr_ref
typedef INavigable4MomentumCollection::const_reference constituent_const_ptr_ref
typedef INavigable4MomentumCollection::value_type constituent_ptr
typedef SG::GenerateIndexingPolicy< INavigable4MomentumCollection >::type::index_type external_index_type
typedef NavigableIterator< INavigable4MomentumCollection, double, typename NavigationDefaults::DefaultChildColl< INavigable4MomentumCollection, double >::typeobject_iter

Public Member Functions

 JetINav4MomAssociation ()
 constructor
 JetINav4MomAssociation (NameType &name)
 constructor
 ~JetINav4MomAssociation ()=default
 destructor
virtual JetAssociationBaseclone () const
 a clone method for the proper workings of the copy constructor
const INavigable4Momentuminav4momentum () const
 get jet directly without token
void set_inav4momentum (const INavigable4MomentumCollection *theContainer, const INavigable4Momentum *the_inav4momentum, double weight=1)
void set_inav4momentum (const INavigable4MomentumCollection *theContainer, index_type &theIndex, double weight=1)
void set_association (const INavigable4MomentumCollection *theContainer, const INavigable4Momentum *the_inav4momentum, double weight=1)
void set_association (const INavigable4MomentumCollection *theContainer, index_type &theIndex, double weight=1)
double getinav4momentumWeight (const INavigable4Momentum *the_inav4momentum) const
double getinav4momentumWeight (const INavigable4MomentumCollection *theContainer, index_type &theIndex) const
void setName (const name_t &name)
const name_tname () const
size_t keyIndex () const
virtual void fillToken (INavigationToken &navToken) const
virtual void fillToken (INavigationToken &navToken, const std::any &parentParameter) const
void putElement (const INavigable4MomentumCollection *objectContainer, const constituent_type *constituentObject, const double &objectParameter=double(), size_t sizeHint=0)
void putElement (const INavigable4MomentumCollection *objectContainer, const external_index_type &theIndex, const double &objectParameter=double(), size_t sizeHint=0)
void insertElement (const INavigable4MomentumCollection *objectContainer, const constituent_type *constituentObject, const double &objectParameter=double(), size_t sizeHint=0)
void insertElement (const INavigable4MomentumCollection *objectContainer, const external_index_type &theIndex, const double &objectParameter=double(), size_t sizeHint=0)
void insertElement (const INavigable4MomentumCollection *objectContainer, const external_index_type &theIndex, IProxyDict *sg, const double &objectParameter=double(), size_t sizeHint=0)
void insertElement (const ElementLink< INavigable4MomentumCollection > &el, const double &objectParameter=double(), size_t sizeHint=0)
void reweight (const constituent_type *constituentObject, const double &objectParameter=double())
void reweight (const INavigable4MomentumCollection *objectContainer, const external_index_type &theIndex, const double &objectParameter=double())
void reweight (object_iter &objectIter, const double &objectParameter=double())
bool remove (const constituent_type *aConstituent)
bool remove (const INavigable4MomentumCollection *objectContainer, const external_index_type &theIndex)
bool removeAll ()
bool replace (const INavigable4MomentumCollection *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
bool contains (const INavigable4MomentumCollection *objectContainer, const external_index_type &theIndex) const
virtual object_iter begin () const
virtual object_iter end () const
virtual unsigned int size () const
double getParameter (const constituent_type *aConstituent) const
double getParameter (const INavigable4MomentumCollection *objectContainer, const external_index_type &theIndex) const
double getParameter (object_iter &theIter) const
const INavigable4MomentumCollectiongetContainer (const constituent_type *aConstituent) const
const INavigable4MomentumCollectiongetContainer (constituent_const_iter anIter) const
const INavigable4MomentumCollectiongetContainer (object_iter objectIter) const
bool getIndex (const constituent_type *aConstituent, external_index_type &theIndex) const
bool getIndex (constituent_const_iter anIter, external_index_type &theIndex) const
bool getIndex (object_iter objectIter, external_index_type &theIndex) const

Protected Member Functions

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

Protected Attributes

size_t m_keyIndex
JetKeyDescriptorInstancem_jetKeyDescr

Private Types

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

Private Member Functions

virtual void apply (NavigationToken< constituent_type > &navToken) const
virtual void apply (NavigationToken< constituent_type, double > &navToken, const double &aParameter) const
virtual void toKidsAfterAccept (INavigationToken &navToken) const
virtual void toKidsAfterAccept (INavigationToken &navToken, const std::any &aParameter) const
virtual void toKidsAfterReject (INavigationToken &navToken) const
virtual void toKidsAfterReject (INavigationToken &navToken, const std::any &aParameter) const

Private Attributes

constituent_coll m_constituents

Detailed Description

A JetAssociation object for a generic object.

Author
Bertrand Chapleau
P.A. Delsart (moved to JetEvent package)
Date
summer 2011

Definition at line 31 of file JetINav4MomAssociation.h.

Member Typedef Documentation

◆ constituent_coll

◆ constituent_const_iter

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

Definition at line 103 of file Navigable.h.

◆ constituent_const_ptr_ref

◆ constituent_iter

Definition at line 102 of file Navigable.h.

◆ constituent_ptr

◆ constituent_ptr_ref

◆ constituent_type

◆ container_type

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< INavigable4MomentumCollection, double, typename NavigationDefaults::DefaultChildColl<INavigable4MomentumCollection, double>::type >::parameter_type
inherited

\ brief Relational parameter type

Definition at line 112 of file Navigable.h.

Constructor & Destructor Documentation

◆ JetINav4MomAssociation() [1/2]

JetINav4MomAssociation::JetINav4MomAssociation ( )
default

constructor

◆ JetINav4MomAssociation() [2/2]

JetINav4MomAssociation::JetINav4MomAssociation ( NameType & name)

constructor

Definition at line 10 of file JetINav4MomAssociation.cxx.

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

◆ ~JetINav4MomAssociation()

JetINav4MomAssociation::~JetINav4MomAssociation ( )
default

destructor

Member Function Documentation

◆ apply() [1/2]

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

◆ apply() [2/2]

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

◆ begin()

◆ clone()

JetAssociationBase * JetINav4MomAssociation::clone ( ) const
virtual

a clone method for the proper workings of the copy constructor

Implements JetAssociationBase.

Definition at line 15 of file JetINav4MomAssociation.cxx.

16{
17 return new JetINav4MomAssociation( *this );
18}
JetINav4MomAssociation()
constructor

◆ contains() [1/2]

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

◆ contains() [2/2]

bool Navigable< INavigable4MomentumCollection, double, typename NavigationDefaults::DefaultChildColl<INavigable4MomentumCollection, double>::type >::contains ( const INavigable4MomentumCollection * objectContainer,
const external_index_type & theIndex ) const
inherited

◆ dumpStore()

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

◆ end()

◆ fillToken() [1/2]

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

Implements INavigable.

◆ fillToken() [2/2]

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

Implements INavigable.

◆ getConstituentPar() [1/2]

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

◆ getConstituentPar() [2/2]

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

◆ getConstituentPtr() [1/2]

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

◆ getConstituentPtr() [2/2]

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

◆ getConstituents() [1/2]

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

Definition at line 291 of file Navigable.h.

◆ getConstituents() [2/2]

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

Definition at line 290 of file Navigable.h.

290{ return m_constituents; }

◆ getContainer() [1/3]

◆ getContainer() [2/3]

◆ getContainer() [3/3]

◆ getinav4momentumWeight() [1/2]

double JetINav4MomAssociation::getinav4momentumWeight ( const INavigable4Momentum * the_inav4momentum) const

Definition at line 68 of file JetINav4MomAssociation.cxx.

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

◆ getinav4momentumWeight() [2/2]

double JetINav4MomAssociation::getinav4momentumWeight ( const INavigable4MomentumCollection * theContainer,
index_type & theIndex ) const

Definition at line 76 of file JetINav4MomAssociation.cxx.

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

◆ getIndex() [1/3]

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

◆ getIndex() [2/3]

◆ getIndex() [3/3]

bool Navigable< INavigable4MomentumCollection, double, typename NavigationDefaults::DefaultChildColl<INavigable4MomentumCollection, double>::type >::getIndex ( object_iter objectIter,
external_index_type & theIndex ) const
inherited

◆ getParameter() [1/3]

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

◆ getParameter() [2/3]

double Navigable< INavigable4MomentumCollection, double, typename NavigationDefaults::DefaultChildColl<INavigable4MomentumCollection, double>::type >::getParameter ( const INavigable4MomentumCollection * objectContainer,
const external_index_type & theIndex ) const
inherited

◆ getParameter() [3/3]

double Navigable< INavigable4MomentumCollection, double, typename NavigationDefaults::DefaultChildColl<INavigable4MomentumCollection, double>::type >::getParameter ( object_iter & theIter) const
inherited

◆ getPtrToConstituents() [1/2]

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

Definition at line 296 of file Navigable.h.

297 { return &m_constituents; }

◆ getPtrToConstituents() [2/2]

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

Definition at line 294 of file Navigable.h.

295 { return &m_constituents; }

◆ inav4momentum()

const INavigable4Momentum * JetINav4MomAssociation::inav4momentum ( ) const

get jet directly without token

Definition at line 20 of file JetINav4MomAssociation.cxx.

21{
22 //get jet from Navigable
23 if (this->size() ==0)
24 return nullptr;
25 else 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 const constituent_type * getConstituentPtr(constituent_iter iter) const

◆ insertElement() [1/4]

void Navigable< INavigable4MomentumCollection, double, typename NavigationDefaults::DefaultChildColl<INavigable4MomentumCollection, double>::type >::insertElement ( const ElementLink< INavigable4MomentumCollection > & el,
const double & objectParameter = RPAR(),
size_t sizeHint = 0 )
inherited

◆ insertElement() [2/4]

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

◆ insertElement() [3/4]

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

◆ insertElement() [4/4]

void Navigable< INavigable4MomentumCollection, double, typename NavigationDefaults::DefaultChildColl<INavigable4MomentumCollection, double>::type >::insertElement ( const INavigable4MomentumCollection * objectContainer,
const external_index_type & theIndex,
IProxyDict * sg,
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() [1/2]

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

◆ putElement() [2/2]

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

◆ remove() [1/2]

◆ remove() [2/2]

bool Navigable< INavigable4MomentumCollection, double, typename NavigationDefaults::DefaultChildColl<INavigable4MomentumCollection, double>::type >::remove ( const INavigable4MomentumCollection * objectContainer,
const external_index_type & theIndex )
inherited

◆ removeAll()

Definition at line 237 of file Navigable.h.

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

◆ replace()

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

◆ reweight() [1/3]

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

◆ reweight() [2/3]

void Navigable< INavigable4MomentumCollection, double, typename NavigationDefaults::DefaultChildColl<INavigable4MomentumCollection, double>::type >::reweight ( const INavigable4MomentumCollection * objectContainer,
const external_index_type & theIndex,
const double & objectParameter = RPAR() )
inherited

◆ reweight() [3/3]

void Navigable< INavigable4MomentumCollection, double, typename NavigationDefaults::DefaultChildColl<INavigable4MomentumCollection, double>::type >::reweight ( object_iter & objectIter,
const double & objectParameter = RPAR() )
inherited

◆ set_association() [1/2]

void JetINav4MomAssociation::set_association ( const INavigable4MomentumCollection * theContainer,
const INavigable4Momentum * the_inav4momentum,
double weight = 1 )
inline

Definition at line 56 of file JetINav4MomAssociation.h.

58 {set_inav4momentum(theContainer, the_inav4momentum, weight);}
void set_inav4momentum(const INavigable4MomentumCollection *theContainer, const INavigable4Momentum *the_inav4momentum, double weight=1)

◆ set_association() [2/2]

void JetINav4MomAssociation::set_association ( const INavigable4MomentumCollection * theContainer,
index_type & theIndex,
double weight = 1 )
inline

Definition at line 60 of file JetINav4MomAssociation.h.

62 {set_inav4momentum(theContainer, theIndex, weight);}

◆ set_inav4momentum() [1/2]

void JetINav4MomAssociation::set_inav4momentum ( const INavigable4MomentumCollection * theContainer,
const INavigable4Momentum * the_inav4momentum,
double weight = 1 )

Definition at line 32 of file JetINav4MomAssociation.cxx.

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

◆ set_inav4momentum() [2/2]

void JetINav4MomAssociation::set_inav4momentum ( const INavigable4MomentumCollection * theContainer,
index_type & theIndex,
double weight = 1 )

Definition at line 50 of file JetINav4MomAssociation.cxx.

53{
54 double newWeight = weight;
55 // jet already in collection
56 if ( this->contains(theContainer,theIndex) )
57 {
58 // update weight
59 newWeight *= this->getinav4momentumWeight(theContainer,theIndex);
60 // remove the previous jet
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< INavigable4MomentumCollection, double, typename NavigationDefaults::DefaultChildColl<INavigable4MomentumCollection, double>::type >::size ( ) const
virtualinherited

◆ toKidsAfterAccept() [1/2]

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

◆ toKidsAfterAccept() [2/2]

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

◆ toKidsAfterReject() [1/2]

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

◆ toKidsAfterReject() [2/2]

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

Member Data Documentation

◆ m_constituents

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: