ATLAS Offline Software
ElectronConstituent.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef EGAMMAEVENT_ELECTRONCONSTITUENT_H
6 #define EGAMMAEVENT_ELECTRONCONSTITUENT_H
7 
15 /***************************************************************************
16  ElectronConstituents.h - Description
17  -------------------
18  begin : January, 2005
19  authors : Kyle Cranmer, Andreas Wildauer
20  email : cranmer@cern.ch, andreas.wildauer@cern.ch
21 
22  changes :
23 
24 ***************************************************************************/
25 
26 #include<vector>
27 #include<string>
28 
29 #include "Navigation/Navigable.h"
32 #include "CaloGeoHelpers/CaloSampling.h"
33 
34 namespace Analysis
35 {
36 
37 
40  typedef std::string NameType;
41 
42 
43  class ElectronConstituent : public IConstituent,
44  public Navigable<ElectronContainer, double>
45  {
46 
49 
50 
51  public:
53  ElectronConstituent() = default;
57  ~ElectronConstituent() = default;
58 
60  virtual void setName(NameType& name);
61 
63  virtual NameType name() const;
64 
66  virtual IConstituent* clone() const;
67 
69  const Electron* electron() const;
70 
71  // Set functions
72  void set_electron(const ElectronContainer* theContainer,
73  const Electron* the_electron, double weight=1);
74 
75  void set_electron(const ElectronContainer* theContainer,
76  index_type& theIndex, double weight=1);
77 
78  void set_constituent(const ElectronContainer* theContainer,
79  const Electron* the_electron, double weight=1)
80  {set_electron(theContainer, the_electron, weight);}
81 
82  void set_constituent(const ElectronContainer* theContainer,
83  index_type& theIndex, double weight=1)
84  {set_electron(theContainer, theIndex, weight);}
85 
86  double getElectronWeight(const Electron* the_electron) const ;
87 
88  double getElectronWeight(const ElectronContainer* theContainer,
89  index_type& theIndex) const;
90 
91 
92  private:
93  std::string m_name;
94 
95  } ;
96 
97 }
98 
99 
100 #endif
Analysis::NameType
std::string NameType
string to identify the constituent
Definition: IConstituent.h:39
ElectronContainer.h
Analysis::IConstituent
Class IConstituent: This is the abstract base class for additional jet constituents to be put into th...
Definition: IConstituent.h:52
Analysis::Electron
Definition: Reconstruction/egamma/egammaEvent/egammaEvent/Electron.h:20
Analysis::ElectronConstituent::clone
virtual IConstituent * clone() const
a clone method for the proper workings of the copy constructor
Definition: ElectronConstituent.cxx:40
Analysis::ElectronConstituent::ElectronConstituent
ElectronConstituent()=default
Default constructor.
Analysis::ElectronConstituent::iter_type
Navigable< ElectronContainer, double >::constituent_iter iter_type
Definition: ElectronConstituent.h:57
Analysis::ElectronConstituent::setName
virtual void setName(NameType &name)
method to set the name
Definition: ElectronConstituent.cxx:36
Analysis::ElectronConstituent::getElectronWeight
double getElectronWeight(const Electron *the_electron) const
Definition: ElectronConstituent.cxx:93
dqt_zlumi_pandas.weight
int weight
Definition: dqt_zlumi_pandas.py:189
ElectronConstituent
IConstituent.h
Analysis::ElectronConstituent::index_type
Navigable< ElectronContainer, double >::external_index_type index_type
Definition: ElectronConstituent.h:56
Analysis::ElectronConstituent::name
virtual NameType name() const
returns the infoType of the info objects.
Definition: ElectronConstituent.cxx:38
Analysis::ElectronConstituent::m_name
std::string m_name
Definition: ElectronConstituent.h:102
Analysis
The namespace of all packages in PhysicsAnalysis/JetTagging.
Definition: BTaggingCnvAlg.h:20
Navigable
Navigable template generalization to handle navigation.
Definition: Navigable.h:93
Navigable.h
Electron
Class describing an electron.
ElectronContainer
Definition: Reconstruction/egamma/egammaEvent/egammaEvent/ElectronContainer.h:32
Analysis::ElectronConstituent::set_constituent
void set_constituent(const ElectronContainer *theContainer, const Electron *the_electron, double weight=1)
Definition: ElectronConstituent.h:87
Analysis::ElectronConstituent::set_electron
void set_electron(const ElectronContainer *theContainer, const Electron *the_electron, double weight=1)
Definition: ElectronConstituent.cxx:55
NameType
std::string NameType
Definition: JetINav4MomAssociation.h:29
Analysis::ElectronConstituent::~ElectronConstituent
~ElectronConstituent()=default
destructor
Analysis::ElectronConstituent::electron
const Electron * electron() const
get electron directly without token
Definition: ElectronConstituent.cxx:43
index_type
unsigned int index_type
Definition: FPGATrackSimSGToRawHitsTool.h:37