ATLAS Offline Software
Qjets.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef jetsubstructureutils_qjets_header
6 #define jetsubstructureutils_qjets_header
7 
8 #include <queue>
9 #include <vector>
10 #include <list>
11 #include <algorithm>
12 #include "fastjet/JetDefinition.hh"
13 #include "fastjet/PseudoJet.hh"
14 #include "fastjet/ClusterSequence.hh"
15 
16 
17 namespace JetSubStructureUtils {
18  struct jet_distance{
19  double dij;
20  int j1;
21  int j2;
22  };
23 
25  public:
27  bool operator() (const jet_distance& lhs, const jet_distance &rhs) const {return lhs.dij > rhs.dij;};
28  };
29 
30  class Qjets {
31  private:
33  unsigned int m_seed = 0U;
35  std::map<int,bool> m_merged_jets;
36  std::priority_queue <jet_distance, std::vector<jet_distance>, JetDistanceCompare> m_distances;
37 
38  double d_ij(const fastjet::PseudoJet& v1, const fastjet::PseudoJet& v2) const;
40 
41  double Rand();
43  bool JetsUnmerged(const jet_distance& jd) const;
44  bool JetUnmerged(int num) const;
46  void ComputeAllDistances(const std::vector<fastjet::PseudoJet>& inp);
48  double ComputeNormalization(double dmin);
50  bool Same(const jet_distance& lhs, const jet_distance& rhs);
51 
52  public:
53  Qjets(double zcut, double dcut_fctr, double exp_min, double exp_max, double rigidity, double truncation_fctr);
55  void SetRandSeed(unsigned int seed); /* In case you want reproducible behavior */
56  };
57 }
58 #endif
JetSubStructureUtils::Qjets
Definition: Qjets.h:30
JetSubStructureUtils::Qjets::m_seed
unsigned int m_seed
Definition: Qjets.h:33
JetSubStructureUtils::Qjets::m_rigidity
double m_rigidity
Definition: Qjets.h:34
JetSubStructureUtils::jet_distance::j2
int j2
Definition: Qjets.h:21
JetSubStructureUtils::Qjets::ComputeDCut
void ComputeDCut(fastjet::ClusterSequence &cs)
Definition: Qjets.cxx:127
JetSubStructureUtils::Qjets::ComputeMinimumDistance
double ComputeMinimumDistance()
JetSubStructureUtils::Qjets::m_merged_jets
std::map< int, bool > m_merged_jets
Definition: Qjets.h:35
JetSubStructureUtils::JetDistanceCompare
Definition: Qjets.h:24
JetSubStructureUtils::Qjets::Same
bool Same(const jet_distance &lhs, const jet_distance &rhs)
JetSubStructureUtils::Qjets::Cluster
void Cluster(fastjet::ClusterSequence &cs)
Definition: Qjets.cxx:81
JetSubStructureUtils::Qjets::d_ij
double d_ij(const fastjet::PseudoJet &v1, const fastjet::PseudoJet &v2) const
Definition: Qjets.cxx:172
JetSubStructureUtils::Qjets::Rand
double Rand()
Definition: Qjets.cxx:180
JetSubStructureUtils::Qjets::Qjets
Qjets(double zcut, double dcut_fctr, double exp_min, double exp_max, double rigidity, double truncation_fctr)
Definition: Qjets.cxx:10
JetSubStructureUtils::Qjets::GetNextDistance
jet_distance GetNextDistance()
Definition: Qjets.cxx:35
JetSubStructureUtils
Definition: Angularity.h:10
JetSubStructureUtils::Qjets::Prune
bool Prune(jet_distance &jd, fastjet::ClusterSequence &cs)
Definition: Qjets.cxx:135
JetSubStructureUtils::Qjets::m_dcut
double m_dcut
Definition: Qjets.h:34
JetSubStructureUtils::Qjets::SetRandSeed
void SetRandSeed(unsigned int seed)
Definition: Qjets.cxx:22
jet::ClusterSequence
fastjet::ClusterSequence ClusterSequence
Definition: ClusterSequence.h:21
JetSubStructureUtils::Qjets::m_exp_max
double m_exp_max
Definition: Qjets.h:34
JetSubStructureUtils::jet_distance
Definition: Qjets.h:18
JetSubStructureUtils::Qjets::m_zcut
double m_zcut
Definition: Qjets.h:34
JetSubStructureUtils::jet_distance::j1
int j1
Definition: Qjets.h:20
JetSubStructureUtils::Qjets::m_dcut_fctr
double m_dcut_fctr
Definition: Qjets.h:34
JetSubStructureUtils::Qjets::ComputeNewDistanceMeasures
void ComputeNewDistanceMeasures(fastjet::ClusterSequence &cs, int new_jet)
Definition: Qjets.cxx:160
trigbs_pickEvents.num
num
Definition: trigbs_pickEvents.py:76
JetSubStructureUtils::JetDistanceCompare::operator()
bool operator()(const jet_distance &lhs, const jet_distance &rhs) const
Definition: Qjets.h:27
JetSubStructureUtils::Qjets::m_truncation_fctr
double m_truncation_fctr
Definition: Qjets.h:34
JetSubStructureUtils::Qjets::m_distances
std::priority_queue< jet_distance, std::vector< jet_distance >, JetDistanceCompare > m_distances
Definition: Qjets.h:36
ReadCellNoiseFromCoolCompare.v2
v2
Definition: ReadCellNoiseFromCoolCompare.py:364
JetSubStructureUtils::Qjets::ComputeAllDistances
void ComputeAllDistances(const std::vector< fastjet::PseudoJet > &inp)
Definition: Qjets.cxx:145
JetSubStructureUtils::Qjets::ComputeNormalization
double ComputeNormalization(double dmin)
JetSubStructureUtils::jet_distance::dij
double dij
Definition: Qjets.h:19
JetSubStructureUtils::JetDistanceCompare::JetDistanceCompare
JetDistanceCompare()
Definition: Qjets.h:26
JetSubStructureUtils::Qjets::JetsUnmerged
bool JetsUnmerged(const jet_distance &jd) const
Definition: Qjets.cxx:31
JetSubStructureUtils::Qjets::JetUnmerged
bool JetUnmerged(int num) const
Definition: Qjets.cxx:27
JetSubStructureUtils::Qjets::m_rand_seed_set
bool m_rand_seed_set
Definition: Qjets.h:32
JetSubStructureUtils::Qjets::m_exp_min
double m_exp_min
Definition: Qjets.h:34