Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:13:30

0001 #ifndef gen_ExternalDecayDriver_h
0002 #define gen_ExternalDecayDriver_h
0003 
0004 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0005 #include "FWCore/Framework/interface/EventSetup.h"
0006 #include "FWCore/Framework/interface/ConsumesCollector.h"
0007 
0008 #include <string>
0009 #include <vector>
0010 
0011 namespace HepMC {
0012   class GenEvent;
0013 }
0014 
0015 namespace CLHEP {
0016   class HepRandomEngine;
0017 }
0018 
0019 namespace lhef {
0020   class LHEEvent;
0021 }
0022 
0023 namespace gen {
0024 
0025   class EvtGenInterfaceBase;
0026   class TauolaInterfaceBase;
0027   class PhotosInterfaceBase;
0028 
0029   class ExternalDecayDriver {
0030   public:
0031     // ctor & dtor
0032     ExternalDecayDriver(const edm::ParameterSet&, edm::ConsumesCollector);
0033     ~ExternalDecayDriver();
0034 
0035     void init(const edm::EventSetup&);
0036 
0037     const std::vector<int>& operatesOnParticles() { return fPDGs; }
0038     const std::vector<std::string>& specialSettings() { return fSpecialSettings; }
0039 
0040     HepMC::GenEvent* decay(HepMC::GenEvent* evt);
0041     HepMC::GenEvent* decay(HepMC::GenEvent* evt, lhef::LHEEvent* lheEvent);
0042 
0043     void statistics() const;
0044 
0045     void setRandomEngine(CLHEP::HepRandomEngine*);
0046     std::vector<std::string> const& sharedResources() const { return exSharedResources; }
0047 
0048   private:
0049     bool fIsInitialized;
0050     std::unique_ptr<TauolaInterfaceBase> fTauolaInterface;
0051     std::unique_ptr<EvtGenInterfaceBase> fEvtGenInterface;
0052     std::unique_ptr<PhotosInterfaceBase> fPhotosInterface;
0053     std::vector<int> fPDGs;
0054     std::vector<std::string> fSpecialSettings;
0055 
0056     std::vector<std::string> exSharedResources;
0057   };
0058 
0059 }  // namespace gen
0060 
0061 #endif