CMS 3D CMS Logo

JetAnalyzer.cc
Go to the documentation of this file.
1 
16 
29 
33 
54 
55 #include <string>
56 
57 #include <cmath>
58 
59 using namespace edm;
60 using namespace reco;
61 using namespace std;
62 
63 // ***********************************************************
65 //: trackPropagator_(new jetAnalysis::TrackPropagatorToCalo)//,
66 //sOverNCalculator_(new jetAnalysis::StripSignalOverNoiseCalculator)
67 {
68  parameters_ = pSet.getParameter<edm::ParameterSet>("jetAnalysis");
69  mInputCollection_ = pSet.getParameter<edm::InputTag>("jetsrc");
70  m_l1algoname_ = pSet.getParameter<std::string>("l1algoname");
71  m_bitAlgTechTrig_ = -1;
72 
73  jetType_ = pSet.getParameter<std::string>("JetType");
74  m_l1algoname_ = pSet.getParameter<std::string>("l1algoname");
75 
76  fill_jet_high_level_histo = pSet.getParameter<bool>("filljetHighLevel"),
77  filljetsubstruc_ = pSet.getParameter<bool>("fillsubstructure");
78  pt_min_boosted_ = pSet.getParameter<double>("ptMinBoosted");
79 
80  isCaloJet_ = (std::string("calo") == jetType_);
81  //isJPTJet_ = (std::string("jpt") ==jetType_);
82  isPFJet_ = (std::string("pf") == jetType_);
83  isMiniAODJet_ = (std::string("miniaod") == jetType_);
84  jetCorrectorTag_ = pSet.getParameter<edm::InputTag>("JetCorrections");
85  if (!isMiniAODJet_) { //in MiniAOD jet is already corrected
86  jetCorrectorToken_ = consumes<reco::JetCorrector>(jetCorrectorTag_);
87  }
88 
89  if (isCaloJet_) {
90  caloJetsToken_ = consumes<reco::CaloJetCollection>(mInputCollection_);
91  // MET information
92  caloMetToken_ =
93  consumes<reco::CaloMETCollection>(edm::InputTag(pSet.getParameter<edm::InputTag>("METCollectionLabel")));
94  }
95  //if (isJPTJet_) jptJetsToken_ = consumes<reco::JPTJetCollection>(mInputCollection_);
96  if (isPFJet_) {
97  pfJetsToken_ = consumes<reco::PFJetCollection>(mInputCollection_);
98  MuonsToken_ = consumes<reco::MuonCollection>(pSet.getParameter<edm::InputTag>("muonsrc"));
99  pfMetToken_ =
100  consumes<reco::PFMETCollection>(edm::InputTag(pSet.getParameter<edm::InputTag>("METCollectionLabel")));
101  }
102  if (isMiniAODJet_) {
103  patJetsToken_ = consumes<pat::JetCollection>(mInputCollection_);
104  patMetToken_ = consumes<pat::METCollection>(edm::InputTag(pSet.getParameter<edm::InputTag>("METCollectionLabel")));
105  }
106  cutBasedPUDiscriminantToken_ =
107  consumes<edm::ValueMap<float> >(pSet.getParameter<edm::InputTag>("InputCutPUIDDiscriminant"));
108  cutBasedPUIDToken_ = consumes<edm::ValueMap<int> >(pSet.getParameter<edm::InputTag>("InputCutPUIDValue"));
109  mvaPUIDToken_ = consumes<edm::ValueMap<int> >(pSet.getParameter<edm::InputTag>("InputMVAPUIDValue"));
110  mvaFullPUDiscriminantToken_ =
111  consumes<edm::ValueMap<float> >(pSet.getParameter<edm::InputTag>("InputMVAPUIDDiscriminant"));
112 
113  qgMultiplicityToken_ = consumes<edm::ValueMap<int> >(pSet.getParameter<edm::InputTag>("InputQGMultiplicity"));
114  qgLikelihoodToken_ = consumes<edm::ValueMap<float> >(pSet.getParameter<edm::InputTag>("InputQGLikelihood"));
115  qgptDToken_ = consumes<edm::ValueMap<float> >(pSet.getParameter<edm::InputTag>("InputQGPtDToken"));
116  qgaxis2Token_ = consumes<edm::ValueMap<float> >(pSet.getParameter<edm::InputTag>("InputQGAxis2"));
117 
118  fill_CHS_histos = pSet.getParameter<bool>("fillCHShistos");
119 
120  JetIDQuality_ = pSet.getParameter<string>("JetIDQuality");
121  JetIDVersion_ = pSet.getParameter<string>("JetIDVersion");
122 
123  // JetID definitions for Calo and JPT Jets
124  if (isCaloJet_) {
125  inputJetIDValueMap = pSet.getParameter<edm::InputTag>("InputJetIDValueMap");
126  jetID_ValueMapToken_ = consumes<edm::ValueMap<reco::JetID> >(inputJetIDValueMap);
127  if (JetIDVersion_ == "PURE09") {
128  jetidversion = JetIDSelectionFunctor::PURE09;
129  } else if (JetIDVersion_ == "DQM09") {
130  jetidversion = JetIDSelectionFunctor::DQM09;
131  } else if (JetIDVersion_ == "CRAFT08") {
132  jetidversion = JetIDSelectionFunctor::CRAFT08;
133  } else {
134  if (verbose_)
135  std::cout << "no Valid JetID version given" << std::endl;
136  }
137  if (JetIDQuality_ == "MINIMAL") {
138  jetidquality = JetIDSelectionFunctor::MINIMAL;
139  } else if (JetIDQuality_ == "LOOSE_AOD") {
140  jetidquality = JetIDSelectionFunctor::LOOSE_AOD;
141  } else if (JetIDQuality_ == "LOOSE") {
142  jetidquality = JetIDSelectionFunctor::LOOSE;
143  } else if (JetIDQuality_ == "TIGHT") {
144  jetidquality = JetIDSelectionFunctor::TIGHT;
145  } else {
146  if (verbose_)
147  std::cout << "no Valid JetID quality given" << std::endl;
148  }
149  jetIDFunctor = JetIDSelectionFunctor(jetidversion, jetidquality);
150  }
151 
152  //Jet ID definitions for PFJets
153  if (isPFJet_ || isMiniAODJet_) {
154  if (JetIDVersion_ == "FIRSTDATA") {
155  pfjetidversion = PFJetIDSelectionFunctor::FIRSTDATA;
156  } else if (JetIDVersion_ == "RUNIISTARTUP") {
157  pfjetidversion = PFJetIDSelectionFunctor::RUNIISTARTUP;
158  } else if (JetIDVersion_ == "WINTER16") {
159  pfjetidversion = PFJetIDSelectionFunctor::WINTER16;
160  } else if (JetIDVersion_ == "WINTER17") {
161  pfjetidversion = PFJetIDSelectionFunctor::WINTER17;
162  } else if (JetIDVersion_ == "WINTER17PUPPI") {
164  } else {
165  if (verbose_)
166  std::cout << "no valid PF JetID version given" << std::endl;
167  }
168  if (JetIDQuality_ == "LOOSE") {
169  pfjetidquality = PFJetIDSelectionFunctor::LOOSE;
170  } else if (JetIDQuality_ == "TIGHT") {
171  pfjetidquality = PFJetIDSelectionFunctor::TIGHT;
172  } else {
173  if (verbose_)
174  std::cout << "no Valid PFJetID quality given" << std::endl;
175  }
176  pfjetIDFunctor = PFJetIDSelectionFunctor(pfjetidversion, pfjetidquality);
177  }
178  //check later if some of those are also needed for PFJets
179  leadJetFlag_ = 0;
180  jetLoPass_ = 0;
181  jetHiPass_ = 0;
182  ptThreshold_ = 20.;
183  ptThresholdUnc_ = 20.;
184  asymmetryThirdJetCut_ = 5.;
185  balanceThirdJetCut_ = 0.2;
186 
187  theTriggerResultsLabel_ = pSet.getParameter<edm::InputTag>("TriggerResultsLabel");
188  triggerResultsToken_ = consumes<edm::TriggerResults>(edm::InputTag(theTriggerResultsLabel_));
189  //
190  runcosmics_ = pSet.getUntrackedParameter<bool>("runcosmics", false);
191  jetCleaningFlag_ = pSet.getUntrackedParameter<bool>("JetCleaningFlag", true);
192 
193  if (runcosmics_) {
194  jetCleaningFlag_ = false;
195  }
196 
197  // ==========================================================
198  //DCS information
199  // ==========================================================
200  edm::ConsumesCollector iC = consumesCollector();
201  DCSFilterForJetMonitoring_ = new JetMETDQMDCSFilter(pSet.getParameter<ParameterSet>("DCSFilterForJetMonitoring"), iC);
202  DCSFilterForDCSMonitoring_ = new JetMETDQMDCSFilter("ecal:hbhe:hf:ho:pixel:sistrip:es:muon", iC);
203 
204  //Trigger selectoin
205  edm::ParameterSet highptjetparms = pSet.getParameter<edm::ParameterSet>("highPtJetTrigger");
206  edm::ParameterSet lowptjetparms = pSet.getParameter<edm::ParameterSet>("lowPtJetTrigger");
207 
208  highPtJetEventFlag_ =
209  new GenericTriggerEventFlag(highptjetparms, consumesCollector(), *this, l1t::UseEventSetupIn::Run);
210  lowPtJetEventFlag_ =
211  new GenericTriggerEventFlag(lowptjetparms, consumesCollector(), *this, l1t::UseEventSetupIn::Run);
212 
213  highPtJetExpr_ = highptjetparms.getParameter<std::vector<std::string> >("hltPaths");
214  lowPtJetExpr_ = lowptjetparms.getParameter<std::vector<std::string> >("hltPaths");
215 
216  processname_ = pSet.getParameter<std::string>("processname");
217 
218  //jet cleanup parameters
219  cleaningParameters_ = pSet.getParameter<ParameterSet>("CleaningParameters");
220 
221  bypassAllPVChecks_ = cleaningParameters_.getParameter<bool>("bypassAllPVChecks");
222  vertexLabel_ = cleaningParameters_.getParameter<edm::InputTag>("vertexCollection");
223  vertexToken_ = consumes<std::vector<reco::Vertex> >(edm::InputTag(vertexLabel_));
224 
225  gtLabel_ = cleaningParameters_.getParameter<edm::InputTag>("gtLabel");
226  gtToken_ = consumes<L1GlobalTriggerReadoutRecord>(edm::InputTag(gtLabel_));
227 
228  std::string inputCollectionLabel(mInputCollection_.label());
229  verbose_ = parameters_.getParameter<int>("verbose");
230  // monitoring of eta parameter
231  etaBin_ = parameters_.getParameter<int>("etaBin");
232  etaMin_ = parameters_.getParameter<double>("etaMin");
233  etaMax_ = parameters_.getParameter<double>("etaMax");
234  // monitoring of phi paramater
235  phiBin_ = parameters_.getParameter<int>("phiBin");
236  phiMin_ = parameters_.getParameter<double>("phiMin");
237  phiMax_ = parameters_.getParameter<double>("phiMax");
238  // monitoring of the transverse momentum
239  ptBin_ = parameters_.getParameter<int>("ptBin");
240  ptMin_ = parameters_.getParameter<double>("ptMin");
241  ptMax_ = parameters_.getParameter<double>("ptMax");
242  //
243  eBin_ = parameters_.getParameter<int>("eBin");
244  eMin_ = parameters_.getParameter<double>("eMin");
245  eMax_ = parameters_.getParameter<double>("eMax");
246  //
247  pBin_ = parameters_.getParameter<int>("pBin");
248  pMin_ = parameters_.getParameter<double>("pMin");
249  pMax_ = parameters_.getParameter<double>("pMax");
250  //
251  nbinsPV_ = parameters_.getParameter<int>("pVBin");
252  nPVlow_ = parameters_.getParameter<double>("pVMin");
253  nPVhigh_ = parameters_.getParameter<double>("pVMax");
254  //
255  ptThreshold_ = parameters_.getParameter<double>("ptThreshold");
256  ptThresholdUnc_ = parameters_.getParameter<double>("ptThresholdUnc");
257  asymmetryThirdJetCut_ = parameters_.getParameter<double>("asymmetryThirdJetCut");
258  balanceThirdJetCut_ = parameters_.getParameter<double>("balanceThirdJetCut");
259 }
260 
261 // ***********************************************************
263  delete highPtJetEventFlag_;
264  delete lowPtJetEventFlag_;
265 
266  delete DCSFilterForDCSMonitoring_;
267  delete DCSFilterForJetMonitoring_;
268  LogTrace("JetAnalyzer") << "[JetAnalyzer] Saving the histos";
269 }
270 
271 // ***********************************************************
273  // dbe_ = edm::Service<DQMStore>().operator->();
274  if (jetCleaningFlag_) {
275  ibooker.setCurrentFolder("JetMET/Jet/Cleaned" + mInputCollection_.label());
276  DirName = "JetMET/Jet/Cleaned" + mInputCollection_.label();
277  } else {
278  ibooker.setCurrentFolder("JetMET/Jet/Uncleaned" + mInputCollection_.label());
279  DirName = "JetMET/Jet/Uncleaned" + mInputCollection_.label();
280  }
281 
282  jetME = ibooker.book1D("jetReco", "jetReco", 4, 1, 5);
283  jetME->setBinLabel(1, "CaloJets", 1);
284  jetME->setBinLabel(2, "PFJets", 1);
285  jetME->setBinLabel(3, "JPTJets", 1);
286  jetME->setBinLabel(4, "MiniAODJets", 1);
287 
288  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "jetReco", jetME));
289 
290  mPt = ibooker.book1D("Pt", "pt", ptBin_, ptMin_, ptMax_);
291  mEta = ibooker.book1D("Eta", "eta", etaBin_, etaMin_, etaMax_);
292  mPhi = ibooker.book1D("Phi", "phi", phiBin_, phiMin_, phiMax_);
293  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "Pt", mPt));
294  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "Eta", mEta));
295  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "Phi", mPhi));
296 
297  //if(!isJPTJet_){
298  mConstituents = ibooker.book1D("Constituents", "# of constituents", 50, 0, 100);
299  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "Constituents", mConstituents));
300  //}
301  mJetEnergyCorr = ibooker.book1D("JetEnergyCorr", "jet energy correction factor", 50, 0.0, 3.0);
302  mJetEnergyCorrVSEta = ibooker.bookProfile(
303  "JetEnergyCorrVSEta", "jet energy correction factor VS eta", etaBin_, etaMin_, etaMax_, 0.0, 3.0);
304  mJetEnergyCorrVSPt =
305  ibooker.bookProfile("JetEnergyCorrVSPt", "jet energy correction factor VS pt", ptBin_, ptMin_, ptMax_, 0.0, 3.0);
306  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "JetEnergyCorr", mJetEnergyCorr));
307  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "JetEnergyCorrVSEta", mJetEnergyCorrVSEta));
308  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "JetEnergyCorrVSPt", mJetEnergyCorrVSPt));
309 
310  mPt_uncor = ibooker.book1D("Pt_uncor", "pt for uncorrected jets", ptBin_, ptThresholdUnc_, ptMax_);
311  mEta_uncor = ibooker.book1D("Eta_uncor", "eta for uncorrected jets", etaBin_, etaMin_, etaMax_);
312  mPhi_uncor = ibooker.book1D("Phi_uncor", "phi for uncorrected jets", phiBin_, phiMin_, phiMax_);
313  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "Pt_uncor", mPt_uncor));
314  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "Eta_uncor", mEta_uncor));
315  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "Phi_uncor", mPhi_uncor));
316  //if(!isJPTJet_){
317  mConstituents_uncor = ibooker.book1D("Constituents_uncor", "# of constituents for uncorrected jets", 50, 0, 100);
318  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "Constituents_uncor", mConstituents_uncor));
319  //}
320 
321  mDPhi = ibooker.book1D("DPhi", "dPhi btw the two leading jets", 100, 0., acos(-1.));
322  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "DPhi", mDPhi));
323 
324  // Book NPV profiles
325  //----------------------------------------------------------------------------
326  mPt_profile = ibooker.bookProfile("Pt_profile", "pt", nbinsPV_, nPVlow_, nPVhigh_, ptBin_, ptMin_, ptMax_);
327  mEta_profile = ibooker.bookProfile("Eta_profile", "eta", nbinsPV_, nPVlow_, nPVhigh_, etaBin_, etaMin_, etaMax_);
328  mPhi_profile = ibooker.bookProfile("Phi_profile", "phi", nbinsPV_, nPVlow_, nPVhigh_, phiBin_, phiMin_, phiMax_);
329  //if(!isJPTJet_){
330  mConstituents_profile =
331  ibooker.bookProfile("Constituents_profile", "# of constituents", nbinsPV_, nPVlow_, nPVhigh_, 50, 0, 100);
332  //}
333  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "Pt_profile", mPt_profile));
334  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "Eta_profile", mEta_profile));
335  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "Phi_profile", mPhi_profile));
336 
337  if (!runcosmics_) { //JIDPassFrac_ defines a collection of cleaned jets, for which we will want to fill the cleaning passing fraction
338  mLooseJIDPassFractionVSeta =
339  ibooker.bookProfile("JetIDPassFractionVSeta", "JetIDPassFractionVSeta", etaBin_, etaMin_, etaMax_, 0., 1.2);
340  mLooseJIDPassFractionVSpt =
341  ibooker.bookProfile("JetIDPassFractionVSpt", "JetIDPassFractionVSpt", ptBin_, ptMin_, ptMax_, 0., 1.2);
342  mLooseJIDPassFractionVSptNoHF =
343  ibooker.bookProfile("JetIDPassFractionVSptNoHF", "JetIDPassFractionVSptNoHF", ptBin_, ptMin_, ptMax_, 0., 1.2);
344  map_of_MEs.insert(
345  std::pair<std::string, MonitorElement*>(DirName + "/" + "JetIDPassFractionVSeta", mLooseJIDPassFractionVSeta));
346  map_of_MEs.insert(
347  std::pair<std::string, MonitorElement*>(DirName + "/" + "JetIDPassFractionVSpt", mLooseJIDPassFractionVSpt));
348  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "JetIDPassFractionVSptNoHF",
349  mLooseJIDPassFractionVSptNoHF));
350  }
351 
352  mNJets_profile = ibooker.bookProfile("NJets_profile", "number of jets", nbinsPV_, nPVlow_, nPVhigh_, 100, 0, 100);
353 
354  // Set NPV profiles x-axis title
355  //----------------------------------------------------------------------------
356  mPt_profile->setAxisTitle("nvtx", 1);
357  mEta_profile->setAxisTitle("nvtx", 1);
358  mPhi_profile->setAxisTitle("nvtx", 1);
359  //if(!isJPTJet_){
360  mConstituents_profile->setAxisTitle("nvtx", 1);
361  map_of_MEs.insert(
362  std::pair<std::string, MonitorElement*>(DirName + "/" + "Constituents_profile", mConstituents_profile));
363  //}
364  mNJets_profile->setAxisTitle("nvtx", 1);
365 
366  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "Pt_profile", mPt_profile));
367  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "Eta_profile", mEta_profile));
368  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "Phi_profile", mPhi_profile));
369  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "NJets_profile", mNJets_profile));
370 
371  mPhiVSEta = ibooker.book2D("PhiVSEta", "PhiVSEta", 50, etaMin_, etaMax_, 24, phiMin_, phiMax_);
372  mPhiVSEta->setOption("colz");
373  mPhiVSEta->setAxisTitle("#eta", 1);
374  mPhiVSEta->setAxisTitle("#phi", 2);
375  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "PhiVSEta", mPhiVSEta));
376 
377  mPt_1 = ibooker.book1D("Pt_1", "Pt spectrum of jets - range 1", 20, 0, 100);
378  mPt_2 = ibooker.book1D("Pt_2", "Pt spectrum of jets - range 2", 60, 0, 300);
379  mPt_3 = ibooker.book1D("Pt_3", "Pt spectrum of jets - range 3", 100, 0, 5000);
380  // Low and high pt trigger paths
381  mPt_Lo = ibooker.book1D("Pt_Lo", "Pt (Pass Low Pt Jet Trigger)", 20, 0, 100);
382  //mEta_Lo = ibooker.book1D("Eta_Lo", "Eta (Pass Low Pt Jet Trigger)", etaBin_, etaMin_, etaMax_);
383  mPhi_Lo = ibooker.book1D("Phi_Lo", "Phi (Pass Low Pt Jet Trigger)", phiBin_, phiMin_, phiMax_);
384 
385  mPt_Hi = ibooker.book1D("Pt_Hi", "Pt (Pass Hi Pt Jet Trigger)", 60, 0, 300);
386  mEta_Hi = ibooker.book1D("Eta_Hi", "Eta (Pass Hi Pt Jet Trigger)", etaBin_, etaMin_, etaMax_);
387  mPhi_Hi = ibooker.book1D("Phi_Hi", "Phi (Pass Hi Pt Jet Trigger)", phiBin_, phiMin_, phiMax_);
388  mNJets = ibooker.book1D("NJets", "number of jets", 100, 0, 100);
389 
390  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "Pt_1", mPt_1));
391  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "Pt_2", mPt_2));
392  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "Pt_3", mPt_3));
393  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "Pt_Lo", mPt_Lo));
394  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "Phi_Lo", mPhi_Lo));
395  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "Pt_Hi", mPt_Hi));
396  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "Eta_Hi", mEta_Hi));
397  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "Phi_Hi", mPhi_Hi));
398  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "NJets", mNJets));
399 
400  //mPt_Barrel_Lo = ibooker.book1D("Pt_Barrel_Lo", "Pt Barrel (Pass Low Pt Jet Trigger)", 20, 0, 100);
401  //mPhi_Barrel_Lo = ibooker.book1D("Phi_Barrel_Lo", "Phi Barrel (Pass Low Pt Jet Trigger)", phiBin_, phiMin_, phiMax_);
402  //if(!isJPTJet_){
403  mConstituents_Barrel = ibooker.book1D("Constituents_Barrel", "Constituents Barrel", 50, 0, 100);
404  map_of_MEs.insert(
405  std::pair<std::string, MonitorElement*>(DirName + "/" + "Constituents_Barrel", mConstituents_Barrel));
406  //}
407 
408  //mPt_EndCap_Lo = ibooker.book1D("Pt_EndCap_Lo", "Pt EndCap (Pass Low Pt Jet Trigger)", 20, 0, 100);
409  //mPhi_EndCap_Lo = ibooker.book1D("Phi_EndCap_Lo", "Phi EndCap (Pass Low Pt Jet Trigger)", phiBin_, phiMin_, phiMax_);
410  //if(!isJPTJet_){
411  mConstituents_EndCap = ibooker.book1D("Constituents_EndCap", "Constituents EndCap", 50, 0, 100);
412  map_of_MEs.insert(
413  std::pair<std::string, MonitorElement*>(DirName + "/" + "Constituents_EndCap", mConstituents_EndCap));
414  //}
415 
416  //mPt_Forward_Lo = ibooker.book1D("Pt_Forward_Lo", "Pt Forward (Pass Low Pt Jet Trigger)", 20, 0, 100);
417  //mPhi_Forward_Lo = ibooker.book1D("Phi_Forward_Lo", "Phi Forward (Pass Low Pt Jet Trigger)", phiBin_, phiMin_, phiMax_);
418  //if(!isJPTJet_){
419  mConstituents_Forward = ibooker.book1D("Constituents_Forward", "Constituents Forward", 50, 0, 100);
420  map_of_MEs.insert(
421  std::pair<std::string, MonitorElement*>(DirName + "/" + "Constituents_Forward", mConstituents_Forward));
422  //}
423 
424  mPt_Barrel_Hi = ibooker.book1D("Pt_Barrel_Hi", "Pt Barrel (Pass Hi Pt Jet Trigger)", 60, 0, 300);
425  mPhi_Barrel_Hi = ibooker.book1D("Phi_Barrel_Hi", "Phi Barrel (Pass Hi Pt Jet Trigger)", phiBin_, phiMin_, phiMax_);
426 
427  mPt_EndCap_Hi = ibooker.book1D("Pt_EndCap_Hi", "Pt EndCap (Pass Hi Pt Jet Trigger)", 60, 0, 300);
428  mPhi_EndCap_Hi = ibooker.book1D("Phi_EndCap_Hi", "Phi EndCap (Pass Hi Pt Jet Trigger)", phiBin_, phiMin_, phiMax_);
429 
430  mPt_Forward_Hi = ibooker.book1D("Pt_Forward_Hi", "Pt Forward (Pass Hi Pt Jet Trigger)", 60, 0, 300);
431  mPhi_Forward_Hi = ibooker.book1D("Phi_Forward_Hi", "Phi Forward (Pass Hi Pt Jet Trigger)", phiBin_, phiMin_, phiMax_);
432 
433  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "Pt_Barrel_Hi", mPt_Barrel_Hi));
434  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "Phi_Barrel_Hi", mPhi_Barrel_Hi));
435  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "Pt_EndCap_Hi", mPt_EndCap_Hi));
436  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "Phi_EndCap_Hi", mPhi_EndCap_Hi));
437  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "Pt_Forward_Hi", mPt_Forward_Hi));
438  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "Phi_Forward_Hi", mPhi_Forward_Hi));
439 
440  mPhi_Barrel = ibooker.book1D("Phi_Barrel", "Phi_Barrel", phiBin_, phiMin_, phiMax_);
441  mPt_Barrel = ibooker.book1D("Pt_Barrel", "Pt_Barrel", ptBin_, ptMin_, ptMax_);
442 
443  mPhi_EndCap = ibooker.book1D("Phi_EndCap", "Phi_EndCap", phiBin_, phiMin_, phiMax_);
444  mPt_EndCap = ibooker.book1D("Pt_EndCap", "Pt_EndCap", ptBin_, ptMin_, ptMax_);
445 
446  mPhi_Forward = ibooker.book1D("Phi_Forward", "Phi_Forward", phiBin_, phiMin_, phiMax_);
447  mPt_Forward = ibooker.book1D("Pt_Forward", "Pt_Forward", ptBin_, ptMin_, ptMax_);
448 
449  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "Pt_Barrel", mPt_Barrel));
450  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "Phi_Barrel", mPhi_Barrel));
451  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "Pt_EndCap", mPt_EndCap));
452  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "Phi_EndCap", mPhi_EndCap));
453  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "Pt_Forward", mPt_Forward));
454  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "Phi_Forward", mPhi_Forward));
455 
456  // Leading Jet Parameters
457  mEtaFirst = ibooker.book1D("EtaFirst", "EtaFirst", 50, -5, 5);
458  mPhiFirst = ibooker.book1D("PhiFirst", "PhiFirst", 70, phiMin_, phiMax_);
459  mPtFirst = ibooker.book1D("PtFirst", "PtFirst", ptBin_, ptMin_, ptMax_);
460 
461  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "EtaFirst", mEtaFirst));
462  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "PtFirst", mPtFirst));
463  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "PhiFirst", mPhiFirst));
464 
465  //--- Calo jet selection only
466  if (isCaloJet_) {
467  // CaloJet specific
468  mHadEnergyInHO = ibooker.book1D("HadEnergyInHO", "HadEnergyInHO", 50, 0, 20);
469  mHadEnergyInHB = ibooker.book1D("HadEnergyInHB", "HadEnergyInHB", 50, 0, 100);
470  mHadEnergyInHF = ibooker.book1D("HadEnergyInHF", "HadEnergyInHF", 50, 0, 100);
471  mHadEnergyInHE = ibooker.book1D("HadEnergyInHE", "HadEnergyInHE", 50, 0, 200);
472  mEmEnergyInEB = ibooker.book1D("EmEnergyInEB", "EmEnergyInEB", 50, 0, 100);
473  mEmEnergyInEE = ibooker.book1D("EmEnergyInEE", "EmEnergyInEE", 50, 0, 100);
474  mEmEnergyInHF = ibooker.book1D("EmEnergyInHF", "EmEnergyInHF", 60, -20, 200);
475  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "HadEnergyInHO", mHadEnergyInHO));
476  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "HadEnergyInHB", mHadEnergyInHB));
477  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "HadEnergyInHF", mHadEnergyInHF));
478  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "HadEnergyInHE", mHadEnergyInHE));
479  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "EmEnergyInEB", mEmEnergyInEB));
480  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "EmEnergyInEE", mEmEnergyInEE));
481  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "EmEnergyInHF", mEmEnergyInHF));
482 
483  //JetID variables
484  mresEMF = ibooker.book1D("resEMF", "resEMF", 50, 0., 1.);
485  mN90Hits = ibooker.book1D("N90Hits", "N90Hits", 50, 0., 50);
486  mfHPD = ibooker.book1D("fHPD", "fHPD", 50, 0., 1.);
487  mfRBX = ibooker.book1D("fRBX", "fRBX", 50, 0., 1.);
488  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "resEMF", mresEMF));
489  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "N90Hits", mN90Hits));
490  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "fHPD", mfHPD));
491  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "fRBX", mfRBX));
492 
493  mHFrac = ibooker.book1D("HFrac", "HFrac", 70, -0.2, 1.2);
494  mEFrac = ibooker.book1D("EFrac", "EFrac", 52, -0.02, 1.02);
495  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "HFrac", mHFrac));
496  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "EFrac", mEFrac));
497  mHFrac_profile = ibooker.bookProfile("HFrac_profile", "HFrac", nbinsPV_, nPVlow_, nPVhigh_, 70, -0.2, 1.2);
498  mEFrac_profile = ibooker.bookProfile("EFrac_profile", "EFrac", nbinsPV_, nPVlow_, nPVhigh_, 52, -0.02, 1.02);
499  mHFrac_profile->setAxisTitle("nvtx", 1);
500  mEFrac_profile->setAxisTitle("nvtx", 1);
501  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "HFrac_profile", mHFrac_profile));
502  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "EFrac_profile", mEFrac_profile));
503  mHFrac_Barrel = ibooker.book1D("HFrac_Barrel", "HFrac Barrel", 50, 0, 1);
504  mEFrac_Barrel = ibooker.book1D("EFrac_Barrel", "EFrac Barrel", 52, -0.02, 1.02);
505  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "HFrac_Barrel", mHFrac_Barrel));
506  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "EFrac_Barrel", mEFrac_Barrel));
507  mHFrac_EndCap = ibooker.book1D("HFrac_EndCap", "HFrac EndCap", 50, 0, 1);
508  mEFrac_EndCap = ibooker.book1D("EFrac_EndCap", "EFrac EndCap", 52, -0.02, 1.02);
509  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "HFrac_EndCap", mHFrac_EndCap));
510  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "EFrac_EndCap", mEFrac_EndCap));
511  mHFrac_Forward = ibooker.book1D("HFrac_Forward", "HFrac Forward", 70, -0.2, 1.2);
512  mEFrac_Forward = ibooker.book1D("EFrac_Forward", "EFrac Forward", 52, -0.02, 1.02);
513  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "HFrac_Forward", mHFrac_Forward));
514  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "EFrac_Forward", mEFrac_Forward));
515  }
516 
517  if (isPFJet_) {
518  /* remove quark gluon plots for default jet selection, but select physics signatures which monitor gluon and quark
519  if(jetCleaningFlag_){
520  //gluon quark separation axis
521  if(fill_CHS_histos){
522  mAxis2_lowPt_Barrel = ibooker.book1D("qg_Axis2_lowPt_Barrel","qg Axis2 #sigma_{2} lowPt Barrel",50,0.,0.20);
523  mpTD_lowPt_Barrel= ibooker.book1D("qg_pTD_lowPt_Barrel","qg fragmentation function p_{T}^{D} lowPt Barrel",50,0.15,1.05);
524  mMultiplicityQG_lowPt_Barrel= ibooker.book1D("qg_multiplicity_lowPt_Barrel","qg multiplicity lowPt Barrel",50,0,50);
525  mqgLikelihood_lowPt_Barrel= ibooker.book1D("qg_Likelihood_lowPt_Barrel","qg likelihood lowPt Barrel",50,-1.1,1.1);
526  mAxis2_lowPt_EndCap = ibooker.book1D("qg_Axis2_lowPt_EndCap","qg Axis2 #sigma_{2} lowPt EndCap",50,0.,0.20);
527  mpTD_lowPt_EndCap= ibooker.book1D("qg_pTD_lowPt_EndCap","qg fragmentation function p_{T}^{D} lowPt EndCap",50,0.15,1.05);
528  mMultiplicityQG_lowPt_EndCap= ibooker.book1D("qg_multiplicity_lowPt_EndCap","qg multiplicity lowPt EndCap",50,0,100);
529  mqgLikelihood_lowPt_EndCap= ibooker.book1D("qg_Likelihood_lowPt_EndCap","qg likelihood lowPt EndCap",50,-1.1,1.1);
530  mAxis2_lowPt_Forward = ibooker.book1D("qg_Axis2_lowPt_Forward","qg Axis2 #sigma_{2} lowPt Forward",50,0.,0.20);
531  mpTD_lowPt_Forward= ibooker.book1D("qg_pTD_lowPt_Forward","qg fragmentation function p_{T}^{D} lowPt Forward",50,0.15,1.05);
532  mMultiplicityQG_lowPt_Forward= ibooker.book1D("qg_multiplicity_lowPt_Forward","qg multiplicity lowPt Forward",50,0,100);
533  mqgLikelihood_lowPt_Forward= ibooker.book1D("qg_Likelihood_lowPt_Forward","qg likelihood lowPt Forward",50,-1.1,1.1);
534 
535  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_Axis2_lowPt_Barrel" ,mAxis2_lowPt_Barrel));
536  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_pTD_lowPt_Barrel" ,mpTD_lowPt_Barrel));
537  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_multiplicity_lowPt_Barrel" ,mMultiplicityQG_lowPt_Barrel));
538  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_Likelihood_lowPt_Barrel" ,mqgLikelihood_lowPt_Barrel));
539  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_Axis2_lowPt_EndCap" ,mAxis2_lowPt_EndCap));
540  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_pTD_lowPt_EndCap" ,mpTD_lowPt_EndCap));
541  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_multiplicity_lowPt_EndCap" ,mMultiplicityQG_lowPt_EndCap));
542  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_Likelihood_lowPt_EndCap" ,mqgLikelihood_lowPt_EndCap));
543  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_Axis2_lowPt_Forward" ,mAxis2_lowPt_Forward));
544  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_pTD_lowPt_Forward" ,mpTD_lowPt_Forward));
545  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_multiplicity_lowPt_Forward" ,mMultiplicityQG_lowPt_Forward));
546  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_Likelihood_lowPt_Forward" ,mqgLikelihood_lowPt_Forward));
547 
548  mAxis2_mediumPt_Barrel = ibooker.book1D("qg_Axis2_mediumPt_Barrel","qg Axis2 #sigma_{2} mediumPt Barrel",50,0.,0.20);
549  mpTD_mediumPt_Barrel= ibooker.book1D("qg_pTD_mediumPt_Barrel","qg fragmentation function p_{T}^{D} mediumPt Barrel",50,0.15,1.05);
550  mMultiplicityQG_mediumPt_Barrel= ibooker.book1D("qg_multiplicity_mediumPt_Barrel","qg multiplicity mediumPt Barrel",50,0,100);
551  mqgLikelihood_mediumPt_Barrel= ibooker.book1D("qg_Likelihood_mediumPt_Barrel","qg likelihood mediumPt Barrel",50,-1.1,1.1);
552  mAxis2_mediumPt_EndCap = ibooker.book1D("qg_Axis2_mediumPt_EndCap","qg Axis2 #sigma_{2} mediumPt EndCap",50,0.,0.20);
553  mpTD_mediumPt_EndCap= ibooker.book1D("qg_pTD_mediumPt_EndCap","qg fragmentation function p_{T}^{D} mediumPt EndCap",50,0.15,1.05);
554  mMultiplicityQG_mediumPt_EndCap= ibooker.book1D("qg_multiplicity_mediumPt_EndCap","qg multiplicity mediumPt EndCap",50,0,100);
555  mqgLikelihood_mediumPt_EndCap= ibooker.book1D("qg_Likelihood_mediumPt_EndCap","qg likelihood mediumPt EndCap",50,-1.1,1.1);
556  mAxis2_mediumPt_Forward = ibooker.book1D("qg_Axis2_mediumPt_Forward","qg Axis2 #sigma_{2} mediumPt Forward",50,0.,0.20);
557  mpTD_mediumPt_Forward= ibooker.book1D("qg_pTD_mediumPt_Forward","qg fragmentation function p_{T}^{D} mediumPt Forward",50,0.15,1.05);
558  mMultiplicityQG_mediumPt_Forward= ibooker.book1D("qg_multiplicity_mediumPt_Forward","qg multiplicity mediumPt Forward",50,0,100);
559  mqgLikelihood_mediumPt_Forward= ibooker.book1D("qg_Likelihood_mediumPt_Forward","qg likelihood mediumPt Forward",50,-1.1,1.1);
560 
561  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_Axis2_mediumPt_Barrel" ,mAxis2_mediumPt_Barrel));
562  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_pTD_mediumPt_Barrel" ,mpTD_mediumPt_Barrel));
563  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_multiplicity_mediumPt_Barrel" ,mMultiplicityQG_mediumPt_Barrel));
564  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_Likelihood_mediumPt_Barrel" ,mqgLikelihood_mediumPt_Barrel));
565  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_Axis2_mediumPt_EndCap" ,mAxis2_mediumPt_EndCap));
566  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_pTD_mediumPt_EndCap" ,mpTD_mediumPt_EndCap));
567  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_multiplicity_mediumPt_EndCap" ,mMultiplicityQG_mediumPt_EndCap));
568  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_Likelihood_mediumPt_EndCap" ,mqgLikelihood_mediumPt_EndCap));
569  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_Axis2_mediumPt_Forward" ,mAxis2_mediumPt_Forward));
570  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_pTD_mediumPt_Forward" ,mpTD_mediumPt_Forward));
571  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_multiplicity_mediumPt_Forward" ,mMultiplicityQG_mediumPt_Forward));
572  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_Likelihood_mediumPt_Forward" ,mqgLikelihood_mediumPt_Forward));
573 
574  mAxis2_highPt_Barrel = ibooker.book1D("qg_Axis2_highPt_Barrel","qg Axis2 #sigma_{2} highPt Barrel",50,0.,0.20);
575  mpTD_highPt_Barrel= ibooker.book1D("qg_pTD_highPt_Barrel","qg fragmentation function p_{T}^{D} highPt Barrel",50,0.15,1.05);
576  mMultiplicityQG_highPt_Barrel= ibooker.book1D("qg_multiplicity_highPt_Barrel","qg multiplicity highPt Barrel",50,0,100);
577  mqgLikelihood_highPt_Barrel= ibooker.book1D("qg_Likelihood_highPt_Barrel","qg likelihood highPt Barrel",50,-1.1,1.1);
578  mAxis2_highPt_EndCap = ibooker.book1D("qg_Axis2_highPt_EndCap","qg Axis2 #sigma_{2} highPt EndCap",50,0.,0.20);
579  mpTD_highPt_EndCap= ibooker.book1D("qg_pTD_highPt_EndCap","qg fragmentation function p_{T}^{D} highPt EndCap",50,0.15,1.05);
580  mMultiplicityQG_highPt_EndCap= ibooker.book1D("qg_multiplicity_highPt_EndCap","qg multiplicity highPt EndCap",50,0,100);
581  mqgLikelihood_highPt_EndCap= ibooker.book1D("qg_Likelihood_highPt_EndCap","qg likelihood highPt EndCap",50,-1.1,1.1);
582  mAxis2_highPt_Forward = ibooker.book1D("qg_Axis2_highPt_Forward","qg Axis2 #sigma_{2} highPt Forward",50,0.,0.20);
583  mpTD_highPt_Forward= ibooker.book1D("qg_pTD_highPt_Forward","qg fragmentation function p_{T}^{D} highPt Forward",50,0.15,1.05);
584  mMultiplicityQG_highPt_Forward= ibooker.book1D("qg_multiplicity_highPt_Forward","qg multiplicity highPt Forward",50,0,100);
585  mqgLikelihood_highPt_Forward= ibooker.book1D("qg_Likelihood_highPt_Forward","qg likelihood highPt Forward",50,-1.1,1.1);
586 
587  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_Axis2_highPt_Barrel" ,mAxis2_highPt_Barrel));
588  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_pTD_highPt_Barrel" ,mpTD_highPt_Barrel));
589  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_multiplicity_highPt_Barrel" ,mMultiplicityQG_highPt_Barrel));
590  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_Likelihood_highPt_Barrel" ,mqgLikelihood_highPt_Barrel));
591  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_Axis2_highPt_EndCap" ,mAxis2_highPt_EndCap));
592  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_pTD_highPt_EndCap" ,mpTD_highPt_EndCap));
593  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_multiplicity_highPt_EndCap" ,mMultiplicityQG_highPt_EndCap));
594  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_Likelihood_highPt_EndCap" ,mqgLikelihood_highPt_EndCap));
595  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_Axis2_highPt_Forward" ,mAxis2_highPt_Forward));
596  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_pTD_highPt_Forward" ,mpTD_highPt_Forward));
597  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_multiplicity_highPt_Forward" ,mMultiplicityQG_highPt_Forward));
598  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_Likelihood_highPt_Forward" ,mqgLikelihood_highPt_Forward));
599  }
600  }*/
601  //PFJet specific histograms
602  mCHFracVSeta_lowPt =
603  ibooker.bookProfile("CHFracVSeta_lowPt", "CHFracVSeta_lowPt", etaBin_, etaMin_, etaMax_, 0., 1.2);
604  mNHFracVSeta_lowPt =
605  ibooker.bookProfile("NHFacVSeta_lowPt", "NHFracVSeta_lowPt", etaBin_, etaMin_, etaMax_, 0., 1.2);
606  mPhFracVSeta_lowPt =
607  ibooker.bookProfile("PhFracVSeta_lowPt", "PhFracVSeta_lowPt", etaBin_, etaMin_, etaMax_, 0., 1.2);
608  mCHFracVSeta_mediumPt =
609  ibooker.bookProfile("CHFracVSeta_mediumPt", "CHFracVSeta_mediumPt", etaBin_, etaMin_, etaMax_, 0., 1.2);
610  mNHFracVSeta_mediumPt =
611  ibooker.bookProfile("NHFracVSeta_mediumPt", "NHFracVSeta_mediumPt", etaBin_, etaMin_, etaMax_, 0., 1.2);
612  mPhFracVSeta_mediumPt =
613  ibooker.bookProfile("PhFracVSeta_mediumPt", "PhFracVSeta_mediumPt", etaBin_, etaMin_, etaMax_, 0., 1.2);
614  mCHFracVSeta_highPt =
615  ibooker.bookProfile("CHFracVSeta_highPt", "CHFracVSeta_highPt", etaBin_, etaMin_, etaMax_, 0., 1.2);
616  mNHFracVSeta_highPt =
617  ibooker.bookProfile("NHFracVSeta_highPt", "NHFracVSeta_highPt", etaBin_, etaMin_, etaMax_, 0., 1.2);
618  mPhFracVSeta_highPt =
619  ibooker.bookProfile("PhFracVSeta_highPt", "PhFracVSeta_highPt", etaBin_, etaMin_, etaMax_, 0., 1.2);
620 
621  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "CHFracVSeta_lowPt", mCHFracVSeta_lowPt));
622  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "NHFracVSeta_lowPt", mNHFracVSeta_lowPt));
623  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "PhFracVSeta_lowPt", mPhFracVSeta_lowPt));
624  map_of_MEs.insert(
625  std::pair<std::string, MonitorElement*>(DirName + "/" + "CHFracVSeta_mediumPt", mCHFracVSeta_mediumPt));
626  map_of_MEs.insert(
627  std::pair<std::string, MonitorElement*>(DirName + "/" + "NHFracVSeta_mediumPt", mNHFracVSeta_mediumPt));
628  map_of_MEs.insert(
629  std::pair<std::string, MonitorElement*>(DirName + "/" + "PhFracVSeta_mediumPt", mPhFracVSeta_mediumPt));
630  map_of_MEs.insert(
631  std::pair<std::string, MonitorElement*>(DirName + "/" + "CHFracVSeta_highPt", mCHFracVSeta_highPt));
632  map_of_MEs.insert(
633  std::pair<std::string, MonitorElement*>(DirName + "/" + "NHFracVSeta_highPt", mNHFracVSeta_highPt));
634  map_of_MEs.insert(
635  std::pair<std::string, MonitorElement*>(DirName + "/" + "PhFracVSeta_highPt", mPhFracVSeta_highPt));
636 
637  mLooseMVAPUJIDPassFractionVSeta = ibooker.bookProfile(
638  "LooseMVAPUIDPassFractionVSeta", "LooseMVAPUIDPassFractionVSeta", etaBin_, etaMin_, etaMax_, 0., 1.2);
639  mLooseMVAPUJIDPassFractionVSpt = ibooker.bookProfile(
640  "LooseMVAPUIDPassFractionVSpt", "LooseMVAPUIDPassFractionVSpt", ptBin_, ptMin_, ptMax_, 0., 1.2);
641  mMediumMVAPUJIDPassFractionVSeta = ibooker.bookProfile(
642  "MediumMVAPUIDPassFractionVSeta", "MediumMVAPUIDPassFractionVSeta", etaBin_, etaMin_, etaMax_, 0., 1.2);
643  mMediumMVAPUJIDPassFractionVSpt = ibooker.bookProfile(
644  "MediumMVAPUIDPassFractionVSpt", "MediumMVAPUIDPassFractionVSpt", ptBin_, ptMin_, ptMax_, 0., 1.2);
645  mTightMVAPUJIDPassFractionVSeta = ibooker.bookProfile(
646  "TightMVAPUIDPassFractionVSeta", "TightMVAPUIDPassFractionVSeta", etaBin_, etaMin_, etaMax_, 0., 1.2);
647  mTightMVAPUJIDPassFractionVSpt = ibooker.bookProfile(
648  "TightMVAPUIDPassFractionVSpt", "TightMVAPUIDPassFractionVSpt", ptBin_, ptMin_, ptMax_, 0., 1.2);
649 
650  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "LooseMVAPUIDPassFractionVSeta",
651  mLooseMVAPUJIDPassFractionVSeta));
652  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "LooseMVAPUIDPassFractionVSpt",
653  mLooseMVAPUJIDPassFractionVSpt));
654  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "MediumMVAPUIDPassFractionVSeta",
655  mMediumMVAPUJIDPassFractionVSeta));
656  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "MediumMVAPUIDPassFractionVSpt",
657  mMediumMVAPUJIDPassFractionVSpt));
658  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "TightMVAPUIDPassFractionVSeta",
659  mTightMVAPUJIDPassFractionVSeta));
660  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "TightMVAPUIDPassFractionVSpt",
661  mTightMVAPUJIDPassFractionVSpt));
662 
663  mLooseCutPUJIDPassFractionVSeta = ibooker.bookProfile(
664  "LooseCutPUIDPassFractionVSeta", "LooseCutPUIDPassFractionVSeta", etaBin_, etaMin_, etaMax_, 0., 1.2);
665  mLooseCutPUJIDPassFractionVSpt = ibooker.bookProfile(
666  "LooseCutPUIDPassFractionVSpt", "LooseCutPUIDPassFractionVSpt", ptBin_, ptMin_, ptMax_, 0., 1.2);
667  mMediumCutPUJIDPassFractionVSeta = ibooker.bookProfile(
668  "MediumCutPUIDPassFractionVSeta", "MediumCutPUIDPassFractionVSeta", etaBin_, etaMin_, etaMax_, 0., 1.2);
669  mMediumCutPUJIDPassFractionVSpt = ibooker.bookProfile(
670  "MediumCutPUIDPassFractionVSpt", "MediumCutPUIDPassFractionVSpt", ptBin_, ptMin_, ptMax_, 0., 1.2);
671  mTightCutPUJIDPassFractionVSeta = ibooker.bookProfile(
672  "TightCutPUIDPassFractionVSeta", "TightCutPUIDPassFractionVSeta", etaBin_, etaMin_, etaMax_, 0., 1.2);
673  mTightCutPUJIDPassFractionVSpt = ibooker.bookProfile(
674  "TightCutPUIDPassFractionVSpt", "TightCutPUIDPassFractionVSpt", ptBin_, ptMin_, ptMax_, 0., 1.2);
675  mCutPUJIDDiscriminant_lowPt_Barrel =
676  ibooker.book1D("CutPUJIDDiscriminant_lowPt_Barrel", "CutPUJIDDiscriminant_lowPt_Barrel", 50, -1.00, 1.00);
677  mCutPUJIDDiscriminant_lowPt_EndCap =
678  ibooker.book1D("CutPUJIDDiscriminant_lowPt_EndCap", "CutPUJIDDiscriminant_lowPt_EndCap", 50, -1.00, 1.00);
679  mCutPUJIDDiscriminant_lowPt_Forward =
680  ibooker.book1D("CutPUJIDDiscriminant_lowPt_Forward", "CutPUJIDDiscriminant_lowPt_Forward", 50, -1.00, 1.00);
681  mCutPUJIDDiscriminant_mediumPt_Barrel =
682  ibooker.book1D("CutPUJIDDiscriminant_mediumPt_Barrel", "CutPUJIDDiscriminant_mediumPt_Barrel", 50, -1.00, 1.00);
683  mCutPUJIDDiscriminant_mediumPt_EndCap =
684  ibooker.book1D("CutPUJIDDiscriminant_mediumPt_EndCap", "CutPUJIDDiscriminant_mediumPt_EndCap", 50, -1.00, 1.00);
685  mCutPUJIDDiscriminant_mediumPt_Forward = ibooker.book1D(
686  "CutPUJIDDiscriminant_mediumPt_Forward", "CutPUJIDDiscriminant_mediumPt_Forward", 50, -1.00, 1.00);
687  mCutPUJIDDiscriminant_highPt_Barrel =
688  ibooker.book1D("CutPUJIDDiscriminant_highPt_Barrel", "CutPUJIDDiscriminant_highPt_Barrel", 50, -1.00, 1.00);
689  mCutPUJIDDiscriminant_highPt_EndCap =
690  ibooker.book1D("CutPUJIDDiscriminant_highPt_EndCap", "CutPUJIDDiscriminant_highPt_EndCap", 50, -1.00, 1.00);
691  mCutPUJIDDiscriminant_highPt_Forward =
692  ibooker.book1D("CutPUJIDDiscriminant_highPt_Forward", "CutPUJIDDiscriminant_highPt_Forward", 50, -1.00, 1.00);
693 
694  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "LooseCutPUIDPassFractionVSeta",
695  mLooseCutPUJIDPassFractionVSeta));
696  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "LooseCutPUIDPassFractionVSpt",
697  mLooseCutPUJIDPassFractionVSpt));
698  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "MediumCutPUIDPassFractionVSeta",
699  mMediumCutPUJIDPassFractionVSeta));
700  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "MediumCutPUIDPassFractionVSpt",
701  mMediumCutPUJIDPassFractionVSpt));
702  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "TightCutPUIDPassFractionVSeta",
703  mTightCutPUJIDPassFractionVSeta));
704  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "TightCutPUIDPassFractionVSpt",
705  mTightCutPUJIDPassFractionVSpt));
706  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "CutPUJIDDiscriminant_lowPt_Barrel",
707  mCutPUJIDDiscriminant_lowPt_Barrel));
708  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "CutPUJIDDiscriminant_lowPt_EndCap",
709  mCutPUJIDDiscriminant_lowPt_EndCap));
710  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "CutPUJIDDiscriminant_lowPt_Forward",
711  mCutPUJIDDiscriminant_lowPt_Forward));
712  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "CutPUJIDDiscriminant_mediumPt_Barrel",
713  mCutPUJIDDiscriminant_mediumPt_Barrel));
714  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "CutPUJIDDiscriminant_mediumPt_EndCap",
715  mCutPUJIDDiscriminant_mediumPt_EndCap));
716  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "CutPUJIDDiscriminant_mediumPt_Forward",
717  mCutPUJIDDiscriminant_mediumPt_Forward));
718  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "CutPUJIDDiscriminant_highPt_Barrel",
719  mCutPUJIDDiscriminant_highPt_Barrel));
720  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "CutPUJIDDiscriminant_highPt_EndCap",
721  mCutPUJIDDiscriminant_highPt_EndCap));
722  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "CutPUJIDDiscriminant_highPt_Forward",
723  mCutPUJIDDiscriminant_highPt_Forward));
724  //barrel histograms for PFJets
725  // energy fractions
726  mCHFrac_lowPt_Barrel = ibooker.book1D("CHFrac_lowPt_Barrel", "CHFrac_lowPt_Barrel", 120, -0.1, 1.1);
727  mNHFrac_lowPt_Barrel = ibooker.book1D("NHFrac_lowPt_Barrel", "NHFrac_lowPt_Barrel", 120, -0.1, 1.1);
728  mPhFrac_lowPt_Barrel = ibooker.book1D("PhFrac_lowPt_Barrel", "PhFrac_lowPt_Barrel", 120, -0.1, 1.1);
729  mCHFrac_mediumPt_Barrel = ibooker.book1D("CHFrac_mediumPt_Barrel", "CHFrac_mediumPt_Barrel", 120, -0.1, 1.1);
730  mNHFrac_mediumPt_Barrel = ibooker.book1D("NHFrac_mediumPt_Barrel", "NHFrac_mediumPt_Barrel", 120, -0.1, 1.1);
731  mPhFrac_mediumPt_Barrel = ibooker.book1D("PhFrac_mediumPt_Barrel", "PhFrac_mediumPt_Barrel", 120, -0.1, 1.1);
732  mCHFrac_highPt_Barrel = ibooker.book1D("CHFrac_highPt_Barrel", "CHFrac_highPt_Barrel", 120, -0.1, 1.1);
733  mNHFrac_highPt_Barrel = ibooker.book1D("NHFrac_highPt_Barrel", "NHFrac_highPt_Barrel", 120, -0.1, 1.1);
734  mPhFrac_highPt_Barrel = ibooker.book1D("PhFrac_highPt_Barrel", "PhFrac_highPt_Barrel", 120, -0.1, 1.1);
735 
736  map_of_MEs.insert(
737  std::pair<std::string, MonitorElement*>(DirName + "/" + "CHFrac_lowPt_Barrel", mCHFrac_lowPt_Barrel));
738  map_of_MEs.insert(
739  std::pair<std::string, MonitorElement*>(DirName + "/" + "NHFrac_lowPt_Barrel", mNHFrac_lowPt_Barrel));
740  map_of_MEs.insert(
741  std::pair<std::string, MonitorElement*>(DirName + "/" + "PhFrac_lowPt_Barrel", mPhFrac_lowPt_Barrel));
742  map_of_MEs.insert(
743  std::pair<std::string, MonitorElement*>(DirName + "/" + "CHFrac_mediumPt_Barrel", mCHFrac_mediumPt_Barrel));
744  map_of_MEs.insert(
745  std::pair<std::string, MonitorElement*>(DirName + "/" + "NHFrac_mediumPt_Barrel", mNHFrac_mediumPt_Barrel));
746  map_of_MEs.insert(
747  std::pair<std::string, MonitorElement*>(DirName + "/" + "PhFrac_mediumPt_Barrel", mPhFrac_mediumPt_Barrel));
748  map_of_MEs.insert(
749  std::pair<std::string, MonitorElement*>(DirName + "/" + "CHFrac_highPt_Barrel", mCHFrac_highPt_Barrel));
750  map_of_MEs.insert(
751  std::pair<std::string, MonitorElement*>(DirName + "/" + "NHFrac_highPt_Barrel", mNHFrac_highPt_Barrel));
752  map_of_MEs.insert(
753  std::pair<std::string, MonitorElement*>(DirName + "/" + "PhFrac_highPt_Barrel", mPhFrac_highPt_Barrel));
754 
755  mMass_lowPt_Barrel = ibooker.book1D("JetMass_lowPt_Barrel", "JetMass_lowPt_Barrel", 50, 0, 150);
756  mMass_lowPt_EndCap = ibooker.book1D("JetMass_lowPt_EndCap", "JetMass_lowPt_EndCap", 50, 0, 150);
757  mMass_lowPt_Forward = ibooker.book1D("JetMass_lowPt_Forward", "JetMass_lowPt_Forward", 50, 0, 150);
758  mMass_mediumPt_Barrel = ibooker.book1D("JetMass_mediumPt_Barrel", "JetMass_mediumPt_Barrel", 50, 0, 150);
759  mMass_mediumPt_EndCap = ibooker.book1D("JetMass_mediumPt_EndCap", "JetMass_mediumPt_EndCap", 50, 0, 150);
760  mMass_mediumPt_Forward = ibooker.book1D("JetMass_mediumPt_Forward", "JetMass_mediumPt_Forward", 75, 0, 150);
761  mMass_highPt_Barrel = ibooker.book1D("JetMass_highPt_Barrel", "JetMass_highPt_Barrel", 50, 0, 150);
762  mMass_highPt_EndCap = ibooker.book1D("JetMass_highPt_EndCap", "JetMass_highPt_EndCap", 50, 0, 150);
763  mMass_highPt_Forward = ibooker.book1D("JetMass_highPt_Forward", "JetMass_highPt_Forward", 50, 0, 150);
764 
765  map_of_MEs.insert(
766  std::pair<std::string, MonitorElement*>(DirName + "/" + "JetMass_lowPt_Barrel", mMass_lowPt_Barrel));
767  map_of_MEs.insert(
768  std::pair<std::string, MonitorElement*>(DirName + "/" + "JetMass_lowPt_EndCap", mMass_lowPt_EndCap));
769  map_of_MEs.insert(
770  std::pair<std::string, MonitorElement*>(DirName + "/" + "JetMass_lowPt_Forward", mMass_lowPt_Forward));
771  map_of_MEs.insert(
772  std::pair<std::string, MonitorElement*>(DirName + "/" + "JetMass_mediumPt_Barrel", mMass_mediumPt_Barrel));
773  map_of_MEs.insert(
774  std::pair<std::string, MonitorElement*>(DirName + "/" + "JetMass_mediumPt_EndCap", mMass_mediumPt_EndCap));
775  map_of_MEs.insert(
776  std::pair<std::string, MonitorElement*>(DirName + "/" + "JetMass_mediumPt_Forward", mMass_mediumPt_Forward));
777  map_of_MEs.insert(
778  std::pair<std::string, MonitorElement*>(DirName + "/" + "JetMass_highPt_Barrel", mMass_highPt_Barrel));
779  map_of_MEs.insert(
780  std::pair<std::string, MonitorElement*>(DirName + "/" + "JetMass_highPt_EndCap", mMass_highPt_EndCap));
781  map_of_MEs.insert(
782  std::pair<std::string, MonitorElement*>(DirName + "/" + "JetMass_highPt_Forward", mMass_highPt_Forward));
783 
784  //energies
785  mCHEn_lowPt_Barrel = ibooker.book1D("CHEn_lowPt_Barrel", "CHEn_lowPt_Barrel", ptBin_, 0., ptMax_);
786  mNHEn_lowPt_Barrel = ibooker.book1D("NHEn_lowPt_Barrel", "NHEn_lowPt_Barrel", ptBin_, 0., ptMax_);
787  mPhEn_lowPt_Barrel = ibooker.book1D("PhEn_lowPt_Barrel", "PhEn_lowPt_Barrel", ptBin_, 0., ptMax_);
788  mElEn_lowPt_Barrel = ibooker.book1D("ElEn_lowPt_Barrel", "ElEn_lowPt_Barrel", ptBin_, 0., 100);
789  mMuEn_lowPt_Barrel = ibooker.book1D("MuEn_lowPt_Barrel", "MuEn_lowPt_Barrel", ptBin_, 0., 100);
790  mCHEn_mediumPt_Barrel = ibooker.book1D("CHEn_mediumPt_Barrel", "CHEn_mediumPt_Barrel", ptBin_, 0., ptMax_);
791  mNHEn_mediumPt_Barrel = ibooker.book1D("NHEn_mediumPt_Barrel", "NHEn_mediumPt_Barrel", ptBin_, 0., ptMax_);
792  mPhEn_mediumPt_Barrel = ibooker.book1D("PhEn_mediumPt_Barrel", "PhEn_mediumPt_Barrel", ptBin_, 0., ptMax_);
793  mElEn_mediumPt_Barrel = ibooker.book1D("ElEn_mediumPt_Barrel", "ElEn_mediumPt_Barrel", ptBin_, 0., 100);
794  mMuEn_mediumPt_Barrel = ibooker.book1D("MuEn_mediumPt_Barrel", "MuEn_mediumPt_Barrel", ptBin_, 0., 100);
795  mCHEn_highPt_Barrel = ibooker.book1D("CHEn_highPt_Barrel", "CHEn_highPt_Barrel", ptBin_, 0., 1.1 * ptMax_);
796  mNHEn_highPt_Barrel = ibooker.book1D("NHEn_highPt_Barrel", "NHEn_highPt_Barrel", ptBin_, 0., ptMax_);
797  mPhEn_highPt_Barrel = ibooker.book1D("PhEn_highPt_Barrel", "PhEn_highPt_Barrel", ptBin_, 0., ptMax_);
798  mElEn_highPt_Barrel = ibooker.book1D("ElEn_highPt_Barrel", "ElEn_highPt_Barrel", ptBin_, 0., 100);
799  mMuEn_highPt_Barrel = ibooker.book1D("MuEn_highPt_Barrel", "MuEn_highPt_Barrel", ptBin_, 0., 100);
800 
801  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "CHEn_lowPt_Barrel", mCHEn_lowPt_Barrel));
802  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "NHEn_lowPt_Barrel", mNHEn_lowPt_Barrel));
803  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "PhEn_lowPt_Barrel", mPhEn_lowPt_Barrel));
804  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "ElEn_lowPt_Barrel", mElEn_lowPt_Barrel));
805  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "MuEn_lowPt_Barrel", mMuEn_lowPt_Barrel));
806  map_of_MEs.insert(
807  std::pair<std::string, MonitorElement*>(DirName + "/" + "CHEn_mediumPt_Barrel", mCHEn_mediumPt_Barrel));
808  map_of_MEs.insert(
809  std::pair<std::string, MonitorElement*>(DirName + "/" + "NHEn_mediumPt_Barrel", mNHEn_mediumPt_Barrel));
810  map_of_MEs.insert(
811  std::pair<std::string, MonitorElement*>(DirName + "/" + "PhEn_mediumPt_Barrel", mPhEn_mediumPt_Barrel));
812  map_of_MEs.insert(
813  std::pair<std::string, MonitorElement*>(DirName + "/" + "ElEn_mediumPt_Barrel", mElEn_mediumPt_Barrel));
814  map_of_MEs.insert(
815  std::pair<std::string, MonitorElement*>(DirName + "/" + "MuEn_mediumPt_Barrel", mMuEn_mediumPt_Barrel));
816  map_of_MEs.insert(
817  std::pair<std::string, MonitorElement*>(DirName + "/" + "CHEn_highPt_Barrel", mCHEn_highPt_Barrel));
818  map_of_MEs.insert(
819  std::pair<std::string, MonitorElement*>(DirName + "/" + "NHEn_highPt_Barrel", mNHEn_highPt_Barrel));
820  map_of_MEs.insert(
821  std::pair<std::string, MonitorElement*>(DirName + "/" + "PhEn_highPt_Barrel", mPhEn_highPt_Barrel));
822  map_of_MEs.insert(
823  std::pair<std::string, MonitorElement*>(DirName + "/" + "ElEn_highPt_Barrel", mElEn_highPt_Barrel));
824  map_of_MEs.insert(
825  std::pair<std::string, MonitorElement*>(DirName + "/" + "MuEn_highPt_Barrel", mMuEn_highPt_Barrel));
826 
827  //multiplicities
828  mChMultiplicity_lowPt_Barrel =
829  ibooker.book1D("ChMultiplicity_lowPt_Barrel", "ChMultiplicity_lowPt_Barrel", 60, 0, 60);
830  mNeutMultiplicity_lowPt_Barrel =
831  ibooker.book1D("NeutMultiplicity_lowPt_Barrel", "NeutMultiplicity_lowPt_Barrel", 60, 0, 60);
832  mMuMultiplicity_lowPt_Barrel =
833  ibooker.book1D("MuMultiplicity_lowPt_Barrel", "MuMultiplicity_lowPt_Barrel", 10, 0, 10);
834  mChMultiplicity_mediumPt_Barrel =
835  ibooker.book1D("ChMultiplicity_mediumPt_Barrel", "ChMultiplicity_mediumPt_Barrel", 60, 0, 60);
836  mNeutMultiplicity_mediumPt_Barrel =
837  ibooker.book1D("NeutMultiplicity_mediumPt_Barrel", "NeutMultiplicity_mediumPt_Barrel", 60, 0, 60);
838  mMuMultiplicity_mediumPt_Barrel =
839  ibooker.book1D("MuMultiplicity_mediumPt_Barrel", "MuMultiplicity_mediumPt_Barrel", 10, 0, 10);
840  mChMultiplicity_highPt_Barrel =
841  ibooker.book1D("ChMultiplicity_highPt_Barrel", "ChMultiplicity_highPt_Barrel", 60, 0, 60);
842  mNeutMultiplicity_highPt_Barrel =
843  ibooker.book1D("NeutMultiplicity_highPt_Barrel", "NeutMultiplicity_highPt_Barrel", 60, 0, 60);
844  mMuMultiplicity_highPt_Barrel =
845  ibooker.book1D("MuMultiplicity_highPt_Barrel", "MuMultiplicity_highPt_Barrel", 10, 0, 10);
846 
847  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "ChMultiplicity_lowPt_Barrel",
848  mChMultiplicity_lowPt_Barrel));
849  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "NeutMultiplicity_lowPt_Barrel",
850  mNeutMultiplicity_lowPt_Barrel));
851  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "MuMultiplicity_lowPt_Barrel",
852  mMuMultiplicity_lowPt_Barrel));
853  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "ChMultiplicity_mediumPt_Barrel",
854  mChMultiplicity_mediumPt_Barrel));
855  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "NeutMultiplicity_mediumPt_Barrel",
856  mNeutMultiplicity_mediumPt_Barrel));
857  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "MuMultiplicity_mediumPt_Barrel",
858  mMuMultiplicity_mediumPt_Barrel));
859  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "ChMultiplicity_highPt_Barrel",
860  mChMultiplicity_highPt_Barrel));
861  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "NeutMultiplicity_highPt_Barrel",
862  mNeutMultiplicity_highPt_Barrel));
863  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "MuMultiplicity_highPt_Barrel",
864  mMuMultiplicity_highPt_Barrel));
865  }
866  //
867  if (isMiniAODJet_ || isPFJet_) {
868  if (!filljetsubstruc_) { //not available for ak8 -> so just take out
869  mMVAPUJIDDiscriminant_lowPt_Barrel =
870  ibooker.book1D("MVAPUJIDDiscriminant_lowPt_Barrel", "MVAPUJIDDiscriminant_lowPt_Barrel", 50, -1.00, 1.00);
871  mMVAPUJIDDiscriminant_lowPt_EndCap =
872  ibooker.book1D("MVAPUJIDDiscriminant_lowPt_EndCap", "MVAPUJIDDiscriminant_lowPt_EndCap", 50, -1.00, 1.00);
873  mMVAPUJIDDiscriminant_lowPt_Forward =
874  ibooker.book1D("MVAPUJIDDiscriminant_lowPt_Forward", "MVAPUJIDDiscriminant_lowPt_Forward", 50, -1.00, 1.00);
875  mMVAPUJIDDiscriminant_mediumPt_Barrel = ibooker.book1D(
876  "MVAPUJIDDiscriminant_mediumPt_Barrel", "MVAPUJIDDiscriminant_mediumPt_Barrel", 50, -1.00, 1.00);
877  mMVAPUJIDDiscriminant_mediumPt_EndCap = ibooker.book1D(
878  "MVAPUJIDDiscriminant_mediumPt_EndCap", "MVAPUJIDDiscriminant_mediumPt_EndCap", 50, -1.00, 1.00);
879  mMVAPUJIDDiscriminant_mediumPt_Forward = ibooker.book1D(
880  "MVAPUJIDDiscriminant_mediumPt_Forward", "MVAPUJIDDiscriminant_mediumPt_Forward", 50, -1.00, 1.00);
881  mMVAPUJIDDiscriminant_highPt_Barrel =
882  ibooker.book1D("MVAPUJIDDiscriminant_highPt_Barrel", "MVAPUJIDDiscriminant_highPt_Barrel", 50, -1.00, 1.00);
883  mMVAPUJIDDiscriminant_highPt_EndCap =
884  ibooker.book1D("MVAPUJIDDiscriminant_highPt_EndCap", "MVAPUJIDDiscriminant_highPt_EndCap", 50, -1.00, 1.00);
885  mMVAPUJIDDiscriminant_highPt_Forward =
886  ibooker.book1D("MVAPUJIDDiscriminant_highPt_Forward", "MVAPUJIDDiscriminant_highPt_Forward", 50, -1.00, 1.00);
887 
888  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "MVAPUJIDDiscriminant_lowPt_Barrel",
889  mMVAPUJIDDiscriminant_lowPt_Barrel));
890  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "MVAPUJIDDiscriminant_lowPt_EndCap",
891  mMVAPUJIDDiscriminant_lowPt_EndCap));
892  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "MVAPUJIDDiscriminant_lowPt_Forward",
893  mMVAPUJIDDiscriminant_lowPt_Forward));
894  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "MVAPUJIDDiscriminant_mediumPt_Barrel",
895  mMVAPUJIDDiscriminant_mediumPt_Barrel));
896  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "MVAPUJIDDiscriminant_mediumPt_EndCap",
897  mMVAPUJIDDiscriminant_mediumPt_EndCap));
898  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "MVAPUJIDDiscriminant_mediumPt_Forward",
899  mMVAPUJIDDiscriminant_mediumPt_Forward));
900  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "MVAPUJIDDiscriminant_highPt_Barrel",
901  mMVAPUJIDDiscriminant_highPt_Barrel));
902  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "MVAPUJIDDiscriminant_highPt_EndCap",
903  mMVAPUJIDDiscriminant_highPt_EndCap));
904  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "MVAPUJIDDiscriminant_highPt_Forward",
905  mMVAPUJIDDiscriminant_highPt_Forward));
906  }
907  mCHFracVSpT_Barrel = ibooker.bookProfile("CHFracVSpT_Barrel", "CHFracVSpT_Barrel", ptBin_, ptMin_, ptMax_, 0., 1.2);
908  mNHFracVSpT_Barrel = ibooker.bookProfile("NHFracVSpT_Barrel", "NHFracVSpT_Barrel", ptBin_, ptMin_, ptMax_, 0., 1.2);
909  mPhFracVSpT_Barrel = ibooker.bookProfile("PhFracVSpT_Barrel", "PhFracVSpT_Barrel", ptBin_, ptMin_, ptMax_, 0., 1.2);
910  mCHFracVSpT_EndCap = ibooker.bookProfile("CHFracVSpT_EndCap", "CHFracVSpT_EndCap", ptBin_, ptMin_, ptMax_, 0., 1.2);
911  mNHFracVSpT_EndCap = ibooker.bookProfile("NHFracVSpT_EndCap", "NHFracVSpT_EndCap", ptBin_, ptMin_, ptMax_, 0., 1.2);
912  mPhFracVSpT_EndCap = ibooker.bookProfile("PhFracVSpT_EndCap", "PhFracVSpT_EndCap", ptBin_, ptMin_, ptMax_, 0., 1.2);
913  mHFHFracVSpT_Forward =
914  ibooker.bookProfile("HFHFracVSpT_Forward", "HFHFracVSpT_Forward", ptBin_, ptMin_, ptMax_, -0.2, 1.2);
915  mHFEFracVSpT_Forward =
916  ibooker.bookProfile("HFEFracVSpT_Forward", "HFEFracVSpT_Forward", ptBin_, ptMin_, ptMax_, -0.2, 1.2);
917 
918  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "CHFracVSpT_Barrel", mCHFracVSpT_Barrel));
919  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "NHFracVSpT_Barrel", mNHFracVSpT_Barrel));
920  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "PhFracVSpT_Barrel", mPhFracVSpT_Barrel));
921  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "CHFracVSpT_EndCap", mCHFracVSpT_EndCap));
922  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "NHFracVSpT_EndCap", mNHFracVSpT_EndCap));
923  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "PhFracVSpT_EndCap", mPhFracVSpT_EndCap));
924  map_of_MEs.insert(
925  std::pair<std::string, MonitorElement*>(DirName + "/" + "HFHFracVSpT_Forward", mHFHFracVSpT_Forward));
926  map_of_MEs.insert(
927  std::pair<std::string, MonitorElement*>(DirName + "/" + "HFEFracVSpT_Forward", mHFEFracVSpT_Forward));
928  }
929  if (isPFJet_) {
930  //endcap monitoring
931  //energy fractions
932  mCHFrac_lowPt_EndCap = ibooker.book1D("CHFrac_lowPt_EndCap", "CHFrac_lowPt_EndCap", 120, -0.1, 1.1);
933  mNHFrac_lowPt_EndCap = ibooker.book1D("NHFrac_lowPt_EndCap", "NHFrac_lowPt_EndCap", 120, -0.1, 1.1);
934  mPhFrac_lowPt_EndCap = ibooker.book1D("PhFrac_lowPt_EndCap", "PhFrac_lowPt_EndCap", 120, -0.1, 1.1);
935  mCHFrac_mediumPt_EndCap = ibooker.book1D("CHFrac_mediumPt_EndCap", "CHFrac_mediumPt_EndCap", 120, -0.1, 1.1);
936  mNHFrac_mediumPt_EndCap = ibooker.book1D("NHFrac_mediumPt_EndCap", "NHFrac_mediumPt_EndCap", 120, -0.1, 1.1);
937  mPhFrac_mediumPt_EndCap = ibooker.book1D("PhFrac_mediumPt_EndCap", "PhFrac_mediumPt_EndCap", 120, -0.1, 1.1);
938  mCHFrac_highPt_EndCap = ibooker.book1D("CHFrac_highPt_EndCap", "CHFrac_highPt_EndCap", 120, -0.1, 1.1);
939  mNHFrac_highPt_EndCap = ibooker.book1D("NHFrac_highPt_EndCap", "NHFrac_highPt_EndCap", 120, -0.1, 1.1);
940  mPhFrac_highPt_EndCap = ibooker.book1D("PhFrac_highPt_EndCap", "PhFrac_highPt_EndCap", 120, -0.1, 1.1);
941 
942  map_of_MEs.insert(
943  std::pair<std::string, MonitorElement*>(DirName + "/" + "CHFrac_lowPt_EndCap", mCHFrac_lowPt_EndCap));
944  map_of_MEs.insert(
945  std::pair<std::string, MonitorElement*>(DirName + "/" + "NHFrac_lowPt_EndCap", mNHFrac_lowPt_EndCap));
946  map_of_MEs.insert(
947  std::pair<std::string, MonitorElement*>(DirName + "/" + "PhFrac_lowPt_EndCap", mPhFrac_lowPt_EndCap));
948  map_of_MEs.insert(
949  std::pair<std::string, MonitorElement*>(DirName + "/" + "CHFrac_mediumPt_EndCap", mCHFrac_mediumPt_EndCap));
950  map_of_MEs.insert(
951  std::pair<std::string, MonitorElement*>(DirName + "/" + "NHFrac_mediumPt_EndCap", mNHFrac_mediumPt_EndCap));
952  map_of_MEs.insert(
953  std::pair<std::string, MonitorElement*>(DirName + "/" + "PhFrac_mediumPt_EndCap", mPhFrac_mediumPt_EndCap));
954  map_of_MEs.insert(
955  std::pair<std::string, MonitorElement*>(DirName + "/" + "CHFrac_highPt_EndCap", mCHFrac_highPt_EndCap));
956  map_of_MEs.insert(
957  std::pair<std::string, MonitorElement*>(DirName + "/" + "NHFrac_highPt_EndCap", mNHFrac_highPt_EndCap));
958  map_of_MEs.insert(
959  std::pair<std::string, MonitorElement*>(DirName + "/" + "PhFrac_highPt_EndCap", mPhFrac_highPt_EndCap));
960 
961  //energies
962  mCHEn_lowPt_EndCap = ibooker.book1D("CHEn_lowPt_EndCap", "CHEn_lowPt_EndCap", ptBin_, 0., ptMax_);
963  mNHEn_lowPt_EndCap = ibooker.book1D("NHEn_lowPt_EndCap", "NHEn_lowPt_EndCap", ptBin_, 0., ptMax_);
964  mPhEn_lowPt_EndCap = ibooker.book1D("PhEn_lowPt_EndCap", "PhEn_lowPt_EndCap", ptBin_, 0., ptMax_);
965  mElEn_lowPt_EndCap = ibooker.book1D("ElEn_lowPt_EndCap", "ElEn_lowPt_EndCap", ptBin_, 0., 100);
966  mMuEn_lowPt_EndCap = ibooker.book1D("MuEn_lowPt_EndCap", "MuEn_lowPt_EndCap", ptBin_, 0., 100);
967  mCHEn_mediumPt_EndCap = ibooker.book1D("CHEn_mediumPt_EndCap", "CHEn_mediumPt_EndCap", ptBin_, 0., ptMax_);
968  mNHEn_mediumPt_EndCap = ibooker.book1D("NHEn_mediumPt_EndCap", "NHEn_mediumPt_EndCap", ptBin_, 0., ptMax_);
969  mPhEn_mediumPt_EndCap = ibooker.book1D("PhEn_mediumPt_EndCap", "PhEn_mediumPt_EndCap", ptBin_, 0., ptMax_);
970  mElEn_mediumPt_EndCap = ibooker.book1D("ElEn_mediumPt_EndCap", "ElEn_mediumPt_EndCap", ptBin_, 0., 100);
971  mMuEn_mediumPt_EndCap = ibooker.book1D("MuEn_mediumPt_EndCap", "MuEn_mediumPt_EndCap", ptBin_, 0., 100);
972  mCHEn_highPt_EndCap = ibooker.book1D("CHEn_highPt_EndCap", "CHEn_highPt_EndCap", ptBin_, 0., 1.5 * ptMax_);
973  mNHEn_highPt_EndCap = ibooker.book1D("NHEn_highPt_EndCap", "NHEn_highPt_EndCap", ptBin_, 0., 1.5 * ptMax_);
974  mPhEn_highPt_EndCap = ibooker.book1D("PhEn_highPt_EndCap", "PhEn_highPt_EndCap", ptBin_, 0., 1.5 * ptMax_);
975  mElEn_highPt_EndCap = ibooker.book1D("ElEn_highPt_EndCap", "ElEn_highPt_EndCap", ptBin_, 0., 100);
976  mMuEn_highPt_EndCap = ibooker.book1D("MuEn_highPt_EndCap", "MuEn_highPt_EndCap", ptBin_, 0., 100);
977 
978  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "CHEn_lowPt_EndCap", mCHEn_lowPt_EndCap));
979  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "NHEn_lowPt_EndCap", mNHEn_lowPt_EndCap));
980  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "PhEn_lowPt_EndCap", mPhEn_lowPt_EndCap));
981  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "ElEn_lowPt_EndCap", mElEn_lowPt_EndCap));
982  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "MuEn_lowPt_EndCap", mMuEn_lowPt_EndCap));
983  map_of_MEs.insert(
984  std::pair<std::string, MonitorElement*>(DirName + "/" + "CHEn_mediumPt_EndCap", mCHEn_mediumPt_EndCap));
985  map_of_MEs.insert(
986  std::pair<std::string, MonitorElement*>(DirName + "/" + "NHEn_mediumPt_EndCap", mNHEn_mediumPt_EndCap));
987  map_of_MEs.insert(
988  std::pair<std::string, MonitorElement*>(DirName + "/" + "PhEn_mediumPt_EndCap", mPhEn_mediumPt_EndCap));
989  map_of_MEs.insert(
990  std::pair<std::string, MonitorElement*>(DirName + "/" + "ElEn_mediumPt_EndCap", mElEn_mediumPt_EndCap));
991  map_of_MEs.insert(
992  std::pair<std::string, MonitorElement*>(DirName + "/" + "MuEn_mediumPt_EndCap", mMuEn_mediumPt_EndCap));
993  map_of_MEs.insert(
994  std::pair<std::string, MonitorElement*>(DirName + "/" + "CHEn_highPt_EndCap", mCHEn_highPt_EndCap));
995  map_of_MEs.insert(
996  std::pair<std::string, MonitorElement*>(DirName + "/" + "NHEn_highPt_EndCap", mNHEn_highPt_EndCap));
997  map_of_MEs.insert(
998  std::pair<std::string, MonitorElement*>(DirName + "/" + "PhEn_highPt_EndCap", mPhEn_highPt_EndCap));
999  map_of_MEs.insert(
1000  std::pair<std::string, MonitorElement*>(DirName + "/" + "ElEn_highPt_EndCap", mElEn_highPt_EndCap));
1001  map_of_MEs.insert(
1002  std::pair<std::string, MonitorElement*>(DirName + "/" + "MuEn_highPt_EndCap", mMuEn_highPt_EndCap));
1003  /*
1004  //now get handle on OOT PU
1005  mePhFracBarrel_BXm2BXm1Empty = ibooker.book1D("PhFracBarrel_BXm2BXm1Empty", "PHFrac prev empty 2 bunches (Barrel)", 50, 0, 1);
1006  mePhFracBarrel_BXm2BXm1Filled = ibooker.book1D("PhFracBarrel_BXm2BXm1Filled", "PHFrac prev filled 2 bunches (Barrel)", 50, 0, 1);
1007  meNHFracBarrel_BXm2BXm1Empty = ibooker.book1D("NHFracBarrel_BXm2BXm1Empty", "NHFrac prev empty 2 bunches (Barrel)", 50, 0, 1);
1008  meNHFracBarrel_BXm2BXm1Filled = ibooker.book1D("NHFracBarrel_BXm2BXm1Filled", "NHFrac prev filled 2 bunches (Barrel)", 50, 0, 1);
1009  meCHFracBarrel_BXm2BXm1Empty = ibooker.book1D("CHFracBarrel_BXm2BXm1Empty", "CHFrac prev empty 2 bunches (Barrel)", 50, 0, 1);
1010  meCHFracBarrel_BXm2BXm1Filled = ibooker.book1D("CHFracBarrel_BXm2BXm1Filled", "CHFrac prev filled 2 bunches (Barrel)", 50, 0, 1);
1011  mePtBarrel_BXm2BXm1Empty = ibooker.book1D("PtBarrel_BXm2BXm1Empty", "pT prev empty 2 bunches (Barrel)", ptBin_, ptMin_, ptMax_);
1012  mePtBarrel_BXm2BXm1Filled = ibooker.book1D("PtBarrel_BXm2BXm1Filled", "pT prev filled 2 bunches (Barrel)", ptBin_, ptMin_, ptMax_);
1013  mePhFracEndCapPlus_BXm2BXm1Empty = ibooker.book1D("PhFracEndCapPlus_BXm2BXm1Empty", "PHFrac prev empty 2 bunches (EndCapPlus)", 50, 0, 1);
1014  mePhFracEndCapPlus_BXm2BXm1Filled = ibooker.book1D("PhFracEndCapPlus_BXm2BXm1Filled", "PHFrac prev filled 2 bunches (EndCapPlus)", 50, 0, 1);
1015  meNHFracEndCapPlus_BXm2BXm1Empty = ibooker.book1D("NHFracEndCapPlus_BXm2BXm1Empty", "NHFrac prev empty 2 bunches (EndCapPlus)", 50, 0, 1);
1016  meNHFracEndCapPlus_BXm2BXm1Filled = ibooker.book1D("NHFracEndCapPlus_BXm2BXm1Filled", "NHFrac prev filled 2 bunches (EndCapPlus)", 50, 0, 1);
1017  meCHFracEndCapPlus_BXm2BXm1Empty = ibooker.book1D("CHFracEndCapPlus_BXm2BXm1Empty", "CHFrac prev empty 2 bunches (EndCapPlus)", 50, 0, 1);
1018  meCHFracEndCapPlus_BXm2BXm1Filled = ibooker.book1D("CHFracEndCapPlus_BXm2BXm1Filled", "CHFrac prev filled 2 bunches (EndCapPlus)", 50, 0, 1);
1019  mePtEndCapPlus_BXm2BXm1Empty = ibooker.book1D("PtEndCapPlus_BXm2BXm1Empty", "pT prev empty 2 bunches (EndCapPlus)", ptBin_, ptMin_, ptMax_);
1020  mePtEndCapPlus_BXm2BXm1Filled = ibooker.book1D("PtEndCapPlus_BXm2BXm1Filled", "pT prev filled 2 bunches (EndCapPlus)", ptBin_, ptMin_, ptMax_);
1021  meHFHFracPlus_BXm2BXm1Empty = ibooker.book1D("HFHFracPlus_BXm2BXm1Empty", "HFHFrac prev empty 2 bunches (EndCapPlus)", 50, 0, 1);
1022  meHFHFracPlus_BXm2BXm1Filled = ibooker.book1D("HFHFracPlus_BXm2BXm1Filled", "HFHFrac prev filled 2 bunches (EndCapPlus)", 50, 0, 1);
1023  meHFEMFracPlus_BXm2BXm1Empty = ibooker.book1D("HFEMFracPlus_BXm2BXm1Empty", "HFEMFrac prev empty 2 bunches (EndCapPlus)", 50, 0, 1);
1024  meHFEMFracPlus_BXm2BXm1Filled = ibooker.book1D("HFEMFracPlus_BXm2BXm1Filled", "HFEMFrac prev filled 2 bunches (EndCapPlus)", 50, 0, 1);
1025  mePtForwardPlus_BXm2BXm1Empty = ibooker.book1D("PtForwardPlus_BXm2BXm1Empty", "pT prev empty 2 bunches (ForwardPlus)", ptBin_, ptMin_, ptMax_);
1026  mePtForwardPlus_BXm2BXm1Filled = ibooker.book1D("PtForwardPlus_BXm2BXm1Filled", "pT prev filled 2 bunches (ForwardPlus)", ptBin_, ptMin_, ptMax_);
1027  mePhFracEndCapMinus_BXm2BXm1Empty = ibooker.book1D("PhFracEndCapMinus_BXm2BXm1Empty", "PHFrac prev empty 2 bunches (EndCapMinus)", 50, 0, 1);
1028  mePhFracEndCapMinus_BXm2BXm1Filled = ibooker.book1D("PhFracEndCapMinus_BXm2BXm1Filled", "PHFrac prev filled 2 bunches (EndCapMinus)", 50, 0, 1);
1029  meNHFracEndCapMinus_BXm2BXm1Empty = ibooker.book1D("NHFracEndCapMinus_BXm2BXm1Empty", "NHFrac prev empty 2 bunches (EndCapMinus)", 50, 0, 1);
1030  meNHFracEndCapMinus_BXm2BXm1Filled = ibooker.book1D("NHFracEndCapMinus_BXm2BXm1Filled", "NHFrac prev filled 2 bunches (EndCapMinus)", 50, 0, 1);
1031  meCHFracEndCapMinus_BXm2BXm1Empty = ibooker.book1D("CHFracEndCapMinus_BXm2BXm1Empty", "CHFrac prev empty 2 bunches (EndCapMinus)", 50, 0, 1);
1032  meCHFracEndCapMinus_BXm2BXm1Filled = ibooker.book1D("CHFracEndCapMinus_BXm2BXm1Filled", "CHFrac prev filled 2 bunches (EndCapMinus)", 50, 0, 1);
1033  mePtEndCapMinus_BXm2BXm1Empty = ibooker.book1D("PtEndCapMinus_BXm2BXm1Empty", "pT prev empty 2 bunches (EndCapMinus)", ptBin_, ptMin_, ptMax_);
1034  mePtEndCapMinus_BXm2BXm1Filled = ibooker.book1D("PtEndCapMinus_BXm2BXm1Filled", "pT prev filled 2 bunches (EndCapMinus)", ptBin_, ptMin_, ptMax_);
1035  meHFHFracMinus_BXm2BXm1Empty = ibooker.book1D("HFHFracMinus_BXm2BXm1Empty", "HFHFrac prev empty 2 bunches (EndCapMinus)", 50, 0, 1);
1036  meHFHFracMinus_BXm2BXm1Filled = ibooker.book1D("HFHFracMinus_BXm2BXm1Filled", "HFHFrac prev filled 2 bunches (EndCapMinus)", 50, 0, 1);
1037  meHFEMFracMinus_BXm2BXm1Empty = ibooker.book1D("HFEMFracMinus_BXm2BXm1Empty", "HFEMFrac prev empty 2 bunches (EndCapMinus)", 50, 0, 1);
1038  meHFEMFracMinus_BXm2BXm1Filled = ibooker.book1D("HFEMFracMinus_BXm2BXm1Filled", "HFEMFrac prev filled 2 bunches (EndCapMinus)", 50, 0, 1);
1039  mePtForwardMinus_BXm2BXm1Empty = ibooker.book1D("PtForwardMinus_BXm2BXm1Empty", "pT prev empty 2 bunches (ForwardMinus)", ptBin_, ptMin_, ptMax_);
1040  mePtForwardMinus_BXm2BXm1Filled = ibooker.book1D("PtForwardMinus_BXm2BXm1Filled", "pT prev filled 2 bunches (ForwardMinus)", ptBin_, ptMin_, ptMax_);
1041  meEta_BXm2BXm1Empty = ibooker.book1D("Eta_BXm2BXm1Empty", "eta prev empty 2 bunches", etaBin_, etaMin_, etaMax_);
1042  meEta_BXm2BXm1Filled = ibooker.book1D("Eta_BXm2BXm1Filled", "eta prev filled 2 bunches", etaBin_, etaMin_, etaMax_);
1043 
1044  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PhFracBarrel_BXm2BXm1Empty" ,mePhFracBarrel_BXm2BXm1Empty));
1045  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PhFracBarrel_BXm2BXm1Filled" ,mePhFracBarrel_BXm2BXm1Filled));
1046  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"NHFracBarrel_BXm2BXm1Empty" ,meNHFracBarrel_BXm2BXm1Empty));
1047  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"NHFracBarrel_BXm2BXm1Filled" ,meNHFracBarrel_BXm2BXm1Filled));
1048  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CHFracBarrel_BXm2BXm1Empty" ,meCHFracBarrel_BXm2BXm1Empty));
1049  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CHFracBarrel_BXm2BXm1Filled" ,meCHFracBarrel_BXm2BXm1Filled));
1050  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PtBarrel_BXm2BXm1Empty" ,mePtBarrel_BXm2BXm1Empty));
1051  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PtBarrel_BXm2BXm1Filled" ,mePtBarrel_BXm2BXm1Filled));
1052  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PhFracEndCapPlus_BXm2BXm1Empty" ,mePhFracEndCapPlus_BXm2BXm1Empty));
1053  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PhFracEndCapPlus_BXm2BXm1Filled" ,mePhFracEndCapPlus_BXm2BXm1Filled));
1054  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"NHFracEndCapPlus_BXm2BXm1Empty" ,meNHFracEndCapPlus_BXm2BXm1Empty));
1055  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"NHFracEndCapPlus_BXm2BXm1Filled" ,meNHFracEndCapPlus_BXm2BXm1Filled));
1056  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CHFracEndCapPlus_BXm2BXm1Empty" ,meCHFracEndCapPlus_BXm2BXm1Empty));
1057  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CHFracEndCapPlus_BXm2BXm1Filled" ,meCHFracEndCapPlus_BXm2BXm1Filled));
1058  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PtEndCapPlus_BXm2BXm1Empty" ,mePtEndCapPlus_BXm2BXm1Empty));
1059  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PtEndCapPlus_BXm2BXm1Filled" ,mePtEndCapPlus_BXm2BXm1Filled));
1060  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"HFHFracPlus_BXm2BXm1Empty" ,meHFHFracPlus_BXm2BXm1Empty));
1061  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"HFHFracPlus_BXm2BXm1Filled" ,meHFHFracPlus_BXm2BXm1Filled));
1062  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"HFEMFracPlus_BXm2BXm1Empty" ,meHFEMFracPlus_BXm2BXm1Empty));
1063  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"HFEMFracPlus_BXm2BXm1Filled" ,meHFEMFracPlus_BXm2BXm1Filled));
1064  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PtForwardPlus_BXm2BXm1Empty" ,mePtForwardPlus_BXm2BXm1Empty));
1065  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PtForwardPlus_BXm2BXm1Filled" ,mePtForwardPlus_BXm2BXm1Filled));
1066  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PhFracEndCapMinus_BXm2BXm1Empty" ,mePhFracEndCapMinus_BXm2BXm1Empty));
1067  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PhFracEndCapMinus_BXm2BXm1Filled" ,mePhFracEndCapMinus_BXm2BXm1Filled));
1068  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"NHFracEndCapMinus_BXm2BXm1Empty" ,meNHFracEndCapMinus_BXm2BXm1Empty));
1069  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"NHFracEndCapMinus_BXm2BXm1Filled" ,meNHFracEndCapMinus_BXm2BXm1Filled));
1070  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CHFracEndCapMinus_BXm2BXm1Empty" ,meCHFracEndCapMinus_BXm2BXm1Empty));
1071  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CHFracEndCapMinus_BXm2BXm1Filled" ,meCHFracEndCapMinus_BXm2BXm1Filled));
1072  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PtEndCapMinus_BXm2BXm1Empty" ,mePtEndCapMinus_BXm2BXm1Empty));
1073  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PtEndCapMinus_BXm2BXm1Filled" ,mePtEndCapMinus_BXm2BXm1Filled));
1074  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"HFHFracMinus_BXm2BXm1Empty" ,meHFHFracMinus_BXm2BXm1Empty));
1075  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"HFHFracMinus_BXm2BXm1Filled" ,meHFHFracMinus_BXm2BXm1Filled));
1076  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"HFEMFracMinus_BXm2BXm1Empty" ,meHFEMFracMinus_BXm2BXm1Empty));
1077  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"HFEMFracMinus_BXm2BXm1Filled" ,meHFEMFracMinus_BXm2BXm1Filled));
1078  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PtForwardMinus_BXm2BXm1Empty" ,mePtForwardMinus_BXm2BXm1Empty));
1079  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PtForwardMinus_BXm2BXm1Filled" ,mePtForwardMinus_BXm2BXm1Filled));
1080  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"Eta_BXm2BXm1Empty" ,meEta_BXm2BXm1Empty));
1081  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"Eta_BXm2BXm1Filled",meEta_BXm2BXm1Filled));
1082  */
1083  mePhFracBarrel_BXm1Empty = ibooker.book1D("PhFracBarrel_BXm1Empty", "PHFrac prev empty 1 bunch (Barrel)", 50, 0, 1);
1084  mePhFracBarrel_BXm1Filled =
1085  ibooker.book1D("PhFracBarrel_BXm1Filled", "PHFrac prev filled 1 bunch (Barrel)", 50, 0, 1);
1086  meNHFracBarrel_BXm1Empty = ibooker.book1D("NHFracBarrel_BXm1Empty", "NHFrac prev empty 1 bunch (Barrel)", 50, 0, 1);
1087  meNHFracBarrel_BXm1Filled =
1088  ibooker.book1D("NHFracBarrel_BXm1Filled", "NHFrac prev filled 1 bunch (Barrel)", 50, 0, 1);
1089  meCHFracBarrel_BXm1Empty = ibooker.book1D("CHFracBarrel_BXm1Empty", "CHFrac prev empty 1 bunch (Barrel)", 50, 0, 1);
1090  meCHFracBarrel_BXm1Filled =
1091  ibooker.book1D("CHFracBarrel_BXm1Filled", "CHFrac prev filled 1 bunch (Barrel)", 50, 0, 1);
1092  mePtBarrel_BXm1Empty =
1093  ibooker.book1D("PtBarrel_BXm1Empty", "pT prev empty 1 bunch (Barrel)", ptBin_, ptMin_, ptMax_);
1094  mePtBarrel_BXm1Filled =
1095  ibooker.book1D("PtBarrel_BXm1Filled", "pT prev filled 1 bunch (Barrel)", ptBin_, ptMin_, ptMax_);
1096  mePhFracEndCapPlus_BXm1Empty =
1097  ibooker.book1D("PhFracEndCapPlus_BXm1Empty", "PHFrac prev empty 1 bunch (EndCapPlus)", 50, 0, 1);
1098  mePhFracEndCapPlus_BXm1Filled =
1099  ibooker.book1D("PhFracEndCapPlus_BXm1Filled", "PHFrac prev filled 1 bunch (EndCapPlus)", 50, 0, 1);
1100  meNHFracEndCapPlus_BXm1Empty =
1101  ibooker.book1D("NHFracEndCapPlus_BXm1Empty", "NHFrac prev empty 1 bunch (EndCapPlus)", 50, 0, 1);
1102  meNHFracEndCapPlus_BXm1Filled =
1103  ibooker.book1D("NHFracEndCapPlus_BXm1Filled", "NHFrac prev filled 1 bunch (EndCapPlus)", 50, 0, 1);
1104  meCHFracEndCapPlus_BXm1Empty =
1105  ibooker.book1D("CHFracEndCapPlus_BXm1Empty", "CHFrac prev empty 1 bunch (EndCapPlus)", 50, 0, 1);
1106  meCHFracEndCapPlus_BXm1Filled =
1107  ibooker.book1D("CHFracEndCapPlus_BXm1Filled", "CHFrac prev filled 1 bunch (EndCapPlus)", 50, 0, 1);
1108  mePtEndCapPlus_BXm1Empty =
1109  ibooker.book1D("PtEndCapPlus_BXm1Empty", "pT prev empty 1 bunch (EndCapPlus)", ptBin_, ptMin_, ptMax_);
1110  mePtEndCapPlus_BXm1Filled =
1111  ibooker.book1D("PtEndCapPlus_BXm1Filled", "pT prev filled 1 bunch (EndCapPlus)", ptBin_, ptMin_, ptMax_);
1112  meHFHFracPlus_BXm1Empty =
1113  ibooker.book1D("HFHFracPlus_BXm1Empty", "HFHFrac prev empty 1 bunch (EndCapPlus)", 50, 0, 1);
1114  meHFHFracPlus_BXm1Filled =
1115  ibooker.book1D("HFHFracPlus_BXm1Filled", "HFHFrac prev filled 1 bunch (EndCapPlus)", 50, 0, 1);
1116  meHFEMFracPlus_BXm1Empty =
1117  ibooker.book1D("HFEMFracPlus_BXm1Empty", "HFEMFrac prev empty 1 bunch (EndCapPlus)", 50, 0, 1);
1118  meHFEMFracPlus_BXm1Filled =
1119  ibooker.book1D("HFEMFracPlus_BXm1Filled", "HFEMFrac prev filled 1 bunch (EndCapPlus)", 50, 0, 1);
1120  mePtForwardPlus_BXm1Empty =
1121  ibooker.book1D("PtForwardPlus_BXm1Empty", "pT prev empty 1 bunch (ForwardPlus)", ptBin_, ptMin_, ptMax_);
1122  mePtForwardPlus_BXm1Filled =
1123  ibooker.book1D("PtForwardPlus_BXm1Filled", "pT prev filled 1 bunch (ForwardPlus)", ptBin_, ptMin_, ptMax_);
1124  mePhFracEndCapMinus_BXm1Empty =
1125  ibooker.book1D("PhFracEndCapMinus_BXm1Empty", "PHFrac prev empty 1 bunch (EndCapMinus)", 50, 0, 1);
1126  mePhFracEndCapMinus_BXm1Filled =
1127  ibooker.book1D("PhFracEndCapMinus_BXm1Filled", "PHFrac prev filled 1 bunch (EndCapMinus)", 50, 0, 1);
1128  meNHFracEndCapMinus_BXm1Empty =
1129  ibooker.book1D("NHFracEndCapMinus_BXm1Empty", "NHFrac prev empty 1 bunch (EndCapMinus)", 50, 0, 1);
1130  meNHFracEndCapMinus_BXm1Filled =
1131  ibooker.book1D("NHFracEndCapMinus_BXm1Filled", "NHFrac prev filled 1 bunch (EndCapMinus)", 50, 0, 1);
1132  meCHFracEndCapMinus_BXm1Empty =
1133  ibooker.book1D("CHFracEndCapMinus_BXm1Empty", "CHFrac prev empty 1 bunch (EndCapMinus)", 50, 0, 1);
1134  meCHFracEndCapMinus_BXm1Filled =
1135  ibooker.book1D("CHFracEndCapMinus_BXm1Filled", "CHFrac prev filled 1 bunch (EndCapMinus)", 50, 0, 1);
1136  mePtEndCapMinus_BXm1Empty =
1137  ibooker.book1D("PtEndCapMinus_BXm1Empty", "pT prev empty 1 bunch (EndCapMinus)", ptBin_, ptMin_, ptMax_);
1138  mePtEndCapMinus_BXm1Filled =
1139  ibooker.book1D("PtEndCapMinus_BXm1Filled", "pT prev filled 1 bunch (EndCapMinus)", ptBin_, ptMin_, ptMax_);
1140  meHFHFracMinus_BXm1Empty =
1141  ibooker.book1D("HFHFracMinus_BXm1Empty", "HFHFrac prev empty 1 bunch (EndCapMinus)", 50, 0, 1);
1142  meHFHFracMinus_BXm1Filled =
1143  ibooker.book1D("HFHFracMinus_BXm1Filled", "HFHFrac prev filled 1 bunch (EndCapMinus)", 50, 0, 1);
1144  meHFEMFracMinus_BXm1Empty =
1145  ibooker.book1D("HFEMFracMinus_BXm1Empty", "HFEMFrac prev empty 1 bunch (EndCapMinus)", 50, 0, 1);
1146  meHFEMFracMinus_BXm1Filled =
1147  ibooker.book1D("HFEMFracMinus_BXm1Filled", "HFEMFrac prev filled 1 bunch (EndCapMinus)", 50, 0, 1);
1148  mePtForwardMinus_BXm1Empty =
1149  ibooker.book1D("PtForwardMinus_BXm1Empty", "pT prev empty 1 bunch (ForwardMinus)", ptBin_, ptMin_, ptMax_);
1150  mePtForwardMinus_BXm1Filled =
1151  ibooker.book1D("PtForwardMinus_BXm1Filled", "pT prev filled 1 bunch (ForwardMinus)", ptBin_, ptMin_, ptMax_);
1152  meEta_BXm1Empty = ibooker.book1D("Eta_BXm1Empty", "eta prev empty 1 bunch", etaBin_, etaMin_, etaMax_);
1153  meEta_BXm1Filled = ibooker.book1D("Eta_BXm1Filled", "eta prev filled 1 bunch", etaBin_, etaMin_, etaMax_);
1154 
1155  map_of_MEs.insert(
1156  std::pair<std::string, MonitorElement*>(DirName + "/" + "PhFracBarrel_BXm1Empty", mePhFracBarrel_BXm1Empty));
1157  map_of_MEs.insert(
1158  std::pair<std::string, MonitorElement*>(DirName + "/" + "PhFracBarrel_BXm1Filled", mePhFracBarrel_BXm1Filled));
1159  map_of_MEs.insert(
1160  std::pair<std::string, MonitorElement*>(DirName + "/" + "NHFracBarrel_BXm1Empty", meNHFracBarrel_BXm1Empty));
1161  map_of_MEs.insert(
1162  std::pair<std::string, MonitorElement*>(DirName + "/" + "NHFracBarrel_BXm1Filled", meNHFracBarrel_BXm1Filled));
1163  map_of_MEs.insert(
1164  std::pair<std::string, MonitorElement*>(DirName + "/" + "CHFracBarrel_BXm1Empty", meCHFracBarrel_BXm1Empty));
1165  map_of_MEs.insert(
1166  std::pair<std::string, MonitorElement*>(DirName + "/" + "CHFracBarrel_BXm1Filled", meCHFracBarrel_BXm1Filled));
1167  map_of_MEs.insert(
1168  std::pair<std::string, MonitorElement*>(DirName + "/" + "PtBarrel_BXm1Empty", mePtBarrel_BXm1Empty));
1169  map_of_MEs.insert(
1170  std::pair<std::string, MonitorElement*>(DirName + "/" + "PtBarrel_BXm1Filled", mePtBarrel_BXm1Filled));
1171  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "PhFracEndCapPlus_BXm1Empty",
1172  mePhFracEndCapPlus_BXm1Empty));
1173  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "PhFracEndCapPlus_BXm1Filled",
1174  mePhFracEndCapPlus_BXm1Filled));
1175  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "NHFracEndCapPlus_BXm1Empty",
1176  meNHFracEndCapPlus_BXm1Empty));
1177  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "NHFracEndCapPlus_BXm1Filled",
1178  meNHFracEndCapPlus_BXm1Filled));
1179  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "CHFracEndCapPlus_BXm1Empty",
1180  meCHFracEndCapPlus_BXm1Empty));
1181  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "CHFracEndCapPlus_BXm1Filled",
1182  meCHFracEndCapPlus_BXm1Filled));
1183  map_of_MEs.insert(
1184  std::pair<std::string, MonitorElement*>(DirName + "/" + "PtEndCapPlus_BXm1Empty", mePtEndCapPlus_BXm1Empty));
1185  map_of_MEs.insert(
1186  std::pair<std::string, MonitorElement*>(DirName + "/" + "PtEndCapPlus_BXm1Filled", mePtEndCapPlus_BXm1Filled));
1187  map_of_MEs.insert(
1188  std::pair<std::string, MonitorElement*>(DirName + "/" + "HFHFracPlus_BXm1Empty", meHFHFracPlus_BXm1Empty));
1189  map_of_MEs.insert(
1190  std::pair<std::string, MonitorElement*>(DirName + "/" + "HFHFracPlus_BXm1Filled", meHFHFracPlus_BXm1Filled));
1191  map_of_MEs.insert(
1192  std::pair<std::string, MonitorElement*>(DirName + "/" + "HFEMFracPlus_BXm1Empty", meHFEMFracPlus_BXm1Empty));
1193  map_of_MEs.insert(
1194  std::pair<std::string, MonitorElement*>(DirName + "/" + "HFEMFracPlus_BXm1Filled", meHFEMFracPlus_BXm1Filled));
1195  map_of_MEs.insert(
1196  std::pair<std::string, MonitorElement*>(DirName + "/" + "PtForwardPlus_BXm1Empty", mePtForwardPlus_BXm1Empty));
1197  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "PtForwardPlus_BXm1Filled",
1198  mePtForwardPlus_BXm1Filled));
1199  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "PhFracEndCapMinus_BXm1Empty",
1200  mePhFracEndCapMinus_BXm1Empty));
1201  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "PhFracEndCapMinus_BXm1Filled",
1202  mePhFracEndCapMinus_BXm1Filled));
1203  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "NHFracEndCapMinus_BXm1Empty",
1204  meNHFracEndCapMinus_BXm1Empty));
1205  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "NHFracEndCapMinus_BXm1Filled",
1206  meNHFracEndCapMinus_BXm1Filled));
1207  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "CHFracEndCapMinus_BXm1Empty",
1208  meCHFracEndCapMinus_BXm1Empty));
1209  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "CHFracEndCapMinus_BXm1Filled",
1210  meCHFracEndCapMinus_BXm1Filled));
1211  map_of_MEs.insert(
1212  std::pair<std::string, MonitorElement*>(DirName + "/" + "PtEndCapMinus_BXm1Empty", mePtEndCapMinus_BXm1Empty));
1213  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "PtEndCapMinus_BXm1Filled",
1214  mePtEndCapMinus_BXm1Filled));
1215  map_of_MEs.insert(
1216  std::pair<std::string, MonitorElement*>(DirName + "/" + "HFHFracMinus_BXm1Empty", meHFHFracMinus_BXm1Empty));
1217  map_of_MEs.insert(
1218  std::pair<std::string, MonitorElement*>(DirName + "/" + "HFHFracMinus_BXm1Filled", meHFHFracMinus_BXm1Filled));
1219  map_of_MEs.insert(
1220  std::pair<std::string, MonitorElement*>(DirName + "/" + "HFEMFracMinus_BXm1Empty", meHFEMFracMinus_BXm1Empty));
1221  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "HFEMFracMinus_BXm1Filled",
1222  meHFEMFracMinus_BXm1Filled));
1223  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "PtForwardMinus_BXm1Empty",
1224  mePtForwardMinus_BXm1Empty));
1225  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "PtForwardMinus_BXm1Filled",
1226  mePtForwardMinus_BXm1Filled));
1227  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "Eta_BXm1Empty", meEta_BXm1Empty));
1228  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "Eta_BXm1Filled", meEta_BXm1Filled));
1229 
1230  //multiplicities
1231  mChMultiplicity_lowPt_EndCap =
1232  ibooker.book1D("ChMultiplicity_lowPt_EndCap", "ChMultiplicity_lowPt_EndCap", 60, 0, 60);
1233  mNeutMultiplicity_lowPt_EndCap =
1234  ibooker.book1D("NeutMultiplicity_lowPt_EndCap", "NeutMultiplicity_lowPt_EndCap", 60, 0, 60);
1235  mMuMultiplicity_lowPt_EndCap =
1236  ibooker.book1D("MuMultiplicity_lowPt_EndCap", "MuMultiplicity_lowPt_EndCap", 10, 0, 10);
1237  mChMultiplicity_mediumPt_EndCap =
1238  ibooker.book1D("ChMultiplicity_mediumPt_EndCap", "ChMultiplicity_mediumPt_EndCap", 60, 0, 60);
1239  mNeutMultiplicity_mediumPt_EndCap =
1240  ibooker.book1D("NeutMultiplicity_mediumPt_EndCap", "NeutMultiplicity_mediumPt_EndCap", 60, 0, 60);
1241  mMuMultiplicity_mediumPt_EndCap =
1242  ibooker.book1D("MuMultiplicity_mediumPt_EndCap", "MuMultiplicity_mediumPt_EndCap", 10, 0, 10);
1243  mChMultiplicity_highPt_EndCap =
1244  ibooker.book1D("ChMultiplicity_highPt_EndCap", "ChMultiplicity_highPt_EndCap", 60, 0, 60);
1245  mNeutMultiplicity_highPt_EndCap =
1246  ibooker.book1D("NeutMultiplicity_highPt_EndCap", "NeutMultiplicity_highPt_EndCap", 60, 0, 60);
1247  mMuMultiplicity_highPt_EndCap =
1248  ibooker.book1D("MuMultiplicity_highPt_EndCap", "MuMultiplicity_highPt_EndCap", 10, 0, 10);
1249 
1250  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "ChMultiplicity_lowPt_EndCap",
1251  mChMultiplicity_lowPt_EndCap));
1252  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "NeutMultiplicity_lowPt_EndCap",
1253  mNeutMultiplicity_lowPt_EndCap));
1254  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "MuMultiplicity_lowPt_EndCap",
1255  mMuMultiplicity_lowPt_EndCap));
1256  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "ChMultiplicity_mediumPt_EndCap",
1257  mChMultiplicity_mediumPt_EndCap));
1258  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "NeutMultiplicity_mediumPt_EndCap",
1259  mNeutMultiplicity_mediumPt_EndCap));
1260  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "MuMultiplicity_mediumPt_EndCap",
1261  mMuMultiplicity_mediumPt_EndCap));
1262  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "ChMultiplicity_highPt_EndCap",
1263  mChMultiplicity_highPt_EndCap));
1264  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "NeutMultiplicity_highPt_EndCap",
1265  mNeutMultiplicity_highPt_EndCap));
1266  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "MuMultiplicity_highPt_EndCap",
1267  mMuMultiplicity_highPt_EndCap));
1268 
1269  //forward monitoring
1270  //energy fraction
1271  mHFEFrac_lowPt_Forward = ibooker.book1D("HFEFrac_lowPt_Forward", "HFEFrac_lowPt_Forward", 70, -0.2, 1.2);
1272  mHFHFrac_lowPt_Forward = ibooker.book1D("HFHFrac_lowPt_Forward", "HFHFrac_lowPt_Forward", 70, -0.2, 1.2);
1273  mHFEFrac_mediumPt_Forward = ibooker.book1D("HFEFrac_mediumPt_Forward", "HFEFrac_mediumPt_Forward", 70, -0.2, 1.2);
1274  mHFHFrac_mediumPt_Forward = ibooker.book1D("HFHFrac_mediumPt_Forward", "HFHFrac_mediumPt_Forward", 70, -0.2, 1.2);
1275  mHFEFrac_highPt_Forward = ibooker.book1D("HFEFrac_highPt_Forward", "HFEFrac_highPt_Forward", 70, -0.2, 1.2);
1276  mHFHFrac_highPt_Forward = ibooker.book1D("HFHFrac_highPt_Forward", "HFHFrac_highPt_Forward", 70, -0.2, 1.2);
1277  map_of_MEs.insert(
1278  std::pair<std::string, MonitorElement*>(DirName + "/" + "HFHFrac_lowPt_Forward", mHFHFrac_lowPt_Forward));
1279  map_of_MEs.insert(
1280  std::pair<std::string, MonitorElement*>(DirName + "/" + "HFEFrac_lowPt_Forward", mHFEFrac_lowPt_Forward));
1281  map_of_MEs.insert(
1282  std::pair<std::string, MonitorElement*>(DirName + "/" + "HFHFrac_mediumPt_Forward", mHFHFrac_mediumPt_Forward));
1283  map_of_MEs.insert(
1284  std::pair<std::string, MonitorElement*>(DirName + "/" + "HFEFrac_mediumPt_Forward", mHFEFrac_mediumPt_Forward));
1285  map_of_MEs.insert(
1286  std::pair<std::string, MonitorElement*>(DirName + "/" + "HFHFrac_highPt_Forward", mHFHFrac_highPt_Forward));
1287  map_of_MEs.insert(
1288  std::pair<std::string, MonitorElement*>(DirName + "/" + "HFEFrac_highPt_Forward", mHFEFrac_highPt_Forward));
1289 
1290  //energies
1291  mHFEEn_lowPt_Forward = ibooker.book1D("HFEEn_lowPt_Forward", "HFEEn_lowPt_Forward", ptBin_, 0., ptMax_);
1292  mHFHEn_lowPt_Forward = ibooker.book1D("HFHEn_lowPt_Forward", "HFHEn_lowPt_Forward", ptBin_, 0., 2.0 * ptMax_);
1293  mHFEEn_mediumPt_Forward =
1294  ibooker.book1D("HFEEn_mediumPt_Forward", "HFEEn_mediumPt_Forward", ptBin_, 0., 1.5 * ptMax_);
1295  mHFHEn_mediumPt_Forward =
1296  ibooker.book1D("HFHEn_mediumPt_Forward", "HFHEn_mediumPt_Forward", ptBin_, 0., 2.5 * ptMax_);
1297  mHFEEn_highPt_Forward = ibooker.book1D("HFEEn_highPt_Forward", "HFEEn_highPt_Forward", ptBin_, 0., 1.5 * ptMax_);
1298  mHFHEn_highPt_Forward = ibooker.book1D("HFHEn_highPt_Forward", "HFHEn_highPt_Forward", ptBin_, 0., 5.0 * ptMax_);
1299  map_of_MEs.insert(
1300  std::pair<std::string, MonitorElement*>(DirName + "/" + "HFHEn_lowPt_Forward", mHFHEn_lowPt_Forward));
1301  map_of_MEs.insert(
1302  std::pair<std::string, MonitorElement*>(DirName + "/" + "HFEEn_lowPt_Forward", mHFEEn_lowPt_Forward));
1303  map_of_MEs.insert(
1304  std::pair<std::string, MonitorElement*>(DirName + "/" + "HFHEn_mediumPt_Forward", mHFHEn_mediumPt_Forward));
1305  map_of_MEs.insert(
1306  std::pair<std::string, MonitorElement*>(DirName + "/" + "HFEEn_mediumPt_Forward", mHFEEn_mediumPt_Forward));
1307  map_of_MEs.insert(
1308  std::pair<std::string, MonitorElement*>(DirName + "/" + "HFHEn_highPt_Forward", mHFHEn_highPt_Forward));
1309  map_of_MEs.insert(
1310  std::pair<std::string, MonitorElement*>(DirName + "/" + "HFEEn_highPt_Forward", mHFEEn_highPt_Forward));
1311  //multiplicities
1312  mNeutMultiplicity_lowPt_Forward =
1313  ibooker.book1D("NeutMultiplicity_lowPt_Forward", "NeutMultiplicity_lowPt_Forward", 60, 0, 60);
1314  mNeutMultiplicity_mediumPt_Forward =
1315  ibooker.book1D("NeutMultiplicity_mediumPt_Forward", "NeutMultiplicity_mediumPt_Forward", 60, 0, 60);
1316  mNeutMultiplicity_highPt_Forward =
1317  ibooker.book1D("NeutMultiplicity_highPt_Forward", "NeutMultiplicity_highPt_Forward", 60, 0, 60);
1318 
1319  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "NeutMultiplicity_lowPt_Forward",
1320  mNeutMultiplicity_lowPt_Forward));
1321  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "NeutMultiplicity_mediumPt_Forward",
1322  mNeutMultiplicity_mediumPt_Forward));
1323  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "NeutMultiplicity_highPt_Forward",
1324  mNeutMultiplicity_highPt_Forward));
1325 
1326  mChargedHadronEnergy = ibooker.book1D("ChargedHadronEnergy", "charged HAD energy", 50, 0, 100);
1327  mNeutralHadronEnergy = ibooker.book1D("NeutralHadronEnergy", "neutral HAD energy", 50, 0, 100);
1328  mChargedEmEnergy = ibooker.book1D("ChargedEmEnergy", "charged EM energy ", 50, 0, 100);
1329  mChargedMuEnergy = ibooker.book1D("ChargedMuEnergy", "charged Mu energy", 50, 0, 100);
1330  mNeutralEmEnergy = ibooker.book1D("NeutralEmEnergy", "neutral EM energy", 50, 0, 100);
1331  mChargedMultiplicity = ibooker.book1D("ChargedMultiplicity", "charged multiplicity ", 50, 0, 100);
1332  mNeutralMultiplicity = ibooker.book1D("NeutralMultiplicity", "neutral multiplicity", 50, 0, 100);
1333  mMuonMultiplicity = ibooker.book1D("MuonMultiplicity", "muon multiplicity", 50, 0, 100);
1334  map_of_MEs.insert(
1335  std::pair<std::string, MonitorElement*>(DirName + "/" + "ChargedHadronEnergy", mChargedHadronEnergy));
1336  map_of_MEs.insert(
1337  std::pair<std::string, MonitorElement*>(DirName + "/" + "NeutralHadronEnergy", mNeutralHadronEnergy));
1338  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "ChargedEmEnergy", mChargedEmEnergy));
1339  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "ChargedMuEnergy", mChargedMuEnergy));
1340  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "NeutralEmEnergy", mNeutralEmEnergy));
1341  map_of_MEs.insert(
1342  std::pair<std::string, MonitorElement*>(DirName + "/" + "ChargedMultiplicity", mChargedMultiplicity));
1343  map_of_MEs.insert(
1344  std::pair<std::string, MonitorElement*>(DirName + "/" + "NeutralMultiplicity", mNeutralMultiplicity));
1345  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "MuonMultiplicity", mMuonMultiplicity));
1346 
1347  // Book NPV profiles
1348  //----------------------------------------------------------------------------
1349  mChargedHadronEnergy_profile = ibooker.bookProfile(
1350  "ChargedHadronEnergy_profile", "charged HAD energy", nbinsPV_, nPVlow_, nPVhigh_, 50, 0, 100);
1351  mNeutralHadronEnergy_profile = ibooker.bookProfile(
1352  "NeutralHadronEnergy_profile", "neutral HAD energy", nbinsPV_, nPVlow_, nPVhigh_, 50, 0, 100);
1353  mChargedEmEnergy_profile =
1354  ibooker.bookProfile("ChargedEmEnergy_profile", "charged EM energy", nbinsPV_, nPVlow_, nPVhigh_, 50, 0, 100);
1355  mChargedMuEnergy_profile =
1356  ibooker.bookProfile("ChargedMuEnergy_profile", "charged Mu energy", nbinsPV_, nPVlow_, nPVhigh_, 50, 0, 100);
1357  mNeutralEmEnergy_profile =
1358  ibooker.bookProfile("NeutralEmEnergy_profile", "neutral EM energy", nbinsPV_, nPVlow_, nPVhigh_, 50, 0, 100);
1359  mChargedMultiplicity_profile = ibooker.bookProfile(
1360  "ChargedMultiplicity_profile", "charged multiplicity", nbinsPV_, nPVlow_, nPVhigh_, 50, 0, 100);
1361  mNeutralMultiplicity_profile = ibooker.bookProfile(
1362  "NeutralMultiplicity_profile", "neutral multiplicity", nbinsPV_, nPVlow_, nPVhigh_, 50, 0, 100);
1363  mMuonMultiplicity_profile =
1364  ibooker.bookProfile("MuonMultiplicity_profile", "muon multiplicity", nbinsPV_, nPVlow_, nPVhigh_, 50, 0, 100);
1365 
1366  // Set NPV profiles x-axis title
1367  //----------------------------------------------------------------------------
1368  mChargedHadronEnergy_profile->setAxisTitle("nvtx", 1);
1369  mNeutralHadronEnergy_profile->setAxisTitle("nvtx", 1);
1370  mChargedEmEnergy_profile->setAxisTitle("nvtx", 1);
1371  mChargedMuEnergy_profile->setAxisTitle("nvtx", 1);
1372  mNeutralEmEnergy_profile->setAxisTitle("nvtx", 1);
1373  mChargedMultiplicity_profile->setAxisTitle("nvtx", 1);
1374  mNeutralMultiplicity_profile->setAxisTitle("nvtx", 1);
1375  mMuonMultiplicity_profile->setAxisTitle("nvtx", 1);
1376 
1377  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "ChargedHadronEnergy_profile",
1378  mChargedHadronEnergy_profile));
1379  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "NeutralHadronEnergy_profile",
1380  mNeutralHadronEnergy_profile));
1381  map_of_MEs.insert(
1382  std::pair<std::string, MonitorElement*>(DirName + "/" + "ChargedEmEnergy_profile", mChargedEmEnergy_profile));
1383  map_of_MEs.insert(
1384  std::pair<std::string, MonitorElement*>(DirName + "/" + "ChargedMuEnergy_profile", mChargedMuEnergy_profile));
1385  map_of_MEs.insert(
1386  std::pair<std::string, MonitorElement*>(DirName + "/" + "NeutralEmEnergy_profile", mNeutralEmEnergy_profile));
1387  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "ChargedMultiplicity_profile",
1388  mChargedMultiplicity_profile));
1389  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "NeutralMultiplicity_profile",
1390  mNeutralMultiplicity_profile));
1391  map_of_MEs.insert(
1392  std::pair<std::string, MonitorElement*>(DirName + "/" + "MuonMultiplicity_profile", mMuonMultiplicity_profile));
1393 
1394  mNeutralFraction = ibooker.book1D("NeutralConstituentsFraction", "Neutral Constituents Fraction", 100, 0, 1);
1395  map_of_MEs.insert(
1396  std::pair<std::string, MonitorElement*>(DirName + "/" + "NeutralConstituentsFraction", mNeutralFraction));
1397  }
1398 
1399  //
1400  if (isMiniAODJet_) {
1401  mMass_Barrel = ibooker.book1D("JetMass_Barrel", "JetMass_Barrel", 50, 0, 250);
1402  mMass_EndCap = ibooker.book1D("JetMass_EndCap", "JetMass_EndCap", 50, 0, 250);
1403  mMass_Forward = ibooker.book1D("JetMass_Forward", "JetMass_Forward", 50, 0, 250);
1404 
1405  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "JetMass_Barrel", mMass_Barrel));
1406  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "JetMass_EndCap", mMass_EndCap));
1407  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "JetMass_Forward", mMass_Forward));
1408  if (!filljetsubstruc_) {
1409  //done only for MINIAOD
1410  mPt_CaloJet = ibooker.book1D("Pt_CaloJet", "Pt_CaloJet", ptBin_, 10, ptMax_);
1411  mEMF_CaloJet = ibooker.book1D("EMF_CaloJet", "EMF_CaloJet", 52, -0.02, 1.02);
1412  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "Pt_CaloJet", mPt_CaloJet));
1413  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "EMF_CaloJet", mEMF_CaloJet));
1414  }
1415  if (filljetsubstruc_) {
1416  //miniaod specific variables, especially for substructure
1417  mSoftDropMass = ibooker.book1D("SoftDropMass", "SoftDropMass", 50, 0, 250);
1418  mPrunedMass = ibooker.book1D("PrunedMass", "PrunedMass", 50, 0, 250);
1419  mTrimmedMass = ibooker.book1D("TrimmedMass", "TrimmedMass", 50, 0, 250);
1420  mFilteredMass = ibooker.book1D("FilteredMass", "FilteredMass", 50, 0, 250);
1421  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "SoftDropMass", mSoftDropMass));
1422  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "PrunedMass", mPrunedMass));
1423  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "TrimmedMass", mTrimmedMass));
1424  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "FilteredMass", mFilteredMass));
1425 
1426  mtau2_over_tau1 = ibooker.book1D("tau2_over_tau1", "tau2_over_tau1", 50, 0, 1);
1427  mtau3_over_tau2 = ibooker.book1D("tau3_over_tau2", "tau3_over_tau2", 50, 0, 1);
1428  mCATopTag_topMass = ibooker.book1D("CATopTag_topMass", "CATopTag_topMass", 50, 50, 250);
1429  mCATopTag_minMass = ibooker.book1D("CATopTag_minMass", "CATopTag_minMass", 50, 0, 250);
1430  mCATopTag_nSubJets = ibooker.book1D("nSubJets_CATopTag", "nSubJets_CATopTag", 10, 0, 10);
1431  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "tau2_over_tau1", mtau2_over_tau1));
1432  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "tau3_over_tau2", mtau3_over_tau2));
1433  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "CATopTag_topMass", mCATopTag_topMass));
1434  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "CATopTag_minMass", mCATopTag_minMass));
1435  map_of_MEs.insert(
1436  std::pair<std::string, MonitorElement*>(DirName + "/" + "nSubJets_CATopTag", mCATopTag_nSubJets));
1437 
1438  mnSubJetsCMSTopTag = ibooker.book1D("nSubJets_CMSTopTag", "nSubJets_CMSTopTag", 10, 0, 10);
1439  mSubJet1_CMSTopTag_pt = ibooker.book1D("SubJet1_CMSTopTag_pt", "SubJet1_CMSTopTag_pt", ptBin_, ptMin_, ptMax_);
1440  mSubJet1_CMSTopTag_eta =
1441  ibooker.book1D("SubJet1_CMSTopTag_eta", "SubJet1_CMSTopTag_eta", etaBin_, etaMin_, etaMax_);
1442  mSubJet1_CMSTopTag_phi =
1443  ibooker.book1D("SubJet1_CMSTopTag_phi", "SubJet1_CMSTopTag_phi", phiBin_, phiMin_, phiMax_);
1444  mSubJet1_CMSTopTag_mass = ibooker.book1D("SubJet1_CMSTopTag_mass", "SubJet1_CMSTopTag_mass", 50, 0, 250);
1445  mSubJet2_CMSTopTag_pt = ibooker.book1D("SubJet2_CMSTopTag_pt", "SubJet2_CMSTopTag_pt", ptBin_, ptMin_, ptMax_);
1446  mSubJet2_CMSTopTag_eta =
1447  ibooker.book1D("SubJet2_CMSTopTag_eta", "SubJet2_CMSTopTag_eta", etaBin_, etaMin_, etaMax_);
1448  mSubJet2_CMSTopTag_phi =
1449  ibooker.book1D("SubJet2_CMSTopTag_phi", "SubJet2_CMSTopTag_phi", phiBin_, phiMin_, phiMax_);
1450  mSubJet2_CMSTopTag_mass = ibooker.book1D("SubJet2_CMSTopTag_mass", "SubJet2_CMSTopTag_mass", 50, 0, 250);
1451  mSubJet3_CMSTopTag_pt = ibooker.book1D("SubJet3_CMSTopTag_pt", "SubJet3_CMSTopTag_pt", ptBin_, ptMin_, ptMax_);
1452  mSubJet3_CMSTopTag_eta =
1453  ibooker.book1D("SubJet3_CMSTopTag_eta", "SubJet3_CMSTopTag_eta", etaBin_, etaMin_, etaMax_);
1454  mSubJet3_CMSTopTag_phi =
1455  ibooker.book1D("SubJet3_CMSTopTag_phi", "SubJet3_CMSTopTag_phi", phiBin_, phiMin_, phiMax_);
1456  mSubJet3_CMSTopTag_mass = ibooker.book1D("SubJet3_CMSTopTag_mass", "SubJet3_CMSTopTag_mass", 50, 0, 250);
1457  mSubJet4_CMSTopTag_pt = ibooker.book1D("SubJet4_CMSTopTag_pt", "SubJet4_CMSTopTag_pt", ptBin_, ptMin_, ptMax_);
1458  mSubJet4_CMSTopTag_eta =
1459  ibooker.book1D("SubJet4_CMSTopTag_eta", "SubJet4_CMSTopTag_eta", etaBin_, etaMin_, etaMax_);
1460  mSubJet4_CMSTopTag_phi =
1461  ibooker.book1D("SubJet4_CMSTopTag_phi", "SubJet4_CMSTopTag_phi", phiBin_, phiMin_, phiMax_);
1462  mSubJet4_CMSTopTag_mass = ibooker.book1D("SubJet4_CMSTopTag_mass", "SubJet4_CMSTopTag_mass", 50, 0, 250);
1463 
1464  map_of_MEs.insert(
1465  std::pair<std::string, MonitorElement*>(DirName + "/" + "nSubJets_CMSTopTag", mnSubJetsCMSTopTag));
1466  map_of_MEs.insert(
1467  std::pair<std::string, MonitorElement*>(DirName + "/" + "SubJet1_CMSTopTag_pt", mSubJet1_CMSTopTag_pt));
1468  map_of_MEs.insert(
1469  std::pair<std::string, MonitorElement*>(DirName + "/" + "SubJet1_CMSTopTag_eta", mSubJet1_CMSTopTag_eta));
1470  map_of_MEs.insert(
1471  std::pair<std::string, MonitorElement*>(DirName + "/" + "SubJet1_CMSTopTag_phi", mSubJet1_CMSTopTag_phi));
1472  map_of_MEs.insert(
1473  std::pair<std::string, MonitorElement*>(DirName + "/" + "SubJet1_CMSTopTag_mass", mSubJet1_CMSTopTag_mass));
1474  map_of_MEs.insert(
1475  std::pair<std::string, MonitorElement*>(DirName + "/" + "SubJet2_CMSTopTag_pt", mSubJet2_CMSTopTag_pt));
1476  map_of_MEs.insert(
1477  std::pair<std::string, MonitorElement*>(DirName + "/" + "SubJet2_CMSTopTag_eta", mSubJet2_CMSTopTag_eta));
1478  map_of_MEs.insert(
1479  std::pair<std::string, MonitorElement*>(DirName + "/" + "SubJet2_CMSTopTag_phi", mSubJet2_CMSTopTag_phi));
1480  map_of_MEs.insert(
1481  std::pair<std::string, MonitorElement*>(DirName + "/" + "SubJet2_CMSTopTag_mass", mSubJet2_CMSTopTag_mass));
1482  map_of_MEs.insert(
1483  std::pair<std::string, MonitorElement*>(DirName + "/" + "SubJet3_CMSTopTag_pt", mSubJet3_CMSTopTag_pt));
1484  map_of_MEs.insert(
1485  std::pair<std::string, MonitorElement*>(DirName + "/" + "SubJet3_CMSTopTag_eta", mSubJet3_CMSTopTag_eta));
1486  map_of_MEs.insert(
1487  std::pair<std::string, MonitorElement*>(DirName + "/" + "SubJet3_CMSTopTag_phi", mSubJet3_CMSTopTag_phi));
1488  map_of_MEs.insert(
1489  std::pair<std::string, MonitorElement*>(DirName + "/" + "SubJet3_CMSTopTag_mass", mSubJet3_CMSTopTag_mass));
1490  map_of_MEs.insert(
1491  std::pair<std::string, MonitorElement*>(DirName + "/" + "SubJet4_CMSTopTag_pt", mSubJet4_CMSTopTag_pt));
1492  map_of_MEs.insert(
1493  std::pair<std::string, MonitorElement*>(DirName + "/" + "SubJet4_CMSTopTag_eta", mSubJet4_CMSTopTag_eta));
1494  map_of_MEs.insert(
1495  std::pair<std::string, MonitorElement*>(DirName + "/" + "SubJet4_CMSTopTag_phi", mSubJet4_CMSTopTag_phi));
1496  map_of_MEs.insert(
1497  std::pair<std::string, MonitorElement*>(DirName + "/" + "SubJet4_CMSTopTag_mass", mSubJet4_CMSTopTag_mass));
1498 
1499  mnSubJetsSoftDrop = ibooker.book1D("nSubJets_SoftDrop", "nSubJets_SoftDrop", 10, 0, 10);
1500  mSubJet1_SoftDrop_pt = ibooker.book1D("SubJet1_SoftDrop_pt", "SubJet1_SoftDrop_pt", ptBin_, ptMin_, ptMax_);
1501  mSubJet1_SoftDrop_eta = ibooker.book1D("SubJet1_SoftDrop_eta", "SubJet1_SoftDrop_eta", etaBin_, etaMin_, etaMax_);
1502  mSubJet1_SoftDrop_phi = ibooker.book1D("SubJet1_SoftDrop_phi", "SubJet1_SoftDrop_phi", phiBin_, phiMin_, phiMax_);
1503  mSubJet1_SoftDrop_mass = ibooker.book1D("SubJet1_SoftDrop_mass", "SubJet1_SoftDrop_mass", 50, 0, 250);
1504  mSubJet2_SoftDrop_pt = ibooker.book1D("SubJet2_SoftDrop_pt", "SubJet2_SoftDrop_pt", ptBin_, ptMin_, ptMax_);
1505  mSubJet2_SoftDrop_eta = ibooker.book1D("SubJet2_SoftDrop_eta", "SubJet2_SoftDrop_eta", etaBin_, etaMin_, etaMax_);
1506  mSubJet2_SoftDrop_phi = ibooker.book1D("SubJet2_SoftDrop_phi", "SubJet2_SoftDrop_phi", phiBin_, phiMin_, phiMax_);
1507  mSubJet2_SoftDrop_mass = ibooker.book1D("SubJet2_SoftDrop_mass", "SubJet2_SoftDrop_mass", 50, 0, 250);
1508 
1509  map_of_MEs.insert(
1510  std::pair<std::string, MonitorElement*>(DirName + "/" + "nSubJets_SoftDrop", mnSubJetsSoftDrop));
1511  map_of_MEs.insert(
1512  std::pair<std::string, MonitorElement*>(DirName + "/" + "SubJet1_SoftDrop_pt", mSubJet1_SoftDrop_pt));
1513  map_of_MEs.insert(
1514  std::pair<std::string, MonitorElement*>(DirName + "/" + "SubJet1_SoftDrop_eta", mSubJet1_SoftDrop_eta));
1515  map_of_MEs.insert(
1516  std::pair<std::string, MonitorElement*>(DirName + "/" + "SubJet1_SoftDrop_phi", mSubJet1_SoftDrop_phi));
1517  map_of_MEs.insert(
1518  std::pair<std::string, MonitorElement*>(DirName + "/" + "SubJet1_SoftDrop_mass", mSubJet1_SoftDrop_mass));
1519  map_of_MEs.insert(
1520  std::pair<std::string, MonitorElement*>(DirName + "/" + "SubJet2_SoftDrop_pt", mSubJet2_SoftDrop_pt));
1521  map_of_MEs.insert(
1522  std::pair<std::string, MonitorElement*>(DirName + "/" + "SubJet2_SoftDrop_eta", mSubJet2_SoftDrop_eta));
1523  map_of_MEs.insert(
1524  std::pair<std::string, MonitorElement*>(DirName + "/" + "SubJet2_SoftDrop_phi", mSubJet2_SoftDrop_phi));
1525  map_of_MEs.insert(
1526  std::pair<std::string, MonitorElement*>(DirName + "/" + "SubJet2_SoftDrop_mass", mSubJet2_SoftDrop_mass));
1527  //miniaod specific variables, especially for substructure for boosted stuff
1528  mSoftDropMass_boosted = ibooker.book1D("SoftDropMass_boosted", "SoftDropMass_boosted", 50, 0, 250);
1529  mPrunedMass_boosted = ibooker.book1D("PrunedMass_boosted", "PrunedMass_boosted", 50, 0, 250);
1530  mTrimmedMass_boosted = ibooker.book1D("TrimmedMass_boosted", "TrimmedMass_boosted", 50, 0, 250);
1531  mFilteredMass_boosted = ibooker.book1D("FilteredMass_boosted", "FilteredMass_boosted", 50, 0, 250);
1532  map_of_MEs.insert(
1533  std::pair<std::string, MonitorElement*>(DirName + "/" + "SoftDropMass_boosted", mSoftDropMass_boosted));
1534  map_of_MEs.insert(
1535  std::pair<std::string, MonitorElement*>(DirName + "/" + "PrunedMass_boosted", mPrunedMass_boosted));
1536  map_of_MEs.insert(
1537  std::pair<std::string, MonitorElement*>(DirName + "/" + "TrimmedMass_boosted", mTrimmedMass_boosted));
1538  map_of_MEs.insert(
1539  std::pair<std::string, MonitorElement*>(DirName + "/" + "FilteredMass_boosted", mFilteredMass_boosted));
1540 
1541  mtau2_over_tau1_boosted = ibooker.book1D("tau2_over_tau1_boosted", "tau2_over_tau1_boosted", 50, 0, 1);
1542  mtau3_over_tau2_boosted = ibooker.book1D("tau3_over_tau2_boosted", "tau3_over_tau2_boosted", 50, 0, 1);
1543  mCATopTag_topMass_boosted = ibooker.book1D("CATopTag_topMass_boosted", "CATopTag_topMass_boosted", 50, 50, 250);
1544  mCATopTag_minMass_boosted = ibooker.book1D("CATopTag_minMass_boosted", "CATopTag_minMass_boosted", 50, 0, 250);
1545  mCATopTag_nSubJets_boosted = ibooker.book1D("nSubJets_CATopTag_boosted", "nSubJets_CATopTag_boosted", 10, 0, 10);
1546  map_of_MEs.insert(
1547  std::pair<std::string, MonitorElement*>(DirName + "/" + "tau2_over_tau1_boosted", mtau2_over_tau1_boosted));
1548  map_of_MEs.insert(
1549  std::pair<std::string, MonitorElement*>(DirName + "/" + "tau3_over_tau2_boosted", mtau3_over_tau2_boosted));
1550  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "CATopTag_topMass_boosted",
1551  mCATopTag_topMass_boosted));
1552  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "CATopTag_minMass_boosted",
1553  mCATopTag_minMass_boosted));
1554  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "nSubJets_CATopTag_boosted",
1555  mCATopTag_nSubJets_boosted));
1556 
1557  mnSubJetsCMSTopTag_boosted =
1558  ibooker.book1D("nSubJets_CMSTopTag_boosted", "nSubJets_CMSTopTag_boosted", 10, 0, 10);
1559  mSubJet1_CMSTopTag_pt_boosted =
1560  ibooker.book1D("SubJet1_CMSTopTag_pt_boosted", "SubJet1_CMSTopTag_pt_boosted", ptBin_, ptMin_, 2 * ptMax_);
1561  mSubJet1_CMSTopTag_eta_boosted =
1562  ibooker.book1D("SubJet1_CMSTopTag_eta_boosted", "SubJet1_CMSTopTag_eta_boosted", etaBin_, etaMin_, etaMax_);
1563  mSubJet1_CMSTopTag_phi_boosted =
1564  ibooker.book1D("SubJet1_CMSTopTag_phi_boosted", "SubJet1_CMSTopTag_phi_boosted", phiBin_, phiMin_, phiMax_);
1565  mSubJet1_CMSTopTag_mass_boosted =
1566  ibooker.book1D("SubJet1_CMSTopTag_mass_boosted", "SubJet1_CMSTopTag_mass_boosted", 50, 0, 250);
1567  mSubJet2_CMSTopTag_pt_boosted =
1568  ibooker.book1D("SubJet2_CMSTopTag_pt_boosted", "SubJet2_CMSTopTag_pt_boosted", ptBin_, ptMin_, 2 * ptMax_);
1569  mSubJet2_CMSTopTag_eta_boosted =
1570  ibooker.book1D("SubJet2_CMSTopTag_eta_boosted", "SubJet2_CMSTopTag_eta_boosted", etaBin_, etaMin_, etaMax_);
1571  mSubJet2_CMSTopTag_phi_boosted =
1572  ibooker.book1D("SubJet2_CMSTopTag_phi_boosted", "SubJet2_CMSTopTag_phi_boosted", phiBin_, phiMin_, phiMax_);
1573  mSubJet2_CMSTopTag_mass_boosted =
1574  ibooker.book1D("SubJet2_CMSTopTag_mass_boosted", "SubJet2_CMSTopTag_mass_boosted", 50, 0, 250);
1575  mSubJet3_CMSTopTag_pt_boosted =
1576  ibooker.book1D("SubJet3_CMSTopTag_pt_boosted", "SubJet3_CMSTopTag_pt_boosted", ptBin_, ptMin_, ptMax_);
1577  mSubJet3_CMSTopTag_eta_boosted =
1578  ibooker.book1D("SubJet3_CMSTopTag_eta_boosted", "SubJet3_CMSTopTag_eta_boosted", etaBin_, etaMin_, etaMax_);
1579  mSubJet3_CMSTopTag_phi_boosted =
1580  ibooker.book1D("SubJet3_CMSTopTag_phi_boosted", "SubJet3_CMSTopTag_phi_boosted", phiBin_, phiMin_, phiMax_);
1581  mSubJet3_CMSTopTag_mass_boosted =
1582  ibooker.book1D("SubJet3_CMSTopTag_mass_boosted", "SubJet3_CMSTopTag_mass_boosted", 50, 0, 250);
1583  mSubJet4_CMSTopTag_pt_boosted =
1584  ibooker.book1D("SubJet4_CMSTopTag_pt_boosted", "SubJet4_CMSTopTag_pt_boosted", ptBin_, ptMin_, ptMax_);
1585  mSubJet4_CMSTopTag_eta_boosted =
1586  ibooker.book1D("SubJet4_CMSTopTag_eta_boosted", "SubJet4_CMSTopTag_eta_boosted", etaBin_, etaMin_, etaMax_);
1587  mSubJet4_CMSTopTag_phi_boosted =
1588  ibooker.book1D("SubJet4_CMSTopTag_phi_boosted", "SubJet4_CMSTopTag_phi_boosted", phiBin_, phiMin_, phiMax_);
1589  mSubJet4_CMSTopTag_mass_boosted =
1590  ibooker.book1D("SubJet4_CMSTopTag_mass_boosted", "SubJet4_CMSTopTag_mass_boosted", 50, 0, 250);
1591 
1592  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "nSubJets_CMSTopTag_boosted",
1593  mnSubJetsCMSTopTag_boosted));
1594  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "SubJet1_CMSTopTag_pt_boosted",
1595  mSubJet1_CMSTopTag_pt_boosted));
1596  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "SubJet1_CMSTopTag_eta_boosted",
1597  mSubJet1_CMSTopTag_eta_boosted));
1598  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "SubJet1_CMSTopTag_phi_boosted",
1599  mSubJet1_CMSTopTag_phi_boosted));
1600  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "SubJet1_CMSTopTag_mass_boosted",
1601  mSubJet1_CMSTopTag_mass_boosted));
1602  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "SubJet2_CMSTopTag_pt_boosted",
1603  mSubJet2_CMSTopTag_pt_boosted));
1604  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "SubJet2_CMSTopTag_eta_boosted",
1605  mSubJet2_CMSTopTag_eta_boosted));
1606  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "SubJet2_CMSTopTag_phi_boosted",
1607  mSubJet2_CMSTopTag_phi_boosted));
1608  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "SubJet2_CMSTopTag_mass_boosted",
1609  mSubJet2_CMSTopTag_mass_boosted));
1610  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "SubJet3_CMSTopTag_pt_boosted",
1611  mSubJet3_CMSTopTag_pt_boosted));
1612  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "SubJet3_CMSTopTag_eta_boosted",
1613  mSubJet3_CMSTopTag_eta_boosted));
1614  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "SubJet3_CMSTopTag_phi_boosted",
1615  mSubJet3_CMSTopTag_phi_boosted));
1616  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "SubJet3_CMSTopTag_mass_boosted",
1617  mSubJet3_CMSTopTag_mass_boosted));
1618  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "SubJet4_CMSTopTag_pt_boosted",
1619  mSubJet4_CMSTopTag_pt_boosted));
1620  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "SubJet4_CMSTopTag_eta_boosted",
1621  mSubJet4_CMSTopTag_eta_boosted));
1622  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "SubJet4_CMSTopTag_phi_boosted",
1623  mSubJet4_CMSTopTag_phi_boosted));
1624  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "SubJet4_CMSTopTag_mass_boosted",
1625  mSubJet4_CMSTopTag_mass_boosted));
1626 
1627  mnSubJetsSoftDrop_boosted = ibooker.book1D("nSubJets_SoftDrop_boosted", "nSubJets_SoftDrop_boosted", 10, 0, 10);
1628  mSubJet1_SoftDrop_pt_boosted =
1629  ibooker.book1D("SubJet1_SoftDrop_pt_boosted", "SubJet1_SoftDrop_pt_boosted", ptBin_, ptMin_, 2 * ptMax_);
1630  mSubJet1_SoftDrop_eta_boosted =
1631  ibooker.book1D("SubJet1_SoftDrop_eta_boosted", "SubJet1_SoftDrop_eta_boosted", etaBin_, etaMin_, etaMax_);
1632  mSubJet1_SoftDrop_phi_boosted =
1633  ibooker.book1D("SubJet1_SoftDrop_phi_boosted", "SubJet1_SoftDrop_phi_boosted", phiBin_, phiMin_, phiMax_);
1634  mSubJet1_SoftDrop_mass_boosted =
1635  ibooker.book1D("SubJet1_SoftDrop_mass_boosted", "SubJet1_SoftDrop_mass_boosted", 50, 0, 250);
1636  mSubJet2_SoftDrop_pt_boosted =
1637  ibooker.book1D("SubJet2_SoftDrop_pt_boosted", "SubJet2_SoftDrop_pt_boosted", ptBin_, ptMin_, 2 * ptMax_);
1638  mSubJet2_SoftDrop_eta_boosted =
1639  ibooker.book1D("SubJet2_SoftDrop_eta_boosted", "SubJet2_SoftDrop_eta_boosted", etaBin_, etaMin_, etaMax_);
1640  mSubJet2_SoftDrop_phi_boosted =
1641  ibooker.book1D("SubJet2_SoftDrop_phi_boosted", "SubJet2_SoftDrop_phi_boosted", phiBin_, phiMin_, phiMax_);
1642  mSubJet2_SoftDrop_mass_boosted =
1643  ibooker.book1D("SubJet2_SoftDrop_mass_boosted", "SubJet2_SoftDrop_mass_boosted", 50, 0, 250);
1644 
1645  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "nSubJets_SoftDrop_boosted",
1646  mnSubJetsSoftDrop_boosted));
1647  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "SubJet1_SoftDrop_pt_boosted",
1648  mSubJet1_SoftDrop_pt_boosted));
1649  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "SubJet1_SoftDrop_eta_boosted",
1650  mSubJet1_SoftDrop_eta_boosted));
1651  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "SubJet1_SoftDrop_phi_boosted",
1652  mSubJet1_SoftDrop_phi_boosted));
1653  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "SubJet1_SoftDrop_mass_boosted",
1654  mSubJet1_SoftDrop_mass_boosted));
1655  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "SubJet2_SoftDrop_pt_boosted",
1656  mSubJet2_SoftDrop_pt_boosted));
1657  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "SubJet2_SoftDrop_eta_boosted",
1658  mSubJet2_SoftDrop_eta_boosted));
1659  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "SubJet2_SoftDrop_phi_boosted",
1660  mSubJet2_SoftDrop_phi_boosted));
1661  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "SubJet2_SoftDrop_mass_boosted",
1662  mSubJet2_SoftDrop_mass_boosted));
1663  }
1664  }
1665 
1666  if (jetCleaningFlag_) {
1667  //so far we have only one additional selection -> implement to make it expandable
1668  folderNames_.push_back("DiJet");
1669  if (isPFJet_) { //check for now only for PFJets
1670  folderNames_.push_back("ZJets");
1671  }
1672  //book for each of these selection default histograms
1673  for (std::vector<std::string>::const_iterator ic = folderNames_.begin(); ic != folderNames_.end(); ic++) {
1674  bookMESetSelection(DirName + "/" + *ic, ibooker);
1675  }
1676  }
1677 
1678  ibooker.setCurrentFolder("JetMET");
1679  cleanupME = ibooker.book1D("cleanup", "cleanup", 10, 0., 10.);
1680  cleanupME->setBinLabel(1, "Primary Vertex");
1681  cleanupME->setBinLabel(2, "DCS::Pixel");
1682  cleanupME->setBinLabel(3, "DCS::SiStrip");
1683  cleanupME->setBinLabel(4, "DCS::ECAL");
1684  cleanupME->setBinLabel(5, "DCS::ES");
1685  cleanupME->setBinLabel(6, "DCS::HBHE");
1686  cleanupME->setBinLabel(7, "DCS::HF");
1687  cleanupME->setBinLabel(8, "DCS::HO");
1688  cleanupME->setBinLabel(9, "DCS::Muon");
1689  map_of_MEs.insert(std::pair<std::string, MonitorElement*>("JetMET/cleanup", cleanupME));
1690 
1691  verticesME = ibooker.book1D("vertices", "vertices", 100, 0, 100);
1692  map_of_MEs.insert(std::pair<std::string, MonitorElement*>("JetMET/vertices", verticesME));
1693 }
1694 
1696  ibooker.setCurrentFolder(DirName);
1697  // Generic jet parameters
1698  mPt = ibooker.book1D("Pt", "pt", ptBin_, ptMin_, ptMax_);
1699  mEta = ibooker.book1D("Eta", "eta", etaBin_, etaMin_, etaMax_);
1700  mPhi = ibooker.book1D("Phi", "phi", phiBin_, phiMin_, phiMax_);
1701  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "Pt", mPt));
1702  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "Eta", mEta));
1703  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "Phi", mPhi));
1704  //if(!isJPTJet_){
1705  mConstituents = ibooker.book1D("Constituents", "# of constituents", 50, 0, 100);
1706  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "Constituents", mConstituents));
1707  //}
1708  mJetEnergyCorr = ibooker.book1D("JetEnergyCorr", "jet energy correction factor", 50, 0.0, 3.0);
1709  mJetEnergyCorrVSEta = ibooker.bookProfile(
1710  "JetEnergyCorrVSEta", "jet energy correction factor VS eta", etaBin_, etaMin_, etaMax_, 0.0, 3.0);
1711  mJetEnergyCorrVSPt =
1712  ibooker.bookProfile("JetEnergyCorrVSPt", "jet energy correction factor VS pt", ptBin_, ptMin_, ptMax_, 0.0, 3.0);
1713 
1714  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "JetEnergyCorr", mJetEnergyCorr));
1715  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "JetEnergyCorrVSEta", mJetEnergyCorrVSEta));
1716  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "JetEnergyCorrVSPt", mJetEnergyCorrVSPt));
1717 
1718  //fill for Dijets: concentrates on gluon jets -> fill leading two jets
1719  //fill for ZJets: concentrates on quark jets -> fill leading jet
1720  if (fill_CHS_histos && isPFJet_) {
1721  mAxis2_lowPt_Barrel = ibooker.book1D("qg_Axis2_lowPt_Barrel", "qg Axis2 #sigma_{2} lowPt Barrel", 50, 0., 0.20);
1722  mpTD_lowPt_Barrel =
1723  ibooker.book1D("qg_pTD_lowPt_Barrel", "qg fragmentation function p_{T}^{D} lowPt Barrel", 50, 0.15, 1.05);
1724  mMultiplicityQG_lowPt_Barrel =
1725  ibooker.book1D("qg_multiplicity_lowPt_Barrel", "qg multiplicity lowPt Barrel", 50, 0, 50);
1726  mqgLikelihood_lowPt_Barrel =
1727  ibooker.book1D("qg_Likelihood_lowPt_Barrel", "qg likelihood lowPt Barrel", 50, -1.1, 1.1);
1728  mAxis2_lowPt_EndCap = ibooker.book1D("qg_Axis2_lowPt_EndCap", "qg Axis2 #sigma_{2} lowPt EndCap", 50, 0., 0.20);
1729  mpTD_lowPt_EndCap =
1730  ibooker.book1D("qg_pTD_lowPt_EndCap", "qg fragmentation function p_{T}^{D} lowPt EndCap", 50, 0.15, 1.05);
1731  mMultiplicityQG_lowPt_EndCap =
1732  ibooker.book1D("qg_multiplicity_lowPt_EndCap", "qg multiplicity lowPt EndCap", 50, 0, 100);
1733  mqgLikelihood_lowPt_EndCap =
1734  ibooker.book1D("qg_Likelihood_lowPt_EndCap", "qg likelihood lowPt EndCap", 50, -1.1, 1.1);
1735  mAxis2_lowPt_Forward = ibooker.book1D("qg_Axis2_lowPt_Forward", "qg Axis2 #sigma_{2} lowPt Forward", 50, 0., 0.20);
1736  mpTD_lowPt_Forward =
1737  ibooker.book1D("qg_pTD_lowPt_Forward", "qg fragmentation function p_{T}^{D} lowPt Forward", 50, 0.15, 1.05);
1738  mMultiplicityQG_lowPt_Forward =
1739  ibooker.book1D("qg_multiplicity_lowPt_Forward", "qg multiplicity lowPt Forward", 50, 0, 100);
1740  mqgLikelihood_lowPt_Forward =
1741  ibooker.book1D("qg_Likelihood_lowPt_Forward", "qg likelihood lowPt Forward", 50, -1.1, 1.1);
1742 
1743  map_of_MEs.insert(
1744  std::pair<std::string, MonitorElement*>(DirName + "/" + "qg_Axis2_lowPt_Barrel", mAxis2_lowPt_Barrel));
1745  map_of_MEs.insert(
1746  std::pair<std::string, MonitorElement*>(DirName + "/" + "qg_pTD_lowPt_Barrel", mpTD_lowPt_Barrel));
1747  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "qg_multiplicity_lowPt_Barrel",
1748  mMultiplicityQG_lowPt_Barrel));
1749  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "qg_Likelihood_lowPt_Barrel",
1750  mqgLikelihood_lowPt_Barrel));
1751  map_of_MEs.insert(
1752  std::pair<std::string, MonitorElement*>(DirName + "/" + "qg_Axis2_lowPt_EndCap", mAxis2_lowPt_EndCap));
1753  map_of_MEs.insert(
1754  std::pair<std::string, MonitorElement*>(DirName + "/" + "qg_pTD_lowPt_EndCap", mpTD_lowPt_EndCap));
1755  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "qg_multiplicity_lowPt_EndCap",
1756  mMultiplicityQG_lowPt_EndCap));
1757  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "qg_Likelihood_lowPt_EndCap",
1758  mqgLikelihood_lowPt_EndCap));
1759  map_of_MEs.insert(
1760  std::pair<std::string, MonitorElement*>(DirName + "/" + "qg_Axis2_lowPt_Forward", mAxis2_lowPt_Forward));
1761  map_of_MEs.insert(
1762  std::pair<std::string, MonitorElement*>(DirName + "/" + "qg_pTD_lowPt_Forward", mpTD_lowPt_Forward));
1763  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "qg_multiplicity_lowPt_Forward",
1764  mMultiplicityQG_lowPt_Forward));
1765  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "qg_Likelihood_lowPt_Forward",
1766  mqgLikelihood_lowPt_Forward));
1767 
1768  mAxis2_mediumPt_Barrel =
1769  ibooker.book1D("qg_Axis2_mediumPt_Barrel", "qg Axis2 #sigma_{2} mediumPt Barrel", 50, 0., 0.20);
1770  mpTD_mediumPt_Barrel =
1771  ibooker.book1D("qg_pTD_mediumPt_Barrel", "qg fragmentation function p_{T}^{D} mediumPt Barrel", 50, 0.15, 1.05);
1772  mMultiplicityQG_mediumPt_Barrel =
1773  ibooker.book1D("qg_multiplicity_mediumPt_Barrel", "qg multiplicity mediumPt Barrel", 50, 0, 100);
1774  mqgLikelihood_mediumPt_Barrel =
1775  ibooker.book1D("qg_Likelihood_mediumPt_Barrel", "qg likelihood mediumPt Barrel", 50, -1.1, 1.1);
1776  mAxis2_mediumPt_EndCap =
1777  ibooker.book1D("qg_Axis2_mediumPt_EndCap", "qg Axis2 #sigma_{2} mediumPt EndCap", 50, 0., 0.20);
1778  mpTD_mediumPt_EndCap =
1779  ibooker.book1D("qg_pTD_mediumPt_EndCap", "qg fragmentation function p_{T}^{D} mediumPt EndCap", 50, 0.15, 1.05);
1780  mMultiplicityQG_mediumPt_EndCap =
1781  ibooker.book1D("qg_multiplicity_mediumPt_EndCap", "qg multiplicity mediumPt EndCap", 50, 0, 100);
1782  mqgLikelihood_mediumPt_EndCap =
1783  ibooker.book1D("qg_Likelihood_mediumPt_EndCap", "qg likelihood mediumPt EndCap", 50, -1.1, 1.1);
1784  mAxis2_mediumPt_Forward =
1785  ibooker.book1D("qg_Axis2_mediumPt_Forward", "qg Axis2 #sigma_{2} mediumPt Forward", 50, 0., 0.20);
1786  mpTD_mediumPt_Forward = ibooker.book1D(
1787  "qg_pTD_mediumPt_Forward", "qg fragmentation function p_{T}^{D} mediumPt Forward", 50, 0.15, 1.05);
1788  mMultiplicityQG_mediumPt_Forward =
1789  ibooker.book1D("qg_multiplicity_mediumPt_Forward", "qg multiplicity mediumPt Forward", 50, 0, 100);
1790  mqgLikelihood_mediumPt_Forward =
1791  ibooker.book1D("qg_Likelihood_mediumPt_Forward", "qg likelihood mediumPt Forward", 50, -1.1, 1.1);
1792 
1793  map_of_MEs.insert(
1794  std::pair<std::string, MonitorElement*>(DirName + "/" + "qg_Axis2_mediumPt_Barrel", mAxis2_mediumPt_Barrel));
1795  map_of_MEs.insert(
1796  std::pair<std::string, MonitorElement*>(DirName + "/" + "qg_pTD_mediumPt_Barrel", mpTD_mediumPt_Barrel));
1797  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "qg_multiplicity_mediumPt_Barrel",
1798  mMultiplicityQG_mediumPt_Barrel));
1799  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "qg_Likelihood_mediumPt_Barrel",
1800  mqgLikelihood_mediumPt_Barrel));
1801  map_of_MEs.insert(
1802  std::pair<std::string, MonitorElement*>(DirName + "/" + "qg_Axis2_mediumPt_EndCap", mAxis2_mediumPt_EndCap));
1803  map_of_MEs.insert(
1804  std::pair<std::string, MonitorElement*>(DirName + "/" + "qg_pTD_mediumPt_EndCap", mpTD_mediumPt_EndCap));
1805  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "qg_multiplicity_mediumPt_EndCap",
1806  mMultiplicityQG_mediumPt_EndCap));
1807  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "qg_Likelihood_mediumPt_EndCap",
1808  mqgLikelihood_mediumPt_EndCap));
1809  map_of_MEs.insert(
1810  std::pair<std::string, MonitorElement*>(DirName + "/" + "qg_Axis2_mediumPt_Forward", mAxis2_mediumPt_Forward));
1811  map_of_MEs.insert(
1812  std::pair<std::string, MonitorElement*>(DirName + "/" + "qg_pTD_mediumPt_Forward", mpTD_mediumPt_Forward));
1813  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "qg_multiplicity_mediumPt_Forward",
1814  mMultiplicityQG_mediumPt_Forward));
1815  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "qg_Likelihood_mediumPt_Forward",
1816  mqgLikelihood_mediumPt_Forward));
1817 
1818  mAxis2_highPt_Barrel = ibooker.book1D("qg_Axis2_highPt_Barrel", "qg Axis2 #sigma_{2} highPt Barrel", 50, 0., 0.20);
1819  mpTD_highPt_Barrel =
1820  ibooker.book1D("qg_pTD_highPt_Barrel", "qg fragmentation function p_{T}^{D} highPt Barrel", 50, 0.15, 1.05);
1821  mMultiplicityQG_highPt_Barrel =
1822  ibooker.book1D("qg_multiplicity_highPt_Barrel", "qg multiplicity highPt Barrel", 50, 0, 100);
1823  mqgLikelihood_highPt_Barrel =
1824  ibooker.book1D("qg_Likelihood_highPt_Barrel", "qg likelihood highPt Barrel", 50, -1.1, 1.1);
1825  mAxis2_highPt_EndCap = ibooker.book1D("qg_Axis2_highPt_EndCap", "qg Axis2 #sigma_{2} highPt EndCap", 50, 0., 0.20);
1826  mpTD_highPt_EndCap =
1827  ibooker.book1D("qg_pTD_highPt_EndCap", "qg fragmentation function p_{T}^{D} highPt EndCap", 50, 0.15, 1.05);
1828  mMultiplicityQG_highPt_EndCap =
1829  ibooker.book1D("qg_multiplicity_highPt_EndCap", "qg multiplicity highPt EndCap", 50, 0, 100);
1830  mqgLikelihood_highPt_EndCap =
1831  ibooker.book1D("qg_Likelihood_highPt_EndCap", "qg likelihood highPt EndCap", 50, -1.1, 1.1);
1832  mAxis2_highPt_Forward =
1833  ibooker.book1D("qg_Axis2_highPt_Forward", "qg Axis2 #sigma_{2} highPt Forward", 50, 0., 0.20);
1834  mpTD_highPt_Forward =
1835  ibooker.book1D("qg_pTD_highPt_Forward", "qg fragmentation function p_{T}^{D} highPt Forward", 50, 0.15, 1.05);
1836  mMultiplicityQG_highPt_Forward =
1837  ibooker.book1D("qg_multiplicity_highPt_Forward", "qg multiplicity highPt Forward", 50, 0, 100);
1838  mqgLikelihood_highPt_Forward =
1839  ibooker.book1D("qg_Likelihood_highPt_Forward", "qg likelihood highPt Forward", 50, -1.1, 1.1);
1840 
1841  map_of_MEs.insert(
1842  std::pair<std::string, MonitorElement*>(DirName + "/" + "qg_Axis2_highPt_Barrel", mAxis2_highPt_Barrel));
1843  map_of_MEs.insert(
1844  std::pair<std::string, MonitorElement*>(DirName + "/" + "qg_pTD_highPt_Barrel", mpTD_highPt_Barrel));
1845  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "qg_multiplicity_highPt_Barrel",
1846  mMultiplicityQG_highPt_Barrel));
1847  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "qg_Likelihood_highPt_Barrel",
1848  mqgLikelihood_highPt_Barrel));
1849  map_of_MEs.insert(
1850  std::pair<std::string, MonitorElement*>(DirName + "/" + "qg_Axis2_highPt_EndCap", mAxis2_highPt_EndCap));
1851  map_of_MEs.insert(
1852  std::pair<std::string, MonitorElement*>(DirName + "/" + "qg_pTD_highPt_EndCap", mpTD_highPt_EndCap));
1853  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "qg_multiplicity_highPt_EndCap",
1854  mMultiplicityQG_highPt_EndCap));
1855  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "qg_Likelihood_highPt_EndCap",
1856  mqgLikelihood_highPt_EndCap));
1857  map_of_MEs.insert(
1858  std::pair<std::string, MonitorElement*>(DirName + "/" + "qg_Axis2_highPt_Forward", mAxis2_highPt_Forward));
1859  map_of_MEs.insert(
1860  std::pair<std::string, MonitorElement*>(DirName + "/" + "qg_pTD_highPt_Forward", mpTD_highPt_Forward));
1861  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "qg_multiplicity_highPt_Forward",
1862  mMultiplicityQG_highPt_Forward));
1863  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "qg_Likelihood_highPt_Forward",
1864  mqgLikelihood_highPt_Forward));
1865  }
1866 
1867  if (DirName.find("DiJet") != std::string::npos) {
1868  mDPhi = ibooker.book1D("DPhi", "dPhi btw the two leading jets", 100, 0., acos(-1.));
1869  mDijetAsymmetry = ibooker.book1D("DijetAsymmetry", "DijetAsymmetry", 100, -1., 1.);
1870  mDijetBalance = ibooker.book1D("DijetBalance", "DijetBalance", 100, -2., 2.);
1871  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "DPhi", mDPhi));
1872  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "DijetAsymmetry", mDijetAsymmetry));
1873  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "DijetBalance", mDijetBalance));
1874 
1875  if (isPFJet_ || isMiniAODJet_) {
1876  mChargedMultiplicity = ibooker.book1D("ChargedMultiplicity", "charged multiplicity ", 50, 0, 100);
1877  mNeutralMultiplicity = ibooker.book1D("NeutralMultiplicity", "neutral multiplicity", 50, 0, 100);
1878  mMuonMultiplicity = ibooker.book1D("MuonMultiplicity", "muon multiplicity", 50, 0, 100);
1879 
1880  map_of_MEs.insert(
1881  std::pair<std::string, MonitorElement*>(DirName + "/" + "ChargedMultiplicity", mChargedMultiplicity));
1882  map_of_MEs.insert(
1883  std::pair<std::string, MonitorElement*>(DirName + "/" + "NeutralMultiplicity", mNeutralMultiplicity));
1884  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "MuonMultiplicity", mMuonMultiplicity));
1885 
1886  mChargedMultiplicity_profile = ibooker.bookProfile(
1887  "ChargedMultiplicity_profile", "charged multiplicity", nbinsPV_, nPVlow_, nPVhigh_, 50, 0, 100);
1888  mNeutralMultiplicity_profile = ibooker.bookProfile(
1889  "NeutralMultiplicity_profile", "neutral multiplicity", nbinsPV_, nPVlow_, nPVhigh_, 50, 0, 100);
1890  mMuonMultiplicity_profile =
1891  ibooker.bookProfile("MuonMultiplicity_profile", "muon multiplicity", nbinsPV_, nPVlow_, nPVhigh_, 50, 0, 100);
1892  mChargedMultiplicity_profile->setAxisTitle("nvtx", 1);
1893  mNeutralMultiplicity_profile->setAxisTitle("nvtx", 1);
1894  mMuonMultiplicity_profile->setAxisTitle("nvtx", 1);
1895 
1896  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "ChargedMultiplicity_profile",
1897  mChargedMultiplicity_profile));
1898  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "NeutralMultiplicity_profile",
1899  mNeutralMultiplicity_profile));
1900  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "MuonMultiplicity_profile",
1901  mMuonMultiplicity_profile));
1902 
1903  mNeutralFraction = ibooker.book1D("NeutralConstituentsFraction", "Neutral Constituents Fraction", 100, 0, 1);
1904  map_of_MEs.insert(
1905  std::pair<std::string, MonitorElement*>(DirName + "/" + "NeutralConstituentsFraction", mNeutralFraction));
1906  }
1907  }
1908 
1909  if (DirName.find("ZJets") != std::string::npos) {
1910  mZMass = ibooker.book1D("DiMuonMass", "DiMuonMass", 50, 71., 111.);
1911  mDPhiZJet = ibooker.book1D("DPhiZJ", "dPhi btw Z and Jet1", 100, 0., acos(-1.));
1912  mZJetAsymmetry = ibooker.book1D("ZJetAsymmetry", "ZJetAsymmetry", 100, -1., 1.);
1913  mJetZBalance_lowZPt_J_Barrel =
1914  ibooker.book1D("JZB_lowZPt_J_Barrel", "ZJetBalance (pTJet1-pTZ) (30<pTZ<90), |#eta_{jet}|<1.3", 50, -75., 75);
1915  mJetZBalance_mediumZPt_J_Barrel =
1916  ibooker.book1D("JZB_mediumZPt_J_Barrel", "ZJetBalance (90<pTZ<140), |#eta_{jet}|<1.3", 50, -75., 75);
1917  mJetZBalance_highZPt_J_Barrel =
1918  ibooker.book1D("JZB_highZPt_J_Barrel", "ZJetBalance (pTZ>140), |#eta_{jet}|<1.3", 50, -75., 75.);
1919  mJetZBalance_lowZPt_J_EndCap =
1920  ibooker.book1D("JZB_lowZPt_J_EndCap", "ZJetBalance (30<pTZ<90), 1.3<|#eta_{jet}|<3.0", 50, -75., 75);
1921  mJetZBalance_mediumZPt_J_EndCap =
1922  ibooker.book1D("JZB_mediumZPt_J_EndCap", "ZJetBalance (90<pTZ<140), 1.3<|#eta_{jet}|<3.0", 50, -75., 75);
1923  mJetZBalance_highZPt_J_EndCap =
1924  ibooker.book1D("JZB_highZPt_J_EndCap", "ZJetBalance (pTZ>140), 1.3<|#eta_{jet}|<3.0", 50, -75., 75.);
1925  mJetZBalance_lowZPt_J_Forward =
1926  ibooker.book1D("JZB_lowZPt_J_Forward", "ZJetBalance (30<pTZ<90), |#eta_{jet}|>3.0", 50, -75., 75);
1927  mJetZBalance_mediumZPt_J_Forward =
1928  ibooker.book1D("JZB_mediumZPt_J_Forward", "ZJetBalance (90<pTZ<140), |#eta_{jet}|>3.0", 50, -75., 75);
1929  mJetZBalance_highZPt_J_Forward =
1930  ibooker.book1D("JZB_highZPt_J_Forward", "ZJetBalance (pTZ>140), |#eta_{jet}|>3.0", 50, -75., 75.);
1931 
1932  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "DiMuonMass", mZMass));
1933  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "DPhiZJ", mDPhiZJet));
1934  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "ZJetAsymmetry", mZJetAsymmetry));
1935  map_of_MEs.insert(
1936  std::pair<std::string, MonitorElement*>(DirName + "/" + "JZB_lowZPt_J_Barrel", mJetZBalance_lowZPt_J_Barrel));
1937  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "JZB_mediumZPt_J_Barrel",
1938  mJetZBalance_mediumZPt_J_Barrel));
1939  map_of_MEs.insert(
1940  std::pair<std::string, MonitorElement*>(DirName + "/" + "JZB_highZPt_J_Barrel", mJetZBalance_highZPt_J_Barrel));
1941  map_of_MEs.insert(
1942  std::pair<std::string, MonitorElement*>(DirName + "/" + "JZB_lowZPt_J_EndCap", mJetZBalance_lowZPt_J_EndCap));
1943  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "JZB_mediumZPt_J_EndCap",
1944  mJetZBalance_mediumZPt_J_EndCap));
1945  map_of_MEs.insert(
1946  std::pair<std::string, MonitorElement*>(DirName + "/" + "JZB_highZPt_J_EndCap", mJetZBalance_highZPt_J_EndCap));
1947  map_of_MEs.insert(
1948  std::pair<std::string, MonitorElement*>(DirName + "/" + "JZB_lowZPt_J_Forward", mJetZBalance_lowZPt_J_Forward));
1949  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "JZB_mediumZPt_J_Forward",
1950  mJetZBalance_mediumZPt_J_Forward));
1951  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "JZB_highZPt_J_Forward",
1952  mJetZBalance_highZPt_J_Forward));
1953 
1954  mJ1Pt_over_ZPt_J_Barrel = ibooker.book1D("J1Pt_over_ZPt_J_Barrel", "Jet1_Pt/ZPt, Barrel", 50, 0., 3.0);
1955  mJ1Pt_over_ZPt_J_EndCap = ibooker.book1D("J1Pt_over_ZPt_J_EndCap", "Jet1_Pt/ZPt, EndCap", 50, 0., 3.0);
1956  mJ1Pt_over_ZPt_J_Forward = ibooker.book1D("J1Pt_over_ZPt_J_Forward", "Jet1_Pt/ZPt, Forward", 50, 0., 3.0);
1957 
1958  map_of_MEs.insert(
1959  std::pair<std::string, MonitorElement*>(DirName + "/" + "J1Pt_over_ZPt_J_Barrel", mJ1Pt_over_ZPt_J_Barrel));
1960  map_of_MEs.insert(
1961  std::pair<std::string, MonitorElement*>(DirName + "/" + "J1Pt_over_ZPt_J_EndCap", mJ1Pt_over_ZPt_J_EndCap));
1962  map_of_MEs.insert(
1963  std::pair<std::string, MonitorElement*>(DirName + "/" + "J1Pt_over_ZPt_J_Forward", mJ1Pt_over_ZPt_J_Forward));
1964 
1965  mJ1Pt_over_ZPt_lowZPt_J_Barrel =
1966  ibooker.book1D("J1Pt_over_ZPt_lowZPt_J_Barrel", "Jet1_Pt/ZPt (30<pTZ<90), |#eta_{jet}|<1.3", 50, 0., 3.0);
1967  mJ1Pt_over_ZPt_mediumZPt_J_Barrel =
1968  ibooker.book1D("J1Pt_over_ZPt_mediumZPt_J_Barrel", "Jet1_Pt/ZPt (90<pTZ<140), |#eta_{jet}|<1.3", 50, 0., 3.0);
1969  mJ1Pt_over_ZPt_highZPt_J_Barrel =
1970  ibooker.book1D("J1Pt_over_ZPt_highPt_J_Barrel", "Jet1_Pt/ZPt (pTZ>140), |#eta_{jet}|<1.3", 50, 0., 3.0);
1971  mJ1Pt_over_ZPt_lowZPt_J_EndCap =
1972  ibooker.book1D("J1Pt_over_ZPt_lowZPt_J_EndCap", "Jet1_Pt/ZPt (30<pTZ<90), 1.3<|#eta_{jet}|<3.0", 50, 0., 3.0);
1973  mJ1Pt_over_ZPt_mediumZPt_J_EndCap = ibooker.book1D(
1974  "J1Pt_over_ZPt_mediumZPt_J_EndCap", "Jet1_Pt/ZPt (90<pTZ<140), 1.3<|#eta_{jet}|<3.0", 50, 0., 3.0);
1975  mJ1Pt_over_ZPt_highZPt_J_EndCap =
1976  ibooker.book1D("J1Pt_over_ZPt_highZPt_J_EndCap", "Jet1_Pt/ZPt (pTZ>140), 1.3<|#eta_{jet}|<3.0", 50, 0., 3.0);
1977  mJ1Pt_over_ZPt_lowZPt_J_Forward =
1978  ibooker.book1D("J1Pt_over_ZPt_lowZPt_J_Forward", "Jet1_Pt/ZPt (30<pTZ<90), |#eta_{jet}|>3.0", 50, 0., 3.0);
1979  mJ1Pt_over_ZPt_mediumZPt_J_Forward =
1980  ibooker.book1D("J1Pt_over_ZPt_mediumPt_J_Forward", "Jet1_Pt/ZPt (90<pTZ<140), |#eta_{jet}|>3.0", 50, 0., 3.0);
1981  mJ1Pt_over_ZPt_highZPt_J_Forward =
1982  ibooker.book1D("J1Pt_over_ZPt_highZPt_J_Forward", "Jet1_Pt/ZPt (pTZ>140), |#eta_{jet}|>3.0", 50, 0., 3.0);
1983 
1984  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "J1Pt_over_ZPt_lowZPt_J_Barrel",
1985  mJ1Pt_over_ZPt_lowZPt_J_Barrel));
1986  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "J1Pt_over_ZPt_mediumZPt_J_Barrel",
1987  mJ1Pt_over_ZPt_mediumZPt_J_Barrel));
1988  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "J1Pt_over_ZPt_highZPt_J_Barrel",
1989  mJ1Pt_over_ZPt_highZPt_J_Barrel));
1990  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "J1Pt_over_ZPt_lowZPt_J_EndCap",
1991  mJ1Pt_over_ZPt_lowZPt_J_EndCap));
1992  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "J1Pt_over_ZPt_mediumZPt_J_EndCap",
1993  mJ1Pt_over_ZPt_mediumZPt_J_EndCap));
1994  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "J1Pt_over_ZPt_highZPt_J_EndCap",
1995  mJ1Pt_over_ZPt_highZPt_J_EndCap));
1996  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "J1Pt_over_ZPt_lowZPt_J_Forward",
1997  mJ1Pt_over_ZPt_lowZPt_J_Forward));
1998  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "J1Pt_over_ZPt_mediumZPt_J_Forward",
1999  mJ1Pt_over_ZPt_mediumZPt_J_Forward));
2000  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "J1Pt_over_ZPt_highZPt_J_Forward",
2001  mJ1Pt_over_ZPt_highZPt_J_Forward));
2002 
2003  mMPF_J_Barrel = ibooker.book1D("MPF_J_Barrel", "Jet1_Pt/ZPt, Barrel", 50, 0., 2.0);
2004  mMPF_J_EndCap = ibooker.book1D("MPF_J_EndCap", "Jet1_Pt/ZPt, EndCap", 50, 0., 2.0);
2005  mMPF_J_Forward = ibooker.book1D("MPF_J_Forward", "Jet1_Pt/ZPt, Forward", 50, 0., 2.0);
2006 
2007  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "MPF_J_Barrel", mMPF_J_Barrel));
2008  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "MPF_J_EndCap", mMPF_J_EndCap));
2009  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "MPF_J_Forward", mMPF_J_Forward));
2010 
2011  mMPF_lowZPt_J_Barrel =
2012  ibooker.book1D("MPF_lowZPt_J_Barrel", "Jet1_Pt/ZPt (30<pTZ<90), |#eta_{jet}|<1.3", 50, 0., 2.0);
2013  mMPF_mediumZPt_J_Barrel =
2014  ibooker.book1D("MPF_mediumZPt_J_Barrel", "Jet1_Pt/ZPt (90<pTZ<140), |#eta_{jet}|<1.3", 50, 0., 2.0);
2015  mMPF_highZPt_J_Barrel =
2016  ibooker.book1D("MPF_highPt_J_Barrel", "Jet1_Pt/ZPt (pTZ>140), |#eta_{jet}|<1.3", 50, 0., 2.0);
2017  mMPF_lowZPt_J_EndCap =
2018  ibooker.book1D("MPF_lowZPt_J_EndCap", "Jet1_Pt/ZPt (30<pTZ<90), 1.3<|#eta_{jet}|<3.0", 50, 0., 2.0);
2019  mMPF_mediumZPt_J_EndCap =
2020  ibooker.book1D("MPF_mediumZPt_J_EndCap", "Jet1_Pt/ZPt (90<pTZ<140), 1.3<|#eta_{jet}|<3.0", 50, 0., 2.0);
2021  mMPF_highZPt_J_EndCap =
2022  ibooker.book1D("MPF_highZPt_J_EndCap", "Jet1_Pt/ZPt (pTZ>140), 1.3<|#eta_{jet}|<3.0", 50, 0., 2.0);
2023  mMPF_lowZPt_J_Forward =
2024  ibooker.book1D("MPF_lowZPt_J_Forward", "Jet1_Pt/ZPt (30<pTZ<90), |#eta_{jet}|>3.0", 50, 0., 2.0);
2025  mMPF_mediumZPt_J_Forward =
2026  ibooker.book1D("MPF_mediumPt_J_Forward", "Jet1_Pt/ZPt (90<pTZ<140), |#eta_{jet}|>3.0", 50, 0., 2.0);
2027  mMPF_highZPt_J_Forward =
2028  ibooker.book1D("MPF_highZPt_J_Forward", "Jet1_Pt/ZPt (pTZ>140), |#eta_{jet}|>3.0", 50, 0., 2.0);
2029 
2030  map_of_MEs.insert(
2031  std::pair<std::string, MonitorElement*>(DirName + "/" + "MPF_lowZPt_J_Barrel", mMPF_lowZPt_J_Barrel));
2032  map_of_MEs.insert(
2033  std::pair<std::string, MonitorElement*>(DirName + "/" + "MPF_mediumZPt_J_Barrel", mMPF_mediumZPt_J_Barrel));
2034  map_of_MEs.insert(
2035  std::pair<std::string, MonitorElement*>(DirName + "/" + "MPF_highZPt_J_Barrel", mMPF_highZPt_J_Barrel));
2036  map_of_MEs.insert(
2037  std::pair<std::string, MonitorElement*>(DirName + "/" + "MPF_lowZPt_J_EndCap", mMPF_lowZPt_J_EndCap));
2038  map_of_MEs.insert(
2039  std::pair<std::string, MonitorElement*>(DirName + "/" + "MPF_mediumZPt_J_EndCap", mMPF_mediumZPt_J_EndCap));
2040  map_of_MEs.insert(
2041  std::pair<std::string, MonitorElement*>(DirName + "/" + "MPF_highZPt_J_EndCap", mMPF_highZPt_J_EndCap));
2042  map_of_MEs.insert(
2043  std::pair<std::string, MonitorElement*>(DirName + "/" + "MPF_lowZPt_J_Forward", mMPF_lowZPt_J_Forward));
2044  map_of_MEs.insert(
2045  std::pair<std::string, MonitorElement*>(DirName + "/" + "MPF_mediumZPt_J_Forward", mMPF_mediumZPt_J_Forward));
2046  map_of_MEs.insert(
2047  std::pair<std::string, MonitorElement*>(DirName + "/" + "MPF_highZPt_J_Forward", mMPF_highZPt_J_Forward));
2048 
2049  mDeltaPt_Z_j1_over_ZPt_30_55_J_Barrel =
2050  ibooker.book1D("DeltaPt_Z_j1_over_ZPt_30_55_J_Barrel", "DeltaPt_Z_j1_over_ZPt_30_55_J_Barrel", 50, -1.00, 1.00);
2051  mDeltaPt_Z_j1_over_ZPt_55_75_J_Barrel =
2052  ibooker.book1D("DeltaPt_Z_j1_over_ZPt_55_75_J_Barrel", "DeltaPt_Z_j1_over_ZPt_55_75_J_Barrel", 50, -1.00, 1.00);
2053  mDeltaPt_Z_j1_over_ZPt_75_150_J_Barrel = ibooker.book1D(
2054  "DeltaPt_Z_j1_over_ZPt_75_150_J_Barrel", "DeltaPt_Z_j1_over_ZPt_75_150_J_Barrel", 50, -1.00, 1.00);
2055  mDeltaPt_Z_j1_over_ZPt_150_290_J_Barrel = ibooker.book1D(
2056  "DeltaPt_Z_j1_over_ZPt_150_290_J_Barrel", "DeltaPt_Z_j1_over_ZPt_150_290_J_Barrel", 50, -1.00, 1.00);
2057  mDeltaPt_Z_j1_over_ZPt_290_J_Barrel =
2058  ibooker.book1D("DeltaPt_Z_j1_over_ZPt_290_J_Barrel", "DeltaPt_Z_j1_over_ZPt_290_J_Barrel", 50, -1.00, 1.00);
2059  mDeltaPt_Z_j1_over_ZPt_30_55_J_EndCap =
2060  ibooker.book1D("DeltaPt_Z_j1_over_ZPt_30_55_J_EndCap", "DeltaPt_Z_j1_over_ZPt_30_55_J_EndCap", 50, -1.00, 1.00);
2061  mDeltaPt_Z_j1_over_ZPt_55_75_J_EndCap =
2062  ibooker.book1D("DeltaPt_Z_j1_over_ZPt_55_75_J_EndCap", "DeltaPt_Z_j1_over_ZPt_55_75_J_EndCap", 50, -1.00, 1.00);
2063  mDeltaPt_Z_j1_over_ZPt_75_150_J_EndCap = ibooker.book1D(
2064  "DeltaPt_Z_j1_over_ZPt_75_150_J_EndCap", "DeltaPt_Z_j1_over_ZPt_75_150_J_EndCap", 50, -1.00, 1.00);
2065  mDeltaPt_Z_j1_over_ZPt_150_290_J_EndCap = ibooker.book1D(
2066  "DeltaPt_Z_j1_over_ZPt_150_290_J_EndCap", "DeltaPt_Z_j1_over_ZPt_150_290_J_EndCap", 50, -1.00, 1.00);
2067  mDeltaPt_Z_j1_over_ZPt_290_J_EndCap =
2068  ibooker.book1D("DeltaPt_Z_j1_over_ZPt_290_J_EndCap", "DeltaPt_Z_j1_over_ZPt_290_J_EndCap", 50, -1.00, 1.00);
2069  mDeltaPt_Z_j1_over_ZPt_30_55_J_Forward = ibooker.book1D(
2070  "DeltaPt_Z_j1_over_ZPt_30_55_J_Forward", "DeltaPt_Z_j1_over_ZPt_30_55_J_Forward", 50, -1.00, 1.00);
2071  mDeltaPt_Z_j1_over_ZPt_55_100_J_Forward = ibooker.book1D(
2072  "DeltaPt_Z_j1_over_ZPt_55_100_J_Forward", "DeltaPt_Z_j1_over_ZPt_55_100_J_Forward", 50, -1.00, 1.00);
2073  mDeltaPt_Z_j1_over_ZPt_100_J_Forward =
2074  ibooker.book1D("DeltaPt_Z_j1_over_ZPt_100_J_Forward", "DeltaPt_Z_j1_over_ZPt_100_J_Forward", 50, -1.00, 1.00);
2075 
2076  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "DeltaPt_Z_j1_over_ZPt_30_55_J_Barrel",
2077  mDeltaPt_Z_j1_over_ZPt_30_55_J_Barrel));
2078  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "DeltaPt_Z_j1_over_ZPt_55_75_J_Barrel",
2079  mDeltaPt_Z_j1_over_ZPt_55_75_J_Barrel));
2080  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "DeltaPt_Z_j1_over_ZPt_75_150_J_Barrel",
2081  mDeltaPt_Z_j1_over_ZPt_75_150_J_Barrel));
2082  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "DeltaPt_Z_j1_over_ZPt_150_290_J_Barrel",
2083  mDeltaPt_Z_j1_over_ZPt_150_290_J_Barrel));
2084  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "DeltaPt_Z_j1_over_ZPt_290_J_Barrel",
2085  mDeltaPt_Z_j1_over_ZPt_290_J_Barrel));
2086  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "DeltaPt_Z_j1_over_ZPt_30_55_J_EndCap",
2087  mDeltaPt_Z_j1_over_ZPt_30_55_J_EndCap));
2088  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "DeltaPt_Z_j1_over_ZPt_55_75_J_EndCap",
2089  mDeltaPt_Z_j1_over_ZPt_55_75_J_EndCap));
2090  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "DeltaPt_Z_j1_over_ZPt_75_150_J_EndCap",
2091  mDeltaPt_Z_j1_over_ZPt_75_150_J_EndCap));
2092  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "DeltaPt_Z_j1_over_ZPt_150_290_J_EndCap",
2093  mDeltaPt_Z_j1_over_ZPt_150_290_J_EndCap));
2094  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "DeltaPt_Z_j1_over_ZPt_290_J_EndCap",
2095  mDeltaPt_Z_j1_over_ZPt_290_J_EndCap));
2096  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "DeltaPt_Z_j1_over_ZPt_30_55_J_Forward",
2097  mDeltaPt_Z_j1_over_ZPt_30_55_J_Forward));
2098  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "DeltaPt_Z_j1_over_ZPt_55_100_J_Forward",
2099  mDeltaPt_Z_j1_over_ZPt_55_100_J_Forward));
2100  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "DeltaPt_Z_j1_over_ZPt_100_J_Forward",
2101  mDeltaPt_Z_j1_over_ZPt_100_J_Forward));
2102  }
2103  // Book NPV profiles
2104  //----------------------------------------------------------------------------
2105  mPt_profile = ibooker.bookProfile("Pt_profile", "pt", nbinsPV_, nPVlow_, nPVhigh_, ptBin_, ptMin_, ptMax_);
2106  mEta_profile = ibooker.bookProfile("Eta_profile", "eta", nbinsPV_, nPVlow_, nPVhigh_, etaBin_, etaMin_, etaMax_);
2107  mPhi_profile = ibooker.bookProfile("Phi_profile", "phi", nbinsPV_, nPVlow_, nPVhigh_, phiBin_, phiMin_, phiMax_);
2108  //if(!isJPTJet_){
2109  mConstituents_profile =
2110  ibooker.bookProfile("Constituents_profile", "# of constituents", nbinsPV_, nPVlow_, nPVhigh_, 50, 0, 100);
2111  //}
2112  // met NPV profiles x-axis title
2113  //----------------------------------------------------------------------------
2114  mPt_profile->setAxisTitle("nvtx", 1);
2115  mEta_profile->setAxisTitle("nvtx", 1);
2116  mPhi_profile->setAxisTitle("nvtx", 1);
2117  //if(!isJPTJet_){
2118  mConstituents_profile->setAxisTitle("nvtx", 1);
2119  map_of_MEs.insert(
2120  std::pair<std::string, MonitorElement*>(DirName + "/" + "Constituents_profile", mConstituents_profile));
2121  //}
2122 
2123  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "Pt_profile", mPt_profile));
2124  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "Eta_profile", mEta_profile));
2125  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "Phi_profile", mPhi_profile));
2126  //
2127  //--- Calo jet melection only
2128 
2129  if (isCaloJet_) {
2130  mHFrac = ibooker.book1D("HFrac", "HFrac", 140, -0.2, 1.2);
2131  mEFrac = ibooker.book1D("EFrac", "EFrac", 140, -0.2, 1.2);
2132  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "HFrac", mHFrac));
2133  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "EFrac", mEFrac));
2134 
2135  mHFrac_profile = ibooker.bookProfile("HFrac_profile", "HFrac", nbinsPV_, nPVlow_, nPVhigh_, 140, -0.2, 1.2);
2136  mEFrac_profile = ibooker.bookProfile("EFrac_profile", "EFrac", nbinsPV_, nPVlow_, nPVhigh_, 140, -0.2, 1.2);
2137  mHFrac_profile->setAxisTitle("nvtx", 1);
2138  mEFrac_profile->setAxisTitle("nvtx", 1);
2139  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "HFrac_profile", mHFrac_profile));
2140  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "EFrac_profile", mEFrac_profile));
2141 
2142  // CaloJet specific
2143  //JetID variables
2144  mresEMF = ibooker.book1D("resEMF", "resEMF", 50, 0., 1.);
2145  mN90Hits = ibooker.book1D("N90Hits", "N90Hits", 50, 0., 100);
2146  mfHPD = ibooker.book1D("fHPD", "fHPD", 50, 0., 1.);
2147  mfRBX = ibooker.book1D("fRBX", "fRBX", 50, 0., 1.);
2148 
2149  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "resEMF", mresEMF));
2150  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "N90Hits", mN90Hits));
2151  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "fHPD", mfHPD));
2152  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "fRBX", mfRBX));
2153  }
2154 
2155  if (isPFJet_ || isMiniAODJet_) {
2156  //barrel histograms for PFJets
2157  // energy fractions
2158  mCHFrac = ibooker.book1D("CHFrac", "CHFrac", 120, -0.1, 1.1);
2159  mNHFrac = ibooker.book1D("NHFrac", "NHFrac", 120, -0.1, 1.1);
2160  mPhFrac = ibooker.book1D("PhFrac", "PhFrac", 120, -0.1, 1.1);
2161  mHFEMFrac = ibooker.book1D("HFEMFrac", "HFEMFrac", 120, -0.1, 1.1);
2162  mHFHFrac = ibooker.book1D("HFHFrac", "HFHFrac", 120, -0.1, 1.1);
2163 
2164  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "CHFrac", mCHFrac));
2165  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "NHFrac", mNHFrac));
2166  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "PhFrac", mPhFrac));
2167  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "HFEMFrac", mHFEMFrac));
2168  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "HFHFrac", mHFHFrac));
2169 
2170  // Book NPV profiles
2171  //----------------------------------------------------------------------------
2172  mCHFrac_profile =
2173  ibooker.bookProfile("CHFrac_profile", "charged HAD fraction profile", nbinsPV_, nPVlow_, nPVhigh_, 50, 0, 1);
2174  mNHFrac_profile =
2175  ibooker.bookProfile("NHFrac_profile", "neutral HAD fraction profile", nbinsPV_, nPVlow_, nPVhigh_, 50, 0, 1);
2176  mPhFrac_profile =
2177  ibooker.bookProfile("PhFrac_profile", "Photon Fraction Profile", nbinsPV_, nPVlow_, nPVhigh_, 50, 0, 1);
2178  mHFEMFrac_profile = ibooker.bookProfile(
2179  "HFEMFrac_profile", "HF electomagnetic fraction Profile", nbinsPV_, nPVlow_, nPVhigh_, 50, 0, 1);
2180  mHFHFrac_profile =
2181  ibooker.bookProfile("HFHFrac_profile", "HF hadronic fraction profile", nbinsPV_, nPVlow_, nPVhigh_, 50, 0, 1);
2182 
2183  // met NPV profiles x-axis title
2184  //----------------------------------------------------------------------------
2185  mCHFrac_profile->setAxisTitle("nvtx", 1);
2186  mNHFrac_profile->setAxisTitle("nvtx", 1);
2187  mPhFrac_profile->setAxisTitle("nvtx", 1);
2188  mHFEMFrac_profile->setAxisTitle("nvtx", 1);
2189  mHFHFrac_profile->setAxisTitle("nvtx", 1);
2190 
2191  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "CHFrac_profile", mCHFrac_profile));
2192  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "NHFrac_profile", mNHFrac_profile));
2193  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "PhFrac_profile", mPhFrac_profile));
2194  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "HFEMFrac_profile", mHFEMFrac_profile));
2195  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "HFHFrac_profile", mHFHFrac_profile));
2196  }
2197 }
2198 
2199 // ***********************************************************
2200 void JetAnalyzer::dqmBeginRun(const edm::Run& iRun, const edm::EventSetup& iSetup) {
2201  //LogDebug("JetAnalyzer") << "beginRun, run " << run.id();
2202  //
2203 
2204  if (highPtJetEventFlag_->on())
2205  highPtJetEventFlag_->initRun(iRun, iSetup);
2206  if (lowPtJetEventFlag_->on())
2207  lowPtJetEventFlag_->initRun(iRun, iSetup);
2208 
2209  if (highPtJetEventFlag_->on() &&
2210  highPtJetEventFlag_->expressionsFromDB(highPtJetEventFlag_->hltDBKey(), iSetup)[0] != "CONFIG_ERROR")
2211  highPtJetExpr_ = highPtJetEventFlag_->expressionsFromDB(highPtJetEventFlag_->hltDBKey(), iSetup);
2212  if (lowPtJetEventFlag_->on() &&
2213  lowPtJetEventFlag_->expressionsFromDB(lowPtJetEventFlag_->hltDBKey(), iSetup)[0] != "CONFIG_ERROR")
2214  lowPtJetExpr_ = lowPtJetEventFlag_->expressionsFromDB(lowPtJetEventFlag_->hltDBKey(), iSetup);
2215  // if (!jetCorrectionService_.empty()){
2216  // energycorrected=true;
2217  // }
2218  //--- htlConfig_
2219  //processname_="HLT";
2220  bool changed(true);
2221  hltInitialized_ = hltConfig_.init(iRun, iSetup, processname_, changed);
2222  if (!hltInitialized_) {
2223  //if (!hltConfig_.init(iRun,iSetup,processname_,changed)) {
2224  processname_ = "FU";
2225  hltInitialized_ = hltConfig_.init(iRun, iSetup, processname_, changed);
2226  if (!hltInitialized_) {
2227  //if (!hltConfig_.init(iRun,iSetup,processname_,changed)){
2228  LogDebug("JetAnalyzer") << "HLTConfigProvider failed to initialize.";
2229  }
2230  }
2231 
2233  iSetup.get<L1GtTriggerMenuRcd>().get(menuRcd);
2234  const L1GtTriggerMenu* menu = menuRcd.product();
2235  for (CItAlgo techTrig = menu->gtTechnicalTriggerMap().begin(); techTrig != menu->gtTechnicalTriggerMap().end();
2236  ++techTrig) {
2237  if ((techTrig->second).algoName() == m_l1algoname_) {
2238  m_bitAlgTechTrig_ = (techTrig->second).algoBitNumber();
2239  break;
2240  }
2241  }
2242 }
2243 
2244 // ***********************************************************
2246  //set general folders first --> change later on for different folders
2247  if (jetCleaningFlag_) {
2248  //dbe_->setCurrentFolder("JetMET/Jet/Cleaned"+mInputCollection_.label());
2249  DirName = "JetMET/Jet/Cleaned" + mInputCollection_.label();
2250  } else {
2251  //dbe_->setCurrentFolder("JetMET/Jet/Uncleaned"+mInputCollection_.label());
2252  DirName = "JetMET/Jet/Uncleaned" + mInputCollection_.label();
2253  }
2254 
2255  Handle<ValueMap<float> > puJetIdMva;
2256  Handle<ValueMap<int> > puJetIdFlagMva;
2257  Handle<ValueMap<float> > puJetId;
2258  Handle<ValueMap<int> > puJetIdFlag;
2259 
2260  Handle<ValueMap<int> > qgMultiplicity;
2261  Handle<ValueMap<float> > qgLikelihood;
2262  Handle<ValueMap<float> > qgptD;
2263  Handle<ValueMap<float> > qgaxis2;
2264 
2265  //should insure we have a PFJet in with CHS
2266  if (fill_CHS_histos) {
2267  iEvent.getByToken(qgMultiplicityToken_, qgMultiplicity);
2268  iEvent.getByToken(qgLikelihoodToken_, qgLikelihood);
2269  iEvent.getByToken(qgptDToken_, qgptD);
2270  iEvent.getByToken(qgaxis2Token_, qgaxis2);
2271  }
2272 
2273  if (!isMiniAODJet_) {
2274  iEvent.getByToken(mvaPUIDToken_, puJetIdFlagMva);
2275  iEvent.getByToken(cutBasedPUDiscriminantToken_, puJetId);
2276  iEvent.getByToken(cutBasedPUIDToken_, puJetIdFlag);
2277  iEvent.getByToken(mvaFullPUDiscriminantToken_, puJetIdMva);
2278  }
2279 
2280  // **** Get the TriggerResults container
2282  iEvent.getByToken(triggerResultsToken_, triggerResults);
2283 
2284  Int_t JetLoPass = 0;
2285  Int_t JetHiPass = 0;
2286 
2287  if (triggerResults.isValid()) {
2288  const edm::TriggerNames& triggerNames = iEvent.triggerNames(*triggerResults);
2289 
2290  const unsigned int nTrig(triggerNames.size());
2291  for (unsigned int i = 0; i < nTrig; ++i) {
2292  if (triggerNames.triggerName(i).find(highPtJetExpr_[0].substr(0, highPtJetExpr_[0].rfind("_v") + 2)) !=
2293  std::string::npos &&
2294  triggerResults->accept(i))
2295  JetHiPass = 1;
2296  else if (triggerNames.triggerName(i).find(lowPtJetExpr_[0].substr(0, lowPtJetExpr_[0].rfind("_v") + 2)) !=
2297  std::string::npos &&
2298  triggerResults->accept(i))
2299  JetLoPass = 1;
2300  }
2301  }
2302 
2303  if (verbose_)
2304  std::cout << "trigger label " << theTriggerResultsLabel_ << std::endl;
2305 
2306  if (verbose_) {
2307  std::cout << ">>> Trigger Lo = " << JetLoPass << " Hi = " << JetHiPass << std::endl;
2308  }
2309 
2310  // ==========================================================
2311  //Vertex information
2312  Handle<VertexCollection> vertexHandle;
2313  iEvent.getByToken(vertexToken_, vertexHandle);
2314 
2315  if (!vertexHandle.isValid()) {
2316  LogDebug("") << "CaloMETAnalyzer: Could not find vertex collection" << std::endl;
2317  if (verbose_)
2318  std::cout << "CaloMETAnalyzer: Could not find vertex collection" << std::endl;
2319  }
2320  int numPV = 0;
2321  if (vertexHandle.isValid()) {
2322  VertexCollection vertexCollection = *(vertexHandle.product());
2323  numPV = vertexCollection.size();
2324  }
2325  bool bPrimaryVertex = (bypassAllPVChecks_ || (numPV > 0));
2326  if (fill_jet_high_level_histo) { //should be filled for all events, no selection up to this point
2327  verticesME = map_of_MEs["JetMET/vertices"];
2328  if (verticesME && verticesME->getRootObject())
2329  verticesME->Fill(numPV);
2330  }
2331  // ==========================================================
2333  iEvent.getByToken(gtToken_, gtReadoutRecord);
2334 
2335  if (!gtReadoutRecord.isValid()) {
2336  LogInfo("JetAnalyzer") << "JetAnalyzer: Could not find GT readout record" << std::endl;
2337  if (verbose_)
2338  std::cout << "JetAnalyzer: Could not find GT readout record product" << std::endl;
2339  }
2340 
2341  //bool techTriggerResultBxE = false;
2342  bool techTriggerResultBxF = false;
2343  bool techTriggerResultBx0 = false;
2344 
2345  if (!gtReadoutRecord.isValid()) {
2346  LogDebug("") << "CaloMETAnalyzer: Could not find GT readout record" << std::endl;
2347  if (verbose_)
2348  std::cout << "CaloMETAnalyzer: Could not find GT readout record product" << std::endl;
2349  } else {
2350  // trigger results before mask for BxInEvent -2 (E), -1 (F), 0 (L1A), 1, 2
2351  //const TechnicalTriggerWord& technicalTriggerWordBeforeMaskBxE = gtReadoutRecord->technicalTriggerWord(-2);
2352  const TechnicalTriggerWord& technicalTriggerWordBeforeMaskBxF = gtReadoutRecord->technicalTriggerWord(-1);
2353  const TechnicalTriggerWord& technicalTriggerWordBeforeMaskBx0 = gtReadoutRecord->technicalTriggerWord();
2354  //const TechnicalTriggerWord& technicalTriggerWordBeforeMaskBxG = gtReadoutRecord->technicalTriggerWord(1);
2355  //const TechnicalTriggerWord& technicalTriggerWordBeforeMaskBxH = gtReadoutRecord->technicalTriggerWord(2);
2356  if (m_bitAlgTechTrig_ > -1 && !technicalTriggerWordBeforeMaskBx0.empty()) {
2357  techTriggerResultBx0 = technicalTriggerWordBeforeMaskBx0.at(m_bitAlgTechTrig_);
2358  if (techTriggerResultBx0 != 0) {
2359  //techTriggerResultBxE = technicalTriggerWordBeforeMaskBxE.at(m_bitAlgTechTrig_);
2360  techTriggerResultBxF = technicalTriggerWordBeforeMaskBxF.at(m_bitAlgTechTrig_);
2361  }
2362  }
2363  }
2364 
2365  DCSFilterForDCSMonitoring_->filter(iEvent, iSetup);
2366  if (fill_jet_high_level_histo) { //should be filled only once
2367  cleanupME = map_of_MEs["JetMET/cleanup"];
2368  if (cleanupME && cleanupME->getRootObject()) {
2369  if (bPrimaryVertex)
2370  cleanupME->Fill(0.5);
2371  if (DCSFilterForDCSMonitoring_->passPIX)
2372  cleanupME->Fill(1.5);
2373  if (DCSFilterForDCSMonitoring_->passSiStrip)
2374  cleanupME->Fill(2.5);
2375  if (DCSFilterForDCSMonitoring_->passECAL)
2376  cleanupME->Fill(3.5);
2377  if (DCSFilterForDCSMonitoring_->passES)
2378  cleanupME->Fill(4.5);
2379  if (DCSFilterForDCSMonitoring_->passHBHE)
2380  cleanupME->Fill(5.5);
2381  if (DCSFilterForDCSMonitoring_->passHF)
2382  cleanupME->Fill(6.5);
2383  if (DCSFilterForDCSMonitoring_->passHO)
2384  cleanupME->Fill(7.5);
2385  if (DCSFilterForDCSMonitoring_->passMuon)
2386  cleanupME->Fill(8.5);
2387  }
2388  }
2393 
2395 
2396  bool pass_Z_selection = false;
2398 
2399  int mu_index0 = -1;
2400  int mu_index1 = -1;
2401 
2402  if (isCaloJet_)
2403  iEvent.getByToken(caloJetsToken_, caloJets);
2404  //if (isJPTJet_) iEvent.getByToken(jptJetsToken_, jptJets);
2405  if (isPFJet_) {
2406  iEvent.getByToken(pfJetsToken_, pfJets);
2407  iEvent.getByToken(MuonsToken_, Muons);
2408  double pt0 = -1;
2409  double pt1 = -1;
2410  //fill it only for cleaned jets
2411  if (jetCleaningFlag_ && Muons.isValid() && Muons->size() > 1) {
2412  for (unsigned int i = 0; i < Muons->size(); i++) {
2413  bool pass_muon_id = false;
2414  bool pass_muon_iso = false;
2415  double dxy = fabs((*Muons)[i].muonBestTrack()->dxy());
2416  double dz = fabs((*Muons)[i].muonBestTrack()->dz());
2417  if (numPV > 0) {
2418  dxy = fabs((*Muons)[i].muonBestTrack()->dxy((*vertexHandle)[0].position()));
2419  dz = fabs((*Muons)[i].muonBestTrack()->dz((*vertexHandle)[0].position()));
2420  }
2421  if ((*Muons)[i].pt() > 20 && fabs((*Muons)[i].eta()) < 2.3) {
2422  if ((*Muons)[i].isGlobalMuon() && (*Muons)[i].isPFMuon() &&
2423  (*Muons)[i].globalTrack()->hitPattern().numberOfValidMuonHits() > 0 &&
2424  (*Muons)[i].numberOfMatchedStations() > 1 && dxy < 0.2 && (*Muons)[i].numberOfMatchedStations() > 1 &&
2425  dz < 0.5 && (*Muons)[i].innerTrack()->hitPattern().numberOfValidPixelHits() > 0 &&
2426  (*Muons)[i].innerTrack()->hitPattern().trackerLayersWithMeasurement() > 5) {
2427  pass_muon_id = true;
2428  }
2429  // Muon pf isolation DB corrected
2430  float muonIsoPFdb =
2431  ((*Muons)[i].pfIsolationR04().sumChargedHadronPt +
2432  std::max(0.,
2433  (*Muons)[i].pfIsolationR04().sumNeutralHadronEt + (*Muons)[i].pfIsolationR04().sumPhotonEt -
2434  0.5 * (*Muons)[i].pfIsolationR04().sumPUPt)) /
2435  (*Muons)[i].pt();
2436  if (muonIsoPFdb < 0.12) {
2437  pass_muon_iso = true;
2438  }
2439 
2440  if (pass_muon_id && pass_muon_iso) {
2441  if ((*Muons)[i].pt() > pt0) {
2442  mu_index1 = mu_index0;
2443  pt1 = pt0;
2444  mu_index0 = i;
2445  pt0 = (*Muons)[i].pt();
2446  } else if ((*Muons)[i].pt() > pt1) {
2447  mu_index1 = i;
2448  pt1 = (*Muons)[i].pt();
2449  }
2450  }
2451  }
2452  }
2453  if (mu_index0 >= 0 && mu_index1 >= 0) {
2454  if ((*Muons)[mu_index0].charge() * (*Muons)[mu_index1].charge() < 0) {
2455  zCand = (*Muons)[mu_index0].polarP4() + (*Muons)[mu_index1].polarP4();
2456  if (fabs(zCand.M() - 91.) < 20 && zCand.Pt() > 30) {
2457  pass_Z_selection = true;
2458  }
2459  }
2460  }
2461  }
2462  }
2463  if (isMiniAODJet_)
2464  iEvent.getByToken(patJetsToken_, patJets);
2465 
2466  edm::Handle<edm::ValueMap<reco::JetID> > jetID_ValueMap_Handle;
2467  if (/*isJPTJet_ || */ isCaloJet_) {
2468  if (!runcosmics_) {
2469  iEvent.getByToken(jetID_ValueMapToken_, jetID_ValueMap_Handle);
2470  }
2471  }
2472 
2473  //check for collections AND DCS filters
2474  bool dcsDecision = DCSFilterForJetMonitoring_->filter(iEvent, iSetup);
2475  bool jetCollectionIsValid = false;
2476  if (isCaloJet_)
2477  jetCollectionIsValid = caloJets.isValid();
2478  //if (isJPTJet_) jetCollectionIsValid = jptJets.isValid();
2479  if (isPFJet_)
2480  jetCollectionIsValid = pfJets.isValid();
2481  if (isMiniAODJet_)
2482  jetCollectionIsValid = patJets.isValid();
2483 
2484  if (jetCleaningFlag_ && (!jetCollectionIsValid || !bPrimaryVertex || !dcsDecision))
2485  return;
2486 
2487  unsigned int collSize = -1;
2488  if (isCaloJet_)
2489  collSize = caloJets->size();
2490  //if (isJPTJet_) {
2491  //collSize=jptJets->size();
2492  //if(collSize>0){
2493  // //update the track propagator and strip noise calculator
2494  // trackPropagator_->update(iSetup);
2495  // //sOverNCalculator_->update(iSetup);
2496  //}
2497  //}
2498  if (isPFJet_)
2499  collSize = pfJets->size();
2500  if (isMiniAODJet_)
2501  collSize = patJets->size();
2502 
2503  double scale = -1;
2504  //now start changes for jets
2505  std::vector<Jet> corJets;
2506  corJets.clear();
2507 
2508  //maybe not most elegant solution, but works for sure
2509  int ind1 = -1;
2510  double pt1 = -1;
2511  int ind2 = -1;
2512  double pt2 = -1;
2513  int ind3 = -1;
2514  double pt3 = -1;
2515 
2516  bool cleaned_first_jet = false;
2517  bool cleaned_second_jet = false;
2518  //bool cleaned_third_jet=false;
2519  //for ZJets selection check for muon jet overlap
2520  int ind1_mu_vetoed = -1;
2521  double pt1_mu_vetoed = -1;
2522  int ind2_mu_vetoed = -1;
2523  double pt2_mu_vetoed = -1;
2524  bool cleaned_first_jet_mu_vetoed = false;
2525  bool cleaned_second_jet_mu_vetoed = false;
2526 
2527  //now start changes for jets
2528  std::vector<Jet> recoJets;
2529  recoJets.clear();
2530 
2531  int numofjets = 0;
2532 
2534  bool pass_correction_flag = false;
2535  if (!isMiniAODJet_ && !jetCorrectorTag_.label().empty()) {
2536  iEvent.getByToken(jetCorrectorToken_, jetCorr);
2537  if (jetCorr.isValid()) {
2538  pass_correction_flag = true;
2539  }
2540  }
2541  if (isMiniAODJet_) {
2542  pass_correction_flag = true;
2543  }
2544 
2545  for (unsigned int ijet = 0; ijet < collSize; ijet++) {
2546  //bool thiscleaned=false;
2547  Jet correctedJet;
2548  bool pass_uncorrected = false;
2549  bool pass_corrected = false;
2550  if (isCaloJet_) {
2551  correctedJet = (*caloJets)[ijet];
2552  }
2553  //if (isJPTJet_){
2554  //correctedJet=(*jptJets)[ijet];
2555  //}
2556  if (isPFJet_) {
2557  correctedJet = (*pfJets)[ijet];
2558  }
2559  if (isMiniAODJet_) {
2560  correctedJet = (*patJets)[ijet];
2561  }
2562  if (!isMiniAODJet_ && correctedJet.pt() > ptThresholdUnc_) {
2563  pass_uncorrected = true;
2564  }
2565  if (isMiniAODJet_ && (correctedJet.pt() * (*patJets)[ijet].jecFactor("Uncorrected")) > ptThresholdUnc_) {
2566  pass_uncorrected = true;
2567  }
2568  if (pass_correction_flag && !isMiniAODJet_) {
2569  if (isCaloJet_) {
2570  scale = jetCorr->correction((*caloJets)[ijet]);
2571  }
2572  if (isPFJet_) {
2573  scale = jetCorr->correction((*pfJets)[ijet]);
2574  }
2575  correctedJet.scaleEnergy(scale);
2576  }
2577  if (correctedJet.pt() > ptThreshold_) {
2578  pass_corrected = true;
2579  }
2580  //if (!pass_corrected && !pass_uncorrected) continue;
2581  //remove the continue line, for physics selections we might losen the pt-thresholds as we care only about leading jets
2582  //fill only corrected jets -> check ID for uncorrected jets
2583  if (pass_corrected) {
2584  recoJets.push_back(correctedJet);
2585  }
2586  bool jetpassid = true;
2587  bool Thiscleaned = true;
2588  bool JetIDWPU = true;
2589  //jet ID for calojets
2590  if (isCaloJet_) {
2591  reco::CaloJetRef calojetref(caloJets, ijet);
2592  if (!runcosmics_) {
2593  reco::JetID jetID = (*jetID_ValueMap_Handle)[calojetref];
2594  jetpassid = jetIDFunctor((*caloJets)[ijet], jetID);
2595  JetIDWPU = jetpassid;
2596  if (jetCleaningFlag_) {
2597  Thiscleaned = jetpassid;
2598  }
2599  if (Thiscleaned && pass_corrected) { //if cleaning requested->jet passes a loose ID
2600  mN90Hits = map_of_MEs[DirName + "/" + "N90Hits"];
2601  if (mN90Hits && mN90Hits->getRootObject())
2602  mN90Hits->Fill(jetID.n90Hits);
2603  mfHPD = map_of_MEs[DirName + "/" + "fHPD"];
2604  if (mfHPD && mfHPD->getRootObject())
2605  mfHPD->Fill(jetID.fHPD);
2606  mresEMF = map_of_MEs[DirName + "/" + "resEMF"];
2607  if (mresEMF && mresEMF->getRootObject())
2608  mresEMF->Fill(jetID.restrictedEMF);
2609  mfRBX = map_of_MEs[DirName + "/" + "fRBX"];
2610  if (mfRBX && mfRBX->getRootObject())
2611  mfRBX->Fill(jetID.fRBX);
2612  }
2613  }
2614  if (jetCleaningFlag_) {
2615  Thiscleaned = jetpassid;
2616  }
2617  if (Thiscleaned && pass_uncorrected) {
2618  mPt_uncor = map_of_MEs[DirName + "/" + "Pt_uncor"];
2619  if (mPt_uncor && mPt_uncor->getRootObject())
2620  mPt_uncor->Fill((*caloJets)[ijet].pt());
2621  mEta_uncor = map_of_MEs[DirName + "/" + "Eta_uncor"];
2622  if (mEta_uncor && mEta_uncor->getRootObject())
2623  mEta_uncor->Fill((*caloJets)[ijet].eta());
2624  mPhi_uncor = map_of_MEs[DirName + "/" + "Phi_uncor"];
2625  if (mPhi_uncor && mPhi_uncor->getRootObject())
2626  mPhi_uncor->Fill((*caloJets)[ijet].phi());
2627  mConstituents_uncor = map_of_MEs[DirName + "/" + "Constituents_uncor"];
2628  if (mConstituents_uncor && mConstituents_uncor->getRootObject())
2629  mConstituents_uncor->Fill((*caloJets)[ijet].nConstituents());
2630  }
2631  //now do calojet specific fractions and histograms ->H and E fracs
2632  if (Thiscleaned && pass_corrected) { //if cleaning requested->jet passes a loose ID
2633  mHFrac = map_of_MEs[DirName + "/" + "HFrac"];
2634  if (mHFrac && mHFrac->getRootObject())
2635  mHFrac->Fill((*caloJets)[ijet].energyFractionHadronic());
2636  mEFrac = map_of_MEs[DirName + "/" + "EFrac"];
2637  if (mEFrac && mHFrac->getRootObject())
2638  mEFrac->Fill((*caloJets)[ijet].emEnergyFraction());
2639  mHFrac_profile = map_of_MEs[DirName + "/" + "HFrac_profile"];
2640  if (mHFrac_profile && mHFrac_profile->getRootObject())
2641  mHFrac_profile->Fill(numPV, (*caloJets)[ijet].energyFractionHadronic());
2642  mEFrac_profile = map_of_MEs[DirName + "/" + "EFrac_profile"];
2643  if (mEFrac_profile && mEFrac_profile->getRootObject())
2644  mEFrac_profile->Fill(numPV, (*caloJets)[ijet].emEnergyFraction());
2645  if (fabs((*caloJets)[ijet].eta()) <= 1.3) {
2646  mHFrac_Barrel = map_of_MEs[DirName + "/" + "HFrac_Barrel"];
2647  if (mHFrac_Barrel && mHFrac_Barrel->getRootObject())
2648  mHFrac_Barrel->Fill((*caloJets)[ijet].energyFractionHadronic());
2649  mEFrac_Barrel = map_of_MEs[DirName + "/" + "EFrac_Barrel"];
2650  if (mEFrac_Barrel && mEFrac_Barrel->getRootObject())
2651  mEFrac_Barrel->Fill((*caloJets)[ijet].emEnergyFraction());
2652  } else if (fabs((*caloJets)[ijet].eta()) < 3.0) {
2653  mHFrac_EndCap = map_of_MEs[DirName + "/" + "HFrac_EndCap"];
2654  if (mHFrac_EndCap && mHFrac_EndCap->getRootObject())
2655  mHFrac_EndCap->Fill((*caloJets)[ijet].energyFractionHadronic());
2656  mEFrac_EndCap = map_of_MEs[DirName + "/" + "EFrac_EndCap"];
2657  if (mEFrac_EndCap && mEFrac_EndCap->getRootObject())
2658  mEFrac_EndCap->Fill((*caloJets)[ijet].emEnergyFraction());
2659  } else {
2660  mHFrac_Forward = map_of_MEs[DirName + "/" + "HFrac_Forward"];
2661  if (mHFrac_Forward && mHFrac_Forward->getRootObject())
2662  mHFrac_Forward->Fill((*caloJets)[ijet].energyFractionHadronic());
2663  mEFrac_Forward = map_of_MEs[DirName + "/" + "EFrac_Forward"];
2664  if (mEFrac_Forward && mEFrac_Forward->getRootObject())
2665  mEFrac_Forward->Fill((*caloJets)[ijet].emEnergyFraction());
2666  }
2667  mHadEnergyInHO = map_of_MEs[DirName + "/" + "HadEnergyInHO"];
2668  if (mHadEnergyInHO && mHadEnergyInHO->getRootObject())
2669  mHadEnergyInHO->Fill((*caloJets)[ijet].hadEnergyInHO());
2670  mHadEnergyInHB = map_of_MEs[DirName + "/" + "HadEnergyInHB"];
2671  if (mHadEnergyInHB && mHadEnergyInHB->getRootObject())
2672  mHadEnergyInHB->Fill((*caloJets)[ijet].hadEnergyInHB());
2673  mHadEnergyInHF = map_of_MEs[DirName + "/" + "HadEnergyInHF"];
2674  if (mHadEnergyInHF && mHadEnergyInHF->getRootObject())
2675  mHadEnergyInHF->Fill((*caloJets)[ijet].hadEnergyInHF());
2676  mHadEnergyInHE = map_of_MEs[DirName + "/" + "HadEnergyInHE"];
2677  if (mHadEnergyInHE && mHadEnergyInHE->getRootObject())
2678  mHadEnergyInHE->Fill((*caloJets)[ijet].hadEnergyInHE());
2679  mEmEnergyInEB = map_of_MEs[DirName + "/" + "EmEnergyInEB"];
2680  if (mEmEnergyInEB && mEmEnergyInEB->getRootObject())
2681  mEmEnergyInEB->Fill((*caloJets)[ijet].emEnergyInEB());
2682  mEmEnergyInEE = map_of_MEs[DirName + "/" + "EmEnergyInEE"];
2683  if (mEmEnergyInEE && mEmEnergyInEE->getRootObject())
2684  mEmEnergyInEE->Fill((*caloJets)[ijet].emEnergyInEE());
2685  mEmEnergyInHF = map_of_MEs[DirName + "/" + "EmEnergyInHF"];
2686  if (mEmEnergyInHF && mEmEnergyInHF->getRootObject())
2687  mEmEnergyInHF->Fill((*caloJets)[ijet].emEnergyInHF());
2688  }
2689  }
2690  if (isMiniAODJet_ && (*patJets)[ijet].isPFJet()) {
2691  // You can't check the jet ID without the specifics. If they were dropped for space savings,
2692  // don't monitor this jet.
2693  if (!(*patJets)[ijet].hasPFSpecific())
2694  continue;
2695 
2696  pat::strbitset stringbitset = pfjetIDFunctor.getBitTemplate();
2697  jetpassid = pfjetIDFunctor((*patJets)[ijet], stringbitset);
2698  if (jetCleaningFlag_) {
2699  Thiscleaned = jetpassid;
2700  JetIDWPU = jetpassid;
2701  }
2702  if (Thiscleaned && pass_uncorrected) {
2703  mPt_uncor = map_of_MEs[DirName + "/" + "Pt_uncor"];
2704  if (mPt_uncor && mPt_uncor->getRootObject())
2705  if (mPt_uncor)
2706  mPt_uncor->Fill((*patJets)[ijet].pt() * (*patJets)[ijet].jecFactor("Uncorrected"));
2707  mEta_uncor = map_of_MEs[DirName + "/" + "Eta_uncor"];
2708  if (mEta_uncor && mEta_uncor->getRootObject())
2709  if (mEta_uncor)
2710  mEta_uncor->Fill((*patJets)[ijet].eta());
2711  mPhi_uncor = map_of_MEs[DirName + "/" + "Phi_uncor"];
2712  if (mPhi_uncor && mPhi_uncor->getRootObject())
2713  if (mPhi_uncor)
2714  mPhi_uncor->Fill((*patJets)[ijet].phi());
2715  mConstituents_uncor = map_of_MEs[DirName + "/" + "Constituents_uncor"];
2716  if (mConstituents_uncor && mConstituents_uncor->getRootObject())
2717  if (mConstituents_uncor)
2718  mConstituents_uncor->Fill((*patJets)[ijet].nConstituents());
2719  }
2720  if (Thiscleaned && pass_corrected) {
2721  mPt_CaloJet = map_of_MEs[DirName + "/" + "Pt_CaloJet"];
2722  if (mPt_CaloJet && mPt_CaloJet->getRootObject() && (*patJets)[ijet].hasUserFloat("caloJetMap:pt"))
2723  mPt_CaloJet->Fill((*patJets)[ijet].userFloat("caloJetMap:pt"));
2724  mEMF_CaloJet = map_of_MEs[DirName + "/" + "EMF_CaloJet"];
2725  if (mEMF_CaloJet && mEMF_CaloJet->getRootObject() &&
2726  (*patJets)[ijet].hasUserFloat("caloJetMap:emEnergyFraction"))
2727  mEMF_CaloJet->Fill((*patJets)[ijet].userFloat("caloJetMap:emEnergyFraction"));
2728  if (fabs(correctedJet.eta()) <= 1.3) {
2729  if (correctedJet.pt() <= 50.) {
2730  mMVAPUJIDDiscriminant_lowPt_Barrel = map_of_MEs[DirName + "/" + "MVAPUJIDDiscriminant_lowPt_Barrel"];
2731  if (mMVAPUJIDDiscriminant_lowPt_Barrel && mMVAPUJIDDiscriminant_lowPt_Barrel->getRootObject()) {
2732  if ((*patJets)[ijet].hasUserFloat("pileupJetId:fullDiscriminant"))
2733  mMVAPUJIDDiscriminant_lowPt_Barrel->Fill((*patJets)[ijet].userFloat("pileupJetId:fullDiscriminant"));
2734  }
2735  }
2736  if (correctedJet.pt() > 50. && correctedJet.pt() <= 140.) {
2737  mMVAPUJIDDiscriminant_mediumPt_Barrel = map_of_MEs[DirName + "/" + "MVAPUJIDDiscriminant_mediumPt_Barrel"];
2738  if (mMVAPUJIDDiscriminant_mediumPt_Barrel && mMVAPUJIDDiscriminant_mediumPt_Barrel->getRootObject()) {
2739  if ((*patJets)[ijet].hasUserFloat("pileupJetId:fullDiscriminant"))
2740  mMVAPUJIDDiscriminant_mediumPt_Barrel->Fill((*patJets)[ijet].userFloat("pileupJetId:fullDiscriminant"));
2741  }
2742  }
2743  if (correctedJet.pt() > 140.) {
2744  mMVAPUJIDDiscriminant_highPt_Barrel = map_of_MEs[DirName + "/" + "MVAPUJIDDiscriminant_highPt_Barrel"];
2745  if (mMVAPUJIDDiscriminant_highPt_Barrel && mMVAPUJIDDiscriminant_highPt_Barrel->getRootObject()) {
2746  if ((*patJets)[ijet].hasUserFloat("pileupJetId:fullDiscriminant"))
2747  mMVAPUJIDDiscriminant_highPt_Barrel->Fill((*patJets)[ijet].userFloat("pileupJetId:fullDiscriminant"));
2748  }
2749  }
2750  mMass_Barrel = map_of_MEs[DirName + "/" + "JetMass_Barrel"];
2751  if (mMass_Barrel && mMass_Barrel->getRootObject())
2752  mMass_Barrel->Fill((*patJets)[ijet].mass());
2753  mCHFracVSpT_Barrel = map_of_MEs[DirName + "/" + "CHFracVSpT_Barrel"];
2754  if (mCHFracVSpT_Barrel && mCHFracVSpT_Barrel->getRootObject())
2755  mCHFracVSpT_Barrel->Fill(correctedJet.pt(), (*patJets)[ijet].chargedHadronEnergyFraction());
2756  mNHFracVSpT_Barrel = map_of_MEs[DirName + "/" + "NHFracVSpT_Barrel"];
2757  if (mNHFracVSpT_Barrel && mNHFracVSpT_Barrel->getRootObject())
2758  mNHFracVSpT_Barrel->Fill(correctedJet.pt(), (*patJets)[ijet].neutralHadronEnergyFraction());
2759  mPhFracVSpT_Barrel = map_of_MEs[DirName + "/" + "PhFracVSpT_Barrel"];
2760  if (mPhFracVSpT_Barrel && mPhFracVSpT_Barrel->getRootObject())
2761  mPhFracVSpT_Barrel->Fill(correctedJet.pt(), (*patJets)[ijet].neutralEmEnergyFraction());
2762  } else if (fabs(correctedJet.eta()) <= 3) {
2763  if (correctedJet.pt() <= 50.) {
2764  mMVAPUJIDDiscriminant_lowPt_EndCap = map_of_MEs[DirName + "/" + "MVAPUJIDDiscriminant_lowPt_EndCap"];
2765  if (mMVAPUJIDDiscriminant_lowPt_EndCap && mMVAPUJIDDiscriminant_lowPt_EndCap->getRootObject()) {
2766  if ((*patJets)[ijet].hasUserFloat("pileupJetId:fullDiscriminant"))
2767  mMVAPUJIDDiscriminant_lowPt_EndCap->Fill((*patJets)[ijet].userFloat("pileupJetId:fullDiscriminant"));
2768  }
2769  }
2770  if (correctedJet.pt() > 50. && correctedJet.pt() <= 140.) {
2771  mMVAPUJIDDiscriminant_mediumPt_EndCap = map_of_MEs[DirName + "/" + "MVAPUJIDDiscriminant_mediumPt_EndCap"];
2772  if (mMVAPUJIDDiscriminant_mediumPt_EndCap && mMVAPUJIDDiscriminant_mediumPt_EndCap->getRootObject()) {
2773  if ((*patJets)[ijet].hasUserFloat("pileupJetId:fullDiscriminant"))
2774  mMVAPUJIDDiscriminant_mediumPt_EndCap->Fill((*patJets)[ijet].userFloat("pileupJetId:fullDiscriminant"));
2775  }
2776  }
2777  if (correctedJet.pt() > 140.) {
2778  mMVAPUJIDDiscriminant_highPt_EndCap = map_of_MEs[DirName + "/" + "MVAPUJIDDiscriminant_highPt_EndCap"];
2779  if (mMVAPUJIDDiscriminant_highPt_EndCap && mMVAPUJIDDiscriminant_highPt_EndCap->getRootObject()) {
2780  if ((*patJets)[ijet].hasUserFloat("pileupJetId:fullDiscriminant"))
2781  mMVAPUJIDDiscriminant_highPt_EndCap->Fill((*patJets)[ijet].userFloat("pileupJetId:fullDiscriminant"));
2782  }
2783  }
2784  mMass_EndCap = map_of_MEs[DirName + "/" + "JetMass_EndCap"];
2785  if (mMass_EndCap && mMass_EndCap->getRootObject())
2786  mMass_EndCap->Fill((*patJets)[ijet].mass());
2787  mCHFracVSpT_EndCap = map_of_MEs[DirName + "/" + "CHFracVSpT_EndCap"];
2788  if (mCHFracVSpT_EndCap && mCHFracVSpT_EndCap->getRootObject())
2789  mCHFracVSpT_EndCap->Fill(correctedJet.pt(), (*patJets)[ijet].chargedHadronEnergyFraction());
2790  mNHFracVSpT_EndCap = map_of_MEs[DirName + "/" + "NHFracVSpT_EndCap"];
2791  if (mNHFracVSpT_EndCap && mNHFracVSpT_EndCap->getRootObject())
2792  mNHFracVSpT_EndCap->Fill(correctedJet.pt(), (*patJets)[ijet].neutralHadronEnergyFraction());
2793  mPhFracVSpT_EndCap = map_of_MEs[DirName + "/" + "PhFracVSpT_EndCap"];
2794  if (mPhFracVSpT_EndCap && mPhFracVSpT_EndCap->getRootObject())
2795  mPhFracVSpT_EndCap->Fill(correctedJet.pt(), (*patJets)[ijet].neutralEmEnergyFraction());
2796  } else if (fabs(correctedJet.eta()) <= 5) {
2797  if (correctedJet.pt() <= 50.) {
2798  mMVAPUJIDDiscriminant_lowPt_Forward = map_of_MEs[DirName + "/" + "MVAPUJIDDiscriminant_lowPt_Forward"];
2799  if (mMVAPUJIDDiscriminant_lowPt_Forward && mMVAPUJIDDiscriminant_lowPt_Forward->getRootObject()) {
2800  if ((*patJets)[ijet].hasUserFloat("pileupJetId:fullDiscriminant"))
2801  mMVAPUJIDDiscriminant_lowPt_Forward->Fill((*patJets)[ijet].userFloat("pileupJetId:fullDiscriminant"));
2802  }
2803  }
2804  if (correctedJet.pt() > 50. && correctedJet.pt() <= 140.) {
2805  mMVAPUJIDDiscriminant_mediumPt_Forward =
2806  map_of_MEs[DirName + "/" + "MVAPUJIDDiscriminant_mediumPt_Forward"];
2807  if (mMVAPUJIDDiscriminant_mediumPt_Forward && mMVAPUJIDDiscriminant_mediumPt_Forward->getRootObject()) {
2808  if ((*patJets)[ijet].hasUserFloat("pileupJetId:fullDiscriminant"))
2809  mMVAPUJIDDiscriminant_mediumPt_Forward->Fill(
2810  (*patJets)[ijet].userFloat("pileupJetId:fullDiscriminant"));
2811  }
2812  }
2813  if (correctedJet.pt() > 140.) {
2814  mMVAPUJIDDiscriminant_highPt_Forward = map_of_MEs[DirName + "/" + "MVAPUJIDDiscriminant_highPt_Forward"];
2815  if (mMVAPUJIDDiscriminant_highPt_Forward && mMVAPUJIDDiscriminant_highPt_Forward->getRootObject()) {
2816  if ((*patJets)[ijet].hasUserFloat("pileupJetId:fullDiscriminant"))
2817  mMVAPUJIDDiscriminant_highPt_Forward->Fill((*patJets)[ijet].userFloat("pileupJetId:fullDiscriminant"));
2818  }
2819  }
2820  mMass_Forward = map_of_MEs[DirName + "/" + "JetMass_Forward"];
2821  if (mMass_Forward && mMass_Forward->getRootObject())
2822  mMass_Forward->Fill((*patJets)[ijet].mass());
2823  mHFHFracVSpT_Forward = map_of_MEs[DirName + "/" + "HFHFracVSpT_Forward"];
2824  if (mHFHFracVSpT_Forward && mHFHFracVSpT_Forward->getRootObject())
2825  mHFHFracVSpT_Forward->Fill(correctedJet.pt(), (*patJets)[ijet].HFHadronEnergyFraction());
2826  mHFEFracVSpT_Forward = map_of_MEs[DirName + "/" + "HFEFracVSpT_Forward"];
2827  if (mHFEFracVSpT_Forward && mHFEFracVSpT_Forward->getRootObject())
2828  mHFEFracVSpT_Forward->Fill(correctedJet.pt(), (*patJets)[ijet].HFEMEnergyFraction());
2829  }
2830  }
2831  }
2832  if (isPFJet_) {
2833  reco::PFJetRef pfjetref(pfJets, ijet);
2834  float puidmva = -1;
2835  float puidcut = -1;
2836  int puidmvaflag = -10;
2837  int puidcutflag = -10;
2838  puidmva = (*puJetIdMva)[pfjetref];
2839  puidcut = (*puJetId)[pfjetref];
2840  puidmvaflag = (*puJetIdFlagMva)[pfjetref];
2841  puidcutflag = (*puJetIdFlag)[pfjetref];
2842  jetpassid = pfjetIDFunctor((*pfJets)[ijet]);
2843  if (jetCleaningFlag_) {
2844  Thiscleaned = jetpassid;
2845  //JetIDWPU= (jetpassid && PileupJetIdentifier::passJetId( puidmvaflag, PileupJetIdentifier::kLoose ));
2846  }
2847  if (Thiscleaned && pass_uncorrected) {
2848  mPt_uncor = map_of_MEs[DirName + "/" + "Pt_uncor"];
2849  if (mPt_uncor && mPt_uncor->getRootObject())
2850  mPt_uncor->Fill((*pfJets)[ijet].pt());
2851  mEta_uncor = map_of_MEs[DirName + "/" + "Eta_uncor"];
2852  if (mEta_uncor && mEta_uncor->getRootObject())
2853  mEta_uncor->Fill((*pfJets)[ijet].eta());
2854  mPhi_uncor = map_of_MEs[DirName + "/" + "Phi_uncor"];
2855  if (mPhi_uncor && mPhi_uncor->getRootObject())
2856  mPhi_uncor->Fill((*pfJets)[ijet].phi());
2857  mConstituents_uncor = map_of_MEs[DirName + "/" + "Constituents_uncor"];
2858  if (mConstituents_uncor && mConstituents_uncor->getRootObject())
2859  mConstituents_uncor->Fill((*pfJets)[ijet].nConstituents());
2860  }
2861  if (Thiscleaned && pass_corrected) {
2863  mLooseCutPUJIDPassFractionVSeta = map_of_MEs[DirName + "/" + "LooseCutPUIDPassFractionVSeta"];
2864  if (mLooseCutPUJIDPassFractionVSeta && mLooseCutPUJIDPassFractionVSeta->getRootObject())
2865  mLooseCutPUJIDPassFractionVSeta->Fill(correctedJet.eta(), 1.);
2866  mLooseCutPUJIDPassFractionVSpt = map_of_MEs[DirName + "/" + "LooseCutPUIDPassFractionVSpt"];
2867  if (mLooseCutPUJIDPassFractionVSpt && mLooseCutPUJIDPassFractionVSpt->getRootObject())
2868  mLooseCutPUJIDPassFractionVSpt->Fill(correctedJet.pt(), 1.);
2869  } else {
2870  mLooseCutPUJIDPassFractionVSeta = map_of_MEs[DirName + "/" + "LooseCutPUIDPassFractionVSeta"];
2871  if (mLooseCutPUJIDPassFractionVSeta && mLooseCutPUJIDPassFractionVSeta->getRootObject())
2872  mLooseCutPUJIDPassFractionVSeta->Fill(correctedJet.eta(), 0.);
2873  mLooseCutPUJIDPassFractionVSpt = map_of_MEs[DirName + "/" + "LooseCutPUIDPassFractionVSpt"];
2874  if (mLooseCutPUJIDPassFractionVSpt && mLooseCutPUJIDPassFractionVSpt->getRootObject())
2875  mLooseCutPUJIDPassFractionVSpt->Fill(correctedJet.pt(), 0.);
2876  }
2878  mMediumCutPUJIDPassFractionVSeta = map_of_MEs[DirName + "/" + "MediumCutPUIDPassFractionVSeta"];
2879  if (mMediumCutPUJIDPassFractionVSeta && mMediumCutPUJIDPassFractionVSeta->getRootObject())
2880  mMediumCutPUJIDPassFractionVSeta->Fill(correctedJet.eta(), 1.);
2881  mMediumCutPUJIDPassFractionVSpt = map_of_MEs[DirName + "/" + "MediumCutPUIDPassFractionVSpt"];
2882  if (mMediumCutPUJIDPassFractionVSpt && mMediumCutPUJIDPassFractionVSpt->getRootObject())
2883  mMediumCutPUJIDPassFractionVSpt->Fill(correctedJet.pt(), 1.);
2884  } else {
2885  mMediumCutPUJIDPassFractionVSeta = map_of_MEs[DirName + "/" + "MediumCutPUIDPassFractionVSeta"];
2886  if (mMediumCutPUJIDPassFractionVSeta && mMediumCutPUJIDPassFractionVSeta->getRootObject())
2887  mMediumCutPUJIDPassFractionVSeta->Fill(correctedJet.eta(), 0.);
2888  mMediumCutPUJIDPassFractionVSpt = map_of_MEs[DirName + "/" + "MediumCutPUIDPassFractionVSpt"];
2889  if (mMediumCutPUJIDPassFractionVSpt && mMediumCutPUJIDPassFractionVSpt->getRootObject())
2890  mMediumCutPUJIDPassFractionVSpt->Fill(correctedJet.pt(), 0.);
2891  }
2893  mTightCutPUJIDPassFractionVSeta = map_of_MEs[DirName + "/" + "TightCutPUIDPassFractionVSeta"];
2894  if (mTightCutPUJIDPassFractionVSeta && mTightCutPUJIDPassFractionVSeta->getRootObject())
2895  mTightCutPUJIDPassFractionVSeta->Fill(correctedJet.eta(), 1.);
2896  mTightCutPUJIDPassFractionVSpt = map_of_MEs[DirName + "/" + "TightCutPUIDPassFractionVSpt"];
2897  if (mTightCutPUJIDPassFractionVSpt && mTightCutPUJIDPassFractionVSpt->getRootObject())
2898  mTightCutPUJIDPassFractionVSpt->Fill(correctedJet.pt(), 1.);
2899  } else {
2900  mTightCutPUJIDPassFractionVSeta = map_of_MEs[DirName + "/" + "TightCutPUIDPassFractionVSeta"];
2901  if (mTightCutPUJIDPassFractionVSeta && mTightCutPUJIDPassFractionVSeta->getRootObject())
2902  mTightCutPUJIDPassFractionVSeta->Fill(correctedJet.eta(), 0.);
2903  mTightCutPUJIDPassFractionVSpt = map_of_MEs[DirName + "/" + "TightCutPUIDPassFractionVSpt"];
2904  if (mTightCutPUJIDPassFractionVSpt && mTightCutPUJIDPassFractionVSpt->getRootObject())
2905  mTightCutPUJIDPassFractionVSpt->Fill(correctedJet.pt(), 0.);
2906  }
2908  mLooseMVAPUJIDPassFractionVSeta = map_of_MEs[DirName + "/" + "LooseMVAPUIDPassFractionVSeta"];
2909  if (mLooseMVAPUJIDPassFractionVSeta && mLooseMVAPUJIDPassFractionVSeta->getRootObject())
2910  mLooseMVAPUJIDPassFractionVSeta->Fill(correctedJet.eta(), 1.);
2911  mLooseMVAPUJIDPassFractionVSpt = map_of_MEs[DirName + "/" + "LooseMVAPUIDPassFractionVSpt"];
2912  if (mLooseMVAPUJIDPassFractionVSpt && mLooseMVAPUJIDPassFractionVSpt->getRootObject())
2913  mLooseMVAPUJIDPassFractionVSpt->Fill(correctedJet.pt(), 1.);
2914  } else {
2915  mLooseMVAPUJIDPassFractionVSeta = map_of_MEs[DirName + "/" + "LooseMVAPUIDPassFractionVSeta"];
2916  if (mLooseMVAPUJIDPassFractionVSeta && mLooseMVAPUJIDPassFractionVSeta->getRootObject())
2917  mLooseMVAPUJIDPassFractionVSeta->Fill(correctedJet.eta(), 0.);
2918  mLooseMVAPUJIDPassFractionVSpt = map_of_MEs[DirName + "/" + "LooseMVAPUIDPassFractionVSpt"];
2919  if (mLooseMVAPUJIDPassFractionVSpt && mLooseMVAPUJIDPassFractionVSpt->getRootObject())
2920  mLooseMVAPUJIDPassFractionVSpt->Fill(correctedJet.pt(), 0.);
2921  }
2923  mMediumMVAPUJIDPassFractionVSeta = map_of_MEs[DirName + "/" + "MediumMVAPUIDPassFractionVSeta"];
2924  if (mMediumMVAPUJIDPassFractionVSeta && mMediumMVAPUJIDPassFractionVSeta->getRootObject())
2925  mMediumMVAPUJIDPassFractionVSeta->Fill(correctedJet.eta(), 1.);
2926  mMediumMVAPUJIDPassFractionVSpt = map_of_MEs[DirName + "/" + "MediumMVAPUIDPassFractionVSpt"];
2927  if (mMediumMVAPUJIDPassFractionVSpt && mMediumMVAPUJIDPassFractionVSpt->getRootObject())
2928  mMediumMVAPUJIDPassFractionVSpt->Fill(correctedJet.pt(), 1.);
2929  } else {
2930  mMediumMVAPUJIDPassFractionVSeta = map_of_MEs[DirName + "/" + "MediumMVAPUIDPassFractionVSeta"];
2931  if (mMediumMVAPUJIDPassFractionVSeta && mMediumMVAPUJIDPassFractionVSeta->getRootObject())
2932  mMediumMVAPUJIDPassFractionVSeta->Fill(correctedJet.eta(), 0.);
2933  mMediumMVAPUJIDPassFractionVSpt = map_of_MEs[DirName + "/" + "MediumMVAPUIDPassFractionVSpt"];
2934  if (mMediumMVAPUJIDPassFractionVSpt && mMediumMVAPUJIDPassFractionVSpt->getRootObject())
2935  mMediumMVAPUJIDPassFractionVSpt->Fill(correctedJet.pt(), 0.);
2936  }
2938  mTightMVAPUJIDPassFractionVSeta = map_of_MEs[DirName + "/" + "TightMVAPUIDPassFractionVSeta"];
2939  if (mTightMVAPUJIDPassFractionVSeta && mTightMVAPUJIDPassFractionVSeta->getRootObject())
2940  mTightMVAPUJIDPassFractionVSeta->Fill(correctedJet.eta(), 1.);
2941  mTightMVAPUJIDPassFractionVSpt = map_of_MEs[DirName + "/" + "TightMVAPUIDPassFractionVSpt"];
2942  if (mTightMVAPUJIDPassFractionVSpt && mTightMVAPUJIDPassFractionVSpt->getRootObject())
2943  mTightMVAPUJIDPassFractionVSpt->Fill(correctedJet.pt(), 1.);
2944  } else {
2945  mTightMVAPUJIDPassFractionVSeta = map_of_MEs[DirName + "/" + "TightMVAPUIDPassFractionVSeta"];
2946  if (mTightMVAPUJIDPassFractionVSeta && mTightMVAPUJIDPassFractionVSeta->getRootObject())
2947  mTightMVAPUJIDPassFractionVSeta->Fill(correctedJet.eta(), 0.);
2948  mTightMVAPUJIDPassFractionVSpt = map_of_MEs[DirName + "/" + "TightMVAPUIDPassFractionVSpt"];
2949  if (mTightMVAPUJIDPassFractionVSpt && mTightMVAPUJIDPassFractionVSpt->getRootObject())
2950  mTightMVAPUJIDPassFractionVSpt->Fill(correctedJet.pt(), 0.);
2951  }
2952  if (correctedJet.pt() <= 50) {
2953  mCHFracVSeta_lowPt = map_of_MEs[DirName + "/" + "CHFracVSeta_lowPt"];
2954  if (mCHFracVSeta_lowPt && mCHFracVSeta_lowPt->getRootObject())
2955  mCHFracVSeta_lowPt->Fill((*pfJets)[ijet].eta(), (*pfJets)[ijet].chargedHadronEnergyFraction());
2956  mNHFracVSeta_lowPt = map_of_MEs[DirName + "/" + "NHFracVSeta_lowPt"];
2957  if (mNHFracVSeta_lowPt && mNHFracVSeta_lowPt->getRootObject())
2958  mNHFracVSeta_lowPt->Fill((*pfJets)[ijet].eta(), (*pfJets)[ijet].neutralHadronEnergyFraction());
2959  mPhFracVSeta_lowPt = map_of_MEs[DirName + "/" + "PhFracVSeta_lowPt"];
2960  if (mPhFracVSeta_lowPt && mPhFracVSeta_lowPt->getRootObject())
2961  mPhFracVSeta_lowPt->Fill((*pfJets)[ijet].eta(), (*pfJets)[ijet].neutralEmEnergyFraction());
2962  }
2963  if (correctedJet.pt() > 50. && correctedJet.pt() <= 140.) {
2964  mCHFracVSeta_mediumPt = map_of_MEs[DirName + "/" + "CHFracVSeta_mediumPt"];
2965  if (mCHFracVSeta_mediumPt && mCHFracVSeta_mediumPt->getRootObject())
2966  mCHFracVSeta_mediumPt->Fill((*pfJets)[ijet].eta(), (*pfJets)[ijet].chargedHadronEnergyFraction());
2967  mNHFracVSeta_mediumPt = map_of_MEs[DirName + "/" + "NHFracVSeta_mediumPt"];
2968  if (mNHFracVSeta_mediumPt && mNHFracVSeta_mediumPt->getRootObject())
2969  mNHFracVSeta_mediumPt->Fill((*pfJets)[ijet].eta(), (*pfJets)[ijet].neutralHadronEnergyFraction());
2970  mPhFracVSeta_mediumPt = map_of_MEs[DirName + "/" + "PhFracVSeta_mediumPt"];
2971  if (mPhFracVSeta_mediumPt && mPhFracVSeta_mediumPt->getRootObject())
2972  mPhFracVSeta_mediumPt->Fill((*pfJets)[ijet].eta(), (*pfJets)[ijet].neutralEmEnergyFraction());
2973  }
2974  if (correctedJet.pt() > 140.) {
2975  mCHFracVSeta_highPt = map_of_MEs[DirName + "/" + "CHFracVSeta_highPt"];
2976  if (mCHFracVSeta_highPt && mCHFracVSeta_highPt->getRootObject())
2977  mCHFracVSeta_highPt->Fill((*pfJets)[ijet].eta(), (*pfJets)[ijet].chargedHadronEnergyFraction());
2978  mNHFracVSeta_highPt = map_of_MEs[DirName + "/" + "NHFracVSeta_highPt"];
2979  if (mNHFracVSeta_highPt && mNHFracVSeta_highPt->getRootObject())
2980  mNHFracVSeta_highPt->Fill((*pfJets)[ijet].eta(), (*pfJets)[ijet].neutralHadronEnergyFraction());
2981  mPhFracVSeta_highPt = map_of_MEs[DirName + "/" + "PhFracVSeta_highPt"];
2982  if (mPhFracVSeta_highPt && mPhFracVSeta_highPt->getRootObject())
2983  mPhFracVSeta_highPt->Fill((*pfJets)[ijet].eta(), (*pfJets)[ijet].neutralEmEnergyFraction());
2984  }
2985  if (fabs(correctedJet.eta()) <= 1.3) {
2986  //fractions for barrel
2987  if (correctedJet.pt() <= 50.) {
2988  //mAxis2_lowPt_Barrel = map_of_MEs[DirName+"/"+"qg_Axis2_lowPt_Barrel"];if(mAxis2_lowPt_Barrel && mAxis2_lowPt_Barrel->getRootObject()) mAxis2_lowPt_Barrel->Fill(QGaxis2);
2989  //mpTD_lowPt_Barrel = map_of_MEs[DirName+"/"+"qg_pTD_lowPt_Barrel"]; if(mpTD_lowPt_Barrel && mpTD_lowPt_Barrel->getRootObject()) mpTD_lowPt_Barrel->Fill(QGptD);
2990  //mMultiplicityQG_lowPt_Barrel = map_of_MEs[DirName+"/"+"qg_multiplicity_lowPt_Barrel"]; if(mMultiplicityQG_lowPt_Barrel && mMultiplicityQG_lowPt_Barrel->getRootObject()) mMultiplicityQG_lowPt_Barrel->Fill(QGmulti);
2991  //mqgLikelihood_lowPt_Barrel = map_of_MEs[DirName+"/"+"qg_Likelihood_lowPt_Barrel"]; if(mqgLikelihood_lowPt_Barrel && mqgLikelihood_lowPt_Barrel->getRootObject()) mqgLikelihood_lowPt_Barrel->Fill(QGLikelihood);
2992  mMass_lowPt_Barrel = map_of_MEs[DirName + "/" + "JetMass_lowPt_Barrel"];
2993  if (mMass_lowPt_Barrel && mMass_lowPt_Barrel->getRootObject())
2994  mMass_lowPt_Barrel->Fill((*pfJets)[ijet].mass());
2995  mMVAPUJIDDiscriminant_lowPt_Barrel = map_of_MEs[DirName + "/" + "MVAPUJIDDiscriminant_lowPt_Barrel"];
2996  if (mMVAPUJIDDiscriminant_lowPt_Barrel && mMVAPUJIDDiscriminant_lowPt_Barrel->getRootObject())
2997  mMVAPUJIDDiscriminant_lowPt_Barrel->Fill(puidmva);
2998  mCutPUJIDDiscriminant_lowPt_Barrel = map_of_MEs[DirName + "/" + "CutPUJIDDiscriminant_lowPt_Barrel"];
2999  if (mCutPUJIDDiscriminant_lowPt_Barrel && mCutPUJIDDiscriminant_lowPt_Barrel->getRootObject())
3000  mCutPUJIDDiscriminant_lowPt_Barrel->Fill(puidcut);
3001  mCHFrac_lowPt_Barrel = map_of_MEs[DirName + "/" + "CHFrac_lowPt_Barrel"];
3002  if (mCHFrac_lowPt_Barrel && mCHFrac_lowPt_Barrel->getRootObject())
3003  mCHFrac_lowPt_Barrel->Fill((*pfJets)[ijet].chargedHadronEnergyFraction());
3004  mNHFrac_lowPt_Barrel = map_of_MEs[DirName + "/" + "NHFrac_lowPt_Barrel"];
3005  if (mNHFrac_lowPt_Barrel && mNHFrac_lowPt_Barrel->getRootObject())
3006  mNHFrac_lowPt_Barrel->Fill((*pfJets)[ijet].neutralHadronEnergyFraction());
3007  mPhFrac_lowPt_Barrel = map_of_MEs[DirName + "/" + "PhFrac_lowPt_Barrel"];
3008  if (mPhFrac_lowPt_Barrel && mPhFrac_lowPt_Barrel->getRootObject())
3009  mPhFrac_lowPt_Barrel->Fill((*pfJets)[ijet].neutralEmEnergyFraction());
3010  mCHEn_lowPt_Barrel = map_of_MEs[DirName + "/" + "CHEn_lowPt_Barrel"];
3011  if (mCHEn_lowPt_Barrel && mCHEn_lowPt_Barrel->getRootObject())
3012  mCHEn_lowPt_Barrel->Fill((*pfJets)[ijet].chargedHadronEnergy());
3013  mNHEn_lowPt_Barrel = map_of_MEs[DirName + "/" + "NHEn_lowPt_Barrel"];
3014  if (mNHEn_lowPt_Barrel && mNHEn_lowPt_Barrel->getRootObject())
3015  mNHEn_lowPt_Barrel->Fill((*pfJets)[ijet].neutralHadronEnergy());
3016  mPhEn_lowPt_Barrel = map_of_MEs[DirName + "/" + "PhEn_lowPt_Barrel"];
3017  if (mPhEn_lowPt_Barrel && mPhEn_lowPt_Barrel->getRootObject())
3018  mPhEn_lowPt_Barrel->Fill((*pfJets)[ijet].neutralEmEnergy());
3019  mElEn_lowPt_Barrel = map_of_MEs[DirName + "/" + "ElEn_lowPt_Barrel"];
3020  if (mElEn_lowPt_Barrel && mElEn_lowPt_Barrel->getRootObject())
3021  mElEn_lowPt_Barrel->Fill((*pfJets)[ijet].chargedEmEnergy());
3022  mMuEn_lowPt_Barrel = map_of_MEs[DirName + "/" + "MuEn_lowPt_Barrel"];
3023  if (mMuEn_lowPt_Barrel && mMuEn_lowPt_Barrel->getRootObject())
3024  mMuEn_lowPt_Barrel->Fill((*pfJets)[ijet].chargedMuEnergy());
3025  mChMultiplicity_lowPt_Barrel = map_of_MEs[DirName + "/" + "ChMultiplicity_lowPt_Barrel"];
3026  if (mChMultiplicity_lowPt_Barrel && mChMultiplicity_lowPt_Barrel->getRootObject())
3027  mChMultiplicity_lowPt_Barrel->Fill((*pfJets)[ijet].chargedMultiplicity());
3028  mNeutMultiplicity_lowPt_Barrel = map_of_MEs[DirName + "/" + "NeutMultiplicity_lowPt_Barrel"];
3029  if (mNeutMultiplicity_lowPt_Barrel && mNeutMultiplicity_lowPt_Barrel->getRootObject())
3030  mNeutMultiplicity_lowPt_Barrel->Fill((*pfJets)[ijet].neutralMultiplicity());
3031  mMuMultiplicity_lowPt_Barrel = map_of_MEs[DirName + "/" + "MuMultiplicity_lowPt_Barrel"];
3032  if (mMuMultiplicity_lowPt_Barrel && mMuMultiplicity_lowPt_Barrel->getRootObject())
3033  mMuMultiplicity_lowPt_Barrel->Fill((*pfJets)[ijet].muonMultiplicity());
3034  }
3035  if (correctedJet.pt() > 50. && correctedJet.pt() <= 140.) {
3036  //mAxis2_mediumPt_Barrel = map_of_MEs[DirName+"/"+"qg_Axis2_mediumPt_Barrel"];if(mAxis2_mediumPt_Barrel && mAxis2_mediumPt_Barrel->getRootObject()) mAxis2_mediumPt_Barrel->Fill(QGaxis2);
3037  //mpTD_mediumPt_Barrel = map_of_MEs[DirName+"/"+"qg_pTD_mediumPt_Barrel"]; if(mpTD_mediumPt_Barrel && mpTD_mediumPt_Barrel->getRootObject()) mpTD_mediumPt_Barrel->Fill(QGptD);
3038  //mMultiplicityQG_mediumPt_Barrel = map_of_MEs[DirName+"/"+"qg_multiplicity_mediumPt_Barrel"]; if(mMultiplicityQG_mediumPt_Barrel && mMultiplicityQG_mediumPt_Barrel->getRootObject()) mMultiplicityQG_mediumPt_Barrel->Fill(QGmulti);
3039  //mqgLikelihood_mediumPt_Barrel = map_of_MEs[DirName+"/"+"qg_Likelihood_mediumPt_Barrel"]; if(mqgLikelihood_mediumPt_Barrel && mqgLikelihood_mediumPt_Barrel->getRootObject()) mqgLikelihood_mediumPt_Barrel->Fill(QGLikelihood);
3040  mMass_mediumPt_Barrel = map_of_MEs[DirName + "/" + "JetMass_mediumPt_Barrel"];
3041  if (mMass_mediumPt_Barrel && mMass_mediumPt_Barrel->getRootObject())
3042  mMass_mediumPt_Barrel->Fill((*pfJets)[ijet].mass());
3043  mMVAPUJIDDiscriminant_mediumPt_Barrel = map_of_MEs[DirName + "/" + "MVAPUJIDDiscriminant_mediumPt_Barrel"];
3044  if (mMVAPUJIDDiscriminant_mediumPt_Barrel && mMVAPUJIDDiscriminant_mediumPt_Barrel->getRootObject())
3045  mMVAPUJIDDiscriminant_mediumPt_Barrel->Fill(puidmva);
3046  mCutPUJIDDiscriminant_mediumPt_Barrel = map_of_MEs[DirName + "/" + "CutPUJIDDiscriminant_mediumPt_Barrel"];
3047  if (mCutPUJIDDiscriminant_mediumPt_Barrel && mCutPUJIDDiscriminant_mediumPt_Barrel->getRootObject())
3048  mCutPUJIDDiscriminant_mediumPt_Barrel->Fill(puidcut);
3049  mCHFrac_mediumPt_Barrel = map_of_MEs[DirName + "/" + "CHFrac_mediumPt_Barrel"];
3050  if (mCHFrac_mediumPt_Barrel && mCHFrac_mediumPt_Barrel->getRootObject())
3051  mCHFrac_mediumPt_Barrel->Fill((*pfJets)[ijet].chargedHadronEnergyFraction());
3052  mNHFrac_mediumPt_Barrel = map_of_MEs[DirName + "/" + "NHFrac_mediumPt_Barrel"];
3053  if (mNHFrac_mediumPt_Barrel && mNHFrac_mediumPt_Barrel->getRootObject())
3054  mNHFrac_mediumPt_Barrel->Fill((*pfJets)[ijet].neutralHadronEnergyFraction());
3055  mPhFrac_mediumPt_Barrel = map_of_MEs[DirName + "/" + "PhFrac_mediumPt_Barrel"];
3056  if (mPhFrac_mediumPt_Barrel && mPhFrac_mediumPt_Barrel->getRootObject())
3057  mPhFrac_mediumPt_Barrel->Fill((*pfJets)[ijet].neutralEmEnergyFraction());
3058  mCHEn_mediumPt_Barrel = map_of_MEs[DirName + "/" + "CHEn_mediumPt_Barrel"];
3059  if (mCHEn_mediumPt_Barrel && mCHEn_mediumPt_Barrel->getRootObject())
3060  mCHEn_mediumPt_Barrel->Fill((*pfJets)[ijet].chargedHadronEnergy());
3061  mNHEn_mediumPt_Barrel = map_of_MEs[DirName + "/" + "NHEn_mediumPt_Barrel"];
3062  if (mNHEn_mediumPt_Barrel && mNHEn_mediumPt_Barrel->getRootObject())
3063  mNHEn_mediumPt_Barrel->Fill((*pfJets)[ijet].neutralHadronEnergy());
3064  mPhEn_mediumPt_Barrel = map_of_MEs[DirName + "/" + "PhEn_mediumPt_Barrel"];
3065  if (mPhEn_mediumPt_Barrel && mPhEn_mediumPt_Barrel->getRootObject())
3066  mPhEn_mediumPt_Barrel->Fill((*pfJets)[ijet].neutralEmEnergy());
3067  mElEn_mediumPt_Barrel = map_of_MEs[DirName + "/" + "ElEn_mediumPt_Barrel"];
3068  if (mElEn_mediumPt_Barrel && mElEn_mediumPt_Barrel->getRootObject())
3069  mElEn_mediumPt_Barrel->Fill((*pfJets)[ijet].chargedEmEnergy());
3070  mMuEn_mediumPt_Barrel = map_of_MEs[DirName + "/" + "MuEn_mediumPt_Barrel"];
3071  if (mMuEn_mediumPt_Barrel && mMuEn_mediumPt_Barrel->getRootObject())
3072  mMuEn_mediumPt_Barrel->Fill((*pfJets)[ijet].chargedMuEnergy());
3073  mChMultiplicity_mediumPt_Barrel = map_of_MEs[DirName + "/" + "ChMultiplicity_mediumPt_Barrel"];
3074  if (mChMultiplicity_mediumPt_Barrel && mChMultiplicity_mediumPt_Barrel->getRootObject())
3075  mChMultiplicity_mediumPt_Barrel->Fill((*pfJets)[ijet].chargedMultiplicity());
3076  mNeutMultiplicity_mediumPt_Barrel = map_of_MEs[DirName + "/" + "NeutMultiplicity_mediumPt_Barrel"];
3077  if (mNeutMultiplicity_mediumPt_Barrel && mNeutMultiplicity_mediumPt_Barrel->getRootObject())
3078  mNeutMultiplicity_mediumPt_Barrel->Fill((*pfJets)[ijet].neutralMultiplicity());
3079  mMuMultiplicity_mediumPt_Barrel = map_of_MEs[DirName + "/" + "MuMultiplicity_mediumPt_Barrel"];
3080  if (mMuMultiplicity_mediumPt_Barrel && mMuMultiplicity_mediumPt_Barrel->getRootObject())
3081  mMuMultiplicity_mediumPt_Barrel->Fill((*pfJets)[ijet].muonMultiplicity());
3082  }
3083  if (correctedJet.pt() > 140.) {
3084  //mAxis2_highPt_Barrel = map_of_MEs[DirName+"/"+"qg_Axis2_highPt_Barrel"];if(mAxis2_highPt_Barrel && mAxis2_highPt_Barrel->getRootObject()) mAxis2_highPt_Barrel->Fill(QGaxis2);
3085  //mpTD_highPt_Barrel = map_of_MEs[DirName+"/"+"qg_pTD_highPt_Barrel"]; if(mpTD_highPt_Barrel && mpTD_highPt_Barrel->getRootObject()) mpTD_highPt_Barrel->Fill(QGptD);
3086  //mMultiplicityQG_highPt_Barrel = map_of_MEs[DirName+"/"+"qg_multiplicity_highPt_Barrel"]; if(mMultiplicityQG_highPt_Barrel && mMultiplicityQG_highPt_Barrel->getRootObject()) mMultiplicityQG_highPt_Barrel->Fill(QGmulti);
3087  //mqgLikelihood_highPt_Barrel = map_of_MEs[DirName+"/"+"qg_Likelihood_highPt_Barrel"]; if(mqgLikelihood_highPt_Barrel && mqgLikelihood_highPt_Barrel->getRootObject()) mqgLikelihood_highPt_Barrel->Fill(QGLikelihood);
3088  mMass_highPt_Barrel = map_of_MEs[DirName + "/" + "JetMass_highPt_Barrel"];
3089  if (mMass_highPt_Barrel && mMass_highPt_Barrel->getRootObject())
3090  mMass_highPt_Barrel->Fill((*pfJets)[ijet].mass());
3091  mMVAPUJIDDiscriminant_highPt_Barrel = map_of_MEs[DirName + "/" + "MVAPUJIDDiscriminant_highPt_Barrel"];
3092  if (mMVAPUJIDDiscriminant_highPt_Barrel && mMVAPUJIDDiscriminant_highPt_Barrel->getRootObject())
3093  mMVAPUJIDDiscriminant_highPt_Barrel->Fill(puidmva);
3094  mCutPUJIDDiscriminant_highPt_Barrel = map_of_MEs[DirName + "/" + "CutPUJIDDiscriminant_highPt_Barrel"];
3095  if (mCutPUJIDDiscriminant_highPt_Barrel && mCutPUJIDDiscriminant_highPt_Barrel->getRootObject())
3096  mCutPUJIDDiscriminant_highPt_Barrel->Fill(puidcut);
3097  mCHFrac_highPt_Barrel = map_of_MEs[DirName + "/" + "CHFrac_highPt_Barrel"];
3098  if (mCHFrac_highPt_Barrel && mCHFrac_highPt_Barrel->getRootObject())
3099  mCHFrac_highPt_Barrel->Fill((*pfJets)[ijet].chargedHadronEnergyFraction());
3100  mNHFrac_highPt_Barrel = map_of_MEs[DirName + "/" + "NHFrac_highPt_Barrel"];
3101  if (mNHFrac_highPt_Barrel && mNHFrac_highPt_Barrel->getRootObject())
3102  mNHFrac_highPt_Barrel->Fill((*pfJets)[ijet].neutralHadronEnergyFraction());
3103  mPhFrac_highPt_Barrel = map_of_MEs[DirName + "/" + "PhFrac_highPt_Barrel"];
3104  if (mPhFrac_highPt_Barrel && mPhFrac_highPt_Barrel->getRootObject())
3105  mPhFrac_highPt_Barrel->Fill((*pfJets)[ijet].neutralEmEnergyFraction());
3106  mCHEn_highPt_Barrel = map_of_MEs[DirName + "/" + "CHEn_highPt_Barrel"];
3107  if (mCHEn_highPt_Barrel && mCHEn_highPt_Barrel->getRootObject())
3108  mCHEn_highPt_Barrel->Fill((*pfJets)[ijet].chargedHadronEnergy());
3109  mNHEn_highPt_Barrel = map_of_MEs[DirName + "/" + "NHEn_highPt_Barrel"];
3110  if (mNHEn_highPt_Barrel && mNHEn_highPt_Barrel->getRootObject())
3111  mNHEn_highPt_Barrel->Fill((*pfJets)[ijet].neutralHadronEnergy());
3112  mPhEn_highPt_Barrel = map_of_MEs[DirName + "/" + "PhEn_highPt_Barrel"];
3113  if (mPhEn_highPt_Barrel && mPhEn_highPt_Barrel->getRootObject())
3114  mPhEn_highPt_Barrel->Fill((*pfJets)[ijet].neutralEmEnergy());
3115  mElEn_highPt_Barrel = map_of_MEs[DirName + "/" + "ElEn_highPt_Barrel"];
3116  if (mElEn_highPt_Barrel && mElEn_highPt_Barrel->getRootObject())
3117  mElEn_highPt_Barrel->Fill((*pfJets)[ijet].chargedEmEnergy());
3118  mMuEn_highPt_Barrel = map_of_MEs[DirName + "/" + "MuEn_highPt_Barrel"];
3119  if (mMuEn_highPt_Barrel && mMuEn_highPt_Barrel->getRootObject())
3120  mMuEn_highPt_Barrel->Fill((*pfJets)[ijet].chargedMuEnergy());
3121  mChMultiplicity_highPt_Barrel = map_of_MEs[DirName + "/" + "ChMultiplicity_highPt_Barrel"];
3122  if (mChMultiplicity_highPt_Barrel && mChMultiplicity_highPt_Barrel->getRootObject())
3123  mChMultiplicity_highPt_Barrel->Fill((*pfJets)[ijet].chargedMultiplicity());
3124  mNeutMultiplicity_highPt_Barrel = map_of_MEs[DirName + "/" + "NeutMultiplicity_highPt_Barrel"];
3125  if (mNeutMultiplicity_highPt_Barrel && mNeutMultiplicity_highPt_Barrel->getRootObject())
3126  mNeutMultiplicity_highPt_Barrel->Fill((*pfJets)[ijet].neutralMultiplicity());
3127  mMuMultiplicity_highPt_Barrel = map_of_MEs[DirName + "/" + "MuMultiplicity_highPt_Barrel"];
3128  if (mMuMultiplicity_highPt_Barrel && mMuMultiplicity_highPt_Barrel->getRootObject())
3129  mMuMultiplicity_highPt_Barrel->Fill((*pfJets)[ijet].muonMultiplicity());
3130  }
3131  mCHFracVSpT_Barrel = map_of_MEs[DirName + "/" + "CHFracVSpT_Barrel"];
3132  if (mCHFracVSpT_Barrel && mCHFracVSpT_Barrel->getRootObject())
3133  mCHFracVSpT_Barrel->Fill(correctedJet.pt(), (*pfJets)[ijet].chargedHadronEnergyFraction());
3134  mNHFracVSpT_Barrel = map_of_MEs[DirName + "/" + "NHFracVSpT_Barrel"];
3135  if (mNHFracVSpT_Barrel && mNHFracVSpT_Barrel->getRootObject())
3136  mNHFracVSpT_Barrel->Fill(correctedJet.pt(), (*pfJets)[ijet].neutralHadronEnergyFraction());
3137  mPhFracVSpT_Barrel = map_of_MEs[DirName + "/" + "PhFracVSpT_Barrel"];
3138  if (mPhFracVSpT_Barrel && mPhFracVSpT_Barrel->getRootObject())
3139  mPhFracVSpT_Barrel->Fill(correctedJet.pt(), (*pfJets)[ijet].neutralEmEnergyFraction());
3140  } else if (fabs(correctedJet.eta()) <= 3) {
3141  //fractions for endcap
3142  if (correctedJet.pt() <= 50.) {
3143  //mAxis2_lowPt_EndCap = map_of_MEs[DirName+"/"+"qg_Axis2_lowPt_EndCap"];if(mAxis2_lowPt_EndCap && mAxis2_lowPt_EndCap->getRootObject()) mAxis2_lowPt_EndCap->Fill(QGaxis2);
3144  //mpTD_lowPt_EndCap = map_of_MEs[DirName+"/"+"qg_pTD_lowPt_EndCap"]; if(mpTD_lowPt_EndCap && mpTD_lowPt_EndCap->getRootObject()) mpTD_lowPt_EndCap->Fill(QGptD);
3145  //mMultiplicityQG_lowPt_EndCap = map_of_MEs[DirName+"/"+"qg_multiplicity_lowPt_EndCap"]; if(mMultiplicityQG_lowPt_EndCap && mMultiplicityQG_lowPt_EndCap->getRootObject()) mMultiplicityQG_lowPt_EndCap->Fill(QGmulti);
3146  //mqgLikelihood_lowPt_EndCap = map_of_MEs[DirName+"/"+"qg_Likelihood_lowPt_EndCap"]; if(mqgLikelihood_lowPt_EndCap && mqgLikelihood_lowPt_EndCap->getRootObject()) mqgLikelihood_lowPt_EndCap->Fill(QGLikelihood);
3147  mMass_lowPt_EndCap = map_of_MEs[DirName + "/" + "JetMass_lowPt_EndCap"];
3148  if (mMass_lowPt_EndCap && mMass_lowPt_EndCap->getRootObject())
3149  mMass_lowPt_EndCap->Fill((*pfJets)[ijet].mass());
3150  mMVAPUJIDDiscriminant_lowPt_EndCap = map_of_MEs[DirName + "/" + "MVAPUJIDDiscriminant_lowPt_EndCap"];
3151  if (mMVAPUJIDDiscriminant_lowPt_EndCap && mMVAPUJIDDiscriminant_lowPt_EndCap->getRootObject())
3152  mMVAPUJIDDiscriminant_lowPt_EndCap->Fill(puidmva);
3153  mCutPUJIDDiscriminant_lowPt_EndCap = map_of_MEs[DirName + "/" + "CutPUJIDDiscriminant_lowPt_EndCap"];
3154  if (mCutPUJIDDiscriminant_lowPt_EndCap && mCutPUJIDDiscriminant_lowPt_EndCap->getRootObject())
3155  mCutPUJIDDiscriminant_lowPt_EndCap->Fill(puidcut);
3156  mCHFrac_lowPt_EndCap = map_of_MEs[DirName + "/" + "CHFrac_lowPt_EndCap"];
3157  if (mCHFrac_lowPt_EndCap && mCHFrac_lowPt_EndCap->getRootObject())
3158  mCHFrac_lowPt_EndCap->Fill((*pfJets)[ijet].chargedHadronEnergyFraction());
3159  mNHFrac_lowPt_EndCap = map_of_MEs[DirName + "/" + "NHFrac_lowPt_EndCap"];
3160  if (mNHFrac_lowPt_EndCap && mNHFrac_lowPt_EndCap->getRootObject())
3161  mNHFrac_lowPt_EndCap->Fill((*pfJets)[ijet].neutralHadronEnergyFraction());
3162  mPhFrac_lowPt_EndCap = map_of_MEs[DirName + "/" + "PhFrac_lowPt_EndCap"];
3163  if (mPhFrac_lowPt_EndCap && mPhFrac_lowPt_EndCap->getRootObject())
3164  mPhFrac_lowPt_EndCap->Fill((*pfJets)[ijet].neutralEmEnergyFraction());
3165  mCHEn_lowPt_EndCap = map_of_MEs[DirName + "/" + "CHEn_lowPt_EndCap"];
3166  if (mCHEn_lowPt_EndCap && mCHEn_lowPt_EndCap->getRootObject())
3167  mCHEn_lowPt_EndCap->Fill((*pfJets)[ijet].chargedHadronEnergy());
3168  mNHEn_lowPt_EndCap = map_of_MEs[DirName + "/" + "NHEn_lowPt_EndCap"];
3169  if (mNHEn_lowPt_EndCap && mNHEn_lowPt_EndCap->getRootObject())
3170  mNHEn_lowPt_EndCap->Fill((*pfJets)[ijet].neutralHadronEnergy());
3171  mPhEn_lowPt_EndCap = map_of_MEs[DirName + "/" + "PhEn_lowPt_EndCap"];
3172  if (mPhEn_lowPt_EndCap && mPhEn_lowPt_EndCap->getRootObject())
3173  mPhEn_lowPt_EndCap->Fill((*pfJets)[ijet].neutralEmEnergy());
3174  mElEn_lowPt_EndCap = map_of_MEs[DirName + "/" + "ElEn_lowPt_EndCap"];
3175  if (mElEn_lowPt_EndCap && mElEn_lowPt_EndCap->getRootObject())
3176  mElEn_lowPt_EndCap->Fill((*pfJets)[ijet].chargedEmEnergy());
3177  mMuEn_lowPt_EndCap = map_of_MEs[DirName + "/" + "MuEn_lowPt_EndCap"];
3178  if (mMuEn_lowPt_EndCap && mMuEn_lowPt_EndCap->getRootObject())
3179  mMuEn_lowPt_EndCap->Fill((*pfJets)[ijet].chargedMuEnergy());
3180  mChMultiplicity_lowPt_EndCap = map_of_MEs[DirName + "/" + "ChMultiplicity_lowPt_EndCap"];
3181  if (mChMultiplicity_lowPt_EndCap && mChMultiplicity_lowPt_EndCap->getRootObject())
3182  mChMultiplicity_lowPt_EndCap->Fill((*pfJets)[ijet].chargedMultiplicity());
3183  mNeutMultiplicity_lowPt_EndCap = map_of_MEs[DirName + "/" + "NeutMultiplicity_lowPt_EndCap"];
3184  if (mNeutMultiplicity_lowPt_EndCap && mNeutMultiplicity_lowPt_EndCap->getRootObject())
3185  mNeutMultiplicity_lowPt_EndCap->Fill((*pfJets)[ijet].neutralMultiplicity());
3186  mMuMultiplicity_lowPt_EndCap = map_of_MEs[DirName + "/" + "MuMultiplicity_lowPt_EndCap"];
3187  if (mMuMultiplicity_lowPt_EndCap && mMuMultiplicity_lowPt_EndCap->getRootObject())
3188  mMuMultiplicity_lowPt_EndCap->Fill((*pfJets)[ijet].muonMultiplicity());
3189  }
3190  if (correctedJet.pt() > 50. && correctedJet.pt() <= 140.) {
3191  //mAxis2_mediumPt_EndCap = map_of_MEs[DirName+"/"+"qg_Axis2_mediumPt_EndCap"];if(mAxis2_mediumPt_EndCap && mAxis2_mediumPt_EndCap->getRootObject()) mAxis2_mediumPt_EndCap->Fill(QGaxis2);
3192  //mpTD_mediumPt_EndCap = map_of_MEs[DirName+"/"+"qg_pTD_mediumPt_EndCap"]; if(mpTD_mediumPt_EndCap && mpTD_mediumPt_EndCap->getRootObject()) mpTD_mediumPt_EndCap->Fill(QGptD);
3193  //mMultiplicityQG_mediumPt_EndCap = map_of_MEs[DirName+"/"+"qg_multiplicity_mediumPt_EndCap"]; if(mMultiplicityQG_mediumPt_EndCap && mMultiplicityQG_mediumPt_EndCap->getRootObject()) mMultiplicityQG_mediumPt_EndCap->Fill(QGmulti);
3194  //mqgLikelihood_mediumPt_EndCap = map_of_MEs[DirName+"/"+"qg_Likelihood_mediumPt_EndCap"]; if(mqgLikelihood_mediumPt_EndCap && mqgLikelihood_mediumPt_EndCap->getRootObject()) mqgLikelihood_mediumPt_EndCap->Fill(QGLikelihood);
3195  mMass_mediumPt_EndCap = map_of_MEs[DirName + "/" + "JetMass_mediumPt_EndCap"];
3196  if (mMass_mediumPt_EndCap && mMass_mediumPt_EndCap->getRootObject())
3197  mMass_mediumPt_EndCap->Fill((*pfJets)[ijet].mass());
3198  mMVAPUJIDDiscriminant_mediumPt_EndCap = map_of_MEs[DirName + "/" + "MVAPUJIDDiscriminant_mediumPt_EndCap"];
3199  if (mMVAPUJIDDiscriminant_mediumPt_EndCap && mMVAPUJIDDiscriminant_mediumPt_EndCap->getRootObject())
3200  mMVAPUJIDDiscriminant_mediumPt_EndCap->Fill(puidmva);
3201  mCutPUJIDDiscriminant_mediumPt_EndCap = map_of_MEs[DirName + "/" + "CutPUJIDDiscriminant_mediumPt_EndCap"];
3202  if (mCutPUJIDDiscriminant_mediumPt_EndCap && mCutPUJIDDiscriminant_mediumPt_EndCap->getRootObject())
3203  mCutPUJIDDiscriminant_mediumPt_EndCap->Fill(puidcut);
3204  mCHFrac_mediumPt_EndCap = map_of_MEs[DirName + "/" + "CHFrac_mediumPt_EndCap"];
3205  if (mCHFrac_mediumPt_EndCap && mCHFrac_mediumPt_EndCap->getRootObject())
3206  mCHFrac_mediumPt_EndCap->Fill((*pfJets)[ijet].chargedHadronEnergyFraction());
3207  mNHFrac_mediumPt_EndCap = map_of_MEs[DirName + "/" + "NHFrac_mediumPt_EndCap"];
3208  if (mNHFrac_mediumPt_EndCap && mNHFrac_mediumPt_EndCap->getRootObject())
3209  mNHFrac_mediumPt_EndCap->Fill((*pfJets)[ijet].neutralHadronEnergyFraction());
3210  mPhFrac_mediumPt_EndCap = map_of_MEs[DirName + "/" + "PhFrac_mediumPt_EndCap"];
3211  if (mPhFrac_mediumPt_EndCap && mPhFrac_mediumPt_EndCap->getRootObject())
3212  mPhFrac_mediumPt_EndCap->Fill((*pfJets)[ijet].neutralEmEnergyFraction());
3213  mCHEn_mediumPt_EndCap = map_of_MEs[DirName + "/" + "CHEn_mediumPt_EndCap"];
3214  if (mCHEn_mediumPt_EndCap && mCHEn_mediumPt_EndCap->getRootObject())
3215  mCHEn_mediumPt_EndCap->Fill((*pfJets)[ijet].chargedHadronEnergy());
3216  mNHEn_mediumPt_EndCap = map_of_MEs[DirName + "/" + "NHEn_mediumPt_EndCap"];
3217  if (mNHEn_mediumPt_EndCap && mNHEn_mediumPt_EndCap->getRootObject())
3218  mNHEn_mediumPt_EndCap->Fill((*pfJets)[ijet].neutralHadronEnergy());
3219  mPhEn_mediumPt_EndCap = map_of_MEs[DirName + "/" + "PhEn_mediumPt_EndCap"];
3220  if (mPhEn_mediumPt_EndCap && mPhEn_mediumPt_EndCap->getRootObject())
3221  mPhEn_mediumPt_EndCap->Fill((*pfJets)[ijet].neutralEmEnergy());
3222  mElEn_mediumPt_EndCap = map_of_MEs[DirName + "/" + "ElEn_mediumPt_EndCap"];
3223  if (mElEn_mediumPt_EndCap && mElEn_mediumPt_EndCap->getRootObject())
3224  mElEn_mediumPt_EndCap->Fill((*pfJets)[ijet].chargedEmEnergy());
3225  mMuEn_mediumPt_EndCap = map_of_MEs[DirName + "/" + "MuEn_mediumPt_EndCap"];
3226  if (mMuEn_mediumPt_EndCap && mMuEn_mediumPt_EndCap->getRootObject())
3227  mMuEn_mediumPt_EndCap->Fill((*pfJets)[ijet].chargedMuEnergy());
3228  mChMultiplicity_mediumPt_EndCap = map_of_MEs[DirName + "/" + "ChMultiplicity_mediumPt_EndCap"];
3229  if (mChMultiplicity_mediumPt_EndCap && mChMultiplicity_mediumPt_EndCap->getRootObject())
3230  mChMultiplicity_mediumPt_EndCap->Fill((*pfJets)[ijet].chargedMultiplicity());
3231  mNeutMultiplicity_mediumPt_EndCap = map_of_MEs[DirName + "/" + "NeutMultiplicity_mediumPt_EndCap"];
3232  if (mNeutMultiplicity_mediumPt_EndCap && mNeutMultiplicity_mediumPt_EndCap->getRootObject())
3233  mNeutMultiplicity_mediumPt_EndCap->Fill((*pfJets)[ijet].neutralMultiplicity());
3234  mMuMultiplicity_mediumPt_EndCap = map_of_MEs[DirName + "/" + "MuMultiplicity_mediumPt_EndCap"];
3235  if (mMuMultiplicity_mediumPt_EndCap && mMuMultiplicity_mediumPt_EndCap->getRootObject())
3236  mMuMultiplicity_mediumPt_EndCap->Fill((*pfJets)[ijet].muonMultiplicity());
3237  }
3238  if (correctedJet.pt() > 140.) {
3239  //mAxis2_highPt_EndCap = map_of_MEs[DirName+"/"+"qg_Axis2_highPt_EndCap"];if(mAxis2_highPt_EndCap && mAxis2_highPt_EndCap->getRootObject()) mAxis2_highPt_EndCap->Fill(QGaxis2);
3240  //mpTD_highPt_EndCap = map_of_MEs[DirName+"/"+"qg_pTD_highPt_EndCap"]; if(mpTD_highPt_EndCap && mpTD_highPt_EndCap->getRootObject()) mpTD_highPt_EndCap->Fill(QGptD);
3241  //mMultiplicityQG_highPt_EndCap = map_of_MEs[DirName+"/"+"qg_multiplicity_highPt_EndCap"]; if(mMultiplicityQG_highPt_EndCap && mMultiplicityQG_highPt_EndCap->getRootObject()) mMultiplicityQG_highPt_EndCap->Fill(QGmulti);
3242  //mqgLikelihood_highPt_EndCap = map_of_MEs[DirName+"/"+"qg_Likelihood_highPt_EndCap"]; if(mqgLikelihood_highPt_EndCap && mqgLikelihood_highPt_EndCap->getRootObject()) mqgLikelihood_highPt_EndCap->Fill(QGLikelihood);
3243  mMass_highPt_EndCap = map_of_MEs[DirName + "/" + "JetMass_highPt_EndCap"];
3244  if (mMass_highPt_EndCap && mMass_highPt_EndCap->getRootObject())
3245  mMass_highPt_EndCap->Fill((*pfJets)[ijet].mass());
3246  mMVAPUJIDDiscriminant_highPt_EndCap = map_of_MEs[DirName + "/" + "MVAPUJIDDiscriminant_highPt_EndCap"];
3247  if (mMVAPUJIDDiscriminant_highPt_EndCap && mMVAPUJIDDiscriminant_highPt_EndCap->getRootObject())
3248  mMVAPUJIDDiscriminant_highPt_EndCap->Fill(puidmva);
3249  mCutPUJIDDiscriminant_highPt_EndCap = map_of_MEs[DirName + "/" + "CutPUJIDDiscriminant_highPt_EndCap"];
3250  if (mCutPUJIDDiscriminant_highPt_EndCap && mCutPUJIDDiscriminant_highPt_EndCap->getRootObject())
3251  mCutPUJIDDiscriminant_highPt_EndCap->Fill(puidcut);
3252  mCHFrac_highPt_EndCap = map_of_MEs[DirName + "/" + "CHFrac_highPt_EndCap"];
3253  if (mCHFrac_highPt_EndCap && mCHFrac_highPt_EndCap->getRootObject())
3254  mCHFrac_highPt_EndCap->Fill((*pfJets)[ijet].chargedHadronEnergyFraction());
3255  mNHFrac_highPt_EndCap = map_of_MEs[DirName + "/" + "NHFrac_highPt_EndCap"];
3256  if (mNHFrac_highPt_EndCap && mNHFrac_highPt_EndCap->getRootObject())
3257  mNHFrac_highPt_EndCap->Fill((*pfJets)[ijet].neutralHadronEnergyFraction());
3258  mPhFrac_highPt_EndCap = map_of_MEs[DirName + "/" + "PhFrac_highPt_EndCap"];
3259  if (mPhFrac_highPt_EndCap && mPhFrac_highPt_EndCap->getRootObject())
3260  mPhFrac_highPt_EndCap->Fill((*pfJets)[ijet].neutralEmEnergyFraction());
3261  mCHEn_highPt_EndCap = map_of_MEs[DirName + "/" + "CHEn_highPt_EndCap"];
3262  if (mCHEn_highPt_EndCap && mCHEn_highPt_EndCap->getRootObject())
3263  mCHEn_highPt_EndCap->Fill((*pfJets)[ijet].chargedHadronEnergy());
3264  mNHEn_highPt_EndCap = map_of_MEs[DirName + "/" + "NHEn_highPt_EndCap"];
3265  if (mNHEn_highPt_EndCap && mNHEn_highPt_EndCap->getRootObject())
3266  mNHEn_highPt_EndCap->Fill((*pfJets)[ijet].neutralHadronEnergy());
3267  mPhEn_highPt_EndCap = map_of_MEs[DirName + "/" + "PhEn_highPt_EndCap"];
3268  if (mPhEn_highPt_EndCap && mPhEn_highPt_EndCap->getRootObject())
3269  mPhEn_highPt_EndCap->Fill((*pfJets)[ijet].neutralEmEnergy());
3270  mElEn_highPt_EndCap = map_of_MEs[DirName + "/" + "ElEn_highPt_EndCap"];
3271  if (mElEn_highPt_EndCap && mElEn_highPt_EndCap->getRootObject())
3272  mElEn_highPt_EndCap->Fill((*pfJets)[ijet].chargedEmEnergy());
3273  mMuEn_highPt_EndCap = map_of_MEs[DirName + "/" + "MuEn_highPt_EndCap"];
3274  if (mMuEn_highPt_EndCap && mMuEn_highPt_EndCap->getRootObject())
3275  mMuEn_highPt_EndCap->Fill((*pfJets)[ijet].chargedMuEnergy());
3276  mChMultiplicity_highPt_EndCap = map_of_MEs[DirName + "/" + "ChMultiplicity_highPt_EndCap"];
3277  if (mChMultiplicity_highPt_EndCap && mChMultiplicity_highPt_EndCap->getRootObject())
3278  mChMultiplicity_highPt_EndCap->Fill((*pfJets)[ijet].chargedMultiplicity());
3279  mNeutMultiplicity_highPt_EndCap = map_of_MEs[DirName + "/" + "NeutMultiplicity_highPt_EndCap"];
3280  if (mNeutMultiplicity_highPt_EndCap && mNeutMultiplicity_highPt_EndCap->getRootObject())
3281  mNeutMultiplicity_highPt_EndCap->Fill((*pfJets)[ijet].neutralMultiplicity());
3282  mMuMultiplicity_highPt_EndCap = map_of_MEs[DirName + "/" + "MuMultiplicity_highPt_EndCap"];
3283  if (mMuMultiplicity_highPt_EndCap && mMuMultiplicity_highPt_EndCap->getRootObject())
3284  mMuMultiplicity_highPt_EndCap->Fill((*pfJets)[ijet].muonMultiplicity());
3285  }
3286  mCHFracVSpT_EndCap = map_of_MEs[DirName + "/" + "CHFracVSpT_EndCap"];
3287  if (mCHFracVSpT_EndCap && mCHFracVSpT_EndCap->getRootObject())
3288  mCHFracVSpT_EndCap->Fill(correctedJet.pt(), (*pfJets)[ijet].chargedHadronEnergyFraction());
3289  mNHFracVSpT_EndCap = map_of_MEs[DirName + "/" + "NHFracVSpT_EndCap"];
3290  if (mNHFracVSpT_EndCap && mNHFracVSpT_EndCap->getRootObject())
3291  mNHFracVSpT_EndCap->Fill(correctedJet.pt(), (*pfJets)[ijet].neutralHadronEnergyFraction());
3292  mPhFracVSpT_EndCap = map_of_MEs[DirName + "/" + "PhFracVSpT_EndCap"];
3293  if (mPhFracVSpT_EndCap && mPhFracVSpT_EndCap->getRootObject())
3294  mPhFracVSpT_EndCap->Fill(correctedJet.pt(), (*pfJets)[ijet].neutralEmEnergyFraction());
3295  } else {
3296  mHFHFracVSpT_Forward = map_of_MEs[DirName + "/" + "HFHFracVSpT_Forward"];
3297  if (mHFHFracVSpT_Forward && mHFHFracVSpT_Forward->getRootObject())
3298  mHFHFracVSpT_Forward->Fill(correctedJet.pt(), (*pfJets)[ijet].HFHadronEnergyFraction());
3299  mHFEFracVSpT_Forward = map_of_MEs[DirName + "/" + "HFEFracVSpT_Forward"];
3300  if (mHFEFracVSpT_Forward && mHFEFracVSpT_Forward->getRootObject())
3301  mHFEFracVSpT_Forward->Fill(correctedJet.pt(), (*pfJets)[ijet].HFEMEnergyFraction());
3302  //fractions
3303  if (correctedJet.pt() <= 50.) {
3304  //mAxis2_lowPt_Forward = map_of_MEs[DirName+"/"+"qg_Axis2_lowPt_Forward"];if(mAxis2_lowPt_Forward && mAxis2_lowPt_Forward->getRootObject()) mAxis2_lowPt_Forward->Fill(QGaxis2);
3305  //mpTD_lowPt_Forward = map_of_MEs[DirName+"/"+"qg_pTD_lowPt_Forward"]; if(mpTD_lowPt_Forward && mpTD_lowPt_Forward->getRootObject()) mpTD_lowPt_Forward->Fill(QGptD);
3306  //mMultiplicityQG_lowPt_Forward = map_of_MEs[DirName+"/"+"qg_multiplicity_lowPt_Forward"]; if(mMultiplicityQG_lowPt_Forward && mMultiplicityQG_lowPt_Forward->getRootObject()) mMultiplicityQG_lowPt_Forward->Fill(QGmulti);
3307  //mqgLikelihood_lowPt_Forward = map_of_MEs[DirName+"/"+"qg_Likelihood_lowPt_Forward"]; if(mqgLikelihood_lowPt_Forward && mqgLikelihood_lowPt_Forward->getRootObject()) mqgLikelihood_lowPt_Forward->Fill(QGLikelihood);
3308  mMass_lowPt_Forward = map_of_MEs[DirName + "/" + "JetMass_lowPt_Forward"];
3309  if (mMass_lowPt_Forward && mMass_lowPt_Forward->getRootObject())
3310  mMass_lowPt_Forward->Fill((*pfJets)[ijet].mass());
3311  mMVAPUJIDDiscriminant_lowPt_Forward = map_of_MEs[DirName + "/" + "MVAPUJIDDiscriminant_lowPt_Forward"];
3312  if (mMVAPUJIDDiscriminant_lowPt_Forward && mMVAPUJIDDiscriminant_lowPt_Forward->getRootObject())
3313  mMVAPUJIDDiscriminant_lowPt_Forward->Fill(puidmva);
3314  mCutPUJIDDiscriminant_lowPt_Forward = map_of_MEs[DirName + "/" + "CutPUJIDDiscriminant_lowPt_Forward"];
3315  if (mCutPUJIDDiscriminant_lowPt_Forward && mCutPUJIDDiscriminant_lowPt_Forward->getRootObject())
3316  mCutPUJIDDiscriminant_lowPt_Forward->Fill(puidcut);
3317  mHFEFrac_lowPt_Forward = map_of_MEs[DirName + "/" + "HFEFrac_lowPt_Forward"];
3318  if (mHFEFrac_lowPt_Forward && mHFEFrac_lowPt_Forward->getRootObject())
3319  mHFEFrac_lowPt_Forward->Fill((*pfJets)[ijet].HFEMEnergyFraction());
3320  mHFHFrac_lowPt_Forward = map_of_MEs[DirName + "/" + "HFHFrac_lowPt_Forward"];
3321  if (mHFHFrac_lowPt_Forward && mHFHFrac_lowPt_Forward->getRootObject())
3322  mHFHFrac_lowPt_Forward->Fill((*pfJets)[ijet].HFHadronEnergyFraction());
3323  mHFEEn_lowPt_Forward = map_of_MEs[DirName + "/" + "HFEEn_lowPt_Forward"];
3324  if (mHFEEn_lowPt_Forward && mHFEEn_lowPt_Forward->getRootObject())
3325  mHFEEn_lowPt_Forward->Fill((*pfJets)[ijet].HFEMEnergy());
3326  mHFHEn_lowPt_Forward = map_of_MEs[DirName + "/" + "HFHEn_lowPt_Forward"];
3327  if (mHFHEn_lowPt_Forward && mHFHEn_lowPt_Forward->getRootObject())
3328  mHFHEn_lowPt_Forward->Fill((*pfJets)[ijet].HFHadronEnergy());
3329  mNeutMultiplicity_lowPt_Forward = map_of_MEs[DirName + "/" + "NeutMultiplicity_lowPt_Forward"];
3330  if (mNeutMultiplicity_lowPt_Forward && mNeutMultiplicity_lowPt_Forward->getRootObject())
3331  mNeutMultiplicity_lowPt_Forward->Fill((*pfJets)[ijet].neutralMultiplicity());
3332  }
3333  if (correctedJet.pt() > 50. && correctedJet.pt() <= 140.) {
3334  //mAxis2_mediumPt_Forward = map_of_MEs[DirName+"/"+"qg_Axis2_mediumPt_Forward"];if(mAxis2_mediumPt_Forward && mAxis2_mediumPt_Forward->getRootObject()) mAxis2_mediumPt_Forward->Fill(QGaxis2);
3335  //mpTD_mediumPt_Forward = map_of_MEs[DirName+"/"+"qg_pTD_mediumPt_Forward"]; if(mpTD_mediumPt_Forward && mpTD_mediumPt_Forward->getRootObject()) mpTD_mediumPt_Forward->Fill(QGptD);
3336  //mMultiplicityQG_mediumPt_Forward = map_of_MEs[DirName+"/"+"qg_multiplicity_mediumPt_Forward"]; if(mMultiplicityQG_mediumPt_Forward && mMultiplicityQG_mediumPt_Forward->getRootObject()) mMultiplicityQG_mediumPt_Forward->Fill(QGmulti);
3337  //mqgLikelihood_mediumPt_Forward = map_of_MEs[DirName+"/"+"qg_Likelihood_mediumPt_Forward"]; if(mqgLikelihood_mediumPt_Forward && mqgLikelihood_mediumPt_Forward->getRootObject()) mqgLikelihood_mediumPt_Forward->Fill(QGLikelihood);
3338  mMass_mediumPt_Forward = map_of_MEs[DirName + "/" + "JetMass_mediumPt_Forward"];
3339  if (mMass_mediumPt_Forward && mMass_mediumPt_Forward->getRootObject())
3340  mMass_mediumPt_Forward->Fill((*pfJets)[ijet].mass());
3341  mMVAPUJIDDiscriminant_mediumPt_Forward =
3342  map_of_MEs[DirName + "/" + "MVAPUJIDDiscriminant_mediumPt_Forward"];
3343  if (mMVAPUJIDDiscriminant_mediumPt_Forward && mMVAPUJIDDiscriminant_mediumPt_Forward->getRootObject())
3344  mMVAPUJIDDiscriminant_mediumPt_Forward->Fill(puidmva);
3345  mCutPUJIDDiscriminant_mediumPt_Forward =
3346  map_of_MEs[DirName + "/" + "CutPUJIDDiscriminant_mediumPt_Forward"];
3347  if (mCutPUJIDDiscriminant_mediumPt_Forward && mCutPUJIDDiscriminant_mediumPt_Forward->getRootObject())
3348  mCutPUJIDDiscriminant_mediumPt_Forward->Fill(puidcut);
3349  mHFEFrac_mediumPt_Forward = map_of_MEs[DirName + "/" + "HFEFrac_mediumPt_Forward"];
3350  if (mHFEFrac_mediumPt_Forward && mHFEFrac_mediumPt_Forward->getRootObject())
3351  mHFEFrac_mediumPt_Forward->Fill((*pfJets)[ijet].HFEMEnergyFraction());
3352  mHFHFrac_mediumPt_Forward = map_of_MEs[DirName + "/" + "HFHFrac_mediumPt_Forward"];
3353  if (mHFHFrac_mediumPt_Forward && mHFHFrac_mediumPt_Forward->getRootObject())
3354  mHFHFrac_mediumPt_Forward->Fill((*pfJets)[ijet].HFHadronEnergyFraction());
3355  mHFEEn_mediumPt_Forward = map_of_MEs[DirName + "/" + "HFEEn_mediumPt_Forward"];
3356  if (mHFEEn_mediumPt_Forward && mHFEEn_mediumPt_Forward->getRootObject())
3357  mHFEEn_mediumPt_Forward->Fill((*pfJets)[ijet].HFEMEnergy());
3358  mHFHEn_mediumPt_Forward = map_of_MEs[DirName + "/" + "HFHEn_mediumPt_Forward"];
3359  if (mHFHEn_mediumPt_Forward && mHFHEn_mediumPt_Forward->getRootObject())
3360  mHFHEn_mediumPt_Forward->Fill((*pfJets)[ijet].HFHadronEnergy());
3361  mNeutMultiplicity_mediumPt_Forward = map_of_MEs[DirName + "/" + "NeutMultiplicity_mediumPt_Forward"];
3362  if (mNeutMultiplicity_mediumPt_Forward && mNeutMultiplicity_mediumPt_Forward->getRootObject())
3363  mNeutMultiplicity_mediumPt_Forward->Fill((*pfJets)[ijet].neutralMultiplicity());
3364  }
3365  if (correctedJet.pt() > 140.) {
3366  //mAxis2_highPt_Forward = map_of_MEs[DirName+"/"+"qg_Axis2_highPt_Forward"];if(mAxis2_highPt_Forward && mAxis2_highPt_Forward->getRootObject()) mAxis2_highPt_Forward->Fill(QGaxis2);
3367  //mpTD_highPt_Forward = map_of_MEs[DirName+"/"+"qg_pTD_highPt_Forward"]; if(mpTD_highPt_Forward && mpTD_highPt_Forward->getRootObject()) mpTD_highPt_Forward->Fill(QGptD);
3368  //mMultiplicityQG_highPt_Forward = map_of_MEs[DirName+"/"+"qg_multiplicity_highPt_Forward"]; if(mMultiplicityQG_highPt_Forward && mMultiplicityQG_highPt_Forward->getRootObject()) mMultiplicityQG_highPt_Forward->Fill(QGmulti);
3369  //mqgLikelihood_highPt_Forward = map_of_MEs[DirName+"/"+"qg_Likelihood_highPt_Forward"]; if(mqgLikelihood_highPt_Forward && mqgLikelihood_highPt_Forward->getRootObject()) mqgLikelihood_highPt_Forward->Fill(QGLikelihood);
3370  mMass_highPt_Forward = map_of_MEs[DirName + "/" + "JetMass_highPt_Forward"];
3371  if (mMass_highPt_Forward && mMass_highPt_Forward->getRootObject())
3372  mMass_highPt_Forward->Fill((*pfJets)[ijet].mass());
3373  mMVAPUJIDDiscriminant_highPt_Forward = map_of_MEs[DirName + "/" + "MVAPUJIDDiscriminant_highPt_Forward"];
3374  if (mMVAPUJIDDiscriminant_highPt_Forward && mMVAPUJIDDiscriminant_highPt_Forward->getRootObject())
3375  mMVAPUJIDDiscriminant_highPt_Forward->Fill(puidmva);
3376  mCutPUJIDDiscriminant_highPt_Forward = map_of_MEs[DirName + "/" + "CutPUJIDDiscriminant_highPt_Forward"];
3377  if (mCutPUJIDDiscriminant_highPt_Forward && mCutPUJIDDiscriminant_highPt_Forward->getRootObject())
3378  mCutPUJIDDiscriminant_highPt_Forward->Fill(puidcut);
3379  mHFEFrac_highPt_Forward = map_of_MEs[DirName + "/" + "HFEFrac_highPt_Forward"];
3380  if (mHFEFrac_highPt_Forward && mHFEFrac_highPt_Forward->getRootObject())
3381  mHFEFrac_highPt_Forward->Fill((*pfJets)[ijet].HFEMEnergyFraction());
3382  mHFHFrac_highPt_Forward = map_of_MEs[DirName + "/" + "HFHFrac_highPt_Forward"];
3383  if (mHFHFrac_highPt_Forward && mHFHFrac_highPt_Forward->getRootObject())
3384  mHFHFrac_highPt_Forward->Fill((*pfJets)[ijet].HFHadronEnergyFraction());
3385  mHFEEn_highPt_Forward = map_of_MEs[DirName + "/" + "HFEEn_highPt_Forward"];
3386  if (mHFEEn_highPt_Forward && mHFEEn_highPt_Forward->getRootObject())
3387  mHFEEn_highPt_Forward->Fill((*pfJets)[ijet].HFEMEnergy());
3388  mHFHEn_highPt_Forward = map_of_MEs[DirName + "/" + "HFHEn_highPt_Forward"];
3389  if (mHFHEn_highPt_Forward && mHFHEn_highPt_Forward->getRootObject())
3390  mHFHEn_highPt_Forward->Fill((*pfJets)[ijet].HFHadronEnergy());
3391  mNeutMultiplicity_highPt_Forward = map_of_MEs[DirName + "/" + "NeutMultiplicity_highPt_Forward"];
3392  if (mNeutMultiplicity_highPt_Forward && mNeutMultiplicity_highPt_Forward->getRootObject())
3393  mNeutMultiplicity_highPt_Forward->Fill((*pfJets)[ijet].neutralMultiplicity());
3394  }
3395  }
3396  //OOT plots
3397  /*
3398  if(techTriggerResultBx0 && techTriggerResultBxE && techTriggerResultBxF){
3399  meEta_BXm2BXm1Filled = map_of_MEs[DirName+"/"+"Eta_BXm2BXm1Filled"]; if ( meEta_BXm2BXm1Filled && meEta_BXm2BXm1Filled ->getRootObject()) meEta_BXm2BXm1Filled ->Fill((*pfJets)[ijet].eta());
3400  if(fabs(correctedJet.eta()) <= 1.3) {
3401  mePhFracBarrel_BXm2BXm1Filled = map_of_MEs[DirName+"/"+"PhFracBarrel_BXm2BXm1Filled"]; if ( mePhFracBarrel_BXm2BXm1Filled && mePhFracBarrel_BXm2BXm1Filled ->getRootObject()) mePhFracBarrel_BXm2BXm1Filled ->Fill((*pfJets)[ijet].photonEnergyFraction());
3402  meNHFracBarrel_BXm2BXm1Filled = map_of_MEs[DirName+"/"+"NHFracBarrel_BXm2BXm1Filled"]; if ( meNHFracBarrel_BXm2BXm1Filled && meNHFracBarrel_BXm2BXm1Filled ->getRootObject()) meNHFracBarrel_BXm2BXm1Filled ->Fill((*pfJets)[ijet].neutralHadronEnergyFraction());
3403  meCHFracBarrel_BXm2BXm1Filled = map_of_MEs[DirName+"/"+"CHFracBarrel_BXm2BXm1Filled"]; if ( meCHFracBarrel_BXm2BXm1Filled && meCHFracBarrel_BXm2BXm1Filled ->getRootObject()) meCHFracBarrel_BXm2BXm1Filled ->Fill((*pfJets)[ijet].chargedHadronEnergyFraction());
3404  mePtBarrel_BXm2BXm1Filled = map_of_MEs[DirName+"/"+"PtBarrel_BXm2BXm1Filled"]; if ( mePtBarrel_BXm2BXm1Filled && mePtBarrel_BXm2BXm1Filled ->getRootObject()) mePtBarrel_BXm2BXm1Filled ->Fill((*pfJets)[ijet].pt());
3405  }else if (correctedJet.eta() > -3.0 && correctedJet.eta() <= -1.3) {
3406  mePhFracEndCapMinus_BXm2BXm1Filled = map_of_MEs[DirName+"/"+"PhFracEndCapMinus_BXm2BXm1Filled"]; if ( mePhFracEndCapMinus_BXm2BXm1Filled && mePhFracEndCapMinus_BXm2BXm1Filled ->getRootObject()) mePhFracEndCapMinus_BXm2BXm1Filled ->Fill((*pfJets)[ijet].photonEnergyFraction());
3407  meNHFracEndCapMinus_BXm2BXm1Filled = map_of_MEs[DirName+"/"+"NHFracEndCapMinus_BXm2BXm1Filled"]; if ( meNHFracEndCapMinus_BXm2BXm1Filled && meNHFracEndCapMinus_BXm2BXm1Filled ->getRootObject()) meNHFracEndCapMinus_BXm2BXm1Filled ->Fill((*pfJets)[ijet].neutralHadronEnergyFraction());
3408  meCHFracEndCapMinus_BXm2BXm1Filled = map_of_MEs[DirName+"/"+"CHFracEndCapMinus_BXm2BXm1Filled"]; if ( meCHFracEndCapMinus_BXm2BXm1Filled && meCHFracEndCapMinus_BXm2BXm1Filled ->getRootObject()) meCHFracEndCapMinus_BXm2BXm1Filled ->Fill((*pfJets)[ijet].chargedHadronEnergyFraction());
3409  mePtEndCapMinus_BXm2BXm1Filled = map_of_MEs[DirName+"/"+"PtEndCapMinus_BXm2BXm1Filled"]; if ( mePtEndCapMinus_BXm2BXm1Filled && mePtEndCapMinus_BXm2BXm1Filled ->getRootObject()) mePtEndCapMinus_BXm2BXm1Filled ->Fill((*pfJets)[ijet].pt());
3410  }else if (correctedJet.eta() >= 1.3 && correctedJet.eta() < 3.0) {
3411  mePhFracEndCapPlus_BXm2BXm1Filled = map_of_MEs[DirName+"/"+"PhFracEndCapPlus_BXm2BXm1Filled"]; if ( mePhFracEndCapPlus_BXm2BXm1Filled && mePhFracEndCapPlus_BXm2BXm1Filled ->getRootObject()) mePhFracEndCapPlus_BXm2BXm1Filled ->Fill((*pfJets)[ijet].photonEnergyFraction());
3412  meNHFracEndCapPlus_BXm2BXm1Filled = map_of_MEs[DirName+"/"+"NHFracEndCapPlus_BXm2BXm1Filled"]; if ( meNHFracEndCapPlus_BXm2BXm1Filled && meNHFracEndCapPlus_BXm2BXm1Filled ->getRootObject()) meNHFracEndCapPlus_BXm2BXm1Filled ->Fill((*pfJets)[ijet].neutralHadronEnergyFraction());
3413  meCHFracEndCapPlus_BXm2BXm1Filled = map_of_MEs[DirName+"/"+"CHFracEndCapPlus_BXm2BXm1Filled"]; if ( meCHFracEndCapPlus_BXm2BXm1Filled && meCHFracEndCapPlus_BXm2BXm1Filled ->getRootObject()) meCHFracEndCapPlus_BXm2BXm1Filled ->Fill((*pfJets)[ijet].chargedHadronEnergyFraction());
3414  mePtEndCapPlus_BXm2BXm1Filled = map_of_MEs[DirName+"/"+"PtEndCapPlus_BXm2BXm1Filled"]; if ( mePtEndCapPlus_BXm2BXm1Filled && mePtEndCapPlus_BXm2BXm1Filled ->getRootObject()) mePtEndCapPlus_BXm2BXm1Filled ->Fill((*pfJets)[ijet].pt());
3415  }else if (correctedJet.eta() > -5.0 && correctedJet.eta() <= -3.0) {
3416  mePtForwardMinus_BXm2BXm1Filled = map_of_MEs[DirName+"/"+"PtForwardMinus_BXm2BXm1Filled"]; if ( mePtForwardMinus_BXm2BXm1Filled && mePtForwardMinus_BXm2BXm1Filled ->getRootObject()) mePtForwardMinus_BXm2BXm1Filled ->Fill((*pfJets)[ijet].pt());
3417  meHFHFracMinus_BXm2BXm1Filled = map_of_MEs[DirName+"/"+"HFHFracMinus_BXm2BXm1Filled"]; if ( meHFHFracMinus_BXm2BXm1Filled && meHFHFracMinus_BXm2BXm1Filled ->getRootObject()) meHFHFracMinus_BXm2BXm1Filled ->Fill((*pfJets)[ijet].HFHadronEnergyFraction());
3418  meHFEMFracMinus_BXm2BXm1Filled = map_of_MEs[DirName+"/"+"HFEMFracMinus_BXm2BXm1Filled"]; if ( meHFEMFracMinus_BXm2BXm1Filled && meHFEMFracMinus_BXm2BXm1Filled ->getRootObject()) meHFEMFracMinus_BXm2BXm1Filled ->Fill((*pfJets)[ijet].HFEMEnergyFraction());
3419  }else if (correctedJet.eta() >= 3.0 && correctedJet.eta() < 5.0) {
3420  mePtForwardPlus_BXm2BXm1Filled = map_of_MEs[DirName+"/"+"PtForwardPlus_BXm2BXm1Filled"]; if ( mePtForwardPlus_BXm2BXm1Filled && mePtForwardPlus_BXm2BXm1Filled ->getRootObject()) mePtForwardPlus_BXm2BXm1Filled ->Fill((*pfJets)[ijet].pt());
3421  meHFHFracPlus_BXm2BXm1Filled = map_of_MEs[DirName+"/"+"HFHFracPlus_BXm2BXm1Filled"]; if ( meHFHFracPlus_BXm2BXm1Filled && meHFHFracPlus_BXm2BXm1Filled ->getRootObject()) meHFHFracPlus_BXm2BXm1Filled ->Fill((*pfJets)[ijet].HFHadronEnergyFraction());
3422  meHFEMFracPlus_BXm2BXm1Filled = map_of_MEs[DirName+"/"+"HFEMFracPlus_BXm2BXm1Filled"]; if ( meHFEMFracPlus_BXm2BXm1Filled && meHFEMFracPlus_BXm2BXm1Filled ->getRootObject()) meHFEMFracPlus_BXm2BXm1Filled ->Fill((*pfJets)[ijet].HFEMEnergyFraction());
3423  }
3424  }*/
3425  if (techTriggerResultBx0 && techTriggerResultBxF) {
3426  meEta_BXm1Filled = map_of_MEs[DirName + "/" + "Eta_BXm1Filled"];
3427  if (meEta_BXm1Filled && meEta_BXm1Filled->getRootObject())
3428  meEta_BXm1Filled->Fill((*pfJets)[ijet].eta());
3429  if (fabs(correctedJet.eta()) <= 1.3) {
3430  mePhFracBarrel_BXm1Filled = map_of_MEs[DirName + "/" + "PhFracBarrel_BXm1Filled"];
3431  if (mePhFracBarrel_BXm1Filled && mePhFracBarrel_BXm1Filled->getRootObject())
3432  mePhFracBarrel_BXm1Filled->Fill((*pfJets)[ijet].photonEnergyFraction());
3433  meNHFracBarrel_BXm1Filled = map_of_MEs[DirName + "/" + "NHFracBarrel_BXm1Filled"];
3434  if (meNHFracBarrel_BXm1Filled && meNHFracBarrel_BXm1Filled->getRootObject())
3435  meNHFracBarrel_BXm1Filled->Fill((*pfJets)[ijet].neutralHadronEnergyFraction());
3436  meCHFracBarrel_BXm1Filled = map_of_MEs[DirName + "/" + "CHFracBarrel_BXm1Filled"];
3437  if (meCHFracBarrel_BXm1Filled && meCHFracBarrel_BXm1Filled->getRootObject())
3438  meCHFracBarrel_BXm1Filled->Fill((*pfJets)[ijet].chargedHadronEnergyFraction());
3439  mePtBarrel_BXm1Filled = map_of_MEs[DirName + "/" + "PtBarrel_BXm1Filled"];
3440  if (mePtBarrel_BXm1Filled && mePtBarrel_BXm1Filled->getRootObject())
3441  mePtBarrel_BXm1Filled->Fill((*pfJets)[ijet].pt());
3442  } else if (correctedJet.eta() > -3.0 && correctedJet.eta() <= -1.3) {
3443  mePhFracEndCapMinus_BXm1Filled = map_of_MEs[DirName + "/" + "PhFracEndCapMinus_BXm1Filled"];
3444  if (mePhFracEndCapMinus_BXm1Filled && mePhFracEndCapMinus_BXm1Filled->getRootObject())
3445  mePhFracEndCapMinus_BXm1Filled->Fill((*pfJets)[ijet].photonEnergyFraction());
3446  meNHFracEndCapMinus_BXm1Filled = map_of_MEs[DirName + "/" + "NHFracEndCapMinus_BXm1Filled"];
3447  if (meNHFracEndCapMinus_BXm1Filled && meNHFracEndCapMinus_BXm1Filled->getRootObject())
3448  meNHFracEndCapMinus_BXm1Filled->Fill((*pfJets)[ijet].neutralHadronEnergyFraction());
3449  meCHFracEndCapMinus_BXm1Filled = map_of_MEs[DirName + "/" + "CHFracEndCapMinus_BXm1Filled"];
3450  if (meCHFracEndCapMinus_BXm1Filled && meCHFracEndCapMinus_BXm1Filled->getRootObject())
3451  meCHFracEndCapMinus_BXm1Filled->Fill((*pfJets)[ijet].chargedHadronEnergyFraction());
3452  mePtEndCapMinus_BXm1Filled = map_of_MEs[DirName + "/" + "PtEndCapMinus_BXm1Filled"];
3453  if (mePtEndCapMinus_BXm1Filled && mePtEndCapMinus_BXm1Filled->getRootObject())
3454  mePtEndCapMinus_BXm1Filled->Fill((*pfJets)[ijet].pt());
3455  } else if (correctedJet.eta() >= 1.3 && correctedJet.eta() < 3.0) {
3456  mePhFracEndCapPlus_BXm1Filled = map_of_MEs[DirName + "/" + "PhFracEndCapPlus_BXm1Filled"];
3457  if (mePhFracEndCapPlus_BXm1Filled && mePhFracEndCapPlus_BXm1Filled->getRootObject())
3458  mePhFracEndCapPlus_BXm1Filled->Fill((*pfJets)[ijet].photonEnergyFraction());
3459  meNHFracEndCapPlus_BXm1Filled = map_of_MEs[DirName + "/" + "NHFracEndCapPlus_BXm1Filled"];
3460  if (meNHFracEndCapPlus_BXm1Filled && meNHFracEndCapPlus_BXm1Filled->getRootObject())
3461  meNHFracEndCapPlus_BXm1Filled->Fill((*pfJets)[ijet].neutralHadronEnergyFraction());
3462  meCHFracEndCapPlus_BXm1Filled = map_of_MEs[DirName + "/" + "CHFracEndCapPlus_BXm1Filled"];
3463  if (meCHFracEndCapPlus_BXm1Filled && meCHFracEndCapPlus_BXm1Filled->getRootObject())
3464  meCHFracEndCapPlus_BXm1Filled->Fill((*pfJets)[ijet].chargedHadronEnergyFraction());
3465  mePtEndCapPlus_BXm1Filled = map_of_MEs[DirName + "/" + "PtEndCapPlus_BXm1Filled"];
3466  if (mePtEndCapPlus_BXm1Filled && mePtEndCapPlus_BXm1Filled->getRootObject())
3467  mePtEndCapPlus_BXm1Filled->Fill((*pfJets)[ijet].pt());
3468  } else if (correctedJet.eta() > -5.0 && correctedJet.eta() <= -3.0) {
3469  mePtForwardMinus_BXm1Filled = map_of_MEs[DirName + "/" + "PtForwardMinus_BXm1Filled"];
3470  if (mePtForwardMinus_BXm1Filled && mePtForwardMinus_BXm1Filled->getRootObject())
3471  mePtForwardMinus_BXm1Filled->Fill((*pfJets)[ijet].pt());
3472  meHFHFracMinus_BXm1Filled = map_of_MEs[DirName + "/" + "HFHFracMinus_BXm1Filled"];
3473  if (meHFHFracMinus_BXm1Filled && meHFHFracMinus_BXm1Filled->getRootObject())
3474  meHFHFracMinus_BXm1Filled->Fill((*pfJets)[ijet].HFHadronEnergyFraction());
3475  meHFEMFracMinus_BXm1Filled = map_of_MEs[DirName + "/" + "HFEMFracMinus_BXm1Filled"];
3476  if (meHFEMFracMinus_BXm1Filled && meHFEMFracMinus_BXm1Filled->getRootObject())
3477  meHFEMFracMinus_BXm1Filled->Fill((*pfJets)[ijet].HFEMEnergyFraction());
3478  } else if (correctedJet.eta() >= 3.0 && correctedJet.eta() < 5.0) {
3479  mePtForwardPlus_BXm1Filled = map_of_MEs[DirName + "/" + "PtForwardPlus_BXm1Filled"];
3480  if (mePtForwardPlus_BXm1Filled && mePtForwardPlus_BXm1Filled->getRootObject())
3481  mePtForwardPlus_BXm1Filled->Fill((*pfJets)[ijet].pt());
3482  meHFHFracPlus_BXm1Filled = map_of_MEs[DirName + "/" + "HFHFracPlus_BXm1Filled"];
3483  if (meHFHFracPlus_BXm1Filled && meHFHFracPlus_BXm1Filled->getRootObject())
3484  meHFHFracPlus_BXm1Filled->Fill((*pfJets)[ijet].HFHadronEnergyFraction());
3485  meHFEMFracPlus_BXm1Filled = map_of_MEs[DirName + "/" + "HFEMFracPlus_BXm1Filled"];
3486  if (meHFEMFracPlus_BXm1Filled && meHFEMFracPlus_BXm1Filled->getRootObject())
3487  meHFEMFracPlus_BXm1Filled->Fill((*pfJets)[ijet].HFEMEnergyFraction());
3488  }
3489  } /*
3490  if(techTriggerResultBx0 && !techTriggerResultBxE && !techTriggerResultBxF){
3491  meEta_BXm2BXm1Empty = map_of_MEs[DirName+"/"+"Eta_BXm2BXm1Empty"]; if ( meEta_BXm2BXm1Empty && meEta_BXm2BXm1Empty ->getRootObject()) meEta_BXm2BXm1Empty ->Fill((*pfJets)[ijet].eta());
3492  if(fabs(correctedJet.eta()) <= 1.3) {
3493  mePhFracBarrel_BXm2BXm1Empty = map_of_MEs[DirName+"/"+"PhFracBarrel_BXm2BXm1Empty"]; if ( mePhFracBarrel_BXm2BXm1Empty && mePhFracBarrel_BXm2BXm1Empty ->getRootObject()) mePhFracBarrel_BXm2BXm1Empty ->Fill((*pfJets)[ijet].photonEnergyFraction());
3494  meNHFracBarrel_BXm2BXm1Empty = map_of_MEs[DirName+"/"+"NHFracBarrel_BXm2BXm1Empty"]; if ( meNHFracBarrel_BXm2BXm1Empty && meNHFracBarrel_BXm2BXm1Empty ->getRootObject()) meNHFracBarrel_BXm2BXm1Empty ->Fill((*pfJets)[ijet].neutralHadronEnergyFraction());
3495  meCHFracBarrel_BXm2BXm1Empty = map_of_MEs[DirName+"/"+"CHFracBarrel_BXm2BXm1Empty"]; if ( meCHFracBarrel_BXm2BXm1Empty && meCHFracBarrel_BXm2BXm1Empty ->getRootObject()) meCHFracBarrel_BXm2BXm1Empty ->Fill((*pfJets)[ijet].chargedHadronEnergyFraction());
3496  mePtBarrel_BXm2BXm1Empty = map_of_MEs[DirName+"/"+"PtBarrel_BXm2BXm1Empty"]; if ( mePtBarrel_BXm2BXm1Empty && mePtBarrel_BXm2BXm1Empty ->getRootObject()) mePtBarrel_BXm2BXm1Empty ->Fill((*pfJets)[ijet].pt());
3497  }else if (correctedJet.eta() > -3.0 && correctedJet.eta() <= -1.3) {
3498  mePhFracEndCapMinus_BXm2BXm1Empty = map_of_MEs[DirName+"/"+"PhFracEndCapMinus_BXm2BXm1Empty"]; if ( mePhFracEndCapMinus_BXm2BXm1Empty && mePhFracEndCapMinus_BXm2BXm1Empty ->getRootObject()) mePhFracEndCapMinus_BXm2BXm1Empty ->Fill((*pfJets)[ijet].photonEnergyFraction());
3499  meNHFracEndCapMinus_BXm2BXm1Empty = map_of_MEs[DirName+"/"+"NHFracEndCapMinus_BXm2BXm1Empty"]; if ( meNHFracEndCapMinus_BXm2BXm1Empty && meNHFracEndCapMinus_BXm2BXm1Empty ->getRootObject()) meNHFracEndCapMinus_BXm2BXm1Empty ->Fill((*pfJets)[ijet].neutralHadronEnergyFraction());
3500  meCHFracEndCapMinus_BXm2BXm1Empty = map_of_MEs[DirName+"/"+"CHFracEndCapMinus_BXm2BXm1Empty"]; if ( meCHFracEndCapMinus_BXm2BXm1Empty && meCHFracEndCapMinus_BXm2BXm1Empty ->getRootObject()) meCHFracEndCapMinus_BXm2BXm1Empty ->Fill((*pfJets)[ijet].chargedHadronEnergyFraction());
3501  mePtEndCapMinus_BXm2BXm1Empty = map_of_MEs[DirName+"/"+"PtEndCapMinus_BXm2BXm1Empty"]; if ( mePtEndCapMinus_BXm2BXm1Empty && mePtEndCapMinus_BXm2BXm1Empty ->getRootObject()) mePtEndCapMinus_BXm2BXm1Empty ->Fill((*pfJets)[ijet].pt());
3502  }else if (correctedJet.eta() >= 1.3 && correctedJet.eta() < 3.0) {
3503  mePhFracEndCapPlus_BXm2BXm1Empty = map_of_MEs[DirName+"/"+"PhFracEndCapPlus_BXm2BXm1Empty"]; if ( mePhFracEndCapPlus_BXm2BXm1Empty && mePhFracEndCapPlus_BXm2BXm1Empty ->getRootObject()) mePhFracEndCapPlus_BXm2BXm1Empty ->Fill((*pfJets)[ijet].photonEnergyFraction());
3504  meNHFracEndCapPlus_BXm2BXm1Empty = map_of_MEs[DirName+"/"+"NHFracEndCapPlus_BXm2BXm1Empty"]; if ( meNHFracEndCapPlus_BXm2BXm1Empty && meNHFracEndCapPlus_BXm2BXm1Empty ->getRootObject()) meNHFracEndCapPlus_BXm2BXm1Empty ->Fill((*pfJets)[ijet].neutralHadronEnergyFraction());
3505  meCHFracEndCapPlus_BXm2BXm1Empty = map_of_MEs[DirName+"/"+"CHFracEndCapPlus_BXm2BXm1Empty"]; if ( meCHFracEndCapPlus_BXm2BXm1Empty && meCHFracEndCapPlus_BXm2BXm1Empty ->getRootObject()) meCHFracEndCapPlus_BXm2BXm1Empty ->Fill((*pfJets)[ijet].chargedHadronEnergyFraction());
3506  mePtEndCapPlus_BXm2BXm1Empty = map_of_MEs[DirName+"/"+"PtEndCapPlus_BXm2BXm1Empty"]; if ( mePtEndCapPlus_BXm2BXm1Empty && mePtEndCapPlus_BXm2BXm1Empty ->getRootObject()) mePtEndCapPlus_BXm2BXm1Empty ->Fill((*pfJets)[ijet].pt());
3507  }else if (correctedJet.eta() > -5.0 && correctedJet.eta() <= -3.0) {
3508  mePtForwardMinus_BXm2BXm1Empty = map_of_MEs[DirName+"/"+"PtForwardMinus_BXm2BXm1Empty"]; if ( mePtForwardMinus_BXm2BXm1Empty && mePtForwardMinus_BXm2BXm1Empty ->getRootObject()) mePtForwardMinus_BXm2BXm1Empty ->Fill((*pfJets)[ijet].pt());
3509  meHFHFracMinus_BXm2BXm1Empty = map_of_MEs[DirName+"/"+"HFHFracMinus_BXm2BXm1Empty"]; if ( meHFHFracMinus_BXm2BXm1Empty && meHFHFracMinus_BXm2BXm1Empty ->getRootObject()) meHFHFracMinus_BXm2BXm1Empty ->Fill((*pfJets)[ijet].HFHadronEnergyFraction());
3510  meHFEMFracMinus_BXm2BXm1Empty = map_of_MEs[DirName+"/"+"HFEMFracMinus_BXm2BXm1Empty"]; if ( meHFEMFracMinus_BXm2BXm1Empty && meHFEMFracMinus_BXm2BXm1Empty ->getRootObject()) meHFEMFracMinus_BXm2BXm1Empty ->Fill((*pfJets)[ijet].HFEMEnergyFraction());
3511  }else if (correctedJet.eta() >= 3.0 && correctedJet.eta() < 5.0) {
3512  mePtForwardPlus_BXm2BXm1Empty = map_of_MEs[DirName+"/"+"PtForwardPlus_BXm2BXm1Empty"]; if ( mePtForwardPlus_BXm2BXm1Empty && mePtForwardPlus_BXm2BXm1Empty ->getRootObject()) mePtForwardPlus_BXm2BXm1Empty ->Fill((*pfJets)[ijet].pt());
3513  meHFHFracPlus_BXm2BXm1Empty = map_of_MEs[DirName+"/"+"HFHFracPlus_BXm2BXm1Empty"]; if ( meHFHFracPlus_BXm2BXm1Empty && meHFHFracPlus_BXm2BXm1Empty ->getRootObject()) meHFHFracPlus_BXm2BXm1Empty ->Fill((*pfJets)[ijet].HFHadronEnergyFraction());
3514  meHFEMFracPlus_BXm2BXm1Empty = map_of_MEs[DirName+"/"+"HFEMFracPlus_BXm2BXm1Empty"]; if ( meHFEMFracPlus_BXm2BXm1Empty && meHFEMFracPlus_BXm2BXm1Empty ->getRootObject()) meHFEMFracPlus_BXm2BXm1Empty ->Fill((*pfJets)[ijet].HFEMEnergyFraction());
3515  }
3516  }*/
3517  if (techTriggerResultBx0 && !techTriggerResultBxF) {
3518  meEta_BXm1Empty = map_of_MEs[DirName + "/" + "Eta_BXm1Empty"];
3519  if (meEta_BXm1Empty && meEta_BXm1Empty->getRootObject())
3520  meEta_BXm1Empty->Fill((*pfJets)[ijet].eta());
3521  if (fabs(correctedJet.eta()) <= 1.3) {
3522  mePhFracBarrel_BXm1Empty = map_of_MEs[DirName + "/" + "PhFracBarrel_BXm1Empty"];
3523  if (mePhFracBarrel_BXm1Empty && mePhFracBarrel_BXm1Empty->getRootObject())
3524  mePhFracBarrel_BXm1Empty->Fill((*pfJets)[ijet].photonEnergyFraction());
3525  meNHFracBarrel_BXm1Empty = map_of_MEs[DirName + "/" + "NHFracBarrel_BXm1Empty"];
3526  if (meNHFracBarrel_BXm1Empty && meNHFracBarrel_BXm1Empty->getRootObject())
3527  meNHFracBarrel_BXm1Empty->Fill((*pfJets)[ijet].neutralHadronEnergyFraction());
3528  meCHFracBarrel_BXm1Empty = map_of_MEs[DirName + "/" + "CHFracBarrel_BXm1Empty"];
3529  if (meCHFracBarrel_BXm1Empty && meCHFracBarrel_BXm1Empty->getRootObject())
3530  meCHFracBarrel_BXm1Empty->Fill((*pfJets)[ijet].chargedHadronEnergyFraction());
3531  mePtBarrel_BXm1Empty = map_of_MEs[DirName + "/" + "PtBarrel_BXm1Empty"];
3532  if (mePtBarrel_BXm1Empty && mePtBarrel_BXm1Empty->getRootObject())
3533  mePtBarrel_BXm1Empty->Fill((*pfJets)[ijet].pt());
3534  } else if (correctedJet.eta() > -3.0 && correctedJet.eta() <= -1.3) {
3535  mePhFracEndCapMinus_BXm1Empty = map_of_MEs[DirName + "/" + "PhFracEndCapMinus_BXm1Empty"];
3536  if (mePhFracEndCapMinus_BXm1Empty && mePhFracEndCapMinus_BXm1Empty->getRootObject())
3537  mePhFracEndCapMinus_BXm1Empty->Fill((*pfJets)[ijet].photonEnergyFraction());
3538  meNHFracEndCapMinus_BXm1Empty = map_of_MEs[DirName + "/" + "NHFracEndCapMinus_BXm1Empty"];
3539  if (meNHFracEndCapMinus_BXm1Empty && meNHFracEndCapMinus_BXm1Empty->getRootObject())
3540  meNHFracEndCapMinus_BXm1Empty->Fill((*pfJets)[ijet].neutralHadronEnergyFraction());
3541  meCHFracEndCapMinus_BXm1Empty = map_of_MEs[DirName + "/" + "CHFracEndCapMinus_BXm1Empty"];
3542  if (meCHFracEndCapMinus_BXm1Empty && meCHFracEndCapMinus_BXm1Empty->getRootObject())
3543  meCHFracEndCapMinus_BXm1Empty->Fill((*pfJets)[ijet].chargedHadronEnergyFraction());
3544  mePtEndCapMinus_BXm1Empty = map_of_MEs[DirName + "/" + "PtEndCapMinus_BXm1Empty"];
3545  if (mePtEndCapMinus_BXm1Empty && mePtEndCapMinus_BXm1Empty->getRootObject())
3546  mePtEndCapMinus_BXm1Empty->Fill((*pfJets)[ijet].pt());
3547  } else if (correctedJet.eta() >= 1.3 && correctedJet.eta() < 3.0) {
3548  mePhFracEndCapPlus_BXm1Empty = map_of_MEs[DirName + "/" + "PhFracEndCapPlus_BXm1Empty"];
3549  if (mePhFracEndCapPlus_BXm1Empty && mePhFracEndCapPlus_BXm1Empty->getRootObject())
3550  mePhFracEndCapPlus_BXm1Empty->Fill((*pfJets)[ijet].photonEnergyFraction());
3551  meNHFracEndCapPlus_BXm1Empty = map_of_MEs[DirName + "/" + "NHFracEndCapPlus_BXm1Empty"];
3552  if (meNHFracEndCapPlus_BXm1Empty && meNHFracEndCapPlus_BXm1Empty->getRootObject())
3553  meNHFracEndCapPlus_BXm1Empty->Fill((*pfJets)[ijet].neutralHadronEnergyFraction());
3554  meCHFracEndCapPlus_BXm1Empty = map_of_MEs[DirName + "/" + "CHFracEndCapPlus_BXm1Empty"];
3555  if (meCHFracEndCapPlus_BXm1Empty && meCHFracEndCapPlus_BXm1Empty->getRootObject())
3556  meCHFracEndCapPlus_BXm1Empty->Fill((*pfJets)[ijet].chargedHadronEnergyFraction());
3557  mePtEndCapPlus_BXm1Empty = map_of_MEs[DirName + "/" + "PtEndCapPlus_BXm1Empty"];
3558  if (mePtEndCapPlus_BXm1Empty && mePtEndCapPlus_BXm1Empty->getRootObject())
3559  mePtEndCapPlus_BXm1Empty->Fill((*pfJets)[ijet].pt());
3560  } else if (correctedJet.eta() > -5.0 && correctedJet.eta() <= -3.0) {
3561  mePtForwardMinus_BXm1Empty = map_of_MEs[DirName + "/" + "PtForwardMinus_BXm1Empty"];
3562  if (mePtForwardMinus_BXm1Empty && mePtForwardMinus_BXm1Empty->getRootObject())
3563  mePtForwardMinus_BXm1Empty->Fill((*pfJets)[ijet].pt());
3564  meHFHFracMinus_BXm1Empty = map_of_MEs[DirName + "/" + "HFHFracMinus_BXm1Empty"];
3565  if (meHFHFracMinus_BXm1Empty && meHFHFracMinus_BXm1Empty->getRootObject())
3566  meHFHFracMinus_BXm1Empty->Fill((*pfJets)[ijet].HFHadronEnergyFraction());
3567  meHFEMFracMinus_BXm1Empty = map_of_MEs[DirName + "/" + "HFEMFracMinus_BXm1Empty"];
3568  if (meHFEMFracMinus_BXm1Empty && meHFEMFracMinus_BXm1Empty->getRootObject())
3569  meHFEMFracMinus_BXm1Empty->Fill((*pfJets)[ijet].HFEMEnergyFraction());
3570  } else if (correctedJet.eta() >= 3.0 && correctedJet.eta() < 5.0) {
3571  mePtForwardPlus_BXm1Empty = map_of_MEs[DirName + "/" + "PtForwardPlus_BXm1Empty"];
3572  if (mePtForwardPlus_BXm1Empty && mePtForwardPlus_BXm1Empty->getRootObject())
3573  mePtForwardPlus_BXm1Empty->Fill((*pfJets)[ijet].pt());
3574  meHFHFracPlus_BXm1Empty = map_of_MEs[DirName + "/" + "HFHFracPlus_BXm1Empty"];
3575  if (meHFHFracPlus_BXm1Empty && meHFHFracPlus_BXm1Empty->getRootObject())
3576  meHFHFracPlus_BXm1Empty->Fill((*pfJets)[ijet].HFHadronEnergyFraction());
3577  meHFEMFracPlus_BXm1Empty = map_of_MEs[DirName + "/" + "HFEMFracPlus_BXm1Empty"];
3578  if (meHFEMFracPlus_BXm1Empty && meHFEMFracPlus_BXm1Empty->getRootObject())
3579  meHFEMFracPlus_BXm1Empty->Fill((*pfJets)[ijet].HFEMEnergyFraction());
3580  }
3581  }
3582  mChargedHadronEnergy = map_of_MEs[DirName + "/" + "ChargedHadronEnergy"];
3583  if (mChargedHadronEnergy && mChargedHadronEnergy->getRootObject())
3584  mChargedHadronEnergy->Fill((*pfJets)[ijet].chargedHadronEnergy());
3585  mNeutralHadronEnergy = map_of_MEs[DirName + "/" + "NeutralHadronEnergy"];
3586  if (mNeutralHadronEnergy && mNeutralHadronEnergy->getRootObject())
3587  mNeutralHadronEnergy->Fill((*pfJets)[ijet].neutralHadronEnergy());
3588  mChargedEmEnergy = map_of_MEs[DirName + "/" + "ChargedEmEnergy"];
3589  if (mChargedEmEnergy && mChargedEmEnergy->getRootObject())
3590  mChargedEmEnergy->Fill((*pfJets)[ijet].chargedEmEnergy());
3591  mChargedMuEnergy = map_of_MEs[DirName + "/" + "ChargedMuEnergy"];
3592  if (mChargedMuEnergy && mChargedMuEnergy->getRootObject())
3593  mChargedMuEnergy->Fill((*pfJets)[ijet].chargedMuEnergy());
3594  mNeutralEmEnergy = map_of_MEs[DirName + "/" + "NeutralEmEnergy"];
3595  if (mNeutralEmEnergy && mNeutralEmEnergy->getRootObject())
3596  mNeutralEmEnergy->Fill((*pfJets)[ijet].neutralEmEnergy());
3597  mChargedMultiplicity = map_of_MEs[DirName + "/" + "ChargedMultiplicity"];
3598  if (mChargedMultiplicity && mChargedMultiplicity->getRootObject())
3599  mChargedMultiplicity->Fill((*pfJets)[ijet].chargedMultiplicity());
3600  mNeutralMultiplicity = map_of_MEs[DirName + "/" + "NeutralMultiplicity"];
3601  if (mNeutralMultiplicity && mNeutralMultiplicity->getRootObject())
3602  mNeutralMultiplicity->Fill((*pfJets)[ijet].neutralMultiplicity());
3603  mMuonMultiplicity = map_of_MEs[DirName + "/" + "MuonMultiplicity"];
3604  if (mMuonMultiplicity && mMuonMultiplicity->getRootObject())
3605  mMuonMultiplicity->Fill((*pfJets)[ijet].muonMultiplicity());
3606  //_______________________________________________________
3607  mNeutralFraction = map_of_MEs[DirName + "/" + "NeutralConstituentsFraction"];
3608  if (mNeutralFraction && mNeutralFraction->getRootObject())
3609  mNeutralFraction->Fill((double)(*pfJets)[ijet].neutralMultiplicity() /
3610  (double)(*pfJets)[ijet].nConstituents());
3611  mChargedHadronEnergy_profile = map_of_MEs[DirName + "/" + "ChargedHadronEnergy_profile"];
3612  if (mChargedHadronEnergy_profile && mChargedHadronEnergy_profile->getRootObject())
3613  mChargedHadronEnergy_profile->Fill(numPV, (*pfJets)[ijet].chargedHadronEnergy());
3614  mNeutralHadronEnergy_profile = map_of_MEs[DirName + "/" + "NeutralHadronEnergy_profile"];
3615  if (mNeutralHadronEnergy_profile && mNeutralHadronEnergy_profile->getRootObject())
3616  mNeutralHadronEnergy_profile->Fill(numPV, (*pfJets)[ijet].neutralHadronEnergy());
3617  mChargedEmEnergy_profile = map_of_MEs[DirName + "/" + "ChargedEmEnergy_profile"];
3618  if (mChargedEmEnergy_profile && mChargedEmEnergy_profile->getRootObject())
3619  mChargedEmEnergy_profile->Fill(numPV, (*pfJets)[ijet].chargedEmEnergy());
3620  mChargedMuEnergy_profile = map_of_MEs[DirName + "/" + "ChargedMuEnergy_profile"];
3621  if (mChargedMuEnergy_profile && mChargedMuEnergy_profile->getRootObject())
3622  mChargedMuEnergy_profile->Fill(numPV, (*pfJets)[ijet].chargedMuEnergy());
3623  mNeutralEmEnergy_profile = map_of_MEs[DirName + "/" + "NeutralEmEnergy_profile"];
3624  if (mNeutralEmEnergy_profile && mNeutralEmEnergy_profile->getRootObject())
3625  mNeutralEmEnergy_profile->Fill(numPV, (*pfJets)[ijet].neutralEmEnergy());
3626  mChargedMultiplicity_profile = map_of_MEs[DirName + "/" + "ChargedMultiplicity_profile"];
3627  if (mChargedMultiplicity_profile && mChargedMultiplicity_profile->getRootObject())
3628  mChargedMultiplicity_profile->Fill(numPV, (*pfJets)[ijet].chargedMultiplicity());
3629  mNeutralMultiplicity_profile = map_of_MEs[DirName + "/" + "NeutralMultiplicity_profile"];
3630  if (mNeutralMultiplicity_profile && mNeutralMultiplicity_profile->getRootObject())
3631  mNeutralMultiplicity_profile->Fill(numPV, (*pfJets)[ijet].neutralMultiplicity());
3632  mMuonMultiplicity_profile = map_of_MEs[DirName + "/" + "MuonMultiplicity_profile"];
3633  if (mMuonMultiplicity_profile && mMuonMultiplicity_profile->getRootObject())
3634  mMuonMultiplicity_profile->Fill(numPV, (*pfJets)[ijet].muonMultiplicity());
3635  } //cleaned PFJets
3636  } //PFJet specific loop
3637  //IDs have been defined by now
3638  //check here already for ordering of jets -> if we choose later to soften pt-thresholds for physics selections
3639  //compared to the default jet histograms
3640  if (pass_Z_selection) { //if Z selection not passed, don't need to find out of muons and Jets are overlapping
3641  if (deltaR((*Muons)[mu_index0].eta(), (*Muons)[mu_index0].phi(), correctedJet.eta(), correctedJet.phi()) > 0.2 &&
3642  deltaR((*Muons)[mu_index1].eta(), (*Muons)[mu_index1].phi(), correctedJet.eta(), correctedJet.phi()) > 0.2) {
3643  if (correctedJet.pt() > pt1_mu_vetoed) {
3644  pt2_mu_vetoed = pt1_mu_vetoed;
3645  ind2_mu_vetoed = ind1_mu_vetoed;
3646  cleaned_second_jet_mu_vetoed = cleaned_first_jet_mu_vetoed;
3647  pt1_mu_vetoed = correctedJet.pt();
3648  ind1_mu_vetoed = ijet;
3649  cleaned_first_jet_mu_vetoed = JetIDWPU;
3650  } else if (correctedJet.pt() > pt2_mu_vetoed) {
3651  pt2_mu_vetoed = correctedJet.pt();
3652  ind2_mu_vetoed = ijet;
3653  cleaned_second_jet_mu_vetoed = JetIDWPU;
3654  }
3655  }
3656  }
3657 
3658  if (correctedJet.pt() > pt1) {
3659  pt3 = pt2;
3660  ind3 = ind2;
3661  //cleaned_third_jet=cleaned_second_jet;
3662  pt2 = pt1;
3663  ind2 = ind1;
3664  cleaned_second_jet = cleaned_first_jet;
3665  pt1 = correctedJet.pt();
3666  ind1 = ijet;
3667  cleaned_first_jet = JetIDWPU;
3668  } else if (correctedJet.pt() > pt2) {
3669  pt3 = pt2;
3670  ind3 = ind2;
3671  //cleaned_third_jet=cleaned_second_jet;
3672  pt2 = correctedJet.pt();
3673  ind2 = ijet;
3674  cleaned_second_jet = JetIDWPU;
3675  } else if (correctedJet.pt() > pt3) {
3676  pt3 = correctedJet.pt();
3677  ind3 = ijet;
3678  //cleaned_third_jet=JetIDWPU;
3679  }
3680  if (!pass_corrected) {
3681  continue;
3682  }
3683  //after jettype specific variables are filled -> perform histograms for all jets
3684  //fill JetID efficiencies if uncleaned selection is chosen
3685  if (!runcosmics_ && pass_corrected) {
3686  if (jetpassid) {
3687  mLooseJIDPassFractionVSeta = map_of_MEs[DirName + "/" + "JetIDPassFractionVSeta"];
3688  if (mLooseJIDPassFractionVSeta && mLooseJIDPassFractionVSeta->getRootObject())
3689  mLooseJIDPassFractionVSeta->Fill(correctedJet.eta(), 1.);
3690  mLooseJIDPassFractionVSpt = map_of_MEs[DirName + "/" + "JetIDPassFractionVSpt"];
3691  if (mLooseJIDPassFractionVSpt && mLooseJIDPassFractionVSpt->getRootObject())
3692  mLooseJIDPassFractionVSpt->Fill(correctedJet.pt(), 1.);
3693  if (fabs(correctedJet.eta()) < 3.0) {
3694  mLooseJIDPassFractionVSptNoHF = map_of_MEs[DirName + "/" + "JetIDPassFractionVSptNoHF"];
3695  if (mLooseJIDPassFractionVSptNoHF && mLooseJIDPassFractionVSptNoHF->getRootObject())
3696  mLooseJIDPassFractionVSptNoHF->Fill(correctedJet.pt(), 1.);
3697  }
3698  } else {
3699  mLooseJIDPassFractionVSeta = map_of_MEs[DirName + "/" + "JetIDPassFractionVSeta"];
3700  if (mLooseJIDPassFractionVSeta && mLooseJIDPassFractionVSeta->getRootObject())
3701  mLooseJIDPassFractionVSeta->Fill(correctedJet.eta(), 0.);
3702  mLooseJIDPassFractionVSpt = map_of_MEs[DirName + "/" + "JetIDPassFractionVSpt"];
3703  if (mLooseJIDPassFractionVSpt && mLooseJIDPassFractionVSpt->getRootObject())
3704  mLooseJIDPassFractionVSpt->Fill(correctedJet.pt(), 0.);
3705  if (fabs(correctedJet.eta()) < 3.0) {
3706  mLooseJIDPassFractionVSptNoHF = map_of_MEs[DirName + "/" + "JetIDPassFractionVSptNoHF"];
3707  if (mLooseJIDPassFractionVSptNoHF && mLooseJIDPassFractionVSptNoHF->getRootObject())
3708  mLooseJIDPassFractionVSptNoHF->Fill(correctedJet.pt(), 0.);
3709  }
3710  }
3711  }
3712  //here we so far consider calojets ->check for PFJets and JPT jets again
3713  if (Thiscleaned && pass_corrected) { //might be softer than loose jet ID
3714  numofjets++;
3715  if (isCaloJet_) {
3716  jetME = map_of_MEs[DirName + "/" + "jetReco"];
3717  if (jetME && jetME->getRootObject())
3718  jetME->Fill(1);
3719  mJetEnergyCorr = map_of_MEs[DirName + "/" + "JetEnergyCorr"];
3720  if (mJetEnergyCorr && mJetEnergyCorr->getRootObject())
3721  mJetEnergyCorr->Fill(correctedJet.pt() / (*caloJets)[ijet].pt());
3722  mJetEnergyCorrVSEta = map_of_MEs[DirName + "/" + "JetEnergyCorrVSEta"];
3723  if (mJetEnergyCorrVSEta && mJetEnergyCorrVSEta->getRootObject())
3724  mJetEnergyCorrVSEta->Fill(correctedJet.eta(), correctedJet.pt() / (*caloJets)[ijet].pt());
3725  mJetEnergyCorrVSPt = map_of_MEs[DirName + "/" + "JetEnergyCorrVSPt"];
3726  if (mJetEnergyCorrVSPt && mJetEnergyCorrVSPt->getRootObject())
3727  mJetEnergyCorrVSPt->Fill(correctedJet.pt(), correctedJet.pt() / (*caloJets)[ijet].pt());
3728  }
3729  if (isPFJet_) {
3730  jetME = map_of_MEs[DirName + "/" + "jetReco"];
3731  if (jetME && jetME->getRootObject())
3732  jetME->Fill(2);
3733  mJetEnergyCorr = map_of_MEs[DirName + "/" + "JetEnergyCorr"];
3734  if (mJetEnergyCorr && mJetEnergyCorr->getRootObject())
3735  mJetEnergyCorr->Fill(correctedJet.pt() / (*pfJets)[ijet].pt());
3736  mJetEnergyCorrVSEta = map_of_MEs[DirName + "/" + "JetEnergyCorrVSEta"];
3737  if (mJetEnergyCorrVSEta && mJetEnergyCorrVSEta->getRootObject())
3738  mJetEnergyCorrVSEta->Fill(correctedJet.eta(), correctedJet.pt() / (*pfJets)[ijet].pt());
3739  mJetEnergyCorrVSPt = map_of_MEs[DirName + "/" + "JetEnergyCorrVSPt"];
3740  if (mJetEnergyCorrVSPt && mJetEnergyCorrVSPt->getRootObject())
3741  mJetEnergyCorrVSPt->Fill(correctedJet.pt(), correctedJet.pt() / (*pfJets)[ijet].pt());
3742  }
3743  if (isMiniAODJet_) {
3744  jetME = map_of_MEs[DirName + "/" + "jetReco"];
3745  if (jetME && jetME->getRootObject())
3746  jetME->Fill(4);
3747  mJetEnergyCorr = map_of_MEs[DirName + "/" + "JetEnergyCorr"];
3748  if (mJetEnergyCorr && mJetEnergyCorr->getRootObject())
3749  mJetEnergyCorr->Fill(1. / (*patJets)[ijet].jecFactor("Uncorrected"));
3750  mJetEnergyCorrVSEta = map_of_MEs[DirName + "/" + "JetEnergyCorrVSEta"];
3751  if (mJetEnergyCorrVSEta && mJetEnergyCorrVSEta->getRootObject())
3752  mJetEnergyCorrVSEta->Fill(correctedJet.eta(), 1. / (*patJets)[ijet].jecFactor("Uncorrected"));
3753  mJetEnergyCorrVSPt = map_of_MEs[DirName + "/" + "JetEnergyCorrVSPt"];
3754  if (mJetEnergyCorrVSPt && mJetEnergyCorrVSPt->getRootObject())
3755  mJetEnergyCorrVSPt->Fill(correctedJet.pt(), 1. / (*patJets)[ijet].jecFactor("Uncorrected"));
3756  if (filljetsubstruc_) {
3757  //miniaod specific variables, especially for substructure
3758  mSoftDropMass = map_of_MEs[DirName + "/" + "SoftDropMass"];
3759  if (mSoftDropMass && mSoftDropMass->getRootObject() &&
3760  (*patJets)[ijet].hasUserFloat("ak8PFJetsPuppiSoftDropMass"))
3761  mSoftDropMass->Fill((*patJets)[ijet].userFloat("ak8PFJetsPuppiSoftDropMass"));
3762  mPrunedMass = map_of_MEs[DirName + "/" + "PrunedMass"];
3763  mtau2_over_tau1 = map_of_MEs[DirName + "/" + "tau2_over_tau1"];
3764  if (mtau2_over_tau1 && mtau2_over_tau1->getRootObject() &&
3765  ((*patJets)[ijet].hasUserFloat("NjettinessAK8Puppi:tau1") &&
3766  (*patJets)[ijet].hasUserFloat("NjettinessAK8Puppi:tau2")))
3767  mtau2_over_tau1->Fill((*patJets)[ijet].userFloat("NjettinessAK8Puppi:tau2") /
3768  (*patJets)[ijet].userFloat("NjettinessAK8Puppi:tau1"));
3769  mtau3_over_tau2 = map_of_MEs[DirName + "/" + "tau3_over_tau2"];
3770  if (mtau3_over_tau2 && mtau3_over_tau2->getRootObject() &&
3771  ((*patJets)[ijet].hasUserFloat("NjettinessAK8Puppi:tau2") &&
3772  (*patJets)[ijet].hasUserFloat("NjettinessAK8Puppi:tau3")))
3773  mtau3_over_tau2->Fill((*patJets)[ijet].userFloat("NjettinessAK8Puppi:tau3") /
3774  (*patJets)[ijet].userFloat("NjettinessAK8Puppi:tau2"));
3775 
3776  if ((*patJets)[ijet].hasSubjets("SoftDropPuppi")) {
3777  mnSubJetsSoftDrop = map_of_MEs[DirName + "/" + "nSubJets_SoftDrop"];
3778  if (mnSubJetsSoftDrop && mnSubJetsSoftDrop->getRootObject())
3779  mnSubJetsSoftDrop->Fill((*patJets)[ijet].subjets("SoftDropPuppi").size());
3780  }
3781  if ((*patJets)[ijet].hasSubjets("SoftDropPuppi") && !(*patJets)[ijet].subjets("SoftDropPuppi").empty()) {
3782  mSubJet1_SoftDrop_pt = map_of_MEs[DirName + "/" + "SubJet1_SoftDrop_pt"];
3783  if (mSubJet1_SoftDrop_pt && mSubJet1_SoftDrop_pt->getRootObject())
3784  mSubJet1_SoftDrop_pt->Fill((*patJets)[ijet].subjets("SoftDropPuppi")[0]->pt());
3785  mSubJet1_SoftDrop_eta = map_of_MEs[DirName + "/" + "SubJet1_SoftDrop_eta"];
3786  if (mSubJet1_SoftDrop_eta && mSubJet1_SoftDrop_eta->getRootObject())
3787  mSubJet1_SoftDrop_eta->Fill((*patJets)[ijet].subjets("SoftDropPuppi")[0]->eta());
3788  mSubJet1_SoftDrop_phi = map_of_MEs[DirName + "/" + "SubJet1_SoftDrop_phi"];
3789  if (mSubJet1_SoftDrop_phi && mSubJet1_SoftDrop_phi->getRootObject())
3790  mSubJet1_SoftDrop_phi->Fill((*patJets)[ijet].subjets("SoftDropPuppi")[0]->phi());
3791  mSubJet1_SoftDrop_mass = map_of_MEs[DirName + "/" + "SubJet1_SoftDrop_mass"];
3792  if (mSubJet1_SoftDrop_mass && mSubJet1_SoftDrop_mass->getRootObject())
3793  mSubJet1_SoftDrop_mass->Fill((*patJets)[ijet].subjets("SoftDropPuppi")[0]->mass());
3794  if ((*patJets)[ijet].subjets("SoftDropPuppi").size() > 1) {
3795  mSubJet2_SoftDrop_pt = map_of_MEs[DirName + "/" + "SubJet2_SoftDrop_pt"];
3796  if (mSubJet2_SoftDrop_pt && mSubJet2_SoftDrop_pt->getRootObject())
3797  mSubJet2_SoftDrop_pt->Fill((*patJets)[ijet].subjets("SoftDropPuppi")[1]->pt());
3798  mSubJet2_SoftDrop_eta = map_of_MEs[DirName + "/" + "SubJet2_SoftDrop_eta"];
3799  if (mSubJet2_SoftDrop_eta && mSubJet2_SoftDrop_eta->getRootObject())
3800  mSubJet2_SoftDrop_eta->Fill((*patJets)[ijet].subjets("SoftDropPuppi")[1]->eta());
3801  mSubJet2_SoftDrop_phi = map_of_MEs[DirName + "/" + "SubJet2_SoftDrop_phi"];
3802  if (mSubJet2_SoftDrop_phi && mSubJet2_SoftDrop_phi->getRootObject())
3803  mSubJet2_SoftDrop_phi->Fill((*patJets)[ijet].subjets("SoftDropPuppi")[1]->phi());
3804  mSubJet2_SoftDrop_mass = map_of_MEs[DirName + "/" + "SubJet2_SoftDrop_mass"];
3805  if (mSubJet2_SoftDrop_mass && mSubJet2_SoftDrop_mass->getRootObject())
3806  mSubJet2_SoftDrop_mass->Fill((*patJets)[ijet].subjets("SoftDropPuppi")[1]->mass());
3807  }
3808  } //soft drop jets
3809  if ((*patJets)[ijet].pt() > pt_min_boosted_) {
3810  //miniaod specific variables, especially for boosted substructure
3811  mSoftDropMass_boosted = map_of_MEs[DirName + "/" + "SoftDropMass_boosted"];
3812  if (mSoftDropMass_boosted && mSoftDropMass_boosted->getRootObject() &&
3813  (*patJets)[ijet].hasUserFloat("ak8PFJetsPuppiSoftDropMass"))
3814  mSoftDropMass_boosted->Fill((*patJets)[ijet].userFloat("ak8PFJetsPuppiSoftDropMass"));
3815  mPrunedMass_boosted = map_of_MEs[DirName + "/" + "PrunedMass_boosted"];
3816  mtau2_over_tau1_boosted = map_of_MEs[DirName + "/" + "tau2_over_tau1_boosted"];
3817  if (mtau2_over_tau1_boosted && mtau2_over_tau1_boosted->getRootObject() &&
3818  ((*patJets)[ijet].hasUserFloat("NjettinessAK8Puppi:tau1") &&
3819  (*patJets)[ijet].hasUserFloat("NjettinessAK8Puppi:tau2")))
3820  mtau2_over_tau1_boosted->Fill((*patJets)[ijet].userFloat("NjettinessAK8Puppi:tau2") /
3821  (*patJets)[ijet].userFloat("NjettinessAK8Puppi:tau1"));
3822  mtau3_over_tau2_boosted = map_of_MEs[DirName + "/" + "tau3_over_tau2_boosted"];
3823  if (mtau3_over_tau2_boosted && mtau3_over_tau2_boosted->getRootObject() &&
3824  ((*patJets)[ijet].hasUserFloat("NjettinessAK8Puppi:tau2") &&
3825  (*patJets)[ijet].hasUserFloat("NjettinessAK8Puppi:tau3")))
3826  mtau3_over_tau2_boosted->Fill((*patJets)[ijet].userFloat("NjettinessAK8Puppi:tau3") /
3827  (*patJets)[ijet].userFloat("NjettinessAK8Puppi:tau2"));
3828  if ((*patJets)[ijet].hasSubjets("SoftDropPuppi")) {
3829  mnSubJetsSoftDrop_boosted = map_of_MEs[DirName + "/" + "nSubJets_SoftDrop_boosted"];
3830  if (mnSubJetsSoftDrop_boosted && mnSubJetsSoftDrop_boosted->getRootObject())
3831  mnSubJetsSoftDrop_boosted->Fill((*patJets)[ijet].subjets("SoftDropPuppi").size());
3832  }
3833  if ((*patJets)[ijet].hasSubjets("SoftDropPuppi") && !(*patJets)[ijet].subjets("SoftDropPuppi").empty()) {
3834  mSubJet1_SoftDrop_pt_boosted = map_of_MEs[DirName + "/" + "SubJet1_SoftDrop_pt_boosted"];
3835  if (mSubJet1_SoftDrop_pt_boosted && mSubJet1_SoftDrop_pt_boosted->getRootObject())
3836  mSubJet1_SoftDrop_pt_boosted->Fill((*patJets)[ijet].subjets("SoftDropPuppi")[0]->pt());
3837  mSubJet1_SoftDrop_eta_boosted = map_of_MEs[DirName + "/" + "SubJet1_SoftDrop_eta_boosted"];
3838  if (mSubJet1_SoftDrop_eta_boosted && mSubJet1_SoftDrop_eta_boosted->getRootObject())
3839  mSubJet1_SoftDrop_eta_boosted->Fill((*patJets)[ijet].subjets("SoftDropPuppi")[0]->eta());
3840  mSubJet1_SoftDrop_phi_boosted = map_of_MEs[DirName + "/" + "SubJet1_SoftDrop_phi_boosted"];
3841  if (mSubJet1_SoftDrop_phi_boosted && mSubJet1_SoftDrop_phi_boosted->getRootObject())
3842  mSubJet1_SoftDrop_phi_boosted->Fill((*patJets)[ijet].subjets("SoftDropPuppi")[0]->phi());
3843  mSubJet1_SoftDrop_mass_boosted = map_of_MEs[DirName + "/" + "SubJet1_SoftDrop_mass_boosted"];
3844  if (mSubJet1_SoftDrop_mass_boosted && mSubJet1_SoftDrop_mass_boosted->getRootObject())
3845  mSubJet1_SoftDrop_mass_boosted->Fill((*patJets)[ijet].subjets("SoftDropPuppi")[0]->mass());
3846  if ((*patJets)[ijet].subjets("SoftDropPuppi").size() > 1) {
3847  mSubJet2_SoftDrop_pt_boosted = map_of_MEs[DirName + "/" + "SubJet2_SoftDrop_pt_boosted"];
3848  if (mSubJet2_SoftDrop_pt_boosted && mSubJet2_SoftDrop_pt_boosted->getRootObject())
3849  mSubJet2_SoftDrop_pt_boosted->Fill((*patJets)[ijet].subjets("SoftDropPuppi")[1]->pt());
3850  mSubJet2_SoftDrop_eta_boosted = map_of_MEs[DirName + "/" + "SubJet2_SoftDrop_eta_boosted"];
3851  if (mSubJet2_SoftDrop_eta_boosted && mSubJet2_SoftDrop_eta_boosted->getRootObject())
3852  mSubJet2_SoftDrop_eta_boosted->Fill((*patJets)[ijet].subjets("SoftDropPuppi")[1]->eta());
3853  mSubJet2_SoftDrop_phi_boosted = map_of_MEs[DirName + "/" + "SubJet2_SoftDrop_phi_boosted"];
3854  if (mSubJet2_SoftDrop_phi_boosted && mSubJet2_SoftDrop_phi_boosted->getRootObject())
3855  mSubJet2_SoftDrop_phi_boosted->Fill((*patJets)[ijet].subjets("SoftDropPuppi")[1]->phi());
3856  mSubJet2_SoftDrop_mass_boosted = map_of_MEs[DirName + "/" + "SubJet2_SoftDrop_mass_boosted"];
3857  if (mSubJet2_SoftDrop_mass_boosted && mSubJet2_SoftDrop_mass_boosted->getRootObject())
3858  mSubJet2_SoftDrop_mass_boosted->Fill((*patJets)[ijet].subjets("SoftDropPuppi")[1]->mass());
3859  }
3860  }
3861  } //substructure filling for boosted
3862  } //substructure filling
3863  }
3864  // --- Event passed the low pt jet trigger
3865  if (jetLoPass_ == 1) {
3866  mPhi_Lo = map_of_MEs[DirName + "/" + "Phi_Lo"];
3867  if (mPhi_Lo && mPhi_Lo->getRootObject())
3868  mPhi_Lo->Fill(correctedJet.phi());
3869  mPt_Lo = map_of_MEs[DirName + "/" + "Pt_Lo"];
3870  if (mPt_Lo && mPt_Lo->getRootObject())
3871  mPt_Lo->Fill(correctedJet.pt());
3872  }
3873  // --- Event passed the high pt jet trigger
3874  if (jetHiPass_ == 1 && correctedJet.pt() > 100.) {
3875  mEta_Hi = map_of_MEs[DirName + "/" + "Eta_Hi"];
3876  if (mEta_Hi && mEta_Hi->getRootObject())
3877  mEta_Hi->Fill(correctedJet.eta());
3878  mPhi_Hi = map_of_MEs[DirName + "/" + "Phi_Hi"];
3879  if (mPhi_Hi && mPhi_Hi->getRootObject())
3880  mPhi_Hi->Fill(correctedJet.phi());
3881  mPt_Hi = map_of_MEs[DirName + "/" + "Pt_Hi"];
3882  if (mPt_Hi && mPt_Hi->getRootObject())
3883  mPt_Hi->Fill(correctedJet.pt());
3884  }
3885  mPt = map_of_MEs[DirName + "/" + "Pt"];
3886  if (mPt && mPt->getRootObject())
3887  mPt->Fill(correctedJet.pt());
3888  mPt_1 = map_of_MEs[DirName + "/" + "Pt_1"];
3889  if (mPt_1 && mPt_1->getRootObject())
3890  mPt_1->Fill(correctedJet.pt());
3891  mPt_2 = map_of_MEs[DirName + "/" + "Pt_2"];
3892  if (mPt_2 && mPt_2->getRootObject())
3893  mPt_2->Fill(correctedJet.pt());
3894  mPt_3 = map_of_MEs[DirName + "/" + "Pt_3"];
3895  if (mPt_3 && mPt_3->getRootObject())
3896  mPt_3->Fill(correctedJet.pt());
3897  mEta = map_of_MEs[DirName + "/" + "Eta"];
3898  if (mEta && mEta->getRootObject())
3899  mEta->Fill(correctedJet.eta());
3900  mPhi = map_of_MEs[DirName + "/" + "Phi"];
3901  if (mPhi && mPhi->getRootObject())
3902  mPhi->Fill(correctedJet.phi());
3903 
3904  mPhiVSEta = map_of_MEs[DirName + "/" + "PhiVSEta"];
3905  if (mPhiVSEta && mPhiVSEta->getRootObject())
3906  mPhiVSEta->Fill(correctedJet.eta(), correctedJet.phi());
3907  //if(!isJPTJet_){
3908  float nConstituents = correctedJet.nConstituents();
3909  mConstituents = map_of_MEs[DirName + "/" + "Constituents"];
3910  if (mConstituents && mConstituents->getRootObject())
3911  mConstituents->Fill(nConstituents);
3912  //}
3913  // Fill NPV profiles
3914  //--------------------------------------------------------------------
3915  mPt_profile = map_of_MEs[DirName + "/" + "Pt_profile"];
3916  if (mPt_profile && mPt_profile->getRootObject())
3917  mPt_profile->Fill(numPV, correctedJet.pt());
3918  mEta_profile = map_of_MEs[DirName + "/" + "Eta_profile"];
3919  if (mEta_profile && mEta_profile->getRootObject())
3920  mEta_profile->Fill(numPV, correctedJet.eta());
3921  mPhi_profile = map_of_MEs[DirName + "/" + "Phi_profile"];
3922  if (mPhi_profile && mPhi_profile->getRootObject())
3923  mPhi_profile->Fill(numPV, correctedJet.phi());
3924  //if(!isJPTJet_){
3925  mConstituents_profile = map_of_MEs[DirName + "/" + "Constituents_profile"];
3926  if (mConstituents_profile && mConstituents_profile->getRootObject())
3927  mConstituents_profile->Fill(numPV, nConstituents);
3928  //}
3929  if (fabs(correctedJet.eta()) <= 1.3) {
3930  mPt_Barrel = map_of_MEs[DirName + "/" + "Pt_Barrel"];
3931  if (mPt_Barrel && mPt_Barrel->getRootObject())
3932  mPt_Barrel->Fill(correctedJet.pt());
3933  mPhi_Barrel = map_of_MEs[DirName + "/" + "Phi_Barrel"];
3934  if (mPhi_Barrel && mPhi_Barrel->getRootObject())
3935  mPhi_Barrel->Fill(correctedJet.phi());
3936  //if (mE_Barrel) mE_Barrel->Fill (correctedJet.energy());
3937  //if(!isJPTJet_){
3938  mConstituents_Barrel = map_of_MEs[DirName + "/" + "Constituents_Barrel"];
3939  if (mConstituents_Barrel && mConstituents_Barrel->getRootObject())
3940  mConstituents_Barrel->Fill(nConstituents);
3941  //}
3942  } else if (fabs(correctedJet.eta()) <= 3) {
3943  mPt_EndCap = map_of_MEs[DirName + "/" + "Pt_EndCap"];
3944  if (mPt_EndCap && mPt_EndCap->getRootObject())
3945  mPt_EndCap->Fill(correctedJet.pt());
3946  mPhi_EndCap = map_of_MEs[DirName + "/" + "Phi_EndCap"];
3947  if (mPhi_EndCap && mPhi_EndCap->getRootObject())
3948  mPhi_EndCap->Fill(correctedJet.phi());
3949  //if (mE_EndCap) mE_EndCap->Fill (correctedJet.energy());
3950  //if(!isJPTJet_){
3951  mConstituents_EndCap = map_of_MEs[DirName + "/" + "Constituents_EndCap"];
3952  if (mConstituents_EndCap && mConstituents_EndCap->getRootObject())
3953  mConstituents_EndCap->Fill(nConstituents);
3954  //}
3955  } else {
3956  mPt_Forward = map_of_MEs[DirName + "/" + "Pt_Forward"];
3957  if (mPt_Forward && mPt_Forward->getRootObject())
3958  mPt_Forward->Fill(correctedJet.pt());
3959  mPhi_Forward = map_of_MEs[DirName + "/" + "Phi_Forward"];
3960  if (mPhi_Forward && mPhi_Forward->getRootObject())
3961  mPhi_Forward->Fill(correctedJet.phi());
3962  //if (mE_Forward) mE_Forward->Fill (correctedJet.energy());
3963  //if(!isJPTJet_){
3964  mConstituents_Forward = map_of_MEs[DirName + "/" + "Constituents_Forward"];
3965  if (mConstituents_Forward && mConstituents_Forward->getRootObject())
3966  mConstituents_Forward->Fill(nConstituents);
3967  //}
3968  }
3969  } // pass ID for corrected jets --> inclusive selection
3970  } //loop over uncorrected jets
3971 
3972  mNJets = map_of_MEs[DirName + "/" + "NJets"];
3973  if (mNJets && mNJets->getRootObject())
3974  mNJets->Fill(numofjets);
3975  mNJets_profile = map_of_MEs[DirName + "/" + "NJets_profile"];
3976  if (mNJets_profile && mNJets_profile->getRootObject())
3977  mNJets_profile->Fill(numPV, numofjets);
3978 
3979  sort(recoJets.begin(), recoJets.end(), jetSortingRule);
3980 
3981  //for non dijet selection, otherwise numofjets==0
3982  if (numofjets > 0) { //keep threshold for dijet counting at the original one
3983  //check ID of the leading jet
3984 
3985  if (cleaned_first_jet) {
3986  mEtaFirst = map_of_MEs[DirName + "/" + "EtaFirst"];
3987  if (mEtaFirst && mEtaFirst->getRootObject())
3988  mEtaFirst->Fill((recoJets)[0].eta());
3989  mPhiFirst = map_of_MEs[DirName + "/" + "PhiFirst"];
3990  if (mPhiFirst && mPhiFirst->getRootObject())
3991  mPhiFirst->Fill((recoJets)[0].phi());
3992  mPtFirst = map_of_MEs[DirName + "/" + "PtFirst"];
3993  if (mPtFirst && mPtFirst->getRootObject())
3994  mPtFirst->Fill((recoJets)[0].pt());
3995  //check ID of second check for DPhi plots
3996  if (numofjets > 1 && cleaned_second_jet) {
3997  double dphi = fabs((recoJets)[0].phi() - (recoJets)[1].phi());
3998  if (dphi > acos(-1.)) {
3999  dphi = 2 * acos(-1.) - dphi;
4000  }
4001  mDPhi = map_of_MEs[DirName + "/" + "DPhi"];
4002  if (mDPhi && mDPhi->getRootObject())
4003  mDPhi->Fill(dphi);
4004  }
4005  }
4006  //if(cleaned_second_jet && isJPTJet_){
4007  //mPtSecond = map_of_MEs[DirName+"/"+"PtSecond"]; if (mPtSecond && mPtSecond->getRootObject()) mPtSecond->Fill(recoJets[1].pt());
4008  //}
4009  //if(cleaned_third_jet && isJPTJet_){
4010  //mPtThird = map_of_MEs[DirName+"/"+"PtThird"]; if (mPtThird && mPtThird->getRootObject()) mPtThird->Fill(recoJets[2].pt());
4011  //}
4012  }
4013  //dijet selection -> recoJets are on corrected level, both jets cleaned, fill folder only for cleaned jet selection
4014  if (jetCleaningFlag_ && recoJets.size() > 1 && cleaned_first_jet && cleaned_second_jet) {
4015  //pt threshold checked before filling
4016  if (jetCleaningFlag_) {
4017  DirName = "JetMET/Jet/Cleaned" + mInputCollection_.label() + "/DiJet";
4018  }
4019  //if(fabs(recoJets[0].eta())<3. && fabs(recoJets[1].eta())<3. ){
4020  //calculate dphi
4021  double dphi = fabs((recoJets)[0].phi() - (recoJets)[1].phi());
4022  if (dphi > acos(-1.)) {
4023  dphi = 2 * acos(-1.) - dphi;
4024  }
4025  mDPhi = map_of_MEs[DirName + "/" + "DPhi"];
4026  if (mDPhi && mDPhi->getRootObject())
4027  if (mDPhi)
4028  mDPhi->Fill(dphi);
4029  //dphi cut
4030  if (fabs(dphi) > 2.1) {
4031  if (isCaloJet_) {
4032  if (!runcosmics_) {
4033  reco::CaloJetRef calojetref1(caloJets, ind1);
4034  reco::JetID jetID1 = (*jetID_ValueMap_Handle)[calojetref1];
4035  reco::CaloJetRef calojetref2(caloJets, ind2);
4036  reco::JetID jetID2 = (*jetID_ValueMap_Handle)[calojetref2];
4037  mN90Hits = map_of_MEs[DirName + "/" + "N90Hits"];
4038  if (mN90Hits && mN90Hits->getRootObject())
4039  mN90Hits->Fill(jetID1.n90Hits);
4040  mfHPD = map_of_MEs[DirName + "/" + "fHPD"];
4041  if (mfHPD && mfHPD->getRootObject())
4042  mfHPD->Fill(jetID1.fHPD);
4043  mresEMF = map_of_MEs[DirName + "/" + "resEMF"];
4044  if (mresEMF && mresEMF->getRootObject())
4045  mresEMF->Fill(jetID1.restrictedEMF);
4046  mfRBX = map_of_MEs[DirName + "/" + "fRBX"];
4047  if (mfRBX && mfRBX->getRootObject())
4048  mfRBX->Fill(jetID1.fRBX);
4049  mN90Hits = map_of_MEs[DirName + "/" + "N90Hits"];
4050  if (mN90Hits && mN90Hits->getRootObject())
4051  mN90Hits->Fill(jetID2.n90Hits);
4052  mfHPD = map_of_MEs[DirName + "/" + "fHPD"];
4053  if (mfHPD && mfHPD->getRootObject())
4054  mfHPD->Fill(jetID2.fHPD);
4055  mresEMF = map_of_MEs[DirName + "/" + "resEMF"];
4056  if (mresEMF && mresEMF->getRootObject())
4057  mresEMF->Fill(jetID2.restrictedEMF);
4058  mfRBX = map_of_MEs[DirName + "/" + "fRBX"];
4059  if (mfRBX && mfRBX->getRootObject())
4060  mfRBX->Fill(jetID2.fRBX);
4061  }
4062  mHFrac = map_of_MEs[DirName + "/" + "HFrac"];
4063  if (mHFrac && mHFrac->getRootObject())
4064  mHFrac->Fill((*caloJets)[ind1].energyFractionHadronic());
4065  mEFrac = map_of_MEs[DirName + "/" + "EFrac"];
4066  if (mEFrac && mHFrac->getRootObject())
4067  mEFrac->Fill((*caloJets)[ind1].emEnergyFraction());
4068  mHFrac = map_of_MEs[DirName + "/" + "HFrac"];
4069  if (mHFrac && mHFrac->getRootObject())
4070  mHFrac->Fill((*caloJets)[ind2].energyFractionHadronic());
4071  mEFrac = map_of_MEs[DirName + "/" + "EFrac"];
4072  if (mEFrac && mHFrac->getRootObject())
4073  mEFrac->Fill((*caloJets)[ind2].emEnergyFraction());
4074  mHFrac_profile = map_of_MEs[DirName + "/" + "HFrac_profile"];
4075  if (mHFrac_profile && mHFrac_profile->getRootObject())
4076  mHFrac_profile->Fill(numPV, (*caloJets)[ind1].energyFractionHadronic());
4077  mEFrac_profile = map_of_MEs[DirName + "/" + "EFrac_profile"];
4078  if (mEFrac_profile && mEFrac_profile->getRootObject())
4079  mEFrac_profile->Fill(numPV, (*caloJets)[ind1].emEnergyFraction());
4080  mHFrac_profile = map_of_MEs[DirName + "/" + "HFrac_profile"];
4081  if (mHFrac_profile && mHFrac_profile->getRootObject())
4082  mHFrac_profile->Fill(numPV, (*caloJets)[ind2].energyFractionHadronic());
4083  mEFrac_profile = map_of_MEs[DirName + "/" + "EFrac_profile"];
4084  if (mEFrac_profile && mEFrac_profile->getRootObject())
4085  mEFrac_profile->Fill(numPV, (*caloJets)[ind2].emEnergyFraction());
4086 
4087  mJetEnergyCorr = map_of_MEs[DirName + "/" + "JetEnergyCorr"];
4088  if (mJetEnergyCorr && mJetEnergyCorr->getRootObject())
4089  mJetEnergyCorr->Fill(recoJets[0].pt() / (*caloJets)[ind1].pt());
4090  mJetEnergyCorrVSEta = map_of_MEs[DirName + "/" + "JetEnergyCorrVSEta"];
4091  if (mJetEnergyCorrVSEta && mJetEnergyCorrVSEta->getRootObject())
4092  mJetEnergyCorrVSEta->Fill(recoJets[0].eta(), recoJets[0].pt() / (*caloJets)[ind1].pt());
4093  mJetEnergyCorrVSPt = map_of_MEs[DirName + "/" + "JetEnergyCorrVSPt"];
4094  if (mJetEnergyCorrVSPt && mJetEnergyCorrVSPt->getRootObject())
4095  mJetEnergyCorrVSPt->Fill(recoJets[0].pt(), recoJets[0].pt() / (*caloJets)[ind1].pt());
4096  mJetEnergyCorr = map_of_MEs[DirName + "/" + "JetEnergyCorr"];
4097  if (mJetEnergyCorr && mJetEnergyCorr->getRootObject())
4098  mJetEnergyCorr->Fill(recoJets[1].pt() / (*caloJets)[ind2].pt());
4099  mJetEnergyCorrVSEta = map_of_MEs[DirName + "/" + "JetEnergyCorrVSEta"];
4100  if (mJetEnergyCorrVSEta && mJetEnergyCorrVSEta->getRootObject())
4101  mJetEnergyCorrVSEta->Fill(recoJets[1].eta(), recoJets[1].pt() / (*caloJets)[ind2].pt());
4102  mJetEnergyCorrVSPt = map_of_MEs[DirName + "/" + "JetEnergyCorrVSPt"];
4103  if (mJetEnergyCorrVSPt && mJetEnergyCorrVSPt->getRootObject())
4104  mJetEnergyCorrVSPt->Fill(recoJets[1].pt(), recoJets[1].pt() / (*caloJets)[ind2].pt());
4105  }
4106  //if(isJPTJet_){
4107  //mHFrac = map_of_MEs[DirName+"/"+"HFrac"]; if (mHFrac && mHFrac->getRootObject()) mHFrac->Fill ((*jptJets)[ind1].chargedHadronEnergyFraction()+(*jptJets)[ind1].neutralHadronEnergyFraction());
4108  //mEFrac = map_of_MEs[DirName+"/"+"EFrac"]; if (mEFrac && mHFrac->getRootObject()) mEFrac->Fill (1.-(*jptJets)[ind1].chargedHadronEnergyFraction()-(*jptJets)[ind1].neutralHadronEnergyFraction());
4109  //mHFrac_profile = map_of_MEs[DirName+"/"+"HFrac_profile"]; mHFrac_profile ->Fill(numPV, (*jptJets)[ind1].chargedHadronEnergyFraction()+(*jptJets)[ind1].neutralHadronEnergyFraction());
4110  //mEFrac_profile = map_of_MEs[DirName+"/"+"EFrac_profile"]; mEFrac_profile ->Fill(numPV, 1.-(*jptJets)[ind1].chargedHadronEnergyFraction()-(*jptJets)[ind1].neutralHadronEnergyFraction());
4111  //mHFrac = map_of_MEs[DirName+"/"+"HFrac"]; if (mHFrac && mHFrac->getRootObject()) mHFrac->Fill ((*jptJets)[ind2].chargedHadronEnergyFraction()+(*jptJets)[ind2].neutralHadronEnergyFraction());
4112  //mEFrac = map_of_MEs[DirName+"/"+"EFrac"]; if (mEFrac && mHFrac->getRootObject()) mEFrac->Fill (1.-(*jptJets)[ind2].chargedHadronEnergyFraction()-(*jptJets)[ind2].neutralHadronEnergyFraction());
4113  //mHFrac_profile = map_of_MEs[DirName+"/"+"HFrac_profile"]; mHFrac_profile ->Fill(numPV, (*jptJets)[ind2].chargedHadronEnergyFraction()+(*jptJets)[ind2].neutralHadronEnergyFraction());
4114  //mEFrac_profile = map_of_MEs[DirName+"/"+"EFrac_profile"]; mEFrac_profile ->Fill(numPV, 1.-(*jptJets)[ind2].chargedHadronEnergyFraction()-(*jptJets)[ind2].neutralHadronEnergyFraction());
4115  //
4116  //mJetEnergyCorr = map_of_MEs[DirName+"/"+"JetEnergyCorr"]; if(mJetEnergyCorr && mJetEnergyCorr->getRootObject()) mJetEnergyCorr->Fill(recoJets[0].pt()/(*jptJets)[ind1].pt());
4117  //mJetEnergyCorrVSEta = map_of_MEs[DirName+"/"+"JetEnergyCorrVSEta"]; if(mJetEnergyCorrVSEta && mJetEnergyCorrVSEta->getRootObject()) mJetEnergyCorrVSEta->Fill(recoJets[0].eta(),recoJets[0].pt()/(*jptJets)[ind1].pt());
4118  //mJetEnergyCorrVSPt = map_of_MEs[DirName+"/"+"JetEnergyCorrVSPt"]; if(mJetEnergyCorrVSPt && mJetEnergyCorrVSPt->getRootObject()) mJetEnergyCorrVSPt->Fill(recoJets[0].pt(),recoJets[0].pt()/(*jptJets)[ind1].pt());
4119  //mJetEnergyCorr = map_of_MEs[DirName+"/"+"JetEnergyCorr"]; if(mJetEnergyCorr && mJetEnergyCorr->getRootObject()) mJetEnergyCorr->Fill(recoJets[1].pt()/(*jptJets)[ind2].pt());
4120  //mJetEnergyCorrVSEta = map_of_MEs[DirName+"/"+"JetEnergyCorrVSEta"]; if(mJetEnergyCorrVSEta && mJetEnergyCorrVSEta->getRootObject()) mJetEnergyCorrVSEta->Fill(recoJets[1].eta(),recoJets[1].pt()/(*jptJets)[ind2].pt());
4121  //mJetEnergyCorrVSPt = map_of_MEs[DirName+"/"+"JetEnergyCorrVSPt"]; if(mJetEnergyCorrVSPt && mJetEnergyCorrVSPt->getRootObject()) mJetEnergyCorrVSPt->Fill(recoJets[1].pt(),recoJets[1].pt()/(*jptJets)[ind2].pt());
4122  //}
4123  if (isPFJet_) {
4124  mCHFrac = map_of_MEs[DirName + "/" + "CHFrac"];
4125  if (mCHFrac && mCHFrac->getRootObject())
4126  mCHFrac->Fill((*pfJets)[ind1].chargedHadronEnergyFraction());
4127  mNHFrac = map_of_MEs[DirName + "/" + "NHFrac"];
4128  if (mNHFrac && mNHFrac->getRootObject())
4129  mNHFrac->Fill((*pfJets)[ind1].neutralHadronEnergyFraction());
4130  mPhFrac = map_of_MEs[DirName + "/" + "PhFrac"];
4131  if (mPhFrac && mPhFrac->getRootObject())
4132  mPhFrac->Fill((*pfJets)[ind1].neutralEmEnergyFraction());
4133  mHFEMFrac = map_of_MEs[DirName + "/" + "HFEMFrac"];
4134  if (mHFEMFrac && mHFEMFrac->getRootObject())
4135  mHFEMFrac->Fill((*pfJets)[ind1].HFEMEnergyFraction());
4136  mHFHFrac = map_of_MEs[DirName + "/" + "HFHFrac"];
4137  if (mHFHFrac && mHFHFrac->getRootObject())
4138  mHFHFrac->Fill((*pfJets)[ind1].HFHadronEnergyFraction());
4139 
4140  mJetEnergyCorr = map_of_MEs[DirName + "/" + "JetEnergyCorr"];
4141  if (mJetEnergyCorr && mJetEnergyCorr->getRootObject())
4142  mJetEnergyCorr->Fill(recoJets[0].pt() / (*pfJets)[ind1].pt());
4143  mJetEnergyCorrVSEta = map_of_MEs[DirName + "/" + "JetEnergyCorrVSEta"];
4144  if (mJetEnergyCorrVSEta && mJetEnergyCorrVSEta->getRootObject())
4145  mJetEnergyCorrVSEta->Fill(recoJets[0].eta(), recoJets[0].pt() / (*pfJets)[ind1].pt());
4146  mJetEnergyCorrVSPt = map_of_MEs[DirName + "/" + "JetEnergyCorrVSPt"];
4147  if (mJetEnergyCorrVSPt && mJetEnergyCorrVSPt->getRootObject())
4148  mJetEnergyCorrVSPt->Fill(recoJets[0].pt(), recoJets[0].pt() / (*pfJets)[ind1].pt());
4149  mJetEnergyCorr = map_of_MEs[DirName + "/" + "JetEnergyCorr"];
4150  if (mJetEnergyCorr && mJetEnergyCorr->getRootObject())
4151  mJetEnergyCorr->Fill(recoJets[1].pt() / (*pfJets)[ind2].pt());
4152  mJetEnergyCorrVSEta = map_of_MEs[DirName + "/" + "JetEnergyCorrVSEta"];
4153  if (mJetEnergyCorrVSEta && mJetEnergyCorrVSEta->getRootObject())
4154  mJetEnergyCorrVSEta->Fill(recoJets[1].eta(), recoJets[1].pt() / (*pfJets)[ind2].pt());
4155  mJetEnergyCorrVSPt = map_of_MEs[DirName + "/" + "JetEnergyCorrVSPt"];
4156  if (mJetEnergyCorrVSPt && mJetEnergyCorrVSPt->getRootObject())
4157  mJetEnergyCorrVSPt->Fill(recoJets[1].pt(), recoJets[1].pt() / (*pfJets)[ind2].pt());
4158 
4159  mChargedMultiplicity = map_of_MEs[DirName + "/" + "ChargedMultiplicity"];
4160  if (mChargedMultiplicity && mChargedMultiplicity->getRootObject())
4161  mChargedMultiplicity->Fill((*pfJets)[ind1].chargedMultiplicity());
4162  mNeutralMultiplicity = map_of_MEs[DirName + "/" + "NeutralMultiplicity"];
4163  if (mNeutralMultiplicity && mNeutralMultiplicity->getRootObject())
4164  mNeutralMultiplicity->Fill((*pfJets)[ind1].neutralMultiplicity());
4165  mMuonMultiplicity = map_of_MEs[DirName + "/" + "MuonMultiplicity"];
4166  if (mMuonMultiplicity && mMuonMultiplicity->getRootObject())
4167  mMuonMultiplicity->Fill((*pfJets)[ind1].muonMultiplicity());
4168  //Filling variables for second jet
4169  mCHFrac = map_of_MEs[DirName + "/" + "CHFrac"];
4170  if (mCHFrac && mCHFrac->getRootObject())
4171  mCHFrac->Fill((*pfJets)[ind2].chargedHadronEnergyFraction());
4172  mNHFrac = map_of_MEs[DirName + "/" + "NHFrac"];
4173  if (mNHFrac && mNHFrac->getRootObject())
4174  mNHFrac->Fill((*pfJets)[ind2].neutralHadronEnergyFraction());
4175  mPhFrac = map_of_MEs[DirName + "/" + "PhFrac"];
4176  if (mPhFrac && mPhFrac->getRootObject())
4177  mPhFrac->Fill((*pfJets)[ind2].neutralEmEnergyFraction());
4178  mHFEMFrac = map_of_MEs[DirName + "/" + "HFEMFrac"];
4179  if (mHFEMFrac && mHFEMFrac->getRootObject())
4180  mHFEMFrac->Fill((*pfJets)[ind2].HFEMEnergyFraction());
4181  mHFHFrac = map_of_MEs[DirName + "/" + "HFHFrac"];
4182  if (mHFHFrac && mHFHFrac->getRootObject())
4183  mHFHFrac->Fill((*pfJets)[ind2].HFHadronEnergyFraction());
4184 
4185  mNeutralFraction = map_of_MEs[DirName + "/" + "NeutralConstituentsFraction"];
4186  if (mNeutralFraction && mNeutralFraction->getRootObject())
4187  mNeutralFraction->Fill((double)(*pfJets)[ind1].neutralMultiplicity() /
4188  (double)(*pfJets)[ind1].nConstituents());
4189 
4190  mChargedMultiplicity = map_of_MEs[DirName + "/" + "ChargedMultiplicity"];
4191  if (mChargedMultiplicity && mChargedMultiplicity->getRootObject())
4192  mChargedMultiplicity->Fill((*pfJets)[ind2].chargedMultiplicity());
4193  mNeutralMultiplicity = map_of_MEs[DirName + "/" + "NeutralMultiplicity"];
4194  if (mNeutralMultiplicity && mNeutralMultiplicity->getRootObject())
4195  mNeutralMultiplicity->Fill((*pfJets)[ind2].neutralMultiplicity());
4196  mMuonMultiplicity = map_of_MEs[DirName + "/" + "MuonMultiplicity"];
4197  if (mMuonMultiplicity && mMuonMultiplicity->getRootObject())
4198  mMuonMultiplicity->Fill((*pfJets)[ind2].muonMultiplicity());
4199 
4200  //now fill PFJet profiles for leading jet
4201  mCHFrac_profile = map_of_MEs[DirName + "/" + "CHFrac_profile"];
4202  if (mCHFrac_profile && mCHFrac_profile->getRootObject())
4203  mCHFrac_profile->Fill(numPV, (*pfJets)[ind1].chargedHadronEnergyFraction());
4204  mNHFrac_profile = map_of_MEs[DirName + "/" + "NHFrac_profile"];
4205  if (mNHFrac_profile && mNHFrac_profile->getRootObject())
4206  mNHFrac_profile->Fill(numPV, (*pfJets)[ind1].neutralHadronEnergyFraction());
4207  mPhFrac_profile = map_of_MEs[DirName + "/" + "PhFrac_profile"];
4208  if (mPhFrac_profile && mPhFrac_profile->getRootObject())
4209  mPhFrac_profile->Fill(numPV, (*pfJets)[ind1].neutralEmEnergyFraction());
4210  mHFEMFrac_profile = map_of_MEs[DirName + "/" + "HFEMFrac_profile"];
4211  if (mHFEMFrac_profile && mHFEMFrac_profile->getRootObject())
4212  mHFEMFrac_profile->Fill(numPV, (*pfJets)[ind1].HFEMEnergyFraction());
4213  mHFHFrac_profile = map_of_MEs[DirName + "/" + "HFHFrac_profile"];
4214  if (mHFHFrac_profile && mHFHFrac_profile->getRootObject())
4215  mHFHFrac_profile->Fill(numPV, (*pfJets)[ind1].HFHadronEnergyFraction());
4216 
4217  mNeutralFraction = map_of_MEs[DirName + "/" + "NeutralConstituentsFraction"];
4218  if (mNeutralFraction && mNeutralFraction->getRootObject())
4219  mNeutralFraction->Fill((double)(*pfJets)[ind2].neutralMultiplicity() /
4220  (double)(*pfJets)[ind2].nConstituents());
4221 
4222  mChargedMultiplicity_profile = map_of_MEs[DirName + "/" + "ChargedMultiplicity_profile"];
4223  if (mChargedMultiplicity_profile && mChargedMultiplicity_profile->getRootObject())
4224  mChargedMultiplicity_profile->Fill(numPV, (*pfJets)[ind1].chargedMultiplicity());
4225  mNeutralMultiplicity_profile = map_of_MEs[DirName + "/" + "NeutralMultiplicity_profile"];
4226  if (mNeutralMultiplicity_profile && mNeutralMultiplicity_profile->getRootObject())
4227  mNeutralMultiplicity_profile->Fill(numPV, (*pfJets)[ind1].neutralMultiplicity());
4228  mMuonMultiplicity_profile = map_of_MEs[DirName + "/" + "MuonMultiplicity_profile"];
4229  if (mMuonMultiplicity_profile && mMuonMultiplicity_profile->getRootObject())
4230  mMuonMultiplicity->Fill(numPV, (*pfJets)[ind1].muonMultiplicity());
4231  //now fill PFJet profiles for second leading jet
4232  mCHFrac_profile = map_of_MEs[DirName + "/" + "CHFrac_profile"];
4233  if (mCHFrac_profile && mCHFrac_profile->getRootObject())
4234  mCHFrac_profile->Fill(numPV, (*pfJets)[ind2].chargedHadronEnergyFraction());
4235  mNHFrac_profile = map_of_MEs[DirName + "/" + "NHFrac_profile"];
4236  if (mNHFrac_profile && mNHFrac_profile->getRootObject())
4237  mNHFrac_profile->Fill(numPV, (*pfJets)[ind2].neutralHadronEnergyFraction());
4238  mPhFrac_profile = map_of_MEs[DirName + "/" + "PhFrac_profile"];
4239  if (mPhFrac_profile && mPhFrac_profile->getRootObject())
4240  mPhFrac_profile->Fill(numPV, (*pfJets)[ind2].neutralEmEnergyFraction());
4241  mHFEMFrac_profile = map_of_MEs[DirName + "/" + "HFEMFrac_profile"];
4242  if (mHFEMFrac_profile && mHFEMFrac_profile->getRootObject())
4243  mHFEMFrac_profile->Fill(numPV, (*pfJets)[ind2].HFEMEnergyFraction());
4244  mHFHFrac_profile = map_of_MEs[DirName + "/" + "HFHFrac_profile"];
4245  if (mHFHFrac_profile && mHFHFrac_profile->getRootObject())
4246  mHFHFrac_profile->Fill(numPV, (*pfJets)[ind2].HFHadronEnergyFraction());
4247 
4248  mChargedMultiplicity_profile = map_of_MEs[DirName + "/" + "ChargedMultiplicity_profile"];
4249  if (mChargedMultiplicity_profile && mChargedMultiplicity_profile->getRootObject())
4250  mChargedMultiplicity_profile->Fill(numPV, (*pfJets)[ind2].chargedMultiplicity());
4251  mNeutralMultiplicity_profile = map_of_MEs[DirName + "/" + "NeutralMultiplicity_profile"];
4252  if (mNeutralMultiplicity_profile && mNeutralMultiplicity_profile->getRootObject())
4253  mNeutralMultiplicity_profile->Fill(numPV, (*pfJets)[ind2].neutralMultiplicity());
4254  mMuonMultiplicity_profile = map_of_MEs[DirName + "/" + "MuonMultiplicity_profile"];
4255  if (mMuonMultiplicity_profile && mMuonMultiplicity_profile->getRootObject())
4256  mMuonMultiplicity_profile->Fill(numPV, (*pfJets)[ind2].muonMultiplicity());
4257 
4258  int QGmulti = -1;
4259  float QGLikelihood = -10;
4260  float QGptD = -10;
4261  float QGaxis2 = -10;
4262  if (fill_CHS_histos) {
4263  reco::PFJetRef pfjetref(pfJets, ind1);
4264  QGmulti = (*qgMultiplicity)[pfjetref];
4265  QGLikelihood = (*qgLikelihood)[pfjetref];
4266  QGptD = (*qgptD)[pfjetref];
4267  QGaxis2 = (*qgaxis2)[pfjetref];
4268  if (fabs(recoJets[0].eta()) < 1.3) { //barrel jets
4269  //fractions for barrel
4270  if (recoJets[0].pt() >= 20. && recoJets[0].pt() <= 50.) {
4271  mAxis2_lowPt_Barrel = map_of_MEs[DirName + "/" + "qg_Axis2_lowPt_Barrel"];
4272  if (mAxis2_lowPt_Barrel && mAxis2_lowPt_Barrel->getRootObject())
4273  mAxis2_lowPt_Barrel->Fill(QGaxis2);
4274  mpTD_lowPt_Barrel = map_of_MEs[DirName + "/" + "qg_pTD_lowPt_Barrel"];
4275  if (mpTD_lowPt_Barrel && mpTD_lowPt_Barrel->getRootObject())
4276  mpTD_lowPt_Barrel->Fill(QGptD);
4277  mMultiplicityQG_lowPt_Barrel = map_of_MEs[DirName + "/" + "qg_multiplicity_lowPt_Barrel"];
4278  if (mMultiplicityQG_lowPt_Barrel && mMultiplicityQG_lowPt_Barrel->getRootObject())
4279  mMultiplicityQG_lowPt_Barrel->Fill(QGmulti);
4280  mqgLikelihood_lowPt_Barrel = map_of_MEs[DirName + "/" + "qg_Likelihood_lowPt_Barrel"];
4281  if (mqgLikelihood_lowPt_Barrel && mqgLikelihood_lowPt_Barrel->getRootObject())
4282  mqgLikelihood_lowPt_Barrel->Fill(QGLikelihood);
4283  }
4284  if (recoJets[0].pt() > 50. && recoJets[0].pt() <= 140.) {
4285  mAxis2_mediumPt_Barrel = map_of_MEs[DirName + "/" + "qg_Axis2_mediumPt_Barrel"];
4286  if (mAxis2_mediumPt_Barrel && mAxis2_mediumPt_Barrel->getRootObject())
4287  mAxis2_mediumPt_Barrel->Fill(QGaxis2);
4288  mpTD_mediumPt_Barrel = map_of_MEs[DirName + "/" + "qg_pTD_mediumPt_Barrel"];
4289  if (mpTD_mediumPt_Barrel && mpTD_mediumPt_Barrel->getRootObject())
4290  mpTD_mediumPt_Barrel->Fill(QGptD);
4291  mMultiplicityQG_mediumPt_Barrel = map_of_MEs[DirName + "/" + "qg_multiplicity_mediumPt_Barrel"];
4292  if (mMultiplicityQG_mediumPt_Barrel && mMultiplicityQG_mediumPt_Barrel->getRootObject())
4293  mMultiplicityQG_mediumPt_Barrel->Fill(QGmulti);
4294  mqgLikelihood_mediumPt_Barrel = map_of_MEs[DirName + "/" + "qg_Likelihood_mediumPt_Barrel"];
4295  if (mqgLikelihood_mediumPt_Barrel && mqgLikelihood_mediumPt_Barrel->getRootObject())
4296  mqgLikelihood_mediumPt_Barrel->Fill(QGLikelihood);
4297  }
4298  if (recoJets[0].pt() > 140.) {
4299  mAxis2_highPt_Barrel = map_of_MEs[DirName + "/" + "qg_Axis2_highPt_Barrel"];
4300  if (mAxis2_highPt_Barrel && mAxis2_highPt_Barrel->getRootObject())
4301  mAxis2_highPt_Barrel->Fill(QGaxis2);
4302  mpTD_highPt_Barrel = map_of_MEs[DirName + "/" + "qg_pTD_highPt_Barrel"];
4303  if (mpTD_highPt_Barrel && mpTD_highPt_Barrel->getRootObject())
4304  mpTD_highPt_Barrel->Fill(QGptD);
4305  mMultiplicityQG_highPt_Barrel = map_of_MEs[DirName + "/" + "qg_multiplicity_highPt_Barrel"];
4306  if (mMultiplicityQG_highPt_Barrel && mMultiplicityQG_highPt_Barrel->getRootObject())
4307  mMultiplicityQG_highPt_Barrel->Fill(QGmulti);
4308  mqgLikelihood_highPt_Barrel = map_of_MEs[DirName + "/" + "qg_Likelihood_highPt_Barrel"];
4309  if (mqgLikelihood_highPt_Barrel && mqgLikelihood_highPt_Barrel->getRootObject())
4310  mqgLikelihood_highPt_Barrel->Fill(QGLikelihood);
4311  }
4312  } else if (fabs(recoJets[0].eta()) < 3.0) { //endcap jets
4313  if (recoJets[0].pt() > 20. && recoJets[0].pt() <= 50.) {
4314  mAxis2_lowPt_EndCap = map_of_MEs[DirName + "/" + "qg_Axis2_lowPt_EndCap"];
4315  if (mAxis2_lowPt_EndCap && mAxis2_lowPt_EndCap->getRootObject())
4316  mAxis2_lowPt_EndCap->Fill(QGaxis2);
4317  mpTD_lowPt_EndCap = map_of_MEs[DirName + "/" + "qg_pTD_lowPt_EndCap"];
4318  if (mpTD_lowPt_EndCap && mpTD_lowPt_EndCap->getRootObject())
4319  mpTD_lowPt_EndCap->Fill(QGptD);
4320  mMultiplicityQG_lowPt_EndCap = map_of_MEs[DirName + "/" + "qg_multiplicity_lowPt_EndCap"];
4321  if (mMultiplicityQG_lowPt_EndCap && mMultiplicityQG_lowPt_EndCap->getRootObject())
4322  mMultiplicityQG_lowPt_EndCap->Fill(QGmulti);
4323  mqgLikelihood_lowPt_EndCap = map_of_MEs[DirName + "/" + "qg_Likelihood_lowPt_EndCap"];
4324  if (mqgLikelihood_lowPt_EndCap && mqgLikelihood_lowPt_EndCap->getRootObject())
4325  mqgLikelihood_lowPt_EndCap->Fill(QGLikelihood);
4326  }
4327  if (recoJets[0].pt() > 50. && recoJets[0].pt() <= 140.) {
4328  mAxis2_mediumPt_EndCap = map_of_MEs[DirName + "/" + "qg_Axis2_mediumPt_EndCap"];
4329  if (mAxis2_mediumPt_EndCap && mAxis2_mediumPt_EndCap->getRootObject())
4330  mAxis2_mediumPt_EndCap->Fill(QGaxis2);
4331  mpTD_mediumPt_EndCap = map_of_MEs[DirName + "/" + "qg_pTD_mediumPt_EndCap"];
4332  if (mpTD_mediumPt_EndCap && mpTD_mediumPt_EndCap->getRootObject())
4333  mpTD_mediumPt_EndCap->Fill(QGptD);
4334  mMultiplicityQG_mediumPt_EndCap = map_of_MEs[DirName + "/" + "qg_multiplicity_mediumPt_EndCap"];
4335  if (mMultiplicityQG_mediumPt_EndCap && mMultiplicityQG_mediumPt_EndCap->getRootObject())
4336  mMultiplicityQG_mediumPt_EndCap->Fill(QGmulti);
4337  mqgLikelihood_mediumPt_EndCap = map_of_MEs[DirName + "/" + "qg_Likelihood_mediumPt_EndCap"];
4338  if (mqgLikelihood_mediumPt_EndCap && mqgLikelihood_mediumPt_EndCap->getRootObject())
4339  mqgLikelihood_mediumPt_EndCap->Fill(QGLikelihood);
4340  }
4341  if (recoJets[0].pt() > 140.) {
4342  mAxis2_highPt_EndCap = map_of_MEs[DirName + "/" + "qg_Axis2_highPt_EndCap"];
4343  if (mAxis2_highPt_EndCap && mAxis2_highPt_EndCap->getRootObject())
4344  mAxis2_highPt_EndCap->Fill(QGaxis2);
4345  mpTD_highPt_EndCap = map_of_MEs[DirName + "/" + "qg_pTD_highPt_EndCap"];
4346  if (mpTD_highPt_EndCap && mpTD_highPt_EndCap->getRootObject())
4347  mpTD_highPt_EndCap->Fill(QGptD);
4348  mMultiplicityQG_highPt_EndCap = map_of_MEs[DirName + "/" + "qg_multiplicity_highPt_EndCap"];
4349  if (mMultiplicityQG_highPt_EndCap && mMultiplicityQG_highPt_EndCap->getRootObject())
4350  mMultiplicityQG_highPt_EndCap->Fill(QGmulti);
4351  mqgLikelihood_highPt_EndCap = map_of_MEs[DirName + "/" + "qg_Likelihood_highPt_EndCap"];
4352  if (mqgLikelihood_highPt_EndCap && mqgLikelihood_highPt_EndCap->getRootObject())
4353  mqgLikelihood_highPt_EndCap->Fill(QGLikelihood);
4354  }
4355  } else {
4356  if (recoJets[0].pt() > 20. && recoJets[0].pt() <= 50.) {
4357  mAxis2_lowPt_Forward = map_of_MEs[DirName + "/" + "qg_Axis2_lowPt_Forward"];
4358  if (mAxis2_lowPt_Forward && mAxis2_lowPt_Forward->getRootObject())
4359  mAxis2_lowPt_Forward->Fill(QGaxis2);
4360  mpTD_lowPt_Forward = map_of_MEs[DirName + "/" + "qg_pTD_lowPt_Forward"];
4361  if (mpTD_lowPt_Forward && mpTD_lowPt_Forward->getRootObject())
4362  mpTD_lowPt_Forward->Fill(QGptD);
4363  mMultiplicityQG_lowPt_Forward = map_of_MEs[DirName + "/" + "qg_multiplicity_lowPt_Forward"];
4364  if (mMultiplicityQG_lowPt_Forward && mMultiplicityQG_lowPt_Forward->getRootObject())
4365  mMultiplicityQG_lowPt_Forward->Fill(QGmulti);
4366  mqgLikelihood_lowPt_Forward = map_of_MEs[DirName + "/" + "qg_Likelihood_lowPt_Forward"];
4367  if (mqgLikelihood_lowPt_Forward && mqgLikelihood_lowPt_Forward->getRootObject())
4368  mqgLikelihood_lowPt_Forward->Fill(QGLikelihood);
4369  }
4370  if (recoJets[0].pt() > 50. && recoJets[0].pt() <= 140.) {
4371  mAxis2_mediumPt_Forward = map_of_MEs[DirName + "/" + "qg_Axis2_mediumPt_Forward"];
4372  if (mAxis2_mediumPt_Forward && mAxis2_mediumPt_Forward->getRootObject())
4373  mAxis2_mediumPt_Forward->Fill(QGaxis2);
4374  mpTD_mediumPt_Forward = map_of_MEs[DirName + "/" + "qg_pTD_mediumPt_Forward"];
4375  if (mpTD_mediumPt_Forward && mpTD_mediumPt_Forward->getRootObject())
4376  mpTD_mediumPt_Forward->Fill(QGptD);
4377  mMultiplicityQG_mediumPt_Forward = map_of_MEs[DirName + "/" + "qg_multiplicity_mediumPt_Forward"];
4378  if (mMultiplicityQG_mediumPt_Forward && mMultiplicityQG_mediumPt_Forward->getRootObject())
4379  mMultiplicityQG_mediumPt_Forward->Fill(QGmulti);
4380  mqgLikelihood_mediumPt_Forward = map_of_MEs[DirName + "/" + "qg_Likelihood_mediumPt_Forward"];
4381  if (mqgLikelihood_mediumPt_Forward && mqgLikelihood_mediumPt_Forward->getRootObject())
4382  mqgLikelihood_mediumPt_Forward->Fill(QGLikelihood);
4383  }
4384  if (recoJets[0].pt() > 140.) {
4385  mAxis2_highPt_Forward = map_of_MEs[DirName + "/" + "qg_Axis2_highPt_Forward"];
4386  if (mAxis2_highPt_Forward && mAxis2_highPt_Forward->getRootObject())
4387  mAxis2_highPt_Forward->Fill(QGaxis2);
4388  mpTD_highPt_Forward = map_of_MEs[DirName + "/" + "qg_pTD_highPt_Forward"];
4389  if (mpTD_highPt_Forward && mpTD_highPt_Forward->getRootObject())
4390  mpTD_highPt_Forward->Fill(QGptD);
4391  mMultiplicityQG_highPt_Forward = map_of_MEs[DirName + "/" + "qg_multiplicity_highPt_Forward"];
4392  if (mMultiplicityQG_highPt_Forward && mMultiplicityQG_highPt_Forward->getRootObject())
4393  mMultiplicityQG_highPt_Forward->Fill(QGmulti);
4394  mqgLikelihood_highPt_Forward = map_of_MEs[DirName + "/" + "qg_Likelihood_highPt_Forward"];
4395  if (mqgLikelihood_highPt_Forward && mqgLikelihood_highPt_Forward->getRootObject())
4396  mqgLikelihood_highPt_Forward->Fill(QGLikelihood);
4397  }
4398  } //done for first jet
4399  reco::PFJetRef pfjetref1(pfJets, ind2);
4400  QGmulti = (*qgMultiplicity)[pfjetref1];
4401  QGLikelihood = (*qgLikelihood)[pfjetref1];
4402  QGptD = (*qgptD)[pfjetref1];
4403  QGaxis2 = (*qgaxis2)[pfjetref1];
4404  if (fabs(recoJets[1].eta()) < 1.3) { //barrel jets
4405  //fractions for barrel
4406  if (recoJets[1].pt() >= 20. && recoJets[1].pt() <= 50.) {
4407  mAxis2_lowPt_Barrel = map_of_MEs[DirName + "/" + "qg_Axis2_lowPt_Barrel"];
4408  if (mAxis2_lowPt_Barrel && mAxis2_lowPt_Barrel->getRootObject())
4409  mAxis2_lowPt_Barrel->Fill(QGaxis2);
4410  mpTD_lowPt_Barrel = map_of_MEs[DirName + "/" + "qg_pTD_lowPt_Barrel"];
4411  if (mpTD_lowPt_Barrel && mpTD_lowPt_Barrel->getRootObject())
4412  mpTD_lowPt_Barrel->Fill(QGptD);
4413  mMultiplicityQG_lowPt_Barrel = map_of_MEs[DirName + "/" + "qg_multiplicity_lowPt_Barrel"];
4414  if (mMultiplicityQG_lowPt_Barrel && mMultiplicityQG_lowPt_Barrel->getRootObject())
4415  mMultiplicityQG_lowPt_Barrel->Fill(QGmulti);
4416  mqgLikelihood_lowPt_Barrel = map_of_MEs[DirName + "/" + "qg_Likelihood_lowPt_Barrel"];
4417  if (mqgLikelihood_lowPt_Barrel && mqgLikelihood_lowPt_Barrel->getRootObject())
4418  mqgLikelihood_lowPt_Barrel->Fill(QGLikelihood);
4419  }
4420  if (recoJets[1].pt() > 50. && recoJets[1].pt() <= 140.) {
4421  mAxis2_mediumPt_Barrel = map_of_MEs[DirName + "/" + "qg_Axis2_mediumPt_Barrel"];
4422  if (mAxis2_mediumPt_Barrel && mAxis2_mediumPt_Barrel->getRootObject())
4423  mAxis2_mediumPt_Barrel->Fill(QGaxis2);
4424  mpTD_mediumPt_Barrel = map_of_MEs[DirName + "/" + "qg_pTD_mediumPt_Barrel"];
4425  if (mpTD_mediumPt_Barrel && mpTD_mediumPt_Barrel->getRootObject())
4426  mpTD_mediumPt_Barrel->Fill(QGptD);
4427  mMultiplicityQG_mediumPt_Barrel = map_of_MEs[DirName + "/" + "qg_multiplicity_mediumPt_Barrel"];
4428  if (mMultiplicityQG_mediumPt_Barrel && mMultiplicityQG_mediumPt_Barrel->getRootObject())
4429  mMultiplicityQG_mediumPt_Barrel->Fill(QGmulti);
4430  mqgLikelihood_mediumPt_Barrel = map_of_MEs[DirName + "/" + "qg_Likelihood_mediumPt_Barrel"];
4431  if (mqgLikelihood_mediumPt_Barrel && mqgLikelihood_mediumPt_Barrel->getRootObject())
4432  mqgLikelihood_mediumPt_Barrel->Fill(QGLikelihood);
4433  }
4434  if (recoJets[1].pt() > 140.) {
4435  mAxis2_highPt_Barrel = map_of_MEs[DirName + "/" + "qg_Axis2_highPt_Barrel"];
4436  if (mAxis2_highPt_Barrel && mAxis2_highPt_Barrel->getRootObject())
4437  mAxis2_highPt_Barrel->Fill(QGaxis2);
4438  mpTD_highPt_Barrel = map_of_MEs[DirName + "/" + "qg_pTD_highPt_Barrel"];
4439  if (mpTD_highPt_Barrel && mpTD_highPt_Barrel->getRootObject())
4440  mpTD_highPt_Barrel->Fill(QGptD);
4441  mMultiplicityQG_highPt_Barrel = map_of_MEs[DirName + "/" + "qg_multiplicity_highPt_Barrel"];
4442  if (mMultiplicityQG_highPt_Barrel && mMultiplicityQG_highPt_Barrel->getRootObject())
4443  mMultiplicityQG_highPt_Barrel->Fill(QGmulti);
4444  mqgLikelihood_highPt_Barrel = map_of_MEs[DirName + "/" + "qg_Likelihood_highPt_Barrel"];
4445  if (mqgLikelihood_highPt_Barrel && mqgLikelihood_highPt_Barrel->getRootObject())
4446  mqgLikelihood_highPt_Barrel->Fill(QGLikelihood);
4447  }
4448  } else if (fabs(recoJets[1].eta()) < 3.0) { //endcap jets
4449  if (recoJets[1].pt() > 20. && recoJets[1].pt() <= 50.) {
4450  mAxis2_lowPt_EndCap = map_of_MEs[DirName + "/" + "qg_Axis2_lowPt_EndCap"];
4451  if (mAxis2_lowPt_EndCap && mAxis2_lowPt_EndCap->getRootObject())
4452  mAxis2_lowPt_EndCap->Fill(QGaxis2);
4453  mpTD_lowPt_EndCap = map_of_MEs[DirName + "/" + "qg_pTD_lowPt_EndCap"];
4454  if (mpTD_lowPt_EndCap && mpTD_lowPt_EndCap->getRootObject())
4455  mpTD_lowPt_EndCap->Fill(QGptD);
4456  mMultiplicityQG_lowPt_EndCap = map_of_MEs[DirName + "/" + "qg_multiplicity_lowPt_EndCap"];
4457  if (mMultiplicityQG_lowPt_EndCap && mMultiplicityQG_lowPt_EndCap->getRootObject())
4458  mMultiplicityQG_lowPt_EndCap->Fill(QGmulti);
4459  mqgLikelihood_lowPt_EndCap = map_of_MEs[DirName + "/" + "qg_Likelihood_lowPt_EndCap"];
4460  if (mqgLikelihood_lowPt_EndCap && mqgLikelihood_lowPt_EndCap->getRootObject())
4461  mqgLikelihood_lowPt_EndCap->Fill(QGLikelihood);
4462  }
4463  if (recoJets[1].pt() > 50. && recoJets[1].pt() <= 140.) {
4464  mAxis2_mediumPt_EndCap = map_of_MEs[DirName + "/" + "qg_Axis2_mediumPt_EndCap"];
4465  if (mAxis2_mediumPt_EndCap && mAxis2_mediumPt_EndCap->getRootObject())
4466  mAxis2_mediumPt_EndCap->Fill(QGaxis2);
4467  mpTD_mediumPt_EndCap = map_of_MEs[DirName + "/" + "qg_pTD_mediumPt_EndCap"];
4468  if (mpTD_mediumPt_EndCap && mpTD_mediumPt_EndCap->getRootObject())
4469  mpTD_mediumPt_EndCap->Fill(QGptD);
4470  mMultiplicityQG_mediumPt_EndCap = map_of_MEs[DirName + "/" + "qg_multiplicity_mediumPt_EndCap"];
4471  if (mMultiplicityQG_mediumPt_EndCap && mMultiplicityQG_mediumPt_EndCap->getRootObject())
4472  mMultiplicityQG_mediumPt_EndCap->Fill(QGmulti);
4473  mqgLikelihood_mediumPt_EndCap = map_of_MEs[DirName + "/" + "qg_Likelihood_mediumPt_EndCap"];
4474  if (mqgLikelihood_mediumPt_EndCap && mqgLikelihood_mediumPt_EndCap->getRootObject())
4475  mqgLikelihood_mediumPt_EndCap->Fill(QGLikelihood);
4476  }
4477  if (recoJets[1].pt() > 140.) {
4478  mAxis2_highPt_EndCap = map_of_MEs[DirName + "/" + "qg_Axis2_highPt_EndCap"];
4479  if (mAxis2_highPt_EndCap && mAxis2_highPt_EndCap->getRootObject())
4480  mAxis2_highPt_EndCap->Fill(QGaxis2);
4481  mpTD_highPt_EndCap = map_of_MEs[DirName + "/" + "qg_pTD_highPt_EndCap"];
4482  if (mpTD_highPt_EndCap && mpTD_highPt_EndCap->getRootObject())
4483  mpTD_highPt_EndCap->Fill(QGptD);
4484  mMultiplicityQG_highPt_EndCap = map_of_MEs[DirName + "/" + "qg_multiplicity_highPt_EndCap"];
4485  if (mMultiplicityQG_highPt_EndCap && mMultiplicityQG_highPt_EndCap->getRootObject())
4486  mMultiplicityQG_highPt_EndCap->Fill(QGmulti);
4487  mqgLikelihood_highPt_EndCap = map_of_MEs[DirName + "/" + "qg_Likelihood_highPt_EndCap"];
4488  if (mqgLikelihood_highPt_EndCap && mqgLikelihood_highPt_EndCap->getRootObject())
4489  mqgLikelihood_highPt_EndCap->Fill(QGLikelihood);
4490  }
4491  } else {
4492  if (recoJets[1].pt() > 20. && recoJets[1].pt() <= 50.) {
4493  mAxis2_lowPt_Forward = map_of_MEs[DirName + "/" + "qg_Axis2_lowPt_Forward"];
4494  if (mAxis2_lowPt_Forward && mAxis2_lowPt_Forward->getRootObject())
4495  mAxis2_lowPt_Forward->Fill(QGaxis2);
4496  mpTD_lowPt_Forward = map_of_MEs[DirName + "/" + "qg_pTD_lowPt_Forward"];
4497  if (mpTD_lowPt_Forward && mpTD_lowPt_Forward->getRootObject())
4498  mpTD_lowPt_Forward->Fill(QGptD);
4499  mMultiplicityQG_lowPt_Forward = map_of_MEs[DirName + "/" + "qg_multiplicity_lowPt_Forward"];
4500  if (mMultiplicityQG_lowPt_Forward && mMultiplicityQG_lowPt_Forward->getRootObject())
4501  mMultiplicityQG_lowPt_Forward->Fill(QGmulti);
4502  mqgLikelihood_lowPt_Forward = map_of_MEs[DirName + "/" + "qg_Likelihood_lowPt_Forward"];
4503  if (mqgLikelihood_lowPt_Forward && mqgLikelihood_lowPt_Forward->getRootObject())
4504  mqgLikelihood_lowPt_Forward->Fill(QGLikelihood);
4505  }
4506  if (recoJets[1].pt() > 50. && recoJets[1].pt() <= 140.) {
4507  mAxis2_mediumPt_Forward = map_of_MEs[DirName + "/" + "qg_Axis2_mediumPt_Forward"];
4508  if (mAxis2_mediumPt_Forward && mAxis2_mediumPt_Forward->getRootObject())
4509  mAxis2_mediumPt_Forward->Fill(QGaxis2);
4510  mpTD_mediumPt_Forward = map_of_MEs[DirName + "/" + "qg_pTD_mediumPt_Forward"];
4511  if (mpTD_mediumPt_Forward && mpTD_mediumPt_Forward->getRootObject())
4512  mpTD_mediumPt_Forward->Fill(QGptD);
4513  mMultiplicityQG_mediumPt_Forward = map_of_MEs[DirName + "/" + "qg_multiplicity_mediumPt_Forward"];
4514  if (mMultiplicityQG_mediumPt_Forward && mMultiplicityQG_mediumPt_Forward->getRootObject())
4515  mMultiplicityQG_mediumPt_Forward->Fill(QGmulti);
4516  mqgLikelihood_mediumPt_Forward = map_of_MEs[DirName + "/" + "qg_Likelihood_mediumPt_Forward"];
4517  if (mqgLikelihood_mediumPt_Forward && mqgLikelihood_mediumPt_Forward->getRootObject())
4518  mqgLikelihood_mediumPt_Forward->Fill(QGLikelihood);
4519  }
4520  if (recoJets[1].pt() > 140.) {
4521  mAxis2_highPt_Forward = map_of_MEs[DirName + "/" + "qg_Axis2_highPt_Forward"];
4522  if (mAxis2_highPt_Forward && mAxis2_highPt_Forward->getRootObject())
4523  mAxis2_highPt_Forward->Fill(QGaxis2);
4524  mpTD_highPt_Forward = map_of_MEs[DirName + "/" + "qg_pTD_highPt_Forward"];
4525  if (mpTD_highPt_Forward && mpTD_highPt_Forward->getRootObject())
4526  mpTD_highPt_Forward->Fill(QGptD);
4527  mMultiplicityQG_highPt_Forward = map_of_MEs[DirName + "/" + "qg_multiplicity_highPt_Forward"];
4528  if (mMultiplicityQG_highPt_Forward && mMultiplicityQG_highPt_Forward->getRootObject())
4529  mMultiplicityQG_highPt_Forward->Fill(QGmulti);
4530  mqgLikelihood_highPt_Forward = map_of_MEs[DirName + "/" + "qg_Likelihood_highPt_Forward"];
4531  if (mqgLikelihood_highPt_Forward && mqgLikelihood_highPt_Forward->getRootObject())
4532  mqgLikelihood_highPt_Forward->Fill(QGLikelihood);
4533  }
4534  } //deal with second jet
4535  } //fill quark gluon tagged variables
4536  } //pfjet
4537  if (isMiniAODJet_) {
4538  mJetEnergyCorr = map_of_MEs[DirName + "/" + "JetEnergyCorr"];
4539  if (mJetEnergyCorr && mJetEnergyCorr->getRootObject())
4540  mJetEnergyCorr->Fill(1. / (*patJets)[ind1].jecFactor("Uncorrected"));
4541  mJetEnergyCorrVSEta = map_of_MEs[DirName + "/" + "JetEnergyCorrVSEta"];
4542  if (mJetEnergyCorrVSEta && mJetEnergyCorrVSEta->getRootObject())
4543  mJetEnergyCorrVSEta->Fill(recoJets[0].eta(), 1. / (*patJets)[ind1].jecFactor("Uncorrected"));
4544  mJetEnergyCorrVSPt = map_of_MEs[DirName + "/" + "JetEnergyCorrVSPt"];
4545  if (mJetEnergyCorrVSPt && mJetEnergyCorrVSPt->getRootObject())
4546  mJetEnergyCorrVSPt->Fill(recoJets[0].pt(), 1. / (*patJets)[ind1].jecFactor("Uncorrected"));
4547  mJetEnergyCorr = map_of_MEs[DirName + "/" + "JetEnergyCorr"];
4548  if (mJetEnergyCorr && mJetEnergyCorr->getRootObject())
4549  mJetEnergyCorr->Fill(1. / (*patJets)[ind2].jecFactor("Uncorrected"));
4550  mJetEnergyCorrVSEta = map_of_MEs[DirName + "/" + "JetEnergyCorrVSEta"];
4551  if (mJetEnergyCorrVSEta && mJetEnergyCorrVSEta->getRootObject())
4552  mJetEnergyCorrVSEta->Fill(recoJets[0].eta(), 1. / (*patJets)[ind2].jecFactor("Uncorrected"));
4553  mJetEnergyCorrVSPt = map_of_MEs[DirName + "/" + "JetEnergyCorrVSPt"];
4554  if (mJetEnergyCorrVSPt && mJetEnergyCorrVSPt->getRootObject())
4555  mJetEnergyCorrVSPt->Fill(recoJets[0].pt(), 1. / (*patJets)[ind2].jecFactor("Uncorrected"));
4556 
4557  // In MINIAOD, can drop PFSpecifics just to save space, so check they are available.
4558  if ((*patJets)[ind1].hasPFSpecific()) {
4559  mCHFrac = map_of_MEs[DirName + "/" + "CHFrac"];
4560  if (mCHFrac && mCHFrac->getRootObject())
4561  mCHFrac->Fill((*patJets)[ind1].chargedHadronEnergyFraction());
4562  mNHFrac = map_of_MEs[DirName + "/" + "NHFrac"];
4563  if (mNHFrac && mNHFrac->getRootObject())
4564  mNHFrac->Fill((*patJets)[ind1].neutralHadronEnergyFraction());
4565  mPhFrac = map_of_MEs[DirName + "/" + "PhFrac"];
4566  if (mPhFrac && mPhFrac->getRootObject())
4567  mPhFrac->Fill((*patJets)[ind1].neutralEmEnergyFraction());
4568  mHFEMFrac = map_of_MEs[DirName + "/" + "HFEMFrac"];
4569  if (mHFEMFrac && mHFEMFrac->getRootObject())
4570  mHFEMFrac->Fill((*patJets)[ind1].HFEMEnergyFraction());
4571  mHFHFrac = map_of_MEs[DirName + "/" + "HFHFrac"];
4572  if (mHFHFrac && mHFHFrac->getRootObject())
4573  mHFHFrac->Fill((*patJets)[ind1].HFHadronEnergyFraction());
4574  mChargedMultiplicity = map_of_MEs[DirName + "/" + "ChargedMultiplicity"];
4575  if (mChargedMultiplicity && mChargedMultiplicity->getRootObject())
4576  mChargedMultiplicity->Fill((*patJets)[ind1].chargedMultiplicity());
4577  mNeutralMultiplicity = map_of_MEs[DirName + "/" + "NeutralMultiplicity"];
4578  if (mNeutralMultiplicity && mNeutralMultiplicity->getRootObject())
4579  mNeutralMultiplicity->Fill((*patJets)[ind1].neutralMultiplicity());
4580  mMuonMultiplicity = map_of_MEs[DirName + "/" + "MuonMultiplicity"];
4581  if (mMuonMultiplicity && mMuonMultiplicity->getRootObject())
4582  mMuonMultiplicity->Fill((*patJets)[ind1].muonMultiplicity());
4583  mNeutralFraction = map_of_MEs[DirName + "/" + "NeutralConstituentsFraction"];
4584  if (mNeutralFraction && mNeutralFraction->getRootObject())
4585  mNeutralFraction->Fill((double)(*patJets)[ind1].neutralMultiplicity() /
4586  (double)(*patJets)[ind1].nConstituents());
4587  mCHFrac_profile = map_of_MEs[DirName + "/" + "CHFrac_profile"];
4588  if (mCHFrac_profile && mCHFrac_profile->getRootObject())
4589  mCHFrac_profile->Fill(numPV, (*patJets)[ind1].chargedHadronEnergyFraction());
4590  mNHFrac_profile = map_of_MEs[DirName + "/" + "NHFrac_profile"];
4591  if (mNHFrac_profile && mNHFrac_profile->getRootObject())
4592  mNHFrac_profile->Fill(numPV, (*patJets)[ind1].neutralHadronEnergyFraction());
4593  mPhFrac_profile = map_of_MEs[DirName + "/" + "PhFrac_profile"];
4594  if (mPhFrac_profile && mPhFrac_profile->getRootObject())
4595  mPhFrac_profile->Fill(numPV, (*patJets)[ind1].neutralEmEnergyFraction());
4596  mHFEMFrac_profile = map_of_MEs[DirName + "/" + "HFEMFrac_profile"];
4597  if (mHFEMFrac_profile && mHFEMFrac_profile->getRootObject())
4598  mHFEMFrac_profile->Fill(numPV, (*patJets)[ind1].HFEMEnergyFraction());
4599  mHFHFrac_profile = map_of_MEs[DirName + "/" + "HFHFrac_profile"];
4600  if (mHFHFrac_profile && mHFHFrac_profile->getRootObject())
4601  mHFHFrac_profile->Fill(numPV, (*patJets)[ind1].HFHadronEnergyFraction());
4602  mChargedMultiplicity_profile = map_of_MEs[DirName + "/" + "ChargedMultiplicity_profile"];
4603  if (mChargedMultiplicity_profile && mChargedMultiplicity_profile->getRootObject())
4604  mChargedMultiplicity_profile->Fill(numPV, (*patJets)[ind1].chargedMultiplicity());
4605  mNeutralMultiplicity_profile = map_of_MEs[DirName + "/" + "NeutralMultiplicity_profile"];
4606  if (mNeutralMultiplicity_profile && mNeutralMultiplicity_profile->getRootObject())
4607  mNeutralMultiplicity_profile->Fill(numPV, (*patJets)[ind1].neutralMultiplicity());
4608  mMuonMultiplicity_profile = map_of_MEs[DirName + "/" + "MuonMultiplicity_profile"];
4609  if (mMuonMultiplicity_profile && mMuonMultiplicity_profile->getRootObject())
4610  mMuonMultiplicity->Fill(numPV, (*patJets)[ind1].muonMultiplicity());
4611  }
4612 
4613  // In MINIAOD, can drop PFSpecifics just to save space, so check they are available.
4614  //Filling variables for second jet
4615  if ((*patJets)[ind2].hasPFSpecific()) {
4616  mCHFrac = map_of_MEs[DirName + "/" + "CHFrac"];
4617  if (mCHFrac && mCHFrac->getRootObject())
4618  mCHFrac->Fill((*patJets)[ind2].chargedHadronEnergyFraction());
4619  mNHFrac = map_of_MEs[DirName + "/" + "NHFrac"];
4620  if (mNHFrac && mNHFrac->getRootObject())
4621  mNHFrac->Fill((*patJets)[ind2].neutralHadronEnergyFraction());
4622  mPhFrac = map_of_MEs[DirName + "/" + "PhFrac"];
4623  if (mPhFrac && mPhFrac->getRootObject())
4624  mPhFrac->Fill((*patJets)[ind2].neutralEmEnergyFraction());
4625  mHFEMFrac = map_of_MEs[DirName + "/" + "HFEMFrac"];
4626  if (mHFEMFrac && mHFEMFrac->getRootObject())
4627  mHFEMFrac->Fill((*patJets)[ind2].HFEMEnergyFraction());
4628  mHFHFrac = map_of_MEs[DirName + "/" + "HFHFrac"];
4629  if (mHFHFrac && mHFHFrac->getRootObject())
4630  mHFHFrac->Fill((*patJets)[ind2].HFHadronEnergyFraction());
4631 
4632  mChargedMultiplicity = map_of_MEs[DirName + "/" + "ChargedMultiplicity"];
4633  if (mChargedMultiplicity && mChargedMultiplicity->getRootObject())
4634  mChargedMultiplicity->Fill((*patJets)[ind2].chargedMultiplicity());
4635  mNeutralMultiplicity = map_of_MEs[DirName + "/" + "NeutralMultiplicity"];
4636  if (mNeutralMultiplicity && mNeutralMultiplicity->getRootObject())
4637  mNeutralMultiplicity->Fill((*patJets)[ind2].neutralMultiplicity());
4638  mMuonMultiplicity = map_of_MEs[DirName + "/" + "MuonMultiplicity"];
4639  if (mMuonMultiplicity && mMuonMultiplicity->getRootObject())
4640  mMuonMultiplicity->Fill((*patJets)[ind2].muonMultiplicity());
4641 
4642  mNeutralFraction = map_of_MEs[DirName + "/" + "NeutralConstituentsFraction"];
4643  if (mNeutralFraction && mNeutralFraction->getRootObject())
4644  mNeutralFraction->Fill((double)(*patJets)[ind2].neutralMultiplicity() /
4645  (double)(*patJets)[ind2].nConstituents());
4646 
4647  //now fill PATJet profiles for second leading jet
4648  mCHFrac_profile = map_of_MEs[DirName + "/" + "CHFrac_profile"];
4649  if (mCHFrac_profile && mCHFrac_profile->getRootObject())
4650  mCHFrac_profile->Fill(numPV, (*patJets)[ind2].chargedHadronEnergyFraction());
4651  mNHFrac_profile = map_of_MEs[DirName + "/" + "NHFrac_profile"];
4652  if (mNHFrac_profile && mNHFrac_profile->getRootObject())
4653  mNHFrac_profile->Fill(numPV, (*patJets)[ind2].neutralHadronEnergyFraction());
4654  mPhFrac_profile = map_of_MEs[DirName + "/" + "PhFrac_profile"];
4655  if (mPhFrac_profile && mPhFrac_profile->getRootObject())
4656  mPhFrac_profile->Fill(numPV, (*patJets)[ind2].neutralEmEnergyFraction());
4657  mHFEMFrac_profile = map_of_MEs[DirName + "/" + "HFEMFrac_profile"];
4658  if (mHFEMFrac_profile && mHFEMFrac_profile->getRootObject())
4659  mHFEMFrac_profile->Fill(numPV, (*patJets)[ind2].HFEMEnergyFraction());
4660  mHFHFrac_profile = map_of_MEs[DirName + "/" + "HFHFrac_profile"];
4661  if (mHFHFrac_profile && mHFHFrac_profile->getRootObject())
4662  mHFHFrac_profile->Fill(numPV, (*patJets)[ind2].HFHadronEnergyFraction());
4663 
4664  mChargedMultiplicity_profile = map_of_MEs[DirName + "/" + "ChargedMultiplicity_profile"];
4665  if (mChargedMultiplicity_profile && mChargedMultiplicity_profile->getRootObject())
4666  mChargedMultiplicity_profile->Fill(numPV, (*patJets)[ind2].chargedMultiplicity());
4667  mNeutralMultiplicity_profile = map_of_MEs[DirName + "/" + "NeutralMultiplicity_profile"];
4668  if (mNeutralMultiplicity_profile && mNeutralMultiplicity_profile->getRootObject())
4669  mNeutralMultiplicity_profile->Fill(numPV, (*patJets)[ind2].neutralMultiplicity());
4670  mMuonMultiplicity_profile = map_of_MEs[DirName + "/" + "MuonMultiplicity_profile"];
4671  if (mMuonMultiplicity_profile && mMuonMultiplicity_profile->getRootObject())
4672  mMuonMultiplicity_profile->Fill(numPV, (*patJets)[ind2].muonMultiplicity());
4673  }
4674  }
4675 
4676  //fill histos for first jet
4677  mPt = map_of_MEs[DirName + "/" + "Pt"];
4678  if (mPt && mPt->getRootObject())
4679  mPt->Fill(recoJets[0].pt());
4680  mEta = map_of_MEs[DirName + "/" + "Eta"];
4681  if (mEta && mEta->getRootObject())
4682  mEta->Fill(recoJets[0].eta());
4683  mPhi = map_of_MEs[DirName + "/" + "Phi"];
4684  if (mPhi && mPhi->getRootObject())
4685  mPhi->Fill(recoJets[0].phi());
4686  mPhiVSEta = map_of_MEs[DirName + "/" + "PhiVSEta"];
4687  if (mPhiVSEta && mPhiVSEta->getRootObject())
4688  mPhiVSEta->Fill(recoJets[0].eta(), recoJets[0].phi());
4689  //if(!isJPTJet_){
4690  mConstituents = map_of_MEs[DirName + "/" + "Constituents"];
4691  if (mConstituents && mConstituents->getRootObject())
4692  mConstituents->Fill(recoJets[0].nConstituents());
4693  //}
4694  mPt = map_of_MEs[DirName + "/" + "Pt"];
4695  if (mPt && mPt->getRootObject())
4696  mPt->Fill(recoJets[1].pt());
4697  mEta = map_of_MEs[DirName + "/" + "Eta"];
4698  if (mEta && mEta->getRootObject())
4699  mEta->Fill(recoJets[1].eta());
4700  mPhi = map_of_MEs[DirName + "/" + "Phi"];
4701  if (mPhi && mPhi->getRootObject())
4702  mPhi->Fill(recoJets[1].phi());
4703  mPhiVSEta = map_of_MEs[DirName + "/" + "PhiVSEta"];
4704  if (mPhiVSEta && mPhiVSEta->getRootObject())
4705  mPhiVSEta->Fill(recoJets[1].eta(), recoJets[1].phi());
4706  //if(!isJPTJet_){
4707  mConstituents = map_of_MEs[DirName + "/" + "Constituents"];
4708  if (mConstituents && mConstituents->getRootObject())
4709  mConstituents->Fill(recoJets[1].nConstituents());
4710  //}
4711  //PV profiles
4712  mPt_profile = map_of_MEs[DirName + "/" + "Pt_profile"];
4713  if (mPt_profile && mPt_profile->getRootObject())
4714  mPt_profile->Fill(numPV, recoJets[0].pt());
4715  mEta_profile = map_of_MEs[DirName + "/" + "Eta_profile"];
4716  if (mEta_profile && mEta_profile->getRootObject())
4717  mEta_profile->Fill(numPV, recoJets[0].eta());
4718  mPhi_profile = map_of_MEs[DirName + "/" + "Phi_profile"];
4719  if (mPhi_profile && mPhi_profile->getRootObject())
4720  mPhi_profile->Fill(numPV, recoJets[0].phi());
4721  //if(!isJPTJet_){
4722  mConstituents_profile = map_of_MEs[DirName + "/" + "Constituents_profile"];
4723  if (mConstituents_profile && mConstituents_profile->getRootObject())
4724  mConstituents_profile->Fill(numPV, recoJets[0].nConstituents());
4725  //}
4726  mPt_profile = map_of_MEs[DirName + "/" + "Pt_profile"];
4727  if (mPt_profile && mPt_profile->getRootObject())
4728  mPt_profile->Fill(numPV, recoJets[1].pt());
4729  mEta_profile = map_of_MEs[DirName + "/" + "Eta_profile"];
4730  if (mEta_profile && mEta_profile->getRootObject())
4731  mEta_profile->Fill(numPV, recoJets[1].eta());
4732  mPhi_profile = map_of_MEs[DirName + "/" + "Phi_profile"];
4733  if (mPhi_profile && mPhi_profile->getRootObject())
4734  mPhi_profile->Fill(numPV, recoJets[1].phi());
4735  //if(!isJPTJet_){
4736  mConstituents_profile = map_of_MEs[DirName + "/" + "Constituents_profile"];
4737  if (mConstituents_profile && mConstituents_profile->getRootObject())
4738  mConstituents_profile->Fill(numPV, recoJets[1].nConstituents());
4739  //}
4740  if (fabs(recoJets[0].eta() < 1.4)) {
4741  double pt_dijet = (recoJets[0].pt() + recoJets[1].pt()) / 2;
4742  if (dphi > 2.7) { //cut even toughter on dijet balance
4743  double pt_probe;
4744  double pt_barrel;
4745  int jet1, jet2;
4746  //int randJet = rand() % 2;
4747  int randJet = iEvent.id().event() % 2;
4748  if (fabs(recoJets[1].eta() < 1.4)) {
4749  if (randJet) {
4750  jet1 = 0;
4751  jet2 = 1;
4752  } else {
4753  jet1 = 1;
4754  jet2 = 0;
4755  }
4756  // ***Di-Jet Asymmetry****
4757  // * leading jets eta < 1.4
4758  // * leading jets dphi > 2.7
4759  // * pt_third jet < threshold
4760  // * A = (pt_1 - pt_2)/(pt_1 + pt_2)
4761  // * jets 1 and two are randomly ordered
4762  // **
4763  bool thirdJetCut = true;
4764  //that doesn't make any sense -> imagine you have 5 jets,
4765  //jet 3 is quite hard (almost as hard as the second jet, i.e. 200/80/79/20/15, cutoff is 30
4766  //the 4th and 5th jet are soft enough -> then you would fill the asymmetry twice,
4767  //although jet 2 and 3 are basically identical
4768  //do third jet relative to second jet
4769  //JME-10-014 suggests pt3/pt_dijet<0.15
4770  if (ind3 > 0) {
4771  if (pt3 > asymmetryThirdJetCut_) {
4772  thirdJetCut = false;
4773  }
4774  }
4775  if (thirdJetCut) {
4776  double dijetAsymmetry =
4777  (recoJets[jet1].pt() - recoJets[jet2].pt()) / (recoJets[jet1].pt() + recoJets[jet2].pt());
4778  mDijetAsymmetry = map_of_MEs[DirName + "/" + "DijetAsymmetry"];
4779  if (mDijetAsymmetry && mDijetAsymmetry->getRootObject())
4780  mDijetAsymmetry->Fill(dijetAsymmetry);
4781  } // end restriction on third jet pt in asymmetry calculation
4782 
4783  } else {
4784  jet1 = 0;
4785  jet2 = 1;
4786  }
4787 
4788  pt_barrel = recoJets[jet1].pt();
4789  pt_probe = recoJets[jet2].pt();
4790 
4791  //dijet balance cuts
4792  // ***Di-Jet Balance****
4793  // * pt_dijet = (pt_probe+pt_barrel)/2
4794  // * leading jets dphi > 2.7
4795  // * reject evnets where pt_third/pt_dijet > 0.2
4796  // * pv selection
4797  // * B = (pt_probe - pt_barrel)/pt_dijet
4798  // * select probe randomly from 2 jets if both leading jets are in the barrel
4799  bool thirdJetCut = true;
4800  if (ind3 > 0) {
4801  if (pt3 / pt_dijet > balanceThirdJetCut_) {
4802  thirdJetCut = false;
4803  }
4804  }
4805  if (thirdJetCut) {
4806  double dijetBalance = (pt_probe - pt_barrel) / pt_dijet;
4807  mDijetBalance = map_of_MEs[DirName + "/" + "DijetBalance"];
4808  if (mDijetBalance && mDijetBalance->getRootObject())
4809  mDijetBalance->Fill(dijetBalance);
4810  } // end restriction on third jet pt ratio in balance calculation
4811 
4812  } // dPhi > 2.7 for dijetbalance and asymmetrie
4813  } //leading jet in barrel
4814  } //DPhi cut of 2.1
4815  } //dijet selection, check if both leading jets are IDed
4816  //now do the ZJets selection -> pass_Z_selection cuts already on the Z-pt>30 GeV
4817  if (pass_Z_selection && ind1_mu_vetoed >= 0 && pt1_mu_vetoed > 12 && cleaned_first_jet_mu_vetoed && isPFJet_) {
4818  bool pass_second_jet_mu_vetoed = false;
4819  if (cleaned_second_jet_mu_vetoed) {
4820  if (ind2_mu_vetoed >= 0 && pt2_mu_vetoed / zCand.Pt() < 0.2) {
4821  pass_second_jet_mu_vetoed = true;
4822  }
4823  }
4824  if (pass_second_jet_mu_vetoed) {
4825  Jet recoJet1;
4826  if (isPFJet_) {
4827  recoJet1 = (*pfJets)[ind1_mu_vetoed];
4828  }
4829  if (pass_correction_flag && !isMiniAODJet_) {
4830  double scale = 1;
4831  if (isCaloJet_) {
4832  scale = jetCorr->correction((*caloJets)[ind1_mu_vetoed]);
4833  }
4834  if (isPFJet_) {
4835  scale = jetCorr->correction((*pfJets)[ind1_mu_vetoed]);
4836  }
4837  recoJet1.scaleEnergy(scale);
4838  }
4839  double dphi = fabs(recoJet1.phi() - zCand.Phi());
4840  if (dphi > acos(-1.)) {
4841  dphi = 2 * acos(-1.) - dphi;
4842  }
4843  if (jetCleaningFlag_) {
4844  DirName = "JetMET/Jet/Cleaned" + mInputCollection_.label() + "/ZJets";
4845  }
4846  mDPhiZJet = map_of_MEs[DirName + "/" + "DPhiZJ"];
4847  if (mDPhiZJet && mDPhiZJet->getRootObject())
4848  mDPhiZJet->Fill(dphi);
4849  if (fabs(dphi - acos(-1.)) < 0.34) {
4850  //get now MET collections for MPF studies
4853  //edm::Handle<pat::METCollection> patmetcoll;
4854  const MET* met = nullptr;
4855  if (isCaloJet_) {
4856  iEvent.getByToken(caloMetToken_, calometcoll);
4857  if (!calometcoll.isValid())
4858  return;
4859  met = &(calometcoll->front());
4860  }
4861  if (isPFJet_) {
4862  iEvent.getByToken(pfMetToken_, pfmetcoll);
4863  if (!pfmetcoll.isValid())
4864  return;
4865  met = &(pfmetcoll->front());
4866  }
4867  //if(isMiniAODJet_){
4868  //iEvent.getByToken(patMetToken_, patmetcoll);
4869  //if(!patmetcoll.isValid()) return;
4870  //met=&(patmetcoll->front());
4871  //}
4872  mZMass = map_of_MEs[DirName + "/" + "DiMuonMass"];
4873  if (mZMass && mZMass->getRootObject())
4874  mZMass->Fill(zCand.M());
4875  mZJetAsymmetry = map_of_MEs[DirName + "/" + "ZJetAsymmetry"];
4876  if (mZJetAsymmetry && mZJetAsymmetry->getRootObject())
4877  mZJetAsymmetry->Fill((zCand.Pt() - recoJet1.pt()) / (zCand.Pt() + recoJet1.pt()));
4878  if (recoJet1.pt() > 20) {
4879  mPt = map_of_MEs[DirName + "/" + "Pt"];
4880  if (mPt && mPt->getRootObject())
4881  mPt->Fill(recoJet1.pt());
4882  mEta = map_of_MEs[DirName + "/" + "Eta"];
4883  if (mEta && mEta->getRootObject())
4884  mEta->Fill(recoJet1.eta());
4885  mPhi = map_of_MEs[DirName + "/" + "Phi"];
4886  if (mPhi && mPhi->getRootObject())
4887  mPhi->Fill(recoJet1.phi());
4888  //PV profiles
4889  mPt_profile = map_of_MEs[DirName + "/" + "Pt_profile"];
4890  if (mPt_profile && mPt_profile->getRootObject())
4891  mPt_profile->Fill(numPV, recoJet1.pt());
4892  mEta_profile = map_of_MEs[DirName + "/" + "Eta_profile"];
4893  if (mEta_profile && mEta_profile->getRootObject())
4894  mEta_profile->Fill(numPV, recoJet1.eta());
4895  mPhi_profile = map_of_MEs[DirName + "/" + "Phi_profile"];
4896  if (mPhi_profile && mPhi_profile->getRootObject())
4897  mPhi_profile->Fill(numPV, recoJet1.phi());
4898  mConstituents = map_of_MEs[DirName + "/" + "Constituents"];
4899  if (mConstituents && mConstituents->getRootObject())
4900  mConstituents->Fill(recoJet1.nConstituents());
4901  mConstituents_profile = map_of_MEs[DirName + "/" + "Constituents_profile"];
4902  if (mConstituents_profile && mConstituents_profile->getRootObject())
4903  mConstituents_profile->Fill(numPV, recoJet1.nConstituents());
4904  mJetEnergyCorr = map_of_MEs[DirName + "/" + "JetEnergyCorr"];
4905  if (mJetEnergyCorr && mJetEnergyCorr->getRootObject())
4906  mJetEnergyCorr->Fill(recoJet1.pt() / (*pfJets)[ind1_mu_vetoed].pt());
4907  mJetEnergyCorrVSEta = map_of_MEs[DirName + "/" + "JetEnergyCorrVSEta"];
4908  if (mJetEnergyCorrVSEta && mJetEnergyCorrVSEta->getRootObject())
4909  mJetEnergyCorrVSEta->Fill(recoJet1.eta(), recoJet1.pt() / (*pfJets)[ind1_mu_vetoed].pt());
4910  mJetEnergyCorrVSPt = map_of_MEs[DirName + "/" + "JetEnergyCorrVSPt"];
4911  if (mJetEnergyCorrVSPt && mJetEnergyCorrVSPt->getRootObject())
4912  mJetEnergyCorrVSPt->Fill(recoJet1.pt(), recoJet1.pt() / (*pfJets)[ind1_mu_vetoed].pt());
4913  mCHFrac = map_of_MEs[DirName + "/" + "CHFrac"];
4914  if (mCHFrac && mCHFrac->getRootObject())
4915  mCHFrac->Fill((*pfJets)[ind1_mu_vetoed].chargedHadronEnergyFraction());
4916  mNHFrac = map_of_MEs[DirName + "/" + "NHFrac"];
4917  if (mNHFrac && mNHFrac->getRootObject())
4918  mNHFrac->Fill((*pfJets)[ind1_mu_vetoed].neutralHadronEnergyFraction());
4919  mPhFrac = map_of_MEs[DirName + "/" + "PhFrac"];
4920  if (mPhFrac && mPhFrac->getRootObject())
4921  mPhFrac->Fill((*pfJets)[ind1_mu_vetoed].neutralEmEnergyFraction());
4922  mHFEMFrac = map_of_MEs[DirName + "/" + "HFEMFrac"];
4923  if (mHFEMFrac && mHFEMFrac->getRootObject())
4924  mHFEMFrac->Fill((*pfJets)[ind1_mu_vetoed].HFEMEnergyFraction());
4925  mHFHFrac = map_of_MEs[DirName + "/" + "HFHFrac"];
4926  if (mHFHFrac && mHFHFrac->getRootObject())
4927  mHFHFrac->Fill((*pfJets)[ind1_mu_vetoed].HFHadronEnergyFraction());
4928  //now fill PFJet profiles for second leading jet
4929  mCHFrac_profile = map_of_MEs[DirName + "/" + "CHFrac_profile"];
4930  if (mCHFrac_profile && mCHFrac_profile->getRootObject())
4931  mCHFrac_profile->Fill(numPV, (*pfJets)[ind1_mu_vetoed].chargedHadronEnergyFraction());
4932  mNHFrac_profile = map_of_MEs[DirName + "/" + "NHFrac_profile"];
4933  if (mNHFrac_profile && mNHFrac_profile->getRootObject())
4934  mNHFrac_profile->Fill(numPV, (*pfJets)[ind1_mu_vetoed].neutralHadronEnergyFraction());
4935  mPhFrac_profile = map_of_MEs[DirName + "/" + "PhFrac_profile"];
4936  if (mPhFrac_profile && mPhFrac_profile->getRootObject())
4937  mPhFrac_profile->Fill(numPV, (*pfJets)[ind1_mu_vetoed].neutralEmEnergyFraction());
4938  mHFEMFrac_profile = map_of_MEs[DirName + "/" + "HFEMFrac_profile"];
4939  if (mHFEMFrac_profile && mHFEMFrac_profile->getRootObject())
4940  mHFEMFrac_profile->Fill(numPV, (*pfJets)[ind1_mu_vetoed].HFEMEnergyFraction());
4941  mHFHFrac_profile = map_of_MEs[DirName + "/" + "HFHFrac_profile"];
4942  if (mHFHFrac_profile && mHFHFrac_profile->getRootObject())
4943  mHFHFrac_profile->Fill(numPV, (*pfJets)[ind1_mu_vetoed].HFHadronEnergyFraction());
4944  }
4945  double MPF = 1. + (met->px() * zCand.Px() + met->py() * zCand.Py()) / (zCand.Pt() * zCand.Pt());
4946  if (fabs(recoJet1.eta()) < 1.3) { //barrel jets
4947  mJ1Pt_over_ZPt_J_Barrel = map_of_MEs[DirName + "/" + "J1Pt_over_ZPt_J_Barrel"];
4948  if (mJ1Pt_over_ZPt_J_Barrel && mJ1Pt_over_ZPt_J_Barrel->getRootObject())
4949  mJ1Pt_over_ZPt_J_Barrel->Fill(recoJet1.pt() / zCand.Pt());
4950  mMPF_J_Barrel = map_of_MEs[DirName + "/" + "MPF_J_Barrel"];
4951  if (mMPF_J_Barrel && mMPF_J_Barrel->getRootObject())
4952  mMPF_J_Barrel->Fill(MPF);
4953  if (zCand.Pt() < 90) { //lower cut on 30 already right from the start
4954  mJetZBalance_lowZPt_J_Barrel = map_of_MEs[DirName + "/" + "JZB_lowZPt_J_Barrel"];
4955  if (mJetZBalance_lowZPt_J_Barrel && mJetZBalance_lowZPt_J_Barrel->getRootObject())
4956  mJetZBalance_lowZPt_J_Barrel->Fill(recoJet1.pt() - zCand.Pt());
4957  mJ1Pt_over_ZPt_lowZPt_J_Barrel = map_of_MEs[DirName + "/" + "J1Pt_over_ZPt_lowZPt_J_Barrel"];
4958  if (mJ1Pt_over_ZPt_lowZPt_J_Barrel && mJ1Pt_over_ZPt_lowZPt_J_Barrel->getRootObject())
4959  mJ1Pt_over_ZPt_lowZPt_J_Barrel->Fill(recoJet1.pt() / zCand.Pt());
4960  mMPF_lowZPt_J_Barrel = map_of_MEs[DirName + "/" + "MPF_lowZPt_J_Barrel"];
4961  if (mMPF_lowZPt_J_Barrel && mMPF_lowZPt_J_Barrel->getRootObject())
4962  mMPF_lowZPt_J_Barrel->Fill(MPF);
4963  //mMPF_J_Barrel = map_of_MEs[DirName+"/"+"MPF_J_Barrel"]; if(mMPF_J_Barrel && mMPF_J_Barrel->getRootObject())mMPF_J_Barrel->Fill(MPF);
4964  } else if (zCand.Pt() < 140) {
4965  mJetZBalance_mediumZPt_J_Barrel = map_of_MEs[DirName + "/" + "JZB_mediumZPt_J_Barrel"];
4966  if (mJetZBalance_mediumZPt_J_Barrel && mJetZBalance_mediumZPt_J_Barrel->getRootObject())
4967  mJetZBalance_mediumZPt_J_Barrel->Fill(recoJet1.pt() - zCand.Pt());
4968  mJ1Pt_over_ZPt_mediumZPt_J_Barrel = map_of_MEs[DirName + "/" + "J1Pt_over_ZPt_mediumZPt_J_Barrel"];
4969  if (mJ1Pt_over_ZPt_mediumZPt_J_Barrel && mJ1Pt_over_ZPt_mediumZPt_J_Barrel->getRootObject())
4970  mJ1Pt_over_ZPt_mediumZPt_J_Barrel->Fill(recoJet1.pt() / zCand.Pt());
4971  mMPF_mediumZPt_J_Barrel = map_of_MEs[DirName + "/" + "MPF_mediumZPt_J_Barrel"];
4972  if (mMPF_mediumZPt_J_Barrel && mMPF_mediumZPt_J_Barrel->getRootObject())
4973  mMPF_mediumZPt_J_Barrel->Fill(MPF);
4974  } else {
4975  mJetZBalance_highZPt_J_Barrel = map_of_MEs[DirName + "/" + "JZB_highZPt_J_Barrel"];
4976  if (mJetZBalance_highZPt_J_Barrel && mJetZBalance_highZPt_J_Barrel->getRootObject())
4977  mJetZBalance_highZPt_J_Barrel->Fill(recoJet1.pt() - zCand.Pt());
4978  mJ1Pt_over_ZPt_highZPt_J_Barrel = map_of_MEs[DirName + "/" + "J1Pt_over_ZPt_highZPt_J_Barrel"];
4979  if (mJ1Pt_over_ZPt_highZPt_J_Barrel && mJ1Pt_over_ZPt_highZPt_J_Barrel->getRootObject())
4980  mJ1Pt_over_ZPt_highZPt_J_Barrel->Fill(recoJet1.pt() / zCand.Pt());
4981  mMPF_highZPt_J_Barrel = map_of_MEs[DirName + "/" + "MPF_highZPt_J_Barrel"];
4982  if (mMPF_highZPt_J_Barrel && mMPF_highZPt_J_Barrel->getRootObject())
4983  mMPF_highZPt_J_Barrel->Fill(MPF);
4984  }
4985  if (zCand.Pt() > 30) {
4986  if (zCand.Pt() < 55) {
4987  mDeltaPt_Z_j1_over_ZPt_30_55_J_Barrel =
4988  map_of_MEs[DirName + "/" + "DeltaPt_Z_j1_over_ZPt_30_55_J_Barrel"];
4989  if (mDeltaPt_Z_j1_over_ZPt_30_55_J_Barrel && mDeltaPt_Z_j1_over_ZPt_30_55_J_Barrel->getRootObject())
4990  mDeltaPt_Z_j1_over_ZPt_30_55_J_Barrel->Fill((zCand.Pt() - recoJet1.pt()) / zCand.Pt());
4991  } else if (zCand.Pt() < 75) {
4992  mDeltaPt_Z_j1_over_ZPt_55_75_J_Barrel =
4993  map_of_MEs[DirName + "/" + "DeltaPt_Z_j1_over_ZPt_55_75_J_Barrel"];
4994  if (mDeltaPt_Z_j1_over_ZPt_55_75_J_Barrel && mDeltaPt_Z_j1_over_ZPt_55_75_J_Barrel->getRootObject())
4995  mDeltaPt_Z_j1_over_ZPt_55_75_J_Barrel->Fill((zCand.Pt() - recoJet1.pt()) / zCand.Pt());
4996  } else if (zCand.Pt() < 150) {
4997  mDeltaPt_Z_j1_over_ZPt_75_150_J_Barrel =
4998  map_of_MEs[DirName + "/" + "DeltaPt_Z_j1_over_ZPt_75_150_J_Barrel"];
4999  if (mDeltaPt_Z_j1_over_ZPt_75_150_J_Barrel && mDeltaPt_Z_j1_over_ZPt_75_150_J_Barrel->getRootObject())
5000  mDeltaPt_Z_j1_over_ZPt_75_150_J_Barrel->Fill((zCand.Pt() - recoJet1.pt()) / zCand.Pt());
5001  } else if (zCand.Pt() < 290) {
5002  mDeltaPt_Z_j1_over_ZPt_150_290_J_Barrel =
5003  map_of_MEs[DirName + "/" + "DeltaPt_Z_j1_over_ZPt_150_290_J_Barrel"];
5004  if (mDeltaPt_Z_j1_over_ZPt_150_290_J_Barrel && mDeltaPt_Z_j1_over_ZPt_150_290_J_Barrel->getRootObject())
5005  mDeltaPt_Z_j1_over_ZPt_150_290_J_Barrel->Fill((zCand.Pt() - recoJet1.pt()) / zCand.Pt());
5006  } else {
5007  mDeltaPt_Z_j1_over_ZPt_290_J_Barrel = map_of_MEs[DirName + "/" + "DeltaPt_Z_j1_over_ZPt_290_J_Barrel"];
5008  if (mDeltaPt_Z_j1_over_ZPt_290_J_Barrel && mDeltaPt_Z_j1_over_ZPt_290_J_Barrel->getRootObject())
5009  mDeltaPt_Z_j1_over_ZPt_290_J_Barrel->Fill((zCand.Pt() - recoJet1.pt()) / zCand.Pt());
5010  }
5011  }
5012  } else if (fabs(recoJet1.eta()) < 3.0) { //endcap jets
5013  mJ1Pt_over_ZPt_J_EndCap = map_of_MEs[DirName + "/" + "J1Pt_over_ZPt_J_EndCap"];
5014  if (mJ1Pt_over_ZPt_J_EndCap && mJ1Pt_over_ZPt_J_EndCap->getRootObject())
5015  mJ1Pt_over_ZPt_J_EndCap->Fill(recoJet1.pt() / zCand.Pt());
5016  mMPF_J_EndCap = map_of_MEs[DirName + "/" + "MPF_J_EndCap"];
5017  if (mMPF_J_EndCap && mMPF_J_EndCap->getRootObject())
5018  mMPF_J_EndCap->Fill(MPF);
5019  if (zCand.Pt() < 90) { //lower cut on 30 already right from the start
5020  mJetZBalance_lowZPt_J_EndCap = map_of_MEs[DirName + "/" + "JZB_lowZPt_J_EndCap"];
5021  if (mJetZBalance_lowZPt_J_EndCap && mJetZBalance_lowZPt_J_EndCap->getRootObject())
5022  mJetZBalance_lowZPt_J_EndCap->Fill(recoJet1.pt() - zCand.Pt());
5023  mJ1Pt_over_ZPt_lowZPt_J_EndCap = map_of_MEs[DirName + "/" + "J1Pt_over_ZPt_lowZPt_J_EndCap"];
5024  if (mJ1Pt_over_ZPt_lowZPt_J_EndCap && mJ1Pt_over_ZPt_lowZPt_J_EndCap->getRootObject())
5025  mJ1Pt_over_ZPt_lowZPt_J_EndCap->Fill(recoJet1.pt() / zCand.Pt());
5026  mMPF_lowZPt_J_EndCap = map_of_MEs[DirName + "/" + "MPF_lowZPt_J_EndCap"];
5027  if (mMPF_lowZPt_J_EndCap && mMPF_lowZPt_J_EndCap->getRootObject())
5028  mMPF_lowZPt_J_EndCap->Fill(MPF);
5029  } else if (zCand.Pt() < 140) {
5030  mJetZBalance_mediumZPt_J_EndCap = map_of_MEs[DirName + "/" + "JZB_mediumZPt_J_EndCap"];
5031  if (mJetZBalance_mediumZPt_J_EndCap && mJetZBalance_mediumZPt_J_EndCap->getRootObject())
5032  mJetZBalance_mediumZPt_J_EndCap->Fill(recoJet1.pt() - zCand.Pt());
5033  mJ1Pt_over_ZPt_mediumZPt_J_EndCap = map_of_MEs[DirName + "/" + "J1Pt_over_ZPt_mediumZPt_J_EndCap"];
5034  if (mJ1Pt_over_ZPt_mediumZPt_J_EndCap && mJ1Pt_over_ZPt_mediumZPt_J_EndCap->getRootObject())
5035  mJ1Pt_over_ZPt_mediumZPt_J_EndCap->Fill(recoJet1.pt() / zCand.Pt());
5036  mMPF_mediumZPt_J_EndCap = map_of_MEs[DirName + "/" + "MPF_mediumZPt_J_EndCap"];
5037  if (mMPF_mediumZPt_J_EndCap && mMPF_mediumZPt_J_EndCap->getRootObject())
5038  mMPF_mediumZPt_J_EndCap->Fill(MPF);
5039  } else {
5040  mJetZBalance_highZPt_J_EndCap = map_of_MEs[DirName + "/" + "JZB_highZPt_J_EndCap"];
5041  if (mJetZBalance_highZPt_J_EndCap && mJetZBalance_highZPt_J_EndCap->getRootObject())
5042  mJetZBalance_highZPt_J_EndCap->Fill(recoJet1.pt() - zCand.Pt());
5043  mJ1Pt_over_ZPt_highZPt_J_EndCap = map_of_MEs[DirName + "/" + "J1Pt_over_ZPt_highZPt_J_EndCap"];
5044  if (mJ1Pt_over_ZPt_highZPt_J_EndCap && mJ1Pt_over_ZPt_highZPt_J_EndCap->getRootObject())
5045  mJ1Pt_over_ZPt_highZPt_J_EndCap->Fill(recoJet1.pt() / zCand.Pt());
5046  mMPF_highZPt_J_EndCap = map_of_MEs[DirName + "/" + "MPF_highZPt_J_EndCap"];
5047  if (mMPF_highZPt_J_EndCap && mMPF_highZPt_J_EndCap->getRootObject())
5048  mMPF_highZPt_J_EndCap->Fill(MPF);
5049  }
5050  if (zCand.Pt() > 30) {
5051  if (zCand.Pt() < 55) {
5052  mDeltaPt_Z_j1_over_ZPt_30_55_J_EndCap =
5053  map_of_MEs[DirName + "/" + "DeltaPt_Z_j1_over_ZPt_30_55_J_EndCap"];
5054  if (mDeltaPt_Z_j1_over_ZPt_30_55_J_EndCap && mDeltaPt_Z_j1_over_ZPt_30_55_J_EndCap->getRootObject())
5055  mDeltaPt_Z_j1_over_ZPt_30_55_J_EndCap->Fill((zCand.Pt() - recoJet1.pt()) / zCand.Pt());
5056  } else if (zCand.Pt() < 75) {
5057  mDeltaPt_Z_j1_over_ZPt_55_75_J_EndCap =
5058  map_of_MEs[DirName + "/" + "DeltaPt_Z_j1_over_ZPt_55_75_J_EndCap"];
5059  if (mDeltaPt_Z_j1_over_ZPt_55_75_J_EndCap && mDeltaPt_Z_j1_over_ZPt_55_75_J_EndCap->getRootObject())
5060  mDeltaPt_Z_j1_over_ZPt_55_75_J_EndCap->Fill((zCand.Pt() - recoJet1.pt()) / zCand.Pt());
5061  } else if (zCand.Pt() < 150) {
5062  mDeltaPt_Z_j1_over_ZPt_75_150_J_EndCap =
5063  map_of_MEs[DirName + "/" + "DeltaPt_Z_j1_over_ZPt_75_150_J_EndCap"];
5064  if (mDeltaPt_Z_j1_over_ZPt_75_150_J_EndCap && mDeltaPt_Z_j1_over_ZPt_75_150_J_EndCap->getRootObject())
5065  mDeltaPt_Z_j1_over_ZPt_75_150_J_EndCap->Fill((zCand.Pt() - recoJet1.pt()) / zCand.Pt());
5066  } else if (zCand.Pt() < 290) {
5067  mDeltaPt_Z_j1_over_ZPt_150_290_J_EndCap =
5068  map_of_MEs[DirName + "/" + "DeltaPt_Z_j1_over_ZPt_150_290_J_EndCap"];
5069  if (mDeltaPt_Z_j1_over_ZPt_150_290_J_EndCap && mDeltaPt_Z_j1_over_ZPt_150_290_J_EndCap->getRootObject())
5070  mDeltaPt_Z_j1_over_ZPt_150_290_J_EndCap->Fill((zCand.Pt() - recoJet1.pt()) / zCand.Pt());
5071  } else {
5072  mDeltaPt_Z_j1_over_ZPt_290_J_EndCap = map_of_MEs[DirName + "/" + "DeltaPt_Z_j1_over_ZPt_290_J_EndCap"];
5073  if (mDeltaPt_Z_j1_over_ZPt_290_J_EndCap && mDeltaPt_Z_j1_over_ZPt_290_J_EndCap->getRootObject())
5074  mDeltaPt_Z_j1_over_ZPt_290_J_EndCap->Fill((zCand.Pt() - recoJet1.pt()) / zCand.Pt());
5075  }
5076  }
5077  } else { //forward jets
5078  mJ1Pt_over_ZPt_J_Forward = map_of_MEs[DirName + "/" + "J1Pt_over_ZPt_J_Forward"];
5079  if (mJ1Pt_over_ZPt_J_Forward && mJ1Pt_over_ZPt_J_Forward->getRootObject())
5080  mJ1Pt_over_ZPt_J_Forward->Fill(recoJet1.pt() / zCand.Pt());
5081  mMPF_J_Forward = map_of_MEs[DirName + "/" + "MPF_J_Forward"];
5082  if (mMPF_J_Forward && mMPF_J_Forward->getRootObject())
5083  mMPF_J_Forward->Fill(MPF);
5084  if (zCand.Pt() < 90) { //lower cut on 30 already right from the start
5085  mJetZBalance_lowZPt_J_Forward = map_of_MEs[DirName + "/" + "JZB_lowZPt_J_Forward"];
5086  if (mJetZBalance_lowZPt_J_Forward && mJetZBalance_lowZPt_J_Forward->getRootObject())
5087  mJetZBalance_lowZPt_J_Forward->Fill(recoJet1.pt() - zCand.Pt());
5088  mJ1Pt_over_ZPt_lowZPt_J_Forward = map_of_MEs[DirName + "/" + "J1Pt_over_ZPt_lowZPt_J_Forward"];
5089  if (mJ1Pt_over_ZPt_lowZPt_J_Forward && mJ1Pt_over_ZPt_lowZPt_J_Forward->getRootObject())
5090  mJ1Pt_over_ZPt_lowZPt_J_Forward->Fill(recoJet1.pt() / zCand.Pt());
5091  mMPF_lowZPt_J_Forward = map_of_MEs[DirName + "/" + "MPF_lowZPt_J_Forward"];
5092  if (mMPF_lowZPt_J_Forward && mMPF_lowZPt_J_Forward->getRootObject())
5093  mMPF_lowZPt_J_Forward->Fill(MPF);
5094  } else if (zCand.Pt() < 140) {
5095  mJetZBalance_mediumZPt_J_Forward = map_of_MEs[DirName + "/" + "JZB_mediumZPt_J_Forward"];
5096  if (mJetZBalance_mediumZPt_J_Forward && mJetZBalance_mediumZPt_J_Forward->getRootObject())
5097  mJetZBalance_mediumZPt_J_Forward->Fill(recoJet1.pt() - zCand.Pt());
5098  mJ1Pt_over_ZPt_mediumZPt_J_Forward = map_of_MEs[DirName + "/" + "J1Pt_over_ZPt_mediumZPt_J_Forward"];
5099  if (mJ1Pt_over_ZPt_mediumZPt_J_Forward && mJ1Pt_over_ZPt_mediumZPt_J_Forward->getRootObject())
5100  mJ1Pt_over_ZPt_mediumZPt_J_Forward->Fill(recoJet1.pt() / zCand.Pt());
5101  mMPF_mediumZPt_J_Forward = map_of_MEs[DirName + "/" + "MPF_mediumZPt_J_Forward"];
5102  if (mMPF_mediumZPt_J_Forward && mMPF_mediumZPt_J_Forward->getRootObject())
5103  mMPF_mediumZPt_J_Forward->Fill(MPF);
5104  } else {
5105  mJetZBalance_highZPt_J_Forward = map_of_MEs[DirName + "/" + "JZB_highZPt_J_Forward"];
5106  if (mJetZBalance_highZPt_J_Forward && mJetZBalance_highZPt_J_Forward->getRootObject())
5107  mJetZBalance_highZPt_J_Forward->Fill(recoJet1.pt() - zCand.Pt());
5108  mJ1Pt_over_ZPt_highZPt_J_Forward = map_of_MEs[DirName + "/" + "J1Pt_over_ZPt_highZPt_J_Forward"];
5109  if (mJ1Pt_over_ZPt_highZPt_J_Forward && mJ1Pt_over_ZPt_highZPt_J_Forward->getRootObject())
5110  mJ1Pt_over_ZPt_highZPt_J_Forward->Fill(recoJet1.pt() / zCand.Pt());
5111  mMPF_highZPt_J_Forward = map_of_MEs[DirName + "/" + "MPF_highZPt_J_Forward"];
5112  if (mMPF_highZPt_J_Forward && mMPF_highZPt_J_Forward->getRootObject())
5113  mMPF_highZPt_J_Forward->Fill(MPF);
5114  }
5115  if (zCand.Pt() > 30) {
5116  if (zCand.Pt() < 55) {
5117  mDeltaPt_Z_j1_over_ZPt_30_55_J_Forward =
5118  map_of_MEs[DirName + "/" + "DeltaPt_Z_j1_over_ZPt_30_55_J_Forward"];
5119  if (mDeltaPt_Z_j1_over_ZPt_30_55_J_Forward && mDeltaPt_Z_j1_over_ZPt_30_55_J_Forward->getRootObject())
5120  mDeltaPt_Z_j1_over_ZPt_30_55_J_Forward->Fill((zCand.Pt() - recoJet1.pt()) / zCand.Pt());
5121  } else if (zCand.Pt() < 100) {
5122  mDeltaPt_Z_j1_over_ZPt_55_100_J_Forward =
5123  map_of_MEs[DirName + "/" + "DeltaPt_Z_j1_over_ZPt_55_100_J_Forward"];
5124  if (mDeltaPt_Z_j1_over_ZPt_55_100_J_Forward && mDeltaPt_Z_j1_over_ZPt_55_100_J_Forward->getRootObject())
5125  mDeltaPt_Z_j1_over_ZPt_55_100_J_Forward->Fill((zCand.Pt() - recoJet1.pt()) / zCand.Pt());
5126  } else {
5127  mDeltaPt_Z_j1_over_ZPt_100_J_Forward = map_of_MEs[DirName + "/" + "DeltaPt_Z_j1_over_ZPt_100_J_Forward"];
5128  if (mDeltaPt_Z_j1_over_ZPt_100_J_Forward && mDeltaPt_Z_j1_over_ZPt_100_J_Forward->getRootObject())
5129  mDeltaPt_Z_j1_over_ZPt_100_J_Forward->Fill((zCand.Pt() - recoJet1.pt()) / zCand.Pt());
5130  }
5131  }
5132  }
5133  int QGmulti = -1;
5134  float QGLikelihood = -10;
5135  float QGptD = -10;
5136  float QGaxis2 = -10;
5137  if (fill_CHS_histos) {
5138  reco::PFJetRef pfjetref(pfJets, ind1_mu_vetoed);
5139  QGmulti = (*qgMultiplicity)[pfjetref];
5140  QGLikelihood = (*qgLikelihood)[pfjetref];
5141  QGptD = (*qgptD)[pfjetref];
5142  QGaxis2 = (*qgaxis2)[pfjetref];
5143  if (fabs(recoJet1.eta()) < 1.3) { //barrel jets
5144  //fractions for barrel
5145  if (recoJet1.pt() >= 20. && recoJet1.pt() <= 50.) {
5146  mAxis2_lowPt_Barrel = map_of_MEs[DirName + "/" + "qg_Axis2_lowPt_Barrel"];
5147  if (mAxis2_lowPt_Barrel && mAxis2_lowPt_Barrel->getRootObject())
5148  mAxis2_lowPt_Barrel->Fill(QGaxis2);
5149  mpTD_lowPt_Barrel = map_of_MEs[DirName + "/" + "qg_pTD_lowPt_Barrel"];
5150  if (mpTD_lowPt_Barrel && mpTD_lowPt_Barrel->getRootObject())
5151  mpTD_lowPt_Barrel->Fill(QGptD);
5152  mMultiplicityQG_lowPt_Barrel = map_of_MEs[DirName + "/" + "qg_multiplicity_lowPt_Barrel"];
5153  if (mMultiplicityQG_lowPt_Barrel && mMultiplicityQG_lowPt_Barrel->getRootObject())
5154  mMultiplicityQG_lowPt_Barrel->Fill(QGmulti);
5155  mqgLikelihood_lowPt_Barrel = map_of_MEs[DirName + "/" + "qg_Likelihood_lowPt_Barrel"];
5156  if (mqgLikelihood_lowPt_Barrel && mqgLikelihood_lowPt_Barrel->getRootObject())
5157  mqgLikelihood_lowPt_Barrel->Fill(QGLikelihood);
5158  }
5159  if (recoJet1.pt() > 50. && recoJet1.pt() <= 140.) {
5160  mAxis2_mediumPt_Barrel = map_of_MEs[DirName + "/" + "qg_Axis2_mediumPt_Barrel"];
5161  if (mAxis2_mediumPt_Barrel && mAxis2_mediumPt_Barrel->getRootObject())
5162  mAxis2_mediumPt_Barrel->Fill(QGaxis2);
5163  mpTD_mediumPt_Barrel = map_of_MEs[DirName + "/" + "qg_pTD_mediumPt_Barrel"];
5164  if (mpTD_mediumPt_Barrel && mpTD_mediumPt_Barrel->getRootObject())
5165  mpTD_mediumPt_Barrel->Fill(QGptD);
5166  mMultiplicityQG_mediumPt_Barrel = map_of_MEs[DirName + "/" + "qg_multiplicity_mediumPt_Barrel"];
5167  if (mMultiplicityQG_mediumPt_Barrel && mMultiplicityQG_mediumPt_Barrel->getRootObject())
5168  mMultiplicityQG_mediumPt_Barrel->Fill(QGmulti);
5169  mqgLikelihood_mediumPt_Barrel = map_of_MEs[DirName + "/" + "qg_Likelihood_mediumPt_Barrel"];
5170  if (mqgLikelihood_mediumPt_Barrel && mqgLikelihood_mediumPt_Barrel->getRootObject())
5171  mqgLikelihood_mediumPt_Barrel->Fill(QGLikelihood);
5172  }
5173  if (recoJet1.pt() > 140.) {
5174  mAxis2_highPt_Barrel = map_of_MEs[DirName + "/" + "qg_Axis2_highPt_Barrel"];
5175  if (mAxis2_highPt_Barrel && mAxis2_highPt_Barrel->getRootObject())
5176  mAxis2_highPt_Barrel->Fill(QGaxis2);
5177  mpTD_highPt_Barrel = map_of_MEs[DirName + "/" + "qg_pTD_highPt_Barrel"];
5178  if (mpTD_highPt_Barrel && mpTD_highPt_Barrel->getRootObject())
5179  mpTD_highPt_Barrel->Fill(QGptD);
5180  mMultiplicityQG_highPt_Barrel = map_of_MEs[DirName + "/" + "qg_multiplicity_highPt_Barrel"];
5181  if (mMultiplicityQG_highPt_Barrel && mMultiplicityQG_highPt_Barrel->getRootObject())
5182  mMultiplicityQG_highPt_Barrel->Fill(QGmulti);
5183  mqgLikelihood_highPt_Barrel = map_of_MEs[DirName + "/" + "qg_Likelihood_highPt_Barrel"];
5184  if (mqgLikelihood_highPt_Barrel && mqgLikelihood_highPt_Barrel->getRootObject())
5185  mqgLikelihood_highPt_Barrel->Fill(QGLikelihood);
5186  }
5187  } else if (fabs(recoJet1.eta()) < 3.0) { //endcap jets
5188  if (recoJet1.pt() > 20. && recoJet1.pt() <= 50.) {
5189  mAxis2_lowPt_EndCap = map_of_MEs[DirName + "/" + "qg_Axis2_lowPt_EndCap"];
5190  if (mAxis2_lowPt_EndCap && mAxis2_lowPt_EndCap->getRootObject())
5191  mAxis2_lowPt_EndCap->Fill(QGaxis2);
5192  mpTD_lowPt_EndCap = map_of_MEs[DirName + "/" + "qg_pTD_lowPt_EndCap"];
5193  if (mpTD_lowPt_EndCap && mpTD_lowPt_EndCap->getRootObject())
5194  mpTD_lowPt_EndCap->Fill(QGptD);
5195  mMultiplicityQG_lowPt_EndCap = map_of_MEs[DirName + "/" + "qg_multiplicity_lowPt_EndCap"];
5196  if (mMultiplicityQG_lowPt_EndCap && mMultiplicityQG_lowPt_EndCap->getRootObject())
5197  mMultiplicityQG_lowPt_EndCap->Fill(QGmulti);
5198  mqgLikelihood_lowPt_EndCap = map_of_MEs[DirName + "/" + "qg_Likelihood_lowPt_EndCap"];
5199  if (mqgLikelihood_lowPt_EndCap && mqgLikelihood_lowPt_EndCap->getRootObject())
5200  mqgLikelihood_lowPt_EndCap->Fill(QGLikelihood);
5201  }
5202  if (recoJet1.pt() > 50. && recoJet1.pt() <= 140.) {
5203  mAxis2_mediumPt_EndCap = map_of_MEs[DirName + "/" + "qg_Axis2_mediumPt_EndCap"];
5204  if (mAxis2_mediumPt_EndCap && mAxis2_mediumPt_EndCap->getRootObject())
5205  mAxis2_mediumPt_EndCap->Fill(QGaxis2);
5206  mpTD_mediumPt_EndCap = map_of_MEs[DirName + "/" + "qg_pTD_mediumPt_EndCap"];
5207  if (mpTD_mediumPt_EndCap && mpTD_mediumPt_EndCap->getRootObject())
5208  mpTD_mediumPt_EndCap->Fill(QGptD);
5209  mMultiplicityQG_mediumPt_EndCap = map_of_MEs[DirName + "/" + "qg_multiplicity_mediumPt_EndCap"];
5210  if (mMultiplicityQG_mediumPt_EndCap && mMultiplicityQG_mediumPt_EndCap->getRootObject())
5211  mMultiplicityQG_mediumPt_EndCap->Fill(QGmulti);
5212  mqgLikelihood_mediumPt_EndCap = map_of_MEs[DirName + "/" + "qg_Likelihood_mediumPt_EndCap"];
5213  if (mqgLikelihood_mediumPt_EndCap && mqgLikelihood_mediumPt_EndCap->getRootObject())
5214  mqgLikelihood_mediumPt_EndCap->Fill(QGLikelihood);
5215  }
5216  if (recoJet1.pt() > 140.) {
5217  mAxis2_highPt_EndCap = map_of_MEs[DirName + "/" + "qg_Axis2_highPt_EndCap"];
5218  if (mAxis2_highPt_EndCap && mAxis2_highPt_EndCap->getRootObject())
5219  mAxis2_highPt_EndCap->Fill(QGaxis2);
5220  mpTD_highPt_EndCap = map_of_MEs[DirName + "/" + "qg_pTD_highPt_EndCap"];
5221  if (mpTD_highPt_EndCap && mpTD_highPt_EndCap->getRootObject())
5222  mpTD_highPt_EndCap->Fill(QGptD);
5223  mMultiplicityQG_highPt_EndCap = map_of_MEs[DirName + "/" + "qg_multiplicity_highPt_EndCap"];
5224  if (mMultiplicityQG_highPt_EndCap && mMultiplicityQG_highPt_EndCap->getRootObject())
5225  mMultiplicityQG_highPt_EndCap->Fill(QGmulti);
5226  mqgLikelihood_highPt_EndCap = map_of_MEs[DirName + "/" + "qg_Likelihood_highPt_EndCap"];
5227  if (mqgLikelihood_highPt_EndCap && mqgLikelihood_highPt_EndCap->getRootObject())
5228  mqgLikelihood_highPt_EndCap->Fill(QGLikelihood);
5229  }
5230  } else {
5231  if (recoJet1.pt() > 20. && recoJet1.pt() <= 50.) {
5232  mAxis2_lowPt_Forward = map_of_MEs[DirName + "/" + "qg_Axis2_lowPt_Forward"];
5233  if (mAxis2_lowPt_Forward && mAxis2_lowPt_Forward->getRootObject())
5234  mAxis2_lowPt_Forward->Fill(QGaxis2);
5235  mpTD_lowPt_Forward = map_of_MEs[DirName + "/" + "qg_pTD_lowPt_Forward"];
5236  if (mpTD_lowPt_Forward && mpTD_lowPt_Forward->getRootObject())
5237  mpTD_lowPt_Forward->Fill(QGptD);
5238  mMultiplicityQG_lowPt_Forward = map_of_MEs[DirName + "/" + "qg_multiplicity_lowPt_Forward"];
5239  if (mMultiplicityQG_lowPt_Forward && mMultiplicityQG_lowPt_Forward->getRootObject())
5240  mMultiplicityQG_lowPt_Forward->Fill(QGmulti);
5241  mqgLikelihood_lowPt_Forward = map_of_MEs[DirName + "/" + "qg_Likelihood_lowPt_Forward"];
5242  if (mqgLikelihood_lowPt_Forward && mqgLikelihood_lowPt_Forward->getRootObject())
5243  mqgLikelihood_lowPt_Forward->Fill(QGLikelihood);
5244  }
5245  if (recoJet1.pt() > 50. && recoJet1.pt() <= 140.) {
5246  mAxis2_mediumPt_Forward = map_of_MEs[DirName + "/" + "qg_Axis2_mediumPt_Forward"];
5247  if (mAxis2_mediumPt_Forward && mAxis2_mediumPt_Forward->getRootObject())
5248  mAxis2_mediumPt_Forward->Fill(QGaxis2);
5249  mpTD_mediumPt_Forward = map_of_MEs[DirName + "/" + "qg_pTD_mediumPt_Forward"];
5250  if (mpTD_mediumPt_Forward && mpTD_mediumPt_Forward->getRootObject())
5251  mpTD_mediumPt_Forward->Fill(QGptD);
5252  mMultiplicityQG_mediumPt_Forward = map_of_MEs[DirName + "/" + "qg_multiplicity_mediumPt_Forward"];
5253  if (mMultiplicityQG_mediumPt_Forward && mMultiplicityQG_mediumPt_Forward->getRootObject())
5254  mMultiplicityQG_mediumPt_Forward->Fill(QGmulti);
5255  mqgLikelihood_mediumPt_Forward = map_of_MEs[DirName + "/" + "qg_Likelihood_mediumPt_Forward"];
5256  if (mqgLikelihood_mediumPt_Forward && mqgLikelihood_mediumPt_Forward->getRootObject())
5257  mqgLikelihood_mediumPt_Forward->Fill(QGLikelihood);
5258  }
5259  if (recoJet1.pt() > 140.) {
5260  mAxis2_highPt_Forward = map_of_MEs[DirName + "/" + "qg_Axis2_highPt_Forward"];
5261  if (mAxis2_highPt_Forward && mAxis2_highPt_Forward->getRootObject())
5262  mAxis2_highPt_Forward->Fill(QGaxis2);
5263  mpTD_highPt_Forward = map_of_MEs[DirName + "/" + "qg_pTD_highPt_Forward"];
5264  if (mpTD_highPt_Forward && mpTD_highPt_Forward->getRootObject())
5265  mpTD_highPt_Forward->Fill(QGptD);
5266  mMultiplicityQG_highPt_Forward = map_of_MEs[DirName + "/" + "qg_multiplicity_highPt_Forward"];
5267  if (mMultiplicityQG_highPt_Forward && mMultiplicityQG_highPt_Forward->getRootObject())
5268  mMultiplicityQG_highPt_Forward->Fill(QGmulti);
5269  mqgLikelihood_highPt_Forward = map_of_MEs[DirName + "/" + "qg_Likelihood_highPt_Forward"];
5270  if (mqgLikelihood_highPt_Forward && mqgLikelihood_highPt_Forward->getRootObject())
5271  mqgLikelihood_highPt_Forward->Fill(QGLikelihood);
5272  }
5273  }
5274  } //fill quark gluon tagged variables
5275  } //jet back to back to Z
5276  } //2nd jet veto
5277  } //Z selection + hard leading jet
5278 }
JetMETDQMDCSFilter
Definition: JetMETDQMDCSFilter.h:24
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
reco::JetID
Jet ID object.
Definition: JetID.h:16
CaloJetCollection.h
cutBasedMuonId_MuonPOG_V0_cff.globalTrack
globalTrack
Definition: cutBasedMuonId_MuonPOG_V0_cff.py:135
PFJetIDSelectionFunctor::FIRSTDATA
Definition: PFJetIDSelectionFunctor.h:27
Handle.h
reco::Jet::scaleEnergy
virtual void scaleEnergy(double fScale)
scale energy of the jet
CaloJet.h
mps_fire.i
i
Definition: mps_fire.py:355
HLT_2018_cff.pt2
pt2
Definition: HLT_2018_cff.py:8552
MessageLogger.h
edm::Handle::product
T const * product() const
Definition: Handle.h:70
PileupJetIdentifier::passJetId
static bool passJetId(int flag, Id level)
Definition: PileupJetIdentifier.h:89
ESHandle.h
dqm::impl::MonitorElement::setOption
virtual void setOption(const char *option)
Definition: MonitorElement.cc:887
SiStripGain.h
DiDispStaMuonMonitor_cfi.pt
pt
Definition: DiDispStaMuonMonitor_cfi.py:39
JetIDSelectionFunctor::DQM09
Definition: JetIDSelectionFunctor.h:30
L1GlobalTriggerReadoutSetupFwd.h
edm::Run
Definition: Run.h:45
PileupJetIdentifier::kTight
Definition: PileupJetIdentifier.h:87
edm
HLT enums.
Definition: AlignableModifier.h:19
reco::Candidate::PolarLorentzVector
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
Definition: Candidate.h:38
TrackCollections2monitor_cff.numberOfValidPixelHits
numberOfValidPixelHits
at most 999 lost hits
Definition: TrackCollections2monitor_cff.py:250
reco::VertexCollection
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
gather_cfg.cout
cout
Definition: gather_cfg.py:144
PFJet.h
edm::LogInfo
Definition: MessageLogger.h:254
PFJetCollection.h
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
HLT_2018_cff.pt1
pt1
Definition: HLT_2018_cff.py:8550
l1t::UseEventSetupIn::Run
JetAnalyzer::~JetAnalyzer
~JetAnalyzer() override
Destructor.
Definition: JetAnalyzer.cc:262
SiStripGainRcd.h
SiStripDetId.h
reco::JetCorrector::correction
double correction(const LorentzVector &fJet) const
get correction using Jet information only
Definition: JetCorrector.h:47
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
SiStripNoises.h
JetAnalyzer.h
reco::LeafCandidate::pt
double pt() const final
transverse momentum
Definition: LeafCandidate.h:146
PFJetIDSelectionFunctor::WINTER16
Definition: PFJetIDSelectionFunctor.h:27
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
reco::JetID::fHPD
float fHPD
Definition: JetID.h:41
JetIDSelectionFunctor::CRAFT08
Definition: JetIDSelectionFunctor.h:30
edm::Handle
Definition: AssociativeIterator.h:50
PFJetIDSelectionFunctor
PF Jet selector for pat::Jets.
Definition: PFJetIDSelectionFunctor.h:25
edm::Ref< CaloJetCollection >
BTaggingMonitor_cfi.met
met
Definition: BTaggingMonitor_cfi.py:84
PFJetIDSelectionFunctor::RUNIISTARTUP
Definition: PFJetIDSelectionFunctor.h:27
deltaR.h
reco::MET
Definition: MET.h:41
TrackingRecHit.h
edm::EventSetup::get
T get() const
Definition: EventSetup.h:73
Jet
Definition: Jet.py:1
CItAlgo
AlgorithmMap::const_iterator CItAlgo
iterators through map containing the algorithms
Definition: L1GtTriggerMenuFwd.h:38
L1TEGammaOffline_cfi.triggerNames
triggerNames
Definition: L1TEGammaOffline_cfi.py:40
JetIDSelectionFunctor
Jet selector for pat::Jets and for CaloJets.
Definition: JetIDSelectionFunctor.h:28
PVValHelper::eta
Definition: PVValidationHelpers.h:69
reco::Jet::nConstituents
virtual int nConstituents() const
Definition: Jet.h:65
L1GtTriggerMenuRcd
Definition: L1GtTriggerMenuRcd.h:32
PFJetIDSelectionFunctor::WINTER17PUPPI
Definition: PFJetIDSelectionFunctor.h:27
IdealMagneticFieldRecord.h
edm::ESHandle< L1GtTriggerMenu >
dqm::implementation::IBooker::bookProfile
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double lowX, double highX, int, double lowY, double highY, char const *option="s", FUNC onbooking=NOOP())
Definition: DQMStore.h:322
JetIDSelectionFunctor::LOOSE
Definition: JetIDSelectionFunctor.h:31
reco::JetID::fRBX
float fRBX
Definition: JetID.h:42
isolatedTracks_cfi.caloJets
caloJets
Definition: isolatedTracks_cfi.py:33
JPTJetCollection.h
PbPb_ZMuSkimMuonDPG_cff.deltaR
deltaR
Definition: PbPb_ZMuSkimMuonDPG_cff.py:63
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
HLTTauDQMOffline_cfi.Muons
Muons
Definition: HLTTauDQMOffline_cfi.py:57
ALCARECOTkAlJpsiMuMu_cff.charge
charge
Definition: ALCARECOTkAlJpsiMuMu_cff.py:47
Scenarios_cff.scale
scale
Definition: Scenarios_cff.py:2186
HLT_2018_cff.InputTag
InputTag
Definition: HLT_2018_cff.py:79016
optionsL1T.menu
menu
Definition: optionsL1T.py:29
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:670
edm::ParameterSet
Definition: ParameterSet.h:36
SiStripCluster.h
L1GtTriggerMenu
Definition: L1GtTriggerMenu.h:48
Event.h
reco::LeafCandidate::eta
double eta() const final
momentum pseudorapidity
Definition: LeafCandidate.h:152
L1GlobalTriggerReadoutSetup.h
GenericTriggerEventFlag
Provides a code based selection for trigger and DCS information in order to have no failing filters i...
Definition: GenericTriggerEventFlag.h:42
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
JetIDSelectionFunctor::PURE09
Definition: JetIDSelectionFunctor.h:30
edm::get
T const & get(Event const &event, InputTag const &tag) noexcept(false)
Definition: Event.h:669
position
static int position[264][3]
Definition: ReadPGInfo.cc:289
TriggerNames.h
iEvent
int iEvent
Definition: GenABIO.cc:224
dqm::impl::MonitorElement::setBinLabel
virtual 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)
Definition: MonitorElement.cc:771
susybsm::HSCParticleType::innerTrack
Definition: HSCParticle.h:20
JetAnalyzer::bookMESetSelection
void bookMESetSelection(std::string, DQMStore::IBooker &)
Definition: JetAnalyzer.cc:1695
ProjectedSiStripRecHit2D.h
edm::EventSetup
Definition: EventSetup.h:57
hemisphereProducer_cfi.patJets
patJets
Definition: hemisphereProducer_cfi.py:5
JetAnalyzer::JetAnalyzer
JetAnalyzer(const edm::ParameterSet &)
Constructor.
Definition: JetAnalyzer.cc:64
Jet.h
RecoJets_cff.recoJets
recoJets
Definition: RecoJets_cff.py:19
muons_cfi.pfIsolationR04
pfIsolationR04
Definition: muons_cfi.py:31
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
PFJetIDSelectionFunctor::TIGHT
Definition: PFJetIDSelectionFunctor.h:28
pat::strbitset
Definition: strbitset.h:23
JetIDSelectionFunctor::MINIMAL
Definition: JetIDSelectionFunctor.h:31
std
Definition: JetResolutionObject.h:76
JetTracksAssociationDRCalo.h
PVValHelper::dxy
Definition: PVValidationHelpers.h:47
reco::LeafCandidate::phi
double phi() const final
momentum azimuthal angle
Definition: LeafCandidate.h:148
PileupJetIdentifier::kLoose
Definition: PileupJetIdentifier.h:87
DetId.h
PVValHelper::dz
Definition: PVValidationHelpers.h:50
JetAnalyzer::dqmBeginRun
void dqmBeginRun(const edm::Run &, const edm::EventSetup &) override
Initialize run-based parameters.
Definition: JetAnalyzer.cc:2200
spclusmultinvestigator_cfi.vertexCollection
vertexCollection
Definition: spclusmultinvestigator_cfi.py:4
dqm::implementation::IBooker::book2D
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:177
TrackingComponentsRecord.h
SiStripQuality.h
edm::TriggerNames
Definition: TriggerNames.h:55
JetAnalyzer::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Get the analysis.
Definition: JetAnalyzer.cc:2245
SiStripQualityRcd.h
Point3D.h
fed_dqm_sourceclient-live_cfg.DirName
DirName
Definition: fed_dqm_sourceclient-live_cfg.py:57
edm::triggerResults
static const std::string triggerResults("TriggerResults")
JetAnalyzer::bookHistograms
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Inizialize parameters for histo binning.
Definition: JetAnalyzer.cc:272
EventSetup.h
PFJetIDSelectionFunctor::WINTER17
Definition: PFJetIDSelectionFunctor.h:27
reco::JetID::n90Hits
short n90Hits
Definition: JetID.h:43
dqm::implementation::IBooker
Definition: DQMStore.h:43
JetIDSelectionFunctor::TIGHT
Definition: JetIDSelectionFunctor.h:31
SiStripNoisesRcd.h
Candidate.h
L1GlobalTriggerReadoutRecord::technicalTriggerWord
const TechnicalTriggerWord & technicalTriggerWord(int bxInEventValue) const
Definition: L1GlobalTriggerReadoutRecord.cc:212
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:671
TechnicalTriggerWord
std::vector< bool > TechnicalTriggerWord
technical trigger bits (64 bits)
Definition: L1GlobalTriggerReadoutSetupFwd.h:41
SiStripMatchedRecHit2D.h
InvalidTrackingRecHit.h
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
edm::Event
Definition: Event.h:73
PileupJetIdentifier::kMedium
Definition: PileupJetIdentifier.h:87
SiStripRecHit2D.h
dqm::impl::MonitorElement::setAxisTitle
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
Definition: MonitorElement.cc:800
JetIDSelectionFunctor::LOOSE_AOD
Definition: JetIDSelectionFunctor.h:31
jets_cff.nConstituents
nConstituents
Definition: jets_cff.py:225
edm::InputTag
Definition: InputTag.h:15
L1GlobalTriggerReadoutRecord.h
edm::ConsumesCollector
Definition: ConsumesCollector.h:39
pfJetBenchmark_cfi.pfJets
pfJets
Definition: pfJetBenchmark_cfi.py:4
dqm::implementation::IBooker::book1D
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
reco::JetID::restrictedEMF
float restrictedEMF
Definition: JetID.h:48
PFJetIDSelectionFunctor::LOOSE
Definition: PFJetIDSelectionFunctor.h:28