CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_5/src/TauAnalysis/MCEmbeddingTools/interface/MCParticleReplacer.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 #ifndef TauAnalysis_MCEmbeddingTools_MCParticleReplacer_h
00003 #define TauAnalysis_MCEmbeddingTools_MCParticleReplacer_h
00004 //
00005 // Package:    Replacer
00006 // Class:      Replacer
00007 //
00015 //
00016 // Original Author:  M. Zeise
00017 //         Created:  Tue Oct  14 13:04:54 CEST 2008
00018 //
00019 //
00020 
00021 
00022 // system include files
00023 #include "FWCore/Framework/interface/EDProducer.h"
00024 
00025 #include "TauAnalysis/MCEmbeddingTools/interface/ParticleReplacerBase.h"
00026 
00027 #include<string>
00028 
00029 #include<boost/shared_ptr.hpp>
00030 
00031 class MCParticleReplacer : public edm::EDProducer
00032 {
00033 public:
00034         explicit MCParticleReplacer(const edm::ParameterSet&);
00035         ~MCParticleReplacer();
00036 
00037         virtual void produce(edm::Event& iEvent, const edm::EventSetup& iSetup) override;
00038         virtual void beginRun(const edm::Run& iRun,const edm::EventSetup& iSetup) override;
00039         virtual void endRun(const edm::Run& iRun,const edm::EventSetup& iSetup) override;
00040         virtual void beginJob();
00041         virtual void endJob();
00042         
00043 private:
00044         enum HepMcMode { kInvalid=0, kNew, kReplace };
00045         static HepMcMode stringToHepMcMode(const std::string& name);
00046 
00047         edm::InputTag src_;
00048         edm::InputTag srcHepMC_;
00049         HepMcMode hepMcMode_;
00050         boost::shared_ptr<ParticleReplacerBase> replacer_;
00051 };
00052 
00053 
00054 #endif