CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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 {
33 
35  {
36 
37  public:
38 
39  // The following is not yet used, but will be the primary
40  // constructor when the parameter set system is available.
41  //
42  explicit FlatEGunASCIIWriter( const edm::ParameterSet& ) ;
43 
44  virtual ~FlatEGunASCIIWriter() ;
45 
46  virtual void analyze( const edm::Event&, const edm::EventSetup&) override;
47  virtual void beginJob() ;
48  virtual void beginRun(const edm::Run&, const EventSetup&) override;
49 
50  private:
51 
52 
53  // gun particle(s) characteristics
54  std::vector<int> fPartIDs ;
55  double fMinEta ;
56  double fMaxEta ;
57  double fMinPhi ;
58  double fMaxPhi ;
59  double fMinE ;
60  double fMaxE ;
61 
62  // the event format itself
63  HepMC::GenEvent* fEvt;
64 
65 
66  // HepMC/HepPDT related things
68 
70  HepMC::IO_GenEvent * fOutStream ;
71 
72  int fCurrentEvent ; // event counter - untill I learn how to get it
73  // from edm::Event ) EventID ??? or what ?)
74 
75  };
76 
77 }
78 
79 #endif
virtual void beginRun(const edm::Run &, const EventSetup &) override
virtual 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:43