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
 
float Ht () const
 

Public Attributes

std::vector< Jet > jets
 
Di< const Jet, const Jet > leading_dijet
 
std::array< std::array< float, 6 >, 6 > pt_pair_asymm_vec
 
std::array< std::array< float, 6 >, 6 > pt_pair_asymm_abs
 
std::array< std::array< float, 6 >, 6 > Delta_eta_pair
 
std::array< std::array< float, 6 >, 6 > Delta_phi_pair
 
std::array< std::array< float, 6 >, 6 > m_inv
 
float S_pt = 0
 
float S_pt_min = 0
 
std::array< float, 15 > S_pt_perm {}
 
std::array< float, 3 > S_pt_4 {}
 
std::array< float, 3 > S_pt_4_min {}
 
std::array< std::array< float, 3 >, 3 > S_pt_4_perm
 
float S_phi = 0
 
float S_phi_min = 0
 
std::array< float, 15 > S_phi_perm {}
 
std::array< float, 3 > S_phi_4 {}
 
std::array< float, 3 > S_phi_4_min {}
 
std::array< std::array< float, 3 >, 3 > S_phi_4_perm
 

Private Member Functions

void FillFeatures ()
 
void LoopOverPairs ()
 
void LoopOverTriplets ()
 
void LoopOverQuartets ()
 
std::array< std::pair< std::pair< int, int >, std::pair< int, int > >, 3 > GetJetQuadPartitions (const std::array< int, 4 > &index)
 

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
81  :
82  jets(PhaseSpaceSelection(inputJets, minpt))
83  {
84  if (jets.size() > 1){
85  leading_dijet = make_di(jets.at(0), jets.at(1));
86  }
87  if (jets.size() >= 6) FillFeatures();
88  }

Member Function Documentation

◆ FillFeatures()

void FillFeatures ( )
inlineprivate

Fill 6jet's member variables by calling the appropriate loop methods.

113  {
114  LoopOverPairs();
117  }

◆ getJetPairings()

static const std::vector<std::vector<std::pair<int, int> > >& getJetPairings ( )
inlinestaticprivate
190  {
191  static const auto jetPairs = []() {
192  std::vector<int> elements{0, 1, 2, 3, 4, 5};
193  std::vector<std::pair<int, int>> current;
194  std::vector<std::vector<std::pair<int, int>>> results;
195 
196  // Helper function that recursively generates all ways to partition 'elements'
197  // into pairs. Each unique partition is pushed into 'allPairs' as a list of
198  // (a,b) pairs, stored in current recursion via 'current'.
199  auto pairJetsIndices = [](const std::vector<int>& elements,
200  std::vector<std::pair<int, int>>& current,
201  std::vector<std::vector<std::pair<int, int>>>& results,
202  auto&& self) -> void {
203  // If no elements remain, we've formed all pairs for this arrangement
204  if (elements.empty()) {
205  results.push_back(current);
206  return;
207  }
208  // Take the first element
209  int first = elements.front();
210  // Remaining elements
211  std::vector<int> rest(elements.begin() + 1, elements.end());
212 
213  // Try pairing 'first' with each of the others
214  for (size_t i = 0; i < rest.size(); ++i) {
215  int partner = rest[i];
216  // Add this pair to 'current'
217  current.emplace_back(first, partner);
218 
219  // Build the list for the next recursion by removing 'partner'
220  std::vector<int> next;
221  next.reserve(rest.size() - 1);
222  for (size_t j = 0; j < rest.size(); ++j) {
223  if (j != i)
224  next.push_back(rest[j]);
225  }
226 
227  // Recurse with the remaining elements
228  self(next, current, results, self);
229  current.pop_back();
230  }
231  };
232  // Start the recursion
233  pairJetsIndices(elements, current, results, pairJetsIndices);
234  return results;
235  }();
236  return jetPairs;
237  }

◆ GetJetQuadPartitions()

std::array<std::pair<std::pair<int, int>, std::pair<int, int> >, 3> GetJetQuadPartitions ( const std::array< int, 4 > &  index)
inlineprivate
180  {
181  return {{
182  {{index[0], index[1]}, {index[2], index[3]}},
183  {{index[0], index[2]}, {index[1], index[3]}},
184  {{index[0], index[3]}, {index[1], index[2]}}
185  }};
186  }

◆ Ht()

float Ht ( ) const
inline
103  {
104  return accumulate(jets.begin(), jets.end(), 0.0,
105  [](float sum, const auto& jet) {
106  return sum + jet.CorrPt();
107  });
108  }

◆ jetswgt()

double jetswgt ( ) const
inline
95  {
96  return accumulate(jets.begin(), jets.end(), 1.0,
97  [] (float w, const Jet& j) {
98  return w * j.weights.front();
99  });
100  }

◆ LoopOverPairs()

void LoopOverPairs ( )
inlineprivate

Loops over all pairs of jets and computes the pairwise features.

120  {
121  for (size_t i = 0; i < 6; ++i) {
122  for (size_t j = 0; j < 6; ++j) {
123  pt_pair_asymm_abs[i][j] = abs(jets[i].CorrPt() - jets[j].CorrPt()) / (jets[i].CorrPt() + jets[j].CorrPt());
124  auto dijet = make_di(jets[i], jets[j]);
125  pt_pair_asymm_vec[i][j] = dijet.CorrPt() / (jets[i].CorrPt() + jets[j].CorrPt());
126  Delta_eta_pair[i][j] = dijet.DeltaEta();
127  Delta_phi_pair[i][j] = dijet.DeltaPhi();
128  m_inv[i][j] = dijet.CorrP4().M();
129  }
130  }
131  }

◆ LoopOverQuartets()

void LoopOverQuartets ( )
inlineprivate

Loops over all quartets of jets and computes the quartet-based balance observables.

153  {
154  std::array<std::array<int,4>, 3> group4 = {{
155  {{0, 1, 2, 3}},
156  {{0, 1, 4, 5}},
157  {{2, 3, 4, 5}}
158  }};
159  for (size_t j = 0; j < group4.size(); ++j) {
160  auto partitions = GetJetQuadPartitions(group4[j]);
161  for (size_t i = 0; i < partitions.size(); ++i) {
162  auto [p1, p2] = partitions[i];
163  auto dijet1 = make_di(jets[p1.first], jets[p1.second]);
164  auto dijet2 = make_di(jets[p2.first], jets[p2.second]);
165  float a = dijet1.CorrPt() / (jets[p1.first].CorrPt() + jets[p1.second].CorrPt());
166  float b = dijet2.CorrPt() / (jets[p2.first].CorrPt() + jets[p2.second].CorrPt());
167  S_pt_4_perm[j][i] = std::sqrt(0.5 * (pow(a, 2) + pow(b, 2)));
168  S_phi_4_perm[j][i] = std::sqrt(0.5 * (pow(dijet1.DeltaPhi(), 2) + pow(dijet2.DeltaPhi(), 2)));
169  }
170  S_pt_4[j] = std::accumulate(S_pt_4_perm[j].begin(), S_pt_4_perm[j].end(), 0.0) / static_cast<float>(S_pt_4_perm[j].size());
171  S_phi_4[j] = std::accumulate(S_phi_4_perm[j].begin(), S_phi_4_perm[j].end(), 0.0) / static_cast<float>(S_phi_4_perm[j].size());
172  S_pt_4_min[j] = *std::min_element(S_pt_4_perm[j].begin(), S_pt_4_perm[j].end());
173  S_phi_4_min[j] = *std::min_element(S_phi_4_perm[j].begin(), S_phi_4_perm[j].end());
174  }
175 
176  }

◆ LoopOverTriplets()

void LoopOverTriplets ( )
inlineprivate

Loops over all triplets of jets and computes the triplet-based balance observables.

134  {
135  int i = 0;
136  for (const auto& triple : jetCombinations) {
137  for (auto& pr : triple) {
138  auto dijet = make_di(jets[pr.first], jets[pr.second]);
139  S_phi_perm[i] += pow(dijet.DeltaPhi(), 2);
140  S_pt_perm[i] += pow(dijet.CorrPt() / (jets[pr.first].CorrPt() + jets[pr.second].CorrPt()), 2);
141  }
142  S_phi_perm[i] = sqrt(S_phi_perm[i] / 3.0);
143  S_pt_perm[i] = sqrt(S_pt_perm[i] / 3.0);
144  i++;
145  }
146  S_phi = std::accumulate(S_phi_perm.begin(), S_phi_perm.end(), 0.0) / static_cast<float>(S_phi_perm.size());
147  S_pt = std::accumulate(S_pt_perm.begin(), S_pt_perm.end(), 0.0) / static_cast<float>(S_pt_perm.size());
148  S_phi_min = *std::min_element(S_phi_perm.begin(), S_phi_perm.end());
149  S_pt_min = *std::min_element( S_pt_perm.begin(), S_pt_perm.end());
150  }

◆ operator bool()

operator bool ( ) const
inlineexplicit
91  {
92  return jets.size() > 1;
93  }

Member Data Documentation

◆ Delta_eta_pair

std::array<std::array<float, 6>, 6> Delta_eta_pair

$\Delta \eta_{pair} = \eta_{i}-\eta_{j}$

◆ Delta_phi_pair

std::array<std::array<float, 6>, 6> Delta_phi_pair

$\Delta \phi_{pair} = \phi_{i}-\phi_{j}$

◆ jetCombinations

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

◆ jets

std::vector<Jet> jets

◆ leading_dijet

Di<const Jet, const Jet> leading_dijet

◆ m_inv

std::array<std::array<float, 6>, 6> m_inv

$m_{inv} = M_{i} + M_{j}$

◆ pt_pair_asymm_abs

std::array<std::array<float, 6>, 6> pt_pair_asymm_abs

$p_{T,asymm,abs} = \frac{|\vec{p}_{T, i}|-|\vec{p}_{T, j}|}{|\vec{p}_{T, i}|+|\vec{p}_{T, j}|}$

◆ pt_pair_asymm_vec

std::array<std::array<float, 6>, 6> pt_pair_asymm_vec

$p_{T,asymm,vec} = \frac{|\vec{p}_{T, i}+\vec{p}_{T, j}|}{|\vec{p}_{T, i}|+|\vec{p}_{T, j}|}$

◆ S_phi

float S_phi = 0

expected phi balance correlation sensitive observable $S_{\phi}^{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.

◆ S_phi_4

std::array<float, 3> S_phi_4 {}

4-jet phi balance observables for three different jet quartets: {0,1,2,3}, {0,1,4,5}, {2,3,4,5} Each element is the average over 3 possible dijet pairings within the quartet $S_{\phi,4}^{2} = \frac{1}{2}[|\phi_{i}-\phi_{j}|^{2}

  • |\phi_{k}-\phi_{l}|^{2}]$

◆ S_phi_4_min

std::array<float, 3> S_phi_4_min {}

◆ S_phi_4_perm

std::array<std::array<float, 3>, 3> S_phi_4_perm

Detailed phi balance values for all possible pairings within each 4-jet quartet.

◆ S_phi_min

float S_phi_min = 0

◆ S_phi_perm

std::array<float, 15> S_phi_perm {}

◆ S_pt

float S_pt = 0

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.

◆ S_pt_4

std::array<float, 3> S_pt_4 {}

4-jet pT balance observables for three different jet quartets: {0,1,2,3}, {0,1,4,5}, {2,3,4,5} Each element is the average over 3 possible dijet pairings within the quartet $S_{p_{T,4}}^{2} = \frac{1}{2}[(\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}]$

◆ S_pt_4_min

std::array<float, 3> S_pt_4_min {}

◆ S_pt_4_perm

std::array<std::array<float, 3>, 3> S_pt_4_perm

Detailed pT balance values for all possible pairings within each 4-jet quartet.

◆ S_pt_min

float S_pt_min = 0

◆ S_pt_perm

std::array<float, 15> S_pt_perm {}

The documentation for this struct was generated from the following file:
DAS::TPS::MultiJets::S_phi_4
std::array< float, 3 > S_phi_4
Definition: TPS.h:77
DAS::TPS::MultiJets::S_pt
float S_pt
Definition: TPS.h:56
DAS::TPS::MultiJets::m_inv
std::array< std::array< float, 6 >, 6 > m_inv
$m_{inv} = M_{i} + M_{j}$
Definition: TPS.h:49
DAS::TPS::MultiJets::Delta_eta_pair
std::array< std::array< float, 6 >, 6 > Delta_eta_pair
$\Delta \eta_{pair} = \eta_{i}-\eta_{j}$
Definition: TPS.h:45
DAS::TPS::MultiJets::S_pt_4_min
std::array< float, 3 > S_pt_4_min
Definition: TPS.h:62
DAS::TPS::MultiJets::S_phi_4_perm
std::array< std::array< float, 3 >, 3 > S_phi_4_perm
Detailed phi balance values for all possible pairings within each 4-jet quartet.
Definition: TPS.h:79
DAS::TPS::MultiJets::pt_pair_asymm_abs
std::array< std::array< float, 6 >, 6 > pt_pair_asymm_abs
$p_{T,asymm,abs} = \frac{|\vec{p}_{T, i}|-|\vec{p}_{T, j}|}{|\vec{p}_{T, i}|+|\vec{p}_{T,...
Definition: TPS.h:43
DAS::TPS::MultiJets::S_phi_4_min
std::array< float, 3 > S_phi_4_min
Definition: TPS.h:77
DAS::TPS::MultiJets::pt_pair_asymm_vec
std::array< std::array< float, 6 >, 6 > pt_pair_asymm_vec
$p_{T,asymm,vec} = \frac{|\vec{p}_{T, i}+\vec{p}_{T, j}|}{|\vec{p}_{T, i}|+|\vec{p}_{T,...
Definition: TPS.h:41
DAS::TPS::MultiJets::S_pt_min
float S_pt_min
Definition: TPS.h:56
DAS::TPS::MultiJets::GetJetQuadPartitions
std::array< std::pair< std::pair< int, int >, std::pair< int, int > >, 3 > GetJetQuadPartitions(const std::array< int, 4 > &index)
Definition: TPS.h:180
DAS::TPS::MultiJets::S_phi_perm
std::array< float, 15 > S_phi_perm
Definition: TPS.h:72
DAS::TPS::MultiJets::Delta_phi_pair
std::array< std::array< float, 6 >, 6 > Delta_phi_pair
$\Delta \phi_{pair} = \phi_{i}-\phi_{j}$
Definition: TPS.h:47
DAS::MN::minpt
static const double minpt
Definition: getMNobservables.cc:39
DAS::TPS::MultiJets::jetCombinations
const std::vector< std::vector< std::pair< int, int > > > & jetCombinations
Definition: TPS.h:240
DAS::TPS::MultiJets::S_pt_perm
std::array< float, 15 > S_pt_perm
Definition: TPS.h:57
DAS::TPS::MultiJets::FillFeatures
void FillFeatures()
Fill 6jet's member variables by calling the appropriate loop methods.
Definition: TPS.h:113
DAS::TPS::MultiJets::S_pt_4_perm
std::array< std::array< float, 3 >, 3 > S_pt_4_perm
Detailed pT balance values for all possible pairings within each 4-jet quartet.
Definition: TPS.h:64
DAS::TPS::MultiJets::LoopOverQuartets
void LoopOverQuartets()
Loops over all quartets of jets and computes the quartet-based balance observables.
Definition: TPS.h:153
DAS::TPS::MultiJets::LoopOverTriplets
void LoopOverTriplets()
Loops over all triplets of jets and computes the triplet-based balance observables.
Definition: TPS.h:134
DAS::TPS::MultiJets::leading_dijet
Di< const Jet, const Jet > leading_dijet
Definition: TPS.h:38
DAS::TPS::PhaseSpaceSelection
std::vector< Jet > PhaseSpaceSelection(const std::vector< Jet > &jets, float minpt)
Definition: common.h:24
DAS::TPS::MultiJets::jets
std::vector< Jet > jets
Definition: TPS.h:37
DAS::TPS::MultiJets::S_phi
float S_phi
Definition: TPS.h:71
DAS::TPS::MultiJets::S_phi_min
float S_phi_min
Definition: TPS.h:71
make_di
auto make_di(Obj1 &o1, Obj2 &o2)
Definition: Di.h:99
DAS::TPS::MultiJets::S_pt_4
std::array< float, 3 > S_pt_4
Definition: TPS.h:62
DAS::TPS::MultiJets::LoopOverPairs
void LoopOverPairs()
Loops over all pairs of jets and computes the pairwise features.
Definition: TPS.h:120