1 |
tboccali |
1.1 |
// system include files
|
2 |
|
|
#include <memory>
|
3 |
|
|
#include <iostream>
|
4 |
|
|
using namespace std;
|
5 |
|
|
|
6 |
|
|
// user include files
|
7 |
|
|
#include "FWCore/Framework/interface/Frameworkfwd.h"
|
8 |
|
|
#include "FWCore/Framework/interface/EDProducer.h"
|
9 |
|
|
|
10 |
|
|
#include "FWCore/Framework/interface/Event.h"
|
11 |
|
|
#include "FWCore/Framework/interface/MakerMacros.h"
|
12 |
|
|
|
13 |
|
|
#include "FWCore/ParameterSet/interface/ParameterSet.h"
|
14 |
|
|
#include "FWCore/ServiceRegistry/interface/Service.h"
|
15 |
|
|
#include "CommonTools/UtilAlgos/interface/TFileService.h"
|
16 |
|
|
#include "FWCore/Utilities/interface/InputTag.h"
|
17 |
|
|
|
18 |
|
|
#include "DataFormats/BeamSpot/interface/BeamSpot.h"
|
19 |
|
|
|
20 |
|
|
#include "DataFormats/PatCandidates/interface/Muon.h"
|
21 |
|
|
#include "DataFormats/PatCandidates/interface/Jet.h"
|
22 |
|
|
#include "DataFormats/PatCandidates/interface/Electron.h"
|
23 |
|
|
#include "DataFormats/PatCandidates/interface/Tau.h"
|
24 |
|
|
#include "DataFormats/PatCandidates/interface/Photon.h"
|
25 |
|
|
#include "DataFormats/PatCandidates/interface/MET.h"
|
26 |
|
|
|
27 |
|
|
#include "DataFormats/Common/interface/View.h"
|
28 |
|
|
|
29 |
|
|
#include "DataFormats/Candidate/interface/Candidate.h"
|
30 |
|
|
#include "DataFormats/Candidate/interface/Particle.h"
|
31 |
|
|
#include "DataFormats/HepMCCandidate/interface/GenParticle.h"
|
32 |
|
|
|
33 |
|
|
#include "TH1.h"
|
34 |
|
|
#include "TTree.h"
|
35 |
|
|
#include "TMath.h"
|
36 |
|
|
|
37 |
|
|
#include "DataFormats/Common/interface/TriggerResults.h"
|
38 |
|
|
#include "FWCore/Common/interface/TriggerNames.h"
|
39 |
|
|
#include <TString.h>
|
40 |
|
|
|
41 |
|
|
#include "DataFormats/GeometryVector/interface/Phi.h"
|
42 |
|
|
|
43 |
tboccali |
1.3 |
#include<TVector2.h>
|
44 |
|
|
|
45 |
tboccali |
1.1 |
#include "TArrayD.h"
|
46 |
tboccali |
1.4 |
#include "TLorentzVector.h"
|
47 |
tboccali |
1.1 |
|
48 |
|
|
#include "DataFormats/METReco/interface/PFMET.h"
|
49 |
bortigno |
1.6 |
|
50 |
|
|
//from .cc
|
51 |
|
|
#include "VHbbAnalysis/VHbbDataFormats/interface/VHbbEvent.h"
|
52 |
|
|
#include "VHbbAnalysis/VHbbDataFormats/interface/VHbbEventAuxInfo.h"
|
53 |
|
|
|
54 |
|
|
#include "DataFormats/GeometryVector/interface/VectorUtil.h"
|
55 |
|
|
|
56 |
|
|
#include "FWCore/Framework/interface/ESHandle.h"
|
57 |
|
|
#include "DataFormats/PatCandidates/interface/PATObject.h"
|
58 |
|
|
#include "DataFormats/PatCandidates/interface/TriggerObject.h"
|
59 |
|
|
#include "DataFormats/PatCandidates/interface/TriggerObjectStandAlone.h"
|
60 |
|
|
#include "RecoBTag/Records/interface/BTagPerformanceRecord.h"
|
61 |
|
|
#include "CondFormats/PhysicsToolsObjects/interface/BinningPointByMap.h"
|
62 |
|
|
#include "RecoBTag/PerformanceDB/interface/BtagPerformance.h"
|
63 |
|
|
|
64 |
|
|
|
65 |
tboccali |
1.1 |
// class decleration
|
66 |
|
|
//
|
67 |
tboccali |
1.8 |
class JetCorrectionUncertainty;
|
68 |
tboccali |
1.1 |
|
69 |
|
|
|
70 |
|
|
class HbbAnalyzerNew : public edm::EDProducer {
|
71 |
arizzi |
1.7 |
|
72 |
|
|
struct BTagSFContainer{
|
73 |
|
|
const BtagPerformance * BTAGSF_CSVL;
|
74 |
|
|
const BtagPerformance * BTAGSF_CSVM;
|
75 |
|
|
const BtagPerformance * BTAGSF_CSVT;
|
76 |
|
|
const BtagPerformance * MISTAGSF_CSVL;
|
77 |
|
|
const BtagPerformance * MISTAGSF_CSVM;
|
78 |
|
|
const BtagPerformance * MISTAGSF_CSVT;
|
79 |
|
|
};
|
80 |
tboccali |
1.1 |
|
81 |
|
|
public:
|
82 |
|
|
explicit HbbAnalyzerNew(const edm::ParameterSet&);
|
83 |
|
|
~HbbAnalyzerNew();
|
84 |
|
|
|
85 |
tboccali |
1.3 |
protected:
|
86 |
|
|
TVector2 getTvect( const pat::Jet* patJet );
|
87 |
tboccali |
1.4 |
|
88 |
|
|
TLorentzVector getChargedTracksMomentum(const pat::Jet* patJet );
|
89 |
tboccali |
1.1 |
|
90 |
|
|
private:
|
91 |
|
|
virtual void beginJob() ;
|
92 |
|
|
virtual void produce( edm::Event&, const edm::EventSetup&);
|
93 |
|
|
virtual void endJob() ;
|
94 |
|
|
virtual void fillMuBlock(edm::View<pat::Muon>::const_iterator mu, int muInfo[15]);
|
95 |
tboccali |
1.9 |
virtual void fillScaleFactors(VHbbEvent::SimpleJet&, BTagSFContainer);
|
96 |
tboccali |
1.1 |
|
97 |
|
|
// ----------member data ---------------------------
|
98 |
|
|
|
99 |
|
|
edm::InputTag eleLabel_;
|
100 |
|
|
edm::InputTag muoLabel_;
|
101 |
degrutto |
1.12 |
double lep_ptCutForBjets_;
|
102 |
|
|
edm::InputTag elenoCutsLabel_;
|
103 |
|
|
edm::InputTag muonoCutsLabel_;
|
104 |
tboccali |
1.1 |
edm::InputTag jetLabel_;
|
105 |
|
|
edm::InputTag subjetLabel_;
|
106 |
dlopes |
1.13 |
edm::InputTag filterjetLabel_;
|
107 |
tboccali |
1.1 |
edm::InputTag simplejet1Label_;
|
108 |
|
|
edm::InputTag simplejet2Label_;
|
109 |
|
|
edm::InputTag simplejet3Label_;
|
110 |
|
|
edm::InputTag simplejet4Label_;
|
111 |
|
|
edm::InputTag tauLabel_;
|
112 |
|
|
edm::InputTag metLabel_;
|
113 |
|
|
edm::InputTag phoLabel_;
|
114 |
|
|
edm::InputTag hltResults_;
|
115 |
tboccali |
1.2 |
|
116 |
|
|
bool runOnMC_;
|
117 |
tboccali |
1.1 |
|
118 |
|
|
// TMatrixD *pointerPt;
|
119 |
|
|
TMatrixD *pointerEta;
|
120 |
|
|
TMatrixD *pointerPhi;
|
121 |
tboccali |
1.5 |
|
122 |
|
|
bool verbose_;
|
123 |
tboccali |
1.8 |
protected:
|
124 |
|
|
void fillSimpleJet (VHbbEvent::SimpleJet& sj, edm::View<pat::Jet>::const_iterator iter);
|
125 |
|
|
void setJecUnc(VHbbEvent::SimpleJet& sj,JetCorrectionUncertainty* jecunc);
|
126 |
arizzi |
1.11 |
float metSignificance(const reco::MET * met);
|
127 |
tboccali |
1.1 |
};
|
128 |
|
|
|
129 |
bortigno |
1.6 |
|