IOMC
ParticleGuns
interface
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
16
#include "
FWCore/Framework/interface/EDAnalyzer.h
"
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
28
#include "
FWCore/Framework/interface/ESHandle.h
"
29
#include "
FWCore/Framework/interface/EventSetup.h
"
30
31
namespace
edm
{
32
33
class
FlatEGunASCIIWriter
:
public
edm::EDAnalyzer
{
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
57
HepMC::GenEvent
*
fEvt
;
58
59
// HepMC/HepPDT related things
60
ESHandle<HepPDT::ParticleDataTable>
fPDGTable
;
61
62
std::string
fOutFileName
;
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
ESHandle.h
edm::FlatEGunASCIIWriter::~FlatEGunASCIIWriter
~FlatEGunASCIIWriter() override
Definition:
FlatEGunASCIIWriter.cc:51
edm::FlatEGunASCIIWriter::fMinE
double fMinE
Definition:
FlatEGunASCIIWriter.h:53
edm::Run
Definition:
Run.h:45
edm
HLT enums.
Definition:
AlignableModifier.h:19
edm::FlatEGunASCIIWriter::fOutStream
HepMC::IO_GenEvent * fOutStream
Definition:
FlatEGunASCIIWriter.h:63
edm::FlatEGunASCIIWriter::fOutFileName
std::string fOutFileName
Definition:
FlatEGunASCIIWriter.h:62
EDAnalyzer.h
edm::FlatEGunASCIIWriter::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition:
FlatEGunASCIIWriter.cc:70
HepMC::GenEvent
Definition:
hepmc_rootio.cc:9
edm::EDAnalyzer
Definition:
EDAnalyzer.h:28
edm::FlatEGunASCIIWriter::FlatEGunASCIIWriter
FlatEGunASCIIWriter(const edm::ParameterSet &)
Definition:
FlatEGunASCIIWriter.cc:37
edm::FlatEGunASCIIWriter
Definition:
FlatEGunASCIIWriter.h:33
edm::ESHandle< HepPDT::ParticleDataTable >
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
edm::FlatEGunASCIIWriter::fMinPhi
double fMinPhi
Definition:
FlatEGunASCIIWriter.h:51
edm::FlatEGunASCIIWriter::fMaxPhi
double fMaxPhi
Definition:
FlatEGunASCIIWriter.h:52
edm::ParameterSet
Definition:
ParameterSet.h:47
edm::FlatEGunASCIIWriter::beginRun
void beginRun(const edm::Run &, const EventSetup &) override
Definition:
FlatEGunASCIIWriter.cc:58
edm::FlatEGunASCIIWriter::beginJob
void beginJob() override
Definition:
FlatEGunASCIIWriter.cc:60
edm::EventSetup
Definition:
EventSetup.h:58
edm::FlatEGunASCIIWriter::fPartIDs
std::vector< int > fPartIDs
Definition:
FlatEGunASCIIWriter.h:48
edm::FlatEGunASCIIWriter::fMinEta
double fMinEta
Definition:
FlatEGunASCIIWriter.h:49
edm::FlatEGunASCIIWriter::fEvt
HepMC::GenEvent * fEvt
Definition:
FlatEGunASCIIWriter.h:57
edm::FlatEGunASCIIWriter::fPDGTable
ESHandle< HepPDT::ParticleDataTable > fPDGTable
Definition:
FlatEGunASCIIWriter.h:60
EventSetup.h
edm::FlatEGunASCIIWriter::fMaxE
double fMaxE
Definition:
FlatEGunASCIIWriter.h:54
edm::Event
Definition:
Event.h:73
edm::FlatEGunASCIIWriter::fMaxEta
double fMaxEta
Definition:
FlatEGunASCIIWriter.h:50
edm::FlatEGunASCIIWriter::fCurrentEvent
int fCurrentEvent
Definition:
FlatEGunASCIIWriter.h:65
Generated for CMSSW Reference Manual by
1.8.16