-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprintRho.cc
More file actions
91 lines (62 loc) · 1.67 KB
/
printRho.cc
File metadata and controls
91 lines (62 loc) · 1.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#include <memory>
// user include files
#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/Framework/interface/EDAnalyzer.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/MakerMacros.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/ServiceRegistry/interface/Service.h"
#
#include <cmath>
#include <vector>
#include <TROOT.h>
#include <TFile.h>
#include <TTree.h>
#include <TH1F.h>
#include <TH2F.h>
#include <TLorentzVector.h>
#include "TMVA/Factory.h"
#include "TMVA/Tools.h"
#include "TMVA/Reader.h"
using namespace edm;
using namespace std;
class printRho : public edm::EDAnalyzer {
public:
explicit printRho(const edm::ParameterSet&);
~printRho();
private:
virtual void beginJob(const edm::EventSetup&) ;
virtual void analyze(const edm::Event&, const edm::EventSetup&);
virtual void endJob() ;
ParameterSet conf_;
unsigned int ev;
};
printRho::printRho(const edm::ParameterSet& iConfig):
conf_(iConfig)
{
}
printRho::~printRho()
{
}
void
printRho::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup)
{
Handle<double> hRho1;
Handle<double> hRho2;
edm::InputTag tag1("kt6PFJetsForIso1","rho");
edm::InputTag tag2("kt6PFJetsForIso2","rho");
iEvent.getByLabel(tag1,hRho1);
iEvent.getByLabel(tag2,hRho2);
cout << "*hRho1 = " << *hRho1 << endl;
cout << "*hRho2 = " << *hRho2 << endl;
}
void
printRho::beginJob(const edm::EventSetup&)
{
}
// ------------ method called once each job just after ending the event loop ------------
void
printRho::endJob() {
}
//define this as a plug-in
DEFINE_FWK_MODULE(printRho);