File indexing completed on 2024-04-06 12:13:54
0001 #ifndef gen_Pythia6Gun_h
0002 #define gen_Pythia6Gun_h
0003
0004
0005
0006
0007
0008
0009
0010 #include <string>
0011 #include <vector>
0012
0013
0014
0015
0016
0017 #include "HepMC/GenEvent.h"
0018
0019
0020 #include "FWCore/Framework/interface/one/EDProducer.h"
0021
0022 #include "GeneratorInterface/Pythia6Interface/interface/Pythia6Service.h"
0023 #include "GeneratorInterface/Pythia6Interface/interface/Pythia6Declarations.h"
0024
0025 #include "HepPID/ParticleIDTranslations.hh"
0026
0027 namespace CLHEP {
0028 class HepRandomEngine;
0029 }
0030
0031 namespace edm {
0032 class EventSetup;
0033 class LuminosityBlock;
0034 }
0035
0036 namespace gen {
0037
0038
0039
0040 class Pythia6Gun
0041 : public edm::one::EDProducer<edm::one::WatchLuminosityBlocks, edm::one::WatchRuns, edm::one::SharedResources> {
0042 public:
0043 Pythia6Gun(const edm::ParameterSet&);
0044 ~Pythia6Gun() override;
0045 void beginJob() override;
0046 void beginLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&) override;
0047 void endLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&) final;
0048 void beginRun(edm::Run const&, edm::EventSetup const&) override;
0049 void endRun(edm::Run const&, edm::EventSetup const&) override;
0050 void produce(edm::Event&, const edm::EventSetup&) override;
0051
0052 protected:
0053 void attachPy6DecaysToGenEvent();
0054 void loadEvent(edm::Event&);
0055 virtual void generateEvent(CLHEP::HepRandomEngine*) = 0;
0056 HepMC::GenParticle* addAntiParticle(int&, int&, double&, double&, double&);
0057
0058 Pythia6Service* fPy6Service;
0059
0060
0061
0062 std::vector<int> fPartIDs;
0063 double fMinPhi;
0064 double fMaxPhi;
0065
0066
0067
0068 HepMC::GenEvent* fEvt;
0069
0070
0071
0072
0073
0074
0075 bool fHepMCVerbosity;
0076 int fPylistVerbosity;
0077 int fMaxEventsToPrint;
0078 };
0079
0080 }
0081
0082 #endif