ATLAS Offline Software
Loading...
Searching...
No Matches
Trk::GenParticleJet Class Reference

short class to organise MC generated particles as a jet. More...

#include <GenParticleJet.h>

Collaboration diagram for Trk::GenParticleJet:

Public Member Functions

 GenParticleJet ()
 ~GenParticleJet ()
void setEnergy (double energy)
double getEnergy () const
HepMC::ConstGenParticlePtr getParticle (unsigned int i) const
std::pair< HepMC::ConstGenParticlePtr, int > getIndexedParticle (unsigned int i)
const std::vector< HepMC::ConstGenParticlePtr > & getParticles () const
const std::vector< int > & getIndicesInEvent () const
int getNumParticles () const
void addParticle (HepMC::ConstGenParticlePtr part, int indexInEvent=-1)
HepGeom::Vector3D< double > getMomentum () const
double getThrust () const
double getSphericity () const

Private Attributes

std::vector< HepMC::ConstGenParticlePtrm_particles
std::vector< int > m_indices
double m_energy
HepGeom::Vector3D< double > m_momentum
double m_totalPt2
double m_totalMom2
double m_pDotJetAxis
double m_magP

Detailed Description

short class to organise MC generated particles as a jet.

Needed at the level of tracking validation to be independent of reconstruction inefficiency inside the core of jets.

Author
Loek Hooft van Huysduynen

Definition at line 31 of file GenParticleJet.h.

Constructor & Destructor Documentation

◆ GenParticleJet()

Trk::GenParticleJet::GenParticleJet ( )
inline

Definition at line 35 of file GenParticleJet.h.

35 : m_particles(), m_indices(), m_energy(0.), m_momentum(0.0, 0.0, 0.0), m_totalPt2(0.), m_totalMom2(0.), m_pDotJetAxis(0.), m_magP(0.)
36 {
37
38 }; // constructor
std::vector< HepMC::ConstGenParticlePtr > m_particles
HepGeom::Vector3D< double > m_momentum
std::vector< int > m_indices

◆ ~GenParticleJet()

Trk::GenParticleJet::~GenParticleJet ( )
inline

Definition at line 40 of file GenParticleJet.h.

40{}; // destructor

Member Function Documentation

◆ addParticle()

void Trk::GenParticleJet::addParticle ( HepMC::ConstGenParticlePtr part,
int indexInEvent = -1 )
inline

Definition at line 61 of file GenParticleJet.h.

62 {
63 m_particles.push_back(part);
64 m_indices.push_back(indexInEvent);
65 m_energy = m_energy + part->momentum().e();
66 HepGeom::Vector3D<double> moment(part->momentum().px(), part->momentum().py(), part->momentum().pz());
67 m_momentum = m_momentum + moment;
68
69 m_totalMom2 = m_totalMom2 + pow((moment.mag()), 2);
70 m_magP = m_magP + moment.mag();
71 HepGeom::Vector3D<double> partMom(part->momentum().px(), part->momentum().py(), part->momentum().pz());
72 double longMoment = partMom.dot((m_momentum)/(m_momentum.mag()));
73 m_pDotJetAxis = m_pDotJetAxis + longMoment;
74 m_totalPt2 = m_totalPt2 + pow(partMom.mag(), 2) - pow(longMoment, 2);
75 }
constexpr int pow(int base, int exp) noexcept

◆ getEnergy()

double Trk::GenParticleJet::getEnergy ( ) const
inline

Definition at line 44 of file GenParticleJet.h.

44{return m_energy;}

◆ getIndexedParticle()

std::pair< HepMC::ConstGenParticlePtr, int > Trk::GenParticleJet::getIndexedParticle ( unsigned int i)
inline

Definition at line 50 of file GenParticleJet.h.

51 {
52 return std::make_pair(m_particles.at(i),m_indices.at(i));
53 }

◆ getIndicesInEvent()

const std::vector< int > & Trk::GenParticleJet::getIndicesInEvent ( ) const
inline

Definition at line 57 of file GenParticleJet.h.

57{return m_indices;}

◆ getMomentum()

HepGeom::Vector3D< double > Trk::GenParticleJet::getMomentum ( ) const
inline

Definition at line 77 of file GenParticleJet.h.

77{return m_momentum;}

◆ getNumParticles()

int Trk::GenParticleJet::getNumParticles ( ) const
inline

Definition at line 59 of file GenParticleJet.h.

59{return m_particles.size();}

◆ getParticle()

HepMC::ConstGenParticlePtr Trk::GenParticleJet::getParticle ( unsigned int i) const
inline

Definition at line 46 of file GenParticleJet.h.

47 {
48 return m_particles.at(i);
49 }

◆ getParticles()

const std::vector< HepMC::ConstGenParticlePtr > & Trk::GenParticleJet::getParticles ( ) const
inline

Definition at line 55 of file GenParticleJet.h.

55{return m_particles;}

◆ getSphericity()

double Trk::GenParticleJet::getSphericity ( ) const
inline

Definition at line 80 of file GenParticleJet.h.

80{return m_totalPt2/m_totalMom2;}

◆ getThrust()

double Trk::GenParticleJet::getThrust ( ) const
inline

Definition at line 79 of file GenParticleJet.h.

79{return m_pDotJetAxis/m_magP;}

◆ setEnergy()

void Trk::GenParticleJet::setEnergy ( double energy)
inline

Member Data Documentation

◆ m_energy

double Trk::GenParticleJet::m_energy
private

Definition at line 86 of file GenParticleJet.h.

◆ m_indices

std::vector< int > Trk::GenParticleJet::m_indices
private

Definition at line 85 of file GenParticleJet.h.

◆ m_magP

double Trk::GenParticleJet::m_magP
private

Definition at line 91 of file GenParticleJet.h.

◆ m_momentum

HepGeom::Vector3D<double> Trk::GenParticleJet::m_momentum
private

Definition at line 87 of file GenParticleJet.h.

◆ m_particles

std::vector<HepMC::ConstGenParticlePtr > Trk::GenParticleJet::m_particles
private

Definition at line 84 of file GenParticleJet.h.

◆ m_pDotJetAxis

double Trk::GenParticleJet::m_pDotJetAxis
private

Definition at line 90 of file GenParticleJet.h.

◆ m_totalMom2

double Trk::GenParticleJet::m_totalMom2
private

Definition at line 89 of file GenParticleJet.h.

◆ m_totalPt2

double Trk::GenParticleJet::m_totalPt2
private

Definition at line 88 of file GenParticleJet.h.


The documentation for this class was generated from the following file: