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> 41 FASTJET_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;
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;
155 template<
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);
218 template<
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);
280 FASTJET_END_NAMESPACE
282 #endif // __FASTJET_MERGEDJET_STRUCTURE_HH__ virtual bool has_pieces(const PseudoJet &) const override
true if it has pieces (always the case)
virtual ~CompositeJetStructure()
default dtor
The structure for a jet made of pieces.
Contains any information related to the clustering that should be directly accessible to PseudoJet...
std::vector< PseudoJet > _pieces
the pieces building the jet
PseudoJet * _area_4vector_ptr
pointer to the 4-vector jet area
an implementation of C++0x shared pointers (or boost's)
void discard_area()
disable the area of the composite jet
void set_structure_shared_ptr(const SharedPtr< PseudoJetStructureBase > &structure)
set the associated structure
CompositeJetStructure()
default ctor
An abstract base class that will provide the recombination scheme facilities and/or allow a user to e...
Class to contain pseudojets, including minimal information of use to jet-clustering routines...
void plus_equal(PseudoJet &pa, const PseudoJet &pb) const
pa += pb in the given recombination scheme.