49 float d0 = 0.0,
dz = 0.0;
51 d0 = -(el.
gsfTrack()->dxy(pv_position));
54 edm::LogError(
"SUSY_HLT_SingleLepton") <<
"Could not read electron.gsfTrack().\n";
64 const float relisowithdb = absiso / el.
pt();
66 bool pass_conversion =
false;
71 edm::LogError(
"SUSY_HLT_SingleLepton") <<
"Electron conversion matching failed.\n";
80 edm::LogError(
"SUSY_HLT_SingleLepton") <<
"Could not read electron.superCluster().\n";
83 if (fabs(etasc) > 2.5) {
85 }
else if (fabs(etasc) > 1.479) {
86 if (fabs(dEtaIn) > 0.0106)
88 if (fabs(dPhiIn) > 0.0359)
90 if (sigmaietaieta > 0.0305)
94 if (fabs(d0) > 0.0163)
96 if (fabs(
dz) > 0.5999)
98 if (fabs(ooemoop) > 0.1126)
100 if (relisowithdb > 0.2075)
102 if (!pass_conversion)
105 if (fabs(dEtaIn) > 0.0091)
107 if (fabs(dPhiIn) > 0.031)
109 if (sigmaietaieta > 0.0106)
113 if (fabs(d0) > 0.0126)
115 if (fabs(
dz) > 0.0116)
117 if (fabs(ooemoop) > 0.0609)
119 if (relisowithdb > 0.1649)
121 if (!pass_conversion)
135 if (mu.
globalTrack()->hitPattern().numberOfValidMuonHits() <= 0)
138 edm::LogWarning(
"SUSY_HLT_SingleLepton") <<
"Could not read muon.globalTrack().\n";
149 edm::LogWarning(
"SUSY_HLT_SingleLepton") <<
"Could not read muon.muonBestTrack().\n";
153 if (mu.
innerTrack()->hitPattern().numberOfValidPixelHits() <= 0)
155 if (mu.
innerTrack()->hitPattern().trackerLayersWithMeasurement() <= 5)
158 edm::LogWarning(
"SUSY_HLT_SingleLepton") <<
"Could not read muon.innerTrack().\n";
166 : theElectronTag_(ps.getParameter<
edm::InputTag>(
"electronCollection")),
168 theMuonTag_(ps.getParameter<
edm::InputTag>(
"muonCollection")),
170 thePfMETTag_(ps.getParameter<
edm::InputTag>(
"pfMetCollection")),
172 thePfJetTag_(ps.getParameter<
edm::InputTag>(
"pfJetCollection")),
174 theJetTagTag_(ps.getParameter<
edm::InputTag>(
"jetTagCollection")),
177 theVertexCollectionTag_(ps.getParameter<
edm::InputTag>(
"vertexCollection")),
179 theConversionCollectionTag_(ps.getParameter<
edm::InputTag>(
"conversionCollection")),
181 theBeamSpotTag_(ps.getParameter<
edm::InputTag>(
"beamSpot")),
182 theBeamSpot_(consumes<
reco::
BeamSpot>(theBeamSpotTag_)),
184 theLeptonFilterTag_(ps.getParameter<
edm::InputTag>(
"leptonFilter")),
185 theHLTHTTag_(ps.getParameter<
edm::InputTag>(
"hltHt")),
187 theHLTMETTag_(ps.getParameter<
edm::InputTag>(
"hltMet")),
189 theHLTJetCollectionTag_(ps.getParameter<
edm::InputTag>(
"hltJets")),
191 theHLTJetTagCollectionTag_(ps.getParameter<
edm::InputTag>(
"hltJetTags")),
194 theTriggerResultsTag_(ps.getParameter<
edm::InputTag>(
"triggerResults")),
195 theTriggerResults_(consumes<
edm::TriggerResults>(theTriggerResultsTag_)),
196 theTrigSummaryTag_(ps.getParameter<
edm::InputTag>(
"trigSummary")),
197 theTrigSummary_(consumes<
trigger::TriggerEvent>(theTrigSummaryTag_)),
201 HLTProcess_(ps.getParameter<
std::
string>(
"hltProcess")),
203 triggerPath_(ps.getParameter<
std::
string>(
"triggerPath")),
204 triggerPathAuxiliary_(ps.getParameter<
std::
string>(
"triggerPathAuxiliary")),
205 triggerPathLeptonAuxiliary_(ps.getParameter<
std::
string>(
"triggerPathLeptonAuxiliary")),
207 csvlCut_(ps.getUntrackedParameter<double>(
"csvlCut")),
208 csvmCut_(ps.getUntrackedParameter<double>(
"csvmCut")),
209 csvtCut_(ps.getUntrackedParameter<double>(
"csvtCut")),
211 jetPtCut_(ps.getUntrackedParameter<double>(
"jetPtCut")),
212 jetEtaCut_(ps.getUntrackedParameter<double>(
"jetEtaCut")),
213 metCut_(ps.getUntrackedParameter<double>(
"metCut")),
214 htCut_(ps.getUntrackedParameter<double>(
"htCut")),
216 lep_pt_threshold_(ps.getUntrackedParameter<double>(
"leptonPtThreshold")),
217 ht_threshold_(ps.getUntrackedParameter<double>(
"htThreshold")),
218 met_threshold_(ps.getUntrackedParameter<double>(
"metThreshold")),
219 csv_threshold_(ps.getUntrackedParameter<double>(
"csvThreshold")),
237 edm::LogInfo(
"SUSY_HLT_SingleLepton") <<
"Constructor SUSY_HLT_SingleLepton::SUSY_HLT_SingleLepton\n";
241 edm::LogInfo(
"SUSY_HLT_SingleLepton") <<
"Destructor SUSY_HLT_SingleLepton::~SUSY_HLT_SingleLepton\n";
248 edm::LogError(
"SUSY_HLT_SingleLepton") <<
"Initialization of HLTConfigProvider failed!!\n";
252 bool pathFound =
false;
263 edm::LogInfo(
"SUSY_HLT_SingleLepton") <<
"SUSY_HLT_SingleLepton::beginRun\n";
267 edm::LogInfo(
"SUSY_HLT_SingleLepton") <<
"SUSY_HLT_SingleLepton::bookHistograms\n";
280 if (is_mu && !is_ele) {
283 }
else if (is_ele && !is_mu) {
294 h_HT_ = ibooker.
book1D(
"HT",
";HLT HT [GeV];", 40, 0.0, 1000.0);
298 h_MET_ = ibooker.
book1D(
"MET",
";HLT MET [GeV];", 40, 0.0, 1000.0);
307 ibooker.
book1D(
"leptonTurnOn_num", (
"Numerator;Offline " + lepton +
" p_{T} [GeV];").c_str(), 30, 0.0, 150);
309 ibooker.
book1D(
"leptonTurnOn_den", (
"Denominator;Offline " + lepton +
" p_{T} [GeV];").c_str(), 30, 0.0, 150.0);
319 h_CSVTurnOn_num_ = ibooker.
book1D(
"CSVTurnOn_num",
"Numerator;Offline Max CSV Discriminant;", 20, 0.0, 1.0);
320 h_CSVTurnOn_den_ = ibooker.
book1D(
"CSVTurnOn_den",
"Denominator;Offline Max CSV Discriminant;", 20, 0.0, 1.0);
332 edm::LogInfo(
"SUSY_HLT_SingleLepton") <<
"SUSY_HLT_SingleLepton::analyze\n";
356 if (!HLTJetCollection.
isValid()) {
365 if (!HLTJetTagCollection.
isValid()) {
375 if (!VertexCollection.
isValid()) {
385 if (!ConversionCollection.
isValid()) {
404 if (!pfMETCollection.
isValid()) {
413 if (!pfJetCollection.
isValid()) {
422 if (!jetTagCollection.
isValid()) {
431 if (!ElectronCollection.
isValid()) {
440 if (!MuonCollection.
isValid()) {
456 if (!triggerSummary.
isValid()) {
462 std::vector<float> ptLepton, etaLepton, phiLepton;
463 if (triggerSummary.
isValid()) {
467 if (!(filterIndex >= triggerSummary->
sizeFilters())) {
468 size_t ilep = 0, num_keys = triggerSummary->
filterKeys(filterIndex).size();
469 ptLepton.resize(num_keys);
470 etaLepton.resize(num_keys);
471 phiLepton.resize(num_keys);
472 for (
const auto &
key : triggerSummary->
filterKeys(filterIndex)) {
482 ptLepton.at(ilep) = foundObject.
pt();
483 etaLepton.at(ilep) = foundObject.
eta();
484 phiLepton.at(ilep) = foundObject.
phi();
491 const float hlt_ht = ((HLTHT.
isValid() && !HLTHT->empty()) ? HLTHT->front().sumEt() : -1.0);
494 const float hlt_met = ((HLTMET.
isValid() && !HLTMET->empty()) ? HLTMET->front().pt() : -1.0);
499 float hlt_csv = -1.0;
500 if (HLTJetCollection.
isValid() && HLTJetTagCollection.
isValid()) {
501 for (
const auto &
jet : *HLTJetTagCollection) {
502 if (
jet.second > hlt_csv)
503 hlt_csv =
jet.second;
510 bool hasFired =
false;
511 bool hasFiredAuxiliary =
false;
512 bool hasFiredLeptonAuxiliary =
false;
515 for (
unsigned int hltIndex = 0; hltIndex < trigNames.
size(); ++hltIndex) {
516 if (hltresults->
wasrun(hltIndex) && hltresults->
accept(hltIndex)) {
521 hasFiredAuxiliary =
true;
523 hasFiredLeptonAuxiliary =
true;
530 if (pfJetCollection.
isValid()) {
532 for (
const auto &pfjet : *pfJetCollection) {
543 if (pfMETCollection.
isValid() && !pfMETCollection->empty()) {
544 pfMET = pfMETCollection->front().et();
549 unsigned num_csvl = 0;
550 unsigned num_csvm = 0;
551 unsigned num_csvt = 0;
552 if (jetTagCollection.
isValid()) {
553 for (
const auto &
jet : *jetTagCollection) {
554 const float CSV =
jet.second;
575 double lep_max_pt = -1.0;
576 if (VertexCollection.
isValid() && !VertexCollection->empty()) {
579 for (
const auto &
electron : *ElectronCollection) {
588 if (MuonCollection.
isValid()) {
589 for (
const auto &
muon : *MuonCollection) {
590 if (IsGood(
muon, VertexCollection->front().position())) {
591 if (
muon.pt() > lep_max_pt) {
592 lep_max_pt =
muon.pt();
607 if (ht_plateau && met_plateau && csv_plateau && (pfMET >
metCut_ ||
metCut_ < 0.0) &&
619 if (lep_plateau && met_plateau && csv_plateau) {
627 if (lep_plateau && ht_plateau && csv_plateau) {
635 if (lep_plateau && ht_plateau && met_plateau) {
722 edm::LogInfo(
"SUSY_HLT_SingleLepton") <<
"SUSY_HLT_SingleLepton::endRun\n";
const PflowIsolationVariables & pfIsolationVariables() const
edm::InputTag theElectronTag_
GsfTrackRef gsfTrack() const override
reference to a GsfTrack
bool wasrun() const
Was at least one path run?
edm::EDGetTokenT< edm::TriggerResults > theTriggerResults_
edm::InputTag theLeptonFilterTag_
std::string triggerPathLeptonAuxiliary_
edm::InputTag theConversionCollectionTag_
trigger::size_type sizeFilters() const
float eSuperClusterOverP() const
edm::InputTag theMuonTag_
void bookHistograms(DQMStore::IBooker &ibooker, const edm::Run &, const edm::EventSetup &) override
virtual TrackRef innerTrack() const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::EDGetTokenT< reco::MuonCollection > theMuonCollection_
edm::EDGetTokenT< reco::METCollection > theHLTMET_
edm::InputTag theTriggerResultsTag_
bool accept() const
Has at least one path accepted the event?
void dqmBeginRun(const edm::Run &run, const edm::EventSetup &e) override
const std::vector< std::string > & triggerNames() const
names of trigger paths
const Keys & filterKeys(trigger::size_type index) const
void endRun(const edm::Run &run, const edm::EventSetup &eSetup) override
trigger::size_type filterIndex(const edm::InputTag &filterTag) const
find index of filter in data-member vector from filter tag
HLTConfigProvider fHltConfig_
void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
MonitorElement * h_triggerLepPt_
double pt() const final
transverse momentum
std::vector< Vertex > VertexCollection
collection of Vertex objects
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_
Strings::size_type size() const
MonitorElement * h_pfHTTurnOn_num_
JetFloatAssociation::Container JetTagCollection
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 full5x5_sigmaIetaIeta() const
edm::InputTag theHLTMETTag_
Single trigger physics object (e.g., an isolated muon)
edm::EDGetTokenT< reco::GsfElectronCollection > theElectronCollection_
float deltaEtaSuperClusterTrackAtVtx() const
edm::InputTag theJetTagTag_
#define DEFINE_FWK_MODULE(type)
virtual TrackRef muonBestTrack() const
void setCurrentFolder(std::string const &fullpath)
edm::InputTag thePfMETTag_
bool isGlobalMuon() const override
const TriggerObjectCollection & getObjects() const
edm::EDGetTokenT< reco::ConversionCollection > theConversionCollection_
MonitorElement * h_btagTurnOn_den_
float deltaPhiSuperClusterTrackAtVtx() const
float hcalOverEcal() const
MonitorElement * book1D(Args &&...args)
math::XYZPoint Point
point in the space
MonitorElement * h_triggerLepPhi_
edm::InputTag thePfJetTag_
std::vector< Electron > ElectronCollection
collectin of Electron objects
edm::EDGetTokenT< reco::JetTagCollection > theHLTJetTagCollection_
edm::InputTag theHLTJetCollectionTag_
edm::EDGetTokenT< reco::BeamSpot > theBeamSpot_
int numberOfMatchedStations(ArbitrationType type=SegmentAndTrackArbitration) const
edm::InputTag theTrigSummaryTag_
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
edm::EDGetTokenT< reco::PFJetCollection > thePfJetCollection_
static const char *const trigNames[]
edm::InputTag theBeamSpotTag_
MonitorElement * h_pfHTTurnOn_den_
std::string const & triggerName(unsigned int index) const
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_
std::vector< PFJet > PFJetCollection
collection of PFJet objects
edm::InputTag theHLTHTTag_
SuperClusterRef superCluster() const override
reference to a SuperCluster
std::string triggerPathAuxiliary_
MonitorElement * h_btagTurnOn_num_
const Point & position() const
position
float sumChargedHadronPt
sum-pt of charged Hadron // old float chargedHadronIso ;
MonitorElement * h_maxCSV_
SUSY_HLT_SingleLepton(const edm::ParameterSet &ps)
MonitorElement * h_leptonTurnOn_den_
edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const override
edm::EDGetTokenT< reco::METCollection > theHLTHT_
edm::InputTag theVertexCollectionTag_
std::vector< CaloJet > CaloJetCollection
collection of CaloJet objects
edm::EDGetTokenT< trigger::TriggerEvent > theTrigSummary_
virtual TrackRef globalTrack() const
reference to Track reconstructed in both tracked and muon detector
edm::InputTag theHLTJetTagCollectionTag_