CMS 3D CMS Logo

Pythia6Gun.h
Go to the documentation of this file.
1 #ifndef gen_Pythia6Gun_h
2 #define gen_Pythia6Gun_h
3 
10 #include <string>
11 #include <vector>
12 
13 //#include "HepPDT/defs.h"
14 //#include "HepPDT/TableBuilder.hh"
15 //#include "HepPDT/ParticleDataTable.hh"
16 
17 #include "HepMC/GenEvent.h"
18 
19 // #include "FWCore/Framework/interface/ESHandle.h"
21 
24 
25 #include "HepPID/ParticleIDTranslations.hh"
26 
27 namespace CLHEP {
28  class HepRandomEngine;
29 }
30 
31 namespace edm {
32  class EventSetup;
33  class LuminosityBlock;
34 } // namespace edm
35 
36 namespace gen {
37 
38  // class Pythia6Service;
39 
40  class Pythia6Gun
41  : public edm::one::EDProducer<edm::one::WatchLuminosityBlocks, edm::one::WatchRuns, edm::one::SharedResources> {
42  public:
44  ~Pythia6Gun() override;
45  void beginJob() override;
46  void beginLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&) override;
47  void endLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&) final;
48  void beginRun(edm::Run const&, edm::EventSetup const&) override;
49  void endRun(edm::Run const&, edm::EventSetup const&) override;
50  void produce(edm::Event&, const edm::EventSetup&) override;
51 
52  protected:
54  void loadEvent(edm::Event&);
55  virtual void generateEvent(CLHEP::HepRandomEngine*) = 0;
56  HepMC::GenParticle* addAntiParticle(int&, int&, double&, double&, double&);
57 
59 
60  // gun particle(s) characteristics
61  //
62  std::vector<int> fPartIDs;
63  double fMinPhi;
64  double fMaxPhi;
65 
66  // the event format itself
67  //
69 
70  // HepMC/HepPDT related things
71  // (for particle/event construction)
72  //
73  // edm::ESHandle<HepPDT::ParticleDataTable> fPDGTable ;
74 
78  };
79 
80 } // namespace gen
81 
82 #endif
void beginJob() override
Definition: Pythia6Gun.cc:61
void endRun(edm::Run const &, edm::EventSetup const &) override
Definition: Pythia6Gun.cc:88
void produce(edm::Event &, const edm::EventSetup &) override
Definition: Pythia6Gun.cc:164
void beginRun(edm::Run const &, edm::EventSetup const &) override
Definition: Pythia6Gun.cc:66
void beginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) override
Definition: Pythia6Gun.cc:71
HepMC::GenParticle * addAntiParticle(int &, int &, double &, double &, double &)
Definition: Pythia6Gun.cc:200
HepMC::GenEvent * fEvt
Definition: Pythia6Gun.h:68
void endLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) final
Definition: Pythia6Gun.cc:87
bool fHepMCVerbosity
Definition: Pythia6Gun.h:75
int fPylistVerbosity
Definition: Pythia6Gun.h:76
virtual void generateEvent(CLHEP::HepRandomEngine *)=0
void attachPy6DecaysToGenEvent()
Definition: Pythia6Gun.cc:96
double fMinPhi
Definition: Pythia6Gun.h:63
int fMaxEventsToPrint
Definition: Pythia6Gun.h:77
~Pythia6Gun() override
Definition: Pythia6Gun.cc:52
void loadEvent(edm::Event &)
Definition: Pythia6Gun.cc:189
double fMaxPhi
Definition: Pythia6Gun.h:64
Pythia6Gun(const edm::ParameterSet &)
Definition: Pythia6Gun.cc:24
HLT enums.
Pythia6Service * fPy6Service
Definition: Pythia6Gun.h:58
std::vector< int > fPartIDs
Definition: Pythia6Gun.h:62
Definition: Run.h:45