CMS 3D CMS Logo

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  ~FlatEGunASCIIWriter() override ;
45 
46  void analyze( const edm::Event&, const edm::EventSetup&) override;
47  void beginJob() override ;
48  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
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
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
HLT enums.
Definition: Run.h:44