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

#include <Pull.h>

Inheritance diagram for JetSubStructureUtils::Pull:
Collaboration diagram for JetSubStructureUtils::Pull:

Public Member Functions

 Pull (bool useEtaInsteadOfY=false)
 
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
 

Private Attributes

bool m_useEtaInsteadOfY
 

Detailed Description

Definition at line 11 of file Pull.h.

Constructor & Destructor Documentation

◆ Pull()

JetSubStructureUtils::Pull::Pull ( bool  useEtaInsteadOfY = false)
inline

Definition at line 13 of file Pull.h.

13 : m_useEtaInsteadOfY(useEtaInsteadOfY) {};

Member Function Documentation

◆ result() [1/3]

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

Definition at line 12 of file Pull.cxx.

13 {
14  vector<fastjet::PseudoJet> constit_pseudojets = jet.constituents();
15  map<string, double> Variables;
16  Variables["PullMag"] = -999.*1000.;
17  Variables["PullPhi"] = -999.*1000.;
18  Variables["Pull_C00"] = -999.*1000.;
19  Variables["Pull_C01"] = -999.*1000.;
20  Variables["Pull_C10"] = -999.*1000.;
21  Variables["Pull_C11"] = -999.*1000.;
22 
23  if (constit_pseudojets.size() < 2) {
24  return Variables;
25  }
26 
27  double T[6];
28  for (int i=0; i<6; i++){
29  T[i] = 0;
30  }
31 
32  TVector2 r_pull;//pull (times jet pt)
33  double jeta = m_useEtaInsteadOfY ? jet.eta() : jet.rapidity();
34 
35  for(vector<fastjet::PseudoJet>::iterator cit = constit_pseudojets.begin(); cit != constit_pseudojets.end(); ++cit) {
36  const fastjet::PseudoJet &constit = *cit;
37 
38  double dphi = jet.delta_phi_to(constit);
39  double ceta = m_useEtaInsteadOfY ? constit.eta() : constit.rapidity();
40 
41  TVector2 r_i(ceta-jeta, dphi); //position on eta-phi plane relative to weighted centroid
42  T[2] += (ceta*ceta) - (jeta*jeta);
43  T[3] += r_i.X() * r_i.Y();
44  T[4] += r_i.Y() * r_i.X();
45  T[5] += (constit.phi_std() * constit.phi_std()) - (jet.phi_std() * jet.phi_std());
46  r_i *= (constit.pt() * r_i.Mod());
47  r_pull += r_i;
48  }
49 
50  if(jet.pt() != 0) {
51  T[0] = r_pull.Mod()/jet.pt();
52  }
53 
54  T[1] = TVector2::Phi_mpi_pi(r_pull.Phi()); //this means something quite different than statshape package at ANL!!
55 
56  Variables["PullMag"] = T[0];
57  Variables["PullPhi"] = T[1];
58  Variables["Pull_C00"] = T[2];
59  Variables["Pull_C01"] = T[3];
60  Variables["Pull_C10"] = T[4];
61  Variables["Pull_C11"] = T[5];
62 
63  return Variables;
64 }

◆ 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  }

Member Data Documentation

◆ m_useEtaInsteadOfY

bool JetSubStructureUtils::Pull::m_useEtaInsteadOfY
private

Definition at line 19 of file Pull.h.


The documentation for this class was generated from the following files:
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
Phi_mpi_pi
__HOSTDEV__ double Phi_mpi_pi(double)
Definition: GeoRegion.cxx:7
JetSubStructureUtils::Pull::result
virtual std::map< std::string, double > result(const fastjet::PseudoJet &jet) const
Definition: Pull.cxx:12
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:85
Amg::transform
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
Definition: GeoPrimitivesHelpers.h:156
JetSubStructureUtils::Pull::m_useEtaInsteadOfY
bool m_useEtaInsteadOfY
Definition: Pull.h:19
TCS::join
std::string join(const std::vector< std::string > &v, const char c=',')
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/Root/StringUtils.cxx:10
GlobalVariables.Variables
Variables
Definition: GlobalVariables.py:276
python.compressB64.c
def c
Definition: compressB64.py:93
TSU::T
unsigned long long T
Definition: L1TopoDataTypes.h:35