ATLAS Offline Software
Public Member Functions | List of all members
JetSubStructureUtils::Angularity Class Reference

#include <Angularity.h>

Inheritance diagram for JetSubStructureUtils::Angularity:
Collaboration diagram for JetSubStructureUtils::Angularity:

Public Member Functions

virtual double result (const fastjet::PseudoJet &jet) const
 
virtual TOut result (const xAOD::Jet &jet) const
 
virtual double result (const xAOD::Jet &jet) const
 

Detailed Description

Definition at line 11 of file Angularity.h.

Member Function Documentation

◆ result() [1/3]

double Angularity::result ( const fastjet::PseudoJet &  jet) const
virtual

Definition at line 11 of file Angularity.cxx.

12 {
13  if(jet.constituents().empty()) return -1;
14  if(jet.m()==0.0) return -1;
15 
16  vector<fastjet::PseudoJet> constit_pseudojets = jet.constituents();
17  TLorentzVector jet_p4(jet.px(), jet.py(), jet.pz(), jet.e());
18 
19  double Angularity2=-1.;
20  const double a2=-2.;
21  double sum_a2=0.;
22 
23  for(unsigned int iConstit=0; iConstit < constit_pseudojets.size(); iConstit++) {
24  TLorentzVector tclus = TLorentzVector(constit_pseudojets[iConstit].px(),constit_pseudojets[iConstit].py(),constit_pseudojets[iConstit].pz(),constit_pseudojets[iConstit].e());
25  double theta_i = jet_p4.Angle(tclus.Vect());
26  double sintheta_i = sin(theta_i);
27  if( sintheta_i == 0 ) continue; // avoid FPE
28  double e_theta_i_a2 = constit_pseudojets[iConstit].E()*pow(sintheta_i,a2)*pow(1-cos(theta_i),1-a2);
29  sum_a2 += e_theta_i_a2;
30  }
31 
32  if ( jet.m() < 1.e-20 ) return -1.0;
33  Angularity2 = sum_a2/jet.m();
34  return Angularity2;
35 }

◆ result() [2/3]

virtual TOut JetSubStructureUtils::SubstructureCalculator< TOut >::result
inline

Definition at line 25 of file SubstructureCalculator.h.

25  {
26  // PS 4/18 master developent
27  // std::vector<fastjet::PseudoJet> constit_pseudojets =
28  // jet::JetConstituentFiller::constituentPseudoJets(jet);
29 
30  std::vector<fastjet::PseudoJet> constit_pseudojets;
31  std::transform(jet.getConstituents().begin(),
32  jet.getConstituents().end(),
33  std::back_inserter(constit_pseudojets),
34  [](const auto& c){
35  const xAOD::IParticle* ip = c->rawConstituent();
36  return
37  // fastjet::PseudoJet((c->rawConstituent())->p4());
38  fastjet::PseudoJet(ip->p4());
39  });
40 
41  fastjet::PseudoJet pjet = fastjet::join(constit_pseudojets);
42 
43  return result(pjet);
44  }

◆ result() [3/3]

virtual double JetSubStructureUtils::SubstructureCalculator< double >::result ( const xAOD::Jet jet) const
inlinevirtualinherited

Definition at line 25 of file SubstructureCalculator.h.

25  {
26  // PS 4/18 master developent
27  // std::vector<fastjet::PseudoJet> constit_pseudojets =
28  // jet::JetConstituentFiller::constituentPseudoJets(jet);
29 
30  std::vector<fastjet::PseudoJet> constit_pseudojets;
31  std::transform(jet.getConstituents().begin(),
32  jet.getConstituents().end(),
33  std::back_inserter(constit_pseudojets),
34  [](const auto& c){
35  const xAOD::IParticle* ip = c->rawConstituent();
36  return
37  // fastjet::PseudoJet((c->rawConstituent())->p4());
38  fastjet::PseudoJet(ip->p4());
39  });
40 
41  fastjet::PseudoJet pjet = fastjet::join(constit_pseudojets);
42 
43  return result(pjet);
44  }

The documentation for this class was generated from the following files:
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
test_pyathena.px
px
Definition: test_pyathena.py:18
drawFromPickle.cos
cos
Definition: drawFromPickle.py:36
JetSubStructureUtils::SubstructureCalculator< double >::result
virtual double result(const xAOD::Jet &jet) const
Definition: SubstructureCalculator.h:25
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
Amg::transform
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
Definition: GeoPrimitivesHelpers.h:156
Amg::pz
@ pz
Definition: GeoPrimitives.h:40
JetSubStructureUtils::Angularity::result
virtual double result(const fastjet::PseudoJet &jet) const
Definition: Angularity.cxx:11
TCS::join
std::string join(const std::vector< std::string > &v, const char c=',')
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/Root/StringUtils.cxx:10
Amg::py
@ py
Definition: GeoPrimitives.h:39
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
pow
constexpr int pow(int base, int exp) noexcept
Definition: ap_fixedTest.cxx:15
python.compressB64.c
def c
Definition: compressB64.py:93