CMS 3D CMS Logo

CompoundPseudoJet.h
Go to the documentation of this file.
1 #ifndef RecoJets_JetAlgorithms_CompoundPseudoJet_h
2 #define RecoJets_JetAlgorithms_CompoundPseudoJet_h
3 
4 
5 
6 // -*- C++ -*-
8 //
9 // Package: CompoundPseudoJet
10 // Class: CompoundPseudoJet
11 //
16 //-------------------------------------------------------------------------------------
21 //-------------------------------------------------------------------------------------
22 //
23 // Original Author: Salvatore Rappoccio
24 // Created: Wed Nov 28 15:31:57 CST 2007
25 //
26 //-------------------------------------------------------------------------------------
27 
28 
29 
30 
31 #include <fastjet/JetDefinition.hh>
32 #include <fastjet/PseudoJet.hh>
33 
34 #include <vector>
35 #include <algorithm>
36 
38  public:
40  CompoundPseudoSubJet(fastjet::PseudoJet const & subjet,
41  std::vector<int> const & constituents ) :
42  subjet_(subjet),
43  subjetArea_(0.0),
44  constituents_(constituents.size() )
45  {
46  copy( constituents.begin(), constituents.end(), constituents_.begin() );
47  }
48  CompoundPseudoSubJet(fastjet::PseudoJet const & subjet,
49  double subjetArea,
50  std::vector<int> const & constituents ) :
51  subjet_(subjet),
52  subjetArea_(subjetArea),
53  constituents_(constituents.size() )
54  {
55  copy( constituents.begin(), constituents.end(), constituents_.begin() );
56  }
57 
59 
60  fastjet::PseudoJet const & subjet() const { return subjet_; }
61  double subjetArea() const { return subjetArea_; }
62  std::vector<int> const & constituents() const { return constituents_; }
63 
64 protected:
65  fastjet::PseudoJet subjet_;
66  double subjetArea_;
67  std::vector<int> constituents_;
68 };
69 
71 
72 public:
74  CompoundPseudoJet(fastjet::PseudoJet const & hardJet,
75  std::vector<CompoundPseudoSubJet> const & subjets ) :
76  hardJet_(hardJet),
77  hardJetArea_(0.0),
78  subjets_(subjets.size())
79  {
80  copy( subjets.begin(), subjets.end(), subjets_.begin() );
81  }
82  CompoundPseudoJet(fastjet::PseudoJet const & hardJet,
83  double hardJetArea,
84  std::vector<CompoundPseudoSubJet> const & subjets ) :
85  hardJet_(hardJet),
86  hardJetArea_(hardJetArea),
87  subjets_(subjets.size())
88  {
89  copy( subjets.begin(), subjets.end(), subjets_.begin() );
90  }
91 
93 
94  fastjet::PseudoJet const & hardJet() const {return hardJet_;}
95  double hardJetArea() const {return hardJetArea_;}
96  std::vector<CompoundPseudoSubJet>const& subjets() const {return subjets_; }
97 
98 
99 protected:
100  fastjet::PseudoJet hardJet_;
101  double hardJetArea_;
102  std::vector<CompoundPseudoSubJet> subjets_;
103 };
104 
105 
106 
108  public std::binary_function<fastjet::PseudoJet const &, fastjet::PseudoJet const &, bool> {
109 
110 public:
111  bool operator()( fastjet::PseudoJet const & j1, fastjet::PseudoJet const & j2 ) {
112  return j1.perp() > j2.perp();
113  }
114 };
115 
116 #endif
size
Write out results.
def copy(args, dbName)
fastjet::PseudoJet hardJet_
double subjetArea() const
fastjet::PseudoJet const & subjet() const
std::vector< CompoundPseudoSubJet > const & subjets() const
fastjet::PseudoJet subjet_
fastjet::PseudoJet const & hardJet() const
CompoundPseudoJet(fastjet::PseudoJet const &hardJet, std::vector< CompoundPseudoSubJet > const &subjets)
CompoundPseudoJet holds an association of fastjet::PseudoJets that represent a "hard" top jet with su...
CompoundPseudoSubJet(fastjet::PseudoJet const &subjet, std::vector< int > const &constituents)
CompoundPseudoSubJet(fastjet::PseudoJet const &subjet, double subjetArea, std::vector< int > const &constituents)
std::vector< CompoundPseudoSubJet > subjets_
std::vector< int > const & constituents() const
CompoundPseudoJet(fastjet::PseudoJet const &hardJet, double hardJetArea, std::vector< CompoundPseudoSubJet > const &subjets)
std::vector< int > constituents_
bool operator()(fastjet::PseudoJet const &j1, fastjet::PseudoJet const &j2)
double hardJetArea() const