54 HLTPathsJetMBByName_ =
parameters.getParameter<std::vector<std::string > >(
"HLTPathsJetMB");
57 _verbose =
parameters.getParameter<
int>(
"verbose");
58 _ptThreshold =
parameters.getParameter<
double>(
"ptThreshold");
60 jetME = ibooker.
book1D(
"metReco",
"metReco", 4, 1, 5);
63 hNevents = ibooker.
book1D(
"METTask_Nevents",
"METTask_Nevents", 1,0,1);
64 hNJets = ibooker.
book1D(
"METTask_NJets",
"METTask_NJets", 100, 0, 100);
65 hMHx = ibooker.
book1D(
"METTask_MHx",
"METTask_MHx", 500,-500,500);
66 hMHy = ibooker.
book1D(
"METTask_MHy",
"METTask_MHy", 500,-500,500);
67 hMHT = ibooker.
book1D(
"METTask_MHT",
"METTask_MHT", 500,0,1000);
68 hMHTPhi = ibooker.
book1D(
"METTask_MhTPhi",
"METTask_MhTPhi", 80,-4,4);
69 hHT = ibooker.
book1D(
"METTask_HT",
"METTask_HT", 500,0,2000);
92 int ntrigs = triggerResults.
size();
93 if (_verbose)
std::cout <<
"ntrigs=" << ntrigs << std::endl;
103 for (
unsigned int i=0;
i!=HLTPathsJetMBByName_.size();
i++) {
104 unsigned int triggerIndex = triggerNames.
triggerIndex(HLTPathsJetMBByName_[
i]);
105 if (triggerIndex<triggerResults.
size()) {
106 if (triggerResults.
accept(triggerIndex)) {
112 if (HLTPathsJetMBByName_.size()==0) _trig_JetMB=triggerResults.
size()-1;
114 if (_trig_JetMB==0)
return;
118 edm::LogInfo(
"CaloMetAnalyzer") <<
"TriggerResults::HLT not found, "
119 "automatically select events";
130 iEvent.
getByLabel(theJetCollectionForHTMHTLabel, jetcoll);
144 for (reco::CaloJetCollection::const_iterator calojet = jetcoll->begin(); calojet!=jetcoll->end(); ++calojet){
145 if (calojet->pt()>_ptThreshold){
147 MHx += -1.*calojet->px();
148 MHy += -1.*calojet->py();
153 TVector2 *tv2 =
new TVector2(MHx,MHy);
165 hMHTPhi->Fill(MHTPhi);
virtual edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const
const std::string metname
HTMHTAnalyzer(const edm::ParameterSet &)
Constructor.
bool accept() const
Has at least one path accepted the event?
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)
void analyze(const edm::Event &, const edm::EventSetup &, const edm::TriggerResults &)
Get the analysis.
virtual ~HTMHTAnalyzer()
Destructor.
unsigned int triggerIndex(std::string const &name) const
unsigned int size() const
Get number of paths stored.
MonitorElement * book1D(Args &&...args)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
void setCurrentFolder(const std::string &fullpath)
static std::string const triggerResults("TriggerResults")
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override