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;
72 virtual bool has_constituents()
const;
80 virtual std::vector<PseudoJet> constituents(
const PseudoJet &jet)
const;
89 virtual std::vector<PseudoJet> pieces(
const PseudoJet &jet)
const;
95 virtual bool has_area()
const;
98 virtual double area(
const PseudoJet &reference)
const;
104 virtual double area_error(
const PseudoJet &reference)
const;
112 virtual bool is_pure_ghost(
const PseudoJet &reference)
const;
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);
171 template<
typename T> PseudoJet join(
const PseudoJet & j1){
172 return join<T>(std::vector<PseudoJet>(1,j1));
177 template<
typename T> PseudoJet join(
const PseudoJet & j1,
const PseudoJet & j2){
178 std::vector<PseudoJet> pieces;
179 pieces.push_back(j1);
180 pieces.push_back(j2);
181 return join<T>(pieces);
186 template<
typename T> PseudoJet join(
const PseudoJet & j1,
const PseudoJet & j2,
187 const PseudoJet & j3){
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);
197 template<
typename T> PseudoJet join(
const PseudoJet & j1,
const PseudoJet & j2,
198 const PseudoJet & j3,
const PseudoJet & j4){
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);
236 template<
typename T> PseudoJet join(
const PseudoJet & j1,
237 const JetDefinition::Recombiner & recombiner){
238 return join<T>(std::vector<PseudoJet>(1,j1), recombiner);
243 template<
typename T> PseudoJet join(
const PseudoJet & j1,
const PseudoJet & j2,
244 const JetDefinition::Recombiner & recombiner){
245 std::vector<PseudoJet> pieces;
247 pieces.push_back(j1);
248 pieces.push_back(j2);
249 return join<T>(pieces, recombiner);
254 template<
typename T> PseudoJet join(
const PseudoJet & j1,
const PseudoJet & j2,
255 const PseudoJet & j3,
256 const JetDefinition::Recombiner & 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);
267 template<
typename T> PseudoJet join(
const PseudoJet & j1,
const PseudoJet & j2,
268 const PseudoJet & j3,
const PseudoJet & j4,
269 const JetDefinition::Recombiner & 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 ~CompositeJetStructure()
default dtor
The structure for a jet made of pieces.
virtual bool has_pieces(const PseudoJet &) const
true if it has pieces (always the case)
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
void plus_equal(PseudoJet &pa, const PseudoJet &pb) const
pa += pb in the given recombination scheme.
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...