|
|
Go to the documentation of this file.
128 const double lep_counting_threshold,
129 const double lep_iso_cut,
130 const double lep_eta_cut,
131 const double d0_cut_b,
132 const double dz_cut_b,
133 const double d0_cut_e,
134 const double dz_cut_e) {
147 const float relisowithdb = absiso / el.
pt();
148 if (relisowithdb > lep_iso_cut)
152 bool pass_conversion =
false;
156 edm::LogError(
"LepHTMonitor") <<
"Electron conversion matching failed.\n";
158 if (!pass_conversion)
162 float d0 = 999.,
dz = 999.;
167 edm::LogError(
"LepHTMonitor") <<
"Could not read electron.gsfTrack().\n";
186 const double lep_counting_threshold,
187 const double lep_iso_cut,
188 const double lep_eta_cut,
195 if (
mu.pt() < lep_counting_threshold ||
std::abs(
mu.eta()) > lep_eta_cut)
199 auto const &iso =
mu.pfIsolationR04();
201 iso.sumChargedHadronPt +
std::max(0.0, iso.sumNeutralHadronEt + iso.sumPhotonEt - 0.5 * iso.sumPUPt);
202 const float relisowithdb = absiso /
mu.pt();
203 if (relisowithdb > lep_iso_cut)
207 bool pass_id =
false;
219 float d0 =
std::abs(
mu.muonBestTrack()->dxy(pv_position));
220 float dz =
std::abs(
mu.muonBestTrack()->dz(pv_position));
221 if (
d0 > d0_cut ||
dz > dz_cut)
249 ps.getParameter<
edm::
ParameterSet>(
"numGenericTriggerEventPSet"), consumesCollector(), *this)),
251 ps.getParameter<
edm::
ParameterSet>(
"den_lep_GenericTriggerEventPSet"), consumesCollector(), *this)),
253 ps.getParameter<
edm::
ParameterSet>(
"den_HT_GenericTriggerEventPSet"), consumesCollector(), *this)),
260 jetPtCut_(ps.getUntrackedParameter<double>(
"jetPtCut")),
261 jetEtaCut_(ps.getUntrackedParameter<double>(
"jetEtaCut")),
262 metCut_(ps.getUntrackedParameter<double>(
"metCut")),
263 htCut_(ps.getUntrackedParameter<double>(
"htCut")),
265 nmusCut_(ps.getUntrackedParameter<double>(
"nmus")),
266 nelsCut_(ps.getUntrackedParameter<double>(
"nels")),
269 lep_iso_cut_(ps.getUntrackedParameter<double>(
"lepIsoCut")),
270 lep_eta_cut_(ps.getUntrackedParameter<double>(
"lepEtaCut")),
271 lep_d0_cut_b_(ps.getUntrackedParameter<double>(
"lep_d0_cut_b")),
272 lep_dz_cut_b_(ps.getUntrackedParameter<double>(
"lep_dz_cut_b")),
273 lep_d0_cut_e_(ps.getUntrackedParameter<double>(
"lep_d0_cut_e")),
274 lep_dz_cut_e_(ps.getUntrackedParameter<double>(
"lep_dz_cut_e")),
281 etabins_min_(ps.getUntrackedParameter<double>(
"etabins_min")),
282 etabins_max_(ps.getUntrackedParameter<double>(
"etabins_max")),
283 phibins_min_(ps.getUntrackedParameter<double>(
"phibins_min")),
284 phibins_max_(ps.getUntrackedParameter<double>(
"phibins_max")),
285 npvbins_min_(ps.getUntrackedParameter<double>(
"npvbins_min")),
286 npvbins_max_(ps.getUntrackedParameter<double>(
"npvbins_max")),
298 edm::LogInfo(
"LepHTMonitor") <<
"Constructor LepHTMonitor::LepHTMonitor\n";
353 if (is_mu && !is_ele) {
356 }
else if (is_ele && !is_mu) {
362 vector<float> f_ptbins;
364 f_ptbins.push_back(static_cast<float>(ptbin));
365 vector<float> f_htbins;
367 f_htbins.push_back(static_cast<float>(htbin));
371 ibooker.
book1D(
"pfHTTurnOn_num",
"Numerator;Offline H_{T} [GeV];", f_htbins.size() - 1, f_htbins.data());
373 ibooker.
book1D(
"pfHTTurnOn_den",
"Denominator;Offline H_{T} [GeV];", f_htbins.size() - 1, f_htbins.data());
376 (
"Numerator;Offline " + lepton +
" p_{T} [GeV];").c_str(),
380 (
"Denominator;Offline " + lepton +
" p_{T} [GeV];").c_str(),
393 "Numerator;Offline lepton #eta;Offline lepton #phi;",
401 "Denominator;Offline lepton #eta;Offline lepton #phi;",
423 bool hasFired =
false;
424 bool hasFiredAuxiliary =
false;
425 bool hasFiredLeptonAuxiliary =
false;
427 hasFiredLeptonAuxiliary =
true;
429 hasFiredAuxiliary =
true;
433 if (!(hasFiredAuxiliary || hasFiredLeptonAuxiliary))
450 if (!ele_id_decisions.
isValid()) {
530 double lep_max_pt = -1.0;
533 double trailing_ele_eta = 0;
534 double trailing_ele_phi = 0;
535 double trailing_mu_eta = 0;
536 double trailing_mu_phi = 0;
537 double min_ele_pt = -1.0;
538 double min_mu_pt = -1.0;
548 bool pass_id = (*ele_id_decisions)[el];
566 if (
electron.pt() < min_ele_pt || min_ele_pt < 0) {
588 if (
muon.pt() > lep_max_pt) {
589 lep_max_pt =
muon.pt();
590 lep_eta =
muon.eta();
591 lep_phi =
muon.phi();
593 if (
muon.pt() < min_mu_pt || min_mu_pt < 0) {
594 min_mu_pt =
muon.pt();
595 trailing_mu_eta =
muon.eta();
596 trailing_mu_phi =
muon.phi();
605 float lep_pt = lep_max_pt;
610 lep_eta = trailing_mu_eta;
611 lep_phi = trailing_mu_phi;
615 lep_eta = trailing_ele_eta;
616 lep_phi = trailing_ele_phi;
619 if (min_ele_pt < min_mu_pt) {
621 lep_eta = trailing_ele_eta;
622 lep_phi = trailing_ele_phi;
625 lep_eta = trailing_mu_eta;
626 lep_phi = trailing_mu_phi;
634 if (hasFiredLeptonAuxiliary || !
e.isRealData()) {
669 if (hasFiredAuxiliary || !
e.isRealData()) {
670 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
Log< level::Info, false > LogInfo
const std::string folderName_
MonitorElement * h_NPVTurnOn_den_
std::unique_ptr< GenericTriggerEventFlag > den_HT_genTriggerEventFlag_
Log< level::Warning, false > LogWarning
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_
Log< level::Error, false > LogError
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_