CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
FlatEGunASCIIWriter.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------
2 // FlatEGunASCIIWriter.h
3 // Author: Julia Yarba
4 //
5 // This code has been molded after examples in HepMC and HepPDT, and
6 // after single particle gun example (private contacts with Lynn Garren)
7 //
8 // Plus, it uses the ParameterSet funtionalities for "user interface"
9 //
10 // ----------------------------------------------------------------------
11 
12 #ifndef FlatEGunASCIIWriter_h
13 #define FlatEGunASCIIWriter_h
14 
15 // base class
17 
18 // for local things (data members)
19 #include <string>
20 
21 #include "HepPDT/defs.h"
22 #include "HepPDT/TableBuilder.hh"
23 #include "HepPDT/ParticleDataTable.hh"
24 
25 #include "HepMC/GenEvent.h"
26 #include "HepMC/IO_GenEvent.h"
27 
30 
31 namespace edm {
32 
34  public:
35  // The following is not yet used, but will be the primary
36  // constructor when the parameter set system is available.
37  //
38  explicit FlatEGunASCIIWriter(const edm::ParameterSet&);
39 
40  ~FlatEGunASCIIWriter() override;
41 
42  void analyze(const edm::Event&, const edm::EventSetup&) override;
43  void beginJob() override;
44  void beginRun(const edm::Run&, const EventSetup&) override;
45 
46  private:
47  // gun particle(s) characteristics
48  std::vector<int> fPartIDs;
49  double fMinEta;
50  double fMaxEta;
51  double fMinPhi;
52  double fMaxPhi;
53  double fMinE;
54  double fMaxE;
55 
56  // the event format itself
58 
59  // HepMC/HepPDT related things
61 
63  HepMC::IO_GenEvent* fOutStream;
64 
65  int fCurrentEvent; // event counter - untill I learn how to get it
66  // from edm::Event ) EventID ??? or what ?)
67  };
68 
69 } // namespace edm
70 
71 #endif
void beginRun(const edm::Run &, const EventSetup &) override
void analyze(const edm::Event &, const edm::EventSetup &) override
std::vector< int > fPartIDs
ESHandle< HepPDT::ParticleDataTable > fPDGTable
FlatEGunASCIIWriter(const edm::ParameterSet &)
HepMC::IO_GenEvent * fOutStream
Definition: Run.h:45