CMS 3D CMS Logo

MCatNLOSource.h
Go to the documentation of this file.
1 #ifndef GeneratorInterface_MCatNLOInterface_MCatNLOSource_h
2 #define GeneratorInterface_MCatNLOInterface_MCatNLOSource_h
3 
4 #include <memory>
5 
6 #include <boost/shared_ptr.hpp>
7 
12 
14 
16 
17 #include <fstream>
18 
19 
20 // Common Block for HERWIG parameters set by UPINIT
21 extern "C" {
22  extern struct MCPARS_ {
23  double emmin;
24  double emmax;
25  double gammax;
26  double rmass[1000];
27  double gamw;
28  double gamz;
29  int emmins;
30  int emmaxs;
31  int gammaxs;
32  int rmasss[1000];
33  int gamws;
34  int gamzs;
35  } mcpars_;
36 }
37 
38 namespace lhef {
39  class LHERunInfo;
40  class LHEEvent;
41 }
42 
44  public gen::Herwig6Instance {
45 public:
46  explicit MCatNLOSource(const edm::ParameterSet &params,
47  const edm::InputSourceDescription &desc);
48  ~MCatNLOSource() override;
49 
50 private:
51  void endJob() override;
52  void beginRun(edm::Run &run) override;
53  bool setRunAndEventInfo(edm::EventID&, edm::TimeValue_t&, edm::EventAuxiliary::ExperimentType&) override;
54  void produce(edm::Event &event) override;
55 
56  void nextEvent();
57 
58  bool hwwarn(const std::string &fn, int code) override;
59 
62 
64  std::unique_ptr<std::ifstream> inputFile;
65 
67  unsigned int skipEvents;
68 
70  unsigned int nEvents;
71 
72  int ihpro;
73 
75 
76  std::unique_ptr<std::ifstream> reader;
77 
78  boost::shared_ptr<lhef::LHERunInfo> runInfo;
79  boost::shared_ptr<lhef::LHEEvent> event;
80 };
81 
82 #endif // GeneratorInterface_MCatNLOInterface_MCatNLOSource_h
unsigned int nEvents
Number of events.
Definition: MCatNLOSource.h:70
struct MCPARS_ mcpars_
int emmaxs
Definition: MCatNLOSource.h:30
double rmass[1000]
Definition: MCatNLOSource.h:26
int emmins
Definition: MCatNLOSource.h:29
double gammax
Definition: MCatNLOSource.h:25
double emmin
Definition: MCatNLOSource.h:23
boost::shared_ptr< lhef::LHEEvent > event
Definition: MCatNLOSource.h:79
int rmasss[1000]
Definition: MCatNLOSource.h:32
int gammaxs
Definition: MCatNLOSource.h:31
std::unique_ptr< std::ifstream > inputFile
Pointer to the input file.
Definition: MCatNLOSource.h:64
double gamz
Definition: MCatNLOSource.h:28
unsigned long long TimeValue_t
Definition: Timestamp.h:28
double emmax
Definition: MCatNLOSource.h:24
double gamw
Definition: MCatNLOSource.h:27
std::string fileName
Name of the input file.
Definition: MCatNLOSource.h:61
boost::shared_ptr< lhef::LHERunInfo > runInfo
Definition: MCatNLOSource.h:78
std::unique_ptr< std::ifstream > reader
Definition: MCatNLOSource.h:76
unsigned int skipEvents
Number of events to skip.
Definition: MCatNLOSource.h:67
Definition: event.py:1
Definition: Run.h:43