Skip to content

Commit

Permalink
Backport from 76X (cms-sw#10907,cms-sw#10974,cms-sw#11046)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryo Yonamine committed Aug 31, 2015
1 parent 9777212 commit 2d8cf42
Show file tree
Hide file tree
Showing 28 changed files with 141 additions and 41 deletions.
4 changes: 4 additions & 0 deletions HLTriggerOffline/Exotica/interface/HLTExoticaPlotter.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ class HLTExoticaPlotter {
std::vector<double> _parametersTurnOnSumEt;
std::vector<double> _parametersDxy;

// flag to switch off
bool _drop_pt2;
bool _drop_pt3;

std::map<std::string, MonitorElement *> _elements;
};
#endif
8 changes: 8 additions & 0 deletions HLTriggerOffline/Exotica/interface/HLTExoticaSubAnalysis.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ class HLTExoticaSubAnalysis {
~HLTExoticaSubAnalysis();
void beginJob();
void beginRun(const edm::Run & iRun, const edm::EventSetup & iEventSetup);
void endRun();

/// Method to book all relevant histograms in the DQMStore.
/// Uses the IBooker interface for thread safety.
Expand Down Expand Up @@ -150,6 +151,10 @@ class HLTExoticaSubAnalysis {
std::vector<double> _parametersTurnOnSumEt;
std::vector<double> _parametersDxy;

// flag to switch off
bool _drop_pt2;
bool _drop_pt3;

/// gen/rec objects cuts
std::map<unsigned int, std::string> _genCut;
std::map<unsigned int, std::string> _recCut;
Expand Down Expand Up @@ -178,6 +183,9 @@ class HLTExoticaSubAnalysis {
/// The plotters: managers of each hlt path where the plots are done
std::vector<HLTExoticaPlotter> _plotters;

/// counting HLT passed events
std::map<std::string,int> _triggerCounter;

/// Interface to the HLT information
HLTConfigProvider _hltConfig;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@

DiPhotonPSet = cms.PSet(
hltPathsToCheck = cms.vstring(
"HLT_DoublePho85_v", # Run2 proposal
"HLT_DoublePhoton85_v", # Run2 proposal
"HLT_Photon36_R9Id85_OR_CaloId24b40e_Iso50T80L_Photon22_AND_HE10_R9Id65_Eta2_Mass15_v",
"HLT_Photon26_R9Id85_OR_CaloId24b40e_Iso50T80L_Photon16_AND_HE10_R9Id65_Eta2_Mass60_v",
"HLT_Photon42_R9Id85_OR_CaloId24b40e_Iso50T80L_Photon25_AND_HE10_R9Id65_Eta2_Mass15_v" #50ns backup menu
"HLT_Photon42_R9Id85_OR_CaloId24b40e_Iso50T80L_Photon25_AND_HE10_R9Id65_Eta2_Mass15_v", #50ns backup menu
"HLT_DoublePhoton40_v", # 0T
"HLT_DoublePhoton50_v" # 0T
#"HLT_DoublePhoton70_v" # Run1 (frozenHLT)
),
recElecLabel = cms.InputTag("gedGsfElectrons"),
Expand All @@ -16,4 +18,5 @@
parametersTurnOn = cms.vdouble( 0, 50, 100, 150, 200, 250, 300, 400, 500, 600, 700, 800, 900, 1000,
1100, 1200, 1500
),
dropPt3 = cms.bool(True),
)
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@
0, 10, 20, 30, 40, 50,
100, 150, 200, 250, 300, 350, 400, 450, 500, 550, 600
),
dropPt3 = cms.bool(True),
)
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,6 @@
145, 150, 155, 160,
165, 170, 175, 180,
185, 190, 195, 200),
dropPt2 = cms.bool(True),
dropPt3 = cms.bool(True),
)
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@
parametersTurnOn = cms.vdouble( 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50,
60, 70, 80, 100
),
dropPt3 = cms.bool(True),
)
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,7 @@
#185, 190, 195, 200),
0, 10, 20, 30, 40, 50,
100, 150, 200, 250, 300, 350, 400, 450, 500, 550, 600
)
),
dropPt2 = cms.bool(True),
dropPt3 = cms.bool(True),
)
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,5 @@
parametersTurnOn = cms.vdouble(
100, 150, 200, 250, 300, 350, 400, 450, 500, 550, 600
),
dropPt3 = cms.bool(True),
)
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,6 @@
145, 150, 155, 160,
165, 170, 175, 180,
185, 190, 195, 200),
dropPt2 = cms.bool(True),
dropPt3 = cms.bool(True),
)
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"HLT_PFHT650_WideJetMJJ900DEtaJJ1p5_v",
"HLT_PFHT650_WideJetMJJ950DEtaJJ1p5_v",
#"HLT_PFHT750_4Jet_v", # Run2
"HLT_PFHT750_4Jet_Pt50_v",
"HLT_PFHT750_4Jet_v",
"HLT_PFHT650_4Jet_v", # Run2
"HLT_PFHT550_4Jet_v", # Run2
#"HLT_PFHT900_v", # Run2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@
parametersTurnOn = cms.vdouble( 0, 50, 100, 150, 200, 250, 300, 400, 500, 600, 700, 800, 900, 1000,
1100, 1200, 1500
),
dropPt3 = cms.bool(True),
)
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@
parametersTurnOn = cms.vdouble( 0, 50, 100, 150, 200, 250, 300, 400, 500, 600, 700, 800, 900, 1000,
1100, 1200, 1500
),
dropPt3 = cms.bool(True),
)
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@
300, 400, 500, 600, 700, 800, 900, 1000,
1100, 1200, 1500
),
dropPt2 = cms.bool(True),
dropPt3 = cms.bool(True),
)
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"HLT_Photon165_HE10_v", # Run2 proposal
"HLT_Photon36_R9Id85_OR_CaloId24b40e_Iso50T80L_Photon31_AND_HE10_R9Id65_Mass10_v", # Run2 proposal
"HLT_Photon26_R9Id85_OR_CaloId24b40e_Iso50T80L_Photon16_AND_HE10_R9Id65_Mass60_v", # Run2 proposal
"HLT_Photon90_CaloIdL_PFHT600_v" #50ns backup menu
"HLT_Photon90_CaloIdL_PFHT500_v", #50ns backup menu
"HLT_Photon150_v" # 0T
#"HLT_Photon135_v" # Run1 (frozenHLT)
),
recPhotonLabel = cms.InputTag("gedPhotons"),
Expand All @@ -17,4 +18,5 @@
250, 300, 400, 500, 600, 700, 800, 900, 1000,
1100, 1200, 1500
),
dropPt3 = cms.bool(True),
)
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@
parametersTurnOn = cms.vdouble( 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50,
60, 70, 80, 100
),
dropPt3 = cms.bool(True),
)
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@
parametersTurnOn = cms.vdouble( 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50,
60, 70, 80, 100
),
dropPt3 = cms.bool(True),
)
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@
parametersTurnOn = cms.vdouble( 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50,
60, 70, 80, 100
),
dropPt3 = cms.bool(True),
)
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
hltPathsToCheck = cms.vstring(
"HLT_TrkMu15_DoubleTrkMu5NoFiltersNoVtx_v", #signal
"HLT_TrkMu17_DoubleTrkMu8NoFiltersNoVtx_v", #signal
"HLT_DiMuon0_Jpsi_Muon", # control
"HLT_Dimuon0_Jpsi_Muon_v", # control
"HLT_Mu17_TkMu8_DZ", # backup
"HLT_Mu17_Mu8_DZ" # backup
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#"HLT_MET80_v", # For debugging
#"HLT_MET85_Track50_dEdx3p6_v", # For debugging
"HLT_MET75_IsoTrk50_v",
"HLT_MET95_IsoTrk50_v",
"HLT_MET90_IsoTrk50_v",
"HLT_MET60_IsoTrk35_Loose_v"
),
recPFMETLabel = cms.InputTag("pfMet"),
Expand All @@ -31,5 +31,7 @@
300, 310, 320, 330, 340, 350, 360, 370, 380, 390,
400
),
dropPt2 = cms.bool(True),
dropPt3 = cms.bool(True),
)

Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,6 @@
400, 410, 420, 430, 440, 450, 460, 470, 480, 490,
500, 510, 520, 530, 540, 550, 560, 570, 580, 590, 600
),
dropPt2 = cms.bool(True),
dropPt3 = cms.bool(True),
)
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,6 @@
320, 340, 360, 380, 400,
420, 440, 460, 480, 500,600,700,800,900,1100,1200,
1400,1600,1800,2000,2200,2400,2600,2800,3000),
dropPt2 = cms.bool(True),
dropPt3 = cms.bool(True),
)
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,6 @@
parametersTurnOn = cms.vdouble( 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50,
60, 70, 80, 100
),
dropPt2 = cms.bool(True),
dropPt3 = cms.bool(True),
)
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
PhotonMETPSet = cms.PSet(
hltPathsToCheck = cms.vstring(
#"HLT_Photon135_PFMET100_NoiseCleaned_v"
"HLT_Photon135_PFMET100_JetIdCleaned_v"
"HLT_Photon135_PFMET100_JetIdCleaned_v",
"HLT_Photon125_v" # 0T
),
recPFMETLabel = cms.InputTag("pfMet"),
recPhotonLabel = cms.InputTag("gedPhotons"),
Expand All @@ -20,4 +21,6 @@
145, 150, 155, 160,
165, 170, 175, 180,
185, 190, 195, 200),
dropPt2 = cms.bool(True),
dropPt3 = cms.bool(True),
)
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
"HLT_PFMET170_HBHECleaned_v",
"HLT_PFMET170_JetIdCleaned_v",
"HLT_PFMET170_NoiseCleaned_v", # Run2
#"HLT_CaloMET200_NoiseCleaned_v"
"HLT_MET200_JetIdCleaned_v"
#"HLT_MET120_HBHENoiseCleaned_v" # Run1
"HLT_MET200_JetIdCleaned_v",
"HLT_MET100_JetIdCleaned_v", # 0T
"HLT_MET150_JetIdCleaned_v" # 0T
),
recPFMETLabel = cms.InputTag("pfMet"),
recCaloMETLabel = cms.InputTag("caloMet"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

SingleMuonPSet = cms.PSet(
hltPathsToCheck = cms.vstring(
"HLT_Mu45_e2p1_v", # Run 2
"HLT_Mu45_eta2p1_v", # Run 2
"HLT_Mu50_v", # Run 2
#50ns backup menu
"HLT_Mu55_v",
Expand All @@ -16,4 +16,6 @@
42, 44, 46, 48, 50, 52, 54, 56, 58, 60,
70, 80, 90, 100
),
dropPt2 = cms.bool(True),
dropPt3 = cms.bool(True),
)
29 changes: 20 additions & 9 deletions HLTriggerOffline/Exotica/src/HLTExoticaPlotter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,16 @@ HLTExoticaPlotter::HLTExoticaPlotter(const edm::ParameterSet & pset,
_parametersPhi(pset.getParameter<std::vector<double> >("parametersPhi")),
_parametersTurnOn(pset.getParameter<std::vector<double> >("parametersTurnOn")),
_parametersTurnOnSumEt(pset.getParameter<std::vector<double> >("parametersTurnOnSumEt")),
_parametersDxy(pset.getParameter<std::vector<double> >("parametersDxy"))
_parametersDxy(pset.getParameter<std::vector<double> >("parametersDxy")),
_drop_pt2(false),
_drop_pt3(false)
{
if (pset.exists("dropPt2")) {
_drop_pt2 = pset.getParameter<bool>("dropPt2");
}
if (pset.exists("dropPt3")) {
_drop_pt3 = pset.getParameter<bool>("dropPt3");
}
LogDebug("ExoticaValidation") << "In HLTExoticaPlotter::constructor()";
}

Expand Down Expand Up @@ -67,8 +75,8 @@ void HLTExoticaPlotter::plotterBookHistos(DQMStore::IBooker & iBooker,
continue;
} else {
bookHist(iBooker, source, objTypeStr, "MaxPt1");
bookHist(iBooker, source, objTypeStr, "MaxPt2");
bookHist(iBooker, source, objTypeStr, "MaxPt3");
if (!_drop_pt2) bookHist(iBooker, source, objTypeStr, "MaxPt2");
if (!_drop_pt3) bookHist(iBooker, source, objTypeStr, "MaxPt3");
bookHist(iBooker, source, objTypeStr, "Eta");
bookHist(iBooker, source, objTypeStr, "Phi");

Expand All @@ -86,8 +94,8 @@ void HLTExoticaPlotter::plotterBookHistos(DQMStore::IBooker & iBooker,
bookHist(iBooker, source, objTypeStr, "SumEt");
} else {
bookHist(iBooker, source, objTypeStr, "MaxPt1");
bookHist(iBooker, source, objTypeStr, "MaxPt2");
bookHist(iBooker, source, objTypeStr, "MaxPt3");
if (!_drop_pt2) bookHist(iBooker, source, objTypeStr, "MaxPt2");
if (!_drop_pt3) bookHist(iBooker, source, objTypeStr, "MaxPt3");
bookHist(iBooker, source, objTypeStr, "Eta");
bookHist(iBooker, source, objTypeStr, "Phi");

Expand Down Expand Up @@ -125,7 +133,10 @@ void HLTExoticaPlotter::analyze(const bool & isPassTrigger,
int counttotal = 0;

// 3 : pt1, pt2, pt3
const int totalobjectssize3 = 3 * countobjects.size();
int totalobjectssize = 1;
if (!_drop_pt2) totalobjectssize++;
if (!_drop_pt3) totalobjectssize++;
totalobjectssize *= countobjects.size();
// Fill the histos if pass the trigger (just the two with higher pt)
for (size_t j = 0; j < matches.size(); ++j) {
// Is this object owned by this trigger? If not we are not interested...
Expand Down Expand Up @@ -161,15 +172,15 @@ void HLTExoticaPlotter::analyze(const bool & isPassTrigger,
++(countobjects[objType]);
++counttotal;
}
else if (countobjects[objType] == 1) {
else if (countobjects[objType] == 1 && !_drop_pt2) {
if( !( TString(objTypeStr).Contains("MET") || TString(objTypeStr).Contains("MHT") ) ) {
this->fillHist(isPassTrigger, source, objTypeStr, "MaxPt2", pt);
}
// Filled the second high pt ...
++(countobjects[objType]);
++counttotal;
}
else if (countobjects[objType] == 2) {
else if (countobjects[objType] == 2 && !_drop_pt3) {
if( !( TString(objTypeStr).Contains("MET") || TString(objTypeStr).Contains("MHT") ) ) {
this->fillHist(isPassTrigger, source, objTypeStr, "MaxPt3", pt);
}
Expand All @@ -178,7 +189,7 @@ void HLTExoticaPlotter::analyze(const bool & isPassTrigger,
++counttotal;
}
else {
if (counttotal == totalobjectssize3) {
if (counttotal == totalobjectssize) {
break;
}
}
Expand Down
Loading

0 comments on commit 2d8cf42

Please sign in to comment.