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)) {
72 if (
it == 0 && foundMuTrg)
74 if (
it == 0 && !foundMuTrg)
81 int itm(0), itpm(0), itmh(0), itpmh(0);
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.));
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;
223 myTrigJ.push_back(
false);
224 std::vector<bool> myTrigJLow;
226 myTrigJLow.push_back(
false);
227 std::vector<bool> myTrigM;
229 myTrigM.push_back(
false);
230 std::vector<bool> myTrigMLow;
232 myTrigMLow.push_back(
false);
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();
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();
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++) {
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;
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< std::string > hltTrgMet
std::vector< MonitorElement * > _meHLTMETTrgMC
std::vector< MonitorElement * > _meGenJetPhiTrgLow
std::vector< MonitorElement * > _meHLTJetPtTrgLow
std::vector< MonitorElement * > _meHLTJetPhiTrg
std::vector< std::string > hltTrgJet
virtual void setCurrentFolder(std::string const &fullpath)
void bookHistograms(DQMStore::IBooker &, edm::Run const &iRun, edm::EventSetup const &iSetup) override
genmet
do same things for GEN
std::vector< GenJet > GenJetCollection
collection of GenJet objects
std::vector< MonitorElement * > _meHLTMETTrg
std::vector< MonitorElement * > _meHLTJetEta
std::vector< MonitorElement * > _meHLTJetEtaTrg
std::vector< MonitorElement * > _meGenJetEta
std::string patternMetTrg_
std::string patternJetTrg_
void dqmBeginRun(edm::Run const &iRun, edm::EventSetup const &iSetup) override
std::vector< MonitorElement * > _meGenMETTrg
std::vector< std::string > hltTrgMetLow
std::vector< MonitorElement * > _meGenJetEtaTrg
edm::EDGetTokenT< reco::GenMETCollection > GenMETColl
Log< level::Error, false > LogError
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
HLTJetMETValidation(const edm::ParameterSet &)
static const std::string removeVersion(const std::string &trigger)
std::vector< MonitorElement * > _meHLTJetPt
std::vector< MonitorElement * > _meGenJetPtTrg
std::vector< MonitorElement * > _meGenJetPt
std::vector< MonitorElement * > _meHLTJetPhi
std::vector< MonitorElement * > _meHLTJetPtTrg
std::vector< MonitorElement * > _meGenJetPhiTrg
Container::value_type value_type
edm::EDGetTokenT< edm::TriggerResults > HLTriggerResults
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
std::vector< MonitorElement * > _meGenMETTrgMC
std::vector< MonitorElement * > _meHLTJetPtTrgMC
std::vector< MonitorElement * > _meGenJetPtTrgMC
std::vector< MonitorElement * > _meGenMET
std::vector< MonitorElement * > _meHLTMETTrgLow
def gen(fragment, howMuch)
Event to runs.
std::vector< MonitorElement * > _meHLTJetEtaTrgLow
edm::EDGetTokenT< reco::PFJetCollection > PFJetAlgorithm
std::string patternMuTrg_
void getHLTResults(const edm::TriggerResults &, const edm::TriggerNames &triggerNames)
std::vector< MonitorElement * > _meHLTJetPhiTrgMC
edm::EDGetTokenT< reco::GenJetCollection > GenJetAlgorithm
std::vector< MonitorElement * > _meHLTJetPhiTrgLow
std::vector< MonitorElement * > _meGenJetEtaTrgLow
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d'tor
TLorentzVector genMet(const HepMC::GenEvent *all, double etamin=-9999., double etamax=9999.)
HLTConfigProvider hltConfig_
std::vector< MonitorElement * > _meGenJetPtTrgLow
std::map< std::string, bool > hltTriggerMap
const std::vector< std::string > & triggerNames() const
names of trigger paths
std::map< std::string, bool >::iterator trig_iter
std::vector< PFJet > PFJetCollection
collection of PFJet objects
void analyze(const edm::Event &, const edm::EventSetup &) override
std::vector< MonitorElement * > _meGenMETTrgLow
std::vector< MonitorElement * > _meHLTMET
edm::EDGetTokenT< trigger::TriggerEventWithRefs > triggerEventObject_
InputTag of TriggerEventWithRefs to analyze.
std::vector< std::string > hltTrgJetLow
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
~HLTJetMETValidation() override
std::vector< MonitorElement * > _meHLTJetEtaTrgMC
std::vector< MonitorElement * > _meGenJetEtaTrgMC
std::vector< MonitorElement * > _meGenJetPhi
edm::EDGetTokenT< reco::CaloMETCollection > CaloMETColl
std::vector< MonitorElement * > _meGenJetPhiTrgMC