CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
METTesterPostProcessor.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: Validation/RecoMET
4 // Class: METTesterPostProcessor
5 //
6 // Original Author: "Matthias Weber"
7 // Created: Sun Feb 22 14:35:25 CET 2015
8 //
9 
13 
14 // Some switches
15 //
16 // constructors and destructor
17 //
19 {
20 }
21 
22 
24 {
25 }
26 
27 
28 // ------------ method called right after a run ends ------------
29 void
31 {
32  std::vector<std::string> subDirVec;
33  std::string RunDir="JetMET/METValidation/";
34  iget_.setCurrentFolder(RunDir);
35  met_dirs=iget_.getSubdirs();
36  //bin definition for resolution plot -> last bin contains overflow too, but for plotting purposes show up to 1 TeV only
37  int nBins = 11;
38  float bins[] = {0.,20.,40.,60.,80.,100.,150.,200.,300.,400.,500.,1000};
39  //loop over met subdirectories
40  for (int i=0; i<int(met_dirs.size()); i++) {
41  ibook_.setCurrentFolder(met_dirs[i]);
42  mMETDifference_GenMETTrue_METResolution = ibook_.book1D("METResolution_GenMETTrue_InMETBins","METResolution_GenMETTrue_InMETBins",nBins, bins);
43  FillMETRes(met_dirs[i],iget_);
44  }
45 }
46 
47 
49 {
50 
62 
63  mMETDifference_GenMETTrue_MET0to20 = iget.get(metdir+"/METResolution_GenMETTrue_MET0to20");
64  mMETDifference_GenMETTrue_MET20to40 = iget.get(metdir+"/METResolution_GenMETTrue_MET20to40");
65  mMETDifference_GenMETTrue_MET40to60 = iget.get(metdir+"/METResolution_GenMETTrue_MET40to60");
66  mMETDifference_GenMETTrue_MET60to80 = iget.get(metdir+"/METResolution_GenMETTrue_MET60to80");
67  mMETDifference_GenMETTrue_MET80to100 = iget.get(metdir+"/METResolution_GenMETTrue_MET80to100");
68  mMETDifference_GenMETTrue_MET100to150 = iget.get(metdir+"/METResolution_GenMETTrue_MET100to150");
69  mMETDifference_GenMETTrue_MET150to200 = iget.get(metdir+"/METResolution_GenMETTrue_MET150to200");
70  mMETDifference_GenMETTrue_MET200to300 = iget.get(metdir+"/METResolution_GenMETTrue_MET200to300");
71  mMETDifference_GenMETTrue_MET300to400 = iget.get(metdir+"/METResolution_GenMETTrue_MET300to400");
72  mMETDifference_GenMETTrue_MET400to500 = iget.get(metdir+"/METResolution_GenMETTrue_MET400to500");
73  mMETDifference_GenMETTrue_MET500 = iget.get(metdir+"/METResolution_GenMETTrue_MET500");
74  if(mMETDifference_GenMETTrue_MET0to20 && mMETDifference_GenMETTrue_MET0to20->getRootObject()){//check one object, if existing, then the remaining ME's exist too
75  //for genmet none of these ME's are filled
87 
88  //the error computation should be done in a postProcessor in the harvesting step otherwise the histograms will be just summed
100  }
101 }
int i
Definition: DBlmapReader.cc:9
void setBinContent(int binx, double content)
set content of bin (1-D)
virtual void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &)
std::vector< std::string > met_dirs
MonitorElement * mMETDifference_GenMETTrue_MET20to40
MonitorElement * get(const std::string &path)
Definition: DQMStore.cc:301
double getMean(int axis=1) const
get mean value of histogram along x, y or z axis (axis=1, 2, 3 respectively)
MonitorElement * mMETDifference_GenMETTrue_MET200to300
MonitorElement * mMETDifference_GenMETTrue_MET300to400
MonitorElement * mMETDifference_GenMETTrue_MET0to20
MonitorElement * mMETDifference_GenMETTrue_MET60to80
MonitorElement * mMETDifference_GenMETTrue_MET80to100
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
void setBinError(int binx, double error)
set uncertainty on content of bin (1-D)
MonitorElement * mMETDifference_GenMETTrue_MET400to500
MonitorElement * mMETDifference_GenMETTrue_MET150to200
TObject * getRootObject(void) const
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:273
MonitorElement * mMETDifference_GenMETTrue_MET500
MonitorElement * mMETDifference_GenMETTrue_METResolution
std::vector< std::string > getSubdirs(void)
Definition: DQMStore.cc:305
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:329
MonitorElement * mMETDifference_GenMETTrue_MET40to60
double getRMS(int axis=1) const
get RMS of histogram along x, y or z axis (axis=1, 2, 3 respectively)
METTesterPostProcessor(const edm::ParameterSet &)
void FillMETRes(std::string metdir, DQMStore::IGetter &)
MonitorElement * mMETDifference_GenMETTrue_MET100to150