51 HLTPathsJetMBByName_ =
parameters.getParameter<std::vector<std::string > >(
"HLTPathsJetMB");
54 _verbose =
parameters.getParameter<
int>(
"verbose");
55 _ptThreshold =
parameters.getParameter<
double>(
"ptThreshold");
57 jetME = dbe->
book1D(
"metReco",
"metReco", 4, 1, 5);
60 hNevents = dbe->
book1D(
"METTask_Nevents",
"METTask_Nevents", 1,0,1);
61 hNJets = dbe->
book1D(
"METTask_NJets",
"METTask_NJets", 100, 0, 100);
62 hMHx = dbe->
book1D(
"METTask_MHx",
"METTask_MHx", 500,-500,500);
63 hMHy = dbe->
book1D(
"METTask_MHy",
"METTask_MHy", 500,-500,500);
64 hMHT = dbe->
book1D(
"METTask_MHT",
"METTask_MHT", 500,0,1000);
65 hMHTPhi = dbe->
book1D(
"METTask_MhTPhi",
"METTask_MhTPhi", 80,-4,4);
66 hHT = dbe->
book1D(
"METTask_HT",
"METTask_HT", 500,0,2000);
89 int ntrigs = triggerResults.
size();
90 if (_verbose)
std::cout <<
"ntrigs=" << ntrigs << std::endl;
100 for (
unsigned int i=0;
i!=HLTPathsJetMBByName_.size();
i++) {
101 unsigned int triggerIndex = triggerNames.
triggerIndex(HLTPathsJetMBByName_[
i]);
102 if (triggerIndex<triggerResults.
size()) {
103 if (triggerResults.
accept(triggerIndex)) {
109 if (HLTPathsJetMBByName_.size()==0) _trig_JetMB=triggerResults.
size()-1;
111 if (_trig_JetMB==0)
return;
115 edm::LogInfo(
"CaloMetAnalyzer") <<
"TriggerResults::HLT not found, "
116 "automatically select events";
127 iEvent.
getByLabel(theJetCollectionForHTMHTLabel, jetcoll);
141 for (reco::CaloJetCollection::const_iterator calojet = jetcoll->begin(); calojet!=jetcoll->end(); ++calojet){
142 if (calojet->pt()>_ptThreshold){
144 MHx += -1.*calojet->px();
145 MHy += -1.*calojet->py();
150 TVector2 *tv2 =
new TVector2(MHx,MHy);
162 hMHTPhi->Fill(MHTPhi);
virtual edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
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.
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
static std::string const triggerResults("TriggerResults")
void beginJob(DQMStore *dbe)
Inizialize parameters for histo binning.
void setCurrentFolder(const std::string &fullpath)