|
|
Go to the documentation of this file.
129 const double lep_counting_threshold,
130 const double lep_iso_cut,
131 const double lep_eta_cut,
132 const double d0_cut_b,
133 const double dz_cut_b,
134 const double d0_cut_e,
135 const double dz_cut_e) {
148 const float relisowithdb = absiso / el.
pt();
149 if (relisowithdb > lep_iso_cut)
153 bool pass_conversion =
false;
157 edm::LogError(
"LepHTMonitor") <<
"Electron conversion matching failed.\n";
159 if (!pass_conversion)
163 float d0 = 999.,
dz = 999.;
168 edm::LogError(
"LepHTMonitor") <<
"Could not read electron.gsfTrack().\n";
187 const double lep_counting_threshold,
188 const double lep_iso_cut,
189 const double lep_eta_cut,
196 if (
mu.pt() < lep_counting_threshold ||
std::abs(
mu.eta()) > lep_eta_cut)
200 auto const &iso =
mu.pfIsolationR04();
202 iso.sumChargedHadronPt +
std::max(0.0, iso.sumNeutralHadronEt + iso.sumPhotonEt - 0.5 * iso.sumPUPt);
203 const float relisowithdb = absiso /
mu.pt();
204 if (relisowithdb > lep_iso_cut)
208 bool pass_id =
false;
220 float d0 =
std::abs(
mu.muonBestTrack()->dxy(pv_position));
221 float dz =
std::abs(
mu.muonBestTrack()->dz(pv_position));
222 if (
d0 > d0_cut ||
dz > dz_cut)
250 ps.getParameter<
edm::
ParameterSet>(
"numGenericTriggerEventPSet"), consumesCollector(), *this)),
252 ps.getParameter<
edm::
ParameterSet>(
"den_lep_GenericTriggerEventPSet"), consumesCollector(), *this)),
254 ps.getParameter<
edm::
ParameterSet>(
"den_HT_GenericTriggerEventPSet"), consumesCollector(), *this)),
261 jetPtCut_(ps.getUntrackedParameter<double>(
"jetPtCut")),
262 jetEtaCut_(ps.getUntrackedParameter<double>(
"jetEtaCut")),
263 metCut_(ps.getUntrackedParameter<double>(
"metCut")),
264 htCut_(ps.getUntrackedParameter<double>(
"htCut")),
266 nmusCut_(ps.getUntrackedParameter<double>(
"nmus")),
267 nelsCut_(ps.getUntrackedParameter<double>(
"nels")),
270 lep_iso_cut_(ps.getUntrackedParameter<double>(
"lepIsoCut")),
271 lep_eta_cut_(ps.getUntrackedParameter<double>(
"lepEtaCut")),
272 lep_d0_cut_b_(ps.getUntrackedParameter<double>(
"lep_d0_cut_b")),
273 lep_dz_cut_b_(ps.getUntrackedParameter<double>(
"lep_dz_cut_b")),
274 lep_d0_cut_e_(ps.getUntrackedParameter<double>(
"lep_d0_cut_e")),
275 lep_dz_cut_e_(ps.getUntrackedParameter<double>(
"lep_dz_cut_e")),
276 ptbins_(ps.getParameter<
std::vector<double> >(
"ptbins")),
277 htbins_(ps.getParameter<
std::vector<double> >(
"htbins")),
282 etabins_min_(ps.getUntrackedParameter<double>(
"etabins_min")),
283 etabins_max_(ps.getUntrackedParameter<double>(
"etabins_max")),
284 phibins_min_(ps.getUntrackedParameter<double>(
"phibins_min")),
285 phibins_max_(ps.getUntrackedParameter<double>(
"phibins_max")),
286 npvbins_min_(ps.getUntrackedParameter<double>(
"npvbins_min")),
287 npvbins_max_(ps.getUntrackedParameter<double>(
"npvbins_max")),
299 edm::LogInfo(
"LepHTMonitor") <<
"Constructor LepHTMonitor::LepHTMonitor\n";
354 if (is_mu && !is_ele) {
357 }
else if (is_ele && !is_mu) {
363 vector<float> f_ptbins;
365 f_ptbins.push_back(static_cast<float>(ptbin));
366 vector<float> f_htbins;
368 f_htbins.push_back(static_cast<float>(htbin));
372 ibooker.
book1D(
"pfHTTurnOn_num",
"Numerator;Offline H_{T} [GeV];", f_htbins.size() - 1, f_htbins.data());
374 ibooker.
book1D(
"pfHTTurnOn_den",
"Denominator;Offline H_{T} [GeV];", f_htbins.size() - 1, f_htbins.data());
377 (
"Numerator;Offline " + lepton +
" p_{T} [GeV];").c_str(),
381 (
"Denominator;Offline " + lepton +
" p_{T} [GeV];").c_str(),
394 "Numerator;Offline lepton #eta;Offline lepton #phi;",
402 "Denominator;Offline lepton #eta;Offline lepton #phi;",
424 bool hasFired =
false;
425 bool hasFiredAuxiliary =
false;
426 bool hasFiredLeptonAuxiliary =
false;
428 hasFiredLeptonAuxiliary =
true;
430 hasFiredAuxiliary =
true;
434 if (!(hasFiredAuxiliary || hasFiredLeptonAuxiliary))
451 if (!ele_id_decisions.
isValid()) {
531 double lep_max_pt = -1.0;
534 double trailing_ele_eta = 0;
535 double trailing_ele_phi = 0;
536 double trailing_mu_eta = 0;
537 double trailing_mu_phi = 0;
538 double min_ele_pt = -1.0;
539 double min_mu_pt = -1.0;
549 bool pass_id = (*ele_id_decisions)[el];
567 if (
electron.pt() < min_ele_pt || min_ele_pt < 0) {
589 if (
muon.pt() > lep_max_pt) {
590 lep_max_pt =
muon.pt();
591 lep_eta =
muon.eta();
592 lep_phi =
muon.phi();
594 if (
muon.pt() < min_mu_pt || min_mu_pt < 0) {
595 min_mu_pt =
muon.pt();
596 trailing_mu_eta =
muon.eta();
597 trailing_mu_phi =
muon.phi();
606 float lep_pt = lep_max_pt;
611 lep_eta = trailing_mu_eta;
612 lep_phi = trailing_mu_phi;
616 lep_eta = trailing_ele_eta;
617 lep_phi = trailing_ele_phi;
620 if (min_ele_pt < min_mu_pt) {
622 lep_eta = trailing_ele_eta;
623 lep_phi = trailing_ele_phi;
626 lep_eta = trailing_mu_eta;
627 lep_phi = trailing_mu_phi;
635 if (hasFiredLeptonAuxiliary || !
e.isRealData()) {
670 if (hasFiredAuxiliary || !
e.isRealData()) {
671 if (nleps_cut && lep_plateau) {
dqm::reco::DQMStore DQMStore
GsfTrackRef gsfTrack() const override
reference to a GsfTrack
edm::EDGetTokenT< reco::JetTagCollection > theJetTagCollection_
void analyze(const edm::Event &e, const edm::EventSetup &eSetup) override
MonitorElement * h_NPVTurnOn_num_
std::vector< Vertex > VertexCollection
collection of Vertex objects
virtual void setCurrentFolder(std::string const &fullpath)
MonitorElement * h_pfHTTurnOn_den_
double pt() const final
transverse momentum
const std::string folderName_
MonitorElement * h_NPVTurnOn_den_
std::unique_ptr< GenericTriggerEventFlag > den_HT_genTriggerEventFlag_
edm::InputTag thePfJetTag_
std::vector< double > ptbins_
std::unique_ptr< GenericTriggerEventFlag > num_genTriggerEventFlag_
std::vector< Conversion > ConversionCollection
collectin of Conversion objects
MonitorElement * h_lepPtTurnOn_num_
bool isLooseMuon(const reco::Muon &)
#define DEFINE_FWK_MODULE(type)
MonitorElement * h_lepEtaPhiTurnOn_num_
LepHTMonitor(const edm::ParameterSet &ps)
void bookHistograms(DQMStore::IBooker &ibooker, const edm::Run &, const edm::EventSetup &) override
edm::InputTag theVertexCollectionTag_
edm::EDGetTokenT< reco::BeamSpot > theBeamSpot_
std::vector< Muon > MuonCollection
collection of Muon objects
edm::EDGetTokenT< reco::VertexCollection > theVertexCollection_
edm::EDGetTokenT< reco::MuonCollection > theMuonCollection_
edm::EDGetTokenT< reco::PFMETCollection > thePfMETCollection_
std::unique_ptr< GenericTriggerEventFlag > den_lep_genTriggerEventFlag_
edm::InputTag theElectronTag_
MonitorElement * h_lepPhiTurnOn_den_
edm::EDGetTokenT< reco::ConversionCollection > theConversionCollection_
Provides a code based selection for trigger and DCS information in order to have no failing filters i...
MonitorElement * h_pfHTTurnOn_num_
bool isTightMuon(const reco::Muon &, const reco::Vertex &)
bool isNonnull() const
Checks for non-null.
double lep_counting_threshold_
edm::InputTag theMuonTag_
JetFloatAssociation::Container JetTagCollection
MonitorElement * h_lepEtaTurnOn_den_
edm::EDGetTokenT< reco::PFJetCollection > thePfJetCollection_
MonitorElement * h_lepPtTurnOn_den_
bool isMediumMuon(const reco::Muon &, bool run2016_hip_mitigation=false)
edm::InputTag thePfMETTag_
std::vector< Electron > ElectronCollection
collectin of Electron objects
std::unique_ptr< T, impl::DeviceDeleter > unique_ptr
dqm::reco::MonitorElement MonitorElement
math::XYZPoint Point
point in the space
edm::InputTag theJetTagTag_
std::vector< PFJet > PFJetCollection
collection of PFJet objects
nels
1: loose, 2: medium, 3: tight
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
std::vector< double > htbins_
edm::EDGetTokenT< edm::View< reco::GsfElectron > > theElectronCollection_
MonitorElement * h_lepEtaTurnOn_num_
SuperClusterRef superCluster() const override
reference to a SuperCluster
MonitorElement * h_lepEtaPhiTurnOn_den_
edm::InputTag theBeamSpotTag_
MonitorElement * h_lepPhiTurnOn_num_
math::XYZPoint Point
point in the space
Abs< T >::type abs(const T &t)
edm::InputTag theElectronVIDTag_
const PflowIsolationVariables & pfIsolationVariables() const
edm::InputTag theConversionCollectionTag_
static constexpr float d0
float sumChargedHadronPt
sum-pt of charged Hadron // old float chargedHadronIso ;
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
edm::EDGetTokenT< edm::ValueMap< bool > > theElectronVIDMap_
const bool requireValidHLTPaths_