32#ifndef __FASTJET_COMPOSITEJET_STRUCTURE_HH__
33#define __FASTJET_COMPOSITEJET_STRUCTURE_HH__
35#include "fastjet/PseudoJet.hh"
36#include "fastjet/PseudoJetStructureBase.hh"
39#include "fastjet/JetDefinition.hh"
41FASTJET_BEGIN_NAMESPACE
62 if (_area_4vector_ptr)
delete _area_4vector_ptr;
66 virtual std::string description() const FASTJET_OVERRIDE;
72 virtual
bool has_constituents() const FASTJET_OVERRIDE;
80 virtual std::vector<
PseudoJet> constituents(const
PseudoJet &jet) const FASTJET_OVERRIDE;
86 virtual
bool has_pieces(const
PseudoJet & ) const FASTJET_OVERRIDE {
return true;}
89 virtual std::vector<PseudoJet> pieces(
const PseudoJet &jet)
const FASTJET_OVERRIDE;
95 virtual bool has_area() const FASTJET_OVERRIDE;
98 virtual
double area(const
PseudoJet &reference) const FASTJET_OVERRIDE;
104 virtual
double area_error(const
PseudoJet &reference) const FASTJET_OVERRIDE;
112 virtual
bool is_pure_ghost(const
PseudoJet &reference) const FASTJET_OVERRIDE;
133 if (_area_4vector_ptr)
delete _area_4vector_ptr;
134 _area_4vector_ptr = 0;
155template<
typename T>
PseudoJet join(
const std::vector<PseudoJet> & pieces){
157 for (
unsigned int i=0; i<pieces.size(); i++){
162 T *cj_struct =
new T(pieces);
172 return join<T>(std::vector<PseudoJet>(1,j1));
178 std::vector<PseudoJet> pieces;
179 pieces.push_back(j1);
180 pieces.push_back(j2);
181 return join<T>(pieces);
188 std::vector<PseudoJet> pieces;
189 pieces.push_back(j1);
190 pieces.push_back(j2);
191 pieces.push_back(j3);
192 return join<T>(pieces);
199 std::vector<PseudoJet> pieces;
200 pieces.push_back(j1);
201 pieces.push_back(j2);
202 pieces.push_back(j3);
203 pieces.push_back(j4);
204 return join<T>(pieces);
218template<
typename T>
PseudoJet join(
const std::vector<PseudoJet> & pieces,
221 if (pieces.size()>0){
223 for (
unsigned int i=1; i<pieces.size(); i++){
228 T *cj_struct =
new T(pieces, &recombiner);
238 return join<T>(std::vector<PseudoJet>(1,j1), recombiner);
245 std::vector<PseudoJet> pieces;
247 pieces.push_back(j1);
248 pieces.push_back(j2);
249 return join<T>(pieces, recombiner);
257 std::vector<PseudoJet> pieces;
259 pieces.push_back(j1);
260 pieces.push_back(j2);
261 pieces.push_back(j3);
262 return join<T>(pieces, recombiner);
270 std::vector<PseudoJet> pieces;
272 pieces.push_back(j1);
273 pieces.push_back(j2);
274 pieces.push_back(j3);
275 pieces.push_back(j4);
276 return join<T>(pieces, recombiner);
The structure for a jet made of pieces.
virtual ~CompositeJetStructure()
default dtor
std::vector< PseudoJet > _pieces
the pieces building the jet
PseudoJet * _area_4vector_ptr
pointer to the 4-vector jet area
CompositeJetStructure()
default ctor
An abstract base class that will provide the recombination scheme facilities and/or allow a user to e...
void plus_equal(PseudoJet &pa, const PseudoJet &pb) const
pa += pb in the given recombination scheme.
Contains any information related to the clustering that should be directly accessible to PseudoJet.
Class to contain pseudojets, including minimal information of use to jet-clustering routines.
void set_structure_shared_ptr(const SharedPtr< PseudoJetStructureBase > &structure_in)
set the associated structure
An implementation of shared pointers that is broadly similar to C++11 shared_ptr (https://en....