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 
10 
12 
14 
15 #include <fstream>
16 
17 // Common Block for HERWIG parameters set by UPINIT
18 extern "C" {
19 extern struct MCPARS_ {
20  double emmin;
21  double emmax;
22  double gammax;
23  double rmass[1000];
24  double gamw;
25  double gamz;
26  int emmins;
27  int emmaxs;
28  int gammaxs;
29  int rmasss[1000];
30  int gamws;
31  int gamzs;
32 } mcpars_;
33 }
34 
35 namespace lhef {
36  class LHERunInfo;
37  class LHEEvent;
38 } // namespace lhef
39 
41 public:
43  ~MCatNLOSource() override;
44 
45 private:
46  void endJob() override;
47  void beginRun(edm::Run &run) override;
48  bool setRunAndEventInfo(edm::EventID &, edm::TimeValue_t &, edm::EventAuxiliary::ExperimentType &) override;
49  void produce(edm::Event &event) override;
50 
51  void nextEvent();
52 
53  bool hwwarn(const std::string &fn, int code) override;
54 
57 
59  std::unique_ptr<std::ifstream> inputFile;
60 
62  unsigned int skipEvents;
63 
65  unsigned int nEvents;
66 
67  int ihpro;
68 
70 
71  std::unique_ptr<std::ifstream> reader;
72 
73  std::shared_ptr<lhef::LHERunInfo> runInfo;
74  std::shared_ptr<lhef::LHEEvent> event;
75 };
76 
77 #endif // GeneratorInterface_MCatNLOInterface_MCatNLOSource_h
unsigned int nEvents
Number of events.
Definition: MCatNLOSource.h:65
struct MCPARS_ mcpars_
int emmaxs
Definition: MCatNLOSource.h:27
double rmass[1000]
Definition: MCatNLOSource.h:23
int emmins
Definition: MCatNLOSource.h:26
std::shared_ptr< lhef::LHERunInfo > runInfo
Definition: MCatNLOSource.h:73
double gammax
Definition: MCatNLOSource.h:22
double emmin
Definition: MCatNLOSource.h:20
int rmasss[1000]
Definition: MCatNLOSource.h:29
int gammaxs
Definition: MCatNLOSource.h:28
std::unique_ptr< std::ifstream > inputFile
Pointer to the input file.
Definition: MCatNLOSource.h:59
double gamz
Definition: MCatNLOSource.h:25
unsigned long long TimeValue_t
Definition: Timestamp.h:28
double emmax
Definition: MCatNLOSource.h:21
double gamw
Definition: MCatNLOSource.h:24
std::string fileName
Name of the input file.
Definition: MCatNLOSource.h:56
std::unique_ptr< std::ifstream > reader
Definition: MCatNLOSource.h:71
unsigned int skipEvents
Number of events to skip.
Definition: MCatNLOSource.h:62
std::shared_ptr< lhef::LHEEvent > event
Definition: MCatNLOSource.h:74
Definition: event.py:1
Definition: Run.h:45