Main Page
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
o
p
q
r
s
t
u
v
w
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
_
a
d
e
f
l
m
o
p
s
t
u
v
Related Functions
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Package Documentation
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
GeneratorInterface
Core
plugins
GeneratorSmearedProducer.cc
Go to the documentation of this file.
1
#include "
FWCore/Framework/interface/Event.h
"
2
#include "
FWCore/Utilities/interface/InputTag.h
"
3
#include "
FWCore/ParameterSet/interface/ConfigurationDescriptions.h
"
4
#include "
FWCore/ParameterSet/interface/ParameterSetDescription.h
"
5
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
6
7
#include "
SimDataFormats/GeneratorProducts/interface/HepMCProduct.h
"
8
#include "
FWCore/Framework/interface/global/EDProducer.h
"
9
#include "
FWCore/Utilities/interface/EDGetToken.h
"
10
#include "
FWCore/Framework/interface/MakerMacros.h
"
11
12
#include <memory>
13
14
namespace
edm
{
15
class
ParameterSet
;
16
class
ConfigurationDescriptions
;
17
class
Event
;
18
class
EventSetup
;
19
class
HepMCProduct
;
20
}
// namespace edm
21
22
class
GeneratorSmearedProducer
:
public
edm::global::EDProducer
<> {
23
public
:
24
explicit
GeneratorSmearedProducer
(
edm::ParameterSet
const
&
p
);
25
26
void
produce
(
edm::StreamID
,
edm::Event
&
e
,
edm::EventSetup
const
&
c
)
const override
;
27
static
void
fillDescriptions
(
edm::ConfigurationDescriptions
& descriptions);
28
29
private
:
30
const
edm::EDGetTokenT<edm::HepMCProduct>
newToken_
;
31
const
edm::EDGetTokenT<edm::HepMCProduct>
oldToken_
;
32
};
33
34
GeneratorSmearedProducer::GeneratorSmearedProducer
(
edm::ParameterSet
const
& ps)
35
: newToken_(consumes<
edm
::
HepMCProduct
>(ps.getUntrackedParameter<
edm
::
InputTag
>(
"currentTag"
))),
36
oldToken_(consumes<
edm
::
HepMCProduct
>(ps.getUntrackedParameter<
edm
::
InputTag
>(
"previousTag"
))) {
37
// This producer produces a HepMCProduct, a copy of the original one
38
// It is used for backwaerd compatibility
39
produces<edm::HepMCProduct>();
40
}
41
42
void
GeneratorSmearedProducer::produce
(
edm::StreamID
,
edm::Event
&
iEvent
,
const
edm::EventSetup
& es)
const
{
43
edm::Handle<edm::HepMCProduct>
theHepMCProduct;
44
bool
found
=
iEvent
.getByToken(
newToken_
, theHepMCProduct);
45
if
(!
found
) {
46
found
=
iEvent
.getByToken(
oldToken_
, theHepMCProduct);
47
}
48
if
(
found
) {
49
std::unique_ptr<edm::HepMCProduct> theCopy(
new
edm::HepMCProduct
(*theHepMCProduct));
50
iEvent
.put(
std::move
(theCopy));
51
}
52
}
53
54
void
GeneratorSmearedProducer::fillDescriptions
(
edm::ConfigurationDescriptions
& descriptions) {
55
edm::ParameterSetDescription
desc
;
56
desc
.addUntracked<
edm::InputTag
>(
"currentTag"
,
edm::InputTag
(
"VtxSmeared"
));
57
desc
.addUntracked<
edm::InputTag
>(
"previousTag"
,
edm::InputTag
(
"generator"
));
58
descriptions.
add
(
"generatorSmeared"
,
desc
);
59
}
60
61
DEFINE_FWK_MODULE
(
GeneratorSmearedProducer
);
ConfigurationDescriptions.h
edm::StreamID
Definition:
StreamID.h:30
edm::EDGetTokenT< edm::HepMCProduct >
edm
HLT enums.
Definition:
AlignableModifier.h:19
AlCaHLTBitMon_ParallelJobs.p
p
Definition:
AlCaHLTBitMon_ParallelJobs.py:153
GeneratorSmearedProducer::produce
void produce(edm::StreamID, edm::Event &e, edm::EventSetup const &c) const override
Definition:
GeneratorSmearedProducer.cc:42
HLT_FULL_cff.InputTag
InputTag
Definition:
HLT_FULL_cff.py:89285
edm::ParameterSetDescription
Definition:
ParameterSetDescription.h:52
GeneratorSmearedProducer
Definition:
GeneratorSmearedProducer.cc:22
newFWLiteAna.found
found
Definition:
newFWLiteAna.py:118
edm::Handle< edm::HepMCProduct >
MakerMacros.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:16
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition:
ConfigurationDescriptions.cc:57
Event
GeneratorSmearedProducer::newToken_
const edm::EDGetTokenT< edm::HepMCProduct > newToken_
Definition:
GeneratorSmearedProducer.cc:30
ParameterSetDescription.h
GeneratorSmearedProducer::GeneratorSmearedProducer
GeneratorSmearedProducer(edm::ParameterSet const &p)
Definition:
GeneratorSmearedProducer.cc:34
EDGetToken.h
edm::global::EDProducer
Definition:
EDProducer.h:32
edm::ConfigurationDescriptions
Definition:
ConfigurationDescriptions.h:28
edm::ParameterSet
Definition:
ParameterSet.h:47
Event.h
ParameterSet
Definition:
Functions.h:16
iEvent
int iEvent
Definition:
GenABIO.cc:224
edm::EventSetup
Definition:
EventSetup.h:58
GeneratorSmearedProducer::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition:
GeneratorSmearedProducer.cc:54
InputTag.h
submitPVResolutionJobs.desc
string desc
Definition:
submitPVResolutionJobs.py:251
eostools.move
def move(src, dest)
Definition:
eostools.py:511
ConfigurationDescriptions
GeneratorSmearedProducer::oldToken_
const edm::EDGetTokenT< edm::HepMCProduct > oldToken_
Definition:
GeneratorSmearedProducer.cc:31
HepMCProduct
EventSetup
edm::HepMCProduct
Definition:
HepMCProduct.h:21
ParameterSet.h
HepMCProduct.h
EDProducer.h
c
auto & c
Definition:
CAHitNtupletGeneratorKernelsImpl.h:46
edm::Event
Definition:
Event.h:73
edm::InputTag
Definition:
InputTag.h:15
MillePedeFileConverter_cfg.e
e
Definition:
MillePedeFileConverter_cfg.py:37
Generated for CMSSW Reference Manual by
1.8.16