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

#include <FoxWolfram.h>

Inheritance diagram for JetSubStructureUtils::FoxWolfram:
Collaboration diagram for JetSubStructureUtils::FoxWolfram:

Public Member Functions

virtual std::map< std::string, double > result (const fastjet::PseudoJet &jet) const
 
virtual TOut result (const xAOD::Jet &jet) const
 
virtual std::map< std::string, double > result (const xAOD::Jet &jet) const
 

Detailed Description

Definition at line 11 of file Reconstruction/Jet/JetSubStructureUtils/JetSubStructureUtils/FoxWolfram.h.

Member Function Documentation

◆ result() [1/3]

map< string, double > FoxWolfram::result ( const fastjet::PseudoJet &  jet) const
virtual

Definition at line 12 of file Reconstruction/Jet/JetSubStructureUtils/Root/FoxWolfram.cxx.

13 {
14  map<string, double> Variables;
15  Variables["FoxWolfram0"] = -999.*1000.;
16  Variables["FoxWolfram1"] = -999.*1000.;
17  Variables["FoxWolfram2"] = -999.*1000.;
18  Variables["FoxWolfram3"] = -999.*1000.;
19  Variables["FoxWolfram4"] = -999.*1000.;
20 
21  double FoxWolframMoments[5] = {0};
22  double ESum = 0;
23 
24  vector<fastjet::PseudoJet> clusters = boostToCenterOfMass(jet, jet.constituents());
25  if(clusters.size() < 2) return Variables;
26 
27  for(unsigned int i1=0; i1<clusters.size(); i1++) {
28  double p1 = sqrt(clusters.at(i1).px()*clusters.at(i1).px()
29  + clusters.at(i1).py()*clusters.at(i1).py()
30  + clusters.at(i1).pz()*clusters.at(i1).pz());
31 
32  for(unsigned int i2=i1+1; i2<clusters.size(); i2++) {
33  double p2 = sqrt(clusters.at(i2).px()*clusters.at(i2).px()
34  + clusters.at(i2).py()*clusters.at(i2).py()
35  + clusters.at(i2).pz()*clusters.at(i2).pz());
36 
37  TVector3 cj(clusters[i2].px(), clusters[i2].py(), clusters[i2].pz());
38  TLorentzVector quadvec(clusters[i1].px(), clusters[i1].py(), clusters[i1].pz(), clusters[i1].e());
39 
40  double CosTheta12 = TMath::Cos(quadvec.Angle(cj));
41 
42  double P0 = 1.;
43  double P1 = CosTheta12;
44  double P2 = 0.5*(3.*CosTheta12*CosTheta12 - 1.);
45  double P3 = 0.5*(5.*CosTheta12*CosTheta12*CosTheta12 - 3.*CosTheta12);
46  double P4 = 0.125*(35.*CosTheta12*CosTheta12*CosTheta12*CosTheta12 - 30.*CosTheta12*CosTheta12 + 3.);
47 
48  FoxWolframMoments[0] += p1*p2*P0;
49  FoxWolframMoments[1] += p1*p2*P1;
50  FoxWolframMoments[2] += p1*p2*P2;
51  FoxWolframMoments[3] += p1*p2*P3;
52  FoxWolframMoments[4] += p1*p2*P4;
53  }
54 
55  ESum += clusters[i1].e();
56  }
57 
58  vector<double> R;
59 
60  if(ESum > 0) {
61  const double inv_Esum2 = 1. / (ESum*ESum);
62  for(int i=0; i<5; i++) {
63  FoxWolframMoments[i] *= inv_Esum2;
64  R.push_back(FoxWolframMoments[i]);
65  }
66  }
67  else {
68  return Variables;
69  }
70 
71  Variables["FoxWolfram0"] = R.at(0);
72  Variables["FoxWolfram1"] = R.at(1);
73  Variables["FoxWolfram2"] = R.at(2);
74  Variables["FoxWolfram3"] = R.at(3);
75  Variables["FoxWolfram4"] = R.at(4);
76 
77  return Variables;
78 }

◆ 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 std::map< std::string, double > JetSubStructureUtils::SubstructureCalculator< std::map< std::string, 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:
test_pyathena.px
px
Definition: test_pyathena.py:18
IDTPM::R
float R(const U &p)
Definition: TrackParametersHelper.h:101
JetSubStructureUtils::boostToCenterOfMass
std::vector< fastjet::PseudoJet > boostToCenterOfMass(const fastjet::PseudoJet &jet, std::vector< fastjet::PseudoJet > constituents)
Definition: BoostToCenterOfMass.cxx:9
JetSubStructureUtils::SubstructureCalculator< std::map< std::string, double > >::result
virtual std::map< std::string, double > result(const xAOD::Jet &jet) const
Definition: SubstructureCalculator.h:25
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
lumiFormat.i
int i
Definition: lumiFormat.py:92
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
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
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26
GlobalVariables.Variables
Variables
Definition: GlobalVariables.py:276
RunTileMonitoring.clusters
clusters
Definition: RunTileMonitoring.py:133
JetSubStructureUtils::FoxWolfram::result
virtual std::map< std::string, double > result(const fastjet::PseudoJet &jet) const
Definition: Reconstruction/Jet/JetSubStructureUtils/Root/FoxWolfram.cxx:12
python.compressB64.c
def c
Definition: compressB64.py:93