test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
JetClustering.h
Go to the documentation of this file.
1 #ifndef GeneratorInterface_LHEInterface_JetClustering_h
2 #define GeneratorInterface_LHEInterface_JetClustering_h
3 
4 #include <memory>
5 #include <vector>
6 
7 #include "Math/GenVector/PxPyPzE4D.h"
8 
10 
12 
13 namespace lhef {
14 
16  public:
18  typedef ROOT::Math::PxPyPzE4D<double> FourVector;
19 
20  class Jet {
21  public:
22  Jet() {}
23  Jet(const FourVector &p4) : p4_(p4) {}
25  p4_(p4), constituents_(constituents) {}
26  Jet(double px, double py, double pz, double e) :
27  p4_(px, py, pz, e) {}
28  Jet(double px, double py, double pz, double e,
30  p4_(px, py, pz, e), constituents_(constituents) {}
32  p4_(item->momentum().px(), item->momentum().py(),
33  item->momentum().pz(), item->momentum().e()),
34  constituents_(1) { constituents_[0] = item; }
35 
36  const FourVector &p4() const { return p4_; }
37  const ParticleVector &constituents() const { return constituents_; }
38 
39  double px() const { return p4_.Px(); }
40  double py() const { return p4_.Py(); }
41  double pz() const { return p4_.Pz(); }
42  double e() const { return p4_.E(); }
43 
44  double momentum() const { return p4_.P(); }
45  double pt() const { return p4_.Perp(); }
46  double et() const { return p4_.Et(); }
47  double theta() const { return p4_.Theta(); }
48  double eta() const { return p4_.Eta(); }
49  double phi() const { return p4_.Phi(); }
50  double m() const { return p4_.M(); }
51 
52  private:
55  };
56 
57  JetClustering(const edm::ParameterSet &params);
58  JetClustering(const edm::ParameterSet &params, double jetPtMin);
60 
61  std::vector<Jet> operator () (const ParticleVector &input) const;
62 
63  double getJetPtMin() const;
64 
65  class Algorithm;
66 
67  private:
68  void init(const edm::ParameterSet &params, double jetPtMin);
69 
70  std::auto_ptr<Algorithm> jetAlgo;
71 };
72 
73 } // namespace lhef
74 
75 #endif // GeneratorCommon_LHEInterface_JetClustering_h
double getJetPtMin() const
std::auto_ptr< Algorithm > jetAlgo
Definition: JetClustering.h:70
ParticleVector constituents_
Definition: JetClustering.h:54
ROOT::Math::PxPyPzE4D< double > FourVector
Definition: JetClustering.h:18
const ParticleVector & constituents() const
Definition: JetClustering.h:37
static std::string const input
Definition: EdmProvDump.cc:44
Jet(double px, double py, double pz, double e, const ParticleVector &constituents)
Definition: JetClustering.h:28
JetClustering(const edm::ParameterSet &params)
Jet(ParticleVector::value_type item)
Definition: JetClustering.h:31
double momentum() const
Definition: JetClustering.h:44
Jet(double px, double py, double pz, double e)
Definition: JetClustering.h:26
double theta() const
Definition: JetClustering.h:47
Container::value_type value_type
Jet(const FourVector &p4, const ParticleVector &constituents)
Definition: JetClustering.h:24
std::vector< Jet > operator()(const ParticleVector &input) const
Jet(const FourVector &p4)
Definition: JetClustering.h:23
JetInput::ParticleVector ParticleVector
Definition: JetClustering.h:17
const FourVector & p4() const
Definition: JetClustering.h:36
void init(const edm::ParameterSet &params, double jetPtMin)
std::vector< const HepMC::GenParticle * > ParticleVector
Definition: JetInput.h:17