CMS 3D CMS Logo

ParticleLevelProducer.h
Go to the documentation of this file.
1 #ifndef GeneratorInterface_RivetInterface_ParticleLevelProducer_H
2 #define GeneratorInterface_RivetInterface_ParticleLevelProducer_H
3 
9 
14 
15 #include "Rivet/AnalysisHandler.hh"
17 
18 class ParticleLevelProducer : public edm::one::EDProducer<edm::one::SharedResources>
19 {
20 public:
23  void produce(edm::Event& event, const edm::EventSetup& eventSetup) override;
24 
25 private:
26  void addGenJet(Rivet::Jet jet, std::unique_ptr<reco::GenJetCollection> &jets,
27  std::unique_ptr<reco::GenParticleCollection> &consts, edm::RefProd<reco::GenParticleCollection>& constsRefHandle, int &iConstituent,
28  std::unique_ptr<reco::GenParticleCollection> &tags, edm::RefProd<reco::GenParticleCollection>& tagsRefHandle, int &iTag);
29 
30  template<typename T> reco::Candidate::LorentzVector p4(const T& p) const
31  {
32  return reco::Candidate::LorentzVector(p.px(), p.py(), p.pz(), p.energy());
33  }
34 
36 
38 
40  Rivet::AnalysisHandler analysisHandler_;
41 
42 };
43 
44 #endif
reco::Candidate::LorentzVector p4(const T &p) const
vector< PseudoJet > jets
math::XYZPoint Point
point in the space
Definition: Particle.h:25
void addGenJet(Rivet::Jet jet, std::unique_ptr< reco::GenJetCollection > &jets, std::unique_ptr< reco::GenParticleCollection > &consts, edm::RefProd< reco::GenParticleCollection > &constsRefHandle, int &iConstituent, std::unique_ptr< reco::GenParticleCollection > &tags, edm::RefProd< reco::GenParticleCollection > &tagsRefHandle, int &iTag)
Rivet::RivetAnalysis * rivetAnalysis_
ParticleLevelProducer(const edm::ParameterSet &pset)
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:37
const edm::EDGetTokenT< edm::HepMCProduct > srcToken_
void produce(edm::Event &event, const edm::EventSetup &eventSetup) override
Rivet::AnalysisHandler analysisHandler_
long double T
Definition: event.py:1
reco::Particle::Point genVertex_