29 #include <fastjet/CompositeJetStructure.hh>
31 FASTJET_BEGIN_NAMESPACE
44 CompositeJetStructure::CompositeJetStructure(
const std::vector<PseudoJet> & initial_pieces,
46 : _pieces(initial_pieces){
52 bool has_area_local =
true;
53 for (vector<PseudoJet>::const_iterator pit=
_pieces.begin(); pit!=
_pieces.end(); pit++){
54 if (!pit->has_area()){
55 has_area_local =
false;
62 for (
unsigned int i=0; i<
_pieces.size(); i++){
82 string str =
"Composite PseudoJet";
105 vector<PseudoJet> all_constituents;
106 for (
unsigned i = 0; i <
_pieces.size(); i++) {
108 vector<PseudoJet> constits =
_pieces[i].constituents();
109 copy(constits.begin(), constits.end(), back_inserter(all_constituents));
111 all_constituents.push_back(
_pieces[i]);
115 return all_constituents;
134 throw Error(
"One or more of this composite jet's pieces does not support area");
137 for (
unsigned i = 0; i <
_pieces.size(); i++)
149 throw Error(
"One or more of this composite jet's pieces does not support area");
152 for (
unsigned i = 0; i <
_pieces.size(); i++)
161 throw Error(
"One or more of this composite jet's pieces does not support area");
170 for (
unsigned i = 0; i <
_pieces.size(); i++)
179 FASTJET_END_NAMESPACE
virtual PseudoJet area_4vector(const PseudoJet &reference) const
return the jet 4-vector area.
virtual std::vector< PseudoJet > pieces(const PseudoJet &jet) const
returns the pieces
virtual bool has_area() const
check if it has a well-defined area
std::vector< PseudoJet > _pieces
the pieces building the jet
virtual double area(const PseudoJet &reference) const
return the jet (scalar) area.
virtual bool is_pure_ghost(const PseudoJet &reference) const
true if this jet is made exclusively of ghosts.
PseudoJet * _area_4vector_ptr
pointer to the 4-vector jet area
virtual bool has_constituents() const
true unless the jet has no pieces (see also the description of constituents() below) ...
base class corresponding to errors that can be thrown by FastJet
void plus_equal(PseudoJet &pa, const PseudoJet &pb) const
pa += pb in the given recombination scheme.
virtual std::string description() const
description
An abstract base class that will provide the recombination scheme facilities and/or allow a user to e...
virtual double area_error(const PseudoJet &reference) const
return the error (uncertainty) associated with the determination of the area of this jet...
Class to contain pseudojets, including minimal information of use to jet-clustering routines...
virtual std::vector< PseudoJet > constituents(const PseudoJet &jet) const
return the constituents (i.e.
virtual PseudoJet area_4vector() const
return the jet 4-vector area.