36#include "fastjet/internal/ClusterSequence_N2.icc"
40FASTJET_BEGIN_NAMESPACE
54template<>
inline void ClusterSequence::_bj_set_jetinfo(
55 EEBriefJet *
const jetA,
const int _jets_index)
const {
57 double E = _jets[_jets_index].E();
59 double p = jet_def().extra_param();
60 switch (_jet_algorithm) {
62 assert(_Rparam > 2.0);
68 if (p <= 0 && scale < 1e-300) scale = 1e-300;
72 throw Error(
"Unrecognised jet algorithm");
76 double norm = _jets[_jets_index].modp2();
78 norm = 1.0/sqrt(norm);
79 jetA->nx =
norm * _jets[_jets_index].px();
80 jetA->ny =
norm * _jets[_jets_index].py();
81 jetA->nz =
norm * _jets[_jets_index].pz();
87 jetA->_jets_index = _jets_index;
96template<>
inline void ClusterSequence::_bj_set_jetinfo(
97 EEAccurateBriefJet *
const jetA,
const int _jets_index)
const {
98 _bj_set_jetinfo<EEBriefJet>(jetA, _jets_index);
105template<>
double ClusterSequence::_bj_dist(
106 const EEBriefJet *
const jeta,
107 const EEBriefJet *
const jetb)
const {
119template<>
double ClusterSequence::_bj_dist(
120 const EEAccurateBriefJet *
const jeta,
121 const EEAccurateBriefJet *
const jetb)
const {
143 if (dist*dist < numeric_limits<double>::epsilon()) {
144 double cross_x = jeta->ny * jetb->nz - jetb->ny * jeta->nz;
145 double cross_y = jeta->nz * jetb->nx - jetb->nz * jeta->nx;
146 double cross_z = jeta->nx * jetb->ny - jetb->nx * jeta->ny;
149 dist = cross_x*cross_x + cross_y*cross_y + cross_z*cross_z;
174void ClusterSequence::_simple_N2_cluster_BriefJet() {
175 _simple_N2_cluster<BriefJet>();
180void ClusterSequence::_simple_N2_cluster_EEBriefJet() {
181 _simple_N2_cluster<EEBriefJet>();
184void ClusterSequence::_simple_N2_cluster_EEAccurateBriefJet() {
185 _simple_N2_cluster<EEAccurateBriefJet>();
double norm(const VPoint p)
norm of a vector
@ ee_genkt_algorithm
the e+e- genkt algorithm (R > 2 and p=1 gives ee_kt)
@ ee_kt_algorithm
the e+e- kt algorithm