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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
|
#ifndef DQMExample_Step1_H
#define DQMExample_Step1_H
// Framework
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/ServiceRegistry/interface/Service.h"
#include "FWCore/Utilities/interface/InputTag.h"
// event
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/EventSetup.h"
// DQM
#include "DQMServices/Core/interface/DQMEDAnalyzer.h"
#include "DQMServices/Core/interface/DQMStore.h"
// Candidate handling
#include "DataFormats/Candidate/interface/Candidate.h"
#include "DataFormats/Candidate/interface/CandidateFwd.h"
// Electron
#include "DataFormats/EgammaCandidates/interface/Electron.h"
#include "DataFormats/EgammaCandidates/interface/GsfElectron.h"
#include "DataFormats/EgammaCandidates/interface/GsfElectronFwd.h"
// PFMET
#include "DataFormats/METReco/interface/PFMET.h"
#include "DataFormats/METReco/interface/PFMETCollection.h"
// Vertex utilities
#include "DataFormats/VertexReco/interface/Vertex.h"
#include "DataFormats/VertexReco/interface/VertexFwd.h"
// CaloJets
#include "DataFormats/JetReco/interface/CaloJet.h"
// Conversions
#include "CommonTools/Egamma/interface/ConversionTools.h"
// Trigger
#include "DataFormats/Common/interface/TriggerResults.h"
#include "DataFormats/HLTReco/interface/TriggerEvent.h"
#include "DataFormats/HLTReco/interface/TriggerObject.h"
#include "FWCore/Common/interface/TriggerNames.h"
class DQMExample_Step1 : public DQMEDAnalyzer {
public:
DQMExample_Step1(const edm::ParameterSet &ps);
~DQMExample_Step1() override;
protected:
void dqmBeginRun(edm::Run const &, edm::EventSetup const &) override;
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
void analyze(edm::Event const &e, edm::EventSetup const &eSetup) override;
private:
// histos booking function
void bookHistos(DQMStore::IBooker &);
// other functions
bool MediumEle(const edm::Event &iEvent, const edm::EventSetup &iESetup, const reco::GsfElectron &electron);
double Distance(const reco::Candidate &c1, const reco::Candidate &c2);
double DistancePhi(const reco::Candidate &c1, const reco::Candidate &c2);
double calcDeltaPhi(double phi1, double phi2);
// private variables
math::XYZPoint PVPoint_;
// variables from config file
edm::EDGetTokenT<reco::GsfElectronCollection> theElectronCollection_;
edm::EDGetTokenT<reco::ConversionCollection> theConversionCollection_;
edm::EDGetTokenT<reco::CaloJetCollection> theCaloJetCollection_;
edm::EDGetTokenT<reco::PFMETCollection> thePfMETCollection_;
edm::EDGetTokenT<reco::VertexCollection> thePVCollection_;
edm::EDGetTokenT<reco::BeamSpot> theBSCollection_;
edm::EDGetTokenT<trigger::TriggerEvent> triggerEvent_;
edm::EDGetTokenT<edm::TriggerResults> triggerResults_;
edm::InputTag triggerFilter_;
std::string triggerPath_;
double ptThrL1_;
double ptThrL2_;
double ptThrJet_;
double ptThrMet_;
int nElectrons;
int nBJets;
// Histograms
MonitorElement *h_vertex_number;
MonitorElement *h_pfMet;
MonitorElement *h_eMultiplicity;
MonitorElement *h_ePt_leading;
MonitorElement *h_eEta_leading;
MonitorElement *h_ePhi_leading;
MonitorElement *h_ePt_leading_matched;
MonitorElement *h_eEta_leading_matched;
MonitorElement *h_ePhi_leading_matched;
MonitorElement *h_eMultiplicity_HLT;
MonitorElement *h_ePt_leading_HLT;
MonitorElement *h_eEta_leading_HLT;
MonitorElement *h_ePhi_leading_HLT;
MonitorElement *h_ePt_leading_HLT_matched;
MonitorElement *h_eEta_leading_HLT_matched;
MonitorElement *h_ePhi_leading_HLT_matched;
MonitorElement *h_jMultiplicity;
MonitorElement *h_jPt_leading;
MonitorElement *h_jEta_leading;
MonitorElement *h_jPhi_leading;
MonitorElement *h_ePt_diff;
};
#endif
|