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

#include <ZCut.h>

Inheritance diagram for JetSubStructureUtils::ZCut:
Collaboration diagram for JetSubStructureUtils::ZCut:

Public Member Functions

 ZCut (unsigned int nSubJets)
 
virtual double result (const fastjet::PseudoJet &jet) const
 
virtual TOut result (const xAOD::Jet &jet) const
 
virtual double result (const xAOD::Jet &jet) const
 

Private Attributes

unsigned int m_nSubJets
 

Detailed Description

Definition at line 11 of file ZCut.h.

Constructor & Destructor Documentation

◆ ZCut()

JetSubStructureUtils::ZCut::ZCut ( unsigned int  nSubJets)
inline

Definition at line 13 of file ZCut.h.

13 : m_nSubJets(nSubJets) {};

Member Function Documentation

◆ result() [1/3]

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

Definition at line 13 of file ZCut.cxx.

14 {
15  vector<fastjet::PseudoJet> constit_pseudojets = jet.constituents();
16  if(constit_pseudojets.empty()) return -1;
17 
18  fastjet::JetDefinition jet_def = fastjet::JetDefinition(fastjet::kt_algorithm, 1.5,
19  fastjet::E_scheme, fastjet::Best);
20  fastjet::ClusterSequence kt_clust_seq(constit_pseudojets, jet_def);
21 
22  if(constit_pseudojets.size() < m_nSubJets) {
23  //We were asked to calculate zCut, but there are not enough constituents
24  return 0.0;
25  }
26  vector<fastjet::PseudoJet> subjets = kt_clust_seq.exclusive_jets((int)m_nSubJets);
27 
28  // Find last split jet (cluster_hist_index should be highest for the last created jet)
29  fastjet::PseudoJet *lastSplitSubjet = nullptr;
30  int max_cluster_hist_index = -1;
31  for(size_t iSubjet=0; iSubjet < subjets.size(); iSubjet++) {
32  fastjet::PseudoJet parent1, parent2;
33  if(kt_clust_seq.has_parents(subjets[iSubjet], parent1, parent2) &&
34  subjets[iSubjet].cluster_hist_index() > max_cluster_hist_index) {
35  max_cluster_hist_index = subjets[iSubjet].cluster_hist_index();
36  lastSplitSubjet = &subjets[iSubjet];
37  }
38  }
39 
40  if(lastSplitSubjet == nullptr) {
41  //None of the subjets were split
42  return 0.0;
43  }
44 
46  double dmin = pow(split.result(jet), 2.0);
47 
48  double zcut = -1;
49  if(dmin == 0)
50  zcut = 0;
51  else
52  zcut = dmin / (dmin + lastSplitSubjet->m2());
53 
54  return zcut;
55 }

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

Member Data Documentation

◆ m_nSubJets

unsigned int JetSubStructureUtils::ZCut::m_nSubJets
private

Definition at line 19 of file ZCut.h.


The documentation for this class was generated from the following files:
JetSubStructureUtils::KtSplittingScale
Definition: KtSplittingScale.h:11
xAOD::JetAlgorithmType::kt_algorithm
@ kt_algorithm
Definition: JetContainerInfo.h:31
JetSubStructureUtils::ZCut::result
virtual double result(const fastjet::PseudoJet &jet) const
Definition: ZCut.cxx:13
conifer::pow
constexpr int pow(int x)
Definition: conifer.h:20
JetSubStructureUtils::SubstructureCalculator< double >::result
virtual double result(const xAOD::Jet &jet) const
Definition: SubstructureCalculator.h:25
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
jet::ClusterSequence
fastjet::ClusterSequence ClusterSequence
Definition: ClusterSequence.h:21
Amg::transform
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
Definition: GeoPrimitivesHelpers.h:156
TCS::join
std::string join(const std::vector< std::string > &v, const char c=',')
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/Root/StringUtils.cxx:10
JetSubStructureUtils::ZCut::m_nSubJets
unsigned int m_nSubJets
Definition: ZCut.h:19
python.compressB64.c
def c
Definition: compressB64.py:93
Trk::split
@ split
Definition: LayerMaterialProperties.h:38