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 |
#include<TVector2.h>
|
44 |
|
45 |
#include "TArrayD.h"
|
46 |
#include "TLorentzVector.h"
|
47 |
|
48 |
#include "DataFormats/METReco/interface/PFMET.h"
|
49 |
|
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 |
//Include files needed for CSV Variables
|
65 |
#include "RecoBTau/JetTagComputer/interface/JetTagComputer.h"
|
66 |
#include "RecoBTau/JetTagComputer/interface/JetTagComputerRecord.h"
|
67 |
#include "DataFormats/BTauReco/interface/SecondaryVertexTagInfo.h"
|
68 |
#include "DataFormats/BTauReco/interface/TrackIPTagInfo.h"
|
69 |
#include "RecoBTau/JetTagComputer/interface/GenericMVAJetTagComputer.h"
|
70 |
|
71 |
|
72 |
// class decleration
|
73 |
//
|
74 |
class JetCorrectionUncertainty;
|
75 |
|
76 |
|
77 |
class HbbAnalyzerNew : public edm::EDProducer {
|
78 |
|
79 |
struct BTagSFContainer{
|
80 |
const BtagPerformance * BTAGSF_CSVL;
|
81 |
const BtagPerformance * BTAGSF_CSVM;
|
82 |
const BtagPerformance * BTAGSF_CSVT;
|
83 |
const BtagPerformance * MISTAGSF_CSVL;
|
84 |
const BtagPerformance * MISTAGSF_CSVM;
|
85 |
const BtagPerformance * MISTAGSF_CSVT;
|
86 |
};
|
87 |
|
88 |
public:
|
89 |
explicit HbbAnalyzerNew(const edm::ParameterSet&);
|
90 |
~HbbAnalyzerNew();
|
91 |
|
92 |
protected:
|
93 |
TVector2 getTvect( const pat::Jet* patJet );
|
94 |
|
95 |
TLorentzVector getChargedTracksMomentum(const pat::Jet* patJet );
|
96 |
|
97 |
private:
|
98 |
virtual void beginJob() ;
|
99 |
virtual void produce( edm::Event&, const edm::EventSetup&);
|
100 |
virtual void endJob() ;
|
101 |
virtual void fillMuBlock(edm::View<pat::Muon>::const_iterator mu, int muInfo[15]);
|
102 |
virtual void fillScaleFactors(VHbbEvent::SimpleJet&, BTagSFContainer);
|
103 |
|
104 |
// ----------member data ---------------------------
|
105 |
|
106 |
edm::InputTag eleLabel_;
|
107 |
edm::InputTag muoLabel_;
|
108 |
double lep_ptCutForBjets_;
|
109 |
edm::InputTag elenoCutsLabel_;
|
110 |
edm::InputTag muonoCutsLabel_;
|
111 |
edm::InputTag jetLabel_;
|
112 |
edm::InputTag subjetLabel_;
|
113 |
edm::InputTag filterjetLabel_;
|
114 |
edm::InputTag simplejet1Label_;
|
115 |
edm::InputTag simplejet2Label_;
|
116 |
edm::InputTag simplejet3Label_;
|
117 |
edm::InputTag simplejet4Label_;
|
118 |
edm::InputTag tauLabel_;
|
119 |
edm::InputTag metLabel_;
|
120 |
edm::InputTag phoLabel_;
|
121 |
edm::InputTag hltResults_;
|
122 |
|
123 |
bool runOnMC_;
|
124 |
|
125 |
// TMatrixD *pointerPt;
|
126 |
TMatrixD *pointerEta;
|
127 |
TMatrixD *pointerPhi;
|
128 |
|
129 |
//The computer for the CSV variables
|
130 |
const GenericMVAJetTagComputer *computer;
|
131 |
|
132 |
bool verbose_;
|
133 |
protected:
|
134 |
void fillSimpleJet (VHbbEvent::SimpleJet& sj, edm::View<pat::Jet>::const_iterator iter);
|
135 |
void setJecUnc(VHbbEvent::SimpleJet& sj,JetCorrectionUncertainty* jecunc);
|
136 |
float metSignificance(const reco::MET * met);
|
137 |
};
|
138 |
|
139 |
|