12 folderName_ ( iConfig.getParameter<
std::
string>(
"FolderName") )
18 , ht_variable_binning_ ( iConfig.getParameter<
edm::
ParameterSet>(
"histoPSet").getParameter<
std::vector<double> >(
"htBinning") )
23 , metSelection_ ( iConfig.getParameter<
std::
string>(
"metSelection") )
24 , jetSelection_ ( iConfig.getParameter<
std::
string>(
"jetSelection") )
25 , eleSelection_ ( iConfig.getParameter<
std::
string>(
"eleSelection") )
26 , muoSelection_ ( iConfig.getParameter<
std::
string>(
"muoSelection") )
27 , jetSelection_HT_ ( iConfig.getParameter<
std::
string>(
"jetSelection_HT") )
28 , njets_ ( iConfig.getParameter<unsigned>(
"njets" ) )
29 , nelectrons_ ( iConfig.getParameter<unsigned>(
"nelectrons" ) )
30 , nmuons_ ( iConfig.getParameter<unsigned>(
"nmuons" ) )
65 me.
numerator = ibooker.
book1D(histname+
"_numerator", histtitle+
" (numerator)", nbins, min, max);
66 me.
denominator = ibooker.
book1D(histname+
"_denominator", histtitle+
" (denominator)", nbins, min, max);
70 int nbins = binning.size()-1;
71 std::vector<float> fbinning(binning.begin(),binning.end());
72 float* arr = &fbinning[0];
73 me.
numerator = ibooker.
book1D(histname+
"_numerator", histtitle+
" (numerator)", nbins, arr);
74 me.
denominator = ibooker.
book1D(histname+
"_denominator", histtitle+
" (denominator)", nbins, arr);
78 me.
numerator = ibooker.
bookProfile(histname+
"_numerator", histtitle+
" (numerator)", nbinsX, xmin, xmax, ymin, ymax);
79 me.
denominator = ibooker.
bookProfile(histname+
"_denominator", histtitle+
" (denominator)", nbinsX, xmin, xmax, ymin, ymax);
83 me.
numerator = ibooker.
book2D(histname+
"_numerator", histtitle+
" (numerator)", nbinsX, xmin, xmax, nbinsY, ymin, ymax);
84 me.
denominator = ibooker.
book2D(histname+
"_denominator", histtitle+
" (denominator)", nbinsX, xmin, xmax, nbinsY, ymin, ymax);
88 int nbinsX = binningX.size()-1;
89 std::vector<float> fbinningX(binningX.begin(),binningX.end());
90 float* arrX = &fbinningX[0];
91 int nbinsY = binningY.size()-1;
92 std::vector<float> fbinningY(binningY.begin(),binningY.end());
93 float* arrY = &fbinningY[0];
95 me.
numerator = ibooker.
book2D(histname+
"_numerator", histtitle+
" (numerator)", nbinsX, arrX, nbinsY, arrY);
96 me.
denominator = ibooker.
book2D(histname+
"_denominator", histtitle+
" (denominator)", nbinsX, arrX, nbinsY, arrY);
109 histname =
"ht_variable"; histtitle =
"HT";
113 histname =
"htVsLS"; histtitle =
"HT vs LS";
117 histname =
"deltaphi_metjet1"; histtitle =
"DPHI_METJ1";
121 histname =
"deltaphi_jet1jet2"; histtitle =
"DPHI_J1J2";
149 std::vector<reco::PFJet>
jets;
150 if ( jetHandle->size() <
njets_ )
return;
151 for (
auto const & j : *jetHandle ) {
156 for (
auto const & j : *jetHandle ) {
159 if ( jets.size() <
njets_ )
return;
161 float deltaPhi_met_j1 = 10.0;
162 float deltaPhi_j1_j2 = 10.0;
164 if (jets.size() >= 1) deltaPhi_met_j1 = fabs(
deltaPhi( pfmet.
phi(), jets[0].phi() ));
165 if (jets.size() >= 2) deltaPhi_j1_j2 = fabs(
deltaPhi( jets[0].
phi(), jets[1].
phi() ));
169 std::vector<reco::GsfElectron>
electrons;
171 for (
auto const &
e : *eleHandle ) {
180 for (
auto const &
v : *vtxHandle) {
181 bool isFake =
v.isFake() ;
191 if ( muoHandle->size() <
nmuons_ )
return;
192 std::vector<reco::Muon>
muons;
193 for (
auto const &
m : *muoHandle ) {
194 if (
muoSelection_(
m ) &&
m.isGlobalMuon() &&
m.isPFMuon() &&
m.globalTrack()->normalizedChi2() < 10. &&
m.globalTrack()->hitPattern().numberOfValidMuonHits() > 0 &&
m.numberOfMatchedStations() > 1 && fabs(
m.muonBestTrack()->dxy(vtx.
position())) < 0.2 && fabs(
m.muonBestTrack()->dz(vtx.
position())) < 0.5 &&
m.innerTrack()->hitPattern().numberOfValidPixelHits() > 0 &&
m.innerTrack()->hitPattern().trackerLayersWithMeasurement() > 5 ) muons.push_back(
m);
196 if ( muons.size() <
nmuons_ )
return;
219 pset.
add<
unsigned> (
"nbins");
220 pset.
add<
double>(
"xmin" );
221 pset.
add<
double>(
"xmax" );
226 pset.
add<
unsigned> (
"nbins", 2500);
244 desc.
add<
unsigned>(
"njets", 0);
245 desc.
add<
unsigned>(
"nelectrons", 0);
246 desc.
add<
unsigned>(
"nmuons", 0);
249 genericTriggerEventPSet.
add<
bool>(
"andOr");
251 genericTriggerEventPSet.add<std::vector<int> >(
"dcsPartitions",{});
252 genericTriggerEventPSet.add<
bool>(
"andOrDcs",
false);
253 genericTriggerEventPSet.add<
bool>(
"errorReplyDcs",
true);
254 genericTriggerEventPSet.add<
std::string>(
"dbLabel",
"");
255 genericTriggerEventPSet.add<
bool>(
"andOrHlt",
true);
257 genericTriggerEventPSet.add<std::vector<std::string> >(
"hltPaths",{});
258 genericTriggerEventPSet.add<
std::string>(
"hltDBKey",
"");
259 genericTriggerEventPSet.add<
bool>(
"errorReplyHlt",
false);
260 genericTriggerEventPSet.add<
unsigned int>(
"verbosityLevel",1);
269 std::vector<double>
bins = {0.,20.,40.,60.,80.,90.,100.,110.,120.,130.,140.,150.,160.,170.,180.,190.,200.,220.,240.,260.,280.,300.,350.,400.,450.,500.,550.,600.,650.,700.,750.,800.,850.,900.,950.,1000.,1050.,1100.,1200.,1300.,1400.,1500.,2000.,2500.};
270 histoPSet.add<std::vector<double> >(
"htBinning",
bins);
278 descriptions.
add(
"htMonitoring", desc);
T getParameter(std::string const &) const
edm::EDGetTokenT< reco::MuonCollection > muoToken_
edm::EDGetTokenT< reco::PFJetCollection > jetToken_
HTME htME_variableBinning_
MonitorElement * denominator
void setHTitle(HTME &me, const std::string &titleX, const std::string &titleY)
void bookME(DQMStore::IBooker &, HTME &me, const std::string &histname, const std::string &histtitle, int nbins, double xmin, double xmax)
MonitorElement * bookProfile(Args &&...args)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
StringCutObjectSelector< reco::Muon, true > muoSelection_
std::vector< double > ht_variable_binning_
std::vector< Vertex > VertexCollection
collection of Vertex objects
Provides a code based selection for trigger and DCS information in order to have no failing filters i...
edm::EDGetTokenT< reco::VertexCollection > vtxToken_
static MEHTbinning getHistoPSet(const edm::ParameterSet &pset)
LuminosityBlockNumber_t luminosityBlock() const
const Point & position() const
position
std::vector< GsfElectron > GsfElectronCollection
collection of GsfElectron objects
std::unique_ptr< GenericTriggerEventFlag > den_genTriggerEventFlag_
std::vector< Muon > MuonCollection
collection of Muon objects
StringCutObjectSelector< reco::MET, true > metSelection_
virtual double phi() const final
momentum azimuthal angle
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
static void fillHistoLSPSetDescription(edm::ParameterSetDescription &pset)
MonitorElement * numerator
MonitorElement * book1D(Args &&...args)
HTMonitor(const edm::ParameterSet &)
static void fillHistoPSetDescription(edm::ParameterSetDescription &pset)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
edm::EDGetTokenT< reco::GsfElectronCollection > eleToken_
void setCurrentFolder(const std::string &fullpath)
MonitorElement * book2D(Args &&...args)
StringCutObjectSelector< reco::GsfElectron, true > eleSelection_
StringCutObjectSelector< reco::PFJet, true > jetSelection_
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void analyze(edm::Event const &iEvent, edm::EventSetup const &iSetup) override
std::vector< PFJet > PFJetCollection
collection of PFJet objects
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
StringCutObjectSelector< reco::PFJet, true > jetSelection_HT_
static MEHTbinning getHistoLSPSet(const edm::ParameterSet &pset)
edm::EDGetTokenT< reco::PFMETCollection > metToken_
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
static MEHTbinning phi_binning_
std::unique_ptr< GenericTriggerEventFlag > num_genTriggerEventFlag_