ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
JetTagging
JetTagEvent
JetTagEvent
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
22
#include "
Navigation/Navigable.h
"
23
#include "
Particle/TrackParticleContainer.h
"
24
#include "
ParticleEvent/IConstituent.h
"
25
//class INavigable4MomentumCollection;
26
//class INavigable4Momentum;
27
28
namespace
Analysis
29
{
35
36
class
TrackConstituents
:
public
IConstituent
,
37
public
Navigable
<Rec::TrackParticleContainer, double>
38
{
39
typedef
Navigable<Rec::TrackParticleContainer,double>::external_index_type
index_type
;
40
typedef
Navigable<Rec::TrackParticleContainer,double>::constituent_iter
iter_type
;
41
// typedef object_iter iterator;
42
43
public
:
44
TrackConstituents
() ;
45
TrackConstituents
(
NameType
&
name
) ;
46
~TrackConstituents
() =
default
;
47
48
typedef
Navigable<Rec::TrackParticleContainer,double>::object_iter
iterator
;
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
67
double
getTrackWeight
(
const
Rec::TrackParticleContainer
*,
index_type
& )
const
;
68
70
// Set Methods
72
73
virtual
void
setName
(
NameType
&
name
);
75
78
void
set_track
(
const
Rec::TrackParticleContainer
*,
const
Rec::TrackParticle
*,
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
93
void
set_constituent
(
const
Rec::TrackParticleContainer
*,
const
Rec::TrackParticle
*,
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
index_type
unsigned int index_type
Definition
FPGATrackSimSGToRawHitsTool.h:36
IConstituent.h
Navigable.h
TrackParticleContainer.h
Analysis::IConstituent
Class IConstituent: This is the abstract base class for additional jet constituents to be put into th...
Definition
IConstituent.h:43
Analysis::TrackConstituents::setName
virtual void setName(NameType &name)
to set the name
Definition
TrackConstituents.cxx:30
Analysis::TrackConstituents::name
virtual NameType name() const
returns the infoType of the info objects.
Definition
TrackConstituents.cxx:32
Analysis::TrackConstituents::tracks
std::vector< const Rec::TrackParticle * > * tracks() const
get a vector of trackparticles. user must delete the vector, but not constituents
Definition
TrackConstituents.cxx:119
Analysis::TrackConstituents::~TrackConstituents
~TrackConstituents()=default
Analysis::TrackConstituents::getTrackWeight
double getTrackWeight(const Rec::TrackParticle *) const
Definition
TrackConstituents.cxx:102
Analysis::TrackConstituents::clone
virtual IConstituent * clone() const
a clone method for the proper workings of the copy constructor
Definition
TrackConstituents.cxx:34
Analysis::TrackConstituents::index_type
Navigable< Rec::TrackParticleContainer, double >::external_index_type index_type
Definition
TrackConstituents.h:39
Analysis::TrackConstituents::iterator
Navigable< Rec::TrackParticleContainer, double >::object_iter iterator
Definition
TrackConstituents.h:48
Analysis::TrackConstituents::iter_type
Navigable< Rec::TrackParticleContainer, double >::constituent_iter iter_type
Definition
TrackConstituents.h:40
Analysis::TrackConstituents::TrackConstituents
TrackConstituents()
constructor
Definition
TrackConstituents.cxx:23
Analysis::TrackConstituents::nTracks
unsigned int nTracks() const
Definition
TrackConstituents.h:63
Analysis::TrackConstituents::set_constituent
void set_constituent(const Rec::TrackParticleContainer *, const Rec::TrackParticle *, double weight=0.)
set method for tracks.
Definition
TrackConstituents.cxx:75
Analysis::TrackConstituents::set_track
void set_track(const Rec::TrackParticleContainer *, const Rec::TrackParticle *, double weight=0.)
set method for tracks.
Definition
TrackConstituents.cxx:38
Analysis::TrackConstituents::m_name
std::string m_name
Definition
TrackConstituents.h:100
Navigable< Rec::TrackParticleContainer, double >::size
virtual unsigned int size() const
Navigable< Rec::TrackParticleContainer, double >::Navigable
Navigable()
Navigable::object_iter
NavigableIterator< CONT, RPAR, COLL > object_iter
Definition
Navigable.h:159
Navigable::constituent_iter
constituent_coll::iterator constituent_iter
Definition
Navigable.h:102
Navigable::external_index_type
SG::GenerateIndexingPolicy< CONT >::type::index_type external_index_type
Definition
Navigable.h:156
Rec::TrackParticleContainer
Definition
Reconstruction/Particle/Particle/TrackParticleContainer.h:33
Rec::TrackParticle
Definition
Reconstruction/Particle/Particle/TrackParticle.h:47
Analysis
The namespace of all packages in PhysicsAnalysis/JetTagging.
Definition
IConstituent.h:25
Analysis::NameType
std::string NameType
string to identify the constituent
Definition
IConstituent.h:30
Generated on
for ATLAS Offline Software by
1.17.0