48 _source =
parameters.getParameter<std::string>(
"Source");
53 HLTPathsJetMBByName_ =
parameters.getParameter<std::vector<std::string > >(
"HLTPathsJetMB");
56 _verbose =
parameters.getParameter<
int>(
"verbose");
57 _ptThreshold =
parameters.getParameter<
double>(
"ptThreshold");
59 jetME = dbe->
book1D(
"metReco",
"metReco", 4, 1, 5);
62 hNevents = dbe->
book1D(
"METTask_Nevents",
"METTask_Nevents", 1,0,1);
63 hNJets = dbe->
book1D(
"METTask_NJets",
"METTask_NJets", 100, 0, 100);
64 hMHx = dbe->
book1D(
"METTask_MHx",
"METTask_MHx", 500,-500,500);
65 hMHy = dbe->
book1D(
"METTask_MHy",
"METTask_MHy", 500,-500,500);
66 hMHT = dbe->
book1D(
"METTask_MHT",
"METTask_MHT", 500,0,1000);
67 hMHTPhi = dbe->
book1D(
"METTask_MhTPhi",
"METTask_MhTPhi", 80,-4,4);
68 hHT = dbe->
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;
117 edm::LogInfo(
"CaloMetAnalyzer") <<
"TriggerResults::HLT not found, "
118 "automatically select events";
129 iEvent.
getByLabel(theJetCollectionForHTMHTLabel, jetcoll);
143 for (reco::CaloJetCollection::const_iterator calojet = jetcoll->begin(); calojet!=jetcoll->end(); ++calojet){
144 if (calojet->pt()>_ptThreshold){
146 MHx += -1.*calojet->px();
147 MHy += -1.*calojet->py();
152 TVector2 *tv2 =
new TVector2(MHx,MHy);
164 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
void beginJob(DQMStore *dbe)
Inizialize parameters for histo binning.
void setCurrentFolder(const std::string &fullpath)