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

#include <TrackAssociation.h>

Inheritance diagram for Analysis::TrackAssociation:
Collaboration diagram for Analysis::TrackAssociation:

Public Types

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

Public Member Functions

 TrackAssociation ()
 constructor
 TrackAssociation (const NameType &name)
 constructor
 ~TrackAssociation ()=default
std::vector< const Rec::TrackParticle * > * tracks () const
 get a vector of trackparticles. user must delete the vector, but not constituents
JetAssociationBaseclone () const
unsigned int nTracks () const
double getTrackWeight (const Rec::TrackParticle *) const
double getTrackWeight (const Rec::TrackParticleContainer *, const index_type &) const
void set_track (const Rec::TrackParticleContainer *, const Rec::TrackParticle *, double weight=0.)
 set method for tracks.
void set_track (const Rec::TrackParticleContainer *, const index_type &, double weight=0.)
 set method for tracks.
void set_association (const Rec::TrackParticleContainer *, const Rec::TrackParticle *, double weight=0.)
void set_association (const Rec::TrackParticleContainer *, const index_type &, double weight=0.)
void setName (const name_t &name)
const name_tname () const
size_t keyIndex () const
virtual void fillToken (INavigationToken &navToken) const
void putElement (const Rec::TrackParticleContainer *objectContainer, const constituent_type *constituentObject, const double &objectParameter=double(), size_t sizeHint=0)
void insertElement (const Rec::TrackParticleContainer *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 Rec::TrackParticleContainer *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 Rec::TrackParticleContainergetContainer (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< Rec::TrackParticleContainer, double >::external_index_type index_type
typedef Navigable< Rec::TrackParticleContainer, double >::constituent_iter iter_type
typedef std::string NameType

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 17 of file TrackAssociation.h.

Member Typedef Documentation

◆ constituent_coll

◆ constituent_const_iter

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

Definition at line 103 of file Navigable.h.

◆ constituent_const_ptr_ref

Definition at line 151 of file Navigable.h.

◆ constituent_iter

Definition at line 102 of file Navigable.h.

◆ constituent_ptr

◆ constituent_ptr_ref

Definition at line 150 of file Navigable.h.

◆ constituent_type

◆ container_type

Object container type.

Definition at line 110 of file Navigable.h.

◆ external_index_type

◆ index_type

◆ iter_type

◆ iterator

◆ name_t

Definition at line 28 of file JetAssociationBase.h.

◆ NameType

typedef std::string Analysis::TrackAssociation::NameType
private

Definition at line 23 of file TrackAssociation.h.

◆ navhelper_t

Collection manager type.

Definition at line 114 of file Navigable.h.

◆ object_iter

◆ parameter_type

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

\ brief Relational parameter type

Definition at line 112 of file Navigable.h.

Constructor & Destructor Documentation

◆ TrackAssociation() [1/2]

Analysis::TrackAssociation::TrackAssociation ( )

constructor

Definition at line 12 of file TrackAssociation.cxx.

13 { }

◆ TrackAssociation() [2/2]

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

constructor

Definition at line 15 of file TrackAssociation.cxx.

16 { this->setName(name); }
void setName(const name_t &name)
const name_t & name() const

◆ ~TrackAssociation()

Analysis::TrackAssociation::~TrackAssociation ( )
default

Member Function Documentation

◆ apply()

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

◆ begin()

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

◆ clone()

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

Implements JetAssociationBase.

Definition at line 18 of file TrackAssociation.cxx.

19 {
20 return new TrackAssociation( *this );
21 }

◆ contains()

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

◆ dumpStore()

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

◆ end()

◆ 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< Rec::TrackParticleContainer, double, typename NavigationDefaults::DefaultChildColl<Rec::TrackParticleContainer, double>::type >::fillToken ( INavigationToken & navToken) const
virtualinherited

Implements INavigable.

◆ getConstituentPar()

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

◆ getConstituentPtr()

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

◆ getConstituents()

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

Definition at line 290 of file Navigable.h.

◆ getContainer()

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

◆ getIndex()

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

◆ getParameter()

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

◆ getPtrToConstituents()

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

Definition at line 294 of file Navigable.h.

295 { return &m_constituents; }

◆ getTrackWeight() [1/2]

double Analysis::TrackAssociation::getTrackWeight ( const Rec::TrackParticle * theTrack) const

Definition at line 69 of file TrackAssociation.cxx.

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

◆ getTrackWeight() [2/2]

double Analysis::TrackAssociation::getTrackWeight ( const Rec::TrackParticleContainer * theContainer,
const index_type & theIndex ) const

Definition at line 77 of file TrackAssociation.cxx.

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

◆ insertElement()

void Navigable< Rec::TrackParticleContainer, double, typename NavigationDefaults::DefaultChildColl<Rec::TrackParticleContainer, double>::type >::insertElement ( const Rec::TrackParticleContainer * 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.

◆ nTracks()

unsigned int Analysis::TrackAssociation::nTracks ( ) const
inline

Definition at line 37 of file TrackAssociation.h.

37{ return size() ; }

◆ putElement()

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

◆ remove()

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

◆ removeAll()

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

Definition at line 237 of file Navigable.h.

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

◆ replace()

bool Navigable< Rec::TrackParticleContainer, double, typename NavigationDefaults::DefaultChildColl<Rec::TrackParticleContainer, double>::type >::replace ( const Rec::TrackParticleContainer * 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< Rec::TrackParticleContainer, double, typename NavigationDefaults::DefaultChildColl<Rec::TrackParticleContainer, double>::type >::reweight ( const constituent_type * constituentObject,
const double & objectParameter = RPAR() )
inherited

◆ set_association() [1/2]

void Analysis::TrackAssociation::set_association ( const Rec::TrackParticleContainer * theContainer,
const index_type & theIndex,
double weight = 0. )

Definition at line 63 of file TrackAssociation.cxx.

65 {
66 this->set_track(theContainer, theIndex, weight);
67 }
void set_track(const Rec::TrackParticleContainer *, const Rec::TrackParticle *, double weight=0.)
set method for tracks.

◆ set_association() [2/2]

void Analysis::TrackAssociation::set_association ( const Rec::TrackParticleContainer * theContainer,
const Rec::TrackParticle * theTrack,
double weight = 0. )

Definition at line 57 of file TrackAssociation.cxx.

59 {
60 this->set_track(theContainer, theTrack, weight);
61 }

◆ set_track() [1/2]

void Analysis::TrackAssociation::set_track ( const Rec::TrackParticleContainer * theContainer,
const index_type & theIndex,
double weight = 0. )

set method for tracks.

By default, navigable weight = 0 which reflects that the tracks do not contribute to the kinematics.

Definition at line 40 of file TrackAssociation.cxx.

42 {
43 double newWeight = weight;
44 // track already in collection
45 if ( this->contains(theContainer,theIndex) )
46 {
47 // update weight
48 newWeight *= this->getTrackWeight(theContainer,theIndex);
49 // remove the previous track
50 this->remove(theContainer,theIndex);
51 }
52
53 // from Navigable base
54 this->putElement(theContainer,theIndex,newWeight);
55 }
double getTrackWeight(const Rec::TrackParticle *) const
bool remove(const constituent_type *aConstituent)
void putElement(const Rec::TrackParticleContainer *objectContainer, const constituent_type *constituentObject, const double &objectParameter=double(), size_t sizeHint=0)

◆ set_track() [2/2]

void Analysis::TrackAssociation::set_track ( const Rec::TrackParticleContainer * theContainer,
const Rec::TrackParticle * theTrack,
double weight = 0. )

set method for tracks.

By default, navigable weight = 0 which reflects that the tracks do not contribute to the kinematics.

Definition at line 23 of file TrackAssociation.cxx.

25 {
26 double newWeight = weight;
27 // track already in collection
28 if ( this->contains(theTrack) )
29 {
30 // update weight
31 newWeight *= this->getTrackWeight(theTrack);
32 // remove the previous track
33 this->remove(theTrack);
34 }
35
36 // from Navigable base
37 this->putElement(theContainer,theTrack,newWeight);
38 }

◆ setName()

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

Definition at line 15 of file JetAssociationBase.cxx.

◆ size()

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

◆ toKidsAfterAccept()

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

◆ toKidsAfterReject()

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

◆ tracks()

std::vector< const Rec::TrackParticle * > * Analysis::TrackAssociation::tracks ( ) const

get a vector of trackparticles. user must delete the vector, but not constituents

Definition at line 86 of file TrackAssociation.cxx.

87 {
88 std::vector<const Rec::TrackParticle*>* tracks =
89 new std::vector<const Rec::TrackParticle*>();
90
91 for(iterator it = begin(); it!= end(); ++it)
92 tracks->push_back(*it);
93
94 return tracks;
95 }
Navigable< Rec::TrackParticleContainer, double >::object_iter iterator
std::vector< const Rec::TrackParticle * > * tracks() const
get a vector of trackparticles. user must delete the vector, but not constituents

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: