ATLAS Offline Software
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"
25 //class INavigable4MomentumCollection;
26 //class INavigable4Momentum;
27 
28 namespace Analysis
29 {
36  class TrackConstituents : public IConstituent,
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.);
96 
97 
98 
99  private:
100  std::string m_name;
101 
102  }
103  ;
104 
105 }
106 
107 
108 #endif
Analysis::NameType
std::string NameType
string to identify the constituent
Definition: IConstituent.h:39
Analysis::TrackConstituents::set_track
void set_track(const Rec::TrackParticleContainer *, const Rec::TrackParticle *, double weight=0.)
set method for tracks.
Definition: TrackConstituents.cxx:47
Analysis::IConstituent
Class IConstituent: This is the abstract base class for additional jet constituents to be put into th...
Definition: IConstituent.h:52
Analysis::TrackConstituents::index_type
Navigable< Rec::TrackParticleContainer, double >::external_index_type index_type
Definition: TrackConstituents.h:57
Analysis::TrackConstituents::setName
virtual void setName(NameType &name)
to set the name
Definition: TrackConstituents.cxx:39
Analysis::TrackConstituents::~TrackConstituents
~TrackConstituents()=default
dqt_zlumi_pandas.weight
int weight
Definition: dqt_zlumi_pandas.py:200
Analysis::TrackConstituents::iter_type
Navigable< Rec::TrackParticleContainer, double >::constituent_iter iter_type
Definition: TrackConstituents.h:58
IConstituent.h
Analysis::TrackConstituents::TrackConstituents
TrackConstituents()
constructor
Definition: TrackConstituents.cxx:32
Analysis::TrackConstituents::iterator
Navigable< Rec::TrackParticleContainer, double >::object_iter iterator
Definition: TrackConstituents.h:66
Analysis
The namespace of all packages in PhysicsAnalysis/JetTagging.
Definition: BTaggingCnvAlg.h:20
Analysis::TrackConstituents::set_constituent
void set_constituent(const Rec::TrackParticleContainer *, const Rec::TrackParticle *, double weight=0.)
set method for tracks.
Definition: TrackConstituents.cxx:84
Rec::TrackParticleContainer
Definition: Reconstruction/Particle/Particle/TrackParticleContainer.h:33
Analysis::TrackConstituents::m_name
std::string m_name
Definition: TrackConstituents.h:118
Rec::TrackParticle
Definition: Reconstruction/Particle/Particle/TrackParticle.h:47
Navigable
Navigable template generalization to handle navigation.
Definition: Navigable.h:93
Navigable.h
Analysis::TrackConstituents::clone
virtual IConstituent * clone() const
a clone method for the proper workings of the copy constructor
Definition: TrackConstituents.cxx:43
Navigable< Rec::TrackParticleContainer, double >::size
virtual unsigned int size() const
Analysis::TrackConstituents::name
virtual NameType name() const
returns the infoType of the info objects.
Definition: TrackConstituents.cxx:41
Analysis::TrackConstituents::nTracks
unsigned int nTracks() const
Definition: TrackConstituents.h:81
Analysis::TrackConstituents::getTrackWeight
double getTrackWeight(const Rec::TrackParticle *) const
Definition: TrackConstituents.cxx:111
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:128
TrackParticleContainer.h