Go to the documentation of this file.00001 #ifndef GeneratorInterface_LHEInterface_JetClustering_h
00002 #define GeneratorInterface_LHEInterface_JetClustering_h
00003
00004 #include <memory>
00005 #include <vector>
00006
00007 #include <Math/GenVector/PxPyPzE4D.h>
00008
00009 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00010
00011 #include "GeneratorInterface/LHEInterface/interface/JetInput.h"
00012
00013 namespace lhef {
00014
00015 class JetClustering {
00016 public:
00017 typedef JetInput::ParticleVector ParticleVector;
00018 typedef ROOT::Math::PxPyPzE4D<double> FourVector;
00019
00020 class Jet {
00021 public:
00022 Jet() {}
00023 Jet(const FourVector &p4) : p4_(p4) {}
00024 Jet(const FourVector &p4, const ParticleVector &constituents) :
00025 p4_(p4), constituents_(constituents) {}
00026 Jet(double px, double py, double pz, double e) :
00027 p4_(px, py, pz, e) {}
00028 Jet(double px, double py, double pz, double e,
00029 const ParticleVector &constituents) :
00030 p4_(px, py, pz, e), constituents_(constituents) {}
00031 Jet(ParticleVector::value_type item) :
00032 p4_(item->momentum().px(), item->momentum().py(),
00033 item->momentum().pz(), item->momentum().e()),
00034 constituents_(1) { constituents_[0] = item; }
00035
00036 const FourVector &p4() const { return p4_; }
00037 const ParticleVector &constituents() const { return constituents_; }
00038
00039 double px() const { return p4_.Px(); }
00040 double py() const { return p4_.Py(); }
00041 double pz() const { return p4_.Pz(); }
00042 double e() const { return p4_.E(); }
00043
00044 double momentum() const { return p4_.P(); }
00045 double pt() const { return p4_.Perp(); }
00046 double et() const { return p4_.Et(); }
00047 double theta() const { return p4_.Theta(); }
00048 double eta() const { return p4_.Eta(); }
00049 double phi() const { return p4_.Phi(); }
00050 double m() const { return p4_.M(); }
00051
00052 private:
00053 FourVector p4_;
00054 ParticleVector constituents_;
00055 };
00056
00057 JetClustering(const edm::ParameterSet ¶ms);
00058 JetClustering(const edm::ParameterSet ¶ms, double jetPtMin);
00059 ~JetClustering();
00060
00061 std::vector<Jet> operator () (const ParticleVector &input) const;
00062
00063 double getJetPtMin() const;
00064
00065 class Algorithm;
00066
00067 private:
00068 void init(const edm::ParameterSet ¶ms, double jetPtMin);
00069
00070 std::auto_ptr<Algorithm> jetAlgo;
00071 };
00072
00073 }
00074
00075 #endif // GeneratorCommon_LHEInterface_JetClustering_h