1 |
amagnan |
1.1 |
#ifndef HbbAnalysis_HbbTreeMaker_hh
|
2 |
|
|
#define HbbAnalysis_HbbTreeMaker_hh
|
3 |
|
|
|
4 |
|
|
#include <fstream>
|
5 |
|
|
#include <string>
|
6 |
|
|
#include <iostream>
|
7 |
|
|
#include <vector>
|
8 |
|
|
|
9 |
|
|
#include "Math/VectorUtil.h"
|
10 |
|
|
|
11 |
|
|
#include "FWCore/Framework/interface/EDAnalyzer.h"
|
12 |
|
|
#include "FWCore/Framework/interface/ESHandle.h"
|
13 |
|
|
#include "FWCore/Framework/interface/Event.h"
|
14 |
|
|
#include "FWCore/Framework/interface/EventSetup.h"
|
15 |
|
|
#include "FWCore/Framework/interface/TriggerNames.h"
|
16 |
|
|
#include "FWCore/ParameterSet/interface/ParameterSet.h"
|
17 |
|
|
|
18 |
|
|
#include "DataFormats/Common/interface/Handle.h"
|
19 |
|
|
#include "DataFormats/PatCandidates/interface/Lepton.h"
|
20 |
|
|
#include "DataFormats/PatCandidates/interface/Jet.h"
|
21 |
|
|
#include "DataFormats/PatCandidates/interface/Muon.h"
|
22 |
|
|
#include "DataFormats/PatCandidates/interface/Electron.h"
|
23 |
|
|
#include "DataFormats/PatCandidates/interface/Tau.h"
|
24 |
|
|
|
25 |
|
|
#include "UserCode/HbbAnalysis/interface/JetFlavour.hh"
|
26 |
|
|
#include "UserCode/HbbAnalysis/interface/HbbEvent.hh"
|
27 |
|
|
|
28 |
|
|
#include "TTree.h"
|
29 |
|
|
|
30 |
|
|
class HbbTreeMaker : public edm::EDAnalyzer {//class
|
31 |
|
|
|
32 |
|
|
public:
|
33 |
|
|
|
34 |
|
|
HbbTreeMaker(const edm::ParameterSet & pset);
|
35 |
|
|
~HbbTreeMaker();
|
36 |
|
|
|
37 |
amagnan |
1.4 |
void beginJob();
|
38 |
amagnan |
1.1 |
void analyze(const edm::Event& ,
|
39 |
|
|
const edm::EventSetup&
|
40 |
|
|
);
|
41 |
|
|
void endJob();
|
42 |
|
|
|
43 |
|
|
private:
|
44 |
|
|
|
45 |
|
|
void HbbParticles(const edm::Handle<reco::GenParticleCollection> & aCol,
|
46 |
|
|
std::vector<HbbAnalysis::GenParticle> & aVec);
|
47 |
|
|
|
48 |
|
|
void HbbElectrons(const edm::Handle<std::vector<pat::Electron> > & aCol,
|
49 |
|
|
std::vector<HbbAnalysis::Electron> & aVec);
|
50 |
|
|
|
51 |
|
|
void HbbMuons(const edm::Handle<std::vector<pat::Muon> > & aCol,
|
52 |
amagnan |
1.2 |
const edm::Handle<std::vector<reco::Vertex> > & aRecoVertices,
|
53 |
amagnan |
1.1 |
std::vector<HbbAnalysis::Muon> & aVec);
|
54 |
|
|
|
55 |
|
|
void HbbTaus(const edm::Handle<std::vector<pat::Tau> > & aCol,
|
56 |
|
|
const edm::Handle<std::vector<reco::Vertex> > & aRecoVertices,
|
57 |
|
|
std::vector<HbbAnalysis::Tau> & aVec);
|
58 |
|
|
|
59 |
|
|
void HbbJets(const edm::Handle<std::vector<pat::Jet> > & aCol,
|
60 |
|
|
const HbbAnalysis::JetFlavour & aFlavour,
|
61 |
|
|
const edm::Handle<reco::GenParticleCollection> & aGenParticles,
|
62 |
|
|
std::vector<HbbAnalysis::Jet> & aVec);
|
63 |
|
|
|
64 |
|
|
void HbbMet(const edm::Handle<std::vector<pat::MET> > & aCol,
|
65 |
|
|
HbbAnalysis::Met & aVec);
|
66 |
|
|
|
67 |
|
|
void HbbTrigger(const edm::Handle<edm::TriggerResults> & aCol,
|
68 |
|
|
std::vector<HbbAnalysis::Trigger> & aVec);
|
69 |
|
|
|
70 |
amagnan |
1.4 |
void HbbVertices(const edm::Handle<std::vector<reco::Vertex> > & aCol,
|
71 |
|
|
std::vector<HbbAnalysis::Vertex> & aVec);
|
72 |
amagnan |
1.1 |
|
73 |
|
|
|
74 |
|
|
int debug_;
|
75 |
|
|
|
76 |
amagnan |
1.3 |
bool processData_;
|
77 |
|
|
|
78 |
|
|
|
79 |
amagnan |
1.1 |
//flavour of jets required :
|
80 |
|
|
// 3 = u,d,s,g, 21 = g
|
81 |
|
|
// 4=c, 5=b, 45=b or c
|
82 |
|
|
unsigned int flavour_;
|
83 |
|
|
|
84 |
|
|
bool doGen_;
|
85 |
|
|
|
86 |
|
|
HbbAnalysis::JetFlavour jetFlav_;
|
87 |
|
|
|
88 |
|
|
edm::InputTag genParticleSrc_;
|
89 |
|
|
edm::InputTag electronSrc_;
|
90 |
|
|
edm::InputTag muonSrc_;
|
91 |
|
|
edm::InputTag caloTauSrc_;
|
92 |
|
|
edm::InputTag pfTauSrc_;
|
93 |
|
|
edm::InputTag caloJetSrc_;
|
94 |
|
|
edm::InputTag jptJetSrc_;
|
95 |
|
|
edm::InputTag pfJetSrc_;
|
96 |
|
|
edm::InputTag caloMetSrc_;
|
97 |
|
|
edm::InputTag tcMetSrc_;
|
98 |
|
|
edm::InputTag pfMetSrc_;
|
99 |
|
|
//edm::InputTag pairSrc_;
|
100 |
|
|
//edm::InputTag mmPairSrc_;
|
101 |
|
|
//edm::InputTag etPairSrc_;
|
102 |
|
|
//edm::InputTag mtPairSrc_;
|
103 |
|
|
edm::InputTag vertexSrc_;
|
104 |
|
|
edm::InputTag triggerSrc_;
|
105 |
|
|
std::vector<std::string> hltPaths_;
|
106 |
|
|
//vector filled during processing with all existing collections
|
107 |
|
|
//std::vector<std::pair<std::string,std::string> > collections_;
|
108 |
|
|
|
109 |
|
|
//list of processes to consider to find input collections
|
110 |
|
|
//std::vector<std::string> processVec_;
|
111 |
|
|
|
112 |
|
|
HbbAnalysis::HbbEvent * event_;
|
113 |
|
|
|
114 |
|
|
TTree *tree_;
|
115 |
|
|
|
116 |
|
|
};//class
|
117 |
|
|
|
118 |
|
|
#endif //HbbAnalysis_HbbTreeMaker_hh
|