ATLAS Offline Software
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Trk::TrackJet Class Reference

short class to organise reconstructed Trk::Track objects as a jet. More...

#include <TrackJet.h>

Collaboration diagram for Trk::TrackJet:

Public Member Functions

 TrackJet ()
 default constructor More...
 
 TrackJet (const TrackJet &a)
 copy constructor More...
 
 ~TrackJet ()
 destructor More...
 
void setEnergy (double energy)
 
double getEnergy ()
 
Trk::TrackgetTrack (unsigned int i)
 
std::vector< Trk::Track * > getTracks ()
 
int getNumTracks ()
 
void addTrack (Trk::Track *trk)
 the main method used during build-up clustering: adds track and re-calculated the jet quantities More...
 
HepGeom::Vector3D< double > getMomentum ()
 
double getThrust ()
 
double getSphericity ()
 

Private Member Functions

double thisEnergy (const Trk::Track *i)
 

Private Attributes

std::vector< Trk::Track * > m_tracks
 
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 reconstructed Trk::Track objects as a jet.

Needed at the level of tracking validation and not to be confused with the calorimeter-seeded jet in combined reconstruction.

Author
Loek Hooft van Huysduynen

Definition at line 31 of file TrackJet.h.

Constructor & Destructor Documentation

◆ TrackJet() [1/2]

Trk::TrackJet::TrackJet ( )
inline

default constructor

Definition at line 36 of file TrackJet.h.

36  : m_tracks(), m_energy(0.), m_momentum(0.0, 0.0, 0.0), m_totalPt2(0.), m_totalMom2(0.), m_pDotJetAxis(0.), m_magP(0.)
37  {
38 
39  };

◆ TrackJet() [2/2]

Trk::TrackJet::TrackJet ( const TrackJet a)
inline

copy constructor

Definition at line 41 of file TrackJet.h.

41  {
42  m_tracks = a.m_tracks;
43  m_energy = a.m_energy;
44  m_momentum = a.m_momentum;
45  m_totalPt2 = a.m_totalPt2;
46  m_totalMom2 = a.m_totalMom2;
47  m_pDotJetAxis = a.m_pDotJetAxis;
48  m_magP = a.m_magP;
49  };

◆ ~TrackJet()

Trk::TrackJet::~TrackJet ( )
inline

destructor

Definition at line 51 of file TrackJet.h.

51 {}; // destructor

Member Function Documentation

◆ addTrack()

void Trk::TrackJet::addTrack ( Trk::Track trk)
inline

the main method used during build-up clustering: adds track and re-calculated the jet quantities

Definition at line 68 of file TrackJet.h.

68  {
69  m_tracks.push_back(trk);
70  m_energy = m_energy + thisEnergy(trk);
71  HepGeom::Vector3D<double> moment = trk->perigeeParameters()->momentum();
72  m_momentum = m_momentum + moment;
73 
74  double longMoment = fabs((trk->perigeeParameters()->momentum()).dot((m_momentum)/(m_momentum.mag())));
75  m_totalPt2 = m_totalPt2 + pow(trk->perigeeParameters()->momentum().mag(), 2) - pow((longMoment), 2);
76  m_pDotJetAxis = m_pDotJetAxis + longMoment;
77  m_magP = m_magP + trk->perigeeParameters()->momentum().mag();
78  m_totalMom2 = m_totalMom2 + pow((trk->perigeeParameters()->momentum().mag()), 2);
79  }

◆ getEnergy()

double Trk::TrackJet::getEnergy ( )
inline

Definition at line 55 of file TrackJet.h.

55 {return m_energy;}

◆ getMomentum()

HepGeom::Vector3D<double> Trk::TrackJet::getMomentum ( )
inline

Definition at line 81 of file TrackJet.h.

81 {return m_momentum;}

◆ getNumTracks()

int Trk::TrackJet::getNumTracks ( )
inline

Definition at line 64 of file TrackJet.h.

64 {return m_tracks.size();}

◆ getSphericity()

double Trk::TrackJet::getSphericity ( )
inline

Definition at line 84 of file TrackJet.h.

84 {return m_totalPt2/m_totalMom2;}

◆ getThrust()

double Trk::TrackJet::getThrust ( )
inline

Definition at line 83 of file TrackJet.h.

83 {return m_pDotJetAxis/m_magP;}

◆ getTrack()

Trk::Track* Trk::TrackJet::getTrack ( unsigned int  i)
inline

Definition at line 57 of file TrackJet.h.

58  {
59  return m_tracks.at(i);
60  }

◆ getTracks()

std::vector<Trk::Track* > Trk::TrackJet::getTracks ( )
inline

Definition at line 62 of file TrackJet.h.

62 {return m_tracks;}

◆ setEnergy()

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

Definition at line 53 of file TrackJet.h.

53 {m_energy = energy;}

◆ thisEnergy()

double Trk::TrackJet::thisEnergy ( const Trk::Track i)
inlineprivate

Definition at line 96 of file TrackJet.h.

97  {
98  HepGeom::Vector3D<double> moment = i->perigeeParameters()->momentum();
99  return sqrt(moment.dot(moment) +139.5*139.5 );
100  }

Member Data Documentation

◆ m_energy

double Trk::TrackJet::m_energy
private

Definition at line 89 of file TrackJet.h.

◆ m_magP

double Trk::TrackJet::m_magP
private

Definition at line 94 of file TrackJet.h.

◆ m_momentum

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

Definition at line 90 of file TrackJet.h.

◆ m_pDotJetAxis

double Trk::TrackJet::m_pDotJetAxis
private

Definition at line 93 of file TrackJet.h.

◆ m_totalMom2

double Trk::TrackJet::m_totalMom2
private

Definition at line 92 of file TrackJet.h.

◆ m_totalPt2

double Trk::TrackJet::m_totalPt2
private

Definition at line 91 of file TrackJet.h.

◆ m_tracks

std::vector<Trk::Track* > Trk::TrackJet::m_tracks
private

Definition at line 88 of file TrackJet.h.


The documentation for this class was generated from the following file:
Trk::TrackJet::m_totalPt2
double m_totalPt2
Definition: TrackJet.h:91
Trk::TrackJet::m_magP
double m_magP
Definition: TrackJet.h:94
Trk::TrackJet::thisEnergy
double thisEnergy(const Trk::Track *i)
Definition: TrackJet.h:96
Trk::TrackJet::m_totalMom2
double m_totalMom2
Definition: TrackJet.h:92
ParticleGun_FastCalo_ChargeFlip_Config.energy
energy
Definition: ParticleGun_FastCalo_ChargeFlip_Config.py:78
Trk::TrackJet::m_pDotJetAxis
double m_pDotJetAxis
Definition: TrackJet.h:93
lumiFormat.i
int i
Definition: lumiFormat.py:85
Trk::TrackJet::m_tracks
std::vector< Trk::Track * > m_tracks
Definition: TrackJet.h:88
Trk::Track::perigeeParameters
const Perigee * perigeeParameters() const
return Perigee.
Definition: Tracking/TrkEvent/TrkTrack/src/Track.cxx:163
a
TList * a
Definition: liststreamerinfos.cxx:10
Trk::TrackJet::m_energy
double m_energy
Definition: TrackJet.h:89
Trk::TrackJet::m_momentum
HepGeom::Vector3D< double > m_momentum
Definition: TrackJet.h:90
pow
constexpr int pow(int base, int exp) noexcept
Definition: ap_fixedTest.cxx:15