29 bool isJetDir =
false;
30 bool isMetDir =
false;
39 edm::LogInfo(
"JetMETDQMPostProcessor") <<
"Cannot create DQMStore instance\n";
51 std::vector<std::string> subdirectories = dqm->
getSubdirs();
52 for(std::vector<std::string>::iterator
dir = subdirectories.begin() ;
dir!= subdirectories.end();
dir++ ){
57 if (TString(*dir).Contains(patternJet)) isJetDir =
true;
59 if (TString(*dir).Contains(patternMet)) isMetDir =
true;
62 TH1F* gmetTrg =
new TH1F(
"gmetTrg",
"gmetTrg",100,0,500);
63 TH1F* gmetTrg2 =
new TH1F(
"gmetTrg2",
"gmetTrg2",100,0,500);
64 TH1F* gmetTrgLow =
new TH1F(
"gmetTrgLow",
"gmetTrgLow",100,0,500);
65 TH1F* gmet =
new TH1F(
"gmet",
"gmet",100,0,500);
66 TH1F* rmetTrg =
new TH1F(
"rmetTrg",
"rmetTrg",100,0,500);
67 TH1F* rmetTrg2 =
new TH1F(
"rmetTrg2",
"rmetTrg2",100,0,500);
68 TH1F* rmetTrgLow =
new TH1F(
"rmetTrgLow",
"rmetTrgLow",100,0,500);
69 TH1F* rmet =
new TH1F(
"rmet",
"rmet",100,0,500);
71 TProfile* gmto =
new TProfile(
"_meTurnOngMET",
"Gen Missing ET Turn-On RelVal",100,0,500,0,1);
72 TProfile* gmtol =
new TProfile(
"_meTurnOngMETLow",
"Gen Missing ET Turn-On Data",100,0,500,0,1);
73 TProfile* rmto =
new TProfile(
"_meTurnOnrMET",
"Reco Missing ET Turn-On RelVal",100,0,500,0,1);
74 TProfile* rmtol =
new TProfile(
"_meTurnOnrMETLow",
"Reco Missing ET Turn-On Data",100,0,500,0,1);
78 gmetTrg->Add(dqm->
get(dqm->
pwd() +
"/_meGenMETTrgMC")->
getTH1F(),1);
80 gmetTrg2->Add(dqm->
get(dqm->
pwd() +
"/_meGenMETTrg")->
getTH1F(),1);
82 gmetTrgLow->Add(dqm->
get(dqm->
pwd() +
"/_meGenMETTrgLow")->
getTH1F(),1);
86 gmetTrg->Divide(gmetTrg,gmet,1,1,
"B");
87 gmetTrg2->Divide(gmetTrg2,gmetTrgLow,1,1,
"B");
89 rmetTrg->Add(dqm->
get(dqm->
pwd() +
"/_meRecoMETTrgMC")->
getTH1F(),1);
91 rmetTrg2->Add(dqm->
get(dqm->
pwd() +
"/_meRecoMETTrg")->
getTH1F(),1);
93 rmetTrgLow->Add(dqm->
get(dqm->
pwd() +
"/_meRecoMETTrgLow")->
getTH1F(),1);
97 rmetTrg->Divide(rmetTrg,rmet,1,1,
"B");
98 rmetTrg2->Divide(rmetTrg2,rmetTrgLow,1,1,
"B");
100 for (
int ib=0;ib<100;ib++) {
102 val = gmetTrg->GetBinContent(ib+1);
103 gmto->SetBinContent(ib+1,val);
104 gmto->SetBinEntries(ib+1,1);
105 err = gmetTrg->GetBinError(ib+1);
106 gmto->SetBinError(ib+1,
sqrt(err*err+val*val));
108 val = gmetTrg2->GetBinContent(ib+1);
109 gmtol->SetBinContent(ib+1,val);
110 gmtol->SetBinEntries(ib+1,1);
111 err = gmetTrg2->GetBinError(ib+1);
112 gmtol->SetBinError(ib+1,
sqrt(err*err+val*val));
114 val = rmetTrg->GetBinContent(ib+1);
115 rmto->SetBinContent(ib+1,val);
116 rmto->SetBinEntries(ib+1,1);
117 err = rmetTrg->GetBinError(ib+1);
118 rmto->SetBinError(ib+1,
sqrt(err*err+val*val));
120 val = rmetTrg2->GetBinContent(ib+1);
121 rmtol->SetBinContent(ib+1,val);
122 rmtol->SetBinEntries(ib+1,1);
123 err = rmetTrg2->GetBinError(ib+1);
124 rmtol->SetBinError(ib+1,
sqrt(err*err+val*val));
126 dqm->
bookProfile(
"Gen Missing ET Turn-On RelVal",gmto);
127 dqm->
bookProfile(
"Gen Missing ET Turn-On Data",gmtol);
128 dqm->
bookProfile(
"Reco Missing ET Turn-On RelVal",rmto);
129 dqm->
bookProfile(
"Reco Missing ET Turn-On Data",rmtol);
146 TH1F* gjetTrg =
new TH1F(
"gjetTrg",
"gjetTrg",100,0,500);
147 TH1F* gjetTrg2 =
new TH1F(
"gjetTrg2",
"gjetTrg2",100,0,500);
148 TH1F* gjetTrgLow =
new TH1F(
"gjetTrgLow",
"gjetTrgLow",100,0,500);
149 TH1F* gjet =
new TH1F(
"gjet",
"gjet",100,0,500);
150 TH1F* gjetEtaTrg =
new TH1F(
"gjetEtaTrg",
"gjetEtaTrg",100,-10,10);
151 TH1F* gjetEtaTrg2 =
new TH1F(
"gjetEtaTrg2",
"gjetEtaTrg2",100,-10,10);
152 TH1F* gjetEtaTrgLow =
new TH1F(
"gjetEtaTrgLow",
"gjetEtaTrgLow",100,-10,10);
153 TH1F* gjetEta =
new TH1F(
"gjetEta",
"gjetEta",100,-10,10);
154 TH1F* gjetPhiTrg =
new TH1F(
"gjetPhiTrg",
"gjetPhiTrg",100,-4,4);
155 TH1F* gjetPhiTrg2 =
new TH1F(
"gjetPhiTrg2",
"gjetPhiTrg2",100,-4,4);
156 TH1F* gjetPhiTrgLow =
new TH1F(
"gjetPhiTrgLow",
"gjetPhiTrgLow",100,-4,4);
157 TH1F* gjetPhi =
new TH1F(
"gjetPhi",
"gjetPhi",100,-4,4);
158 TH1F* rjetTrg =
new TH1F(
"rjetTrg",
"rjetTrg",100,0,500);
159 TH1F* rjetTrg2 =
new TH1F(
"rjetTrg2",
"rjetTrg2",100,0,500);
160 TH1F* rjetTrgLow =
new TH1F(
"rjetTrgLow",
"rjetTrgLow",100,0,500);
161 TH1F* rjet =
new TH1F(
"rjet",
"rjet",100,0,500);
162 TH1F* rjetEtaTrg =
new TH1F(
"rjetEtaTrg",
"rjetEtaTrg",100,-10,10);
163 TH1F* rjetEtaTrg2 =
new TH1F(
"rjetEtaTrg2",
"rjetEtaTrg2",100,-10,10);
164 TH1F* rjetEtaTrgLow =
new TH1F(
"rjetEtaTrgLow",
"rjetEtaTrgLow",100,-10,10);
165 TH1F* rjetEta =
new TH1F(
"rjetEta",
"rjetEta",100,-10,10);
166 TH1F* rjetPhiTrg =
new TH1F(
"rjetPhiTrg",
"rjetPhiTrg",100,-4,4);
167 TH1F* rjetPhiTrg2 =
new TH1F(
"rjetPhiTrg2",
"rjetPhiTrg2",100,-4,4);
168 TH1F* rjetPhiTrgLow =
new TH1F(
"rjetPhiTrgLow",
"rjetPhiTrgLow",100,-4,4);
169 TH1F* rjetPhi =
new TH1F(
"rjetPhi",
"rjetPhi",100,-4,4);
171 TProfile* gjto =
new TProfile(
"_meTurnOngJetPt",
"Gen Jet Pt Turn-On RelVal",100,0,500,0,1);
172 TProfile* gjtol =
new TProfile(
"_meTurnOngJetPtLow",
"Gen Jet Pt Turn-On Data",100,0,500,0,1);
173 TProfile* gjeto =
new TProfile(
"_meTurnOngJetEta",
"Gen Jet Eta Turn-On RelVal",100,-10,10,0,1);
174 TProfile* gjetol =
new TProfile(
"_meTurnOngJetEtaLow",
"Gen Jet Eta Turn-On Data",100,-10,10,0,1);
175 TProfile* gjpto =
new TProfile(
"_meTurnOngJetPhi",
"Gen Jet Phi Turn-On RelVal",100,-4,4,0,1);
176 TProfile* gjptol =
new TProfile(
"_meTurnOngJetPhiLow",
"Gen Jet Phi Turn-On Data",100,-4,4,0,1);
177 TProfile* rjto =
new TProfile(
"_meTurnOnrJetPt",
"Reco Jet Pt Turn-On RelVal",100,0,500,0,1);
178 TProfile* rjtol =
new TProfile(
"_meTurnOnrJetPtLow",
"Reco Jet Pt Turn-On Data",100,0,500,0,1);
179 TProfile* rjeto =
new TProfile(
"_meTurnOnrJetEta",
"Reco Jet Eta Turn-On RelVal",100,-10,10,0,1);
180 TProfile* rjetol =
new TProfile(
"_meTurnOnrJetEtaLow",
"Reco Jet Eta Turn-On Data",100,-10,10,0,1);
181 TProfile* rjpto =
new TProfile(
"_meTurnOnrJetPhi",
"Reco Jet Phi Turn-On RelVal",100,-4,4,0,1);
182 TProfile* rjptol =
new TProfile(
"_meTurnOnrJetPhiLow",
"Reco Jet Phi Turn-On Data",100,-4,4,0,1);
186 gjetTrg->Add(dqm->
get(dqm->
pwd() +
"/_meGenJetPtTrgMC")->
getTH1F(),1);
188 gjetTrg2->Add(dqm->
get(dqm->
pwd() +
"/_meGenJetPtTrg")->
getTH1F(),1);
190 gjetTrgLow->Add(dqm->
get(dqm->
pwd() +
"/_meGenJetPtTrgLow")->
getTH1F(),1);
192 gjet->Add(dqm->
get(dqm->
pwd() +
"/_meGenJetPt")->
getTH1F(),1);
194 gjetTrg->Divide(gjetTrg,gjet,1,1,
"B");
195 gjetTrg2->Divide(gjetTrg2,gjetTrgLow,1,1,
"B");
197 rjetTrg->Add(dqm->
get(dqm->
pwd() +
"/_meRecoJetPtTrgMC")->
getTH1F(),1);
199 rjetTrg2->Add(dqm->
get(dqm->
pwd() +
"/_meRecoJetPtTrg")->
getTH1F(),1);
201 rjetTrgLow->Add(dqm->
get(dqm->
pwd() +
"/_meRecoJetPtTrgLow")->
getTH1F(),1);
203 rjet->Add(dqm->
get(dqm->
pwd() +
"/_meRecoJetPt")->
getTH1F(),1);
205 rjetTrg->Divide(rjetTrg,rjet,1,1,
"B");
206 rjetTrg2->Divide(rjetTrg2,rjetTrgLow,1,1,
"B");
208 gjetEtaTrg->Add(dqm->
get(dqm->
pwd() +
"/_meGenJetEtaTrgMC")->
getTH1F(),1);
210 gjetEtaTrg2->Add(dqm->
get(dqm->
pwd() +
"/_meGenJetEtaTrg")->
getTH1F(),1);
211 gjetEtaTrg2->Sumw2();
212 gjetEtaTrgLow->Add(dqm->
get(dqm->
pwd() +
"/_meGenJetEtaTrgLow")->
getTH1F(),1);
213 gjetEtaTrgLow->Sumw2();
214 gjetEta->Add(dqm->
get(dqm->
pwd() +
"/_meGenJetEta")->
getTH1F(),1);
216 gjetEtaTrg->Divide(gjetEtaTrg,gjetEta,1,1,
"B");
217 gjetEtaTrg2->Divide(gjetEtaTrg2,gjetEtaTrgLow,1,1,
"B");
219 rjetEtaTrg->Add(dqm->
get(dqm->
pwd() +
"/_meRecoJetEtaTrgMC")->
getTH1F(),1);
221 rjetEtaTrg2->Add(dqm->
get(dqm->
pwd() +
"/_meRecoJetEtaTrg")->
getTH1F(),1);
222 rjetEtaTrg2->Sumw2();
223 rjetEtaTrgLow->Add(dqm->
get(dqm->
pwd() +
"/_meRecoJetEtaTrgLow")->
getTH1F(),1);
224 rjetEtaTrgLow->Sumw2();
225 rjetEta->Add(dqm->
get(dqm->
pwd() +
"/_meRecoJetEta")->
getTH1F(),1);
227 rjetEtaTrg->Divide(rjetEtaTrg,rjetEta,1,1,
"B");
228 rjetEtaTrg2->Divide(rjetEtaTrg2,rjetEtaTrgLow,1,1,
"B");
230 gjetPhiTrg->Add(dqm->
get(dqm->
pwd() +
"/_meGenJetPhiTrgMC")->
getTH1F(),1);
232 gjetPhiTrg2->Add(dqm->
get(dqm->
pwd() +
"/_meGenJetPhiTrg")->
getTH1F(),1);
233 gjetPhiTrg2->Sumw2();
234 gjetPhiTrgLow->Add(dqm->
get(dqm->
pwd() +
"/_meGenJetPhiTrgLow")->
getTH1F(),1);
235 gjetPhiTrgLow->Sumw2();
236 gjetPhi->Add(dqm->
get(dqm->
pwd() +
"/_meGenJetPhi")->
getTH1F(),1);
238 gjetPhiTrg->Divide(gjetPhiTrg,gjetPhi,1,1,
"B");
239 gjetPhiTrg2->Divide(gjetPhiTrg2,gjetPhiTrgLow,1,1,
"B");
241 rjetPhiTrg->Add(dqm->
get(dqm->
pwd() +
"/_meRecoJetPhiTrgMC")->
getTH1F(),1);
243 rjetPhiTrg2->Add(dqm->
get(dqm->
pwd() +
"/_meRecoJetPhiTrg")->
getTH1F(),1);
244 rjetPhiTrg2->Sumw2();
245 rjetPhiTrgLow->Add(dqm->
get(dqm->
pwd() +
"/_meRecoJetPhiTrgLow")->
getTH1F(),1);
246 rjetPhiTrgLow->Sumw2();
247 rjetPhi->Add(dqm->
get(dqm->
pwd() +
"/_meRecoJetPhi")->
getTH1F(),1);
249 rjetPhiTrg->Divide(rjetPhiTrg,rjetPhi,1,1,
"B");
250 rjetPhiTrg2->Divide(rjetPhiTrg2,rjetPhiTrgLow,1,1,
"B");
252 for (
int ib=0;ib<100;ib++) {
254 val = gjetTrg->GetBinContent(ib+1);
255 gjto->SetBinContent(ib+1,val);
256 gjto->SetBinEntries(ib+1,1);
257 err = gjetTrg->GetBinError(ib+1);
258 gjto->SetBinError(ib+1,
sqrt(err*err+val*val));
260 val = gjetTrg2->GetBinContent(ib+1);
261 gjtol->SetBinContent(ib+1,val);
262 gjtol->SetBinEntries(ib+1,1);
263 err = gjetTrg2->GetBinError(ib+1);
264 gjtol->SetBinError(ib+1,
sqrt(err*err+val*val));
266 val = rjetTrg->GetBinContent(ib+1);
267 rjto->SetBinContent(ib+1,val);
268 rjto->SetBinEntries(ib+1,1);
269 err = rjetTrg->GetBinError(ib+1);
270 rjto->SetBinError(ib+1,
sqrt(err*err+val*val));
272 val = rjetTrg2->GetBinContent(ib+1);
273 rjtol->SetBinContent(ib+1,val);
274 rjtol->SetBinEntries(ib+1,1);
275 err = rjetTrg2->GetBinError(ib+1);
276 rjtol->SetBinError(ib+1,
sqrt(err*err+val*val));
278 val = gjetEtaTrg->GetBinContent(ib+1);
279 gjeto->SetBinContent(ib+1,val);
280 gjeto->SetBinEntries(ib+1,1);
281 err = gjetEtaTrg->GetBinError(ib+1);
282 gjeto->SetBinError(ib+1,
sqrt(err*err+val*val));
284 val = gjetEtaTrg2->GetBinContent(ib+1);
285 gjetol->SetBinContent(ib+1,val);
286 gjetol->SetBinEntries(ib+1,1);
287 err = gjetEtaTrg2->GetBinError(ib+1);
288 gjetol->SetBinError(ib+1,
sqrt(err*err+val*val));
290 val = rjetEtaTrg->GetBinContent(ib+1);
291 rjeto->SetBinContent(ib+1,val);
292 rjeto->SetBinEntries(ib+1,1);
293 err = rjetEtaTrg->GetBinError(ib+1);
294 rjeto->SetBinError(ib+1,
sqrt(err*err+val*val));
296 val = rjetEtaTrg2->GetBinContent(ib+1);
297 rjetol->SetBinContent(ib+1,val);
298 rjetol->SetBinEntries(ib+1,1);
299 err = rjetEtaTrg2->GetBinError(ib+1);
300 rjetol->SetBinError(ib+1,
sqrt(err*err+val*val));
302 val = gjetPhiTrg->GetBinContent(ib+1);
303 gjpto->SetBinContent(ib+1,val);
304 gjpto->SetBinEntries(ib+1,1);
305 err = gjetPhiTrg->GetBinError(ib+1);
306 gjpto->SetBinError(ib+1,
sqrt(err*err+val*val));
308 val = gjetPhiTrg2->GetBinContent(ib+1);
309 gjptol->SetBinContent(ib+1,val);
310 gjptol->SetBinEntries(ib+1,1);
311 err = gjetPhiTrg2->GetBinError(ib+1);
312 gjptol->SetBinError(ib+1,
sqrt(err*err+val*val));
314 val = rjetPhiTrg->GetBinContent(ib+1);
315 rjpto->SetBinContent(ib+1,val);
316 rjpto->SetBinEntries(ib+1,1);
317 err = rjetPhiTrg->GetBinError(ib+1);
318 rjpto->SetBinError(ib+1,
sqrt(err*err+val*val));
320 val = rjetPhiTrg2->GetBinContent(ib+1);
321 rjptol->SetBinContent(ib+1,val);
322 rjptol->SetBinEntries(ib+1,1);
323 err = rjetPhiTrg2->GetBinError(ib+1);
324 rjptol->SetBinError(ib+1,
sqrt(err*err+val*val));
326 dqm->
bookProfile(
"Gen Jet Pt Turn-On RelVal",gjto);
328 dqm->
bookProfile(
"Reco Jet Pt Turn-On RelVal",rjto);
329 dqm->
bookProfile(
"Reco Jet Pt Turn-On Data",rjtol);
330 dqm->
bookProfile(
"Gen Jet Eta Turn-On RelVal",gjeto);
331 dqm->
bookProfile(
"Gen Jet Eta Turn-On Data",gjetol);
332 dqm->
bookProfile(
"Reco Jet Eta Turn-On RelVal",rjeto);
333 dqm->
bookProfile(
"Reco Jet Eta Turn-On Data",rjetol);
334 dqm->
bookProfile(
"Gen Jet Phi Turn-On RelVal",gjpto);
335 dqm->
bookProfile(
"Gen Jet Phi Turn-On Data",gjptol);
336 dqm->
bookProfile(
"Reco Jet Phi Turn-On RelVal",rjpto);
337 dqm->
bookProfile(
"Reco Jet Phi Turn-On Data",rjptol);
360 delete gjetEtaTrgLow;
364 delete rjetEtaTrgLow;
368 delete gjetPhiTrgLow;
372 delete rjetPhiTrgLow;
std::string patternJetTrg_
T getUntrackedParameter(std::string const &, T const &) const
void endRun(edm::Run const &, edm::EventSetup const &)
std::vector< std::string > getSubdirs(void) const
void cd(void)
go to top directory (ie. root)
#define DEFINE_FWK_MODULE(type)
JetMETDQMPostProcessor(const edm::ParameterSet &pset)
std::string patternMetTrg_
TH1F * getTH1F(std::string name, std::string process, std::string rootfolder, DQMStore *dbe_, bool verb, bool clone)
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
bool dirExists(const std::string &path) const
true if directory exists
void goUp(void)
equivalent to "cd .."
const std::string & pwd(void) const