10 Qjets::Qjets(
double zcut,
double dcut_fctr,
double exp_min,
double exp_max,
double rigidity,
double truncation_fctr)
11 : m_rand_seed_set(false),
14 m_dcut_fctr(dcut_fctr),
18 m_truncation_fctr(truncation_fctr)
36 vector< pair<jet_distance, double> > popped_distances;
54 popped_distances.emplace_back(dist,
weight);
62 if (!popped_distances.empty()) {
63 const double inv_norm = 1. /
norm;
64 for(vector<pair<jet_distance, double> >::
iterator it = popped_distances.begin();
it != popped_distances.end(); ++
it){
65 tot_weight += (*it).second * inv_norm;
66 if(tot_weight >=
rand){
74 for(vector<pair<jet_distance, double> >::reverse_iterator
it = popped_distances.rbegin();
it != popped_distances.rend(); ++
it)
96 cs.plugin_record_ij_recombination(jd.
j1, jd.
j2, 1., new_jet);
100 double j1pt = cs.jets()[jd.
j1].perp();
101 double j2pt = cs.jets()[jd.
j2].perp();
105 cs.plugin_record_iB_recombination(jd.
j2, 1.);
109 cs.plugin_record_iB_recombination(jd.
j1, 1.);
116 [[maybe_unused]]
int num_merged_final(0);
118 for(
unsigned int i = 0 ;
i < cs.jets().
size();
i++)
121 cs.plugin_record_iB_recombination(
i,1.);
124 assert(num_merged_final < 2);
129 fastjet::PseudoJet
sum(0.,0.,0.,0.);
130 for(vector<fastjet::PseudoJet>::const_iterator
it = cs.jets().begin();
it != cs.jets().end(); ++
it)
136 double pt1 = cs.jets()[jd.
j1].perp();
137 double pt2 = cs.jets()[jd.
j2].perp();
138 fastjet::PseudoJet sum_jet = cs.jets()[jd.
j1]+cs.jets()[jd.
j2];
139 double sum_pt = sum_jet.perp();
140 double z =
min(pt1,pt2)/sum_pt;
141 double d = sqrt(cs.jets()[jd.
j1].plain_distance(cs.jets()[jd.
j2]));
146 for(
unsigned int i = 0 ;
i < inp.size()-1;
i++){
148 for(
unsigned int j =
i+1 ; j < inp.size(); j++){
153 jd.dij =
d_ij(inp[
i],inp[j]);
162 for(
unsigned int i = 0;
i < cs.jets().
size();
i++)
167 jd.dij =
d_ij(cs.jets()[jd.j1], cs.jets()[jd.j2]);
172 double Qjets::d_ij(
const fastjet::PseudoJet& v1,
const fastjet::PseudoJet&
v2)
const{
173 double p1 = v1.perp();
174 double p2 =
v2.perp();
176 assert(!std::isnan(ret));