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

#include <Charge.h>

Collaboration diagram for JetSubStructureUtils::Charge:

Public Member Functions

 Charge (double k=1.0)
 
virtual double result (const xAOD::Jet &jet) const
 

Private Attributes

double m_k
 

Detailed Description

Definition at line 10 of file Charge.h.

Constructor & Destructor Documentation

◆ Charge()

JetSubStructureUtils::Charge::Charge ( double  k = 1.0)
inline

Definition at line 12 of file Charge.h.

12 : m_k(k) {};

Member Function Documentation

◆ result()

double Charge::result ( const xAOD::Jet jet) const
virtual

Definition at line 11 of file Charge.cxx.

12 {
13  vector<const xAOD::TrackParticle*> tracks;
14  bool retval = jet.getAssociatedObjects("GhostTrack", tracks);
15  if(!retval) {
16  return -999;
17  }
18 
19  double charge = 0;
20  for(unsigned int i=0; i<tracks.size(); i++) {
21  charge += tracks[i]->charge() * pow(tracks[i]->pt(), m_k);
22  }
23  if(jet.pt() == 0) {
24  return -999;
25  }
26  else {
27  charge /= pow(jet.pt(), m_k);
28  }
29 
30  return charge;
31 }

Member Data Documentation

◆ m_k

double JetSubStructureUtils::Charge::m_k
private

Definition at line 15 of file Charge.h.


The documentation for this class was generated from the following files:
conifer::pow
constexpr int pow(int x)
Definition: conifer.h:20
test_pyathena.pt
pt
Definition: test_pyathena.py:11
LArCellBinning_test.retval
def retval
Definition: LArCellBinning_test.py:112
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
lumiFormat.i
int i
Definition: lumiFormat.py:85
JetSubStructureUtils::Charge::m_k
double m_k
Definition: Charge.h:15
charge
double charge(const T &p)
Definition: AtlasPID.h:538
fitman.k
k
Definition: fitman.py:528