CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ScaleCorrMETData.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 
3 //____________________________________________________________________________||
9 
11 
13 
14 #include <iostream>
15 
16 //____________________________________________________________________________||
18 {
19 public:
20  explicit ScaleCorrMETData(const edm::ParameterSet&);
22 
23 private:
24 
26  double scaleFactor_;
27 
28  void produce(edm::Event&, const edm::EventSetup&);
29 
30 };
31 
32 //____________________________________________________________________________||
34  : inputLabel_(iConfig.getParameter<edm::InputTag>("src"))
35  , scaleFactor_(iConfig.getParameter<double>("scaleFactor"))
36 
37 {
38  produces<CorrMETData>("");
39 }
40 
41 //____________________________________________________________________________||
43 {
44  CorrMETData product;
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 
56 
void produce(edm::Event &, const edm::EventSetup &)
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:85
edm::InputTag inputLabel_
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
a MET correction term
Definition: CorrMETData.h:14
ScaleCorrMETData(const edm::ParameterSet &)