CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DataCertificationJetMET.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: DQMOffline/JetMET
4 // Class: DataCertificationJetMET
5 //
6 // Original Author: "Frank Chlebana"
7 // Created: Sun Oct 5 13:57:25 CDT 2008
8 //
9 
13 
14 // Some switches
15 //
16 // constructors and destructor
17 //
19 {
20  // now do what ever initialization is needed
21  inputMETLabelRECO_=iConfig.getParameter<edm::InputTag>("METTypeRECO");
22  inputMETLabelMiniAOD_=iConfig.getParameter<edm::InputTag>("METTypeMiniAOD");
23  inputJetLabelRECO_=iConfig.getParameter<edm::InputTag>("JetTypeRECO");
24  inputJetLabelMiniAOD_=iConfig.getParameter<edm::InputTag>("JetTypeMiniAOD");
25 
26  nbinsPV_ = iConfig.getParameter<int>("pVBin");
27  nPVMin_ = iConfig.getParameter<double>("pVMin");
28  nPVMax_ = iConfig.getParameter<double>("pVMax");
29 
30  etaBin_ = iConfig.getParameter<int>("etaBin");
31  etaMin_ = iConfig.getParameter<double>("etaMin");
32  etaMax_ = iConfig.getParameter<double>("etaMax");
33 
34  ptBin_ = iConfig.getParameter<int>("ptBin");
35  ptMin_ = iConfig.getParameter<double>("ptMin");
36  ptMax_ = iConfig.getParameter<double>("ptMax");
37 
38  // -----------------------------------------
39  // verbose_ 0: suppress printouts
40  // 1: show printouts
41  verbose_ = conf_.getUntrackedParameter<int>("Verbose",0);
45 
46  jetTests[0][0] = conf_.getUntrackedParameter<bool>("pfBarrelJetMeanTest",true);
47  jetTests[0][1] = conf_.getUntrackedParameter<bool>("pfBarrelJetKSTest",false);
48  jetTests[1][0] = conf_.getUntrackedParameter<bool>("pfEndcapJetMeanTest",true);
49  jetTests[1][1] = conf_.getUntrackedParameter<bool>("pfEndcapJetKSTest",false);
50  jetTests[2][0] = conf_.getUntrackedParameter<bool>("pfForwardJetMeanTest",true);
51  jetTests[2][1] = conf_.getUntrackedParameter<bool>("pfForwardJetKSTest",false);
52  jetTests[3][0] = conf_.getUntrackedParameter<bool>("caloJetMeanTest",true);
53  jetTests[3][1] = conf_.getUntrackedParameter<bool>("caloJetKSTest",false);
54  jetTests[4][0] = conf_.getUntrackedParameter<bool>("jptJetMeanTest",true);
55  jetTests[4][1] = conf_.getUntrackedParameter<bool>("jptJetKSTest",false);
56 
57  metTests[0][0] = conf_.getUntrackedParameter<bool>("caloMETMeanTest",true);
58  metTests[0][1] = conf_.getUntrackedParameter<bool>("caloMETKSTest",false);
59  metTests[1][0] = conf_.getUntrackedParameter<bool>("pfMETMeanTest",true);
60  metTests[1][1] = conf_.getUntrackedParameter<bool>("pfMETKSTest",false);
61  metTests[2][0] = conf_.getUntrackedParameter<bool>("tcMETMeanTest",true);
62  metTests[2][1] = conf_.getUntrackedParameter<bool>("tcMETKSTest",false);
63 
64  if (verbose_) std::cout << ">>> Constructor (DataCertificationJetMET) <<<" << std::endl;
65 
66  // -----------------------------------------
67  //
68 }
69 
70 
72 {
73  // do anything here that needs to be done at desctruction time
74  // (e.g. close files, deallocate resources etc.)
75  if (verbose_) std::cout << ">>> Deconstructor (DataCertificationJetMET) <<<" << std::endl;
76 }
77 
78 
79 // ------------ method called right after a run ends ------------
80 void
82 {
83 
84  //put RECO vs MiniAODDir first ->first MET
85  std::vector<std::string> subDirVecMET;
86  std::string RunDirMET="JetMET/MET/";
87  iget_.setCurrentFolder(RunDirMET);
88  subDirVecMET=iget_.getSubdirs();
89  bool found_METreco_dir=false;
90  bool found_METminiaod_dir=false;
91  //check if proper directories are inside the files
92  for (int i=0; i<int(subDirVecMET.size()); i++) {
93  ibook_.setCurrentFolder(subDirVecMET[i]);
94  if((subDirVecMET[i]+"/Cleaned")==(RunDirMET+inputMETLabelRECO_.label()+"/Cleaned")){
95  found_METreco_dir=true;
96  }
97  if((subDirVecMET[i]+"/Cleaned")==(RunDirMET+inputMETLabelMiniAOD_.label()+"/Cleaned")){
98  found_METminiaod_dir=true;
99  }
100  }
101  if(found_METreco_dir && found_METminiaod_dir){
102  std::string rundirMET_reco=RunDirMET+inputMETLabelRECO_.label()+"/Cleaned";
103  std::string rundirMET_miniaod=RunDirMET+inputMETLabelMiniAOD_.label()+"/Cleaned";
104  MonitorElement* mMET_Reco=iget_.get(rundirMET_reco+"/"+"MET");
105  MonitorElement* mMEy_Reco=iget_.get(rundirMET_reco+"/"+"MEy");
106  MonitorElement* mSumET_Reco=iget_.get(rundirMET_reco+"/"+"SumET");
107  MonitorElement* mMETPhi_Reco=iget_.get(rundirMET_reco+"/"+"METPhi");
108  MonitorElement* mMET_logx_Reco=iget_.get(rundirMET_reco+"/"+"MET_logx");
109  MonitorElement* mSumET_logx_Reco=iget_.get(rundirMET_reco+"/"+"SumET_logx");
110  MonitorElement* mChargedHadronEtFraction_Reco=iget_.get(rundirMET_reco+"/"+"PfChargedHadronEtFraction");
111  MonitorElement* mNeutralHadronEtFraction_Reco=iget_.get(rundirMET_reco+"/"+"PfNeutralHadronEtFraction");
112  MonitorElement* mPhotonEtFraction_Reco=iget_.get(rundirMET_reco+"/"+"PfPhotonEtFraction");
113  MonitorElement* mHFHadronEtFraction_Reco=iget_.get(rundirMET_reco+"/"+"PfHFHadronEtFraction");
114  MonitorElement* mHFEMEtFraction_Reco=iget_.get(rundirMET_reco+"/"+"PfHFEMEtFraction");
115  MonitorElement* mMET_nVtx_profile_Reco=iget_.get(rundirMET_reco+"/"+"MET_profile");
116  MonitorElement* mSumET_nVtx_profile_Reco=iget_.get(rundirMET_reco+"/"+"SumET_profile");
117  MonitorElement* mChargedHadronEtFraction_nVtx_profile_Reco=iget_.get(rundirMET_reco+"/"+"PfChargedHadronEtFraction_profile");
118  MonitorElement* mNeutralHadronEtFraction_nVtx_profile_Reco=iget_.get(rundirMET_reco+"/"+"PfNeutralHadronEtFraction_profile");
119  MonitorElement* mPhotonEtFraction_nVtx_profile_Reco=iget_.get(rundirMET_reco+"/"+"PfPhotonEtFraction_profile");
120 
121  std::vector<MonitorElement*> me_MET_Reco;
122  me_MET_Reco.push_back(mMET_Reco);
123  me_MET_Reco.push_back(mMEy_Reco);
124  me_MET_Reco.push_back(mSumET_Reco);
125  me_MET_Reco.push_back(mMETPhi_Reco);
126  me_MET_Reco.push_back(mMET_logx_Reco);
127  me_MET_Reco.push_back(mSumET_logx_Reco);
128  me_MET_Reco.push_back(mChargedHadronEtFraction_Reco);
129  me_MET_Reco.push_back(mNeutralHadronEtFraction_Reco);
130  me_MET_Reco.push_back(mPhotonEtFraction_Reco);
131  me_MET_Reco.push_back(mHFHadronEtFraction_Reco);
132  me_MET_Reco.push_back(mHFEMEtFraction_Reco);
133  me_MET_Reco.push_back(mMET_nVtx_profile_Reco);
134  me_MET_Reco.push_back(mSumET_nVtx_profile_Reco);
135  me_MET_Reco.push_back(mChargedHadronEtFraction_nVtx_profile_Reco);
136  me_MET_Reco.push_back(mNeutralHadronEtFraction_nVtx_profile_Reco);
137  me_MET_Reco.push_back(mPhotonEtFraction_nVtx_profile_Reco);
138 
139  MonitorElement* mMET_MiniAOD=iget_.get(rundirMET_miniaod+"/"+"MET");
140  MonitorElement* mMEy_MiniAOD=iget_.get(rundirMET_miniaod+"/"+"MEy");
141  MonitorElement* mSumET_MiniAOD=iget_.get(rundirMET_miniaod+"/"+"SumET");
142  MonitorElement* mMETPhi_MiniAOD=iget_.get(rundirMET_miniaod+"/"+"METPhi");
143  MonitorElement* mMET_logx_MiniAOD=iget_.get(rundirMET_miniaod+"/"+"MET_logx");
144  MonitorElement* mSumET_logx_MiniAOD=iget_.get(rundirMET_miniaod+"/"+"SumET_logx");
145  MonitorElement* mChargedHadronEtFraction_MiniAOD=iget_.get(rundirMET_miniaod+"/"+"PfChargedHadronEtFraction");
146  MonitorElement* mNeutralHadronEtFraction_MiniAOD=iget_.get(rundirMET_miniaod+"/"+"PfNeutralHadronEtFraction");
147  MonitorElement* mPhotonEtFraction_MiniAOD=iget_.get(rundirMET_miniaod+"/"+"PfPhotonEtFraction");
148  MonitorElement* mHFHadronEtFraction_MiniAOD=iget_.get(rundirMET_miniaod+"/"+"PfHFHadronEtFraction");
149  MonitorElement* mHFEMEtFraction_MiniAOD=iget_.get(rundirMET_miniaod+"/"+"PfHFEMEtFraction");
150  MonitorElement* mMET_nVtx_profile_MiniAOD=iget_.get(rundirMET_miniaod+"/"+"MET_profile");
151  MonitorElement* mSumET_nVtx_profile_MiniAOD=iget_.get(rundirMET_miniaod+"/"+"SumET_profile");
152  MonitorElement* mChargedHadronEtFraction_nVtx_profile_MiniAOD=iget_.get(rundirMET_miniaod+"/"+"PfChargedHadronEtFraction_profile");
153  MonitorElement* mNeutralHadronEtFraction_nVtx_profile_MiniAOD=iget_.get(rundirMET_miniaod+"/"+"PfNeutralHadronEtFraction_profile");
154  MonitorElement* mPhotonEtFraction_nVtx_profile_MiniAOD=iget_.get(rundirMET_miniaod+"/"+"PfPhotonEtFraction_profile");
155 
156  std::vector<MonitorElement*> me_MET_MiniAOD;
157  me_MET_MiniAOD.push_back(mMET_MiniAOD);
158  me_MET_MiniAOD.push_back(mMEy_MiniAOD);
159  me_MET_MiniAOD.push_back(mSumET_MiniAOD);
160  me_MET_MiniAOD.push_back(mMETPhi_MiniAOD);
161  me_MET_MiniAOD.push_back(mMET_logx_MiniAOD);
162  me_MET_MiniAOD.push_back(mSumET_logx_MiniAOD);
163  me_MET_MiniAOD.push_back(mChargedHadronEtFraction_MiniAOD);
164  me_MET_MiniAOD.push_back(mNeutralHadronEtFraction_MiniAOD);
165  me_MET_MiniAOD.push_back(mPhotonEtFraction_MiniAOD);
166  me_MET_MiniAOD.push_back(mHFHadronEtFraction_MiniAOD);
167  me_MET_MiniAOD.push_back(mHFEMEtFraction_MiniAOD);
168  me_MET_MiniAOD.push_back(mMET_nVtx_profile_MiniAOD);
169  me_MET_MiniAOD.push_back(mSumET_nVtx_profile_MiniAOD);
170  me_MET_MiniAOD.push_back(mChargedHadronEtFraction_nVtx_profile_MiniAOD);
171  me_MET_MiniAOD.push_back(mNeutralHadronEtFraction_nVtx_profile_MiniAOD);
172  me_MET_MiniAOD.push_back(mPhotonEtFraction_nVtx_profile_MiniAOD);
173 
174  ibook_.setCurrentFolder(RunDirMET+"MiniAOD_over_RECO");
175  mMET_MiniAOD_over_Reco=ibook_.book1D("MET_MiniAOD_over_RECO",(TH1F*)mMET_Reco->getRootObject());
176  mMEy_MiniAOD_over_Reco=ibook_.book1D("MEy_MiniAOD_over_RECO",(TH1F*)mMEy_Reco->getRootObject());
177  mSumET_MiniAOD_over_Reco=ibook_.book1D("SumET_MiniAOD_over_RECO",(TH1F*)mSumET_Reco->getRootObject());
178  mMETPhi_MiniAOD_over_Reco=ibook_.book1D("METPhi_MiniAOD_over_RECO",(TH1F*)mMETPhi_Reco->getRootObject());
179  mMET_logx_MiniAOD_over_Reco=ibook_.book1D("MET_logx_MiniAOD_over_RECO",(TH1F*)mMET_logx_Reco->getRootObject());
180  mSumET_logx_MiniAOD_over_Reco=ibook_.book1D("SumET_logx_MiniAOD_over_RECO",(TH1F*)mSumET_logx_Reco->getRootObject());
181  mChargedHadronEtFraction_MiniAOD_over_Reco=ibook_.book1D("PfChargedHadronEtFraction_MiniAOD_over_RECO",(TH1F*)mChargedHadronEtFraction_Reco->getRootObject());
182  mNeutralHadronEtFraction_MiniAOD_over_Reco=ibook_.book1D("PfNeutralHadronEtFraction_MiniAOD_over_RECO",(TH1F*)mNeutralHadronEtFraction_Reco->getRootObject());
183  mPhotonEtFraction_MiniAOD_over_Reco=ibook_.book1D("PfPhotonEtFraction_MiniAOD_over_RECO",(TH1F*)mPhotonEtFraction_Reco->getRootObject());
184  mHFHadronEtFraction_MiniAOD_over_Reco=ibook_.book1D("PfHFHadronEtFraction_MiniAOD_over_RECO",(TH1F*)mHFHadronEtFraction_Reco->getRootObject());
185  mHFEMEtFraction_MiniAOD_over_Reco=ibook_.book1D("PfHFEMEtFraction_MiniAOD_over_RECO",(TH1F*)mHFEMEtFraction_Reco->getRootObject());
186  //use same parameters defining X-Axis of the profiles
187  mMET_nVtx_profile_MiniAOD_over_Reco=ibook_.book1D("MET_profile_MiniAOD_over_RECO","MET_vs_nVtx",nbinsPV_, nPVMin_, nPVMax_);
188  mSumET_nVtx_profile_MiniAOD_over_Reco=ibook_.book1D("SumET_profile_MiniAOD_over_RECO","SumET_vs_nVtx",nbinsPV_, nPVMin_, nPVMax_);
189  mChargedHadronEtFraction_nVtx_profile_MiniAOD_over_Reco=ibook_.book1D("PfChargedHadronEtFraction_profile_MiniAOD_over_RECO","PfChargedHadronEtFraction_vs_nVtx",nbinsPV_, nPVMin_, nPVMax_);
190  mNeutralHadronEtFraction_nVtx_profile_MiniAOD_over_Reco=ibook_.book1D("PfNeutralHadronEtFraction_profile_MiniAOD_over_RECO","PfNeutralHadronEtFraction_vs_nVtx",nbinsPV_, nPVMin_, nPVMax_);
191  mPhotonEtFraction_nVtx_profile_MiniAOD_over_Reco=ibook_.book1D("PfPhotonEtFraction_profile_MiniAOD_over_RECO","PfPhotonEtFraction_vs_nVtx",nbinsPV_, nPVMin_, nPVMax_);
192 
193  std::vector<MonitorElement*> me_MET_MiniAOD_over_Reco;
194  me_MET_MiniAOD_over_Reco.push_back(mMET_MiniAOD_over_Reco);
195  me_MET_MiniAOD_over_Reco.push_back(mMEy_MiniAOD_over_Reco);
196  me_MET_MiniAOD_over_Reco.push_back(mSumET_MiniAOD_over_Reco);
197  me_MET_MiniAOD_over_Reco.push_back(mMETPhi_MiniAOD_over_Reco);
198  me_MET_MiniAOD_over_Reco.push_back(mMET_logx_MiniAOD_over_Reco);
199  me_MET_MiniAOD_over_Reco.push_back(mSumET_logx_MiniAOD_over_Reco);
200  me_MET_MiniAOD_over_Reco.push_back(mChargedHadronEtFraction_MiniAOD_over_Reco);
201  me_MET_MiniAOD_over_Reco.push_back(mNeutralHadronEtFraction_MiniAOD_over_Reco);
202  me_MET_MiniAOD_over_Reco.push_back(mPhotonEtFraction_MiniAOD_over_Reco);
203  me_MET_MiniAOD_over_Reco.push_back(mHFHadronEtFraction_MiniAOD_over_Reco);
204  me_MET_MiniAOD_over_Reco.push_back(mHFEMEtFraction_MiniAOD_over_Reco);
205  me_MET_MiniAOD_over_Reco.push_back(mMET_nVtx_profile_MiniAOD_over_Reco);
206  me_MET_MiniAOD_over_Reco.push_back(mSumET_nVtx_profile_MiniAOD_over_Reco);
207  me_MET_MiniAOD_over_Reco.push_back(mChargedHadronEtFraction_nVtx_profile_MiniAOD_over_Reco);
208  me_MET_MiniAOD_over_Reco.push_back(mNeutralHadronEtFraction_nVtx_profile_MiniAOD_over_Reco);
209  me_MET_MiniAOD_over_Reco.push_back(mPhotonEtFraction_nVtx_profile_MiniAOD_over_Reco);
210 
211  for(unsigned int j=0;j<me_MET_MiniAOD_over_Reco.size();j++){
212  MonitorElement* monMETReco=me_MET_Reco[j];if(monMETReco && monMETReco->getRootObject()){
213  MonitorElement* monMETMiniAOD=me_MET_MiniAOD[j];if(monMETMiniAOD && monMETMiniAOD->getRootObject()){
214  MonitorElement* monMETMiniAOD_over_RECO=me_MET_MiniAOD_over_Reco[j];if(monMETMiniAOD_over_RECO && monMETMiniAOD_over_RECO->getRootObject()){
215  for(int i=0;i<=(monMETMiniAOD_over_RECO->getNbinsX()+1);i++){
216  if(monMETReco->getBinContent(i)!=0){
217  monMETMiniAOD_over_RECO->setBinContent(i,monMETMiniAOD->getBinContent(i)/monMETReco->getBinContent(i));
218  }else if (monMETMiniAOD->getBinContent(i)!=0){
219  monMETMiniAOD_over_RECO->setBinContent(i,-0.5);
220  }
221  }
222  }
223  }
224  }
225  }
226  }//check for RECO and MiniAOD directories
227 
228  //put RECO vs MiniAODDir first ->second Jets
229  std::vector<std::string> subDirVecJet;
230  //go only for cleaned directory
231  std::string RunDirJet="JetMET/Jet/";
232  iget_.setCurrentFolder(RunDirJet);
233  subDirVecJet=iget_.getSubdirs();
234  bool found_Jetreco_dir=false;
235  bool found_Jetminiaod_dir=false;
236  for (int i=0; i<int(subDirVecJet.size()); i++) {
237  ibook_.setCurrentFolder(subDirVecJet[i]);
238  if(subDirVecJet[i]==(RunDirJet+"Cleaned"+inputJetLabelRECO_.label())){
239  found_Jetreco_dir=true;
240  }
241  if(subDirVecJet[i]==(RunDirJet+"Cleaned"+inputJetLabelMiniAOD_.label())){
242  found_Jetminiaod_dir=true;
243  }
244  }
245  if(found_Jetreco_dir && found_Jetminiaod_dir){
246  std::string rundirJet_reco=RunDirJet+"Cleaned"+inputJetLabelRECO_.label();
247  std::string rundirJet_miniaod=RunDirJet+"Cleaned"+inputJetLabelMiniAOD_.label();
248 
249  MonitorElement* mPt_Reco=iget_.get(rundirJet_reco+"/"+"Pt");
250  MonitorElement* mEta_Reco=iget_.get(rundirJet_reco+"/"+"Eta");
251  MonitorElement* mPhi_Reco=iget_.get(rundirJet_reco+"/"+"Phi");
252  MonitorElement* mNjets_Reco=iget_.get(rundirJet_reco+"/"+"NJets");
253  MonitorElement* mPt_uncor_Reco=iget_.get(rundirJet_reco+"/"+"Pt_uncor");
254  MonitorElement* mEta_uncor_Reco=iget_.get(rundirJet_reco+"/"+"Eta_uncor");
255  MonitorElement* mPhi_uncor_Reco=iget_.get(rundirJet_reco+"/"+"Phi_uncor");
256  MonitorElement* mJetEnergyCorr_Reco=iget_.get(rundirJet_reco+"/"+"JetEnergyCorr");
257  MonitorElement* mJetEnergyCorrVSeta_Reco=iget_.get(rundirJet_reco+"/"+"JetEnergyCorrVSEta");
258  MonitorElement* mDPhi_Reco=iget_.get(rundirJet_reco+"/"+"DPhi");
259  MonitorElement* mLooseJIDPassFractionVSeta_Reco=iget_.get(rundirJet_reco+"/"+"JetIDPassFractionVSeta");
260  MonitorElement* mPt_Barrel_Reco=iget_.get(rundirJet_reco+"/"+"Pt_Barrel");
261  MonitorElement* mPt_EndCap_Reco=iget_.get(rundirJet_reco+"/"+"Pt_EndCap");
262  MonitorElement* mPt_Forward_Reco=iget_.get(rundirJet_reco+"/"+"Pt_Forward");
263  MonitorElement* mMVAPUJIDDiscriminant_lowPt_Barrel_Reco=iget_.get(rundirJet_reco+"/"+"MVAPUJIDDiscriminant_lowPt_Barrel");
264  MonitorElement* mMVAPUJIDDiscriminant_lowPt_EndCap_Reco=iget_.get(rundirJet_reco+"/"+"MVAPUJIDDiscriminant_lowPt_EndCap");
265  MonitorElement* mMVAPUJIDDiscriminant_lowPt_Forward_Reco=iget_.get(rundirJet_reco+"/"+"MVAPUJIDDiscriminant_lowPt_Forward");
266  MonitorElement* mMVAPUJIDDiscriminant_mediumPt_EndCap_Reco=iget_.get(rundirJet_reco+"/"+"MVAPUJIDDiscriminant_mediumPt_EndCap");
267  MonitorElement* mMVAPUJIDDiscriminant_highPt_Barrel_Reco=iget_.get(rundirJet_reco+"/"+"MVAPUJIDDiscriminant_highPt_Barrel");
268  MonitorElement* mCHFracVSpT_Barrel_Reco=iget_.get(rundirJet_reco+"/"+"CHFracVSpT_Barrel");
269  MonitorElement* mNHFracVSpT_EndCap_Reco=iget_.get(rundirJet_reco+"/"+"NHFracVSpT_EndCap");
270  MonitorElement* mPhFracVSpT_Barrel_Reco=iget_.get(rundirJet_reco+"/"+"PhFracVSpT_Barrel");
271  MonitorElement* mHFHFracVSpT_Forward_Reco=iget_.get(rundirJet_reco+"/"+"HFHFracVSpT_Forward");
272  MonitorElement* mHFEFracVSpT_Forward_Reco=iget_.get(rundirJet_reco+"/"+"HFEFracVSpT_Forward");
273  MonitorElement* mCHFrac_Reco=iget_.get(rundirJet_reco+"/DiJet/"+"CHFrac");
274  MonitorElement* mNHFrac_Reco=iget_.get(rundirJet_reco+"/DiJet/"+"NHFrac");
275  MonitorElement* mPhFrac_Reco=iget_.get(rundirJet_reco+"/DiJet/"+"PhFrac");
276  MonitorElement* mChargedMultiplicity_Reco=iget_.get(rundirJet_reco+"/DiJet/"+"ChargedMultiplicity");
277  MonitorElement* mNeutralMultiplicity_Reco=iget_.get(rundirJet_reco+"/DiJet/"+"NeutralMultiplicity");
278  MonitorElement* mMuonMultiplicity_Reco=iget_.get(rundirJet_reco+"/DiJet/"+"MuonMultiplicity");
279  MonitorElement* mNeutralFraction_Reco=iget_.get(rundirJet_reco+"/DiJet/"+"NeutralConstituentsFraction");
280 
281  std::vector<MonitorElement*> me_Jet_Reco;
282  me_Jet_Reco.push_back(mPt_Reco);
283  me_Jet_Reco.push_back(mEta_Reco);
284  me_Jet_Reco.push_back(mPhi_Reco);
285  me_Jet_Reco.push_back(mNjets_Reco);
286  me_Jet_Reco.push_back(mPt_uncor_Reco);
287  me_Jet_Reco.push_back(mEta_uncor_Reco);
288  me_Jet_Reco.push_back(mPhi_uncor_Reco);
289  me_Jet_Reco.push_back(mJetEnergyCorr_Reco);
290  me_Jet_Reco.push_back(mJetEnergyCorrVSeta_Reco);
291  me_Jet_Reco.push_back(mDPhi_Reco);
292  me_Jet_Reco.push_back(mLooseJIDPassFractionVSeta_Reco);
293  me_Jet_Reco.push_back(mPt_Barrel_Reco);
294  me_Jet_Reco.push_back(mPt_EndCap_Reco);
295  me_Jet_Reco.push_back(mPt_Forward_Reco);
296  me_Jet_Reco.push_back(mMVAPUJIDDiscriminant_lowPt_Barrel_Reco);
297  me_Jet_Reco.push_back(mMVAPUJIDDiscriminant_lowPt_EndCap_Reco);
298  me_Jet_Reco.push_back(mMVAPUJIDDiscriminant_lowPt_Forward_Reco);
299  me_Jet_Reco.push_back(mMVAPUJIDDiscriminant_mediumPt_EndCap_Reco);
300  me_Jet_Reco.push_back(mMVAPUJIDDiscriminant_highPt_Barrel_Reco);
301  me_Jet_Reco.push_back(mCHFracVSpT_Barrel_Reco);
302  me_Jet_Reco.push_back(mNHFracVSpT_EndCap_Reco);
303  me_Jet_Reco.push_back(mPhFracVSpT_Barrel_Reco);
304  me_Jet_Reco.push_back(mHFHFracVSpT_Forward_Reco);
305  me_Jet_Reco.push_back(mHFEFracVSpT_Forward_Reco);
306  me_Jet_Reco.push_back(mCHFrac_Reco);
307  me_Jet_Reco.push_back(mNHFrac_Reco);
308  me_Jet_Reco.push_back(mPhFrac_Reco);
309  me_Jet_Reco.push_back(mChargedMultiplicity_Reco);
310  me_Jet_Reco.push_back(mNeutralMultiplicity_Reco);
311  me_Jet_Reco.push_back(mMuonMultiplicity_Reco);
312  me_Jet_Reco.push_back(mNeutralFraction_Reco);
313 
314  MonitorElement* mPt_MiniAOD=iget_.get(rundirJet_miniaod+"/"+"Pt");
315  MonitorElement* mEta_MiniAOD=iget_.get(rundirJet_miniaod+"/"+"Eta");
316  MonitorElement* mPhi_MiniAOD=iget_.get(rundirJet_miniaod+"/"+"Phi");
317  MonitorElement* mNjets_MiniAOD=iget_.get(rundirJet_miniaod+"/"+"NJets");
318  MonitorElement* mPt_uncor_MiniAOD=iget_.get(rundirJet_miniaod+"/"+"Pt_uncor");
319  MonitorElement* mEta_uncor_MiniAOD=iget_.get(rundirJet_miniaod+"/"+"Eta_uncor");
320  MonitorElement* mPhi_uncor_MiniAOD=iget_.get(rundirJet_miniaod+"/"+"Phi_uncor");
321  MonitorElement* mJetEnergyCorr_MiniAOD=iget_.get(rundirJet_miniaod+"/"+"JetEnergyCorr");
322  MonitorElement* mJetEnergyCorrVSeta_MiniAOD=iget_.get(rundirJet_miniaod+"/"+"JetEnergyCorrVSEta");
323  MonitorElement* mDPhi_MiniAOD=iget_.get(rundirJet_miniaod+"/"+"DPhi");
324  MonitorElement* mLooseJIDPassFractionVSeta_MiniAOD=iget_.get(rundirJet_miniaod+"/"+"JetIDPassFractionVSeta");
325  MonitorElement* mPt_Barrel_MiniAOD=iget_.get(rundirJet_miniaod+"/"+"Pt_Barrel");
326  MonitorElement* mPt_EndCap_MiniAOD=iget_.get(rundirJet_miniaod+"/"+"Pt_EndCap");
327  MonitorElement* mPt_Forward_MiniAOD=iget_.get(rundirJet_miniaod+"/"+"Pt_Forward");
328  MonitorElement* mMVAPUJIDDiscriminant_lowPt_Barrel_MiniAOD=iget_.get(rundirJet_miniaod+"/"+"MVAPUJIDDiscriminant_lowPt_Barrel");
329  MonitorElement* mMVAPUJIDDiscriminant_lowPt_EndCap_MiniAOD=iget_.get(rundirJet_miniaod+"/"+"MVAPUJIDDiscriminant_lowPt_EndCap");
330  MonitorElement* mMVAPUJIDDiscriminant_lowPt_Forward_MiniAOD=iget_.get(rundirJet_miniaod+"/"+"MVAPUJIDDiscriminant_lowPt_Forward");
331  MonitorElement* mMVAPUJIDDiscriminant_mediumPt_EndCap_MiniAOD=iget_.get(rundirJet_miniaod+"/"+"MVAPUJIDDiscriminant_mediumPt_EndCap");
332  MonitorElement* mMVAPUJIDDiscriminant_highPt_Barrel_MiniAOD=iget_.get(rundirJet_miniaod+"/"+"MVAPUJIDDiscriminant_highPt_Barrel");
333  MonitorElement* mCHFracVSpT_Barrel_MiniAOD=iget_.get(rundirJet_miniaod+"/"+"CHFracVSpT_Barrel");
334  MonitorElement* mNHFracVSpT_EndCap_MiniAOD=iget_.get(rundirJet_miniaod+"/"+"NHFracVSpT_EndCap");
335  MonitorElement* mPhFracVSpT_Barrel_MiniAOD=iget_.get(rundirJet_miniaod+"/"+"PhFracVSpT_Barrel");
336  MonitorElement* mHFHFracVSpT_Forward_MiniAOD=iget_.get(rundirJet_miniaod+"/"+"HFHFracVSpT_Forward");
337  MonitorElement* mHFEFracVSpT_Forward_MiniAOD=iget_.get(rundirJet_miniaod+"/"+"HFEFracVSpT_Forward");
338  MonitorElement* mCHFrac_MiniAOD=iget_.get(rundirJet_miniaod+"/DiJet/"+"CHFrac");
339  MonitorElement* mNHFrac_MiniAOD=iget_.get(rundirJet_miniaod+"/DiJet/"+"NHFrac");
340  MonitorElement* mPhFrac_MiniAOD=iget_.get(rundirJet_miniaod+"/DiJet/"+"PhFrac");
341  MonitorElement* mChargedMultiplicity_MiniAOD=iget_.get(rundirJet_miniaod+"/DiJet/"+"ChargedMultiplicity");
342  MonitorElement* mNeutralMultiplicity_MiniAOD=iget_.get(rundirJet_miniaod+"/DiJet/"+"NeutralMultiplicity");
343  MonitorElement* mMuonMultiplicity_MiniAOD=iget_.get(rundirJet_miniaod+"/DiJet/"+"MuonMultiplicity");
344  MonitorElement* mNeutralFraction_MiniAOD=iget_.get(rundirJet_miniaod+"/DiJet/"+"NeutralConstituentsFraction");
345 
346  std::vector<MonitorElement*> me_Jet_MiniAOD;
347  me_Jet_MiniAOD.push_back(mPt_MiniAOD);
348  me_Jet_MiniAOD.push_back(mEta_MiniAOD);
349  me_Jet_MiniAOD.push_back(mPhi_MiniAOD);
350  me_Jet_MiniAOD.push_back(mNjets_MiniAOD);
351  me_Jet_MiniAOD.push_back(mPt_uncor_MiniAOD);
352  me_Jet_MiniAOD.push_back(mEta_uncor_MiniAOD);
353  me_Jet_MiniAOD.push_back(mPhi_uncor_MiniAOD);
354  me_Jet_MiniAOD.push_back(mJetEnergyCorr_MiniAOD);
355  me_Jet_MiniAOD.push_back(mJetEnergyCorrVSeta_MiniAOD);
356  me_Jet_MiniAOD.push_back(mDPhi_MiniAOD);
357  me_Jet_MiniAOD.push_back(mLooseJIDPassFractionVSeta_MiniAOD);
358  me_Jet_MiniAOD.push_back(mPt_Barrel_MiniAOD);
359  me_Jet_MiniAOD.push_back(mPt_EndCap_MiniAOD);
360  me_Jet_MiniAOD.push_back(mPt_Forward_MiniAOD);
361  me_Jet_MiniAOD.push_back(mMVAPUJIDDiscriminant_lowPt_Barrel_MiniAOD);
362  me_Jet_MiniAOD.push_back(mMVAPUJIDDiscriminant_lowPt_EndCap_MiniAOD);
363  me_Jet_MiniAOD.push_back(mMVAPUJIDDiscriminant_lowPt_Forward_MiniAOD);
364  me_Jet_MiniAOD.push_back(mMVAPUJIDDiscriminant_mediumPt_EndCap_MiniAOD);
365  me_Jet_MiniAOD.push_back(mMVAPUJIDDiscriminant_highPt_Barrel_MiniAOD);
366  me_Jet_MiniAOD.push_back(mCHFracVSpT_Barrel_MiniAOD);
367  me_Jet_MiniAOD.push_back(mNHFracVSpT_EndCap_MiniAOD);
368  me_Jet_MiniAOD.push_back(mPhFracVSpT_Barrel_MiniAOD);
369  me_Jet_MiniAOD.push_back(mHFHFracVSpT_Forward_MiniAOD);
370  me_Jet_MiniAOD.push_back(mHFEFracVSpT_Forward_MiniAOD);
371  me_Jet_MiniAOD.push_back(mCHFrac_MiniAOD);
372  me_Jet_MiniAOD.push_back(mNHFrac_MiniAOD);
373  me_Jet_MiniAOD.push_back(mPhFrac_MiniAOD);
374  me_Jet_MiniAOD.push_back(mChargedMultiplicity_MiniAOD);
375  me_Jet_MiniAOD.push_back(mNeutralMultiplicity_MiniAOD);
376  me_Jet_MiniAOD.push_back(mMuonMultiplicity_MiniAOD);
377  me_Jet_MiniAOD.push_back(mNeutralFraction_MiniAOD);
378 
379  ibook_.setCurrentFolder(RunDirJet+"MiniAOD_over_RECO");
380  mPt_MiniAOD_over_Reco=ibook_.book1D("Pt_MiniAOD_over_RECO",(TH1F*)mPt_Reco->getRootObject());
381  mEta_MiniAOD_over_Reco=ibook_.book1D("Eta_MiniAOD_over_RECO",(TH1F*)mEta_Reco->getRootObject());
382  mPhi_MiniAOD_over_Reco=ibook_.book1D("Phi_MiniAOD_over_RECO",(TH1F*)mPhi_Reco->getRootObject());
383  mNjets_MiniAOD_over_Reco=ibook_.book1D("NJets_MiniAOD_over_RECO",(TH1F*)mNjets_Reco->getRootObject());
384  mPt_uncor_MiniAOD_over_Reco=ibook_.book1D("Pt_uncor_MiniAOD_over_RECO",(TH1F*)mPt_uncor_Reco->getRootObject());
385  mEta_uncor_MiniAOD_over_Reco=ibook_.book1D("Eta_uncor_MiniAOD_over_RECO",(TH1F*)mEta_uncor_Reco->getRootObject());
386  mPhi_uncor_MiniAOD_over_Reco=ibook_.book1D("Phi_uncor_MiniAOD_over_RECO",(TH1F*)mPhi_uncor_Reco->getRootObject());
387  mJetEnergyCorr_MiniAOD_over_Reco=ibook_.book1D("JetEnergyCorr_MiniAOD_over_RECO",(TH1F*)mJetEnergyCorr_Reco->getRootObject());
388  mJetEnergyCorrVSeta_MiniAOD_over_Reco=ibook_.book1D("JetEnergyCorrVSEta_MiniAOD_over_RECO", "jet energy correction factor VS eta", etaBin_, etaMin_,etaMax_);
389  mDPhi_MiniAOD_over_Reco=ibook_.book1D("DPhi_MiniAOD_over_RECO",(TH1F*)mDPhi_Reco->getRootObject());
390  mLooseJIDPassFractionVSeta_MiniAOD_over_Reco=ibook_.book1D("JetIDPassFractionVSeta_MiniAOD_over_RECO","JetIDPassFractionVSeta", etaBin_, etaMin_,etaMax_);
391  mPt_Barrel_MiniAOD_over_Reco=ibook_.book1D("Pt_Barrel_MiniAOD_over_RECO",(TH1F*)mPt_Barrel_Reco->getRootObject());
392  mPt_EndCap_MiniAOD_over_Reco=ibook_.book1D("Pt_EndCap_MiniAOD_over_RECO",(TH1F*)mPt_EndCap_Reco->getRootObject());
393  mPt_Forward_MiniAOD_over_Reco=ibook_.book1D("Pt_Forward_MiniAOD_over_RECO",(TH1F*)mPt_Forward_Reco->getRootObject());
394  mMVAPUJIDDiscriminant_lowPt_Barrel_MiniAOD_over_Reco=ibook_.book1D("MVAPUJIDDiscriminant_lowPt_Barrel_MiniAOD_over_RECO",(TH1F*)mMVAPUJIDDiscriminant_lowPt_Barrel_Reco->getRootObject());
395  mMVAPUJIDDiscriminant_lowPt_EndCap_MiniAOD_over_Reco=ibook_.book1D("MVAPUJIDDiscriminant_lowPt_EndCap_MiniAOD_over_RECO",(TH1F*)mMVAPUJIDDiscriminant_lowPt_EndCap_Reco->getRootObject());
396  mMVAPUJIDDiscriminant_lowPt_Forward_MiniAOD_over_Reco=ibook_.book1D("MVAPUJIDDiscriminant_lowPt_Forward_MiniAOD_over_RECO",(TH1F*)mMVAPUJIDDiscriminant_lowPt_Forward_Reco->getRootObject());
397  mMVAPUJIDDiscriminant_mediumPt_EndCap_MiniAOD_over_Reco=ibook_.book1D("MVAPUJIDDiscriminant_mediumPt_EndCap_MiniAOD_over_RECO",(TH1F*)mMVAPUJIDDiscriminant_mediumPt_EndCap_Reco->getRootObject());
398  mMVAPUJIDDiscriminant_highPt_Barrel_MiniAOD_over_Reco=ibook_.book1D("MVAPUJIDDiscriminant_highPt_Barrel_MiniAOD_over_RECO",(TH1F*)mMVAPUJIDDiscriminant_highPt_Barrel_Reco->getRootObject());
399  mCHFracVSpT_Barrel_MiniAOD_over_Reco=ibook_.book1D("CHFracVSpT_Barrel_MiniAOD_over_RECO","CHFracVSpT_Barrel", ptBin_, ptMin_,ptMax_);
400  mNHFracVSpT_EndCap_MiniAOD_over_Reco=ibook_.book1D("NHFracVSpT_EndCap_MiniAOD_over_RECO","NHFracVSpT_EndCap", ptBin_, ptMin_,ptMax_);
401  mPhFracVSpT_Barrel_MiniAOD_over_Reco=ibook_.book1D("PhFracVSpT_Barrel_MiniAOD_over_RECO","PhFracVSpT_Barrel", ptBin_, ptMin_,ptMax_);
402  mHFHFracVSpT_Forward_MiniAOD_over_Reco=ibook_.book1D("HFHFracVSpT_Forward_MiniAOD_over_RECO","HFHFracVSpT_Forward", ptBin_, ptMin_,ptMax_);
403  mHFEFracVSpT_Forward_MiniAOD_over_Reco=ibook_.book1D("HFEFracVSpT_Forward_MiniAOD_over_RECO","HFEFracVSpT_Forward", ptBin_, ptMin_,ptMax_);
404  ibook_.setCurrentFolder(RunDirJet+"MiniAOD_over_RECO"+"/"+"DiJet");
405  mCHFrac_MiniAOD_over_Reco=ibook_.book1D("CHFrac_MiniAOD_over_RECO",(TH1F*)mCHFrac_Reco->getRootObject());
406  mNHFrac_MiniAOD_over_Reco=ibook_.book1D("NHFrac_MiniAOD_over_RECO",(TH1F*)mNHFrac_Reco->getRootObject());
407  mPhFrac_MiniAOD_over_Reco=ibook_.book1D("PhFrac_MiniAOD_over_RECO",(TH1F*)mPhFrac_Reco->getRootObject());
408  mChargedMultiplicity_MiniAOD_over_Reco=ibook_.book1D("ChargedMultiplicity_MiniAOD_over_RECO",(TH1F*)mChargedMultiplicity_Reco->getRootObject());
409  mNeutralMultiplicity_MiniAOD_over_Reco=ibook_.book1D("NeutralMultiplicity_MiniAOD_over_RECO",(TH1F*)mNeutralMultiplicity_Reco->getRootObject());
410  mMuonMultiplicity_MiniAOD_over_Reco=ibook_.book1D("MuonMultiplicity_MiniAOD_over_RECO",(TH1F*)mMuonMultiplicity_Reco->getRootObject());
411  mNeutralFraction_MiniAOD_over_Reco=ibook_.book1D("NeutralConstituentsFraction_MiniAOD_over_RECO",(TH1F*)mNeutralFraction_Reco->getRootObject());
412 
413  std::vector<MonitorElement*> me_Jet_MiniAOD_over_Reco;
414  me_Jet_MiniAOD_over_Reco.push_back(mPt_MiniAOD_over_Reco);
415  me_Jet_MiniAOD_over_Reco.push_back(mEta_MiniAOD_over_Reco);
416  me_Jet_MiniAOD_over_Reco.push_back(mPhi_MiniAOD_over_Reco);
417  me_Jet_MiniAOD_over_Reco.push_back(mNjets_MiniAOD_over_Reco);
418  me_Jet_MiniAOD_over_Reco.push_back(mPt_uncor_MiniAOD_over_Reco);
419  me_Jet_MiniAOD_over_Reco.push_back(mEta_uncor_MiniAOD_over_Reco);
420  me_Jet_MiniAOD_over_Reco.push_back(mPhi_uncor_MiniAOD_over_Reco);
421  me_Jet_MiniAOD_over_Reco.push_back(mJetEnergyCorr_MiniAOD_over_Reco);
422  me_Jet_MiniAOD_over_Reco.push_back(mJetEnergyCorrVSeta_MiniAOD_over_Reco);
423  me_Jet_MiniAOD_over_Reco.push_back(mDPhi_MiniAOD_over_Reco);
424  me_Jet_MiniAOD_over_Reco.push_back(mLooseJIDPassFractionVSeta_MiniAOD_over_Reco);
425  me_Jet_MiniAOD_over_Reco.push_back(mPt_Barrel_MiniAOD_over_Reco);
426  me_Jet_MiniAOD_over_Reco.push_back(mPt_EndCap_MiniAOD_over_Reco);
427  me_Jet_MiniAOD_over_Reco.push_back(mPt_Forward_MiniAOD_over_Reco);
428  me_Jet_MiniAOD_over_Reco.push_back(mMVAPUJIDDiscriminant_lowPt_Barrel_MiniAOD_over_Reco);
429  me_Jet_MiniAOD_over_Reco.push_back(mMVAPUJIDDiscriminant_lowPt_EndCap_MiniAOD_over_Reco);
430  me_Jet_MiniAOD_over_Reco.push_back(mMVAPUJIDDiscriminant_lowPt_Forward_MiniAOD_over_Reco);
431  me_Jet_MiniAOD_over_Reco.push_back(mMVAPUJIDDiscriminant_mediumPt_EndCap_MiniAOD_over_Reco);
432  me_Jet_MiniAOD_over_Reco.push_back(mMVAPUJIDDiscriminant_highPt_Barrel_MiniAOD_over_Reco);
433  me_Jet_MiniAOD_over_Reco.push_back(mCHFracVSpT_Barrel_MiniAOD_over_Reco);
434  me_Jet_MiniAOD_over_Reco.push_back(mNHFracVSpT_EndCap_MiniAOD_over_Reco);
435  me_Jet_MiniAOD_over_Reco.push_back(mPhFracVSpT_Barrel_MiniAOD_over_Reco);
436  me_Jet_MiniAOD_over_Reco.push_back(mHFHFracVSpT_Forward_MiniAOD_over_Reco);
437  me_Jet_MiniAOD_over_Reco.push_back(mHFEFracVSpT_Forward_MiniAOD_over_Reco);
438  me_Jet_MiniAOD_over_Reco.push_back(mCHFrac_MiniAOD_over_Reco);
439  me_Jet_MiniAOD_over_Reco.push_back(mNHFrac_MiniAOD_over_Reco);
440  me_Jet_MiniAOD_over_Reco.push_back(mPhFrac_MiniAOD_over_Reco);
441  me_Jet_MiniAOD_over_Reco.push_back(mChargedMultiplicity_MiniAOD_over_Reco);
442  me_Jet_MiniAOD_over_Reco.push_back(mNeutralMultiplicity_MiniAOD_over_Reco);
443  me_Jet_MiniAOD_over_Reco.push_back(mMuonMultiplicity_MiniAOD_over_Reco);
444  me_Jet_MiniAOD_over_Reco.push_back(mNeutralFraction_MiniAOD_over_Reco);
445 
446  for(unsigned int j=0;j<me_Jet_MiniAOD_over_Reco.size();j++){
447  MonitorElement* monJetReco=me_Jet_Reco[j];if(monJetReco && monJetReco->getRootObject()){
448  MonitorElement* monJetMiniAOD=me_Jet_MiniAOD[j];if(monJetMiniAOD && monJetMiniAOD->getRootObject()){
449  MonitorElement* monJetMiniAOD_over_RECO=me_Jet_MiniAOD_over_Reco[j];if(monJetMiniAOD_over_RECO && monJetMiniAOD_over_RECO->getRootObject()){
450  for(int i=0;i<=(monJetMiniAOD_over_RECO->getNbinsX()+1);i++){
451  if(monJetReco->getBinContent(i)!=0){
452  monJetMiniAOD_over_RECO->setBinContent(i,monJetMiniAOD->getBinContent(i)/monJetReco->getBinContent(i));
453  }else if (monJetMiniAOD->getBinContent(i)!=0){
454  monJetMiniAOD_over_RECO->setBinContent(i,-0.5);
455  }
456  }
457  }
458  }
459  }
460  }
461  }//check for RECO and MiniAOD directories
462 
463  if (verbose_) std::cout << ">>> EndRun (DataCertificationJetMET) <<<" << std::endl;
464 
465  std::vector<std::string> subDirVec;
466  std::string RunDir;
467 
468 
469  if (verbose_) std::cout << "InMemory_ = " << InMemory_ << std::endl;
470 
471  ibook_.setCurrentFolder(folderName);
472  reportSummary = ibook_.bookFloat("reportSummary");
473  CertificationSummary = ibook_.bookFloat("CertificationSummary");
474 
475  reportSummaryMap = ibook_.book2D("reportSummaryMap","reportSummaryMap",3,0,3,5,0,5);
476  CertificationSummaryMap = ibook_.book2D("CertificationSummaryMap","CertificationSummaryMap",3,0,3,5,0,5);
477 
478 
479  reportSummary = iget_.get(folderName+"/"+"reportSummary");
480  CertificationSummary = iget_.get(folderName+"/"+"CertificationSummary");
481  reportSummaryMap = iget_.get(folderName+"/"+"reportSummaryMap");
482  CertificationSummaryMap = iget_.get(folderName+"/"+"CertificationSummaryMap");
483 
484 
485 
487  reportSummaryMap->getTH2F()->SetStats(kFALSE);
488  reportSummaryMap->getTH2F()->SetOption("colz");
489  reportSummaryMap->setBinLabel(1,"CaloTower");
490  reportSummaryMap->setBinLabel(2,"MET");
491  reportSummaryMap->setBinLabel(3,"Jet");
492  }
494  CertificationSummaryMap->getTH2F()->SetStats(kFALSE);
495  CertificationSummaryMap->getTH2F()->SetOption("colz");
496  CertificationSummaryMap->setBinLabel(1,"CaloTower");
499  }
500 
501  reportSummary->Fill(1.);
503 
504  if (RunDir=="Reference") RunDir="";
505  if (verbose_) std::cout << RunDir << std::endl;
506  ibook_.setCurrentFolder("JetMET/EventInfo/CertificationSummaryContents/");
507 
508 
509  std::string refHistoName;
510  std::string newHistoName;
511 
512  //-----------------------------
513  // Jet DQM Data Certification
514  //-----------------------------
515  //we have 4 types anymore: PF (barrel,endcap,forward) and calojets
516  MonitorElement *meJetPt[4];
517  MonitorElement *meJetEta[4];
518  MonitorElement *meJetPhi[4];
519  MonitorElement *meJetEMFrac[4];
520  MonitorElement *meJetConstituents[4];
521  RunDir = "";
522  if (RunDir == "") newHistoName = "JetMET/Jet/";
523  else newHistoName = RunDir+"/JetMET/Runsummary/Jet/";
524  std::string cleaningdir = "";
525  cleaningdir = "Cleaned";
526 
527  //Jet Phi histos
528  meJetPhi[0] = iget_.get(newHistoName+cleaningdir+jetAlgo+"PFJets/Phi_Barrel");
529  meJetPhi[1] = iget_.get(newHistoName+cleaningdir+jetAlgo+"PFJets/Phi_EndCap");
530  meJetPhi[2] = iget_.get(newHistoName+cleaningdir+jetAlgo+"PFJets/Phi_Forward");
531  meJetPhi[3] = iget_.get(newHistoName+cleaningdir+jetAlgo+"CaloJets/Phi");
532  //meJetPhi[4] = iget_.get(newHistoName+cleaningdir+"JetPlusTrackZSPCorJetAntiKt5/Phi");
533 
534  //Jet Eta histos
535  meJetEta[0] = iget_.get(newHistoName+cleaningdir+jetAlgo+"PFJets/Eta");
536  meJetEta[1] = iget_.get(newHistoName+cleaningdir+jetAlgo+"PFJets/Eta");
537  meJetEta[2] = iget_.get(newHistoName+cleaningdir+jetAlgo+"PFJets/EtaFirst");
538  meJetEta[3] = iget_.get(newHistoName+cleaningdir+jetAlgo+"CaloJets/Eta");
539  //meJetEta[4] = iget_.get(newHistoName+cleaningdir+"JetPlusTrackZSPCorJetAntiKt5/Eta");
540 
541  //Jet Pt histos
542  meJetPt[0] = iget_.get(newHistoName+cleaningdir+jetAlgo+"PFJets/Pt_Barrel");
543  meJetPt[1] = iget_.get(newHistoName+cleaningdir+jetAlgo+"PFJets/Pt_EndCap");
544  meJetPt[2] = iget_.get(newHistoName+cleaningdir+jetAlgo+"PFJets/Pt_Forward");
545  meJetPt[3] = iget_.get(newHistoName+cleaningdir+jetAlgo+"CaloJets/Pt_2");
546 
548  meJetConstituents[0] = iget_.get(newHistoName+cleaningdir+jetAlgo+"PFJets/Constituents_Barrel");
549  meJetConstituents[1] = iget_.get(newHistoName+cleaningdir+jetAlgo+"PFJets/Constituents_EndCap");
550  meJetConstituents[2] = iget_.get(newHistoName+cleaningdir+jetAlgo+"PFJets/Constituents_Forward");
551  meJetConstituents[3] = iget_.get(newHistoName+cleaningdir+jetAlgo+"CaloJets/Constituents");
552  //
554  meJetEMFrac[0] = iget_.get(newHistoName+cleaningdir+jetAlgo+"PFJets/EFrac_Barrel");
555  meJetEMFrac[1] = iget_.get(newHistoName+cleaningdir+jetAlgo+"PFJets/EFrac_EndCap");
556  meJetEMFrac[2] = iget_.get(newHistoName+cleaningdir+jetAlgo+"PFJets/EFrac_Forward");
557  meJetEMFrac[3] = iget_.get(newHistoName+cleaningdir+jetAlgo+"CaloJets/EFrac");
558 
559 
560  //------------------------------------------------------------------------------
561  //--- Extract quality test results and fill data certification results for Jets
562  //--- Tests for Calo Barrel, EndCap and Forward, as well as PF and JPT jets
563  //--- For Calo and PF jets:
564  //--- Look at mean of Constituents, EM Frac and Pt
565  //--- Look at Kolmogorov result for Eta, Phi, and Pt
566  //--- For JPT jets:
567  //--- Look at mean of Pt, AllPionsTrackNHits?, nTracks,
568  //--- Look at Kolmogorov result for Eta, Phi, and Pt
569  //------------------------------------------------------------------------------
570 
571 
572  // Four types of jets {AK5 Barrel, AK5 EndCap, AK5 Forward, PF}, removed JPT which is 5th type of jets
573  //----------------------------------------------------------------------------
574  // Kolmogorov (KS) tests
575  const QReport* QReport_JetEta[4] = {0};
576  const QReport* QReport_JetPhi[4] = {0};
577  // Mean and KS tests for Calo and PF jets
578  const QReport* QReport_JetConstituents[4][2] = {{0}};
579  const QReport* QReport_JetEFrac[4][2] = {{0}};
580  const QReport* QReport_JetPt[4][2] = {{0}};
581 
582  // Mean and KS tests for JPT jets
583  //const QReport* QReport_JetNTracks[2] = {0, 0};
584  float qr_Jet_Eta[4] = {-1};
585  float qr_Jet_Phi[4] = {-1};
586  float dc_Jet[4] = {-1};
587 
588  float qr_Jet_Constituents[4][2] = {{-1}};
589  float qr_Jet_EFrac[4][2] = {{-1}};
590  float qr_Jet_Pt[4][2] = {{-1}};
591 
592 
593  // Loop
594  //----------------------------------------------------------------------------
595  for (int jtyp=0; jtyp<4; ++jtyp) {
596  // Mean test results
597 
598  if (meJetConstituents[jtyp] && meJetConstituents[jtyp]->getRootObject() ) {
599  QReport_JetConstituents[jtyp][0] = meJetConstituents[jtyp]->getQReport("meanJetConstituentsTest");
600  QReport_JetConstituents[jtyp][1] = meJetConstituents[jtyp]->getQReport("KolmogorovTest");
601  }
602  if (meJetEMFrac[jtyp]&& meJetEMFrac[jtyp]->getRootObject() ) {
603  QReport_JetEFrac[jtyp][0] = meJetEMFrac[jtyp]->getQReport("meanEMFractionTest");
604  QReport_JetEFrac[jtyp][1] = meJetEMFrac[jtyp]->getQReport("KolmogorovTest");
605  }
606  if (meJetPt[jtyp] && meJetPt[jtyp]->getRootObject() ) {
607  QReport_JetPt[jtyp][0] = meJetPt[jtyp]->getQReport("meanJetPtTest");
608  QReport_JetPt[jtyp][1] = meJetPt[jtyp]->getQReport("KolmogorovTest");
609  }
610  if (meJetPhi[jtyp] && meJetPhi[jtyp]->getRootObject()){
611  QReport_JetPhi[jtyp] = meJetPhi[jtyp]->getQReport("KolmogorovTest");
612  }
613  if (meJetEta[jtyp] && meJetEta[jtyp]->getRootObject()){
614  QReport_JetEta[jtyp] = meJetEta[jtyp]->getQReport("KolmogorovTest");
615  }
616 
617  //Jet Pt test
618  if (QReport_JetPt[jtyp][0]){
619  //std::cout<<"jet type test pt "<<jtyp<<"/"<<QReport_JetPt[jtyp][0]->getStatus()<<std::endl;
620  if (QReport_JetPt[jtyp][0]->getStatus()==100 ||
621  QReport_JetPt[jtyp][0]->getStatus()==200)
622  qr_Jet_Pt[jtyp][0] = 1;
623  else if (QReport_JetPt[jtyp][0]->getStatus()==300)
624  qr_Jet_Pt[jtyp][0] = 0;
625  else
626  qr_Jet_Pt[jtyp][0] = -1;
627  }
628  else{ qr_Jet_Pt[jtyp][0] = -2;
629  //std::cout<<"qreport is REALLY NULL type test pt "<<jtyp<<" 0 "<<std::endl;
630  }
631  if (QReport_JetPt[jtyp][1]){
632  if (QReport_JetPt[jtyp][1]->getStatus()==100 ||
633  QReport_JetPt[jtyp][1]->getStatus()==200)
634  qr_Jet_Pt[jtyp][1] = 1;
635  else if (QReport_JetPt[jtyp][1]->getStatus()==300)
636  qr_Jet_Pt[jtyp][1] = 0;
637  else
638  qr_Jet_Pt[jtyp][1] = -1;
639  }
640  else{ qr_Jet_Pt[jtyp][1] = -2;
641  }
642 
643  //Jet Phi test
644  if (QReport_JetPhi[jtyp]){
645  if (QReport_JetPhi[jtyp]->getStatus()==100 ||
646  QReport_JetPhi[jtyp]->getStatus()==200)
647  qr_Jet_Phi[jtyp] = 1;
648  else if (QReport_JetPhi[jtyp]->getStatus()==300)
649  qr_Jet_Phi[jtyp] = 0;
650  else
651  qr_Jet_Phi[jtyp] = -1;
652  }
653  else{ qr_Jet_Phi[jtyp] = -2;
654  }
655  //Jet Eta test
656  if (QReport_JetEta[jtyp]){
657  if (QReport_JetEta[jtyp]->getStatus()==100 ||
658  QReport_JetEta[jtyp]->getStatus()==200)
659  qr_Jet_Eta[jtyp] = 1;
660  else if (QReport_JetEta[jtyp]->getStatus()==300)
661  qr_Jet_Eta[jtyp] = 0;
662  else
663  qr_Jet_Eta[jtyp] = -1;
664  }
665  else{
666  qr_Jet_Eta[jtyp] = -2;
667  }
668  //Jet Constituents test
669  if (QReport_JetConstituents[jtyp][0]){
670  if (QReport_JetConstituents[jtyp][0]->getStatus()==100 ||
671  QReport_JetConstituents[jtyp][0]->getStatus()==200)
672  qr_Jet_Constituents[jtyp][0] = 1;
673  else if (QReport_JetConstituents[jtyp][0]->getStatus()==300)
674  qr_Jet_Constituents[jtyp][0] = 0;
675  else
676  qr_Jet_Constituents[jtyp][0] = -1;
677  }
678  else{ qr_Jet_Constituents[jtyp][0] = -2;
679  }
680 
681  if (QReport_JetConstituents[jtyp][1]){
682  if (QReport_JetConstituents[jtyp][1]->getStatus()==100 ||
683  QReport_JetConstituents[jtyp][1]->getStatus()==200)
684  qr_Jet_Constituents[jtyp][1] = 1;
685  else if (QReport_JetConstituents[jtyp][1]->getStatus()==300)
686  qr_Jet_Constituents[jtyp][1] = 0;
687  else
688  qr_Jet_Constituents[jtyp][1] = -1;
689  }
690  else{ qr_Jet_Constituents[jtyp][1] = -2;
691  }
692  //Jet EMFrac test
693  if (QReport_JetEFrac[jtyp][0]){
694  if (QReport_JetEFrac[jtyp][0]->getStatus()==100 ||
695  QReport_JetEFrac[jtyp][0]->getStatus()==200)
696  qr_Jet_EFrac[jtyp][0] = 1;
697  else if (QReport_JetEFrac[jtyp][0]->getStatus()==300)
698  qr_Jet_EFrac[jtyp][0] = 0;
699  else
700  qr_Jet_EFrac[jtyp][0] = -1;
701  }
702  else{ qr_Jet_EFrac[jtyp][0] = -2;
703  }
704 
705  if (QReport_JetEFrac[jtyp][1]){
706  if (QReport_JetEFrac[jtyp][1]->getStatus()==100 ||
707  QReport_JetEFrac[jtyp][1]->getStatus()==200)
708  qr_Jet_EFrac[jtyp][1] = 1;
709  else if (QReport_JetEFrac[jtyp][1]->getStatus()==300)
710  qr_Jet_EFrac[jtyp][1] = 0;
711  else
712  qr_Jet_EFrac[jtyp][1] = -1;
713  }
714  else{ qr_Jet_EFrac[jtyp][1] = -2;
715  }
716 
717  if (verbose_) {
718  printf("====================Jet Type %d QTest Report Summary========================\n",jtyp);
719  printf("Eta: Phi: Pt 1: 2: Const/Ntracks 1: 2: EFrac/tracknhits 1: 2:\n");
720 
721  printf("%2.2f %2.2f %2.2f %2.2f %2.2f %2.2f %2.2f %2.2f\n", \
722  qr_Jet_Eta[jtyp], \
723  qr_Jet_Phi[jtyp], \
724  qr_Jet_Pt[jtyp][0], \
725  qr_Jet_Pt[jtyp][1], \
726  qr_Jet_Constituents[jtyp][0], \
727  qr_Jet_Constituents[jtyp][1], \
728  qr_Jet_EFrac[jtyp][0], \
729  qr_Jet_EFrac[jtyp][1]);
730 
731  }
732  //certification result for Jet
733 
734  //Only apply certain tests, as defined in the config
735  for (int ttyp = 0; ttyp < 2; ++ttyp) {
736  if (!jetTests[jtyp][ttyp]) {
737  qr_Jet_Pt[jtyp][ttyp] = 1;
738  if (ttyp ==1) {
739  qr_Jet_Eta[jtyp] = 1;
740  qr_Jet_Phi[jtyp] = 1;
741  }
742  qr_Jet_EFrac[jtyp][ttyp] = 1;
743  qr_Jet_Constituents[jtyp][ttyp] = 1;
744  }
745  }
746 
747 
748 
749  if ( (qr_Jet_EFrac[jtyp][0] == 0) ||
750  (qr_Jet_EFrac[jtyp][1] == 0) ||
751  (qr_Jet_Constituents[jtyp][1] == 0) ||
752  (qr_Jet_Constituents[jtyp][0] == 0) ||
753  (qr_Jet_Eta[jtyp] == 0) ||
754  (qr_Jet_Phi[jtyp] == 0) ||
755  (qr_Jet_Pt[jtyp][0] == 0) ||
756  (qr_Jet_Pt[jtyp][1] == 0)
757  )
758  dc_Jet[jtyp] = 0;
759  else if ( (qr_Jet_EFrac[jtyp][0] == -1) &&
760  (qr_Jet_EFrac[jtyp][1] == -1) &&
761  (qr_Jet_Constituents[jtyp][1] == -1) &&
762  (qr_Jet_Constituents[jtyp][0] == -1) &&
763  (qr_Jet_Eta[jtyp] == -1) &&
764  (qr_Jet_Phi[jtyp] == -1) &&
765  (qr_Jet_Pt[jtyp][0] == -1) &&
766  (qr_Jet_Pt[jtyp][1] == -1 )
767  )
768  dc_Jet[jtyp] = -1;
769  else if ( (qr_Jet_EFrac[jtyp][0] == -2) &&
770  (qr_Jet_EFrac[jtyp][1] == -2) &&
771  (qr_Jet_Constituents[jtyp][1] == -2) &&
772  (qr_Jet_Constituents[jtyp][0] == -2) &&
773  (qr_Jet_Eta[jtyp] == -2) &&
774  (qr_Jet_Phi[jtyp] == -2) &&
775  (qr_Jet_Pt[jtyp][0] == -2) &&
776  (qr_Jet_Pt[jtyp][1] == -2)
777  )
778  dc_Jet[jtyp] = -2;
779  else
780  dc_Jet[jtyp] = 1;
781 
782  if (verbose_) std::cout<<"Certifying Jet algo: "<<jtyp<<" with value: "<<dc_Jet[jtyp]<<std::endl;
783 
784 
785  CertificationSummaryMap->Fill(2, 4-jtyp, dc_Jet[jtyp]);
786  reportSummaryMap->Fill(2, 4-jtyp, dc_Jet[jtyp]);
787  }
788 
789  //-----------------------------
790  // MET DQM Data Certification
791  //-----------------------------
792  //
793  // Prepare test histograms
794  //
795  MonitorElement *meMExy[2][2];
796  MonitorElement *meMEt[2];
797  MonitorElement *meSumEt[2];
798  MonitorElement *meMETPhi[2];
799 
800  RunDir = "";
801  if (RunDir == "") newHistoName = "JetMET/MET/";
802  else newHistoName = RunDir+"/JetMET/Runsummary/MET/";
803 
804  metFolder = "Cleaned";
805 
806  //MEx/MEy monitor elements
807  meMExy[0][0] = iget_.get(newHistoName+"met/"+metFolder+"/MEx");
808  meMExy[0][1] = iget_.get(newHistoName+"met/"+metFolder+"/MEy");
809  meMExy[1][0] = iget_.get(newHistoName+"pfMet/"+metFolder+"/MEx");
810  meMExy[1][1] = iget_.get(newHistoName+"pfMet/"+metFolder+"/MEy");
811 
812  //MET Phi monitor elements
813  meMETPhi[0] = iget_.get(newHistoName+"met/"+metFolder+"/METPhi");
814  meMETPhi[1] = iget_.get(newHistoName+"pfMet/"+metFolder+"/METPhi");
815  //MET monitor elements
816  meMEt[0] = iget_.get(newHistoName+"met/"+metFolder+"/MET");
817  meMEt[1] = iget_.get(newHistoName+"pfMet/"+metFolder+"/MET");
818  //SumET monitor elements
819  meSumEt[0] = iget_.get(newHistoName+"met/"+metFolder+"/SumET");
820  meSumEt[1] = iget_.get(newHistoName+"pfMet/"+metFolder+"/SumET");
821 
822  //----------------------------------------------------------------------------
823  //--- Extract quality test results and fill data certification results for MET
824  //----------------------------------------------------------------------------
825 
826  // 2 types of MET {CaloMET, PfMET} // It is 5 if CaloMETNoHF is included, 4 for MuonCorMET
827  // removed 3rd type of TcMET
828  // 2 types of tests Mean test/Kolmogorov test
829  const QReport * QReport_MExy[2][2][2]={{{0}}};
830  const QReport * QReport_MEt[2][2]={{0}};
831  const QReport * QReport_SumEt[2][2]={{0}};
832  //2 types of tests phiQTest and Kolmogorov test
833  const QReport * QReport_METPhi[2][2]={{0}};
834 
835 
836  float qr_MET_MExy[2][2][2] = {{{-999.}}};
837  float qr_MET_MEt[2][2] = {{-999.}};
838  float qr_MET_SumEt[2][2] = {{-999.}};
839  float qr_MET_METPhi[2][2] = {{-999.}};
840  float dc_MET[2] = {-999.};
841 
842 
843  // J.Piedra, 27/02/212
844  // removed MuCorrMET & TcMET --> loop up to 2 instead of 4, remove already from definition
845  for (int mtyp = 0; mtyp < 2; ++mtyp){
846  //Mean test results
847  if (meMExy[mtyp][0] && meMExy[mtyp][0]->getRootObject()) {
848  QReport_MExy[mtyp][0][0] = meMExy[mtyp][0]->getQReport("meanMExyTest");
849  QReport_MExy[mtyp][1][0] = meMExy[mtyp][0]->getQReport("KolmogorovTest");
850  }
851  if (meMExy[mtyp][1]&& meMExy[mtyp][1]->getRootObject()) {
852  QReport_MExy[mtyp][0][1] = meMExy[mtyp][1]->getQReport("meanMExyTest");
853  QReport_MExy[mtyp][1][1] = meMExy[mtyp][1]->getQReport("KolmogorovTest");
854  }
855  if (meMEt[mtyp] && meMEt[mtyp]->getRootObject()) {
856  QReport_MEt[mtyp][0] = meMEt[mtyp]->getQReport("meanMETTest");
857  QReport_MEt[mtyp][1] = meMEt[mtyp]->getQReport("KolmogorovTest");
858  }
859 
860  if (meSumEt[mtyp] && meSumEt[mtyp]->getRootObject()) {
861  QReport_SumEt[mtyp][0] = meSumEt[mtyp]->getQReport("meanSumETTest");
862  QReport_SumEt[mtyp][1] = meSumEt[mtyp]->getQReport("KolmogorovTest");
863  }
864 
865  if (meMETPhi[mtyp] && meMETPhi[mtyp]->getRootObject()) {
866  QReport_METPhi[mtyp][0] = meMETPhi[mtyp]->getQReport("phiQTest");
867  QReport_METPhi[mtyp][1] = meMETPhi[mtyp]->getQReport("KolmogorovTest");
868  }
869  for (int testtyp = 0; testtyp < 2; ++testtyp) {
870  //MEx test
871  if (QReport_MExy[mtyp][testtyp][0]){
872  if (QReport_MExy[mtyp][testtyp][0]->getStatus()==100 ||
873  QReport_MExy[mtyp][testtyp][0]->getStatus()==200)
874  qr_MET_MExy[mtyp][testtyp][0] = 1;
875  else if (QReport_MExy[mtyp][testtyp][0]->getStatus()==300)
876  qr_MET_MExy[mtyp][testtyp][0] = 0;
877  else
878  qr_MET_MExy[mtyp][testtyp][0] = -1;
879  }
880  else qr_MET_MExy[mtyp][testtyp][0] = -2;
881  //MEy test
882  if (QReport_MExy[mtyp][testtyp][1]){
883  if (QReport_MExy[mtyp][testtyp][1]->getStatus()==100 ||
884  QReport_MExy[mtyp][testtyp][1]->getStatus()==200)
885  qr_MET_MExy[mtyp][testtyp][1] = 1;
886  else if (QReport_MExy[mtyp][testtyp][1]->getStatus()==300)
887  qr_MET_MExy[mtyp][testtyp][1] = 0;
888  else
889  qr_MET_MExy[mtyp][testtyp][1] = -1;
890  }
891  else qr_MET_MExy[mtyp][testtyp][1] = -2;
892 
893  //MEt test
894  if (QReport_MEt[mtyp][testtyp]){
895  if (QReport_MEt[mtyp][testtyp]->getStatus()==100 ||
896  QReport_MEt[mtyp][testtyp]->getStatus()==200)
897  qr_MET_MEt[mtyp][testtyp] = 1;
898  else if (QReport_MEt[mtyp][testtyp]->getStatus()==300)
899  qr_MET_MEt[mtyp][testtyp] = 0;
900  else
901  qr_MET_MEt[mtyp][testtyp] = -1;
902  }
903  else{
904  qr_MET_MEt[mtyp][testtyp] = -2;
905  }
906  //SumEt test
907  if (QReport_SumEt[mtyp][testtyp]){
908  if (QReport_SumEt[mtyp][testtyp]->getStatus()==100 ||
909  QReport_SumEt[mtyp][testtyp]->getStatus()==200)
910  qr_MET_SumEt[mtyp][testtyp] = 1;
911  else if (QReport_SumEt[mtyp][testtyp]->getStatus()==300)
912  qr_MET_SumEt[mtyp][testtyp] = 0;
913  else
914  qr_MET_SumEt[mtyp][testtyp] = -1;
915  }
916  else{
917  qr_MET_SumEt[mtyp][testtyp] = -2;
918  }
919  //METPhi test
920  if (QReport_METPhi[mtyp][testtyp]){
921  if (QReport_METPhi[mtyp][testtyp]->getStatus()==100 ||
922  QReport_METPhi[mtyp][testtyp]->getStatus()==200)
923  qr_MET_METPhi[mtyp][testtyp] = 1;
924  else if (QReport_METPhi[mtyp][testtyp]->getStatus()==300)
925  qr_MET_METPhi[mtyp][testtyp] = 0;
926  else
927  qr_MET_METPhi[mtyp][testtyp] = -1;
928  }
929  else{
930  qr_MET_METPhi[mtyp][testtyp] = -2;
931  }
932  }
933 
934 
935  if (verbose_) {
936  //certification result for MET
937  printf("====================MET Type %d QTest Report Summary========================\n",mtyp);
938  printf("MEx test MEy test MEt test: SumEt test: METPhi test:\n");
939  for (int tt = 0; tt < 2; ++tt) {
940  printf("%2.2f %2.2f %2.2f %2.2f %2.2f\n",qr_MET_MExy[mtyp][tt][0], \
941  qr_MET_MExy[mtyp][tt][1], \
942  qr_MET_MEt[mtyp][tt], \
943  qr_MET_SumEt[mtyp][tt], \
944  qr_MET_METPhi[mtyp][tt]);
945  }
946  printf("===========================================================================\n");
947  }
948 
949 
950  //Only apply certain tests, as defined in the config
951  for (int ttyp = 0; ttyp < 2; ++ttyp) {
952  if (!metTests[mtyp][ttyp]) {
953  qr_MET_MExy[mtyp][ttyp][0] = 1;
954  qr_MET_MExy[mtyp][ttyp][1] = 1;
955  qr_MET_MEt[mtyp][ttyp] = 1;
956  qr_MET_SumEt[mtyp][ttyp] = 1;
957  qr_MET_METPhi[mtyp][ttyp] = 1;
958  }
959  }
960 
961 
962  if (
963  (qr_MET_MExy[mtyp][0][0] == 0) ||
964  (qr_MET_MExy[mtyp][0][1] == 0) ||
965  (qr_MET_MEt[mtyp][0] == 0) ||
966  (qr_MET_SumEt[mtyp][0] == 0) ||
967  (qr_MET_METPhi[mtyp][0] == 0) ||
968  (qr_MET_MExy[mtyp][1][0] == 0) ||
969  (qr_MET_MExy[mtyp][1][1] == 0) ||
970  (qr_MET_MEt[mtyp][1] == 0) ||
971  (qr_MET_SumEt[mtyp][1] == 0) ||
972  (qr_MET_METPhi[mtyp][1] == 0)
973  )
974  dc_MET[mtyp] = 0;
975  else if (
976  (qr_MET_MExy[mtyp][0][0] == -1) &&
977  (qr_MET_MExy[mtyp][0][1] == -1) &&
978  (qr_MET_MEt[mtyp][0] == -1) &&
979  (qr_MET_SumEt[mtyp][0] == -1) &&
980  (qr_MET_METPhi[mtyp][0] == -1) &&
981  (qr_MET_MExy[mtyp][1][0] == -1) &&
982  (qr_MET_MExy[mtyp][1][1] == -1) &&
983  (qr_MET_MEt[mtyp][1] == -1) &&
984  (qr_MET_SumEt[mtyp][1] == -1) &&
985  (qr_MET_METPhi[mtyp][1] == -1)
986  )
987  dc_MET[mtyp] = -1;
988  else if (
989  (qr_MET_MExy[mtyp][0][0] == -2) &&
990  (qr_MET_MExy[mtyp][0][1] == -2) &&
991  (qr_MET_MEt[mtyp][0] == -2) &&
992  (qr_MET_SumEt[mtyp][0] == -2) &&
993  (qr_MET_METPhi[mtyp][0] == -2) &&
994  (qr_MET_MExy[mtyp][1][0] == -2) &&
995  (qr_MET_MExy[mtyp][1][1] == -2) &&
996  (qr_MET_MEt[mtyp][1] == -2) &&
997  (qr_MET_SumEt[mtyp][1] == -2) &&
998  (qr_MET_METPhi[mtyp][1] == -2)
999  )
1000  dc_MET[mtyp] = -2;
1001  else
1002  dc_MET[mtyp] = 1;
1003 
1004  if (verbose_) std::cout<<"Certifying MET algo: "<<mtyp<<" with value: "<<dc_MET[mtyp]<<std::endl;
1005  CertificationSummaryMap->Fill(1, 4-mtyp, dc_MET[mtyp]);
1006  reportSummaryMap->Fill(1, 4-mtyp, dc_MET[mtyp]);
1007  }
1008 
1009 
1010  //----------------------------------------------------------------------------
1011  //--- Extract quality test results and fill data certification results for MET
1012  //----------------------------------------------------------------------------
1013  // Commenting out unused but initialized variables. [Suchandra Dutta]
1014  float dc_CT[3] = {-2.};
1015  dc_CT[0] = -2.;
1016  dc_CT[1] = -2.;
1017  dc_CT[2] = -2.;
1018 
1019  for (int cttyp = 0; cttyp < 3; ++cttyp) {
1020 
1021  if (verbose_) std::cout<<"Certifying CaloTowers with value: "<<dc_CT[cttyp]<<std::endl;
1022  CertificationSummaryMap->Fill(0, 4-cttyp, dc_CT[cttyp]);
1023  reportSummaryMap->Fill(0, 4-cttyp, dc_CT[cttyp]);
1024  }
1025  ibook_.setCurrentFolder("");
1026 }
1027 
1028 //define this as a plug-in
1029 //DEFINE_FWK_MODULE(DataCertificationJetMET);
MonitorElement * mMVAPUJIDDiscriminant_lowPt_Forward_MiniAOD_over_Reco
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
int i
Definition: DBlmapReader.cc:9
MonitorElement * mMET_nVtx_profile_MiniAOD_over_Reco
const QReport * getQReport(const std::string &qtname) const
get QReport corresponding to &lt;qtname&gt; (null pointer if QReport does not exist)
MonitorElement * mMVAPUJIDDiscriminant_lowPt_EndCap_MiniAOD_over_Reco
void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * mPt_MiniAOD_over_Reco
MonitorElement * mMuonMultiplicity_MiniAOD_over_Reco
MonitorElement * CertificationSummaryMap
MonitorElement * get(const std::string &path)
Definition: DQMStore.cc:302
MonitorElement * mMVAPUJIDDiscriminant_mediumPt_EndCap_MiniAOD_over_Reco
MonitorElement * mNeutralHadronEtFraction_MiniAOD_over_Reco
MonitorElement * mHFEFracVSpT_Forward_MiniAOD_over_Reco
MonitorElement * mPt_Barrel_MiniAOD_over_Reco
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)
MonitorElement * mMET_MiniAOD_over_Reco
MonitorElement * mChargedHadronEtFraction_MiniAOD_over_Reco
MonitorElement * mSumET_logx_MiniAOD_over_Reco
MonitorElement * mDPhi_MiniAOD_over_Reco
MonitorElement * mHFHadronEtFraction_MiniAOD_over_Reco
MonitorElement * mLooseJIDPassFractionVSeta_MiniAOD_over_Reco
void Fill(long long x)
MonitorElement * mMVAPUJIDDiscriminant_highPt_Barrel_MiniAOD_over_Reco
MonitorElement * mCHFrac_MiniAOD_over_Reco
MonitorElement * mPt_uncor_MiniAOD_over_Reco
MonitorElement * mNjets_MiniAOD_over_Reco
MonitorElement * mPt_EndCap_MiniAOD_over_Reco
MonitorElement * mPhotonEtFraction_MiniAOD_over_Reco
MonitorElement * mMETPhi_MiniAOD_over_Reco
MonitorElement * mNHFrac_MiniAOD_over_Reco
MonitorElement * mEta_MiniAOD_over_Reco
MonitorElement * mPhi_MiniAOD_over_Reco
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
int j
Definition: DBlmapReader.cc:9
MonitorElement * mNeutralFraction_MiniAOD_over_Reco
MonitorElement * mHFEMEtFraction_MiniAOD_over_Reco
MonitorElement * CertificationSummary
TObject * getRootObject(void) const
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:274
MonitorElement * mPhFracVSpT_Barrel_MiniAOD_over_Reco
MonitorElement * mSumET_MiniAOD_over_Reco
MonitorElement * mPt_Forward_MiniAOD_over_Reco
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:133
MonitorElement * mCHFracVSpT_Barrel_MiniAOD_over_Reco
MonitorElement * mJetEnergyCorrVSeta_MiniAOD_over_Reco
MonitorElement * mJetEnergyCorr_MiniAOD_over_Reco
virtual void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &)
MonitorElement * mPhi_uncor_MiniAOD_over_Reco
MonitorElement * mNeutralMultiplicity_MiniAOD_over_Reco
MonitorElement * mPhFrac_MiniAOD_over_Reco
std::string const & label() const
Definition: InputTag.h:43
std::vector< std::string > getSubdirs(void)
Definition: DQMStore.cc:306
MonitorElement * mMVAPUJIDDiscriminant_lowPt_Barrel_MiniAOD_over_Reco
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:330
double getBinContent(int binx) const
get content of bin (1-D)
MonitorElement * mMEy_MiniAOD_over_Reco
MonitorElement * mChargedMultiplicity_MiniAOD_over_Reco
int getNbinsX(void) const
get # of bins in X-axis
tuple cout
Definition: gather_cfg.py:121
MonitorElement * bookFloat(Args &&...args)
Definition: DQMStore.h:109
MonitorElement * mSumET_nVtx_profile_MiniAOD_over_Reco
TH2F * getTH2F(void) const
MonitorElement * mPhotonEtFraction_nVtx_profile_MiniAOD_over_Reco
MonitorElement * mNHFracVSpT_EndCap_MiniAOD_over_Reco
MonitorElement * mNeutralHadronEtFraction_nVtx_profile_MiniAOD_over_Reco
MonitorElement * mChargedHadronEtFraction_nVtx_profile_MiniAOD_over_Reco
MonitorElement * mEta_uncor_MiniAOD_over_Reco
MonitorElement * mHFHFracVSpT_Forward_MiniAOD_over_Reco
MonitorElement * mMET_logx_MiniAOD_over_Reco
DataCertificationJetMET(const edm::ParameterSet &)