29 me->setBinLabel(1,
"No CSV Reqs.");
30 me->setBinLabel(2,
"N_{CSVL} >= 1");
31 me->setBinLabel(3,
"N_{CSVL} >= 2");
32 me->setBinLabel(4,
"N_{CSVL} >= 3");
33 me->setBinLabel(5,
"N_{CSVL} >= 4");
34 me->setBinLabel(6,
"N_{CSVM} >= 1");
35 me->setBinLabel(7,
"N_{CSVM} >= 2");
36 me->setBinLabel(8,
"N_{CSVM} >= 3");
37 me->setBinLabel(9,
"N_{CSVM} >= 4");
38 me->setBinLabel(10,
"N_{CSVT} >= 1");
39 me->setBinLabel(11,
"N_{CSVT} >= 2");
40 me->setBinLabel(12,
"N_{CSVT} >= 3");
41 me->setBinLabel(13,
"N_{CSVT} >= 4");
52 float d0 = 0.0,
dz = 0.0;
55 edm::LogError(
"SUSY_HLT_SingleLepton") <<
"Could not read electron.gsfTrack().\n";
67 iso.sumChargedHadronPt +
std::max(0.0,
iso.sumNeutralHadronEt +
iso.sumPhotonEt - 0.5 *
iso.sumPUPt);
68 const float relisowithdb = absiso / el.
pt();
70 bool pass_conversion =
false;
74 edm::LogError(
"SUSY_HLT_SingleLepton") <<
"Electron conversion matching failed.\n";
80 edm::LogError(
"SUSY_HLT_SingleLepton") <<
"Could not read electron.superCluster().\n";
84 if (fabs(etasc) > 2.5) {
86 }
else if (fabs(etasc) > 1.479) {
91 if (sigmaietaieta > 0.0305)
95 if (fabs(
d0) > 0.0163)
97 if (fabs(
dz) > 0.5999)
99 if (fabs(ooemoop) > 0.1126)
101 if (relisowithdb > 0.2075)
103 if (!pass_conversion)
106 if (fabs(
dEtaIn) > 0.0091)
110 if (sigmaietaieta > 0.0106)
114 if (fabs(
d0) > 0.0126)
116 if (fabs(
dz) > 0.0116)
118 if (fabs(ooemoop) > 0.0609)
120 if (relisowithdb > 0.1649)
122 if (!pass_conversion)
129 if (!
mu.isGlobalMuon())
133 if (
mu.globalTrack().isNull()) {
134 edm::LogWarning(
"SUSY_HLT_SingleLepton") <<
"Could not read muon.globalTrack().\n";
137 if (
mu.globalTrack()->normalizedChi2() >= 10.)
139 if (
mu.globalTrack()->hitPattern().numberOfValidMuonHits() <= 0)
141 if (
mu.numberOfMatchedStations() <= 1)
143 if (
mu.muonBestTrack().isNull()) {
144 edm::LogWarning(
"SUSY_HLT_SingleLepton") <<
"Could not read muon.muonBestTrack().\n";
147 if (fabs(
mu.muonBestTrack()->dxy(pv_position)) >= 0.2)
149 if (fabs(
mu.muonBestTrack()->dz(pv_position)) >= 0.5)
151 if (
mu.innerTrack().isNull()) {
152 edm::LogWarning(
"SUSY_HLT_SingleLepton") <<
"Could not read muon.innerTrack().\n";
155 if (
mu.innerTrack()->hitPattern().numberOfValidPixelHits() <= 0)
157 if (
mu.innerTrack()->hitPattern().trackerLayersWithMeasurement() <= 5)
165 : theElectronTag_(ps.getParameter<
edm::
InputTag>(
"electronCollection")),
167 theMuonTag_(ps.getParameter<
edm::
InputTag>(
"muonCollection")),
169 thePfMETTag_(ps.getParameter<
edm::
InputTag>(
"pfMetCollection")),
171 thePfJetTag_(ps.getParameter<
edm::
InputTag>(
"pfJetCollection")),
173 theJetTagTag_(ps.getParameter<
edm::
InputTag>(
"jetTagCollection")),
176 theVertexCollectionTag_(ps.getParameter<
edm::
InputTag>(
"vertexCollection")),
178 theConversionCollectionTag_(ps.getParameter<
edm::
InputTag>(
"conversionCollection")),
180 theBeamSpotTag_(ps.getParameter<
edm::
InputTag>(
"beamSpot")),
181 theBeamSpot_(consumes<
reco::
BeamSpot>(theBeamSpotTag_)),
183 theLeptonFilterTag_(ps.getParameter<
edm::
InputTag>(
"leptonFilter")),
184 theHLTHTTag_(ps.getParameter<
edm::
InputTag>(
"hltHt")),
186 theHLTMETTag_(ps.getParameter<
edm::
InputTag>(
"hltMet")),
188 theHLTJetCollectionTag_(ps.getParameter<
edm::
InputTag>(
"hltJets")),
190 theHLTJetTagCollectionTag_(ps.getParameter<
edm::
InputTag>(
"hltJetTags")),
193 theTriggerResultsTag_(ps.getParameter<
edm::
InputTag>(
"triggerResults")),
195 theTrigSummaryTag_(ps.getParameter<
edm::
InputTag>(
"trigSummary")),
200 HLTProcess_(ps.getParameter<
std::
string>(
"hltProcess")),
202 triggerPath_(ps.getParameter<
std::
string>(
"triggerPath")),
203 triggerPathAuxiliary_(ps.getParameter<
std::
string>(
"triggerPathAuxiliary")),
204 triggerPathLeptonAuxiliary_(ps.getParameter<
std::
string>(
"triggerPathLeptonAuxiliary")),
206 csvlCut_(ps.getUntrackedParameter<double>(
"csvlCut")),
207 csvmCut_(ps.getUntrackedParameter<double>(
"csvmCut")),
208 csvtCut_(ps.getUntrackedParameter<double>(
"csvtCut")),
210 jetPtCut_(ps.getUntrackedParameter<double>(
"jetPtCut")),
211 jetEtaCut_(ps.getUntrackedParameter<double>(
"jetEtaCut")),
212 metCut_(ps.getUntrackedParameter<double>(
"metCut")),
213 htCut_(ps.getUntrackedParameter<double>(
"htCut")),
215 lep_pt_threshold_(ps.getUntrackedParameter<double>(
"leptonPtThreshold")),
216 ht_threshold_(ps.getUntrackedParameter<double>(
"htThreshold")),
217 met_threshold_(ps.getUntrackedParameter<double>(
"metThreshold")),
218 csv_threshold_(ps.getUntrackedParameter<double>(
"csvThreshold")),
220 h_triggerLepPt_(nullptr),
221 h_triggerLepEta_(nullptr),
222 h_triggerLepPhi_(nullptr),
226 h_leptonTurnOn_num_(nullptr),
227 h_leptonTurnOn_den_(nullptr),
228 h_pfHTTurnOn_num_(nullptr),
229 h_pfHTTurnOn_den_(nullptr),
230 h_pfMetTurnOn_num_(nullptr),
231 h_pfMetTurnOn_den_(nullptr),
232 h_CSVTurnOn_num_(nullptr),
233 h_CSVTurnOn_den_(nullptr),
234 h_btagTurnOn_num_(nullptr),
235 h_btagTurnOn_den_(nullptr) {
236 edm::LogInfo(
"SUSY_HLT_SingleLepton") <<
"Constructor SUSY_HLT_SingleLepton::SUSY_HLT_SingleLepton\n";
240 edm::LogInfo(
"SUSY_HLT_SingleLepton") <<
"Destructor SUSY_HLT_SingleLepton::~SUSY_HLT_SingleLepton\n";
247 edm::LogError(
"SUSY_HLT_SingleLepton") <<
"Initialization of HLTConfigProvider failed!!\n";
251 bool pathFound =
false;
262 edm::LogInfo(
"SUSY_HLT_SingleLepton") <<
"SUSY_HLT_SingleLepton::beginRun\n";
266 edm::LogInfo(
"SUSY_HLT_SingleLepton") <<
"SUSY_HLT_SingleLepton::bookHistograms\n";
279 if (is_mu && !is_ele) {
282 }
else if (is_ele && !is_mu) {
293 h_HT_ = ibooker.
book1D(
"HT",
";HLT HT [GeV];", 40, 0.0, 1000.0);
297 h_MET_ = ibooker.
book1D(
"MET",
";HLT MET [GeV];", 40, 0.0, 1000.0);
306 ibooker.
book1D(
"leptonTurnOn_num", (
"Numerator;Offline " + lepton +
" p_{T} [GeV];").c_str(), 30, 0.0, 150);
308 ibooker.
book1D(
"leptonTurnOn_den", (
"Denominator;Offline " + lepton +
" p_{T} [GeV];").c_str(), 30, 0.0, 150.0);
318 h_CSVTurnOn_num_ = ibooker.
book1D(
"CSVTurnOn_num",
"Numerator;Offline Max CSV Discriminant;", 20, 0.0, 1.0);
319 h_CSVTurnOn_den_ = ibooker.
book1D(
"CSVTurnOn_den",
"Denominator;Offline Max CSV Discriminant;", 20, 0.0, 1.0);
331 edm::LogInfo(
"SUSY_HLT_SingleLepton") <<
"SUSY_HLT_SingleLepton::analyze\n";
355 if (!HLTJetCollection.
isValid()) {
364 if (!HLTJetTagCollection.
isValid()) {
461 std::vector<float> ptLepton, etaLepton, phiLepton;
467 size_t ilep = 0, num_keys =
triggerSummary->filterKeys(filterIndex).size();
468 ptLepton.resize(num_keys);
469 etaLepton.resize(num_keys);
470 phiLepton.resize(num_keys);
481 ptLepton.at(ilep) = foundObject.
pt();
482 etaLepton.at(ilep) = foundObject.
eta();
483 phiLepton.at(ilep) = foundObject.
phi();
490 const float hlt_ht = ((HLTHT.
isValid() && !HLTHT->empty()) ? HLTHT->front().sumEt() : -1.0);
493 const float hlt_met = ((HLTMET.
isValid() && !HLTMET->empty()) ? HLTMET->front().pt() : -1.0);
498 float hlt_csv = -1.0;
499 if (HLTJetCollection.
isValid() && HLTJetTagCollection.
isValid()) {
500 for (
const auto &
jet : *HLTJetTagCollection) {
501 if (
jet.second > hlt_csv)
502 hlt_csv =
jet.second;
509 bool hasFired =
false;
510 bool hasFiredAuxiliary =
false;
511 bool hasFiredLeptonAuxiliary =
false;
514 for (
unsigned int hltIndex = 0; hltIndex <
trigNames.size(); ++hltIndex) {
520 hasFiredAuxiliary =
true;
522 hasFiredLeptonAuxiliary =
true;
548 unsigned num_csvl = 0;
549 unsigned num_csvm = 0;
550 unsigned num_csvt = 0;
553 const float CSV =
jet.second;
574 double lep_max_pt = -1.0;
590 if (
muon.pt() > lep_max_pt) {
591 lep_max_pt =
muon.pt();
618 if (lep_plateau && met_plateau && csv_plateau) {
626 if (lep_plateau && ht_plateau && csv_plateau) {
634 if (lep_plateau && ht_plateau && met_plateau) {
edm::InputTag theElectronTag_
edm::EDGetTokenT< edm::TriggerResults > theTriggerResults_
edm::InputTag theLeptonFilterTag_
std::string triggerPathLeptonAuxiliary_
edm::InputTag theConversionCollectionTag_
double pt() const final
transverse momentum
edm::InputTag theMuonTag_
virtual void setCurrentFolder(std::string const &fullpath)
void bookHistograms(DQMStore::IBooker &ibooker, const edm::Run &, const edm::EventSetup &) override
edm::EDGetTokenT< reco::MuonCollection > theMuonCollection_
edm::EDGetTokenT< reco::METCollection > theHLTMET_
edm::InputTag theTriggerResultsTag_
void dqmBeginRun(const edm::Run &run, const edm::EventSetup &e) override
HLTConfigProvider fHltConfig_
MonitorElement * h_triggerLepPt_
MonitorElement * h_pfMetTurnOn_den_
math::XYZPoint Point
point in the space
void analyze(const edm::Event &e, const edm::EventSetup &eSetup) override
MonitorElement * h_leptonTurnOn_num_
MonitorElement * h_CSVTurnOn_num_
MonitorElement * h_pfHTTurnOn_num_
JetFloatAssociation::Container JetTagCollection
Log< level::Error, false > LogError
std::vector< Vertex > VertexCollection
edm::EDGetTokenT< reco::JetTagCollection > theJetTagCollection_
MonitorElement * h_CSVTurnOn_den_
std::vector< GsfElectron > GsfElectronCollection
collection of GsfElectron objects
edm::EDGetTokenT< reco::CaloJetCollection > theHLTJetCollection_
std::vector< Conversion > ConversionCollection
collectin of Conversion objects
std::vector< Muon > MuonCollection
collection of Muon objects
float eSuperClusterOverP() const
edm::InputTag theHLTMETTag_
dqm::reco::DQMStore DQMStore
Single trigger physics object (e.g., an isolated muon)
edm::EDGetTokenT< reco::GsfElectronCollection > theElectronCollection_
GsfTrackRef gsfTrack() const override
reference to a GsfTrack
const PflowIsolationVariables & pfIsolationVariables() const
edm::InputTag theJetTagTag_
edm::InputTag thePfMETTag_
edm::EDGetTokenT< reco::ConversionCollection > theConversionCollection_
MonitorElement * h_btagTurnOn_den_
math::XYZPoint Point
point in the space
key
prepare the HTCondor submission files and eventually submit them
#define DEFINE_FWK_MODULE(type)
MonitorElement * h_triggerLepPhi_
edm::InputTag thePfJetTag_
bool isNull() const
Checks for null.
std::vector< Electron > ElectronCollection
collectin of Electron objects
float hcalOverEcal(const ShowerShape &ss, int depth) const
edm::EDGetTokenT< reco::JetTagCollection > theHLTJetTagCollection_
edm::InputTag theHLTJetCollectionTag_
edm::EDGetTokenT< reco::BeamSpot > theBeamSpot_
edm::InputTag theTrigSummaryTag_
float deltaPhiSuperClusterTrackAtVtx() const
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
Log< level::Info, false > LogInfo
edm::EDGetTokenT< reco::PFJetCollection > thePfJetCollection_
static const char *const trigNames[]
edm::InputTag theBeamSpotTag_
static constexpr float d0
float deltaEtaSuperClusterTrackAtVtx() const
MonitorElement * h_pfHTTurnOn_den_
dqm::legacy::MonitorElement MonitorElement
MonitorElement * h_triggerLepEta_
~SUSY_HLT_SingleLepton() override
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d'tor
MonitorElement * h_pfMetTurnOn_num_
edm::EDGetTokenT< reco::PFMETCollection > thePfMETCollection_
edm::EDGetTokenT< reco::VertexCollection > theVertexCollection_
const std::vector< std::string > & triggerNames() const
names of trigger paths
std::vector< PFJet > PFJetCollection
collection of PFJet objects
edm::InputTag theHLTHTTag_
std::string triggerPathAuxiliary_
MonitorElement * h_btagTurnOn_num_
Log< level::Warning, false > LogWarning
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
float full5x5_sigmaIetaIeta() const
MonitorElement * h_maxCSV_
SUSY_HLT_SingleLepton(const edm::ParameterSet &ps)
MonitorElement * h_leptonTurnOn_den_
edm::EDGetTokenT< reco::METCollection > theHLTHT_
SuperClusterRef superCluster() const override
reference to a SuperCluster
edm::InputTag theVertexCollectionTag_
std::vector< CaloJet > CaloJetCollection
collection of CaloJet objects
edm::EDGetTokenT< trigger::TriggerEvent > theTrigSummary_
edm::InputTag theHLTJetTagCollectionTag_