Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
JetMETCorrections
Type1MET
plugins
ScaleCorrMETData.cc
Go to the documentation of this file.
1
// -*- C++ -*-
2
3
//____________________________________________________________________________||
4
#include "
FWCore/Framework/interface/Frameworkfwd.h
"
5
#include "
FWCore/Framework/interface/EDProducer.h
"
6
#include "
FWCore/Framework/interface/Event.h
"
7
#include "
FWCore/Framework/interface/MakerMacros.h
"
8
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
9
10
#include "
FWCore/Utilities/interface/InputTag.h
"
11
12
#include "
DataFormats/METReco/interface/CorrMETData.h
"
13
14
#include <iostream>
15
16
//____________________________________________________________________________||
17
class
ScaleCorrMETData
:
public
edm::EDProducer
18
{
19
public
:
20
explicit
ScaleCorrMETData
(
const
edm::ParameterSet
&);
21
~ScaleCorrMETData
() { }
22
23
private
:
24
25
edm::InputTag
inputLabel_
;
26
double
scaleFactor_
;
27
28
void
produce
(
edm::Event
&,
const
edm::EventSetup
&);
29
30
};
31
32
//____________________________________________________________________________||
33
ScaleCorrMETData::ScaleCorrMETData
(
const
edm::ParameterSet
& iConfig)
34
: inputLabel_(iConfig.getParameter<edm::InputTag>(
"src"
))
35
, scaleFactor_(iConfig.getParameter<double>(
"scaleFactor"
))
36
37
{
38
produces<CorrMETData>(
""
);
39
}
40
41
//____________________________________________________________________________||
42
void
ScaleCorrMETData::produce
(
edm::Event
& evt,
const
edm::EventSetup
& es)
43
{
44
CorrMETData
product;
45
edm::Handle<CorrMETData>
input
;
46
evt.
getByLabel
(
inputLabel_
, input);
47
product +=
scaleFactor_
*(*input);
48
49
std::auto_ptr<CorrMETData> pprod(
new
CorrMETData
(product));
50
evt.
put
(pprod,
""
);
51
}
52
53
//____________________________________________________________________________||
54
55
DEFINE_FWK_MODULE
(
ScaleCorrMETData
);
56
ScaleCorrMETData::produce
void produce(edm::Event &, const edm::EventSetup &)
Definition:
ScaleCorrMETData.cc:42
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:17
Event.h
LaserDQM_cfg.input
tuple input
Definition:
LaserDQM_cfg.py:38
MakerMacros.h
CorrMETData.h
edm::Handle
Definition:
AssociativeIterator.h:48
ScaleCorrMETData::scaleFactor_
double scaleFactor_
Definition:
ScaleCorrMETData.cc:26
Frameworkfwd.h
edm::EDProducer
Definition:
EDProducer.h:21
ScaleCorrMETData::~ScaleCorrMETData
~ScaleCorrMETData()
Definition:
ScaleCorrMETData.cc:21
ParameterSet.h
edm::Event::put
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition:
Event.h:85
edm::EventSetup
Definition:
EventSetup.h:44
ScaleCorrMETData::inputLabel_
edm::InputTag inputLabel_
Definition:
ScaleCorrMETData.cc:25
edm::Event::getByLabel
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition:
Event.h:356
EDProducer.h
CorrMETData
a MET correction term
Definition:
CorrMETData.h:14
edm::InputTag
Definition:
InputTag.h:12
InputTag.h
edm::ParameterSet
Definition:
ParameterSet.h:35
edm::Event
Definition:
Event.h:50
ScaleCorrMETData
Definition:
ScaleCorrMETData.cc:17
ScaleCorrMETData::ScaleCorrMETData
ScaleCorrMETData(const edm::ParameterSet &)
Definition:
ScaleCorrMETData.cc:33
Generated for CMSSW Reference Manual by
1.8.5