|
|
Go to the documentation of this file.
5 #include "Math/GenVector/VectorUtil.h"
14 : triggerEventObject_(
21 triggerTag_(ps.getUntrackedParameter<
std::
string>(
"DQMFolder",
"SingleJet")),
22 patternJetTrg_(ps.getUntrackedParameter<
std::
string>(
"PatternJetTrg",
"")),
23 patternMetTrg_(ps.getUntrackedParameter<
std::
string>(
"PatternMetTrg",
"")),
24 patternMuTrg_(ps.getUntrackedParameter<
std::
string>(
"PatternMuTrg",
"")),
37 bool foundMuTrg =
false;
39 bool changedConfig =
true;
47 edm::LogError(
"HLTJetMETValidation") <<
"Initialization of HLTConfigProvider failed!!";
52 for (
size_t j = 0;
j < validTriggerNames.size();
j++) {
54 if (TString(validTriggerNames[
j]).Contains(patternMu)) {
57 trgMuNm = validTriggerNames[
j];
61 if (TString(validTriggerNames[
j]).Contains(patternJet)) {
65 if (TString(validTriggerNames[
j]).Contains(patternMet)) {
71 for (
size_t it = 0; it <
hltTrgJet.size(); it++) {
72 if (it == 0 && foundMuTrg)
74 if (it == 0 && !foundMuTrg)
81 int itm(0), itpm(0), itmh(0), itpmh(0);
82 for (
size_t it = 0; it <
hltTrgMet.size(); it++) {
83 if (TString(
hltTrgMet[it]).Contains(
"PF")) {
84 if (TString(
hltTrgMet[it]).Contains(
"MHT")) {
94 if (TString(
hltTrgMet[it]).Contains(
"MET")) {
105 if (TString(
hltTrgMet[it]).Contains(
"MHT")) {
115 if (TString(
hltTrgMet[it]).Contains(
"MET")) {
137 for (
size_t it = 0; it <
hltTrgJet.size(); it++) {
144 _meHLTJetPt.push_back(iBooker.
book1D(
"_meHLTJetPt",
"Single HLT Jet Pt", 100, 0, 500));
145 _meHLTJetPtTrgMC.push_back(iBooker.
book1D(
"_meHLTJetPtTrgMC",
"Single HLT Jet Pt - HLT Triggered", 100, 0, 500));
146 _meHLTJetPtTrg.push_back(iBooker.
book1D(
"_meHLTJetPtTrg",
"Single HLT Jet Pt - HLT Triggered", 100, 0, 500));
148 iBooker.
book1D(
"_meHLTJetPtTrgLow",
"Single HLT Jet Pt - HLT Triggered Low", 100, 0, 500));
150 _meHLTJetEta.push_back(iBooker.
book1D(
"_meHLTJetEta",
"Single HLT Jet Eta", 100, -10, 10));
152 iBooker.
book1D(
"_meHLTJetEtaTrgMC",
"Single HLT Jet Eta - HLT Triggered", 100, -10, 10));
153 _meHLTJetEtaTrg.push_back(iBooker.
book1D(
"_meHLTJetEtaTrg",
"Single HLT Jet Eta - HLT Triggered", 100, -10, 10));
155 iBooker.
book1D(
"_meHLTJetEtaTrgLow",
"Single HLT Jet Eta - HLT Triggered Low", 100, -10, 10));
157 _meHLTJetPhi.push_back(iBooker.
book1D(
"_meHLTJetPhi",
"Single HLT Jet Phi", 100, -4., 4.));
159 iBooker.
book1D(
"_meHLTJetPhiTrgMC",
"Single HLT Jet Phi - HLT Triggered", 100, -4., 4.));
160 _meHLTJetPhiTrg.push_back(iBooker.
book1D(
"_meHLTJetPhiTrg",
"Single HLT Jet Phi - HLT Triggered", 100, -4., 4.));
162 iBooker.
book1D(
"_meHLTJetPhiTrgLow",
"Single HLT Jet Phi - HLT Triggered Low", 100, -4., 4.));
164 _meGenJetPt.push_back(iBooker.
book1D(
"_meGenJetPt",
"Single Generated Jet Pt", 100, 0, 500));
166 iBooker.
book1D(
"_meGenJetPtTrgMC",
"Single Generated Jet Pt - HLT Triggered", 100, 0, 500));
167 _meGenJetPtTrg.push_back(iBooker.
book1D(
"_meGenJetPtTrg",
"Single Generated Jet Pt - HLT Triggered", 100, 0, 500));
169 iBooker.
book1D(
"_meGenJetPtTrgLow",
"Single Generated Jet Pt - HLT Triggered Low", 100, 0, 500));
171 _meGenJetEta.push_back(iBooker.
book1D(
"_meGenJetEta",
"Single Generated Jet Eta", 100, -10, 10));
173 iBooker.
book1D(
"_meGenJetEtaTrgMC",
"Single Generated Jet Eta - HLT Triggered", 100, -10, 10));
175 iBooker.
book1D(
"_meGenJetEtaTrg",
"Single Generated Jet Eta - HLT Triggered", 100, -10, 10));
177 iBooker.
book1D(
"_meGenJetEtaTrgLow",
"Single Generated Jet Eta - HLT Triggered Low", 100, -10, 10));
179 _meGenJetPhi.push_back(iBooker.
book1D(
"_meGenJetPhi",
"Single Generated Jet Phi", 100, -4., 4.));
181 iBooker.
book1D(
"_meGenJetPhiTrgMC",
"Single Generated Jet Phi - HLT Triggered", 100, -4., 4.));
183 iBooker.
book1D(
"_meGenJetPhiTrg",
"Single Generated Jet Phi - HLT Triggered", 100, -4., 4.));
185 iBooker.
book1D(
"_meGenJetPhiTrgLow",
"Single Generated Jet Phi - HLT Triggered Low", 100, -4., 4.));
187 for (
size_t it = 0; it <
hltTrgMet.size(); it++) {
192 _meHLTMET.push_back(iBooker.
book1D(
"_meHLTMET",
"HLT Missing ET", 100, 0, 500));
193 _meHLTMETTrgMC.push_back(iBooker.
book1D(
"_meHLTMETTrgMC",
"HLT Missing ET - HLT Triggered", 100, 0, 500));
194 _meHLTMETTrg.push_back(iBooker.
book1D(
"_meHLTMETTrg",
"HLT Missing ET - HLT Triggered", 100, 0, 500));
195 _meHLTMETTrgLow.push_back(iBooker.
book1D(
"_meHLTMETTrgLow",
"HLT Missing ET - HLT Triggered Low", 100, 0, 500));
197 _meGenMET.push_back(iBooker.
book1D(
"_meGenMET",
"Generated Missing ET", 100, 0, 500));
198 _meGenMETTrgMC.push_back(iBooker.
book1D(
"_meGenMETTrgMC",
"Generated Missing ET - HLT Triggered", 100, 0, 500));
199 _meGenMETTrg.push_back(iBooker.
book1D(
"_meGenMETTrg",
"Generated Missing ET - HLT Triggered", 100, 0, 500));
201 iBooker.
book1D(
"_meGenMETTrgLow",
"Generated Missing ET - HLT Triggered Low", 100, 0, 500));
209 using namespace reco;
221 std::vector<bool> myTrigJ;
222 for (
size_t it = 0; it <
hltTrgJet.size(); it++)
223 myTrigJ.push_back(
false);
224 std::vector<bool> myTrigJLow;
226 myTrigJLow.push_back(
false);
227 std::vector<bool> myTrigM;
228 for (
size_t it = 0; it <
hltTrgMet.size(); it++)
229 myTrigM.push_back(
false);
230 std::vector<bool> myTrigMLow;
232 myTrigMLow.push_back(
false);
247 for (
size_t it = 0; it <
hltTrgJet.size(); it++) {
272 for (
size_t it = 0; it <
hltTrgMet.size(); it++) {
302 double pfJetPt = -1.;
303 double pfJetEta = -999.;
304 double pfJetPhi = -999.;
309 for (PFJetCollection::const_iterator
pf =
pfJets->begin();
pf !=
pfJets->end(); ++
pf) {
314 pfJetEta =
pf->eta();
315 pfJetPhi =
pf->phi();
316 for (
size_t it = 0; it <
hltTrgJet.size(); it++) {
326 if (myTrigJ[it] && myTrigJLow[it])
328 if (myTrigJ[it] && myTrigJLow[it])
330 if (myTrigJ[it] && myTrigJLow[it])
351 double genJetPt = -1.;
352 double genJetEta = -999.;
353 double genJetPhi = -999.;
360 genJetPt =
gen->pt();
361 genJetEta =
gen->eta();
362 genJetPhi =
gen->phi();
363 for (
size_t it = 0; it <
hltTrgJet.size(); it++) {
373 if (myTrigJ[it] && myTrigJLow[it])
375 if (myTrigJ[it] && myTrigJLow[it])
377 if (myTrigJ[it] && myTrigJLow[it])
402 typedef CaloMETCollection::const_iterator cmiter;
404 for (cmiter
i = recmet->begin();
i != recmet->end();
i++) {
406 for (
size_t it = 0; it <
hltTrgMet.size(); it++) {
408 if (myTrigM.size() > it && myTrigM[it])
410 if (myTrigM.size() > it && myTrigMLow.size() > it && myTrigM[it] && myTrigMLow[it])
412 if (myTrigMLow.size() > it && myTrigMLow[it])
427 typedef GenMETCollection::const_iterator cmiter;
430 for (
size_t it = 0; it <
hltTrgMet.size(); it++) {
432 if (myTrigM.size() > it && myTrigM[it])
434 if (myTrigM.size() > it && myTrigMLow.size() > it && myTrigM[it] && myTrigMLow[it])
436 if (myTrigMLow.size() > it && myTrigMLow[it])
452 for (
int itrig = 0; itrig != ntrigs; ++itrig) {
457 for (
int itrig = 0; itrig != ntrigs; ++itrig) {
std::vector< MonitorElement * > _meHLTJetEtaTrgMC
~HLTJetMETValidation() override
std::vector< MonitorElement * > _meHLTJetPt
std::vector< std::string > hltTrgJet
void dqmBeginRun(edm::Run const &iRun, edm::EventSetup const &iSetup) override
std::vector< GenJet > GenJetCollection
collection of GenJet objects
std::vector< MonitorElement * > _meGenJetEtaTrg
edm::EDGetTokenT< trigger::TriggerEventWithRefs > triggerEventObject_
InputTag of TriggerEventWithRefs to analyze.
std::map< std::string, bool >::iterator trig_iter
std::vector< MonitorElement * > _meHLTJetPtTrgLow
virtual void setCurrentFolder(std::string const &fullpath)
std::vector< MonitorElement * > _meHLTJetPhi
genmet
do same things for GEN
std::vector< MonitorElement * > _meGenJetPhiTrgLow
edm::EDGetTokenT< reco::CaloMETCollection > CaloMETColl
std::vector< MonitorElement * > _meGenJetPhiTrgMC
std::vector< MonitorElement * > _meHLTMETTrgMC
std::vector< MonitorElement * > _meHLTJetPhiTrgMC
std::string patternMetTrg_
std::vector< MonitorElement * > _meGenMETTrgLow
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
std::vector< MonitorElement * > _meHLTJetPtTrg
std::vector< MonitorElement * > _meHLTMETTrg
std::string patternJetTrg_
HLTJetMETValidation(const edm::ParameterSet &)
std::vector< MonitorElement * > _meGenJetPtTrg
std::vector< MonitorElement * > _meGenMETTrgMC
edm::EDGetTokenT< edm::TriggerResults > HLTriggerResults
void bookHistograms(DQMStore::IBooker &, edm::Run const &iRun, edm::EventSetup const &iSetup) override
static const std::string removeVersion(const std::string &trigger)
edm::EDGetTokenT< reco::PFJetCollection > PFJetAlgorithm
std::string patternMuTrg_
std::vector< MonitorElement * > _meGenJetPt
std::vector< std::string > hltTrgMet
std::vector< MonitorElement * > _meHLTMETTrgLow
std::vector< MonitorElement * > _meGenMET
std::vector< MonitorElement * > _meHLTJetPhiTrg
std::vector< MonitorElement * > _meHLTJetPhiTrgLow
std::vector< MonitorElement * > _meHLTJetEtaTrgLow
void analyze(const edm::Event &, const edm::EventSetup &) override
Container::value_type value_type
std::vector< MonitorElement * > _meGenJetPhi
Log< level::Error, false > LogError
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
std::vector< MonitorElement * > _meGenJetPhiTrg
std::vector< MonitorElement * > _meHLTJetEta
TLorentzVector genMet(const HepMC::GenEvent *all, double etamin=-9999., double etamax=9999.)
std::vector< std::string > hltTrgJetLow
std::map< std::string, bool > hltTriggerMap
std::vector< MonitorElement * > _meGenJetPtTrgMC
std::vector< MonitorElement * > _meHLTJetPtTrgMC
std::vector< MonitorElement * > _meGenMETTrg
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d'tor
std::vector< PFJet > PFJetCollection
collection of PFJet objects
std::vector< MonitorElement * > _meGenJetEtaTrgLow
std::vector< MonitorElement * > _meGenJetPtTrgLow
HLTConfigProvider hltConfig_
std::vector< MonitorElement * > _meGenJetEtaTrgMC
def gen(fragment, howMuch)
Production test section ####.
std::vector< MonitorElement * > _meHLTMET
std::vector< MonitorElement * > _meHLTJetEtaTrg
const std::vector< std::string > & triggerNames() const
names of trigger paths
edm::EDGetTokenT< reco::GenMETCollection > GenMETColl
std::vector< MonitorElement * > _meGenJetEta
std::vector< std::string > hltTrgMetLow
edm::EDGetTokenT< reco::GenJetCollection > GenJetAlgorithm
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
void getHLTResults(const edm::TriggerResults &, const edm::TriggerNames &triggerNames)