DAS  3.0
Das Analysis System
MultiJets< Jet >

Description

template<class Jet>
struct DAS::TPS::MultiJets< Jet >

Implements TPS jets observables depending on the mixed 6jets event. Definition of these observables:

  • $p_{T,ave} = \frac{1}{N_{jets}} \sum_{i=1}^{N_{jets}} p_{T,i}$
  • $H_{T} = \sum_{i=1}^{N_{jets}} p_{T,i}$
  • $\Delta \eta$ is the absolute value of the pseudorapidity distance between the two leading jets
  • $\Delta \phi$ is the azimuthal distance between the two leading jets
  • $E_{F} = \frac{p_{T,1}}{H_{T}}$ is the energy fraction of the leading jet
  • $S_{p_{T}}$ and $S_{\phi}$ are the expected pT balance and phi balance correlation sensitive observables that can only be observed in events with 6 jets. ref: https://arxiv.org/abs/2111.05370

#include <TPS.h>

+ Collaboration diagram for MultiJets< Jet >:

Public Member Functions

 MultiJets (const std::vector< Jet > &inputJets, int minpt)
 
 operator bool () const
 
double jetswgt () const
 
double Ht () const
 
float SpT () const
 
float Sphi () const
 

Public Attributes

std::vector< Jet > jets
 
Di< const Jet, const Jet > dijet
 

Static Private Member Functions

static const std::vector< std::vector< std::pair< int, int > > > & getJetPairings ()
 

Private Attributes

const std::vector< std::vector< std::pair< int, int > > > & jetCombinations = getJetPairings()
 

Constructor & Destructor Documentation

◆ MultiJets()

MultiJets ( const std::vector< Jet > &  inputJets,
int  minpt 
)
inline
37  :
38  jets(PhaseSpaceSelection(inputJets, minpt))
39  {
40  if (jets.size() > 1){
41  dijet = jets.at(0) + jets.at(1);
42  }
43  }

Member Function Documentation

◆ getJetPairings()

static const std::vector<std::vector<std::pair<int, int> > >& getJetPairings ( )
inlinestaticprivate
119  {
120  static const auto jetPairs = []() {
121  std::vector<int> elements{0, 1, 2, 3, 4, 5};
122  std::vector<std::pair<int, int>> current;
123  std::vector<std::vector<std::pair<int, int>>> results;
124 
125  // Helper function that recursively generates all ways to partition 'elements'
126  // into pairs. Each unique partition is pushed into 'allPairs' as a list of
127  // (a,b) pairs, stored in current recursion via 'current'.
128  auto pairJetsIndices = [](const std::vector<int>& elements,
129  std::vector<std::pair<int, int>>& current,
130  std::vector<std::vector<std::pair<int, int>>>& results,
131  auto&& self) -> void {
132  // If no elements remain, we've formed all pairs for this arrangement
133  if (elements.empty()) {
134  results.push_back(current);
135  return;
136  }
137  // Take the first element
138  int first = elements.front();
139  // Remaining elements
140  std::vector<int> rest(elements.begin() + 1, elements.end());
141 
142  // Try pairing 'first' with each of the others
143  for (size_t i = 0; i < rest.size(); ++i) {
144  int partner = rest[i];
145  // Add this pair to 'current'
146  current.emplace_back(first, partner);
147 
148  // Build the list for the next recursion by removing 'partner'
149  std::vector<int> next;
150  next.reserve(rest.size() - 1);
151  for (size_t j = 0; j < rest.size(); ++j) {
152  if (j != i)
153  next.push_back(rest[j]);
154  }
155 
156  // Recurse with the remaining elements
157  self(next, current, results, self);
158  current.pop_back();
159  }
160  };
161  // Start the recursion
162  pairJetsIndices(elements, current, results, pairJetsIndices);
163  return results;
164  }();
165  return jetPairs;
166  }

◆ Ht()

double Ht ( ) const
inline
58  {
59  return accumulate(jets.begin(), jets.end(), 0.0,
60  [](double sum, const auto& jet) {
61  return sum + jet.CorrPt();
62  });
63  }

◆ jetswgt()

double jetswgt ( ) const
inline
50  {
51  return accumulate(jets.begin(), jets.end(), 1.0,
52  [] (double w, const Jet& j) {
53  return w * j.weights.front();
54  });
55  }

◆ operator bool()

operator bool ( ) const
inlineexplicit
46  {
47  return jets.size() > 1;
48  }

◆ Sphi()

float Sphi ( ) const
inline

expected phi balance correlation sensitive observable $S_{\phi, TPS}^{2} = \frac{1}{3}[|\phi_{i}-\phi_{j}|^{2} +|\phi_{k}-\phi_{l}|^{2} +|\phi_{m}-\phi_{n}|^{2}]$ for all the possible Combinations of jets. This variable has a 15-fold degeneracy, and the final value is taken as the average. This can only be observed in events with 6 jets.

99  {
100  using namespace std;
101  if (jets.size() < 6)
102  BOOST_THROW_EXCEPTION( invalid_argument("insufficient jetMultiplicity for Sphi calculation") );
103 
104  float sumS = 0.0f;
105  for (const auto& triple : jetCombinations) {
106  float S2 = 0.0f;
107  for (auto& pr : triple) {
108  FourVector jet1 = jets[pr.first ].CorrP4();
109  FourVector jet2 = jets[pr.second].CorrP4();
110  S2 += pow(DeltaPhi(jet1, jet2), 2);
111  }
112  sumS += sqrt(S2 / 3.0f);
113  }
114  return sumS / static_cast<float>(jetCombinations.size());
115  }

◆ SpT()

float SpT ( ) const
inline

expected pT balance correlation sensitive observable $S_{p_{T, TPS}}^{2} = \frac{1}{3}[(\frac{|\vec{p}_{T, i}+\vec{p}_{T, j}|}{|\vec{p}_{T, i}|+|\vec{p}_{T, j}|})^{2} +(\frac{|\vec{p}_{T, k}+\vec{p}_{T, l}|}{|\vec{p}_{T, k}|+|\vec{p}_{T, l}|})^{2} +(\frac{|\vec{p}_{T, m}+\vec{p}_{T, n}|}{|\vec{p}_{T, m}|+|\vec{p}_{T, n}|})^{2}]$ for all the possible Combinations of jets. This variable has a 15-fold degeneracy, and the final value is taken as the average. This can only be observed in events with 6 jets.

72  {
73  using namespace std;
74  if (jets.size() < 6)
75  BOOST_THROW_EXCEPTION( invalid_argument("insufficient jetMultiplicity for SpT calculation") );
76 
77  float sumS = 0.0f;
78  for (const auto& triple : jetCombinations) {
79  float S2 = 0.0f;
80  // triple.size() == 3, each triple[i] is a pair<int,int>
81  for (auto& pr : triple) {
82  FourVector jet1 = jets[pr.first ].CorrP4();
83  FourVector jet2 = jets[pr.second].CorrP4();
84  ROOT::Math::XYVector pTsum(jet1.Px() + jet2.Px(), jet1.Py() + jet2.Py());
85  S2 += pow( pTsum.R() / (jets[pr.first].CorrPt() + jets[pr.second].CorrPt()), 2 );
86  }
87  sumS += sqrt(S2 / 3.0f);
88  }
89  return sumS / static_cast<float>(jetCombinations.size());
90  }

Member Data Documentation

◆ dijet

Di<const Jet, const Jet> dijet

◆ jetCombinations

const std::vector<std::vector<std::pair<int, int> > >& jetCombinations = getJetPairings()
private

◆ jets

std::vector<Jet> jets

The documentation for this struct was generated from the following file:
Ntupliser_cfg.f
f
Definition: Ntupliser_cfg.py:309
DAS::JetEnergy::w
static const float w
Definition: common.h:53
DAS::MN::minpt
static const double minpt
Definition: getMNobservables.cc:39
DAS::TPS::MultiJets::dijet
Di< const Jet, const Jet > dijet
Definition: TPS.h:35
DAS::TPS::MultiJets::jetCombinations
const std::vector< std::vector< std::pair< int, int > > > & jetCombinations
Definition: TPS.h:169
DAS::TPS::PhaseSpaceSelection
std::vector< Jet > PhaseSpaceSelection(const std::vector< Jet > &jets, float minpt)
return Jets pass the phase space selection
Definition: common.h:18
DAS::TPS::MultiJets::jets
std::vector< Jet > jets
Definition: TPS.h:34
DAS::FourVector
ROOT::Math::LorentzVector< ROOT::Math::PtEtaPhiM4D< float > > FourVector
Definition: PhysicsObject.h:15