test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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  virtual ~MCatNLOSource();
49 
50 private:
51  virtual void endJob();
52  virtual void beginRun(edm::Run &run);
54  virtual void produce(edm::Event &event);
55 
56  void nextEvent();
57 
58  virtual bool hwwarn(const std::string &fn, int code);
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
virtual void produce(edm::Event &event)
unsigned int nEvents
Number of events.
Definition: MCatNLOSource.h:70
virtual ~MCatNLOSource()
struct MCPARS_ mcpars_
int emmaxs
Definition: MCatNLOSource.h:30
double rmass[1000]
Definition: MCatNLOSource.h:26
RunNumber_t run() const
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
virtual void endJob()
virtual bool setRunAndEventInfo(edm::EventID &, edm::TimeValue_t &, edm::EventAuxiliary::ExperimentType &)
int gammaxs
Definition: MCatNLOSource.h:31
std::unique_ptr< std::ifstream > inputFile
Pointer to the input file.
Definition: MCatNLOSource.h:64
MCatNLOSource(const edm::ParameterSet &params, const edm::InputSourceDescription &desc)
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
virtual bool hwwarn(const std::string &fn, int code)
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
EventNumber_t event() const
unsigned int skipEvents
Number of events to skip.
Definition: MCatNLOSource.h:67
virtual void beginRun(edm::Run &run)
Definition: Run.h:43