31 #include <fastjet/tools/CASubJetTagger.hh> 32 #include <fastjet/ClusterSequence.hh> 40 FASTJET_BEGIN_NAMESPACE
43 LimitedWarning CASubJetTagger::_non_ca_warnings;
47 string CASubJetTagger::description()
const{
49 oss <<
"CASubJetTagger with z_threshold=" << _z_threshold ;
50 if (_absolute_z_cut) oss <<
" (defined wrt original jet)";
51 oss <<
" and scale choice ";
52 switch (_scale_choice) {
53 case kt2_distance: oss <<
"kt2_distance";
break;
54 case jade_distance: oss <<
"jade_distance";
break;
55 case jade2_distance: oss <<
"jade2_distance";
break;
56 case plain_distance: oss <<
"plain_distance";
break;
57 case mass_drop_distance: oss <<
"mass_drop_distance";
break;
58 case dot_product_distance: oss <<
"dot_product_distance";
break;
60 throw Error(
"unrecognized scale choice");
72 _non_ca_warnings.warn(
"CASubJetTagger should only be applied on jets from a Cambridge/Aachen clustering; use it with other algorithms at your own risk");
77 aux.aux_distance = -numeric_limits<double>::max();
80 _recurse_through_jet(jet, aux, jet);
87 if (result_local ==
PseudoJet())
return result_local;
115 switch (_scale_choice) {
132 case mass_drop_distance:
134 dist = jet.
m() - std::max(parent1.
m(),parent2.
m());
136 case dot_product_distance:
143 throw Error(
"unrecognized scale choice");
152 if (parent1.
perp2() < parent2.
perp2()) std::swap(parent1,parent2);
154 if (_absolute_z_cut) {
155 z2 = parent2.
perp() / original_jet.
perp();
156 zcut1 = parent1.
perp() / original_jet.
perp() >= _z_threshold;
160 zcut2 = z2 >= _z_threshold;
163 if (dist > aux.aux_distance){
165 aux.aux_distance = dist;
171 if (zcut1) _recurse_through_jet(parent1, aux, original_jet);
172 if (zcut2) _recurse_through_jet(parent2, aux, original_jet);
175 FASTJET_END_NAMESPACE
const JetDefinition & jet_def() const
return a reference to the jet definition
double _z
the transverse momentum fraction
JetAlgorithm jet_algorithm() const
return information about the definition...
virtual bool has_parents(PseudoJet &parent1, PseudoJet &parent2) const
check if it is the product of a recombination, in which case return the 2 parents through the 'parent...
const ClusterSequence * validated_cs() const
shorthand for validated_cluster_sequence()
double squared_distance(const PseudoJet &other) const
returns squared cylinder (rap-phi) distance between this jet and another
the structure returned by a CASubJetTagger
class that contains the result internally
double dot_product(const PseudoJet &a, const PseudoJet &b)
returns the 4-vector dot product of a and b
double perp() const
returns the scalar transverse momentum
base class corresponding to errors that can be thrown by FastJet
double m() const
returns the invariant mass (If m2() is negative then -sqrt(-m2()) is returned, as in CLHEP) ...
double perp2() const
returns the squared transverse momentum
an implementation of C++0x shared pointers (or boost's)
double kt_distance(const PseudoJet &other) const
returns kt distance (R=1) between this jet and another
void set_structure_shared_ptr(const SharedPtr< PseudoJetStructureBase > &structure)
set the associated structure
the longitudinally invariant variant of the cambridge algorithm (aka Aachen algoithm).
Class to contain pseudojets, including minimal information of use to jet-clustering routines...
bool _absolute_z
whether z is computed wrt to the original jet or not
CASubJetTagger::ScaleChoice _scale_choice
the user scale choice
double _distance
the maximal distance associated with the result