ATLAS Offline Software
Loading...
Searching...
No Matches
TrackConstituents.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3*/
4
5/***************************************************************************
6 TrackConstituent.h - Description
7 -------------------
8 begin : January, 2005
9 authors : Kyle Cranmer, Andreas Wildauer
10 email : cranmer@cern.ch, andreas.wildauer@cern.ch
11
12 changes :
13
14***************************************************************************/
15
16#ifndef ANALYSIS_TRACKCONSTITUENT_H
17#define ANALYSIS_TRACKCONSTITUENT_H
18
19#include<vector>
20#include<string>
21
25//class INavigable4MomentumCollection;
26//class INavigable4Momentum;
27
28namespace Analysis
29{
35
37 public Navigable<Rec::TrackParticleContainer, double>
38 {
41 // typedef object_iter iterator;
42
43 public:
46 ~TrackConstituents() = default;
47
49
50
51 virtual NameType name() const;
53
54 virtual IConstituent* clone() const;
56
57 //iterator begin(); available via Navigable with (*iterator) giving TrackParticle*
58 //iterator end(); available via Navigable
59
61 std::vector<const Rec::TrackParticle*>* tracks() const;
62
63 unsigned int nTracks() const { return size() ; }
64
65 double getTrackWeight(const Rec::TrackParticle* ) const;
66
68
70 // Set Methods
72
73 virtual void setName(NameType& name);
75
79 double weight=0.);
82 void set_track(const Rec::TrackParticleContainer*, index_type&, double weight=0.);
83
84 // LACK OF KNOWLEDGE HACK HERE
85 // use also INavigable4MomentumCollection and INavigable4Momentum to add constituents
86 // would be nice to have a addConstituents method in the IConstituent interface (dont know if that is possible)
89// void set_track(const INavigable4MomentumCollection*,const INavigable4Momentum*,
90// double weight=0.);
91
92 //compromise for above... use concrete container, but common name for templated methods
94 double weight=0.);
95 void set_constituent(const Rec::TrackParticleContainer*, index_type&, double weight=0.);
96
97
98
99 private:
100 std::string m_name;
101
102 }
103 ;
104
105}
106
107
108#endif
unsigned int index_type
Class IConstituent: This is the abstract base class for additional jet constituents to be put into th...
virtual void setName(NameType &name)
to set the name
virtual NameType name() const
returns the infoType of the info objects.
std::vector< const Rec::TrackParticle * > * tracks() const
get a vector of trackparticles. user must delete the vector, but not constituents
double getTrackWeight(const Rec::TrackParticle *) const
virtual IConstituent * clone() const
a clone method for the proper workings of the copy constructor
Navigable< Rec::TrackParticleContainer, double >::external_index_type index_type
Navigable< Rec::TrackParticleContainer, double >::object_iter iterator
Navigable< Rec::TrackParticleContainer, double >::constituent_iter iter_type
unsigned int nTracks() const
void set_constituent(const Rec::TrackParticleContainer *, const Rec::TrackParticle *, double weight=0.)
set method for tracks.
void set_track(const Rec::TrackParticleContainer *, const Rec::TrackParticle *, double weight=0.)
set method for tracks.
NavigableIterator< CONT, RPAR, COLL > object_iter
Definition Navigable.h:159
constituent_coll::iterator constituent_iter
Definition Navigable.h:102
SG::GenerateIndexingPolicy< CONT >::type::index_type external_index_type
Definition Navigable.h:156
The namespace of all packages in PhysicsAnalysis/JetTagging.
std::string NameType
string to identify the constituent