CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Py8GunBase.h
Go to the documentation of this file.
1 #ifndef gen_Py8GunBase_h
2 #define gen_Py8GunBase_h
3 
4 #include <memory>
5 
6 #include <boost/shared_ptr.hpp>
7 
10 
12 
14 
15 #include <Pythia.h>
16 #include <HepMCInterface.h>
17 
18 // foward declarations
19 namespace edm {
20  class Event;
21 }
22 
23 namespace gen {
24 
25  class Py8GunBase : public Py8InterfaceBase {
26  public:
27  Py8GunBase( edm::ParameterSet const& ps );
29 
30  // GenRunInfo and GenEvent passing
32  HepMC::GenEvent *getGenEvent() { return genEvent_.release(); }
34 
35  void resetEvent(HepMC::GenEvent *event) { genEvent_.reset(event); }
37 
38  // interface for accessing the EDM information from the hadronizer
40  edm::Event &getEDMEvent() const { return *edmEvent_; }
41  virtual bool select(HepMC::GenEvent*) const { return true;}
42 
43  virtual bool residualDecay(); // common func
45  void finalizeEvent();
46  void statistics();
47 
48  protected:
50  std::auto_ptr<HepMC::GenEvent>& event() { return genEvent_; }
51  std::auto_ptr<GenEventInfoProduct>& eventInfo() { return genEventInfo_; }
52 
53  // (some of) PGun parameters
54  //
55  std::vector<int> fPartIDs ;
56  double fMinPhi ;
57  double fMaxPhi ;
58 
59  private:
61  std::auto_ptr<HepMC::GenEvent> genEvent_;
62  std::auto_ptr<GenEventInfoProduct> genEventInfo_;
63 
65 
66  };
67 
68 } // namespace gen
69 
70 #endif // gen_Py8GunBase_h
HepMC::GenEvent * getGenEvent()
Definition: Py8GunBase.h:32
void resetEventInfo(GenEventInfoProduct *eventInfo)
Definition: Py8GunBase.h:36
double fMinPhi
Definition: Py8GunBase.h:56
std::auto_ptr< HepMC::GenEvent > genEvent_
Definition: Py8GunBase.h:61
virtual bool select(HepMC::GenEvent *) const
Definition: Py8GunBase.h:41
bool initializeForInternalPartons()
Definition: Py8GunBase.cc:39
virtual bool residualDecay()
Definition: Py8GunBase.cc:61
std::auto_ptr< GenEventInfoProduct > & eventInfo()
Definition: Py8GunBase.h:51
GenRunInfoProduct genRunInfo_
Definition: Py8GunBase.h:60
void finalizeEvent()
Definition: Py8GunBase.cc:138
std::auto_ptr< GenEventInfoProduct > genEventInfo_
Definition: Py8GunBase.h:62
edm::Event * edmEvent_
Definition: Py8GunBase.h:64
std::vector< int > fPartIDs
Definition: Py8GunBase.h:55
std::auto_ptr< HepMC::GenEvent > & event()
Definition: Py8GunBase.h:50
void setEDMEvent(edm::Event &event)
Definition: Py8GunBase.h:39
edm::Event & getEDMEvent() const
Definition: Py8GunBase.h:40
GenRunInfoProduct & getGenRunInfo()
Definition: Py8GunBase.h:31
GenEventInfoProduct * getGenEventInfo()
Definition: Py8GunBase.h:33
void resetEvent(HepMC::GenEvent *event)
Definition: Py8GunBase.h:35
double fMaxPhi
Definition: Py8GunBase.h:57
Py8GunBase(edm::ParameterSet const &ps)
Definition: Py8GunBase.cc:9
GenRunInfoProduct & runInfo()
Definition: Py8GunBase.h:49