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);
91 int ntrigs = triggerResults.
size();
92 if (_verbose)
std::cout <<
"ntrigs=" << ntrigs << std::endl;
102 for (
unsigned int i=0;
i!=HLTPathsJetMBByName_.size();
i++) {
103 unsigned int triggerIndex = triggerNames.
triggerIndex(HLTPathsJetMBByName_[
i]);
104 if (triggerIndex<triggerResults.
size()) {
105 if (triggerResults.
accept(triggerIndex)) {
111 if (HLTPathsJetMBByName_.size()==0) _trig_JetMB=triggerResults.
size()-1;
113 if (_trig_JetMB==0)
return;
121 iEvent.
getByLabel(theJetCollectionForHTMHTLabel, jetcoll);
135 for (reco::CaloJetCollection::const_iterator calojet = jetcoll->begin(); calojet!=jetcoll->end(); ++calojet){
136 if (calojet->pt()>_ptThreshold){
138 MHx += -1.*calojet->px();
139 MHy += -1.*calojet->py();
144 TVector2 *tv2 =
new TVector2(MHx,MHy);
156 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