ATLAS Offline Software
Particle_v1.h
Go to the documentation of this file.
1 // Dear emacs, this is -*- c++ -*-
2 
3 /*
4  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 // $Id: Particle_v1.h 637086 2014-12-19 16:02:19Z kkoeneke $
8 #ifndef XAODPARTICLEEVENT_VERSIONS_PARTICLE_V1_H
9 #define XAODPARTICLEEVENT_VERSIONS_PARTICLE_V1_H
10 
11 
12 // STL includes
13 #include <vector>
14 
15 // xAOD include(s):
16 #include "xAODBase/IParticle.h"
18 #include "AthLinks/ElementLink.h"
19 
20 // ROOT include(s):
21 #include "Math/Vector4D.h"
22 
23 namespace xAOD {
24 
31  class Particle_v1 : public IParticle {
32 
33  public:
35  Particle_v1();
36 
38  //Particle_v1(const Particle_v1& other);
39 
40  //virtual ~Particle_v1();
41 
44 
46  virtual double pt() const;
48  virtual double eta() const;
50  virtual double phi() const;
52  virtual double m() const;
54  virtual double e() const;
56  virtual double rapidity() const;
57 
60 
62  virtual FourMom_t p4() const;
63 
65  typedef ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> > GenVecFourMom_t;
66 
68  GenVecFourMom_t genvecP4() const;
69 
71  virtual Type::ObjectType type() const;
73 
74 
77 
79  double px() const;
81  double py() const;
83  double pz() const;
86  double et() const;
87 
88 
90  void setP4( const FourMom_t& vec );
92  void setPxPyPzE( double px, double py, double pz, double e );
94  void setPx( double px );
96  void setPy( double py );
98  void setPz( double pz );
100  void setE( double e );
102 
103 
106 
108  bool hasCharge() const;
110  float charge() const;
112  void setCharge( float charge );
113 
115  bool hasPdgId() const;
117  int pdgId() const;
119  void setPdgId( int pdgID );
120 
122 
123 
124  public:
125 
127  void toPersistent();
128 
129  }; // class Particle_v1
130 
131 
132 } // namespace xAOD
133 
134 #endif // XAODPARTICLEEVENT_VERSIONS_PARTICLE_V1_H
xAOD::Particle_v1::setCharge
void setCharge(float charge)
Set the electric charge.
xAOD::Particle_v1::genvecP4
GenVecFourMom_t genvecP4() const
The full 4-momentum of the particle : GenVector form.
Definition: Particle_v1.cxx:52
xAOD::Particle_v1::setPz
void setPz(double pz)
Set the z-component of the momentum.
xAOD::Particle_v1::hasCharge
bool hasCharge() const
Check if this particle has its charge set.
Definition: Particle_v1.cxx:120
xAOD::Particle_v1::GenVecFourMom_t
ROOT::Math::LorentzVector< ROOT::Math::PxPyPzE4D< double > > GenVecFourMom_t
Base 4 Momentum type (GenVector)
Definition: Particle_v1.h:65
IParticle.h
xAOD::Particle_v1::phi
virtual double phi() const
The azimuthal angle ( ) of the particle.
Definition: Particle_v1.cxx:34
xAOD::Particle_v1::p4
virtual FourMom_t p4() const
The full 4-momentum of the particle.
Definition: Particle_v1.cxx:48
xAOD::Particle_v1::setPx
void setPx(double px)
Set the x-component of the momentum.
xAOD::Particle_v1::m
virtual double m() const
The invariant mass of the particle.
Definition: Particle_v1.cxx:38
xAOD::Particle_v1::e
virtual double e() const
The total energy of the particle.
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
vec
std::vector< size_t > vec
Definition: CombinationsGeneratorTest.cxx:12
xAOD::Particle_v1::setE
void setE(double e)
Set the energy.
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition: Event/xAOD/xAODBase/xAODBase/IParticle.h:41
xAOD::Particle_v1::charge
float charge() const
Return the electric charge.
xAOD::Particle_v1::et
double et() const
The transverse energy ( ) of the particle.
Definition: Particle_v1.cxx:66
xAOD::Particle_v1::setPdgId
void setPdgId(int pdgID)
Set the PDG identifier.
xAOD::Particle_v1::pdgId
int pdgId() const
Return the PDG identifier.
xAOD::IParticle::FourMom_t
TLorentzVector FourMom_t
Definition of the 4-momentum type.
Definition: Event/xAOD/xAODBase/xAODBase/IParticle.h:69
xAOD::Particle_v1::toPersistent
void toPersistent()
Function preparing the object to be persistified.
xAOD::Particle_v1::setP4
void setP4(const FourMom_t &vec)
Set the 4-vec.
Definition: Particle_v1.cxx:71
IParticleContainer.h
xAOD::Particle_v1::setPxPyPzE
void setPxPyPzE(double px, double py, double pz, double e)
Set the 4-vec.
Definition: Particle_v1.cxx:83
xAOD::Particle_v1::pz
double pz() const
Get the pz momentum component of the particle.
xAOD::Particle_v1::setPy
void setPy(double py)
Set the y-component of the momentum.
xAOD::Particle_v1
Description of a generic particle.
Definition: Particle_v1.h:31
xAOD::Particle_v1::py
double py() const
Get the py momentum component of the particle.
xAOD::Particle_v1::FourMom_t
IParticle::FourMom_t FourMom_t
Definition of the 4-momentum type.
Definition: Particle_v1.h:59
xAOD::Particle_v1::Particle_v1
Particle_v1()
Default constructor.
Definition: Particle_v1.cxx:16
xAOD::Particle_v1::hasPdgId
bool hasPdgId() const
Check if this particle has its charge set.
xAOD::Particle_v1::rapidity
virtual double rapidity() const
The true rapidity (y) of the particle.
Definition: Particle_v1.cxx:44
xAOD::Particle_v1::type
virtual Type::ObjectType type() const
The type of the object as a simple enumeration.
Definition: Particle_v1.cxx:56
xAOD::Particle_v1::eta
virtual double eta() const
The pseudorapidity ( ) of the particle.
Definition: Particle_v1.cxx:30
xAODType::ObjectType
ObjectType
Type of objects that have a representation in the xAOD EDM.
Definition: ObjectType.h:32
xAOD::Particle_v1::pt
virtual double pt() const
The transverse momentum ( ) of the particle.
Definition: Particle_v1.cxx:26
xAOD::Particle_v1::px
double px() const
Get the px momentum component of the particle.