CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
69  parameters_ = pSet.getParameter<edm::ParameterSet>("jetAnalysis");
70  mInputCollection_ = pSet.getParameter<edm::InputTag> ("jetsrc");
71  m_l1algoname_ = pSet.getParameter<std::string>("l1algoname");
72  m_bitAlgTechTrig_=-1;
73 
74  jetType_ = pSet.getParameter<std::string>("JetType");
75  m_l1algoname_ = pSet.getParameter<std::string>("l1algoname");
76 
77  fill_jet_high_level_histo=pSet.getParameter<bool>("filljetHighLevel"),
78 
79  isCaloJet_ = (std::string("calo")==jetType_);
80  //isJPTJet_ = (std::string("jpt") ==jetType_);
81  isPFJet_ = (std::string("pf") ==jetType_);
82  isMiniAODJet_ = (std::string("miniaod") ==jetType_);
83  jetCorrectorTag_=pSet.getParameter<edm::InputTag>("JetCorrections");
84 
85 
86 
87  if(!isMiniAODJet_){//in MiniAOD jet is already corrected
88  jetCorrectorToken_ = consumes<reco::JetCorrector>(jetCorrectorTag_);
89  }
90 
91  if (isCaloJet_){
92  caloJetsToken_ = consumes<reco::CaloJetCollection>(mInputCollection_);
93  // MET information
94  caloMetToken_= consumes<reco::CaloMETCollection>(edm::InputTag(pSet.getParameter<edm::InputTag>("METCollectionLabel")));
95  }
96  //if (isJPTJet_) jptJetsToken_ = consumes<reco::JPTJetCollection>(mInputCollection_);
97  if (isPFJet_){ pfJetsToken_ = consumes<reco::PFJetCollection>(mInputCollection_);
98  MuonsToken_ = consumes<reco::MuonCollection>(pSet.getParameter<edm::InputTag> ("muonsrc"));
99  pfMetToken_= consumes<reco::PFMETCollection>(edm::InputTag(pSet.getParameter<edm::InputTag>("METCollectionLabel")));
100  }
101  if (isMiniAODJet_){
102  patJetsToken_ = consumes<pat::JetCollection>(mInputCollection_);
103  patMetToken_= consumes<pat::METCollection>(edm::InputTag(pSet.getParameter<edm::InputTag>("METCollectionLabel")));
104  }
105  cutBasedPUDiscriminantToken_ = consumes< edm::ValueMap<float> >(pSet.getParameter<edm::InputTag>("InputCutPUIDDiscriminant"));
106  cutBasedPUIDToken_ = consumes< edm::ValueMap<int> >(pSet.getParameter<edm::InputTag>("InputCutPUIDValue"));
107  mvaPUIDToken_ = consumes< edm::ValueMap<int> >(pSet.getParameter<edm::InputTag>("InputMVAPUIDValue"));
108  mvaFullPUDiscriminantToken_ = consumes< edm::ValueMap<float> >(pSet.getParameter<edm::InputTag>("InputMVAPUIDDiscriminant"));
109 
110  qgMultiplicityToken_= consumes< edm::ValueMap<int> >(pSet.getParameter<edm::InputTag>("InputQGMultiplicity"));
111  qgLikelihoodToken_= consumes< edm::ValueMap<float> >(pSet.getParameter<edm::InputTag>("InputQGLikelihood"));
112  qgptDToken_= consumes< edm::ValueMap<float> >(pSet.getParameter<edm::InputTag>("InputQGPtDToken"));
113  qgaxis2Token_= consumes< edm::ValueMap<float> >(pSet.getParameter<edm::InputTag>("InputQGAxis2"));
114 
115  fill_CHS_histos= pSet.getParameter<bool>("fillCHShistos");
116 
117  JetIDQuality_ = pSet.getParameter<string>("JetIDQuality");
118  JetIDVersion_ = pSet.getParameter<string>("JetIDVersion");
119 
120  // JetID definitions for Calo and JPT Jets
121  if(isCaloJet_){
122  inputJetIDValueMap = pSet.getParameter<edm::InputTag>("InputJetIDValueMap");
123  jetID_ValueMapToken_= consumes< edm::ValueMap<reco::JetID> >(inputJetIDValueMap);
124  if(JetIDVersion_== "PURE09"){
125  jetidversion = JetIDSelectionFunctor::PURE09;
126  }else if (JetIDVersion_== "DQM09"){
127  jetidversion = JetIDSelectionFunctor::DQM09;
128  }else if (JetIDVersion_=="CRAFT08"){
129  jetidversion = JetIDSelectionFunctor::CRAFT08;
130  }else{
131  if (verbose_) std::cout<<"no Valid JetID version given"<<std::endl;
132  }
133  if(JetIDQuality_== "MINIMAL"){
134  jetidquality = JetIDSelectionFunctor::MINIMAL;
135  }else if (JetIDQuality_== "LOOSE_AOD"){
136  jetidquality = JetIDSelectionFunctor::LOOSE_AOD;
137  }else if (JetIDQuality_=="LOOSE"){
138  jetidquality = JetIDSelectionFunctor::LOOSE;
139  }else if (JetIDQuality_=="TIGHT"){
140  jetidquality = JetIDSelectionFunctor::TIGHT;
141  }else{
142  if (verbose_) std::cout<<"no Valid JetID quality given"<<std::endl;
143  }
144  jetIDFunctor=JetIDSelectionFunctor( jetidversion, jetidquality);
145 
146  }
147 
148  //Jet ID definitions for PFJets
149  if(isPFJet_ || isMiniAODJet_){
150  if(JetIDVersion_== "FIRSTDATA"){
151  pfjetidversion = PFJetIDSelectionFunctor::FIRSTDATA;
152  }else{
153  if (verbose_) std::cout<<"no valid PF JetID version given"<<std::endl;
154  }
155  if (JetIDQuality_=="LOOSE"){
156  pfjetidquality = PFJetIDSelectionFunctor::LOOSE;
157  }else if (JetIDQuality_=="TIGHT"){
158  pfjetidquality = PFJetIDSelectionFunctor::TIGHT;
159  }else{
160  if (verbose_) std::cout<<"no Valid PFJetID quality given"<<std::endl;
161  }
162  pfjetIDFunctor=PFJetIDSelectionFunctor( pfjetidversion, pfjetidquality);
163  }
164  //check later if some of those are also needed for PFJets
165  leadJetFlag_ = 0;
166  jetLoPass_ = 0;
167  jetHiPass_ = 0;
168  ptThreshold_ = 20.;
169  ptThresholdUnc_ = 20.;
170  asymmetryThirdJetCut_ = 5.;
171  balanceThirdJetCut_ = 0.2;
172 
173  theTriggerResultsLabel_ = pSet.getParameter<edm::InputTag>("TriggerResultsLabel");
174  triggerResultsToken_ = consumes<edm::TriggerResults>(edm::InputTag(theTriggerResultsLabel_));
175  //
176  runcosmics_ = pSet.getUntrackedParameter<bool>("runcosmics", false);
177  jetCleaningFlag_ = pSet.getUntrackedParameter<bool>("JetCleaningFlag", true);
178 
179  if(runcosmics_){
180  jetCleaningFlag_ =false;
181  }
182 
183 
184  // ==========================================================
185  //DCS information
186  // ==========================================================
187  edm::ConsumesCollector iC = consumesCollector();
188  DCSFilterForJetMonitoring_ = new JetMETDQMDCSFilter(pSet.getParameter<ParameterSet>("DCSFilterForJetMonitoring"), iC);
189  DCSFilterForDCSMonitoring_ = new JetMETDQMDCSFilter("ecal:hbhe:hf:ho:pixel:sistrip:es:muon", iC);
190 
191  //Trigger selectoin
192  edm::ParameterSet highptjetparms = pSet.getParameter<edm::ParameterSet>("highPtJetTrigger");
193  edm::ParameterSet lowptjetparms = pSet.getParameter<edm::ParameterSet>("lowPtJetTrigger" );
194 
195  highPtJetEventFlag_ = new GenericTriggerEventFlag( highptjetparms, consumesCollector()/*, *this*/ );
196  lowPtJetEventFlag_ = new GenericTriggerEventFlag( lowptjetparms , consumesCollector()/*, *this*/ );
197 
198  highPtJetExpr_ = highptjetparms.getParameter<std::vector<std::string> >("hltPaths");
199  lowPtJetExpr_ = lowptjetparms .getParameter<std::vector<std::string> >("hltPaths");
200 
201  processname_ = pSet.getParameter<std::string>("processname");
202 
203  //jet cleanup parameters
204  cleaningParameters_ = pSet.getParameter<ParameterSet>("CleaningParameters");
205 
206  bypassAllPVChecks_= cleaningParameters_.getParameter<bool>("bypassAllPVChecks");
207  vertexLabel_ = cleaningParameters_.getParameter<edm::InputTag>("vertexCollection");
208  vertexToken_ = consumes<std::vector<reco::Vertex> >(edm::InputTag(vertexLabel_));
209 
210  gtLabel_ = cleaningParameters_.getParameter<edm::InputTag>("gtLabel");
211  gtToken_ = consumes<L1GlobalTriggerReadoutRecord>(edm::InputTag(gtLabel_));
212 
213  std::string inputCollectionLabel(mInputCollection_.label());
214  verbose_= parameters_.getParameter<int>("verbose");
215  // monitoring of eta parameter
216  etaBin_ = parameters_.getParameter<int>("etaBin");
217  etaMin_ = parameters_.getParameter<double>("etaMin");
218  etaMax_ = parameters_.getParameter<double>("etaMax");
219  // monitoring of phi paramater
220  phiBin_ = parameters_.getParameter<int>("phiBin");
221  phiMin_ = parameters_.getParameter<double>("phiMin");
222  phiMax_ = parameters_.getParameter<double>("phiMax");
223  // monitoring of the transverse momentum
224  ptBin_ = parameters_.getParameter<int>("ptBin");
225  ptMin_ = parameters_.getParameter<double>("ptMin");
226  ptMax_ = parameters_.getParameter<double>("ptMax");
227  //
228  eBin_ = parameters_.getParameter<int>("eBin");
229  eMin_ = parameters_.getParameter<double>("eMin");
230  eMax_ = parameters_.getParameter<double>("eMax");
231  //
232  pBin_ = parameters_.getParameter<int>("pBin");
233  pMin_ = parameters_.getParameter<double>("pMin");
234  pMax_ = parameters_.getParameter<double>("pMax");
235  //
236  nbinsPV_ = parameters_.getParameter<int>("pVBin");
237  nPVlow_ = parameters_.getParameter<double>("pVMin");
238  nPVhigh_ = parameters_.getParameter<double>("pVMax");
239  //
240  ptThreshold_ = parameters_.getParameter<double>("ptThreshold");
241  ptThresholdUnc_=parameters_.getParameter<double>("ptThresholdUnc");
242  asymmetryThirdJetCut_ = parameters_.getParameter<double>("asymmetryThirdJetCut");
243  balanceThirdJetCut_ = parameters_.getParameter<double>("balanceThirdJetCut");
244 }
245 
246 
247 // ***********************************************************
249 
250  delete highPtJetEventFlag_;
251  delete lowPtJetEventFlag_;
252 
253  delete DCSFilterForDCSMonitoring_;
254  delete DCSFilterForJetMonitoring_;
255  LogTrace("JetAnalyzer")<<"[JetAnalyzer] Saving the histos";
256 }
257 
258 // ***********************************************************
260  edm::Run const & iRun,
261  edm::EventSetup const & ) {
262 
263  // dbe_ = edm::Service<DQMStore>().operator->();
264  if(jetCleaningFlag_){
265  ibooker.setCurrentFolder("JetMET/Jet/Cleaned"+mInputCollection_.label());
266  DirName = "JetMET/Jet/Cleaned"+mInputCollection_.label();
267  }else{
268  ibooker.setCurrentFolder("JetMET/Jet/Uncleaned"+mInputCollection_.label());
269  DirName = "JetMET/Jet/Uncleaned"+mInputCollection_.label();
270  }
271 
272  jetME = ibooker.book1D("jetReco", "jetReco", 4, 1, 5);
273  jetME->setBinLabel(1,"CaloJets",1);
274  jetME->setBinLabel(2,"PFJets",1);
275  jetME->setBinLabel(3,"JPTJets",1);
276  jetME->setBinLabel(4,"MiniAODJets",1);
277 
278  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"jetReco",jetME));
279 
280 
281  mPt = ibooker.book1D("Pt", "pt", ptBin_, ptMin_, ptMax_);
282  mEta = ibooker.book1D("Eta", "eta", etaBin_, etaMin_, etaMax_);
283  mPhi = ibooker.book1D("Phi", "phi", phiBin_, phiMin_, phiMax_);
284  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"Pt" ,mPt));
285  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"Eta",mEta));
286  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"Phi",mPhi));
287 
288  //if(!isJPTJet_){
289  mConstituents = ibooker.book1D("Constituents", "# of constituents", 50, 0, 100);
290  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"Constituents",mConstituents));
291  //}
292  mJetEnergyCorr= ibooker.book1D("JetEnergyCorr", "jet energy correction factor", 50, 0.0,3.0);
293  mJetEnergyCorrVSEta= ibooker.bookProfile("JetEnergyCorrVSEta", "jet energy correction factor VS eta", etaBin_, etaMin_,etaMax_, 0.0,3.0);
294  mJetEnergyCorrVSPt= ibooker.bookProfile("JetEnergyCorrVSPt", "jet energy correction factor VS pt", ptBin_, ptMin_,ptMax_, 0.0,3.0);
295  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"JetEnergyCorr" ,mJetEnergyCorr));
296  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"JetEnergyCorrVSEta" ,mJetEnergyCorrVSEta));
297  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"JetEnergyCorrVSPt" ,mJetEnergyCorrVSPt));
298 
299  mPt_uncor = ibooker.book1D("Pt_uncor", "pt for uncorrected jets", ptBin_, ptThresholdUnc_, ptMax_);
300  mEta_uncor = ibooker.book1D("Eta_uncor", "eta for uncorrected jets", etaBin_, etaMin_, etaMax_);
301  mPhi_uncor = ibooker.book1D("Phi_uncor", "phi for uncorrected jets", phiBin_, phiMin_, phiMax_);
302  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"Pt_uncor" ,mPt_uncor));
303  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"Eta_uncor",mEta_uncor));
304  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"Phi_uncor",mPhi_uncor));
305  //if(!isJPTJet_){
306  mConstituents_uncor = ibooker.book1D("Constituents_uncor", "# of constituents for uncorrected jets", 50, 0, 100);
307  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"Constituents_uncor",mConstituents_uncor));
308  //}
309 
310  mDPhi = ibooker.book1D("DPhi", "dPhi btw the two leading jets", 100, 0., acos(-1.));
311  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"DPhi",mDPhi));
312 
313  // Book NPV profiles
314  //----------------------------------------------------------------------------
315  mPt_profile = ibooker.bookProfile("Pt_profile", "pt", nbinsPV_, nPVlow_, nPVhigh_, ptBin_, ptMin_, ptMax_);
316  mEta_profile = ibooker.bookProfile("Eta_profile", "eta", nbinsPV_, nPVlow_, nPVhigh_, etaBin_, etaMin_, etaMax_);
317  mPhi_profile = ibooker.bookProfile("Phi_profile", "phi", nbinsPV_, nPVlow_, nPVhigh_, phiBin_, phiMin_, phiMax_);
318  //if(!isJPTJet_){
319  mConstituents_profile = ibooker.bookProfile("Constituents_profile", "# of constituents", nbinsPV_, nPVlow_, nPVhigh_, 50, 0, 100);
320  //}
321  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"Pt_profile" ,mPt_profile));
322  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"Eta_profile",mEta_profile));
323  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"Phi_profile",mPhi_profile));
324 
325 
326 
327  if(!runcosmics_){//JIDPassFrac_ defines a collection of cleaned jets, for which we will want to fill the cleaning passing fraction
328  mLooseJIDPassFractionVSeta = ibooker.bookProfile("JetIDPassFractionVSeta","JetIDPassFractionVSeta",etaBin_, etaMin_, etaMax_,0.,1.2);
329  mLooseJIDPassFractionVSpt = ibooker.bookProfile("JetIDPassFractionVSpt","JetIDPassFractionVSpt",ptBin_, ptMin_, ptMax_,0.,1.2);
330  mLooseJIDPassFractionVSptNoHF = ibooker.bookProfile("JetIDPassFractionVSptNoHF","JetIDPassFractionVSptNoHF",ptBin_, ptMin_, ptMax_,0.,1.2);
331  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"JetIDPassFractionVSeta" ,mLooseJIDPassFractionVSeta));
332  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"JetIDPassFractionVSpt" ,mLooseJIDPassFractionVSpt));
333  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"JetIDPassFractionVSptNoHF",mLooseJIDPassFractionVSptNoHF));
334  }
335 
336  mNJets_profile = ibooker.bookProfile("NJets_profile", "number of jets", nbinsPV_, nPVlow_, nPVhigh_, 100, 0, 100);
337 
338 
339  // Set NPV profiles x-axis title
340  //----------------------------------------------------------------------------
341  mPt_profile ->setAxisTitle("nvtx",1);
342  mEta_profile ->setAxisTitle("nvtx",1);
343  mPhi_profile ->setAxisTitle("nvtx",1);
344  //if(!isJPTJet_){
345  mConstituents_profile->setAxisTitle("nvtx",1);
346  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"Constituents_profile",mConstituents_profile));
347  //}
348  mNJets_profile->setAxisTitle("nvtx",1);
349 
350  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"Pt_profile" ,mPt_profile));
351  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"Eta_profile",mEta_profile));
352  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"Phi_profile",mPhi_profile));
353  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"NJets_profile" ,mNJets_profile));
354 
355 
356  mPhiVSEta = ibooker.book2D("PhiVSEta", "PhiVSEta", 50, etaMin_, etaMax_, 24, phiMin_, phiMax_);
357  mPhiVSEta->getTH2F()->SetOption("colz");
358  mPhiVSEta->setAxisTitle("#eta",1);
359  mPhiVSEta->setAxisTitle("#phi",2);
360  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PhiVSEta" ,mPhiVSEta));
361 
362  mPt_1 = ibooker.book1D("Pt_1", "Pt spectrum of jets - range 1", 20, 0, 100);
363  mPt_2 = ibooker.book1D("Pt_2", "Pt spectrum of jets - range 2", 60, 0, 300);
364  mPt_3 = ibooker.book1D("Pt_3", "Pt spectrum of jets - range 3", 100, 0, 5000);
365  // Low and high pt trigger paths
366  mPt_Lo = ibooker.book1D("Pt_Lo", "Pt (Pass Low Pt Jet Trigger)", 20, 0, 100);
367  //mEta_Lo = ibooker.book1D("Eta_Lo", "Eta (Pass Low Pt Jet Trigger)", etaBin_, etaMin_, etaMax_);
368  mPhi_Lo = ibooker.book1D("Phi_Lo", "Phi (Pass Low Pt Jet Trigger)", phiBin_, phiMin_, phiMax_);
369 
370  mPt_Hi = ibooker.book1D("Pt_Hi", "Pt (Pass Hi Pt Jet Trigger)", 60, 0, 300);
371  mEta_Hi = ibooker.book1D("Eta_Hi", "Eta (Pass Hi Pt Jet Trigger)", etaBin_, etaMin_, etaMax_);
372  mPhi_Hi = ibooker.book1D("Phi_Hi", "Phi (Pass Hi Pt Jet Trigger)", phiBin_, phiMin_, phiMax_);
373  mNJets = ibooker.book1D("NJets", "number of jets", 100, 0, 100);
374 
375  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"Pt_1" ,mPt_1));
376  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"Pt_2" ,mPt_2));
377  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"Pt_3" ,mPt_3));
378  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"Pt_Lo" ,mPt_Lo));
379  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"Phi_Lo" ,mPhi_Lo));
380  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"Pt_Hi" ,mPt_Hi));
381  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"Eta_Hi" ,mEta_Hi));
382  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"Phi_Hi" ,mPhi_Hi));
383  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"NJets" ,mNJets));
384 
385  //mPt_Barrel_Lo = ibooker.book1D("Pt_Barrel_Lo", "Pt Barrel (Pass Low Pt Jet Trigger)", 20, 0, 100);
386  //mPhi_Barrel_Lo = ibooker.book1D("Phi_Barrel_Lo", "Phi Barrel (Pass Low Pt Jet Trigger)", phiBin_, phiMin_, phiMax_);
387  //if(!isJPTJet_){
388  mConstituents_Barrel = ibooker.book1D("Constituents_Barrel", "Constituents Barrel", 50, 0, 100);
389  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"Constituents_Barrel",mConstituents_Barrel));
390  //}
391 
392  //mPt_EndCap_Lo = ibooker.book1D("Pt_EndCap_Lo", "Pt EndCap (Pass Low Pt Jet Trigger)", 20, 0, 100);
393  //mPhi_EndCap_Lo = ibooker.book1D("Phi_EndCap_Lo", "Phi EndCap (Pass Low Pt Jet Trigger)", phiBin_, phiMin_, phiMax_);
394  //if(!isJPTJet_){
395  mConstituents_EndCap = ibooker.book1D("Constituents_EndCap", "Constituents EndCap", 50, 0, 100);
396  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"Constituents_EndCap",mConstituents_EndCap));
397  //}
398 
399 
400  //mPt_Forward_Lo = ibooker.book1D("Pt_Forward_Lo", "Pt Forward (Pass Low Pt Jet Trigger)", 20, 0, 100);
401  //mPhi_Forward_Lo = ibooker.book1D("Phi_Forward_Lo", "Phi Forward (Pass Low Pt Jet Trigger)", phiBin_, phiMin_, phiMax_);
402  //if(!isJPTJet_){
403  mConstituents_Forward = ibooker.book1D("Constituents_Forward", "Constituents Forward", 50, 0, 100);
404  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"Constituents_Forward",mConstituents_Forward));
405  //}
406 
407 
408 
409  mPt_Barrel_Hi = ibooker.book1D("Pt_Barrel_Hi", "Pt Barrel (Pass Hi Pt Jet Trigger)", 60, 0, 300);
410  mPhi_Barrel_Hi = ibooker.book1D("Phi_Barrel_Hi", "Phi Barrel (Pass Hi Pt Jet Trigger)", phiBin_, phiMin_, phiMax_);
411 
412  mPt_EndCap_Hi = ibooker.book1D("Pt_EndCap_Hi", "Pt EndCap (Pass Hi Pt Jet Trigger)", 60, 0, 300);
413  mPhi_EndCap_Hi = ibooker.book1D("Phi_EndCap_Hi", "Phi EndCap (Pass Hi Pt Jet Trigger)", phiBin_, phiMin_, phiMax_);
414 
415  mPt_Forward_Hi = ibooker.book1D("Pt_Forward_Hi", "Pt Forward (Pass Hi Pt Jet Trigger)", 60, 0, 300);
416  mPhi_Forward_Hi = ibooker.book1D("Phi_Forward_Hi", "Phi Forward (Pass Hi Pt Jet Trigger)", phiBin_, phiMin_, phiMax_);
417 
418  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"Pt_Barrel_Hi" ,mPt_Barrel_Hi));
419  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"Phi_Barrel_Hi",mPhi_Barrel_Hi));
420  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"Pt_EndCap_Hi" ,mPt_EndCap_Hi));
421  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"Phi_EndCap_Hi",mPhi_EndCap_Hi));
422  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"Pt_Forward_Hi" ,mPt_Forward_Hi));
423  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"Phi_Forward_Hi",mPhi_Forward_Hi));
424 
425  mPhi_Barrel = ibooker.book1D("Phi_Barrel", "Phi_Barrel", phiBin_, phiMin_, phiMax_);
426  mPt_Barrel = ibooker.book1D("Pt_Barrel", "Pt_Barrel", ptBin_, ptMin_, ptMax_);
427 
428  mPhi_EndCap = ibooker.book1D("Phi_EndCap", "Phi_EndCap", phiBin_, phiMin_, phiMax_);
429  mPt_EndCap = ibooker.book1D("Pt_EndCap", "Pt_EndCap", ptBin_, ptMin_, ptMax_);
430 
431  mPhi_Forward = ibooker.book1D("Phi_Forward", "Phi_Forward", phiBin_, phiMin_, phiMax_);
432  mPt_Forward = ibooker.book1D("Pt_Forward", "Pt_Forward", ptBin_, ptMin_, ptMax_);
433 
434  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"Pt_Barrel" ,mPt_Barrel));
435  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"Phi_Barrel",mPhi_Barrel));
436  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"Pt_EndCap" ,mPt_EndCap));
437  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"Phi_EndCap",mPhi_EndCap));
438  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"Pt_Forward" ,mPt_Forward));
439  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"Phi_Forward",mPhi_Forward));
440 
441  // Leading Jet Parameters
442  mEtaFirst = ibooker.book1D("EtaFirst", "EtaFirst", 50, -5, 5);
443  mPhiFirst = ibooker.book1D("PhiFirst", "PhiFirst", 70, phiMin_, phiMax_);
444  mPtFirst = ibooker.book1D("PtFirst", "PtFirst", ptBin_, ptMin_, ptMax_);
445 
446  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"EtaFirst" ,mEtaFirst));
447  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PtFirst" ,mPtFirst));
448  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PhiFirst" ,mPhiFirst));
449 
450  //--- Calo jet selection only
451  if(isCaloJet_) {
452 
453  // CaloJet specific
454  mHadEnergyInHO = ibooker.book1D("HadEnergyInHO", "HadEnergyInHO", 50, 0, 20);
455  mHadEnergyInHB = ibooker.book1D("HadEnergy5InHB", "HadEnergyInHB", 50, 0, 100);
456  mHadEnergyInHF = ibooker.book1D("HadEnergyInHF", "HadEnergyInHF", 50, 0, 100);
457  mHadEnergyInHE = ibooker.book1D("HadEnergyInHE", "HadEnergyInHE", 50, 0, 200);
458  mEmEnergyInEB = ibooker.book1D("EmEnergyInEB", "EmEnergyInEB", 50, 0, 100);
459  mEmEnergyInEE = ibooker.book1D("EmEnergyInEE", "EmEnergyInEE", 50, 0, 100);
460  mEmEnergyInHF = ibooker.book1D("EmEnergyInHF", "EmEnergyInHF", 60, -20, 200);
461  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"HadEnergyInHO" ,mHadEnergyInHO));
462  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"HadEnergyInHB" ,mHadEnergyInHB));
463  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"HadEnergyInHF" ,mHadEnergyInHF));
464  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"HadEnergyInHE" ,mHadEnergyInHE));
465  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"EmEnergyInEB" ,mEmEnergyInEB));
466  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"EmEnergyInEE" ,mEmEnergyInEE));
467  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"EmEnergyInHF" ,mEmEnergyInHF));
468 
469  //JetID variables
470  mresEMF = ibooker.book1D("resEMF", "resEMF", 50, 0., 1.);
471  mN90Hits = ibooker.book1D("N90Hits", "N90Hits", 50, 0., 50);
472  mfHPD = ibooker.book1D("fHPD", "fHPD", 50, 0., 1.);
473  mfRBX = ibooker.book1D("fRBX", "fRBX", 50, 0., 1.);
474  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"resEMF" ,mresEMF));
475  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"N90Hits" ,mN90Hits));
476  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"fHPD" ,mfHPD));
477  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"fRBX" ,mfRBX));
478 
479  mHFrac = ibooker.book1D("HFrac", "HFrac", 70, -0.2, 1.2);
480  mEFrac = ibooker.book1D("EFrac", "EFrac", 52, -0.02, 1.02);
481  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"HFrac" ,mHFrac));
482  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"EFrac" ,mEFrac));
483  mHFrac_profile = ibooker.bookProfile("HFrac_profile", "HFrac", nbinsPV_, nPVlow_, nPVhigh_, 70, -0.2, 1.2);
484  mEFrac_profile = ibooker.bookProfile("EFrac_profile", "EFrac", nbinsPV_, nPVlow_, nPVhigh_, 52, -0.02, 1.02);
485  mHFrac_profile ->setAxisTitle("nvtx",1);
486  mEFrac_profile ->setAxisTitle("nvtx",1);
487  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"HFrac_profile",mHFrac_profile));
488  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"EFrac_profile",mEFrac_profile));
489  mHFrac_Barrel = ibooker.book1D("HFrac_Barrel", "HFrac Barrel", 50, 0, 1);
490  mEFrac_Barrel = ibooker.book1D("EFrac_Barrel", "EFrac Barrel", 52, -0.02, 1.02);
491  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"HFrac_Barrel" ,mHFrac_Barrel));
492  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"EFrac_Barrel" ,mEFrac_Barrel));
493  mHFrac_EndCap = ibooker.book1D("HFrac_EndCap", "HFrac EndCap", 50, 0, 1);
494  mEFrac_EndCap = ibooker.book1D("EFrac_EndCap", "EFrac EndCap", 52, -0.02, 1.02);
495  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"HFrac_EndCap" ,mHFrac_EndCap));
496  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"EFrac_EndCap" ,mEFrac_EndCap));
497  mHFrac_Forward = ibooker.book1D("HFrac_Forward", "HFrac Forward", 70, -0.2, 1.2);
498  mEFrac_Forward = ibooker.book1D("EFrac_Forward", "EFrac Forward", 52, -0.02, 1.02);
499  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"HFrac_Forward" ,mHFrac_Forward));
500  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"EFrac_Forward" ,mEFrac_Forward));
501  }
502 
503  if(isPFJet_) {
504  /* remove quark gluon plots for default jet selection, but select physics signatures which monitor gluon and quark
505  if(jetCleaningFlag_){
506  //gluon quark separation axis
507  if(fill_CHS_histos){
508  mAxis2_lowPt_Barrel = ibooker.book1D("qg_Axis2_lowPt_Barrel","qg Axis2 #sigma_{2} lowPt Barrel",50,0.,0.20);
509  mpTD_lowPt_Barrel= ibooker.book1D("qg_pTD_lowPt_Barrel","qg fragmentation function p_{T}^{D} lowPt Barrel",50,0.15,1.05);
510  mMultiplicityQG_lowPt_Barrel= ibooker.book1D("qg_multiplicity_lowPt_Barrel","qg multiplicity lowPt Barrel",50,0,50);
511  mqgLikelihood_lowPt_Barrel= ibooker.book1D("qg_Likelihood_lowPt_Barrel","qg likelihood lowPt Barrel",50,-1.1,1.1);
512  mAxis2_lowPt_EndCap = ibooker.book1D("qg_Axis2_lowPt_EndCap","qg Axis2 #sigma_{2} lowPt EndCap",50,0.,0.20);
513  mpTD_lowPt_EndCap= ibooker.book1D("qg_pTD_lowPt_EndCap","qg fragmentation function p_{T}^{D} lowPt EndCap",50,0.15,1.05);
514  mMultiplicityQG_lowPt_EndCap= ibooker.book1D("qg_multiplicity_lowPt_EndCap","qg multiplicity lowPt EndCap",50,0,100);
515  mqgLikelihood_lowPt_EndCap= ibooker.book1D("qg_Likelihood_lowPt_EndCap","qg likelihood lowPt EndCap",50,-1.1,1.1);
516  mAxis2_lowPt_Forward = ibooker.book1D("qg_Axis2_lowPt_Forward","qg Axis2 #sigma_{2} lowPt Forward",50,0.,0.20);
517  mpTD_lowPt_Forward= ibooker.book1D("qg_pTD_lowPt_Forward","qg fragmentation function p_{T}^{D} lowPt Forward",50,0.15,1.05);
518  mMultiplicityQG_lowPt_Forward= ibooker.book1D("qg_multiplicity_lowPt_Forward","qg multiplicity lowPt Forward",50,0,100);
519  mqgLikelihood_lowPt_Forward= ibooker.book1D("qg_Likelihood_lowPt_Forward","qg likelihood lowPt Forward",50,-1.1,1.1);
520 
521  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_Axis2_lowPt_Barrel" ,mAxis2_lowPt_Barrel));
522  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_pTD_lowPt_Barrel" ,mpTD_lowPt_Barrel));
523  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_multiplicity_lowPt_Barrel" ,mMultiplicityQG_lowPt_Barrel));
524  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_Likelihood_lowPt_Barrel" ,mqgLikelihood_lowPt_Barrel));
525  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_Axis2_lowPt_EndCap" ,mAxis2_lowPt_EndCap));
526  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_pTD_lowPt_EndCap" ,mpTD_lowPt_EndCap));
527  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_multiplicity_lowPt_EndCap" ,mMultiplicityQG_lowPt_EndCap));
528  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_Likelihood_lowPt_EndCap" ,mqgLikelihood_lowPt_EndCap));
529  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_Axis2_lowPt_Forward" ,mAxis2_lowPt_Forward));
530  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_pTD_lowPt_Forward" ,mpTD_lowPt_Forward));
531  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_multiplicity_lowPt_Forward" ,mMultiplicityQG_lowPt_Forward));
532  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_Likelihood_lowPt_Forward" ,mqgLikelihood_lowPt_Forward));
533 
534  mAxis2_mediumPt_Barrel = ibooker.book1D("qg_Axis2_mediumPt_Barrel","qg Axis2 #sigma_{2} mediumPt Barrel",50,0.,0.20);
535  mpTD_mediumPt_Barrel= ibooker.book1D("qg_pTD_mediumPt_Barrel","qg fragmentation function p_{T}^{D} mediumPt Barrel",50,0.15,1.05);
536  mMultiplicityQG_mediumPt_Barrel= ibooker.book1D("qg_multiplicity_mediumPt_Barrel","qg multiplicity mediumPt Barrel",50,0,100);
537  mqgLikelihood_mediumPt_Barrel= ibooker.book1D("qg_Likelihood_mediumPt_Barrel","qg likelihood mediumPt Barrel",50,-1.1,1.1);
538  mAxis2_mediumPt_EndCap = ibooker.book1D("qg_Axis2_mediumPt_EndCap","qg Axis2 #sigma_{2} mediumPt EndCap",50,0.,0.20);
539  mpTD_mediumPt_EndCap= ibooker.book1D("qg_pTD_mediumPt_EndCap","qg fragmentation function p_{T}^{D} mediumPt EndCap",50,0.15,1.05);
540  mMultiplicityQG_mediumPt_EndCap= ibooker.book1D("qg_multiplicity_mediumPt_EndCap","qg multiplicity mediumPt EndCap",50,0,100);
541  mqgLikelihood_mediumPt_EndCap= ibooker.book1D("qg_Likelihood_mediumPt_EndCap","qg likelihood mediumPt EndCap",50,-1.1,1.1);
542  mAxis2_mediumPt_Forward = ibooker.book1D("qg_Axis2_mediumPt_Forward","qg Axis2 #sigma_{2} mediumPt Forward",50,0.,0.20);
543  mpTD_mediumPt_Forward= ibooker.book1D("qg_pTD_mediumPt_Forward","qg fragmentation function p_{T}^{D} mediumPt Forward",50,0.15,1.05);
544  mMultiplicityQG_mediumPt_Forward= ibooker.book1D("qg_multiplicity_mediumPt_Forward","qg multiplicity mediumPt Forward",50,0,100);
545  mqgLikelihood_mediumPt_Forward= ibooker.book1D("qg_Likelihood_mediumPt_Forward","qg likelihood mediumPt Forward",50,-1.1,1.1);
546 
547  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_Axis2_mediumPt_Barrel" ,mAxis2_mediumPt_Barrel));
548  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_pTD_mediumPt_Barrel" ,mpTD_mediumPt_Barrel));
549  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_multiplicity_mediumPt_Barrel" ,mMultiplicityQG_mediumPt_Barrel));
550  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_Likelihood_mediumPt_Barrel" ,mqgLikelihood_mediumPt_Barrel));
551  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_Axis2_mediumPt_EndCap" ,mAxis2_mediumPt_EndCap));
552  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_pTD_mediumPt_EndCap" ,mpTD_mediumPt_EndCap));
553  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_multiplicity_mediumPt_EndCap" ,mMultiplicityQG_mediumPt_EndCap));
554  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_Likelihood_mediumPt_EndCap" ,mqgLikelihood_mediumPt_EndCap));
555  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_Axis2_mediumPt_Forward" ,mAxis2_mediumPt_Forward));
556  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_pTD_mediumPt_Forward" ,mpTD_mediumPt_Forward));
557  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_multiplicity_mediumPt_Forward" ,mMultiplicityQG_mediumPt_Forward));
558  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_Likelihood_mediumPt_Forward" ,mqgLikelihood_mediumPt_Forward));
559 
560  mAxis2_highPt_Barrel = ibooker.book1D("qg_Axis2_highPt_Barrel","qg Axis2 #sigma_{2} highPt Barrel",50,0.,0.20);
561  mpTD_highPt_Barrel= ibooker.book1D("qg_pTD_highPt_Barrel","qg fragmentation function p_{T}^{D} highPt Barrel",50,0.15,1.05);
562  mMultiplicityQG_highPt_Barrel= ibooker.book1D("qg_multiplicity_highPt_Barrel","qg multiplicity highPt Barrel",50,0,100);
563  mqgLikelihood_highPt_Barrel= ibooker.book1D("qg_Likelihood_highPt_Barrel","qg likelihood highPt Barrel",50,-1.1,1.1);
564  mAxis2_highPt_EndCap = ibooker.book1D("qg_Axis2_highPt_EndCap","qg Axis2 #sigma_{2} highPt EndCap",50,0.,0.20);
565  mpTD_highPt_EndCap= ibooker.book1D("qg_pTD_highPt_EndCap","qg fragmentation function p_{T}^{D} highPt EndCap",50,0.15,1.05);
566  mMultiplicityQG_highPt_EndCap= ibooker.book1D("qg_multiplicity_highPt_EndCap","qg multiplicity highPt EndCap",50,0,100);
567  mqgLikelihood_highPt_EndCap= ibooker.book1D("qg_Likelihood_highPt_EndCap","qg likelihood highPt EndCap",50,-1.1,1.1);
568  mAxis2_highPt_Forward = ibooker.book1D("qg_Axis2_highPt_Forward","qg Axis2 #sigma_{2} highPt Forward",50,0.,0.20);
569  mpTD_highPt_Forward= ibooker.book1D("qg_pTD_highPt_Forward","qg fragmentation function p_{T}^{D} highPt Forward",50,0.15,1.05);
570  mMultiplicityQG_highPt_Forward= ibooker.book1D("qg_multiplicity_highPt_Forward","qg multiplicity highPt Forward",50,0,100);
571  mqgLikelihood_highPt_Forward= ibooker.book1D("qg_Likelihood_highPt_Forward","qg likelihood highPt Forward",50,-1.1,1.1);
572 
573  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_Axis2_highPt_Barrel" ,mAxis2_highPt_Barrel));
574  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_pTD_highPt_Barrel" ,mpTD_highPt_Barrel));
575  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_multiplicity_highPt_Barrel" ,mMultiplicityQG_highPt_Barrel));
576  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_Likelihood_highPt_Barrel" ,mqgLikelihood_highPt_Barrel));
577  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_Axis2_highPt_EndCap" ,mAxis2_highPt_EndCap));
578  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_pTD_highPt_EndCap" ,mpTD_highPt_EndCap));
579  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_multiplicity_highPt_EndCap" ,mMultiplicityQG_highPt_EndCap));
580  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_Likelihood_highPt_EndCap" ,mqgLikelihood_highPt_EndCap));
581  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_Axis2_highPt_Forward" ,mAxis2_highPt_Forward));
582  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_pTD_highPt_Forward" ,mpTD_highPt_Forward));
583  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_multiplicity_highPt_Forward" ,mMultiplicityQG_highPt_Forward));
584  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_Likelihood_highPt_Forward" ,mqgLikelihood_highPt_Forward));
585  }
586  }*/
587  //PFJet specific histograms
588  mCHFracVSeta_lowPt= ibooker.bookProfile("CHFracVSeta_lowPt","CHFracVSeta_lowPt",etaBin_, etaMin_, etaMax_,0.,1.2);
589  mNHFracVSeta_lowPt= ibooker.bookProfile("NHFacVSeta_lowPt","NHFracVSeta_lowPt",etaBin_, etaMin_, etaMax_,0.,1.2);
590  mPhFracVSeta_lowPt= ibooker.bookProfile("PhFracVSeta_lowPt","PhFracVSeta_lowPt",etaBin_, etaMin_, etaMax_,0.,1.2);
591  mCHFracVSeta_mediumPt= ibooker.bookProfile("CHFracVSeta_mediumPt","CHFracVSeta_mediumPt",etaBin_, etaMin_, etaMax_,0.,1.2);
592  mNHFracVSeta_mediumPt= ibooker.bookProfile("NHFracVSeta_mediumPt","NHFracVSeta_mediumPt",etaBin_, etaMin_, etaMax_,0.,1.2);
593  mPhFracVSeta_mediumPt= ibooker.bookProfile("PhFracVSeta_mediumPt","PhFracVSeta_mediumPt",etaBin_, etaMin_, etaMax_,0.,1.2);
594  mCHFracVSeta_highPt= ibooker.bookProfile("CHFracVSeta_highPt","CHFracVSeta_highPt",etaBin_, etaMin_, etaMax_,0.,1.2);
595  mNHFracVSeta_highPt= ibooker.bookProfile("NHFracVSeta_highPt","NHFracVSeta_highPt",etaBin_, etaMin_, etaMax_,0.,1.2);
596  mPhFracVSeta_highPt= ibooker.bookProfile("PhFracVSeta_highPt","PhFracVSeta_highPt",etaBin_, etaMin_, etaMax_,0.,1.2);
597 
598  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CHFracVSeta_lowPt" ,mCHFracVSeta_lowPt));
599  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"NHFracVSeta_lowPt" ,mNHFracVSeta_lowPt));
600  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PhFracVSeta_lowPt" ,mPhFracVSeta_lowPt));
601  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CHFracVSeta_mediumPt" ,mCHFracVSeta_mediumPt));
602  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"NHFracVSeta_mediumPt" ,mNHFracVSeta_mediumPt));
603  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PhFracVSeta_mediumPt" ,mPhFracVSeta_mediumPt));
604  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CHFracVSeta_highPt" ,mCHFracVSeta_highPt));
605  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"NHFracVSeta_highPt" ,mNHFracVSeta_highPt));
606  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PhFracVSeta_highPt" ,mPhFracVSeta_highPt));
607 
608  mLooseMVAPUJIDPassFractionVSeta = ibooker.bookProfile("LooseMVAPUIDPassFractionVSeta","LooseMVAPUIDPassFractionVSeta",etaBin_, etaMin_, etaMax_,0.,1.2);
609  mLooseMVAPUJIDPassFractionVSpt = ibooker.bookProfile("LooseMVAPUIDPassFractionVSpt","LooseMVAPUIDPassFractionVSpt",ptBin_, ptMin_, ptMax_,0.,1.2);
610  mMediumMVAPUJIDPassFractionVSeta = ibooker.bookProfile("MediumMVAPUIDPassFractionVSeta","MediumMVAPUIDPassFractionVSeta",etaBin_, etaMin_, etaMax_,0.,1.2);
611  mMediumMVAPUJIDPassFractionVSpt = ibooker.bookProfile("MediumMVAPUIDPassFractionVSpt","MediumMVAPUIDPassFractionVSpt",ptBin_, ptMin_, ptMax_,0.,1.2);
612  mTightMVAPUJIDPassFractionVSeta = ibooker.bookProfile("TightMVAPUIDPassFractionVSeta","TightMVAPUIDPassFractionVSeta",etaBin_, etaMin_, etaMax_,0.,1.2);
613  mTightMVAPUJIDPassFractionVSpt = ibooker.bookProfile("TightMVAPUIDPassFractionVSpt","TightMVAPUIDPassFractionVSpt",ptBin_, ptMin_, ptMax_,0.,1.2);
614 
615  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"LooseMVAPUIDPassFractionVSeta",mLooseMVAPUJIDPassFractionVSeta));
616  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"LooseMVAPUIDPassFractionVSpt",mLooseMVAPUJIDPassFractionVSpt));
617  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"MediumMVAPUIDPassFractionVSeta",mMediumMVAPUJIDPassFractionVSeta));
618  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"MediumMVAPUIDPassFractionVSpt",mMediumMVAPUJIDPassFractionVSpt));
619  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"TightMVAPUIDPassFractionVSeta",mTightMVAPUJIDPassFractionVSeta));
620  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"TightMVAPUIDPassFractionVSpt",mTightMVAPUJIDPassFractionVSpt));
621 
622  mLooseCutPUJIDPassFractionVSeta = ibooker.bookProfile("LooseCutPUIDPassFractionVSeta","LooseCutPUIDPassFractionVSeta",etaBin_, etaMin_, etaMax_,0.,1.2);
623  mLooseCutPUJIDPassFractionVSpt = ibooker.bookProfile("LooseCutPUIDPassFractionVSpt","LooseCutPUIDPassFractionVSpt",ptBin_, ptMin_, ptMax_,0.,1.2);
624  mMediumCutPUJIDPassFractionVSeta = ibooker.bookProfile("MediumCutPUIDPassFractionVSeta","MediumCutPUIDPassFractionVSeta",etaBin_, etaMin_, etaMax_,0.,1.2);
625  mMediumCutPUJIDPassFractionVSpt = ibooker.bookProfile("MediumCutPUIDPassFractionVSpt","MediumCutPUIDPassFractionVSpt",ptBin_, ptMin_, ptMax_,0.,1.2);
626  mTightCutPUJIDPassFractionVSeta = ibooker.bookProfile("TightCutPUIDPassFractionVSeta","TightCutPUIDPassFractionVSeta",etaBin_, etaMin_, etaMax_,0.,1.2);
627  mTightCutPUJIDPassFractionVSpt = ibooker.bookProfile("TightCutPUIDPassFractionVSpt","TightCutPUIDPassFractionVSpt",ptBin_, ptMin_, ptMax_,0.,1.2);
628  mCutPUJIDDiscriminant_lowPt_Barrel = ibooker.book1D("CutPUJIDDiscriminant_lowPt_Barrel","CutPUJIDDiscriminant_lowPt_Barrel",50, -1.00, 1.00);
629  mCutPUJIDDiscriminant_lowPt_EndCap = ibooker.book1D("CutPUJIDDiscriminant_lowPt_EndCap","CutPUJIDDiscriminant_lowPt_EndCap",50, -1.00, 1.00);
630  mCutPUJIDDiscriminant_lowPt_Forward = ibooker.book1D("CutPUJIDDiscriminant_lowPt_Forward","CutPUJIDDiscriminant_lowPt_Forward",50, -1.00, 1.00);
631  mCutPUJIDDiscriminant_mediumPt_Barrel = ibooker.book1D("CutPUJIDDiscriminant_mediumPt_Barrel","CutPUJIDDiscriminant_mediumPt_Barrel",50, -1.00, 1.00);
632  mCutPUJIDDiscriminant_mediumPt_EndCap = ibooker.book1D("CutPUJIDDiscriminant_mediumPt_EndCap","CutPUJIDDiscriminant_mediumPt_EndCap",50, -1.00, 1.00);
633  mCutPUJIDDiscriminant_mediumPt_Forward = ibooker.book1D("CutPUJIDDiscriminant_mediumPt_Forward","CutPUJIDDiscriminant_mediumPt_Forward",50, -1.00, 1.00);
634  mCutPUJIDDiscriminant_highPt_Barrel = ibooker.book1D("CutPUJIDDiscriminant_highPt_Barrel","CutPUJIDDiscriminant_highPt_Barrel",50, -1.00, 1.00);
635  mCutPUJIDDiscriminant_highPt_EndCap = ibooker.book1D("CutPUJIDDiscriminant_highPt_EndCap","CutPUJIDDiscriminant_highPt_EndCap",50, -1.00, 1.00);
636  mCutPUJIDDiscriminant_highPt_Forward = ibooker.book1D("CutPUJIDDiscriminant_highPt_Forward","CutPUJIDDiscriminant_highPt_Forward",50, -1.00, 1.00);
637 
638  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"LooseCutPUIDPassFractionVSeta",mLooseCutPUJIDPassFractionVSeta));
639  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"LooseCutPUIDPassFractionVSpt",mLooseCutPUJIDPassFractionVSpt));
640  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"MediumCutPUIDPassFractionVSeta",mMediumCutPUJIDPassFractionVSeta));
641  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"MediumCutPUIDPassFractionVSpt",mMediumCutPUJIDPassFractionVSpt));
642  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"TightCutPUIDPassFractionVSeta",mTightCutPUJIDPassFractionVSeta));
643  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"TightCutPUIDPassFractionVSpt",mTightCutPUJIDPassFractionVSpt));
644  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CutPUJIDDiscriminant_lowPt_Barrel",mCutPUJIDDiscriminant_lowPt_Barrel));
645  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CutPUJIDDiscriminant_lowPt_EndCap",mCutPUJIDDiscriminant_lowPt_EndCap));
646  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CutPUJIDDiscriminant_lowPt_Forward",mCutPUJIDDiscriminant_lowPt_Forward));
647  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CutPUJIDDiscriminant_mediumPt_Barrel",mCutPUJIDDiscriminant_mediumPt_Barrel));
648  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CutPUJIDDiscriminant_mediumPt_EndCap",mCutPUJIDDiscriminant_mediumPt_EndCap));
649  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CutPUJIDDiscriminant_mediumPt_Forward",mCutPUJIDDiscriminant_mediumPt_Forward));
650  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CutPUJIDDiscriminant_highPt_Barrel",mCutPUJIDDiscriminant_highPt_Barrel));
651  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CutPUJIDDiscriminant_highPt_EndCap",mCutPUJIDDiscriminant_highPt_EndCap));
652  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CutPUJIDDiscriminant_highPt_Forward",mCutPUJIDDiscriminant_highPt_Forward));
653  //barrel histograms for PFJets
654  // energy fractions
655  mCHFrac_lowPt_Barrel = ibooker.book1D("CHFrac_lowPt_Barrel", "CHFrac_lowPt_Barrel", 120, -0.1, 1.1);
656  mNHFrac_lowPt_Barrel = ibooker.book1D("NHFrac_lowPt_Barrel", "NHFrac_lowPt_Barrel", 120, -0.1, 1.1);
657  mPhFrac_lowPt_Barrel = ibooker.book1D("PhFrac_lowPt_Barrel", "PhFrac_lowPt_Barrel", 120, -0.1, 1.1);
658  mCHFrac_mediumPt_Barrel = ibooker.book1D("CHFrac_mediumPt_Barrel", "CHFrac_mediumPt_Barrel", 120, -0.1, 1.1);
659  mNHFrac_mediumPt_Barrel = ibooker.book1D("NHFrac_mediumPt_Barrel", "NHFrac_mediumPt_Barrel", 120, -0.1, 1.1);
660  mPhFrac_mediumPt_Barrel = ibooker.book1D("PhFrac_mediumPt_Barrel", "PhFrac_mediumPt_Barrel", 120, -0.1, 1.1);
661  mCHFrac_highPt_Barrel = ibooker.book1D("CHFrac_highPt_Barrel", "CHFrac_highPt_Barrel", 120, -0.1, 1.1);
662  mNHFrac_highPt_Barrel = ibooker.book1D("NHFrac_highPt_Barrel", "NHFrac_highPt_Barrel", 120, -0.1, 1.1);
663  mPhFrac_highPt_Barrel = ibooker.book1D("PhFrac_highPt_Barrel", "PhFrac_highPt_Barrel", 120, -0.1, 1.1);
664 
665  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CHFrac_lowPt_Barrel" ,mCHFrac_lowPt_Barrel));
666  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"NHFrac_lowPt_Barrel" ,mNHFrac_lowPt_Barrel));
667  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PhFrac_lowPt_Barrel" ,mPhFrac_lowPt_Barrel));
668  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CHFrac_mediumPt_Barrel" ,mCHFrac_mediumPt_Barrel));
669  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"NHFrac_mediumPt_Barrel" ,mNHFrac_mediumPt_Barrel));
670  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PhFrac_mediumPt_Barrel" ,mPhFrac_mediumPt_Barrel));
671  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CHFrac_highPt_Barrel" ,mCHFrac_highPt_Barrel));
672  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"NHFrac_highPt_Barrel" ,mNHFrac_highPt_Barrel));
673  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PhFrac_highPt_Barrel" ,mPhFrac_highPt_Barrel));
674 
675  mMass_lowPt_Barrel = ibooker.book1D("JetMass_lowPt_Barrel", "JetMass_lowPt_Barrel", 50, 0, 150);
676  mMass_lowPt_EndCap = ibooker.book1D("JetMass_lowPt_EndCap", "JetMass_lowPt_EndCap", 50, 0, 150);
677  mMass_lowPt_Forward = ibooker.book1D("JetMass_lowPt_Forward", "JetMass_lowPt_Forward", 50, 0, 150);
678  mMass_mediumPt_Barrel = ibooker.book1D("JetMass_mediumPt_Barrel", "JetMass_mediumPt_Barrel", 50, 0, 150);
679  mMass_mediumPt_EndCap = ibooker.book1D("JetMass_mediumPt_EndCap", "JetMass_mediumPt_EndCap", 50, 0, 150);
680  mMass_mediumPt_Forward = ibooker.book1D("JetMass_mediumPt_Forward", "JetMass_mediumPt_Forward", 75, 0, 150);
681  mMass_highPt_Barrel = ibooker.book1D("JetMass_highPt_Barrel", "JetMass_highPt_Barrel", 50, 0, 150);
682  mMass_highPt_EndCap = ibooker.book1D("JetMass_highPt_EndCap", "JetMass_highPt_EndCap", 50, 0, 150);
683  mMass_highPt_Forward = ibooker.book1D("JetMass_highPt_Forward", "JetMass_highPt_Forward", 50, 0, 150);
684 
685  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"JetMass_lowPt_Barrel" , mMass_lowPt_Barrel ));
686  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"JetMass_lowPt_EndCap" , mMass_lowPt_EndCap ));
687  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"JetMass_lowPt_Forward" , mMass_lowPt_Forward ));
688  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"JetMass_mediumPt_Barrel" , mMass_mediumPt_Barrel ));
689  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"JetMass_mediumPt_EndCap" , mMass_mediumPt_EndCap ));
690  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"JetMass_mediumPt_Forward" , mMass_mediumPt_Forward ));
691  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"JetMass_highPt_Barrel" , mMass_highPt_Barrel ));
692  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"JetMass_highPt_EndCap" , mMass_highPt_EndCap ));
693  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"JetMass_highPt_Forward" , mMass_highPt_Forward ));
694 
695 
696  //energies
697  mCHEn_lowPt_Barrel = ibooker.book1D("CHEn_lowPt_Barrel", "CHEn_lowPt_Barrel", ptBin_, 0., ptMax_);
698  mNHEn_lowPt_Barrel = ibooker.book1D("NHEn_lowPt_Barrel", "NHEn_lowPt_Barrel", ptBin_, 0., ptMax_);
699  mPhEn_lowPt_Barrel = ibooker.book1D("PhEn_lowPt_Barrel", "PhEn_lowPt_Barrel", ptBin_, 0., ptMax_);
700  mElEn_lowPt_Barrel = ibooker.book1D("ElEn_lowPt_Barrel", "ElEn_lowPt_Barrel", ptBin_, 0., 100);
701  mMuEn_lowPt_Barrel = ibooker.book1D("MuEn_lowPt_Barrel", "MuEn_lowPt_Barrel", ptBin_, 0., 100);
702  mCHEn_mediumPt_Barrel = ibooker.book1D("CHEn_mediumPt_Barrel", "CHEn_mediumPt_Barrel", ptBin_, 0., ptMax_);
703  mNHEn_mediumPt_Barrel = ibooker.book1D("NHEn_mediumPt_Barrel", "NHEn_mediumPt_Barrel", ptBin_, 0., ptMax_);
704  mPhEn_mediumPt_Barrel = ibooker.book1D("PhEn_mediumPt_Barrel", "PhEn_mediumPt_Barrel", ptBin_, 0., ptMax_);
705  mElEn_mediumPt_Barrel = ibooker.book1D("ElEn_mediumPt_Barrel", "ElEn_mediumPt_Barrel", ptBin_, 0., 100);
706  mMuEn_mediumPt_Barrel = ibooker.book1D("MuEn_mediumPt_Barrel", "MuEn_mediumPt_Barrel", ptBin_, 0., 100);
707  mCHEn_highPt_Barrel = ibooker.book1D("CHEn_highPt_Barrel", "CHEn_highPt_Barrel", ptBin_, 0., 1.1*ptMax_);
708  mNHEn_highPt_Barrel = ibooker.book1D("NHEn_highPt_Barrel", "NHEn_highPt_Barrel", ptBin_, 0., ptMax_);
709  mPhEn_highPt_Barrel = ibooker.book1D("PhEn_highPt_Barrel", "PhEn_highPt_Barrel", ptBin_, 0., ptMax_);
710  mElEn_highPt_Barrel = ibooker.book1D("ElEn_highPt_Barrel", "ElEn_highPt_Barrel", ptBin_, 0., 100);
711  mMuEn_highPt_Barrel = ibooker.book1D("MuEn_highPt_Barrel", "MuEn_highPt_Barrel", ptBin_, 0., 100);
712 
713  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CHEn_lowPt_Barrel" ,mCHEn_lowPt_Barrel));
714  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"NHEn_lowPt_Barrel" ,mNHEn_lowPt_Barrel));
715  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PhEn_lowPt_Barrel" ,mPhEn_lowPt_Barrel));
716  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"ElEn_lowPt_Barrel" ,mElEn_lowPt_Barrel));
717  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"MuEn_lowPt_Barrel" ,mMuEn_lowPt_Barrel));
718  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CHEn_mediumPt_Barrel" ,mCHEn_mediumPt_Barrel));
719  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"NHEn_mediumPt_Barrel" ,mNHEn_mediumPt_Barrel));
720  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PhEn_mediumPt_Barrel" ,mPhEn_mediumPt_Barrel));
721  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"ElEn_mediumPt_Barrel" ,mElEn_mediumPt_Barrel));
722  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"MuEn_mediumPt_Barrel" ,mMuEn_mediumPt_Barrel));
723  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CHEn_highPt_Barrel" ,mCHEn_highPt_Barrel));
724  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"NHEn_highPt_Barrel" ,mNHEn_highPt_Barrel));
725  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PhEn_highPt_Barrel" ,mPhEn_highPt_Barrel));
726  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"ElEn_highPt_Barrel" ,mElEn_highPt_Barrel));
727  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"MuEn_highPt_Barrel" ,mMuEn_highPt_Barrel));
728 
729  //multiplicities
730  mChMultiplicity_lowPt_Barrel = ibooker.book1D("ChMultiplicity_lowPt_Barrel", "ChMultiplicity_lowPt_Barrel", 60,0,60);
731  mNeutMultiplicity_lowPt_Barrel = ibooker.book1D("NeutMultiplicity_lowPt_Barrel", "NeutMultiplicity_lowPt_Barrel", 60,0,60);
732  mMuMultiplicity_lowPt_Barrel = ibooker.book1D("MuMultiplicity_lowPt_Barrel", "MuMultiplicity_lowPt_Barrel", 10,0,10);
733  mChMultiplicity_mediumPt_Barrel = ibooker.book1D("ChMultiplicity_mediumPt_Barrel", "ChMultiplicity_mediumPt_Barrel", 60,0,60);
734  mNeutMultiplicity_mediumPt_Barrel = ibooker.book1D("NeutMultiplicity_mediumPt_Barrel", "NeutMultiplicity_mediumPt_Barrel", 60,0,60);
735  mMuMultiplicity_mediumPt_Barrel = ibooker.book1D("MuMultiplicity_mediumPt_Barrel", "MuMultiplicity_mediumPt_Barrel", 10,0,10);
736  mChMultiplicity_highPt_Barrel = ibooker.book1D("ChMultiplicity_highPt_Barrel", "ChMultiplicity_highPt_Barrel", 60,0,60);
737  mNeutMultiplicity_highPt_Barrel = ibooker.book1D("NeutMultiplicity_highPt_Barrel", "NeutMultiplicity_highPt_Barrel", 60,0,60);
738  mMuMultiplicity_highPt_Barrel = ibooker.book1D("MuMultiplicity_highPt_Barrel", "MuMultiplicity_highPt_Barrel", 10,0,10);
739 
740  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"ChMultiplicity_lowPt_Barrel" ,mChMultiplicity_lowPt_Barrel));
741  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"NeutMultiplicity_lowPt_Barrel" ,mNeutMultiplicity_lowPt_Barrel));
742  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"MuMultiplicity_lowPt_Barrel" ,mMuMultiplicity_lowPt_Barrel));
743  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"ChMultiplicity_mediumPt_Barrel" ,mChMultiplicity_mediumPt_Barrel));
744  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"NeutMultiplicity_mediumPt_Barrel" ,mNeutMultiplicity_mediumPt_Barrel));
745  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"MuMultiplicity_mediumPt_Barrel" ,mMuMultiplicity_mediumPt_Barrel));
746  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"ChMultiplicity_highPt_Barrel" ,mChMultiplicity_highPt_Barrel));
747  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"NeutMultiplicity_highPt_Barrel" ,mNeutMultiplicity_highPt_Barrel));
748  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"MuMultiplicity_highPt_Barrel" ,mMuMultiplicity_highPt_Barrel));
749  }
750  //
751  if(isMiniAODJet_ || isPFJet_){
752  mMVAPUJIDDiscriminant_lowPt_Barrel = ibooker.book1D("MVAPUJIDDiscriminant_lowPt_Barrel","MVAPUJIDDiscriminant_lowPt_Barrel",50, -1.00, 1.00);
753  mMVAPUJIDDiscriminant_lowPt_EndCap = ibooker.book1D("MVAPUJIDDiscriminant_lowPt_EndCap","MVAPUJIDDiscriminant_lowPt_EndCap",50, -1.00, 1.00);
754  mMVAPUJIDDiscriminant_lowPt_Forward = ibooker.book1D("MVAPUJIDDiscriminant_lowPt_Forward","MVAPUJIDDiscriminant_lowPt_Forward",50, -1.00, 1.00);
755  mMVAPUJIDDiscriminant_mediumPt_Barrel = ibooker.book1D("MVAPUJIDDiscriminant_mediumPt_Barrel","MVAPUJIDDiscriminant_mediumPt_Barrel",50, -1.00, 1.00);
756  mMVAPUJIDDiscriminant_mediumPt_EndCap = ibooker.book1D("MVAPUJIDDiscriminant_mediumPt_EndCap","MVAPUJIDDiscriminant_mediumPt_EndCap",50, -1.00, 1.00);
757  mMVAPUJIDDiscriminant_mediumPt_Forward = ibooker.book1D("MVAPUJIDDiscriminant_mediumPt_Forward","MVAPUJIDDiscriminant_mediumPt_Forward",50, -1.00, 1.00);
758  mMVAPUJIDDiscriminant_highPt_Barrel = ibooker.book1D("MVAPUJIDDiscriminant_highPt_Barrel","MVAPUJIDDiscriminant_highPt_Barrel",50, -1.00, 1.00);
759  mMVAPUJIDDiscriminant_highPt_EndCap = ibooker.book1D("MVAPUJIDDiscriminant_highPt_EndCap","MVAPUJIDDiscriminant_highPt_EndCap",50, -1.00, 1.00);
760  mMVAPUJIDDiscriminant_highPt_Forward = ibooker.book1D("MVAPUJIDDiscriminant_highPt_Forward","MVAPUJIDDiscriminant_highPt_Forward",50, -1.00, 1.00);
761 
762  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"MVAPUJIDDiscriminant_lowPt_Barrel",mMVAPUJIDDiscriminant_lowPt_Barrel));
763  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"MVAPUJIDDiscriminant_lowPt_EndCap",mMVAPUJIDDiscriminant_lowPt_EndCap));
764  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"MVAPUJIDDiscriminant_lowPt_Forward",mMVAPUJIDDiscriminant_lowPt_Forward));
765  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"MVAPUJIDDiscriminant_mediumPt_Barrel",mMVAPUJIDDiscriminant_mediumPt_Barrel));
766  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"MVAPUJIDDiscriminant_mediumPt_EndCap",mMVAPUJIDDiscriminant_mediumPt_EndCap));
767  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"MVAPUJIDDiscriminant_mediumPt_Forward",mMVAPUJIDDiscriminant_mediumPt_Forward));
768  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"MVAPUJIDDiscriminant_highPt_Barrel",mMVAPUJIDDiscriminant_highPt_Barrel));
769  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"MVAPUJIDDiscriminant_highPt_EndCap",mMVAPUJIDDiscriminant_highPt_EndCap));
770  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"MVAPUJIDDiscriminant_highPt_Forward",mMVAPUJIDDiscriminant_highPt_Forward));
771 
772  mCHFracVSpT_Barrel= ibooker.bookProfile("CHFracVSpT_Barrel","CHFracVSpT_Barrel",ptBin_, ptMin_, ptMax_,0.,1.2);
773  mNHFracVSpT_Barrel= ibooker.bookProfile("NHFracVSpT_Barrel","NHFracVSpT_Barrel",ptBin_, ptMin_, ptMax_,0.,1.2);
774  mPhFracVSpT_Barrel= ibooker.bookProfile("PhFracVSpT_Barrel","PhFracVSpT_Barrel",ptBin_, ptMin_, ptMax_,0.,1.2);
775  mCHFracVSpT_EndCap= ibooker.bookProfile("CHFracVSpT_EndCap","CHFracVSpT_EndCap",ptBin_, ptMin_, ptMax_,0.,1.2);
776  mNHFracVSpT_EndCap= ibooker.bookProfile("NHFracVSpT_EndCap","NHFracVSpT_EndCap",ptBin_, ptMin_, ptMax_,0.,1.2);
777  mPhFracVSpT_EndCap= ibooker.bookProfile("PhFracVSpT_EndCap","PhFracVSpT_EndCap",ptBin_, ptMin_, ptMax_,0.,1.2);
778  mHFHFracVSpT_Forward= ibooker.bookProfile("HFHFracVSpT_Forward","HFHFracVSpT_Forward",ptBin_, ptMin_, ptMax_,-0.2,1.2);
779  mHFEFracVSpT_Forward= ibooker.bookProfile("HFEFracVSpT_Forward","HFEFracVSpT_Forward",ptBin_, ptMin_, ptMax_,-0.2,1.2);
780 
781  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CHFracVSpT_Barrel" ,mCHFracVSpT_Barrel));
782  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"NHFracVSpT_Barrel" ,mNHFracVSpT_Barrel));
783  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PhFracVSpT_Barrel" ,mPhFracVSpT_Barrel));
784  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CHFracVSpT_EndCap" ,mCHFracVSpT_EndCap));
785  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"NHFracVSpT_EndCap" ,mNHFracVSpT_EndCap));
786  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PhFracVSpT_EndCap" ,mPhFracVSpT_EndCap));
787  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"HFHFracVSpT_Forward" ,mHFHFracVSpT_Forward));
788  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"HFEFracVSpT_Forward" ,mHFEFracVSpT_Forward));
789  }
790  if(isPFJet_){
791  //endcap monitoring
792  //energy fractions
793  mCHFrac_lowPt_EndCap = ibooker.book1D("CHFrac_lowPt_EndCap", "CHFrac_lowPt_EndCap", 120, -0.1, 1.1);
794  mNHFrac_lowPt_EndCap = ibooker.book1D("NHFrac_lowPt_EndCap", "NHFrac_lowPt_EndCap", 120, -0.1, 1.1);
795  mPhFrac_lowPt_EndCap = ibooker.book1D("PhFrac_lowPt_EndCap", "PhFrac_lowPt_EndCap", 120, -0.1, 1.1);
796  mCHFrac_mediumPt_EndCap = ibooker.book1D("CHFrac_mediumPt_EndCap", "CHFrac_mediumPt_EndCap", 120, -0.1, 1.1);
797  mNHFrac_mediumPt_EndCap = ibooker.book1D("NHFrac_mediumPt_EndCap", "NHFrac_mediumPt_EndCap", 120, -0.1, 1.1);
798  mPhFrac_mediumPt_EndCap = ibooker.book1D("PhFrac_mediumPt_EndCap", "PhFrac_mediumPt_EndCap", 120, -0.1, 1.1);
799  mCHFrac_highPt_EndCap = ibooker.book1D("CHFrac_highPt_EndCap", "CHFrac_highPt_EndCap", 120, -0.1, 1.1);
800  mNHFrac_highPt_EndCap = ibooker.book1D("NHFrac_highPt_EndCap", "NHFrac_highPt_EndCap", 120, -0.1, 1.1);
801  mPhFrac_highPt_EndCap = ibooker.book1D("PhFrac_highPt_EndCap", "PhFrac_highPt_EndCap", 120, -0.1, 1.1);
802 
803  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CHFrac_lowPt_EndCap" ,mCHFrac_lowPt_EndCap));
804  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"NHFrac_lowPt_EndCap" ,mNHFrac_lowPt_EndCap));
805  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PhFrac_lowPt_EndCap" ,mPhFrac_lowPt_EndCap));
806  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CHFrac_mediumPt_EndCap" ,mCHFrac_mediumPt_EndCap));
807  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"NHFrac_mediumPt_EndCap" ,mNHFrac_mediumPt_EndCap));
808  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PhFrac_mediumPt_EndCap" ,mPhFrac_mediumPt_EndCap));
809  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CHFrac_highPt_EndCap" ,mCHFrac_highPt_EndCap));
810  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"NHFrac_highPt_EndCap" ,mNHFrac_highPt_EndCap));
811  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PhFrac_highPt_EndCap" ,mPhFrac_highPt_EndCap));
812 
813  //energies
814  mCHEn_lowPt_EndCap = ibooker.book1D("CHEn_lowPt_EndCap", "CHEn_lowPt_EndCap", ptBin_, 0., ptMax_);
815  mNHEn_lowPt_EndCap = ibooker.book1D("NHEn_lowPt_EndCap", "NHEn_lowPt_EndCap", ptBin_, 0., ptMax_);
816  mPhEn_lowPt_EndCap = ibooker.book1D("PhEn_lowPt_EndCap", "PhEn_lowPt_EndCap", ptBin_, 0., ptMax_);
817  mElEn_lowPt_EndCap = ibooker.book1D("ElEn_lowPt_EndCap", "ElEn_lowPt_EndCap", ptBin_, 0., 100);
818  mMuEn_lowPt_EndCap = ibooker.book1D("MuEn_lowPt_EndCap", "MuEn_lowPt_EndCap", ptBin_, 0., 100);
819  mCHEn_mediumPt_EndCap = ibooker.book1D("CHEn_mediumPt_EndCap", "CHEn_mediumPt_EndCap", ptBin_, 0., ptMax_);
820  mNHEn_mediumPt_EndCap = ibooker.book1D("NHEn_mediumPt_EndCap", "NHEn_mediumPt_EndCap", ptBin_, 0., ptMax_);
821  mPhEn_mediumPt_EndCap = ibooker.book1D("PhEn_mediumPt_EndCap", "PhEn_mediumPt_EndCap", ptBin_, 0., ptMax_);
822  mElEn_mediumPt_EndCap = ibooker.book1D("ElEn_mediumPt_EndCap", "ElEn_mediumPt_EndCap", ptBin_, 0., 100);
823  mMuEn_mediumPt_EndCap = ibooker.book1D("MuEn_mediumPt_EndCap", "MuEn_mediumPt_EndCap", ptBin_, 0., 100);
824  mCHEn_highPt_EndCap = ibooker.book1D("CHEn_highPt_EndCap", "CHEn_highPt_EndCap", ptBin_, 0., 1.5*ptMax_);
825  mNHEn_highPt_EndCap = ibooker.book1D("NHEn_highPt_EndCap", "NHEn_highPt_EndCap", ptBin_, 0., 1.5*ptMax_);
826  mPhEn_highPt_EndCap = ibooker.book1D("PhEn_highPt_EndCap", "PhEn_highPt_EndCap", ptBin_, 0., 1.5*ptMax_);
827  mElEn_highPt_EndCap = ibooker.book1D("ElEn_highPt_EndCap", "ElEn_highPt_EndCap", ptBin_, 0., 100);
828  mMuEn_highPt_EndCap = ibooker.book1D("MuEn_highPt_EndCap", "MuEn_highPt_EndCap", ptBin_, 0., 100);
829 
830  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CHEn_lowPt_EndCap" ,mCHEn_lowPt_EndCap));
831  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"NHEn_lowPt_EndCap" ,mNHEn_lowPt_EndCap));
832  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PhEn_lowPt_EndCap" ,mPhEn_lowPt_EndCap));
833  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"ElEn_lowPt_EndCap" ,mElEn_lowPt_EndCap));
834  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"MuEn_lowPt_EndCap" ,mMuEn_lowPt_EndCap));
835  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CHEn_mediumPt_EndCap" ,mCHEn_mediumPt_EndCap));
836  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"NHEn_mediumPt_EndCap" ,mNHEn_mediumPt_EndCap));
837  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PhEn_mediumPt_EndCap" ,mPhEn_mediumPt_EndCap));
838  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"ElEn_mediumPt_EndCap" ,mElEn_mediumPt_EndCap));
839  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"MuEn_mediumPt_EndCap" ,mMuEn_mediumPt_EndCap));
840  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CHEn_highPt_EndCap" ,mCHEn_highPt_EndCap));
841  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"NHEn_highPt_EndCap" ,mNHEn_highPt_EndCap));
842  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PhEn_highPt_EndCap" ,mPhEn_highPt_EndCap));
843  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"ElEn_highPt_EndCap" ,mElEn_highPt_EndCap));
844  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"MuEn_highPt_EndCap" ,mMuEn_highPt_EndCap));
845 
846  //now get handle on OOT PU
847  mePhFracBarrel_BXm2BXm1Empty = ibooker.book1D("PhFracBarrel_BXm2BXm1Empty", "PHFrac prev empty 2 bunches (Barrel)", 50, 0, 1);
848  mePhFracBarrel_BXm2BXm1Filled = ibooker.book1D("PhFracBarrel_BXm2BXm1Filled", "PHFrac prev filled 2 bunches (Barrel)", 50, 0, 1);
849  meNHFracBarrel_BXm2BXm1Empty = ibooker.book1D("NHFracBarrel_BXm2BXm1Empty", "NHFrac prev empty 2 bunches (Barrel)", 50, 0, 1);
850  meNHFracBarrel_BXm2BXm1Filled = ibooker.book1D("NHFracBarrel_BXm2BXm1Filled", "NHFrac prev filled 2 bunches (Barrel)", 50, 0, 1);
851  meCHFracBarrel_BXm2BXm1Empty = ibooker.book1D("CHFracBarrel_BXm2BXm1Empty", "CHFrac prev empty 2 bunches (Barrel)", 50, 0, 1);
852  meCHFracBarrel_BXm2BXm1Filled = ibooker.book1D("CHFracBarrel_BXm2BXm1Filled", "CHFrac prev filled 2 bunches (Barrel)", 50, 0, 1);
853  mePtBarrel_BXm2BXm1Empty = ibooker.book1D("PtBarrel_BXm2BXm1Empty", "pT prev empty 2 bunches (Barrel)", ptBin_, ptMin_, ptMax_);
854  mePtBarrel_BXm2BXm1Filled = ibooker.book1D("PtBarrel_BXm2BXm1Filled", "pT prev filled 2 bunches (Barrel)", ptBin_, ptMin_, ptMax_);
855  mePhFracEndCapPlus_BXm2BXm1Empty = ibooker.book1D("PhFracEndCapPlus_BXm2BXm1Empty", "PHFrac prev empty 2 bunches (EndCapPlus)", 50, 0, 1);
856  mePhFracEndCapPlus_BXm2BXm1Filled = ibooker.book1D("PhFracEndCapPlus_BXm2BXm1Filled", "PHFrac prev filled 2 bunches (EndCapPlus)", 50, 0, 1);
857  meNHFracEndCapPlus_BXm2BXm1Empty = ibooker.book1D("NHFracEndCapPlus_BXm2BXm1Empty", "NHFrac prev empty 2 bunches (EndCapPlus)", 50, 0, 1);
858  meNHFracEndCapPlus_BXm2BXm1Filled = ibooker.book1D("NHFracEndCapPlus_BXm2BXm1Filled", "NHFrac prev filled 2 bunches (EndCapPlus)", 50, 0, 1);
859  meCHFracEndCapPlus_BXm2BXm1Empty = ibooker.book1D("CHFracEndCapPlus_BXm2BXm1Empty", "CHFrac prev empty 2 bunches (EndCapPlus)", 50, 0, 1);
860  meCHFracEndCapPlus_BXm2BXm1Filled = ibooker.book1D("CHFracEndCapPlus_BXm2BXm1Filled", "CHFrac prev filled 2 bunches (EndCapPlus)", 50, 0, 1);
861  mePtEndCapPlus_BXm2BXm1Empty = ibooker.book1D("PtEndCapPlus_BXm2BXm1Empty", "pT prev empty 2 bunches (EndCapPlus)", ptBin_, ptMin_, ptMax_);
862  mePtEndCapPlus_BXm2BXm1Filled = ibooker.book1D("PtEndCapPlus_BXm2BXm1Filled", "pT prev filled 2 bunches (EndCapPlus)", ptBin_, ptMin_, ptMax_);
863  meHFHFracPlus_BXm2BXm1Empty = ibooker.book1D("HFHFracPlus_BXm2BXm1Empty", "HFHFrac prev empty 2 bunches (EndCapPlus)", 50, 0, 1);
864  meHFHFracPlus_BXm2BXm1Filled = ibooker.book1D("HFHFracPlus_BXm2BXm1Filled", "HFHFrac prev filled 2 bunches (EndCapPlus)", 50, 0, 1);
865  meHFEMFracPlus_BXm2BXm1Empty = ibooker.book1D("HFEMFracPlus_BXm2BXm1Empty", "HFEMFrac prev empty 2 bunches (EndCapPlus)", 50, 0, 1);
866  meHFEMFracPlus_BXm2BXm1Filled = ibooker.book1D("HFEMFracPlus_BXm2BXm1Filled", "HFEMFrac prev filled 2 bunches (EndCapPlus)", 50, 0, 1);
867  mePtForwardPlus_BXm2BXm1Empty = ibooker.book1D("PtForwardPlus_BXm2BXm1Empty", "pT prev empty 2 bunches (ForwardPlus)", ptBin_, ptMin_, ptMax_);
868  mePtForwardPlus_BXm2BXm1Filled = ibooker.book1D("PtForwardPlus_BXm2BXm1Filled", "pT prev filled 2 bunches (ForwardPlus)", ptBin_, ptMin_, ptMax_);
869  mePhFracEndCapMinus_BXm2BXm1Empty = ibooker.book1D("PhFracEndCapMinus_BXm2BXm1Empty", "PHFrac prev empty 2 bunches (EndCapMinus)", 50, 0, 1);
870  mePhFracEndCapMinus_BXm2BXm1Filled = ibooker.book1D("PhFracEndCapMinus_BXm2BXm1Filled", "PHFrac prev filled 2 bunches (EndCapMinus)", 50, 0, 1);
871  meNHFracEndCapMinus_BXm2BXm1Empty = ibooker.book1D("NHFracEndCapMinus_BXm2BXm1Empty", "NHFrac prev empty 2 bunches (EndCapMinus)", 50, 0, 1);
872  meNHFracEndCapMinus_BXm2BXm1Filled = ibooker.book1D("NHFracEndCapMinus_BXm2BXm1Filled", "NHFrac prev filled 2 bunches (EndCapMinus)", 50, 0, 1);
873  meCHFracEndCapMinus_BXm2BXm1Empty = ibooker.book1D("CHFracEndCapMinus_BXm2BXm1Empty", "CHFrac prev empty 2 bunches (EndCapMinus)", 50, 0, 1);
874  meCHFracEndCapMinus_BXm2BXm1Filled = ibooker.book1D("CHFracEndCapMinus_BXm2BXm1Filled", "CHFrac prev filled 2 bunches (EndCapMinus)", 50, 0, 1);
875  mePtEndCapMinus_BXm2BXm1Empty = ibooker.book1D("PtEndCapMinus_BXm2BXm1Empty", "pT prev empty 2 bunches (EndCapMinus)", ptBin_, ptMin_, ptMax_);
876  mePtEndCapMinus_BXm2BXm1Filled = ibooker.book1D("PtEndCapMinus_BXm2BXm1Filled", "pT prev filled 2 bunches (EndCapMinus)", ptBin_, ptMin_, ptMax_);
877  meHFHFracMinus_BXm2BXm1Empty = ibooker.book1D("HFHFracMinus_BXm2BXm1Empty", "HFHFrac prev empty 2 bunches (EndCapMinus)", 50, 0, 1);
878  meHFHFracMinus_BXm2BXm1Filled = ibooker.book1D("HFHFracMinus_BXm2BXm1Filled", "HFHFrac prev filled 2 bunches (EndCapMinus)", 50, 0, 1);
879  meHFEMFracMinus_BXm2BXm1Empty = ibooker.book1D("HFEMFracMinus_BXm2BXm1Empty", "HFEMFrac prev empty 2 bunches (EndCapMinus)", 50, 0, 1);
880  meHFEMFracMinus_BXm2BXm1Filled = ibooker.book1D("HFEMFracMinus_BXm2BXm1Filled", "HFEMFrac prev filled 2 bunches (EndCapMinus)", 50, 0, 1);
881  mePtForwardMinus_BXm2BXm1Empty = ibooker.book1D("PtForwardMinus_BXm2BXm1Empty", "pT prev empty 2 bunches (ForwardMinus)", ptBin_, ptMin_, ptMax_);
882  mePtForwardMinus_BXm2BXm1Filled = ibooker.book1D("PtForwardMinus_BXm2BXm1Filled", "pT prev filled 2 bunches (ForwardMinus)", ptBin_, ptMin_, ptMax_);
883  meEta_BXm2BXm1Empty = ibooker.book1D("Eta_BXm2BXm1Empty", "eta prev empty 2 bunches", etaBin_, etaMin_, etaMax_);
884  meEta_BXm2BXm1Filled = ibooker.book1D("Eta_BXm2BXm1Filled", "eta prev filled 2 bunches", etaBin_, etaMin_, etaMax_);
885 
886  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PhFracBarrel_BXm2BXm1Empty" ,mePhFracBarrel_BXm2BXm1Empty));
887  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PhFracBarrel_BXm2BXm1Filled" ,mePhFracBarrel_BXm2BXm1Filled));
888  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"NHFracBarrel_BXm2BXm1Empty" ,meNHFracBarrel_BXm2BXm1Empty));
889  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"NHFracBarrel_BXm2BXm1Filled" ,meNHFracBarrel_BXm2BXm1Filled));
890  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CHFracBarrel_BXm2BXm1Empty" ,meCHFracBarrel_BXm2BXm1Empty));
891  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CHFracBarrel_BXm2BXm1Filled" ,meCHFracBarrel_BXm2BXm1Filled));
892  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PtBarrel_BXm2BXm1Empty" ,mePtBarrel_BXm2BXm1Empty));
893  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PtBarrel_BXm2BXm1Filled" ,mePtBarrel_BXm2BXm1Filled));
894  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PhFracEndCapPlus_BXm2BXm1Empty" ,mePhFracEndCapPlus_BXm2BXm1Empty));
895  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PhFracEndCapPlus_BXm2BXm1Filled" ,mePhFracEndCapPlus_BXm2BXm1Filled));
896  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"NHFracEndCapPlus_BXm2BXm1Empty" ,meNHFracEndCapPlus_BXm2BXm1Empty));
897  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"NHFracEndCapPlus_BXm2BXm1Filled" ,meNHFracEndCapPlus_BXm2BXm1Filled));
898  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CHFracEndCapPlus_BXm2BXm1Empty" ,meCHFracEndCapPlus_BXm2BXm1Empty));
899  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CHFracEndCapPlus_BXm2BXm1Filled" ,meCHFracEndCapPlus_BXm2BXm1Filled));
900  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PtEndCapPlus_BXm2BXm1Empty" ,mePtEndCapPlus_BXm2BXm1Empty));
901  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PtEndCapPlus_BXm2BXm1Filled" ,mePtEndCapPlus_BXm2BXm1Filled));
902  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"HFHFracPlus_BXm2BXm1Empty" ,meHFHFracPlus_BXm2BXm1Empty));
903  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"HFHFracPlus_BXm2BXm1Filled" ,meHFHFracPlus_BXm2BXm1Filled));
904  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"HFEMFracPlus_BXm2BXm1Empty" ,meHFEMFracPlus_BXm2BXm1Empty));
905  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"HFEMFracPlus_BXm2BXm1Filled" ,meHFEMFracPlus_BXm2BXm1Filled));
906  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PtForwardPlus_BXm2BXm1Empty" ,mePtForwardPlus_BXm2BXm1Empty));
907  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PtForwardPlus_BXm2BXm1Filled" ,mePtForwardPlus_BXm2BXm1Filled));
908  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PhFracEndCapMinus_BXm2BXm1Empty" ,mePhFracEndCapMinus_BXm2BXm1Empty));
909  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PhFracEndCapMinus_BXm2BXm1Filled" ,mePhFracEndCapMinus_BXm2BXm1Filled));
910  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"NHFracEndCapMinus_BXm2BXm1Empty" ,meNHFracEndCapMinus_BXm2BXm1Empty));
911  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"NHFracEndCapMinus_BXm2BXm1Filled" ,meNHFracEndCapMinus_BXm2BXm1Filled));
912  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CHFracEndCapMinus_BXm2BXm1Empty" ,meCHFracEndCapMinus_BXm2BXm1Empty));
913  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CHFracEndCapMinus_BXm2BXm1Filled" ,meCHFracEndCapMinus_BXm2BXm1Filled));
914  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PtEndCapMinus_BXm2BXm1Empty" ,mePtEndCapMinus_BXm2BXm1Empty));
915  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PtEndCapMinus_BXm2BXm1Filled" ,mePtEndCapMinus_BXm2BXm1Filled));
916  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"HFHFracMinus_BXm2BXm1Empty" ,meHFHFracMinus_BXm2BXm1Empty));
917  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"HFHFracMinus_BXm2BXm1Filled" ,meHFHFracMinus_BXm2BXm1Filled));
918  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"HFEMFracMinus_BXm2BXm1Empty" ,meHFEMFracMinus_BXm2BXm1Empty));
919  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"HFEMFracMinus_BXm2BXm1Filled" ,meHFEMFracMinus_BXm2BXm1Filled));
920  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PtForwardMinus_BXm2BXm1Empty" ,mePtForwardMinus_BXm2BXm1Empty));
921  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PtForwardMinus_BXm2BXm1Filled" ,mePtForwardMinus_BXm2BXm1Filled));
922  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"Eta_BXm2BXm1Empty" ,meEta_BXm2BXm1Empty));
923  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"Eta_BXm2BXm1Filled",meEta_BXm2BXm1Filled));
924 
925  mePhFracBarrel_BXm1Empty = ibooker.book1D("PhFracBarrel_BXm1Empty", "PHFrac prev empty 1 bunch (Barrel)", 50, 0, 1);
926  mePhFracBarrel_BXm1Filled = ibooker.book1D("PhFracBarrel_BXm1Filled", "PHFrac prev filled 1 bunch (Barrel)", 50, 0, 1);
927  meNHFracBarrel_BXm1Empty = ibooker.book1D("NHFracBarrel_BXm1Empty", "NHFrac prev empty 1 bunch (Barrel)", 50, 0, 1);
928  meNHFracBarrel_BXm1Filled = ibooker.book1D("NHFracBarrel_BXm1Filled", "NHFrac prev filled 1 bunch (Barrel)", 50, 0, 1);
929  meCHFracBarrel_BXm1Empty = ibooker.book1D("CHFracBarrel_BXm1Empty", "CHFrac prev empty 1 bunch (Barrel)", 50, 0, 1);
930  meCHFracBarrel_BXm1Filled = ibooker.book1D("CHFracBarrel_BXm1Filled", "CHFrac prev filled 1 bunch (Barrel)", 50, 0, 1);
931  mePtBarrel_BXm1Empty = ibooker.book1D("PtBarrel_BXm1Empty", "pT prev empty 1 bunch (Barrel)", ptBin_, ptMin_, ptMax_);
932  mePtBarrel_BXm1Filled = ibooker.book1D("PtBarrel_BXm1Filled", "pT prev filled 1 bunch (Barrel)", ptBin_, ptMin_, ptMax_);
933  mePhFracEndCapPlus_BXm1Empty = ibooker.book1D("PhFracEndCapPlus_BXm1Empty", "PHFrac prev empty 1 bunch (EndCapPlus)", 50, 0, 1);
934  mePhFracEndCapPlus_BXm1Filled = ibooker.book1D("PhFracEndCapPlus_BXm1Filled", "PHFrac prev filled 1 bunch (EndCapPlus)", 50, 0, 1);
935  meNHFracEndCapPlus_BXm1Empty = ibooker.book1D("NHFracEndCapPlus_BXm1Empty", "NHFrac prev empty 1 bunch (EndCapPlus)", 50, 0, 1);
936  meNHFracEndCapPlus_BXm1Filled = ibooker.book1D("NHFracEndCapPlus_BXm1Filled", "NHFrac prev filled 1 bunch (EndCapPlus)", 50, 0, 1);
937  meCHFracEndCapPlus_BXm1Empty = ibooker.book1D("CHFracEndCapPlus_BXm1Empty", "CHFrac prev empty 1 bunch (EndCapPlus)", 50, 0, 1);
938  meCHFracEndCapPlus_BXm1Filled = ibooker.book1D("CHFracEndCapPlus_BXm1Filled", "CHFrac prev filled 1 bunch (EndCapPlus)", 50, 0, 1);
939  mePtEndCapPlus_BXm1Empty = ibooker.book1D("PtEndCapPlus_BXm1Empty", "pT prev empty 1 bunch (EndCapPlus)", ptBin_, ptMin_, ptMax_);
940  mePtEndCapPlus_BXm1Filled = ibooker.book1D("PtEndCapPlus_BXm1Filled", "pT prev filled 1 bunch (EndCapPlus)", ptBin_, ptMin_, ptMax_);
941  meHFHFracPlus_BXm1Empty = ibooker.book1D("HFHFracPlus_BXm1Empty", "HFHFrac prev empty 1 bunch (EndCapPlus)", 50, 0, 1);
942  meHFHFracPlus_BXm1Filled = ibooker.book1D("HFHFracPlus_BXm1Filled", "HFHFrac prev filled 1 bunch (EndCapPlus)", 50, 0, 1);
943  meHFEMFracPlus_BXm1Empty = ibooker.book1D("HFEMFracPlus_BXm1Empty", "HFEMFrac prev empty 1 bunch (EndCapPlus)", 50, 0, 1);
944  meHFEMFracPlus_BXm1Filled = ibooker.book1D("HFEMFracPlus_BXm1Filled", "HFEMFrac prev filled 1 bunch (EndCapPlus)", 50, 0, 1);
945  mePtForwardPlus_BXm1Empty = ibooker.book1D("PtForwardPlus_BXm1Empty", "pT prev empty 1 bunch (ForwardPlus)", ptBin_, ptMin_, ptMax_);
946  mePtForwardPlus_BXm1Filled = ibooker.book1D("PtForwardPlus_BXm1Filled", "pT prev filled 1 bunch (ForwardPlus)", ptBin_, ptMin_, ptMax_);
947  mePhFracEndCapMinus_BXm1Empty = ibooker.book1D("PhFracEndCapMinus_BXm1Empty", "PHFrac prev empty 1 bunch (EndCapMinus)", 50, 0, 1);
948  mePhFracEndCapMinus_BXm1Filled = ibooker.book1D("PhFracEndCapMinus_BXm1Filled", "PHFrac prev filled 1 bunch (EndCapMinus)", 50, 0, 1);
949  meNHFracEndCapMinus_BXm1Empty = ibooker.book1D("NHFracEndCapMinus_BXm1Empty", "NHFrac prev empty 1 bunch (EndCapMinus)", 50, 0, 1);
950  meNHFracEndCapMinus_BXm1Filled = ibooker.book1D("NHFracEndCapMinus_BXm1Filled", "NHFrac prev filled 1 bunch (EndCapMinus)", 50, 0, 1);
951  meCHFracEndCapMinus_BXm1Empty = ibooker.book1D("CHFracEndCapMinus_BXm1Empty", "CHFrac prev empty 1 bunch (EndCapMinus)", 50, 0, 1);
952  meCHFracEndCapMinus_BXm1Filled = ibooker.book1D("CHFracEndCapMinus_BXm1Filled", "CHFrac prev filled 1 bunch (EndCapMinus)", 50, 0, 1);
953  mePtEndCapMinus_BXm1Empty = ibooker.book1D("PtEndCapMinus_BXm1Empty", "pT prev empty 1 bunch (EndCapMinus)", ptBin_, ptMin_, ptMax_);
954  mePtEndCapMinus_BXm1Filled = ibooker.book1D("PtEndCapMinus_BXm1Filled", "pT prev filled 1 bunch (EndCapMinus)", ptBin_, ptMin_, ptMax_);
955  meHFHFracMinus_BXm1Empty = ibooker.book1D("HFHFracMinus_BXm1Empty", "HFHFrac prev empty 1 bunch (EndCapMinus)", 50, 0, 1);
956  meHFHFracMinus_BXm1Filled = ibooker.book1D("HFHFracMinus_BXm1Filled", "HFHFrac prev filled 1 bunch (EndCapMinus)", 50, 0, 1);
957  meHFEMFracMinus_BXm1Empty = ibooker.book1D("HFEMFracMinus_BXm1Empty", "HFEMFrac prev empty 1 bunch (EndCapMinus)", 50, 0, 1);
958  meHFEMFracMinus_BXm1Filled = ibooker.book1D("HFEMFracMinus_BXm1Filled", "HFEMFrac prev filled 1 bunch (EndCapMinus)", 50, 0, 1);
959  mePtForwardMinus_BXm1Empty = ibooker.book1D("PtForwardMinus_BXm1Empty", "pT prev empty 1 bunch (ForwardMinus)", ptBin_, ptMin_, ptMax_);
960  mePtForwardMinus_BXm1Filled = ibooker.book1D("PtForwardMinus_BXm1Filled", "pT prev filled 1 bunch (ForwardMinus)", ptBin_, ptMin_, ptMax_);
961  meEta_BXm1Empty = ibooker.book1D("Eta_BXm1Empty", "eta prev empty 1 bunch", etaBin_, etaMin_, etaMax_);
962  meEta_BXm1Filled = ibooker.book1D("Eta_BXm1Filled", "eta prev filled 1 bunch", etaBin_, etaMin_, etaMax_);
963 
964  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PhFracBarrel_BXm1Empty" ,mePhFracBarrel_BXm1Empty));
965  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PhFracBarrel_BXm1Filled" ,mePhFracBarrel_BXm1Filled));
966  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"NHFracBarrel_BXm1Empty" ,meNHFracBarrel_BXm1Empty));
967  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"NHFracBarrel_BXm1Filled" ,meNHFracBarrel_BXm1Filled));
968  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CHFracBarrel_BXm1Empty" ,meCHFracBarrel_BXm1Empty));
969  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CHFracBarrel_BXm1Filled" ,meCHFracBarrel_BXm1Filled));
970  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PtBarrel_BXm1Empty" ,mePtBarrel_BXm1Empty));
971  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PtBarrel_BXm1Filled" ,mePtBarrel_BXm1Filled));
972  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PhFracEndCapPlus_BXm1Empty" ,mePhFracEndCapPlus_BXm1Empty));
973  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PhFracEndCapPlus_BXm1Filled" ,mePhFracEndCapPlus_BXm1Filled));
974  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"NHFracEndCapPlus_BXm1Empty" ,meNHFracEndCapPlus_BXm1Empty));
975  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"NHFracEndCapPlus_BXm1Filled" ,meNHFracEndCapPlus_BXm1Filled));
976  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CHFracEndCapPlus_BXm1Empty" ,meCHFracEndCapPlus_BXm1Empty));
977  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CHFracEndCapPlus_BXm1Filled" ,meCHFracEndCapPlus_BXm1Filled));
978  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PtEndCapPlus_BXm1Empty" ,mePtEndCapPlus_BXm1Empty));
979  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PtEndCapPlus_BXm1Filled" ,mePtEndCapPlus_BXm1Filled));
980  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"HFHFracPlus_BXm1Empty" ,meHFHFracPlus_BXm1Empty));
981  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"HFHFracPlus_BXm1Filled" ,meHFHFracPlus_BXm1Filled));
982  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"HFEMFracPlus_BXm1Empty" ,meHFEMFracPlus_BXm1Empty));
983  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"HFEMFracPlus_BXm1Filled" ,meHFEMFracPlus_BXm1Filled));
984  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PtForwardPlus_BXm1Empty" ,mePtForwardPlus_BXm1Empty));
985  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PtForwardPlus_BXm1Filled" ,mePtForwardPlus_BXm1Filled));
986  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PhFracEndCapMinus_BXm1Empty" ,mePhFracEndCapMinus_BXm1Empty));
987  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PhFracEndCapMinus_BXm1Filled" ,mePhFracEndCapMinus_BXm1Filled));
988  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"NHFracEndCapMinus_BXm1Empty" ,meNHFracEndCapMinus_BXm1Empty));
989  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"NHFracEndCapMinus_BXm1Filled" ,meNHFracEndCapMinus_BXm1Filled));
990  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CHFracEndCapMinus_BXm1Empty" ,meCHFracEndCapMinus_BXm1Empty));
991  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CHFracEndCapMinus_BXm1Filled" ,meCHFracEndCapMinus_BXm1Filled));
992  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PtEndCapMinus_BXm1Empty" ,mePtEndCapMinus_BXm1Empty));
993  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PtEndCapMinus_BXm1Filled" ,mePtEndCapMinus_BXm1Filled));
994  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"HFHFracMinus_BXm1Empty" ,meHFHFracMinus_BXm1Empty));
995  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"HFHFracMinus_BXm1Filled" ,meHFHFracMinus_BXm1Filled));
996  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"HFEMFracMinus_BXm1Empty" ,meHFEMFracMinus_BXm1Empty));
997  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"HFEMFracMinus_BXm1Filled" ,meHFEMFracMinus_BXm1Filled));
998  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PtForwardMinus_BXm1Empty" ,mePtForwardMinus_BXm1Empty));
999  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PtForwardMinus_BXm1Filled" ,mePtForwardMinus_BXm1Filled));
1000  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"Eta_BXm1Empty" ,meEta_BXm1Empty));
1001  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"Eta_BXm1Filled",meEta_BXm1Filled));
1002 
1003  //multiplicities
1004  mChMultiplicity_lowPt_EndCap = ibooker.book1D("ChMultiplicity_lowPt_EndCap", "ChMultiplicity_lowPt_EndCap", 60,0,60);
1005  mNeutMultiplicity_lowPt_EndCap = ibooker.book1D("NeutMultiplicity_lowPt_EndCap", "NeutMultiplicity_lowPt_EndCap", 60,0,60);
1006  mMuMultiplicity_lowPt_EndCap = ibooker.book1D("MuMultiplicity_lowPt_EndCap", "MuMultiplicity_lowPt_EndCap", 10,0,10);
1007  mChMultiplicity_mediumPt_EndCap = ibooker.book1D("ChMultiplicity_mediumPt_EndCap", "ChMultiplicity_mediumPt_EndCap", 60,0,60);
1008  mNeutMultiplicity_mediumPt_EndCap = ibooker.book1D("NeutMultiplicity_mediumPt_EndCap", "NeutMultiplicity_mediumPt_EndCap", 60,0,60);
1009  mMuMultiplicity_mediumPt_EndCap = ibooker.book1D("MuMultiplicity_mediumPt_EndCap", "MuMultiplicity_mediumPt_EndCap", 10,0,10);
1010  mChMultiplicity_highPt_EndCap = ibooker.book1D("ChMultiplicity_highPt_EndCap", "ChMultiplicity_highPt_EndCap", 60,0,60);
1011  mNeutMultiplicity_highPt_EndCap = ibooker.book1D("NeutMultiplicity_highPt_EndCap", "NeutMultiplicity_highPt_EndCap", 60,0,60);
1012  mMuMultiplicity_highPt_EndCap = ibooker.book1D("MuMultiplicity_highPt_EndCap", "MuMultiplicity_highPt_EndCap", 10,0,10);
1013 
1014  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"ChMultiplicity_lowPt_EndCap" ,mChMultiplicity_lowPt_EndCap));
1015  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"NeutMultiplicity_lowPt_EndCap" ,mNeutMultiplicity_lowPt_EndCap));
1016  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"MuMultiplicity_lowPt_EndCap" ,mMuMultiplicity_lowPt_EndCap));
1017  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"ChMultiplicity_mediumPt_EndCap" ,mChMultiplicity_mediumPt_EndCap));
1018  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"NeutMultiplicity_mediumPt_EndCap" ,mNeutMultiplicity_mediumPt_EndCap));
1019  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"MuMultiplicity_mediumPt_EndCap" ,mMuMultiplicity_mediumPt_EndCap));
1020  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"ChMultiplicity_highPt_EndCap" ,mChMultiplicity_highPt_EndCap));
1021  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"NeutMultiplicity_highPt_EndCap" ,mNeutMultiplicity_highPt_EndCap));
1022  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"MuMultiplicity_highPt_EndCap" ,mMuMultiplicity_highPt_EndCap));
1023 
1024  //forward monitoring
1025  //energy fraction
1026  mHFEFrac_lowPt_Forward = ibooker.book1D("HFEFrac_lowPt_Forward", "HFEFrac_lowPt_Forward", 70, -0.2, 1.2);
1027  mHFHFrac_lowPt_Forward = ibooker.book1D("HFHFrac_lowPt_Forward", "HFHFrac_lowPt_Forward", 70, -0.2, 1.2);
1028  mHFEFrac_mediumPt_Forward = ibooker.book1D("HFEFrac_mediumPt_Forward", "HFEFrac_mediumPt_Forward", 70, -0.2, 1.2);
1029  mHFHFrac_mediumPt_Forward = ibooker.book1D("HFHFrac_mediumPt_Forward", "HFHFrac_mediumPt_Forward", 70, -0.2, 1.2);
1030  mHFEFrac_highPt_Forward = ibooker.book1D("HFEFrac_highPt_Forward", "HFEFrac_highPt_Forward", 70, -0.2, 1.2);
1031  mHFHFrac_highPt_Forward = ibooker.book1D("HFHFrac_highPt_Forward", "HFHFrac_highPt_Forward", 70, -0.2, 1.2);
1032  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"HFHFrac_lowPt_Forward" ,mHFHFrac_lowPt_Forward));
1033  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"HFEFrac_lowPt_Forward" ,mHFEFrac_lowPt_Forward));
1034  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"HFHFrac_mediumPt_Forward" ,mHFHFrac_mediumPt_Forward));
1035  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"HFEFrac_mediumPt_Forward" ,mHFEFrac_mediumPt_Forward));
1036  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"HFHFrac_highPt_Forward" ,mHFHFrac_highPt_Forward));
1037  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"HFEFrac_highPt_Forward" ,mHFEFrac_highPt_Forward));
1038 
1039  //energies
1040  mHFEEn_lowPt_Forward = ibooker.book1D("HFEEn_lowPt_Forward", "HFEEn_lowPt_Forward", ptBin_, 0., ptMax_);
1041  mHFHEn_lowPt_Forward = ibooker.book1D("HFHEn_lowPt_Forward", "HFHEn_lowPt_Forward", ptBin_, 0., 2.0*ptMax_);
1042  mHFEEn_mediumPt_Forward = ibooker.book1D("HFEEn_mediumPt_Forward", "HFEEn_mediumPt_Forward", ptBin_, 0., 1.5*ptMax_);
1043  mHFHEn_mediumPt_Forward = ibooker.book1D("HFHEn_mediumPt_Forward", "HFHEn_mediumPt_Forward", ptBin_, 0., 2.5*ptMax_);
1044  mHFEEn_highPt_Forward = ibooker.book1D("HFEEn_highPt_Forward", "HFEEn_highPt_Forward", ptBin_, 0., 1.5*ptMax_);
1045  mHFHEn_highPt_Forward = ibooker.book1D("HFHEn_highPt_Forward", "HFHEn_highPt_Forward", ptBin_, 0., 5.0*ptMax_);
1046  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"HFHEn_lowPt_Forward" ,mHFHEn_lowPt_Forward));
1047  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"HFEEn_lowPt_Forward" ,mHFEEn_lowPt_Forward));
1048  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"HFHEn_mediumPt_Forward" ,mHFHEn_mediumPt_Forward));
1049  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"HFEEn_mediumPt_Forward" ,mHFEEn_mediumPt_Forward));
1050  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"HFHEn_highPt_Forward" ,mHFHEn_highPt_Forward));
1051  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"HFEEn_highPt_Forward" ,mHFEEn_highPt_Forward));
1052  //multiplicities
1053  mNeutMultiplicity_lowPt_Forward = ibooker.book1D("NeutMultiplicity_lowPt_Forward", "NeutMultiplicity_lowPt_Forward", 60,0,60);
1054  mNeutMultiplicity_mediumPt_Forward = ibooker.book1D("NeutMultiplicity_mediumPt_Forward", "NeutMultiplicity_mediumPt_Forward", 60,0,60);
1055  mNeutMultiplicity_highPt_Forward = ibooker.book1D("NeutMultiplicity_highPt_Forward", "NeutMultiplicity_highPt_Forward", 60,0,60);
1056 
1057  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"NeutMultiplicity_lowPt_Forward" ,mNeutMultiplicity_lowPt_Forward));
1058  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"NeutMultiplicity_mediumPt_Forward" ,mNeutMultiplicity_mediumPt_Forward));
1059  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"NeutMultiplicity_highPt_Forward" ,mNeutMultiplicity_highPt_Forward));
1060 
1061  mChargedHadronEnergy = ibooker.book1D("ChargedHadronEnergy", "charged HAD energy", 50, 0, 100);
1062  mNeutralHadronEnergy = ibooker.book1D("NeutralHadronEnergy", "neutral HAD energy", 50, 0, 100);
1063  mChargedEmEnergy = ibooker.book1D("ChargedEmEnergy", "charged EM energy ", 50, 0, 100);
1064  mChargedMuEnergy = ibooker.book1D("ChargedMuEnergy", "charged Mu energy", 50, 0, 100);
1065  mNeutralEmEnergy = ibooker.book1D("NeutralEmEnergy", "neutral EM energy", 50, 0, 100);
1066  mChargedMultiplicity = ibooker.book1D("ChargedMultiplicity", "charged multiplicity ", 50, 0, 100);
1067  mNeutralMultiplicity = ibooker.book1D("NeutralMultiplicity", "neutral multiplicity", 50, 0, 100);
1068  mMuonMultiplicity = ibooker.book1D("MuonMultiplicity", "muon multiplicity", 50, 0, 100);
1069  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"ChargedHadronEnergy" ,mChargedHadronEnergy));
1070  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"NeutralHadronEnergy" ,mNeutralHadronEnergy));
1071  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"ChargedEmEnergy" ,mChargedEmEnergy));
1072  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"ChargedMuEnergy" ,mChargedMuEnergy));
1073  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"NeutralEmEnergy" ,mNeutralEmEnergy));
1074  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"ChargedMultiplicity" ,mChargedMultiplicity));
1075  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"NeutralMultiplicity" ,mNeutralMultiplicity));
1076  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"MuonMultiplicity" ,mMuonMultiplicity));
1077 
1078  // Book NPV profiles
1079  //----------------------------------------------------------------------------
1080  mChargedHadronEnergy_profile = ibooker.bookProfile("ChargedHadronEnergy_profile", "charged HAD energy", nbinsPV_, nPVlow_, nPVhigh_, 50, 0, 100);
1081  mNeutralHadronEnergy_profile = ibooker.bookProfile("NeutralHadronEnergy_profile", "neutral HAD energy", nbinsPV_, nPVlow_, nPVhigh_, 50, 0, 100);
1082  mChargedEmEnergy_profile = ibooker.bookProfile("ChargedEmEnergy_profile", "charged EM energy", nbinsPV_, nPVlow_, nPVhigh_, 50, 0, 100);
1083  mChargedMuEnergy_profile = ibooker.bookProfile("ChargedMuEnergy_profile", "charged Mu energy", nbinsPV_, nPVlow_, nPVhigh_, 50, 0, 100);
1084  mNeutralEmEnergy_profile = ibooker.bookProfile("NeutralEmEnergy_profile", "neutral EM energy", nbinsPV_, nPVlow_, nPVhigh_, 50, 0, 100);
1085  mChargedMultiplicity_profile = ibooker.bookProfile("ChargedMultiplicity_profile", "charged multiplicity", nbinsPV_, nPVlow_, nPVhigh_, 50, 0, 100);
1086  mNeutralMultiplicity_profile = ibooker.bookProfile("NeutralMultiplicity_profile", "neutral multiplicity", nbinsPV_, nPVlow_, nPVhigh_, 50, 0, 100);
1087  mMuonMultiplicity_profile = ibooker.bookProfile("MuonMultiplicity_profile", "muon multiplicity", nbinsPV_, nPVlow_, nPVhigh_, 50, 0, 100);
1088 
1089  // Set NPV profiles x-axis title
1090  //----------------------------------------------------------------------------
1091  mChargedHadronEnergy_profile->setAxisTitle("nvtx",1);
1092  mNeutralHadronEnergy_profile->setAxisTitle("nvtx",1);
1093  mChargedEmEnergy_profile ->setAxisTitle("nvtx",1);
1094  mChargedMuEnergy_profile ->setAxisTitle("nvtx",1);
1095  mNeutralEmEnergy_profile ->setAxisTitle("nvtx",1);
1096  mChargedMultiplicity_profile->setAxisTitle("nvtx",1);
1097  mNeutralMultiplicity_profile->setAxisTitle("nvtx",1);
1098  mMuonMultiplicity_profile ->setAxisTitle("nvtx",1);
1099 
1100  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"ChargedHadronEnergy_profile" ,mChargedHadronEnergy_profile));
1101  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"NeutralHadronEnergy_profile" ,mNeutralHadronEnergy_profile));
1102  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"ChargedEmEnergy_profile" ,mChargedEmEnergy_profile));
1103  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"ChargedMuEnergy_profile" ,mChargedMuEnergy_profile));
1104  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"NeutralEmEnergy_profile" ,mNeutralEmEnergy_profile));
1105  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"ChargedMultiplicity_profile" ,mChargedMultiplicity_profile));
1106  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"NeutralMultiplicity_profile" ,mNeutralMultiplicity_profile));
1107  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"MuonMultiplicity_profile" ,mMuonMultiplicity_profile));
1108 
1109  mNeutralFraction = ibooker.book1D("NeutralConstituentsFraction","Neutral Constituents Fraction",100,0,1);
1110  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"NeutralConstituentsFraction" ,mNeutralFraction));
1111 
1112  }
1113 
1114  if(jetCleaningFlag_){
1115  //so far we have only one additional selection -> implement to make it expandable
1116  folderNames_.push_back("DiJet");
1117  if(isPFJet_){//check for now only for PFJets
1118  folderNames_.push_back("ZJets");
1119  }
1120  //book for each of these selection default histograms
1121  for (std::vector<std::string>::const_iterator ic = folderNames_.begin();
1122  ic != folderNames_.end(); ic++){
1123  bookMESetSelection(DirName+"/"+*ic, ibooker);
1124  }
1125  }
1126 
1127  ibooker.setCurrentFolder("JetMET");
1128  cleanupME = ibooker.book1D("cleanup", "cleanup", 10, 0., 10.);
1129  cleanupME->setBinLabel(1,"Primary Vertex");
1130  cleanupME->setBinLabel(2,"DCS::Pixel");
1131  cleanupME->setBinLabel(3,"DCS::SiStrip");
1132  cleanupME->setBinLabel(4,"DCS::ECAL");
1133  cleanupME->setBinLabel(5,"DCS::ES");
1134  cleanupME->setBinLabel(6,"DCS::HBHE");
1135  cleanupME->setBinLabel(7,"DCS::HF");
1136  cleanupME->setBinLabel(8,"DCS::HO");
1137  cleanupME->setBinLabel(9,"DCS::Muon");
1138  map_of_MEs.insert(std::pair<std::string,MonitorElement*>("JetMET/cleanup" ,cleanupME));
1139 
1140  verticesME = ibooker.book1D("vertices", "vertices", 100, 0, 100);
1141  map_of_MEs.insert(std::pair<std::string,MonitorElement*>("JetMET/vertices" ,verticesME));
1142 
1143 
1144 
1145 }
1146 
1148 {
1149  ibooker.setCurrentFolder(DirName);
1150  // Generic jet parameters
1151  mPt = ibooker.book1D("Pt", "pt", ptBin_, ptMin_, ptMax_);
1152  mEta = ibooker.book1D("Eta", "eta", etaBin_, etaMin_, etaMax_);
1153  mPhi = ibooker.book1D("Phi", "phi", phiBin_, phiMin_, phiMax_);
1154  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"Pt" ,mPt));
1155  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"Eta" ,mEta));
1156  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"Phi" ,mPhi));
1157  //if(!isJPTJet_){
1158  mConstituents = ibooker.book1D("Constituents", "# of constituents", 50, 0, 100);
1159  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"Constituents" ,mConstituents));
1160  //}
1161  mJetEnergyCorr= ibooker.book1D("JetEnergyCorr", "jet energy correction factor", 50, 0.0,3.0);
1162  mJetEnergyCorrVSEta= ibooker.bookProfile("JetEnergyCorrVSEta", "jet energy correction factor VS eta", etaBin_, etaMin_,etaMax_, 0.0,3.0);
1163  mJetEnergyCorrVSPt= ibooker.bookProfile("JetEnergyCorrVSPt", "jet energy correction factor VS pt", ptBin_, ptMin_,ptMax_, 0.0,3.0);
1164 
1165  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"JetEnergyCorr" ,mJetEnergyCorr));
1166  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"JetEnergyCorrVSEta" ,mJetEnergyCorrVSEta));
1167  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"JetEnergyCorrVSPt" ,mJetEnergyCorrVSPt));
1168 
1169  //fill for Dijets: concentrates on gluon jets -> fill leading two jets
1170  //fill for ZJets: concentrates on quark jets -> fill leading jet
1171  if(fill_CHS_histos && isPFJet_){
1172  mAxis2_lowPt_Barrel = ibooker.book1D("qg_Axis2_lowPt_Barrel","qg Axis2 #sigma_{2} lowPt Barrel",50,0.,0.20);
1173  mpTD_lowPt_Barrel= ibooker.book1D("qg_pTD_lowPt_Barrel","qg fragmentation function p_{T}^{D} lowPt Barrel",50,0.15,1.05);
1174  mMultiplicityQG_lowPt_Barrel= ibooker.book1D("qg_multiplicity_lowPt_Barrel","qg multiplicity lowPt Barrel",50,0,50);
1175  mqgLikelihood_lowPt_Barrel= ibooker.book1D("qg_Likelihood_lowPt_Barrel","qg likelihood lowPt Barrel",50,-1.1,1.1);
1176  mAxis2_lowPt_EndCap = ibooker.book1D("qg_Axis2_lowPt_EndCap","qg Axis2 #sigma_{2} lowPt EndCap",50,0.,0.20);
1177  mpTD_lowPt_EndCap= ibooker.book1D("qg_pTD_lowPt_EndCap","qg fragmentation function p_{T}^{D} lowPt EndCap",50,0.15,1.05);
1178  mMultiplicityQG_lowPt_EndCap= ibooker.book1D("qg_multiplicity_lowPt_EndCap","qg multiplicity lowPt EndCap",50,0,100);
1179  mqgLikelihood_lowPt_EndCap= ibooker.book1D("qg_Likelihood_lowPt_EndCap","qg likelihood lowPt EndCap",50,-1.1,1.1);
1180  mAxis2_lowPt_Forward = ibooker.book1D("qg_Axis2_lowPt_Forward","qg Axis2 #sigma_{2} lowPt Forward",50,0.,0.20);
1181  mpTD_lowPt_Forward= ibooker.book1D("qg_pTD_lowPt_Forward","qg fragmentation function p_{T}^{D} lowPt Forward",50,0.15,1.05);
1182  mMultiplicityQG_lowPt_Forward= ibooker.book1D("qg_multiplicity_lowPt_Forward","qg multiplicity lowPt Forward",50,0,100);
1183  mqgLikelihood_lowPt_Forward= ibooker.book1D("qg_Likelihood_lowPt_Forward","qg likelihood lowPt Forward",50,-1.1,1.1);
1184 
1185  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_Axis2_lowPt_Barrel" ,mAxis2_lowPt_Barrel));
1186  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_pTD_lowPt_Barrel" ,mpTD_lowPt_Barrel));
1187  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_multiplicity_lowPt_Barrel" ,mMultiplicityQG_lowPt_Barrel));
1188  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_Likelihood_lowPt_Barrel" ,mqgLikelihood_lowPt_Barrel));
1189  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_Axis2_lowPt_EndCap" ,mAxis2_lowPt_EndCap));
1190  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_pTD_lowPt_EndCap" ,mpTD_lowPt_EndCap));
1191  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_multiplicity_lowPt_EndCap" ,mMultiplicityQG_lowPt_EndCap));
1192  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_Likelihood_lowPt_EndCap" ,mqgLikelihood_lowPt_EndCap));
1193  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_Axis2_lowPt_Forward" ,mAxis2_lowPt_Forward));
1194  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_pTD_lowPt_Forward" ,mpTD_lowPt_Forward));
1195  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_multiplicity_lowPt_Forward" ,mMultiplicityQG_lowPt_Forward));
1196  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_Likelihood_lowPt_Forward" ,mqgLikelihood_lowPt_Forward));
1197 
1198  mAxis2_mediumPt_Barrel = ibooker.book1D("qg_Axis2_mediumPt_Barrel","qg Axis2 #sigma_{2} mediumPt Barrel",50,0.,0.20);
1199  mpTD_mediumPt_Barrel= ibooker.book1D("qg_pTD_mediumPt_Barrel","qg fragmentation function p_{T}^{D} mediumPt Barrel",50,0.15,1.05);
1200  mMultiplicityQG_mediumPt_Barrel= ibooker.book1D("qg_multiplicity_mediumPt_Barrel","qg multiplicity mediumPt Barrel",50,0,100);
1201  mqgLikelihood_mediumPt_Barrel= ibooker.book1D("qg_Likelihood_mediumPt_Barrel","qg likelihood mediumPt Barrel",50,-1.1,1.1);
1202  mAxis2_mediumPt_EndCap = ibooker.book1D("qg_Axis2_mediumPt_EndCap","qg Axis2 #sigma_{2} mediumPt EndCap",50,0.,0.20);
1203  mpTD_mediumPt_EndCap= ibooker.book1D("qg_pTD_mediumPt_EndCap","qg fragmentation function p_{T}^{D} mediumPt EndCap",50,0.15,1.05);
1204  mMultiplicityQG_mediumPt_EndCap= ibooker.book1D("qg_multiplicity_mediumPt_EndCap","qg multiplicity mediumPt EndCap",50,0,100);
1205  mqgLikelihood_mediumPt_EndCap= ibooker.book1D("qg_Likelihood_mediumPt_EndCap","qg likelihood mediumPt EndCap",50,-1.1,1.1);
1206  mAxis2_mediumPt_Forward = ibooker.book1D("qg_Axis2_mediumPt_Forward","qg Axis2 #sigma_{2} mediumPt Forward",50,0.,0.20);
1207  mpTD_mediumPt_Forward= ibooker.book1D("qg_pTD_mediumPt_Forward","qg fragmentation function p_{T}^{D} mediumPt Forward",50,0.15,1.05);
1208  mMultiplicityQG_mediumPt_Forward= ibooker.book1D("qg_multiplicity_mediumPt_Forward","qg multiplicity mediumPt Forward",50,0,100);
1209  mqgLikelihood_mediumPt_Forward= ibooker.book1D("qg_Likelihood_mediumPt_Forward","qg likelihood mediumPt Forward",50,-1.1,1.1);
1210 
1211  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_Axis2_mediumPt_Barrel" ,mAxis2_mediumPt_Barrel));
1212  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_pTD_mediumPt_Barrel" ,mpTD_mediumPt_Barrel));
1213  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_multiplicity_mediumPt_Barrel" ,mMultiplicityQG_mediumPt_Barrel));
1214  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_Likelihood_mediumPt_Barrel" ,mqgLikelihood_mediumPt_Barrel));
1215  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_Axis2_mediumPt_EndCap" ,mAxis2_mediumPt_EndCap));
1216  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_pTD_mediumPt_EndCap" ,mpTD_mediumPt_EndCap));
1217  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_multiplicity_mediumPt_EndCap" ,mMultiplicityQG_mediumPt_EndCap));
1218  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_Likelihood_mediumPt_EndCap" ,mqgLikelihood_mediumPt_EndCap));
1219  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_Axis2_mediumPt_Forward" ,mAxis2_mediumPt_Forward));
1220  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_pTD_mediumPt_Forward" ,mpTD_mediumPt_Forward));
1221  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_multiplicity_mediumPt_Forward" ,mMultiplicityQG_mediumPt_Forward));
1222  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_Likelihood_mediumPt_Forward" ,mqgLikelihood_mediumPt_Forward));
1223 
1224  mAxis2_highPt_Barrel = ibooker.book1D("qg_Axis2_highPt_Barrel","qg Axis2 #sigma_{2} highPt Barrel",50,0.,0.20);
1225  mpTD_highPt_Barrel= ibooker.book1D("qg_pTD_highPt_Barrel","qg fragmentation function p_{T}^{D} highPt Barrel",50,0.15,1.05);
1226  mMultiplicityQG_highPt_Barrel= ibooker.book1D("qg_multiplicity_highPt_Barrel","qg multiplicity highPt Barrel",50,0,100);
1227  mqgLikelihood_highPt_Barrel= ibooker.book1D("qg_Likelihood_highPt_Barrel","qg likelihood highPt Barrel",50,-1.1,1.1);
1228  mAxis2_highPt_EndCap = ibooker.book1D("qg_Axis2_highPt_EndCap","qg Axis2 #sigma_{2} highPt EndCap",50,0.,0.20);
1229  mpTD_highPt_EndCap= ibooker.book1D("qg_pTD_highPt_EndCap","qg fragmentation function p_{T}^{D} highPt EndCap",50,0.15,1.05);
1230  mMultiplicityQG_highPt_EndCap= ibooker.book1D("qg_multiplicity_highPt_EndCap","qg multiplicity highPt EndCap",50,0,100);
1231  mqgLikelihood_highPt_EndCap= ibooker.book1D("qg_Likelihood_highPt_EndCap","qg likelihood highPt EndCap",50,-1.1,1.1);
1232  mAxis2_highPt_Forward = ibooker.book1D("qg_Axis2_highPt_Forward","qg Axis2 #sigma_{2} highPt Forward",50,0.,0.20);
1233  mpTD_highPt_Forward= ibooker.book1D("qg_pTD_highPt_Forward","qg fragmentation function p_{T}^{D} highPt Forward",50,0.15,1.05);
1234  mMultiplicityQG_highPt_Forward= ibooker.book1D("qg_multiplicity_highPt_Forward","qg multiplicity highPt Forward",50,0,100);
1235  mqgLikelihood_highPt_Forward= ibooker.book1D("qg_Likelihood_highPt_Forward","qg likelihood highPt Forward",50,-1.1,1.1);
1236 
1237  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_Axis2_highPt_Barrel" ,mAxis2_highPt_Barrel));
1238  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_pTD_highPt_Barrel" ,mpTD_highPt_Barrel));
1239  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_multiplicity_highPt_Barrel" ,mMultiplicityQG_highPt_Barrel));
1240  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_Likelihood_highPt_Barrel" ,mqgLikelihood_highPt_Barrel));
1241  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_Axis2_highPt_EndCap" ,mAxis2_highPt_EndCap));
1242  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_pTD_highPt_EndCap" ,mpTD_highPt_EndCap));
1243  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_multiplicity_highPt_EndCap" ,mMultiplicityQG_highPt_EndCap));
1244  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_Likelihood_highPt_EndCap" ,mqgLikelihood_highPt_EndCap));
1245  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_Axis2_highPt_Forward" ,mAxis2_highPt_Forward));
1246  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_pTD_highPt_Forward" ,mpTD_highPt_Forward));
1247  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_multiplicity_highPt_Forward" ,mMultiplicityQG_highPt_Forward));
1248  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"qg_Likelihood_highPt_Forward" ,mqgLikelihood_highPt_Forward));
1249  }
1250 
1251  if(DirName.find("DiJet")!=std::string::npos){
1252  mDPhi = ibooker.book1D("DPhi", "dPhi btw the two leading jets", 100, 0., acos(-1.));
1253  mDijetAsymmetry = ibooker.book1D("DijetAsymmetry", "DijetAsymmetry", 100, -1., 1.);
1254  mDijetBalance = ibooker.book1D("DijetBalance", "DijetBalance", 100, -2., 2.);
1255  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"DPhi" ,mDPhi));
1256  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"DijetAsymmetry" ,mDijetAsymmetry));
1257  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"DijetBalance" ,mDijetBalance));
1258 
1259  if(isPFJet_|| isMiniAODJet_){
1260  mChargedMultiplicity = ibooker.book1D("ChargedMultiplicity", "charged multiplicity ", 50, 0, 100);
1261  mNeutralMultiplicity = ibooker.book1D("NeutralMultiplicity", "neutral multiplicity", 50, 0, 100);
1262  mMuonMultiplicity = ibooker.book1D("MuonMultiplicity", "muon multiplicity", 50, 0, 100);
1263 
1264  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"ChargedMultiplicity" ,mChargedMultiplicity));
1265  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"NeutralMultiplicity" ,mNeutralMultiplicity));
1266  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"MuonMultiplicity" ,mMuonMultiplicity));
1267 
1268  mChargedMultiplicity_profile = ibooker.bookProfile("ChargedMultiplicity_profile", "charged multiplicity", nbinsPV_, nPVlow_, nPVhigh_, 50, 0, 100);
1269  mNeutralMultiplicity_profile = ibooker.bookProfile("NeutralMultiplicity_profile", "neutral multiplicity", nbinsPV_, nPVlow_, nPVhigh_, 50, 0, 100);
1270  mMuonMultiplicity_profile = ibooker.bookProfile("MuonMultiplicity_profile", "muon multiplicity", nbinsPV_, nPVlow_, nPVhigh_, 50, 0, 100);
1271  mChargedMultiplicity_profile->setAxisTitle("nvtx",1);
1272  mNeutralMultiplicity_profile->setAxisTitle("nvtx",1);
1273  mMuonMultiplicity_profile ->setAxisTitle("nvtx",1);
1274 
1275  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"ChargedMultiplicity_profile" ,mChargedMultiplicity_profile));
1276  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"NeutralMultiplicity_profile" ,mNeutralMultiplicity_profile));
1277  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"MuonMultiplicity_profile" ,mMuonMultiplicity_profile));
1278 
1279  mNeutralFraction = ibooker.book1D("NeutralConstituentsFraction","Neutral Constituents Fraction",100,0,1);
1280  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"NeutralConstituentsFraction" ,mNeutralFraction));
1281  }
1282  }
1283 
1284 
1285  if(DirName.find("ZJets")!=std::string::npos){
1286  mZMass = ibooker.book1D("DiMuonMass", "DiMuonMass", 50, 71., 111.);
1287  mDPhiZJet = ibooker.book1D("DPhiZJ", "dPhi btw Z and Jet1", 100, 0., acos(-1.));
1288  mZJetAsymmetry = ibooker.book1D("ZJetAsymmetry", "ZJetAsymmetry", 100, -1., 1.);
1289  mJetZBalance_lowZPt_J_Barrel = ibooker.book1D("JZB_lowZPt_J_Barrel", "ZJetBalance (pTJet1-pTZ) (30<pTZ<90), |#eta_{jet}|<1.3", 50, -75.,75);
1290  mJetZBalance_mediumZPt_J_Barrel = ibooker.book1D("JZB_mediumZPt_J_Barrel", "ZJetBalance (90<pTZ<140), |#eta_{jet}|<1.3", 50, -75.,75);
1291  mJetZBalance_highZPt_J_Barrel = ibooker.book1D("JZB_highZPt_J_Barrel", "ZJetBalance (pTZ>140), |#eta_{jet}|<1.3", 50, -75., 75.);
1292  mJetZBalance_lowZPt_J_EndCap = ibooker.book1D("JZB_lowZPt_J_EndCap", "ZJetBalance (30<pTZ<90), 1.3<|#eta_{jet}|<3.0", 50, -75.,75);
1293  mJetZBalance_mediumZPt_J_EndCap = ibooker.book1D("JZB_mediumZPt_J_EndCap", "ZJetBalance (90<pTZ<140), 1.3<|#eta_{jet}|<3.0", 50, -75.,75);
1294  mJetZBalance_highZPt_J_EndCap = ibooker.book1D("JZB_highZPt_J_EndCap", "ZJetBalance (pTZ>140), 1.3<|#eta_{jet}|<3.0", 50, -75., 75.);
1295  mJetZBalance_lowZPt_J_Forward = ibooker.book1D("JZB_lowZPt_J_Forward", "ZJetBalance (30<pTZ<90), |#eta_{jet}|>3.0", 50, -75.,75);
1296  mJetZBalance_mediumZPt_J_Forward = ibooker.book1D("JZB_mediumZPt_J_Forward", "ZJetBalance (90<pTZ<140), |#eta_{jet}|>3.0", 50, -75.,75);
1297  mJetZBalance_highZPt_J_Forward = ibooker.book1D("JZB_highZPt_J_Forward", "ZJetBalance (pTZ>140), |#eta_{jet}|>3.0", 50, -75., 75.);
1298 
1299  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"DiMuonMass" ,mZMass));
1300  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"DPhiZJ" ,mDPhiZJet ));
1301  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"ZJetAsymmetry" ,mZJetAsymmetry ));
1302  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"JZB_lowZPt_J_Barrel" ,mJetZBalance_lowZPt_J_Barrel ));
1303  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"JZB_mediumZPt_J_Barrel" ,mJetZBalance_mediumZPt_J_Barrel ));
1304  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"JZB_highZPt_J_Barrel" ,mJetZBalance_highZPt_J_Barrel ));
1305  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"JZB_lowZPt_J_EndCap" ,mJetZBalance_lowZPt_J_EndCap ));
1306  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"JZB_mediumZPt_J_EndCap" ,mJetZBalance_mediumZPt_J_EndCap ));
1307  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"JZB_highZPt_J_EndCap" ,mJetZBalance_highZPt_J_EndCap ));
1308  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"JZB_lowZPt_J_Forward" ,mJetZBalance_lowZPt_J_Forward ));
1309  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"JZB_mediumZPt_J_Forward" ,mJetZBalance_mediumZPt_J_Forward ));
1310  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"JZB_highZPt_J_Forward" ,mJetZBalance_highZPt_J_Forward ));
1311 
1312  mJ1Pt_over_ZPt_J_Barrel = ibooker.book1D("J1Pt_over_ZPt_J_Barrel", "Jet1_Pt/ZPt, Barrel", 50, 0.,3.0);
1313  mJ1Pt_over_ZPt_J_EndCap = ibooker.book1D("J1Pt_over_ZPt_J_EndCap", "Jet1_Pt/ZPt, EndCap", 50, 0.,3.0);
1314  mJ1Pt_over_ZPt_J_Forward = ibooker.book1D("J1Pt_over_ZPt_J_Forward", "Jet1_Pt/ZPt, Forward", 50, 0.,3.0);
1315 
1316  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"J1Pt_over_ZPt_J_Barrel" ,mJ1Pt_over_ZPt_J_Barrel ));
1317  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"J1Pt_over_ZPt_J_EndCap" ,mJ1Pt_over_ZPt_J_EndCap ));
1318  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"J1Pt_over_ZPt_J_Forward" ,mJ1Pt_over_ZPt_J_Forward ));
1319 
1320  mJ1Pt_over_ZPt_lowZPt_J_Barrel = ibooker.book1D("J1Pt_over_ZPt_lowZPt_J_Barrel", "Jet1_Pt/ZPt (30<pTZ<90), |#eta_{jet}|<1.3", 50, 0.,3.0);
1321  mJ1Pt_over_ZPt_mediumZPt_J_Barrel = ibooker.book1D("J1Pt_over_ZPt_mediumZPt_J_Barrel", "Jet1_Pt/ZPt (90<pTZ<140), |#eta_{jet}|<1.3", 50, 0.,3.0);
1322  mJ1Pt_over_ZPt_highZPt_J_Barrel = ibooker.book1D("J1Pt_over_ZPt_highPt_J_Barrel", "Jet1_Pt/ZPt (pTZ>140), |#eta_{jet}|<1.3", 50, 0.,3.0);
1323  mJ1Pt_over_ZPt_lowZPt_J_EndCap = ibooker.book1D("J1Pt_over_ZPt_lowZPt_J_EndCap", "Jet1_Pt/ZPt (30<pTZ<90), 1.3<|#eta_{jet}|<3.0", 50, 0.,3.0);
1324  mJ1Pt_over_ZPt_mediumZPt_J_EndCap = ibooker.book1D("J1Pt_over_ZPt_mediumZPt_J_EndCap", "Jet1_Pt/ZPt (90<pTZ<140), 1.3<|#eta_{jet}|<3.0", 50, 0.,3.0);
1325  mJ1Pt_over_ZPt_highZPt_J_EndCap = ibooker.book1D("J1Pt_over_ZPt_highZPt_J_EndCap", "Jet1_Pt/ZPt (pTZ>140), 1.3<|#eta_{jet}|<3.0", 50, 0.,3.0);
1326  mJ1Pt_over_ZPt_lowZPt_J_Forward = ibooker.book1D("J1Pt_over_ZPt_lowZPt_J_Forward", "Jet1_Pt/ZPt (30<pTZ<90), |#eta_{jet}|>3.0", 50, 0.,3.0);
1327  mJ1Pt_over_ZPt_mediumZPt_J_Forward = ibooker.book1D("J1Pt_over_ZPt_mediumPt_J_Forward", "Jet1_Pt/ZPt (90<pTZ<140), |#eta_{jet}|>3.0", 50, 0.,3.0);
1328  mJ1Pt_over_ZPt_highZPt_J_Forward = ibooker.book1D("J1Pt_over_ZPt_highZPt_J_Forward", "Jet1_Pt/ZPt (pTZ>140), |#eta_{jet}|>3.0", 50, 0.,3.0);
1329 
1330  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"J1Pt_over_ZPt_lowZPt_J_Barrel" ,mJ1Pt_over_ZPt_lowZPt_J_Barrel ));
1331  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"J1Pt_over_ZPt_mediumZPt_J_Barrel" ,mJ1Pt_over_ZPt_mediumZPt_J_Barrel ));
1332  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"J1Pt_over_ZPt_highZPt_J_Barrel" ,mJ1Pt_over_ZPt_highZPt_J_Barrel ));
1333  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"J1Pt_over_ZPt_lowZPt_J_EndCap" ,mJ1Pt_over_ZPt_lowZPt_J_EndCap ));
1334  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"J1Pt_over_ZPt_mediumZPt_J_EndCap" ,mJ1Pt_over_ZPt_mediumZPt_J_EndCap ));
1335  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"J1Pt_over_ZPt_highZPt_J_EndCap" ,mJ1Pt_over_ZPt_highZPt_J_EndCap ));
1336  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"J1Pt_over_ZPt_lowZPt_J_Forward" ,mJ1Pt_over_ZPt_lowZPt_J_Forward ));
1337  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"J1Pt_over_ZPt_mediumZPt_J_Forward" ,mJ1Pt_over_ZPt_mediumZPt_J_Forward ));
1338  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"J1Pt_over_ZPt_highZPt_J_Forward" ,mJ1Pt_over_ZPt_highZPt_J_Forward ));
1339 
1340 
1341  mMPF_J_Barrel = ibooker.book1D("MPF_J_Barrel", "Jet1_Pt/ZPt, Barrel", 50, 0.,2.0);
1342  mMPF_J_EndCap = ibooker.book1D("MPF_J_EndCap", "Jet1_Pt/ZPt, EndCap", 50, 0.,2.0);
1343  mMPF_J_Forward = ibooker.book1D("MPF_J_Forward", "Jet1_Pt/ZPt, Forward", 50, 0.,2.0);
1344 
1345  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"MPF_J_Barrel" ,mMPF_J_Barrel ));
1346  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"MPF_J_EndCap" ,mMPF_J_EndCap ));
1347  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"MPF_J_Forward" ,mMPF_J_Forward ));
1348 
1349  mMPF_lowZPt_J_Barrel = ibooker.book1D("MPF_lowZPt_J_Barrel", "Jet1_Pt/ZPt (30<pTZ<90), |#eta_{jet}|<1.3", 50, 0.,2.0);
1350  mMPF_mediumZPt_J_Barrel = ibooker.book1D("MPF_mediumZPt_J_Barrel", "Jet1_Pt/ZPt (90<pTZ<140), |#eta_{jet}|<1.3", 50, 0.,2.0);
1351  mMPF_highZPt_J_Barrel = ibooker.book1D("MPF_highPt_J_Barrel", "Jet1_Pt/ZPt (pTZ>140), |#eta_{jet}|<1.3", 50, 0.,2.0);
1352  mMPF_lowZPt_J_EndCap = ibooker.book1D("MPF_lowZPt_J_EndCap", "Jet1_Pt/ZPt (30<pTZ<90), 1.3<|#eta_{jet}|<3.0", 50, 0.,2.0);
1353  mMPF_mediumZPt_J_EndCap = ibooker.book1D("MPF_mediumZPt_J_EndCap", "Jet1_Pt/ZPt (90<pTZ<140), 1.3<|#eta_{jet}|<3.0", 50, 0.,2.0);
1354  mMPF_highZPt_J_EndCap = ibooker.book1D("MPF_highZPt_J_EndCap", "Jet1_Pt/ZPt (pTZ>140), 1.3<|#eta_{jet}|<3.0", 50, 0.,2.0);
1355  mMPF_lowZPt_J_Forward = ibooker.book1D("MPF_lowZPt_J_Forward", "Jet1_Pt/ZPt (30<pTZ<90), |#eta_{jet}|>3.0", 50, 0.,2.0);
1356  mMPF_mediumZPt_J_Forward = ibooker.book1D("MPF_mediumPt_J_Forward", "Jet1_Pt/ZPt (90<pTZ<140), |#eta_{jet}|>3.0", 50, 0.,2.0);
1357  mMPF_highZPt_J_Forward = ibooker.book1D("MPF_highZPt_J_Forward", "Jet1_Pt/ZPt (pTZ>140), |#eta_{jet}|>3.0", 50, 0.,2.0);
1358 
1359  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"MPF_lowZPt_J_Barrel" ,mMPF_lowZPt_J_Barrel ));
1360  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"MPF_mediumZPt_J_Barrel" ,mMPF_mediumZPt_J_Barrel ));
1361  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"MPF_highZPt_J_Barrel" ,mMPF_highZPt_J_Barrel ));
1362  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"MPF_lowZPt_J_EndCap" ,mMPF_lowZPt_J_EndCap ));
1363  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"MPF_mediumZPt_J_EndCap" ,mMPF_mediumZPt_J_EndCap ));
1364  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"MPF_highZPt_J_EndCap" ,mMPF_highZPt_J_EndCap ));
1365  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"MPF_lowZPt_J_Forward" ,mMPF_lowZPt_J_Forward ));
1366  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"MPF_mediumZPt_J_Forward" ,mMPF_mediumZPt_J_Forward ));
1367  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"MPF_highZPt_J_Forward" ,mMPF_highZPt_J_Forward ));
1368 
1369 
1370  mDeltaPt_Z_j1_over_ZPt_30_55_J_Barrel = 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);
1371  mDeltaPt_Z_j1_over_ZPt_55_75_J_Barrel = 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);
1372  mDeltaPt_Z_j1_over_ZPt_75_150_J_Barrel = ibooker.book1D("DeltaPt_Z_j1_over_ZPt_75_150_J_Barrel", "DeltaPt_Z_j1_over_ZPt_75_150_J_Barrel", 50, -1.00,1.00);
1373  mDeltaPt_Z_j1_over_ZPt_150_290_J_Barrel = ibooker.book1D("DeltaPt_Z_j1_over_ZPt_150_290_J_Barrel", "DeltaPt_Z_j1_over_ZPt_150_290_J_Barrel", 50, -1.00,1.00);
1374  mDeltaPt_Z_j1_over_ZPt_290_J_Barrel = ibooker.book1D("DeltaPt_Z_j1_over_ZPt_290_J_Barrel", "DeltaPt_Z_j1_over_ZPt_290_J_Barrel", 50, -1.00,1.00);
1375  mDeltaPt_Z_j1_over_ZPt_30_55_J_EndCap = 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);
1376  mDeltaPt_Z_j1_over_ZPt_55_75_J_EndCap = 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);
1377  mDeltaPt_Z_j1_over_ZPt_75_150_J_EndCap = ibooker.book1D("DeltaPt_Z_j1_over_ZPt_75_150_J_EndCap", "DeltaPt_Z_j1_over_ZPt_75_150_J_EndCap", 50, -1.00,1.00);
1378  mDeltaPt_Z_j1_over_ZPt_150_290_J_EndCap = ibooker.book1D("DeltaPt_Z_j1_over_ZPt_150_290_J_EndCap", "DeltaPt_Z_j1_over_ZPt_150_290_J_EndCap", 50, -1.00,1.00);
1379  mDeltaPt_Z_j1_over_ZPt_290_J_EndCap = ibooker.book1D("DeltaPt_Z_j1_over_ZPt_290_J_EndCap", "DeltaPt_Z_j1_over_ZPt_290_J_EndCap", 50, -1.00,1.00);
1380  mDeltaPt_Z_j1_over_ZPt_30_55_J_Forward = ibooker.book1D("DeltaPt_Z_j1_over_ZPt_30_55_J_Forward", "DeltaPt_Z_j1_over_ZPt_30_55_J_Forward", 50, -1.00,1.00);
1381  mDeltaPt_Z_j1_over_ZPt_55_100_J_Forward = ibooker.book1D("DeltaPt_Z_j1_over_ZPt_55_100_J_Forward", "DeltaPt_Z_j1_over_ZPt_55_100_J_Forward", 50, -1.00,1.00);
1382  mDeltaPt_Z_j1_over_ZPt_100_J_Forward = ibooker.book1D("DeltaPt_Z_j1_over_ZPt_100_J_Forward", "DeltaPt_Z_j1_over_ZPt_100_J_Forward", 50, -1.00,1.00);
1383 
1384  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"DeltaPt_Z_j1_over_ZPt_30_55_J_Barrel" ,mDeltaPt_Z_j1_over_ZPt_30_55_J_Barrel ));
1385  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"DeltaPt_Z_j1_over_ZPt_55_75_J_Barrel" ,mDeltaPt_Z_j1_over_ZPt_55_75_J_Barrel ));
1386  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"DeltaPt_Z_j1_over_ZPt_75_150_J_Barrel" ,mDeltaPt_Z_j1_over_ZPt_75_150_J_Barrel ));
1387  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"DeltaPt_Z_j1_over_ZPt_150_290_J_Barrel" ,mDeltaPt_Z_j1_over_ZPt_150_290_J_Barrel ));
1388  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"DeltaPt_Z_j1_over_ZPt_290_J_Barrel" ,mDeltaPt_Z_j1_over_ZPt_290_J_Barrel ));
1389  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"DeltaPt_Z_j1_over_ZPt_30_55_J_EndCap" ,mDeltaPt_Z_j1_over_ZPt_30_55_J_EndCap ));
1390  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"DeltaPt_Z_j1_over_ZPt_55_75_J_EndCap" ,mDeltaPt_Z_j1_over_ZPt_55_75_J_EndCap ));
1391  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"DeltaPt_Z_j1_over_ZPt_75_150_J_EndCap" ,mDeltaPt_Z_j1_over_ZPt_75_150_J_EndCap ));
1392  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"DeltaPt_Z_j1_over_ZPt_150_290_J_EndCap" ,mDeltaPt_Z_j1_over_ZPt_150_290_J_EndCap ));
1393  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"DeltaPt_Z_j1_over_ZPt_290_J_EndCap" ,mDeltaPt_Z_j1_over_ZPt_290_J_EndCap ));
1394  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"DeltaPt_Z_j1_over_ZPt_30_55_J_Forward" ,mDeltaPt_Z_j1_over_ZPt_30_55_J_Forward ));
1395  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"DeltaPt_Z_j1_over_ZPt_55_100_J_Forward" ,mDeltaPt_Z_j1_over_ZPt_55_100_J_Forward ));
1396  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"DeltaPt_Z_j1_over_ZPt_100_J_Forward" ,mDeltaPt_Z_j1_over_ZPt_100_J_Forward ));
1397  }
1398  // Book NPV profiles
1399  //----------------------------------------------------------------------------
1400  mPt_profile = ibooker.bookProfile("Pt_profile", "pt", nbinsPV_, nPVlow_, nPVhigh_, ptBin_, ptMin_, ptMax_);
1401  mEta_profile = ibooker.bookProfile("Eta_profile", "eta", nbinsPV_, nPVlow_, nPVhigh_, etaBin_, etaMin_, etaMax_);
1402  mPhi_profile = ibooker.bookProfile("Phi_profile", "phi", nbinsPV_, nPVlow_, nPVhigh_, phiBin_, phiMin_, phiMax_);
1403  //if(!isJPTJet_){
1404  mConstituents_profile = ibooker.bookProfile("Constituents_profile", "# of constituents", nbinsPV_, nPVlow_, nPVhigh_, 50, 0, 100);
1405  //}
1406  // met NPV profiles x-axis title
1407  //----------------------------------------------------------------------------
1408  mPt_profile ->setAxisTitle("nvtx",1);
1409  mEta_profile ->setAxisTitle("nvtx",1);
1410  mPhi_profile ->setAxisTitle("nvtx",1);
1411  //if(!isJPTJet_){
1412  mConstituents_profile->setAxisTitle("nvtx",1);
1413  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"Constituents_profile",mConstituents_profile));
1414  //}
1415 
1416  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"Pt_profile" ,mPt_profile));
1417  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"Eta_profile",mEta_profile));
1418  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"Phi_profile",mPhi_profile));
1419  //
1420  //--- Calo jet melection only
1421 
1422  if(isCaloJet_) {
1423  mHFrac = ibooker.book1D("HFrac", "HFrac", 140, -0.2, 1.2);
1424  mEFrac = ibooker.book1D("EFrac", "EFrac", 140, -0.2, 1.2);
1425  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"HFrac" ,mHFrac));
1426  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"EFrac" ,mEFrac));
1427 
1428  mHFrac_profile = ibooker.bookProfile("HFrac_profile", "HFrac", nbinsPV_, nPVlow_, nPVhigh_, 140, -0.2, 1.2);
1429  mEFrac_profile = ibooker.bookProfile("EFrac_profile", "EFrac", nbinsPV_, nPVlow_, nPVhigh_, 140, -0.2, 1.2);
1430  mHFrac_profile ->setAxisTitle("nvtx",1);
1431  mEFrac_profile ->setAxisTitle("nvtx",1);
1432  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"HFrac_profile",mHFrac_profile));
1433  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"EFrac_profile",mEFrac_profile));
1434 
1435  // CaloJet specific
1436  //JetID variables
1437  mresEMF = ibooker.book1D("resEMF", "resEMF", 50, 0., 1.);
1438  mN90Hits = ibooker.book1D("N90Hits", "N90Hits", 50, 0., 100);
1439  mfHPD = ibooker.book1D("fHPD", "fHPD", 50, 0., 1.);
1440  mfRBX = ibooker.book1D("fRBX", "fRBX", 50, 0., 1.);
1441 
1442  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"resEMF" ,mresEMF));
1443  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"N90Hits",mN90Hits));
1444  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"fHPD" ,mfHPD));
1445  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"fRBX" ,mfRBX));
1446 
1447  }
1448 
1449  if(isPFJet_|| isMiniAODJet_){
1450  //barrel histograms for PFJets
1451  // energy fractions
1452  mCHFrac = ibooker.book1D("CHFrac", "CHFrac", 120, -0.1, 1.1);
1453  mNHFrac = ibooker.book1D("NHFrac", "NHFrac", 120, -0.1, 1.1);
1454  mPhFrac = ibooker.book1D("PhFrac", "PhFrac", 120, -0.1, 1.1);
1455  mHFEMFrac = ibooker.book1D("HFEMFrac","HFEMFrac", 120, -0.1, 1.1);
1456  mHFHFrac = ibooker.book1D("HFHFrac", "HFHFrac", 120, -0.1, 1.1);
1457 
1458  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CHFrac" ,mCHFrac));
1459  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"NHFrac" ,mNHFrac));
1460  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PhFrac" ,mPhFrac));
1461  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"HFEMFrac",mHFEMFrac));
1462  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"HFHFrac" ,mHFHFrac));
1463 
1464  // Book NPV profiles
1465  //----------------------------------------------------------------------------
1466  mCHFrac_profile = ibooker.bookProfile("CHFrac_profile", "charged HAD fraction profile", nbinsPV_, nPVlow_, nPVhigh_, 50, 0, 1);
1467  mNHFrac_profile = ibooker.bookProfile("NHFrac_profile", "neutral HAD fraction profile", nbinsPV_, nPVlow_, nPVhigh_, 50, 0, 1);
1468  mPhFrac_profile = ibooker.bookProfile("PhFrac_profile", "Photon Fraction Profile", nbinsPV_, nPVlow_, nPVhigh_, 50, 0, 1);
1469  mHFEMFrac_profile = ibooker.bookProfile("HFEMFrac_profile","HF electomagnetic fraction Profile", nbinsPV_, nPVlow_, nPVhigh_, 50, 0, 1);
1470  mHFHFrac_profile = ibooker.bookProfile("HFHFrac_profile", "HF hadronic fraction profile", nbinsPV_, nPVlow_, nPVhigh_, 50, 0, 1);
1471 
1472 
1473  // met NPV profiles x-axis title
1474  //----------------------------------------------------------------------------
1475  mCHFrac_profile ->setAxisTitle("nvtx",1);
1476  mNHFrac_profile ->setAxisTitle("nvtx",1);
1477  mPhFrac_profile ->setAxisTitle("nvtx",1);
1478  mHFEMFrac_profile ->setAxisTitle("nvtx",1);
1479  mHFHFrac_profile ->setAxisTitle("nvtx",1);
1480 
1481  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CHFrac_profile" ,mCHFrac_profile));
1482  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"NHFrac_profile" ,mNHFrac_profile));
1483  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PhFrac_profile" ,mPhFrac_profile));
1484  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"HFEMFrac_profile",mHFEMFrac_profile));
1485  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"HFHFrac_profile" ,mHFHFrac_profile));
1486 
1487  }
1488 }
1489 
1490 // ***********************************************************
1491 void JetAnalyzer::dqmBeginRun(const edm::Run& iRun, const edm::EventSetup& iSetup)
1492 {
1493  //LogDebug("JetAnalyzer") << "beginRun, run " << run.id();
1494  //
1495 
1496  if ( highPtJetEventFlag_->on() ) highPtJetEventFlag_->initRun( iRun, iSetup );
1497  if ( lowPtJetEventFlag_ ->on() ) lowPtJetEventFlag_ ->initRun( iRun, iSetup );
1498 
1499  if (highPtJetEventFlag_->on() && highPtJetEventFlag_->expressionsFromDB(highPtJetEventFlag_->hltDBKey(), iSetup)[0] != "CONFIG_ERROR")
1500  highPtJetExpr_ = highPtJetEventFlag_->expressionsFromDB(highPtJetEventFlag_->hltDBKey(), iSetup);
1501  if (lowPtJetEventFlag_->on() && lowPtJetEventFlag_->expressionsFromDB(lowPtJetEventFlag_->hltDBKey(), iSetup)[0] != "CONFIG_ERROR")
1502  lowPtJetExpr_ = lowPtJetEventFlag_->expressionsFromDB(lowPtJetEventFlag_->hltDBKey(), iSetup);
1503 // if (!jetCorrectionService_.empty()){
1504 // energycorrected=true;
1505 // }
1506  //--- htlConfig_
1507  //processname_="HLT";
1508  bool changed(true);
1509  hltInitialized_ = hltConfig_.init(iRun,iSetup,processname_,changed);
1510  if (!hltInitialized_) {
1511  //if (!hltConfig_.init(iRun,iSetup,processname_,changed)) {
1512  processname_ = "FU";
1513  hltInitialized_ = hltConfig_.init(iRun,iSetup,processname_,changed);
1514  if(!hltInitialized_){
1515  //if (!hltConfig_.init(iRun,iSetup,processname_,changed)){
1516  LogDebug("JetAnalyzer") << "HLTConfigProvider failed to initialize.";
1517  }
1518  }
1519 
1521  iSetup.get<L1GtTriggerMenuRcd>().get(menuRcd) ;
1522  const L1GtTriggerMenu* menu = menuRcd.product();
1523  for (CItAlgo techTrig = menu->gtTechnicalTriggerMap().begin(); techTrig != menu->gtTechnicalTriggerMap().end(); ++techTrig) {
1524  if ((techTrig->second).algoName() == m_l1algoname_) {
1525  m_bitAlgTechTrig_=(techTrig->second).algoBitNumber();
1526  break;
1527  }
1528  }
1529 
1530 }
1531 
1532 // ***********************************************************
1533 void JetAnalyzer::endRun(const edm::Run& iRun, const edm::EventSetup& iSetup)
1534 {
1535 }
1536 
1537 // ***********************************************************
1539 
1540 
1541  //set general folders first --> change later on for different folders
1542  if(jetCleaningFlag_){
1543  //dbe_->setCurrentFolder("JetMET/Jet/Cleaned"+mInputCollection_.label());
1544  DirName = "JetMET/Jet/Cleaned"+mInputCollection_.label();
1545  }else{
1546  //dbe_->setCurrentFolder("JetMET/Jet/Uncleaned"+mInputCollection_.label());
1547  DirName = "JetMET/Jet/Uncleaned"+mInputCollection_.label();
1548  }
1549 
1550 
1551  Handle<ValueMap<float> > puJetIdMva;
1552  Handle<ValueMap<int> > puJetIdFlagMva;
1553  Handle<ValueMap<float> > puJetId;
1554  Handle<ValueMap<int> > puJetIdFlag;
1555 
1556  Handle<ValueMap<int> > qgMultiplicity;
1557  Handle<ValueMap<float> > qgLikelihood;
1558  Handle<ValueMap<float> > qgptD;
1559  Handle<ValueMap<float> > qgaxis2;
1560 
1561  //should insure we have a PFJet in with CHS
1562  if(fill_CHS_histos){
1563  iEvent.getByToken(qgMultiplicityToken_,qgMultiplicity);
1564  iEvent.getByToken(qgLikelihoodToken_,qgLikelihood);
1565  iEvent.getByToken(qgptDToken_,qgptD);
1566  iEvent.getByToken(qgaxis2Token_,qgaxis2);
1567  }
1568 
1569  if(!isMiniAODJet_){
1570  iEvent.getByToken(mvaPUIDToken_,puJetIdFlagMva);
1571  iEvent.getByToken(cutBasedPUDiscriminantToken_,puJetId);
1572  iEvent.getByToken(cutBasedPUIDToken_,puJetIdFlag);
1573  iEvent.getByToken(mvaFullPUDiscriminantToken_ ,puJetIdMva);
1574  }
1575 
1576  // **** Get the TriggerResults container
1578  iEvent.getByToken(triggerResultsToken_, triggerResults);
1579 
1580  Int_t JetLoPass = 0;
1581  Int_t JetHiPass = 0;
1582 
1583  if (triggerResults.isValid()){
1584  const edm::TriggerNames & triggerNames = iEvent.triggerNames(*triggerResults);
1585 
1586  const unsigned int nTrig(triggerNames.size());
1587  for (unsigned int i=0;i<nTrig;++i)
1588  {
1589  if (triggerNames.triggerName(i).find(highPtJetExpr_[0].substr(0,highPtJetExpr_[0].rfind("_v")+2))!=std::string::npos && triggerResults->accept(i))
1590  JetHiPass=1;
1591  else if (triggerNames.triggerName(i).find(lowPtJetExpr_[0].substr(0,lowPtJetExpr_[0].rfind("_v")+2))!=std::string::npos && triggerResults->accept(i))
1592  JetLoPass=1;
1593  }
1594 
1595  }
1596 
1597  if (verbose_) std::cout << "trigger label " << theTriggerResultsLabel_ << std::endl;
1598 
1599 
1600  if (verbose_) {
1601  std::cout << ">>> Trigger Lo = " << JetLoPass
1602  << " Hi = " << JetHiPass
1603  << std::endl;
1604  }
1605 
1606  // ==========================================================
1607  //Vertex information
1608  Handle<VertexCollection> vertexHandle;
1609  iEvent.getByToken(vertexToken_, vertexHandle);
1610 
1611  if (!vertexHandle.isValid()) {
1612  LogDebug("") << "CaloMETAnalyzer: Could not find vertex collection" << std::endl;
1613  if (verbose_) std::cout << "CaloMETAnalyzer: Could not find vertex collection" << std::endl;
1614  }
1615  int numPV = 0;
1616  if ( vertexHandle.isValid() ){
1617  VertexCollection vertexCollection = *(vertexHandle.product());
1618  numPV = vertexCollection.size();
1619  }
1620  bool bPrimaryVertex = (bypassAllPVChecks_ || (numPV>0));
1621  if(fill_jet_high_level_histo){//should be filled for all events, no selection up to this point
1622  verticesME = map_of_MEs["JetMET/vertices"]; if(verticesME && verticesME->getRootObject())verticesME->Fill(numPV);
1623  }
1624  // ==========================================================
1626  iEvent.getByToken(gtToken_, gtReadoutRecord);
1627 
1628  if (!gtReadoutRecord.isValid()) {
1629  LogInfo("JetAnalyzer") << "JetAnalyzer: Could not find GT readout record" << std::endl;
1630  if (verbose_) std::cout << "JetAnalyzer: Could not find GT readout record product" << std::endl;
1631  }
1632 
1633  bool techTriggerResultBxE = false;
1634  bool techTriggerResultBxF = false;
1635  bool techTriggerResultBx0 = false;
1636 
1637  if (!gtReadoutRecord.isValid()) {
1638  LogDebug("") << "CaloMETAnalyzer: Could not find GT readout record" << std::endl;
1639  if (verbose_) std::cout << "CaloMETAnalyzer: Could not find GT readout record product" << std::endl;
1640  }else{
1641  // trigger results before mask for BxInEvent -2 (E), -1 (F), 0 (L1A), 1, 2
1642  const TechnicalTriggerWord& technicalTriggerWordBeforeMaskBxE = gtReadoutRecord->technicalTriggerWord(-2);
1643  const TechnicalTriggerWord& technicalTriggerWordBeforeMaskBxF = gtReadoutRecord->technicalTriggerWord(-1);
1644  const TechnicalTriggerWord& technicalTriggerWordBeforeMaskBx0 = gtReadoutRecord->technicalTriggerWord();
1645  //const TechnicalTriggerWord& technicalTriggerWordBeforeMaskBxG = gtReadoutRecord->technicalTriggerWord(1);
1646  //const TechnicalTriggerWord& technicalTriggerWordBeforeMaskBxH = gtReadoutRecord->technicalTriggerWord(2);
1647  if (m_bitAlgTechTrig_ > -1 && technicalTriggerWordBeforeMaskBx0.size() > 0) {
1648  techTriggerResultBx0 = technicalTriggerWordBeforeMaskBx0.at(m_bitAlgTechTrig_);
1649  if(techTriggerResultBx0!=0){
1650  techTriggerResultBxE = technicalTriggerWordBeforeMaskBxE.at(m_bitAlgTechTrig_);
1651  techTriggerResultBxF = technicalTriggerWordBeforeMaskBxF.at(m_bitAlgTechTrig_);
1652  }
1653  }
1654  }
1655 
1656 
1657  DCSFilterForDCSMonitoring_->filter(iEvent, iSetup);
1658  if(fill_jet_high_level_histo){//should be filled only once
1659  cleanupME = map_of_MEs["JetMET/cleanup"]; if(cleanupME && cleanupME->getRootObject()){
1660  if (bPrimaryVertex) cleanupME->Fill(0.5);
1661  if ( DCSFilterForDCSMonitoring_->passPIX ) cleanupME->Fill(1.5);
1662  if ( DCSFilterForDCSMonitoring_->passSiStrip ) cleanupME->Fill(2.5);
1663  if ( DCSFilterForDCSMonitoring_->passECAL ) cleanupME->Fill(3.5);
1664  if ( DCSFilterForDCSMonitoring_->passES ) cleanupME->Fill(4.5);
1665  if ( DCSFilterForDCSMonitoring_->passHBHE ) cleanupME->Fill(5.5);
1666  if ( DCSFilterForDCSMonitoring_->passHF ) cleanupME->Fill(6.5);
1667  if ( DCSFilterForDCSMonitoring_->passHO ) cleanupME->Fill(7.5);
1668  if ( DCSFilterForDCSMonitoring_->passMuon ) cleanupME->Fill(8.5);
1669  }
1670  }
1675 
1677 
1678  bool pass_Z_selection=false;
1680 
1681  int mu_index0=-1;
1682  int mu_index1=-1;
1683 
1684  if (isCaloJet_) iEvent.getByToken(caloJetsToken_, caloJets);
1685  //if (isJPTJet_) iEvent.getByToken(jptJetsToken_, jptJets);
1686  if (isPFJet_){ iEvent.getByToken(pfJetsToken_, pfJets);
1687  iEvent.getByToken(MuonsToken_, Muons);
1688  double pt0=-1;
1689  double pt1=-1;
1690  //fill it only for cleaned jets
1691  if(jetCleaningFlag_ && Muons.isValid() && Muons->size()>1){
1692  for (unsigned int i=0;i<Muons->size();i++){
1693  bool pass_muon_id=false;
1694  bool pass_muon_iso=false;
1695  double dxy=fabs((*Muons)[i].muonBestTrack()->dxy());
1696  double dz=fabs((*Muons)[i].muonBestTrack()->dz());
1697  if (numPV>0){
1698  dxy=fabs((*Muons)[i].muonBestTrack()->dxy((*vertexHandle)[0].position()));
1699  dz=fabs((*Muons)[i].muonBestTrack()->dz((*vertexHandle)[0].position()));
1700  }
1701  if((*Muons)[i].pt()>20 && fabs((*Muons)[i].eta())<2.3){
1702  if((*Muons)[i].isGlobalMuon() && (*Muons)[i].isPFMuon() && (*Muons)[i].globalTrack()->hitPattern().numberOfValidMuonHits() > 0 && (*Muons)[i].numberOfMatchedStations() > 1 && dxy < 0.2 && (*Muons)[i].numberOfMatchedStations() > 1 && dz<0.5 && (*Muons)[i].innerTrack()->hitPattern().numberOfValidPixelHits() > 0 && (*Muons)[i].innerTrack()->hitPattern().trackerLayersWithMeasurement() > 5){
1703  pass_muon_id=true;
1704  }
1705  // Muon pf isolation DB corrected
1706  float muonIsoPFdb = ((*Muons)[i].pfIsolationR04().sumChargedHadronPt
1707  + std::max(0., (*Muons)[i].pfIsolationR04().sumNeutralHadronEt + (*Muons)[i].pfIsolationR04().sumPhotonEt - 0.5*(*Muons)[i].pfIsolationR04().sumPUPt))/(*Muons)[i].pt();
1708  if(muonIsoPFdb<0.12){
1709  pass_muon_iso=true;
1710  }
1711 
1712  if(pass_muon_id && pass_muon_iso){
1713  if((*Muons)[i].pt()>pt0){
1714  mu_index1=mu_index0;
1715  pt1=pt0;
1716  mu_index0=i;
1717  pt0=(*Muons)[i].pt();
1718  }else if ((*Muons)[i].pt()>pt1){
1719  mu_index1=i;
1720  pt1=(*Muons)[i].pt();
1721  }
1722  }
1723  }
1724  }
1725  if(mu_index0>=0 && mu_index1>=0){
1726  if((*Muons)[mu_index0].charge()*(*Muons)[mu_index1].charge()<0){
1727  zCand=(*Muons)[mu_index0].polarP4()+(*Muons)[mu_index1].polarP4();
1728  if(fabs(zCand.M()-91.)<20 && zCand.Pt()>30){
1729  pass_Z_selection=true;
1730  }
1731  }
1732  }
1733  }
1734  }
1735  if(isMiniAODJet_) iEvent.getByToken(patJetsToken_,patJets);
1736 
1737  edm::Handle< edm::ValueMap<reco::JetID> >jetID_ValueMap_Handle;
1738  if(/*isJPTJet_ || */isCaloJet_){
1739  if(!runcosmics_){
1740  iEvent.getByToken(jetID_ValueMapToken_,jetID_ValueMap_Handle);
1741  }
1742  }
1743 
1744  //check for collections AND DCS filters
1745  bool dcsDecision = DCSFilterForJetMonitoring_->filter(iEvent, iSetup);
1746  bool jetCollectionIsValid = false;
1747  if (isCaloJet_) jetCollectionIsValid = caloJets.isValid();
1748  //if (isJPTJet_) jetCollectionIsValid = jptJets.isValid();
1749  if (isPFJet_) jetCollectionIsValid = pfJets.isValid();
1750  if (isMiniAODJet_) jetCollectionIsValid = patJets.isValid();
1751 
1752 
1753  if (jetCleaningFlag_ && (!jetCollectionIsValid || !bPrimaryVertex || !dcsDecision)) return;
1754 
1755  unsigned int collSize=-1;
1756  if (isCaloJet_) collSize = caloJets->size();
1757  //if (isJPTJet_) {
1758  //collSize=jptJets->size();
1759  //if(collSize>0){
1760  // //update the track propagator and strip noise calculator
1761  // trackPropagator_->update(iSetup);
1762  // //sOverNCalculator_->update(iSetup);
1763  //}
1764  //}
1765  if (isPFJet_) collSize=pfJets->size();
1766  if (isMiniAODJet_) collSize=patJets->size();
1767 
1768  double scale=-1;
1769  //now start changes for jets
1770  std::vector<Jet> corJets;
1771  corJets.clear();
1772 
1773  //maybe not most elegant solution, but works for sure
1774  int ind1=-1;
1775  double pt1=-1;
1776  int ind2=-1;
1777  double pt2=-1;
1778  int ind3=-1;
1779  double pt3=-1;
1780 
1781  bool cleaned_first_jet=false;
1782  bool cleaned_second_jet=false;
1783  //bool cleaned_third_jet=false;
1784  //for ZJets selection check for muon jet overlap
1785  int ind1_mu_vetoed=-1;
1786  double pt1_mu_vetoed=-1;
1787  int ind2_mu_vetoed=-1;
1788  double pt2_mu_vetoed=-1;
1789  bool cleaned_first_jet_mu_vetoed=false;
1790  bool cleaned_second_jet_mu_vetoed=false;
1791 
1792  //now start changes for jets
1793  std::vector<Jet> recoJets;
1794  recoJets.clear();
1795 
1796  int numofjets=0;
1797 
1799  bool pass_correction_flag=false;
1800  if(!isMiniAODJet_ && !jetCorrectorTag_.label().empty()){
1801  iEvent.getByToken(jetCorrectorToken_, jetCorr);
1802  if (jetCorr.isValid()){
1803  pass_correction_flag=true;
1804  }
1805  }
1806  if(isMiniAODJet_){
1807  pass_correction_flag=true;
1808  }
1809 
1810  for (unsigned int ijet=0; ijet<collSize; ijet++) {
1811  //bool thiscleaned=false;
1812  Jet correctedJet;
1813  bool pass_uncorrected=false;
1814  bool pass_corrected=false;
1815  if (isCaloJet_){
1816  correctedJet=(*caloJets)[ijet];
1817  }
1818  //if (isJPTJet_){
1819  //correctedJet=(*jptJets)[ijet];
1820  //}
1821  if (isPFJet_){
1822  correctedJet=(*pfJets)[ijet];
1823  }
1824  if (isMiniAODJet_){
1825  correctedJet=(*patJets)[ijet];
1826  }
1827  if(!isMiniAODJet_ && correctedJet.pt()>ptThresholdUnc_){
1828  pass_uncorrected=true;
1829  }
1830  if(isMiniAODJet_ && (correctedJet.pt()*(*patJets)[ijet].jecFactor("Uncorrected"))>ptThresholdUnc_){
1831  pass_uncorrected=true;
1832  }
1833  if (pass_correction_flag && !isMiniAODJet_) {
1834  if (isCaloJet_){
1835  scale = jetCorr->correction((*caloJets)[ijet]);
1836  }
1837  if (isPFJet_){
1838  scale = jetCorr->correction((*pfJets)[ijet]);
1839  }
1840  correctedJet.scaleEnergy(scale);
1841  }
1842  if(correctedJet.pt()> ptThreshold_){
1843  pass_corrected=true;
1844  }
1845  //if (!pass_corrected && !pass_uncorrected) continue;
1846  //remove the continue line, for physics selections we might losen the pt-thresholds as we care only about leading jets
1847  //fill only corrected jets -> check ID for uncorrected jets
1848  if(pass_corrected){
1849  recoJets.push_back(correctedJet);
1850  }
1851 
1852  if(!pass_corrected && !pass_uncorrected){
1853  continue;
1854  }
1855  bool jetpassid=true;
1856  bool Thiscleaned=true;
1857  bool JetIDWPU=true;
1858  //jet ID for calojets
1859  if (isCaloJet_) {
1860  reco::CaloJetRef calojetref(caloJets, ijet);
1861  if(!runcosmics_){
1862  reco::JetID jetID = (*jetID_ValueMap_Handle)[calojetref];
1863  jetpassid = jetIDFunctor((*caloJets)[ijet], jetID);
1864  JetIDWPU=jetpassid;
1865  if(jetCleaningFlag_){
1866  Thiscleaned=jetpassid;
1867  }
1868  if(Thiscleaned && pass_corrected){//if cleaning requested->jet passes a loose ID
1869  mN90Hits = map_of_MEs[DirName+"/"+"N90Hits"]; if (mN90Hits && mN90Hits->getRootObject()) mN90Hits->Fill (jetID.n90Hits);
1870  mfHPD = map_of_MEs[DirName+"/"+"fHPD"]; if (mfHPD && mfHPD->getRootObject()) mfHPD->Fill (jetID.fHPD);
1871  mresEMF = map_of_MEs[DirName+"/"+"resEMF"]; if (mresEMF && mresEMF->getRootObject()) mresEMF->Fill (jetID.restrictedEMF);
1872  mfRBX = map_of_MEs[DirName+"/"+"fRBX"]; if (mfRBX && mfRBX->getRootObject()) mfRBX->Fill (jetID.fRBX);
1873  }
1874  }
1875  if(jetCleaningFlag_){
1876  Thiscleaned=jetpassid;
1877  }
1878  if(Thiscleaned && pass_uncorrected){
1879  mPt_uncor = map_of_MEs[DirName+"/"+"Pt_uncor"]; if (mPt_uncor && mPt_uncor->getRootObject()) mPt_uncor->Fill ((*caloJets)[ijet].pt());
1880  mEta_uncor = map_of_MEs[DirName+"/"+"Eta_uncor"]; if (mEta_uncor && mEta_uncor->getRootObject()) mEta_uncor->Fill ((*caloJets)[ijet].eta());
1881  mPhi_uncor = map_of_MEs[DirName+"/"+"Phi_uncor"]; if (mPhi_uncor && mPhi_uncor->getRootObject()) mPhi_uncor->Fill ((*caloJets)[ijet].phi());
1882  mConstituents_uncor = map_of_MEs[DirName+"/"+"Constituents_uncor"]; if (mConstituents_uncor && mConstituents_uncor->getRootObject()) mConstituents_uncor->Fill ((*caloJets)[ijet].nConstituents());
1883  }
1884  //now do calojet specific fractions and histograms ->H and E fracs
1885  if(Thiscleaned && pass_corrected){//if cleaning requested->jet passes a loose ID
1886  mHFrac = map_of_MEs[DirName+"/"+"HFrac"]; if (mHFrac && mHFrac->getRootObject()) mHFrac->Fill ((*caloJets)[ijet].energyFractionHadronic());
1887  mEFrac = map_of_MEs[DirName+"/"+"EFrac"]; if (mEFrac && mHFrac->getRootObject()) mEFrac->Fill ((*caloJets)[ijet].emEnergyFraction());
1888  mHFrac_profile = map_of_MEs[DirName+"/"+"HFrac_profile"]; if (mHFrac_profile && mHFrac_profile->getRootObject()) mHFrac_profile ->Fill(numPV, (*caloJets)[ijet].energyFractionHadronic());
1889  mEFrac_profile = map_of_MEs[DirName+"/"+"EFrac_profile"]; if (mEFrac_profile && mEFrac_profile->getRootObject()) mEFrac_profile ->Fill(numPV, (*caloJets)[ijet].emEnergyFraction());
1890  if (fabs((*caloJets)[ijet].eta()) <= 1.3) {
1891  mHFrac_Barrel = map_of_MEs[DirName+"/"+"HFrac_Barrel"]; if (mHFrac_Barrel && mHFrac_Barrel->getRootObject()) mHFrac_Barrel->Fill((*caloJets)[ijet].energyFractionHadronic());
1892  mEFrac_Barrel = map_of_MEs[DirName+"/"+"EFrac_Barrel"]; if (mEFrac_Barrel && mEFrac_Barrel->getRootObject()) mEFrac_Barrel->Fill((*caloJets)[ijet].emEnergyFraction());
1893  }else if(fabs((*caloJets)[ijet].eta()) <3.0){
1894  mHFrac_EndCap = map_of_MEs[DirName+"/"+"HFrac_EndCap"]; if (mHFrac_EndCap && mHFrac_EndCap->getRootObject()) mHFrac_EndCap->Fill((*caloJets)[ijet].energyFractionHadronic());
1895  mEFrac_EndCap = map_of_MEs[DirName+"/"+"EFrac_EndCap"]; if (mEFrac_EndCap && mEFrac_EndCap->getRootObject()) mEFrac_EndCap->Fill((*caloJets)[ijet].emEnergyFraction());
1896  }else{
1897  mHFrac_Forward = map_of_MEs[DirName+"/"+"HFrac_Forward"]; if (mHFrac_Forward && mHFrac_Forward->getRootObject()) mHFrac_Forward->Fill((*caloJets)[ijet].energyFractionHadronic());
1898  mEFrac_Forward = map_of_MEs[DirName+"/"+"EFrac_Forward"]; if (mEFrac_Forward && mEFrac_Forward->getRootObject()) mEFrac_Forward->Fill((*caloJets)[ijet].emEnergyFraction());
1899  }
1900  mHadEnergyInHO = map_of_MEs[DirName+"/"+"HadEnergyInHO"]; if (mHadEnergyInHO && mHadEnergyInHO->getRootObject()) mHadEnergyInHO->Fill ((*caloJets)[ijet].hadEnergyInHO());
1901  mHadEnergyInHB = map_of_MEs[DirName+"/"+"HadEnergyInHB"]; if (mHadEnergyInHB && mHadEnergyInHB->getRootObject()) mHadEnergyInHB->Fill ((*caloJets)[ijet].hadEnergyInHB());
1902  mHadEnergyInHF = map_of_MEs[DirName+"/"+"HadEnergyInHF"]; if (mHadEnergyInHF && mHadEnergyInHF->getRootObject()) mHadEnergyInHF->Fill ((*caloJets)[ijet].hadEnergyInHF());
1903  mHadEnergyInHE = map_of_MEs[DirName+"/"+"HadEnergyInHE"]; if (mHadEnergyInHE && mHadEnergyInHE->getRootObject()) mHadEnergyInHE->Fill ((*caloJets)[ijet].hadEnergyInHE());
1904  mEmEnergyInEB = map_of_MEs[DirName+"/"+"EmEnergyInEB"]; if (mEmEnergyInEB && mEmEnergyInEB->getRootObject()) mEmEnergyInEB->Fill ((*caloJets)[ijet].emEnergyInEB());
1905  mEmEnergyInEE = map_of_MEs[DirName+"/"+"EmEnergyInEE"]; if (mEmEnergyInEE && mEmEnergyInEE->getRootObject()) mEmEnergyInEE->Fill ((*caloJets)[ijet].emEnergyInEE());
1906  mEmEnergyInHF = map_of_MEs[DirName+"/"+"EmEnergyInHF"]; if (mEmEnergyInHF && mEmEnergyInHF->getRootObject()) mEmEnergyInHF->Fill ((*caloJets)[ijet].emEnergyInHF());
1907 
1908  }
1909  }
1910  if(isMiniAODJet_ && (*patJets)[ijet].isPFJet()){
1911  pat::strbitset stringbitset=pfjetIDFunctor.getBitTemplate();
1912  jetpassid = pfjetIDFunctor((*patJets)[ijet],stringbitset);
1913  if(jetCleaningFlag_){
1914  Thiscleaned = jetpassid;
1915  JetIDWPU = jetpassid;
1916  }
1917  if(Thiscleaned && pass_uncorrected){
1918  mPt_uncor = map_of_MEs[DirName+"/"+"Pt_uncor"]; if (mPt_uncor && mPt_uncor->getRootObject()) if (mPt_uncor) mPt_uncor->Fill ((*patJets)[ijet].pt()*(*patJets)[ijet].jecFactor("Uncorrected"));
1919  mEta_uncor = map_of_MEs[DirName+"/"+"Eta_uncor"]; if (mEta_uncor && mEta_uncor->getRootObject()) if (mEta_uncor) mEta_uncor->Fill ((*patJets)[ijet].eta());
1920  mPhi_uncor = map_of_MEs[DirName+"/"+"Phi_uncor"]; if (mPhi_uncor && mPhi_uncor->getRootObject()) if (mPhi_uncor) mPhi_uncor->Fill ((*patJets)[ijet].phi());
1921  mConstituents_uncor = map_of_MEs[DirName+"/"+"Constituents_uncor"]; if (mConstituents_uncor && mConstituents_uncor->getRootObject()) if (mConstituents_uncor) mConstituents_uncor->Fill ((*patJets)[ijet].nConstituents());
1922  }
1923  if(Thiscleaned && pass_corrected){
1924  if(fabs(correctedJet.eta()) <= 1.3) {
1925  if(correctedJet.pt()<=50.){
1926  mMVAPUJIDDiscriminant_lowPt_Barrel=map_of_MEs[DirName+"/"+"MVAPUJIDDiscriminant_lowPt_Barrel"]; if(mMVAPUJIDDiscriminant_lowPt_Barrel && mMVAPUJIDDiscriminant_lowPt_Barrel->getRootObject()){if((*patJets)[ijet].hasUserFloat("pileupJetId:fullDiscriminant"))mMVAPUJIDDiscriminant_lowPt_Barrel->Fill( (*patJets)[ijet].userFloat("pileupJetId:fullDiscriminant")); }
1927  }
1928  if (correctedJet.pt()>50. && correctedJet.pt()<=140.) {
1929  mMVAPUJIDDiscriminant_mediumPt_Barrel=map_of_MEs[DirName+"/"+"MVAPUJIDDiscriminant_mediumPt_Barrel"]; if(mMVAPUJIDDiscriminant_mediumPt_Barrel && mMVAPUJIDDiscriminant_mediumPt_Barrel->getRootObject()) {if((*patJets)[ijet].hasUserFloat("pileupJetId:fullDiscriminant"))mMVAPUJIDDiscriminant_mediumPt_Barrel->Fill( (*patJets)[ijet].userFloat("pileupJetId:fullDiscriminant"));}
1930  }
1931  if(correctedJet.pt()>140.){
1932  mMVAPUJIDDiscriminant_highPt_Barrel=map_of_MEs[DirName+"/"+"MVAPUJIDDiscriminant_highPt_Barrel"]; if(mMVAPUJIDDiscriminant_highPt_Barrel && mMVAPUJIDDiscriminant_highPt_Barrel->getRootObject()){if((*patJets)[ijet].hasUserFloat("pileupJetId:fullDiscriminant")) mMVAPUJIDDiscriminant_highPt_Barrel->Fill( (*patJets)[ijet].userFloat("pileupJetId:fullDiscriminant"));}
1933  }
1934  mCHFracVSpT_Barrel = map_of_MEs[DirName+"/"+"CHFracVSpT_Barrel"]; if(mCHFracVSpT_Barrel && mCHFracVSpT_Barrel->getRootObject()) mCHFracVSpT_Barrel->Fill(correctedJet.pt(),(*patJets)[ijet].chargedHadronEnergyFraction());
1935  mNHFracVSpT_Barrel = map_of_MEs[DirName+"/"+"NHFracVSpT_Barrel"];if (mNHFracVSpT_Barrel && mNHFracVSpT_Barrel->getRootObject()) mNHFracVSpT_Barrel->Fill(correctedJet.pt(),(*patJets)[ijet].neutralHadronEnergyFraction());
1936  mPhFracVSpT_Barrel = map_of_MEs[DirName+"/"+"PhFracVSpT_Barrel"];if (mPhFracVSpT_Barrel && mPhFracVSpT_Barrel->getRootObject()) mPhFracVSpT_Barrel->Fill(correctedJet.pt(),(*patJets)[ijet].neutralEmEnergyFraction());
1937  }else if(fabs(correctedJet.eta()) <= 3) {
1938  if(correctedJet.pt()<=50.){
1939  mMVAPUJIDDiscriminant_lowPt_EndCap=map_of_MEs[DirName+"/"+"MVAPUJIDDiscriminant_lowPt_EndCap"]; if(mMVAPUJIDDiscriminant_lowPt_EndCap && mMVAPUJIDDiscriminant_lowPt_EndCap->getRootObject()){if((*patJets)[ijet].hasUserFloat("pileupJetId:fullDiscriminant")) mMVAPUJIDDiscriminant_lowPt_EndCap->Fill( (*patJets)[ijet].userFloat("pileupJetId:fullDiscriminant")); }
1940  }
1941  if (correctedJet.pt()>50. && correctedJet.pt()<=140.) {
1942  mMVAPUJIDDiscriminant_mediumPt_EndCap=map_of_MEs[DirName+"/"+"MVAPUJIDDiscriminant_mediumPt_EndCap"]; if(mMVAPUJIDDiscriminant_mediumPt_EndCap && mMVAPUJIDDiscriminant_mediumPt_EndCap->getRootObject()){if((*patJets)[ijet].hasUserFloat("pileupJetId:fullDiscriminant")) mMVAPUJIDDiscriminant_mediumPt_EndCap->Fill( (*patJets)[ijet].userFloat("pileupJetId:fullDiscriminant"));
1943  }}
1944  if(correctedJet.pt()>140.){
1945  mMVAPUJIDDiscriminant_highPt_EndCap=map_of_MEs[DirName+"/"+"MVAPUJIDDiscriminant_highPt_EndCap"]; if(mMVAPUJIDDiscriminant_highPt_EndCap && mMVAPUJIDDiscriminant_highPt_EndCap->getRootObject()){if((*patJets)[ijet].hasUserFloat("pileupJetId:fullDiscriminant")) mMVAPUJIDDiscriminant_highPt_EndCap->Fill( (*patJets)[ijet].userFloat("pileupJetId:fullDiscriminant")); }
1946  }
1947  mCHFracVSpT_EndCap = map_of_MEs[DirName+"/"+"CHFracVSpT_EndCap"]; if(mCHFracVSpT_EndCap && mCHFracVSpT_EndCap->getRootObject()) mCHFracVSpT_EndCap->Fill(correctedJet.pt(),(*patJets)[ijet].chargedHadronEnergyFraction());
1948  mNHFracVSpT_EndCap = map_of_MEs[DirName+"/"+"NHFracVSpT_EndCap"];if (mNHFracVSpT_EndCap && mNHFracVSpT_EndCap->getRootObject()) mNHFracVSpT_EndCap->Fill(correctedJet.pt(),(*patJets)[ijet].neutralHadronEnergyFraction());
1949  mPhFracVSpT_EndCap = map_of_MEs[DirName+"/"+"PhFracVSpT_EndCap"];if (mPhFracVSpT_EndCap && mPhFracVSpT_EndCap->getRootObject()) mPhFracVSpT_EndCap->Fill(correctedJet.pt(),(*patJets)[ijet].neutralEmEnergyFraction());
1950  }else if(fabs(correctedJet.eta()) <= 5) {
1951  if(correctedJet.pt()<=50.){
1952  mMVAPUJIDDiscriminant_lowPt_Forward=map_of_MEs[DirName+"/"+"MVAPUJIDDiscriminant_lowPt_Forward"]; if(mMVAPUJIDDiscriminant_lowPt_Forward && mMVAPUJIDDiscriminant_lowPt_Forward->getRootObject()){if((*patJets)[ijet].hasUserFloat("pileupJetId:fullDiscriminant")) mMVAPUJIDDiscriminant_lowPt_Forward->Fill( (*patJets)[ijet].userFloat("pileupJetId:fullDiscriminant"));}
1953  }
1954  if (correctedJet.pt()>50. && correctedJet.pt()<=140.) {
1955  mMVAPUJIDDiscriminant_mediumPt_Forward=map_of_MEs[DirName+"/"+"MVAPUJIDDiscriminant_mediumPt_Forward"]; if(mMVAPUJIDDiscriminant_mediumPt_Forward && mMVAPUJIDDiscriminant_mediumPt_Forward->getRootObject()){if((*patJets)[ijet].hasUserFloat("pileupJetId:fullDiscriminant")) mMVAPUJIDDiscriminant_mediumPt_Forward->Fill( (*patJets)[ijet].userFloat("pileupJetId:fullDiscriminant")); }
1956  }
1957  if(correctedJet.pt()>140.){
1958  mMVAPUJIDDiscriminant_highPt_Forward=map_of_MEs[DirName+"/"+"MVAPUJIDDiscriminant_highPt_Forward"]; if(mMVAPUJIDDiscriminant_highPt_Forward && mMVAPUJIDDiscriminant_highPt_Forward->getRootObject()){if((*patJets)[ijet].hasUserFloat("pileupJetId:fullDiscriminant")) mMVAPUJIDDiscriminant_highPt_Forward->Fill( (*patJets)[ijet].userFloat("pileupJetId:fullDiscriminant")); }
1959  }
1960  mHFHFracVSpT_Forward = map_of_MEs[DirName+"/"+"HFHFracVSpT_Forward"]; if (mHFHFracVSpT_Forward && mHFHFracVSpT_Forward->getRootObject()) mHFHFracVSpT_Forward->Fill(correctedJet.pt(),(*patJets)[ijet].HFHadronEnergyFraction ());
1961  mHFEFracVSpT_Forward = map_of_MEs[DirName+"/"+"HFEFracVSpT_Forward"]; if (mHFEFracVSpT_Forward && mHFEFracVSpT_Forward->getRootObject()) mHFEFracVSpT_Forward->Fill (correctedJet.pt(),(*patJets)[ijet].HFEMEnergyFraction ());
1962  }
1963  }
1964  }
1965  if(isPFJet_){
1966  reco::PFJetRef pfjetref(pfJets, ijet);
1967  float puidmva=-1;
1968  float puidcut=-1;
1969  int puidmvaflag=-10;
1970  int puidcutflag=-10;
1971 
1972  puidmva=(*puJetIdMva)[pfjetref];
1973  puidcut=(*puJetId)[pfjetref];
1974  puidmvaflag=(*puJetIdFlagMva)[pfjetref];
1975  puidcutflag=(*puJetIdFlag)[pfjetref];
1976  jetpassid = pfjetIDFunctor((*pfJets)[ijet]);
1977  if((*pfJets)[ijet].muonEnergyFraction()>0.8){
1978  jetpassid =false;
1979  }
1980  if(jetCleaningFlag_){
1981  Thiscleaned = jetpassid;
1982  JetIDWPU= (jetpassid && PileupJetIdentifier::passJetId( puidmvaflag, PileupJetIdentifier::kLoose ));
1983  }
1984  if(Thiscleaned && pass_uncorrected){
1985  mPt_uncor = map_of_MEs[DirName+"/"+"Pt_uncor"]; if (mPt_uncor && mPt_uncor->getRootObject()) mPt_uncor->Fill ((*pfJets)[ijet].pt());
1986  mEta_uncor = map_of_MEs[DirName+"/"+"Eta_uncor"]; if (mEta_uncor && mEta_uncor->getRootObject()) mEta_uncor->Fill ((*pfJets)[ijet].eta());
1987  mPhi_uncor = map_of_MEs[DirName+"/"+"Phi_uncor"]; if (mPhi_uncor && mPhi_uncor->getRootObject()) mPhi_uncor->Fill ((*pfJets)[ijet].phi());
1988  mConstituents_uncor = map_of_MEs[DirName+"/"+"Constituents_uncor"]; if (mConstituents_uncor && mConstituents_uncor->getRootObject()) mConstituents_uncor->Fill ((*pfJets)[ijet].nConstituents());
1989  }
1990  if(Thiscleaned && pass_corrected){
1992  mLooseCutPUJIDPassFractionVSeta = map_of_MEs[DirName+"/"+"LooseCutPUIDPassFractionVSeta"];if(mLooseCutPUJIDPassFractionVSeta && mLooseCutPUJIDPassFractionVSeta->getRootObject()) mLooseCutPUJIDPassFractionVSeta->Fill(correctedJet.eta(),1.);
1993  mLooseCutPUJIDPassFractionVSpt = map_of_MEs[DirName+"/"+"LooseCutPUIDPassFractionVSpt"];if(mLooseCutPUJIDPassFractionVSpt && mLooseCutPUJIDPassFractionVSpt->getRootObject()) mLooseCutPUJIDPassFractionVSpt->Fill(correctedJet.pt(),1.);
1994  }else{
1995  mLooseCutPUJIDPassFractionVSeta = map_of_MEs[DirName+"/"+"LooseCutPUIDPassFractionVSeta"];if(mLooseCutPUJIDPassFractionVSeta && mLooseCutPUJIDPassFractionVSeta->getRootObject()) mLooseCutPUJIDPassFractionVSeta->Fill(correctedJet.eta(),0.);
1996  mLooseCutPUJIDPassFractionVSpt = map_of_MEs[DirName+"/"+"LooseCutPUIDPassFractionVSpt"];if(mLooseCutPUJIDPassFractionVSpt && mLooseCutPUJIDPassFractionVSpt->getRootObject()) mLooseCutPUJIDPassFractionVSpt->Fill(correctedJet.pt(),0.);
1997  }
1999  mMediumCutPUJIDPassFractionVSeta = map_of_MEs[DirName+"/"+"MediumCutPUIDPassFractionVSeta"];if(mMediumCutPUJIDPassFractionVSeta && mMediumCutPUJIDPassFractionVSeta->getRootObject()) mMediumCutPUJIDPassFractionVSeta->Fill(correctedJet.eta(),1.);
2000  mMediumCutPUJIDPassFractionVSpt = map_of_MEs[DirName+"/"+"MediumCutPUIDPassFractionVSpt"];if(mMediumCutPUJIDPassFractionVSpt && mMediumCutPUJIDPassFractionVSpt->getRootObject()) mMediumCutPUJIDPassFractionVSpt->Fill(correctedJet.pt(),1.);
2001  }else{
2002  mMediumCutPUJIDPassFractionVSeta = map_of_MEs[DirName+"/"+"MediumCutPUIDPassFractionVSeta"];if(mMediumCutPUJIDPassFractionVSeta && mMediumCutPUJIDPassFractionVSeta->getRootObject()) mMediumCutPUJIDPassFractionVSeta->Fill(correctedJet.eta(),0.);
2003  mMediumCutPUJIDPassFractionVSpt = map_of_MEs[DirName+"/"+"MediumCutPUIDPassFractionVSpt"];if(mMediumCutPUJIDPassFractionVSpt && mMediumCutPUJIDPassFractionVSpt->getRootObject()) mMediumCutPUJIDPassFractionVSpt->Fill(correctedJet.pt(),0.);
2004  }
2006  mTightCutPUJIDPassFractionVSeta = map_of_MEs[DirName+"/"+"TightCutPUIDPassFractionVSeta"];if(mTightCutPUJIDPassFractionVSeta && mTightCutPUJIDPassFractionVSeta->getRootObject()) mTightCutPUJIDPassFractionVSeta->Fill(correctedJet.eta(),1.);
2007  mTightCutPUJIDPassFractionVSpt = map_of_MEs[DirName+"/"+"TightCutPUIDPassFractionVSpt"];if(mTightCutPUJIDPassFractionVSpt && mTightCutPUJIDPassFractionVSpt->getRootObject()) mTightCutPUJIDPassFractionVSpt->Fill(correctedJet.pt(),1.);
2008  }else{
2009  mTightCutPUJIDPassFractionVSeta = map_of_MEs[DirName+"/"+"TightCutPUIDPassFractionVSeta"];if(mTightCutPUJIDPassFractionVSeta && mTightCutPUJIDPassFractionVSeta->getRootObject()) mTightCutPUJIDPassFractionVSeta->Fill(correctedJet.eta(),0.);
2010  mTightCutPUJIDPassFractionVSpt = map_of_MEs[DirName+"/"+"TightCutPUIDPassFractionVSpt"];if(mTightCutPUJIDPassFractionVSpt && mTightCutPUJIDPassFractionVSpt->getRootObject()) mTightCutPUJIDPassFractionVSpt->Fill(correctedJet.pt(),0.);
2011  }
2013  mLooseMVAPUJIDPassFractionVSeta = map_of_MEs[DirName+"/"+"LooseMVAPUIDPassFractionVSeta"];if(mLooseMVAPUJIDPassFractionVSeta && mLooseMVAPUJIDPassFractionVSeta->getRootObject()) mLooseMVAPUJIDPassFractionVSeta->Fill(correctedJet.eta(),1.);
2014  mLooseMVAPUJIDPassFractionVSpt = map_of_MEs[DirName+"/"+"LooseMVAPUIDPassFractionVSpt"];if(mLooseMVAPUJIDPassFractionVSpt && mLooseMVAPUJIDPassFractionVSpt->getRootObject()) mLooseMVAPUJIDPassFractionVSpt->Fill(correctedJet.pt(),1.);
2015  }else{
2016  mLooseMVAPUJIDPassFractionVSeta = map_of_MEs[DirName+"/"+"LooseMVAPUIDPassFractionVSeta"];if(mLooseMVAPUJIDPassFractionVSeta && mLooseMVAPUJIDPassFractionVSeta->getRootObject()) mLooseMVAPUJIDPassFractionVSeta->Fill(correctedJet.eta(),0.);
2017  mLooseMVAPUJIDPassFractionVSpt = map_of_MEs[DirName+"/"+"LooseMVAPUIDPassFractionVSpt"];if(mLooseMVAPUJIDPassFractionVSpt && mLooseMVAPUJIDPassFractionVSpt->getRootObject()) mLooseMVAPUJIDPassFractionVSpt->Fill(correctedJet.pt(),0.);
2018  }
2020  mMediumMVAPUJIDPassFractionVSeta = map_of_MEs[DirName+"/"+"MediumMVAPUIDPassFractionVSeta"];if(mMediumMVAPUJIDPassFractionVSeta && mMediumMVAPUJIDPassFractionVSeta->getRootObject()) mMediumMVAPUJIDPassFractionVSeta->Fill(correctedJet.eta(),1.);
2021  mMediumMVAPUJIDPassFractionVSpt = map_of_MEs[DirName+"/"+"MediumMVAPUIDPassFractionVSpt"];if(mMediumMVAPUJIDPassFractionVSpt && mMediumMVAPUJIDPassFractionVSpt->getRootObject()) mMediumMVAPUJIDPassFractionVSpt->Fill(correctedJet.pt(),1.);
2022  }else{
2023  mMediumMVAPUJIDPassFractionVSeta = map_of_MEs[DirName+"/"+"MediumMVAPUIDPassFractionVSeta"];if(mMediumMVAPUJIDPassFractionVSeta && mMediumMVAPUJIDPassFractionVSeta->getRootObject()) mMediumMVAPUJIDPassFractionVSeta->Fill(correctedJet.eta(),0.);
2024  mMediumMVAPUJIDPassFractionVSpt = map_of_MEs[DirName+"/"+"MediumMVAPUIDPassFractionVSpt"];if(mMediumMVAPUJIDPassFractionVSpt && mMediumMVAPUJIDPassFractionVSpt->getRootObject()) mMediumMVAPUJIDPassFractionVSpt->Fill(correctedJet.pt(),0.);
2025  }
2027  mTightMVAPUJIDPassFractionVSeta = map_of_MEs[DirName+"/"+"TightMVAPUIDPassFractionVSeta"];if(mTightMVAPUJIDPassFractionVSeta && mTightMVAPUJIDPassFractionVSeta->getRootObject()) mTightMVAPUJIDPassFractionVSeta->Fill(correctedJet.eta(),1.);
2028  mTightMVAPUJIDPassFractionVSpt = map_of_MEs[DirName+"/"+"TightMVAPUIDPassFractionVSpt"];if(mTightMVAPUJIDPassFractionVSpt && mTightMVAPUJIDPassFractionVSpt->getRootObject()) mTightMVAPUJIDPassFractionVSpt->Fill(correctedJet.pt(),1.);
2029  }else{
2030  mTightMVAPUJIDPassFractionVSeta = map_of_MEs[DirName+"/"+"TightMVAPUIDPassFractionVSeta"];if(mTightMVAPUJIDPassFractionVSeta && mTightMVAPUJIDPassFractionVSeta->getRootObject()) mTightMVAPUJIDPassFractionVSeta->Fill(correctedJet.eta(),0.);
2031  mTightMVAPUJIDPassFractionVSpt = map_of_MEs[DirName+"/"+"TightMVAPUIDPassFractionVSpt"];if(mTightMVAPUJIDPassFractionVSpt && mTightMVAPUJIDPassFractionVSpt->getRootObject()) mTightMVAPUJIDPassFractionVSpt->Fill(correctedJet.pt(),0.);
2032  }
2033  if (correctedJet.pt()<= 50) {
2034  mCHFracVSeta_lowPt = map_of_MEs[DirName+"/"+"CHFracVSeta_lowPt"]; if (mCHFracVSeta_lowPt && mCHFracVSeta_lowPt->getRootObject()) mCHFracVSeta_lowPt->Fill((*pfJets)[ijet].eta(),(*pfJets)[ijet].chargedHadronEnergyFraction());
2035  mNHFracVSeta_lowPt = map_of_MEs[DirName+"/"+"NHFracVSeta_lowPt"]; if (mNHFracVSeta_lowPt && mNHFracVSeta_lowPt->getRootObject()) mNHFracVSeta_lowPt->Fill((*pfJets)[ijet].eta(),(*pfJets)[ijet].neutralHadronEnergyFraction());
2036  mPhFracVSeta_lowPt = map_of_MEs[DirName+"/"+"PhFracVSeta_lowPt"]; if (mPhFracVSeta_lowPt && mPhFracVSeta_lowPt->getRootObject()) mPhFracVSeta_lowPt->Fill((*pfJets)[ijet].eta(),(*pfJets)[ijet].neutralEmEnergyFraction());
2037  }
2038  if (correctedJet.pt()>50. && correctedJet.pt()<=140.) {
2039  mCHFracVSeta_mediumPt = map_of_MEs[DirName+"/"+"CHFracVSeta_mediumPt"]; if (mCHFracVSeta_mediumPt && mCHFracVSeta_mediumPt->getRootObject()) mCHFracVSeta_mediumPt->Fill((*pfJets)[ijet].eta(),(*pfJets)[ijet].chargedHadronEnergyFraction());
2040  mNHFracVSeta_mediumPt = map_of_MEs[DirName+"/"+"NHFracVSeta_mediumPt"]; if (mNHFracVSeta_mediumPt && mNHFracVSeta_mediumPt->getRootObject()) mNHFracVSeta_mediumPt->Fill((*pfJets)[ijet].eta(),(*pfJets)[ijet].neutralHadronEnergyFraction());
2041  mPhFracVSeta_mediumPt = map_of_MEs[DirName+"/"+"PhFracVSeta_mediumPt"]; if (mPhFracVSeta_mediumPt && mPhFracVSeta_mediumPt->getRootObject()) mPhFracVSeta_mediumPt->Fill((*pfJets)[ijet].eta(),(*pfJets)[ijet].neutralEmEnergyFraction());
2042  }
2043  if (correctedJet.pt()>140.) {
2044  mCHFracVSeta_highPt = map_of_MEs[DirName+"/"+"CHFracVSeta_highPt"]; if (mCHFracVSeta_highPt && mCHFracVSeta_highPt->getRootObject()) mCHFracVSeta_highPt->Fill((*pfJets)[ijet].eta(),(*pfJets)[ijet].chargedHadronEnergyFraction());
2045  mNHFracVSeta_highPt = map_of_MEs[DirName+"/"+"NHFracVSeta_highPt"]; if (mNHFracVSeta_highPt && mNHFracVSeta_highPt->getRootObject()) mNHFracVSeta_highPt->Fill((*pfJets)[ijet].eta(),(*pfJets)[ijet].neutralHadronEnergyFraction());
2046  mPhFracVSeta_highPt = map_of_MEs[DirName+"/"+"PhFracVSeta_highPt"]; if (mPhFracVSeta_highPt && mPhFracVSeta_highPt->getRootObject()) mPhFracVSeta_highPt->Fill((*pfJets)[ijet].eta(),(*pfJets)[ijet].neutralEmEnergyFraction());
2047  }
2048  if (fabs(correctedJet.eta()) <= 1.3) {
2049  //fractions for barrel
2050  if (correctedJet.pt()<=50.) {
2051  //mAxis2_lowPt_Barrel = map_of_MEs[DirName+"/"+"qg_Axis2_lowPt_Barrel"];if(mAxis2_lowPt_Barrel && mAxis2_lowPt_Barrel->getRootObject()) mAxis2_lowPt_Barrel->Fill(QGaxis2);
2052  //mpTD_lowPt_Barrel = map_of_MEs[DirName+"/"+"qg_pTD_lowPt_Barrel"]; if(mpTD_lowPt_Barrel && mpTD_lowPt_Barrel->getRootObject()) mpTD_lowPt_Barrel->Fill(QGptD);
2053  //mMultiplicityQG_lowPt_Barrel = map_of_MEs[DirName+"/"+"qg_multiplicity_lowPt_Barrel"]; if(mMultiplicityQG_lowPt_Barrel && mMultiplicityQG_lowPt_Barrel->getRootObject()) mMultiplicityQG_lowPt_Barrel->Fill(QGmulti);
2054  //mqgLikelihood_lowPt_Barrel = map_of_MEs[DirName+"/"+"qg_Likelihood_lowPt_Barrel"]; if(mqgLikelihood_lowPt_Barrel && mqgLikelihood_lowPt_Barrel->getRootObject()) mqgLikelihood_lowPt_Barrel->Fill(QGLikelihood);
2055  mMass_lowPt_Barrel=map_of_MEs[DirName+"/"+"JetMass_lowPt_Barrel"]; if(mMass_lowPt_Barrel && mMass_lowPt_Barrel->getRootObject())mMass_lowPt_Barrel->Fill((*pfJets)[ijet].mass());
2056  mMVAPUJIDDiscriminant_lowPt_Barrel=map_of_MEs[DirName+"/"+"MVAPUJIDDiscriminant_lowPt_Barrel"]; if(mMVAPUJIDDiscriminant_lowPt_Barrel && mMVAPUJIDDiscriminant_lowPt_Barrel->getRootObject()) mMVAPUJIDDiscriminant_lowPt_Barrel->Fill(puidmva);
2057  mCutPUJIDDiscriminant_lowPt_Barrel=map_of_MEs[DirName+"/"+"CutPUJIDDiscriminant_lowPt_Barrel"]; if(mCutPUJIDDiscriminant_lowPt_Barrel && mCutPUJIDDiscriminant_lowPt_Barrel->getRootObject()) mCutPUJIDDiscriminant_lowPt_Barrel->Fill(puidcut);
2058  mCHFrac_lowPt_Barrel = map_of_MEs[DirName+"/"+"CHFrac_lowPt_Barrel"]; if (mCHFrac_lowPt_Barrel && mCHFrac_lowPt_Barrel->getRootObject()) mCHFrac_lowPt_Barrel->Fill((*pfJets)[ijet].chargedHadronEnergyFraction());
2059  mNHFrac_lowPt_Barrel = map_of_MEs[DirName+"/"+"NHFrac_lowPt_Barrel"]; if (mNHFrac_lowPt_Barrel && mNHFrac_lowPt_Barrel->getRootObject()) mNHFrac_lowPt_Barrel->Fill((*pfJets)[ijet].neutralHadronEnergyFraction());
2060  mPhFrac_lowPt_Barrel = map_of_MEs[DirName+"/"+"PhFrac_lowPt_Barrel"]; if (mPhFrac_lowPt_Barrel && mPhFrac_lowPt_Barrel->getRootObject()) mPhFrac_lowPt_Barrel->Fill((*pfJets)[ijet].neutralEmEnergyFraction());
2061  mCHEn_lowPt_Barrel = map_of_MEs[DirName+"/"+"CHEn_lowPt_Barrel"]; if (mCHEn_lowPt_Barrel && mCHEn_lowPt_Barrel->getRootObject()) mCHEn_lowPt_Barrel->Fill((*pfJets)[ijet].chargedHadronEnergy());
2062  mNHEn_lowPt_Barrel = map_of_MEs[DirName+"/"+"NHEn_lowPt_Barrel"]; if (mNHEn_lowPt_Barrel && mNHEn_lowPt_Barrel->getRootObject()) mNHEn_lowPt_Barrel->Fill((*pfJets)[ijet].neutralHadronEnergy());
2063  mPhEn_lowPt_Barrel = map_of_MEs[DirName+"/"+"PhEn_lowPt_Barrel"]; if (mPhEn_lowPt_Barrel && mPhEn_lowPt_Barrel->getRootObject()) mPhEn_lowPt_Barrel->Fill((*pfJets)[ijet].neutralEmEnergy());
2064  mElEn_lowPt_Barrel = map_of_MEs[DirName+"/"+"ElEn_lowPt_Barrel"]; if (mElEn_lowPt_Barrel && mElEn_lowPt_Barrel->getRootObject()) mElEn_lowPt_Barrel->Fill((*pfJets)[ijet].chargedEmEnergy());
2065  mMuEn_lowPt_Barrel = map_of_MEs[DirName+"/"+"MuEn_lowPt_Barrel"]; if (mMuEn_lowPt_Barrel && mMuEn_lowPt_Barrel->getRootObject()) mMuEn_lowPt_Barrel->Fill((*pfJets)[ijet].chargedMuEnergy());
2066  mChMultiplicity_lowPt_Barrel = map_of_MEs[DirName+"/"+"ChMultiplicity_lowPt_Barrel"]; if(mChMultiplicity_lowPt_Barrel && mChMultiplicity_lowPt_Barrel->getRootObject()) mChMultiplicity_lowPt_Barrel->Fill((*pfJets)[ijet].chargedMultiplicity());
2067  mNeutMultiplicity_lowPt_Barrel = map_of_MEs[DirName+"/"+"NeutMultiplicity_lowPt_Barrel"]; if(mNeutMultiplicity_lowPt_Barrel && mNeutMultiplicity_lowPt_Barrel->getRootObject()) mNeutMultiplicity_lowPt_Barrel->Fill((*pfJets)[ijet].neutralMultiplicity());
2068  mMuMultiplicity_lowPt_Barrel = map_of_MEs[DirName+"/"+"MuMultiplicity_lowPt_Barrel"]; if(mMuMultiplicity_lowPt_Barrel && mMuMultiplicity_lowPt_Barrel->getRootObject()) mMuMultiplicity_lowPt_Barrel->Fill((*pfJets)[ijet].muonMultiplicity());
2069  }
2070  if (correctedJet.pt()>50. && correctedJet.pt()<=140.) {
2071  //mAxis2_mediumPt_Barrel = map_of_MEs[DirName+"/"+"qg_Axis2_mediumPt_Barrel"];if(mAxis2_mediumPt_Barrel && mAxis2_mediumPt_Barrel->getRootObject()) mAxis2_mediumPt_Barrel->Fill(QGaxis2);
2072  //mpTD_mediumPt_Barrel = map_of_MEs[DirName+"/"+"qg_pTD_mediumPt_Barrel"]; if(mpTD_mediumPt_Barrel && mpTD_mediumPt_Barrel->getRootObject()) mpTD_mediumPt_Barrel->Fill(QGptD);
2073  //mMultiplicityQG_mediumPt_Barrel = map_of_MEs[DirName+"/"+"qg_multiplicity_mediumPt_Barrel"]; if(mMultiplicityQG_mediumPt_Barrel && mMultiplicityQG_mediumPt_Barrel->getRootObject()) mMultiplicityQG_mediumPt_Barrel->Fill(QGmulti);
2074  //mqgLikelihood_mediumPt_Barrel = map_of_MEs[DirName+"/"+"qg_Likelihood_mediumPt_Barrel"]; if(mqgLikelihood_mediumPt_Barrel && mqgLikelihood_mediumPt_Barrel->getRootObject()) mqgLikelihood_mediumPt_Barrel->Fill(QGLikelihood);
2075  mMass_mediumPt_Barrel=map_of_MEs[DirName+"/"+"JetMass_mediumPt_Barrel"]; if(mMass_mediumPt_Barrel && mMass_mediumPt_Barrel->getRootObject())mMass_mediumPt_Barrel->Fill((*pfJets)[ijet].mass());
2076  mMVAPUJIDDiscriminant_mediumPt_Barrel=map_of_MEs[DirName+"/"+"MVAPUJIDDiscriminant_mediumPt_Barrel"]; if(mMVAPUJIDDiscriminant_mediumPt_Barrel && mMVAPUJIDDiscriminant_mediumPt_Barrel->getRootObject()) mMVAPUJIDDiscriminant_mediumPt_Barrel->Fill(puidmva);
2077  mCutPUJIDDiscriminant_mediumPt_Barrel=map_of_MEs[DirName+"/"+"CutPUJIDDiscriminant_mediumPt_Barrel"]; if(mCutPUJIDDiscriminant_mediumPt_Barrel && mCutPUJIDDiscriminant_mediumPt_Barrel->getRootObject()) mCutPUJIDDiscriminant_mediumPt_Barrel->Fill(puidcut);
2078  mCHFrac_mediumPt_Barrel = map_of_MEs[DirName+"/"+"CHFrac_mediumPt_Barrel"]; if (mCHFrac_mediumPt_Barrel && mCHFrac_mediumPt_Barrel->getRootObject()) mCHFrac_mediumPt_Barrel->Fill((*pfJets)[ijet].chargedHadronEnergyFraction());
2079  mNHFrac_mediumPt_Barrel = map_of_MEs[DirName+"/"+"NHFrac_mediumPt_Barrel"]; if (mNHFrac_mediumPt_Barrel && mNHFrac_mediumPt_Barrel->getRootObject()) mNHFrac_mediumPt_Barrel->Fill((*pfJets)[ijet].neutralHadronEnergyFraction());
2080  mPhFrac_mediumPt_Barrel = map_of_MEs[DirName+"/"+"PhFrac_mediumPt_Barrel"]; if (mPhFrac_mediumPt_Barrel && mPhFrac_mediumPt_Barrel->getRootObject()) mPhFrac_mediumPt_Barrel->Fill((*pfJets)[ijet].neutralEmEnergyFraction());
2081  mCHEn_mediumPt_Barrel = map_of_MEs[DirName+"/"+"CHEn_mediumPt_Barrel"]; if (mCHEn_mediumPt_Barrel && mCHEn_mediumPt_Barrel->getRootObject()) mCHEn_mediumPt_Barrel->Fill((*pfJets)[ijet].chargedHadronEnergy());
2082  mNHEn_mediumPt_Barrel = map_of_MEs[DirName+"/"+"NHEn_mediumPt_Barrel"]; if (mNHEn_mediumPt_Barrel && mNHEn_mediumPt_Barrel->getRootObject()) mNHEn_mediumPt_Barrel->Fill((*pfJets)[ijet].neutralHadronEnergy());
2083  mPhEn_mediumPt_Barrel = map_of_MEs[DirName+"/"+"PhEn_mediumPt_Barrel"]; if (mPhEn_mediumPt_Barrel && mPhEn_mediumPt_Barrel->getRootObject()) mPhEn_mediumPt_Barrel->Fill((*pfJets)[ijet].neutralEmEnergy());
2084  mElEn_mediumPt_Barrel = map_of_MEs[DirName+"/"+"ElEn_mediumPt_Barrel"]; if (mElEn_mediumPt_Barrel && mElEn_mediumPt_Barrel->getRootObject()) mElEn_mediumPt_Barrel->Fill((*pfJets)[ijet].chargedEmEnergy());
2085  mMuEn_mediumPt_Barrel = map_of_MEs[DirName+"/"+"MuEn_mediumPt_Barrel"]; if (mMuEn_mediumPt_Barrel && mMuEn_mediumPt_Barrel->getRootObject()) mMuEn_mediumPt_Barrel->Fill((*pfJets)[ijet].chargedMuEnergy());
2086  mChMultiplicity_mediumPt_Barrel = map_of_MEs[DirName+"/"+"ChMultiplicity_mediumPt_Barrel"]; if(mChMultiplicity_mediumPt_Barrel && mChMultiplicity_mediumPt_Barrel->getRootObject()) mChMultiplicity_mediumPt_Barrel->Fill((*pfJets)[ijet].chargedMultiplicity());
2087  mNeutMultiplicity_mediumPt_Barrel = map_of_MEs[DirName+"/"+"NeutMultiplicity_mediumPt_Barrel"]; if(mNeutMultiplicity_mediumPt_Barrel && mNeutMultiplicity_mediumPt_Barrel->getRootObject()) mNeutMultiplicity_mediumPt_Barrel->Fill((*pfJets)[ijet].neutralMultiplicity());
2088  mMuMultiplicity_mediumPt_Barrel = map_of_MEs[DirName+"/"+"MuMultiplicity_mediumPt_Barrel"]; if(mMuMultiplicity_mediumPt_Barrel && mMuMultiplicity_mediumPt_Barrel->getRootObject()) mMuMultiplicity_mediumPt_Barrel->Fill((*pfJets)[ijet].muonMultiplicity());
2089  }
2090  if (correctedJet.pt()>140.) {
2091  //mAxis2_highPt_Barrel = map_of_MEs[DirName+"/"+"qg_Axis2_highPt_Barrel"];if(mAxis2_highPt_Barrel && mAxis2_highPt_Barrel->getRootObject()) mAxis2_highPt_Barrel->Fill(QGaxis2);
2092  //mpTD_highPt_Barrel = map_of_MEs[DirName+"/"+"qg_pTD_highPt_Barrel"]; if(mpTD_highPt_Barrel && mpTD_highPt_Barrel->getRootObject()) mpTD_highPt_Barrel->Fill(QGptD);
2093  //mMultiplicityQG_highPt_Barrel = map_of_MEs[DirName+"/"+"qg_multiplicity_highPt_Barrel"]; if(mMultiplicityQG_highPt_Barrel && mMultiplicityQG_highPt_Barrel->getRootObject()) mMultiplicityQG_highPt_Barrel->Fill(QGmulti);
2094  //mqgLikelihood_highPt_Barrel = map_of_MEs[DirName+"/"+"qg_Likelihood_highPt_Barrel"]; if(mqgLikelihood_highPt_Barrel && mqgLikelihood_highPt_Barrel->getRootObject()) mqgLikelihood_highPt_Barrel->Fill(QGLikelihood);
2095  mMass_highPt_Barrel=map_of_MEs[DirName+"/"+"JetMass_highPt_Barrel"]; if(mMass_highPt_Barrel && mMass_highPt_Barrel->getRootObject())mMass_highPt_Barrel->Fill((*pfJets)[ijet].mass());
2096  mMVAPUJIDDiscriminant_highPt_Barrel=map_of_MEs[DirName+"/"+"MVAPUJIDDiscriminant_highPt_Barrel"]; if(mMVAPUJIDDiscriminant_highPt_Barrel && mMVAPUJIDDiscriminant_highPt_Barrel->getRootObject()) mMVAPUJIDDiscriminant_highPt_Barrel->Fill(puidmva);
2097  mCutPUJIDDiscriminant_highPt_Barrel=map_of_MEs[DirName+"/"+"CutPUJIDDiscriminant_highPt_Barrel"]; if(mCutPUJIDDiscriminant_highPt_Barrel && mCutPUJIDDiscriminant_highPt_Barrel->getRootObject()) mCutPUJIDDiscriminant_highPt_Barrel->Fill(puidcut);
2098  mCHFrac_highPt_Barrel = map_of_MEs[DirName+"/"+"CHFrac_highPt_Barrel"]; if (mCHFrac_highPt_Barrel && mCHFrac_highPt_Barrel->getRootObject()) mCHFrac_highPt_Barrel->Fill((*pfJets)[ijet].chargedHadronEnergyFraction());
2099  mNHFrac_highPt_Barrel = map_of_MEs[DirName+"/"+"NHFrac_highPt_Barrel"]; if (mNHFrac_highPt_Barrel && mNHFrac_highPt_Barrel->getRootObject()) mNHFrac_highPt_Barrel->Fill((*pfJets)[ijet].neutralHadronEnergyFraction());
2100  mPhFrac_highPt_Barrel = map_of_MEs[DirName+"/"+"PhFrac_highPt_Barrel"]; if (mPhFrac_highPt_Barrel && mPhFrac_highPt_Barrel->getRootObject()) mPhFrac_highPt_Barrel->Fill((*pfJets)[ijet].neutralEmEnergyFraction());
2101  mCHEn_highPt_Barrel = map_of_MEs[DirName+"/"+"CHEn_highPt_Barrel"]; if (mCHEn_highPt_Barrel && mCHEn_highPt_Barrel->getRootObject()) mCHEn_highPt_Barrel->Fill((*pfJets)[ijet].chargedHadronEnergy());
2102  mNHEn_highPt_Barrel = map_of_MEs[DirName+"/"+"NHEn_highPt_Barrel"]; if (mNHEn_highPt_Barrel && mNHEn_highPt_Barrel->getRootObject()) mNHEn_highPt_Barrel->Fill((*pfJets)[ijet].neutralHadronEnergy());
2103  mPhEn_highPt_Barrel = map_of_MEs[DirName+"/"+"PhEn_highPt_Barrel"]; if (mPhEn_highPt_Barrel && mPhEn_highPt_Barrel->getRootObject()) mPhEn_highPt_Barrel->Fill((*pfJets)[ijet].neutralEmEnergy());
2104  mElEn_highPt_Barrel = map_of_MEs[DirName+"/"+"ElEn_highPt_Barrel"]; if (mElEn_highPt_Barrel && mElEn_highPt_Barrel->getRootObject()) mElEn_highPt_Barrel->Fill((*pfJets)[ijet].chargedEmEnergy());
2105  mMuEn_highPt_Barrel = map_of_MEs[DirName+"/"+"MuEn_highPt_Barrel"]; if (mMuEn_highPt_Barrel && mMuEn_highPt_Barrel->getRootObject()) mMuEn_highPt_Barrel->Fill((*pfJets)[ijet].chargedMuEnergy());
2106  mChMultiplicity_highPt_Barrel = map_of_MEs[DirName+"/"+"ChMultiplicity_highPt_Barrel"]; if(mChMultiplicity_highPt_Barrel && mChMultiplicity_highPt_Barrel->getRootObject()) mChMultiplicity_highPt_Barrel->Fill((*pfJets)[ijet].chargedMultiplicity());
2107  mNeutMultiplicity_highPt_Barrel = map_of_MEs[DirName+"/"+"NeutMultiplicity_highPt_Barrel"]; if(mNeutMultiplicity_highPt_Barrel && mNeutMultiplicity_highPt_Barrel->getRootObject()) mNeutMultiplicity_highPt_Barrel->Fill((*pfJets)[ijet].neutralMultiplicity());
2108  mMuMultiplicity_highPt_Barrel = map_of_MEs[DirName+"/"+"MuMultiplicity_highPt_Barrel"]; if(mMuMultiplicity_highPt_Barrel && mMuMultiplicity_highPt_Barrel->getRootObject()) mMuMultiplicity_highPt_Barrel->Fill((*pfJets)[ijet].muonMultiplicity());
2109  }
2110  mCHFracVSpT_Barrel = map_of_MEs[DirName+"/"+"CHFracVSpT_Barrel"]; if(mCHFracVSpT_Barrel && mCHFracVSpT_Barrel->getRootObject()) mCHFracVSpT_Barrel->Fill(correctedJet.pt(),(*pfJets)[ijet].chargedHadronEnergyFraction());
2111  mNHFracVSpT_Barrel = map_of_MEs[DirName+"/"+"NHFracVSpT_Barrel"];if (mNHFracVSpT_Barrel && mNHFracVSpT_Barrel->getRootObject()) mNHFracVSpT_Barrel->Fill(correctedJet.pt(),(*pfJets)[ijet].neutralHadronEnergyFraction());
2112  mPhFracVSpT_Barrel = map_of_MEs[DirName+"/"+"PhFracVSpT_Barrel"];if (mPhFracVSpT_Barrel && mPhFracVSpT_Barrel->getRootObject()) mPhFracVSpT_Barrel->Fill(correctedJet.pt(),(*pfJets)[ijet].neutralEmEnergyFraction());
2113  }else if(fabs(correctedJet.eta()) <= 3) {
2114  //fractions for endcap
2115  if (correctedJet.pt()<=50.) {
2116  //mAxis2_lowPt_EndCap = map_of_MEs[DirName+"/"+"qg_Axis2_lowPt_EndCap"];if(mAxis2_lowPt_EndCap && mAxis2_lowPt_EndCap->getRootObject()) mAxis2_lowPt_EndCap->Fill(QGaxis2);
2117  //mpTD_lowPt_EndCap = map_of_MEs[DirName+"/"+"qg_pTD_lowPt_EndCap"]; if(mpTD_lowPt_EndCap && mpTD_lowPt_EndCap->getRootObject()) mpTD_lowPt_EndCap->Fill(QGptD);
2118  //mMultiplicityQG_lowPt_EndCap = map_of_MEs[DirName+"/"+"qg_multiplicity_lowPt_EndCap"]; if(mMultiplicityQG_lowPt_EndCap && mMultiplicityQG_lowPt_EndCap->getRootObject()) mMultiplicityQG_lowPt_EndCap->Fill(QGmulti);
2119  //mqgLikelihood_lowPt_EndCap = map_of_MEs[DirName+"/"+"qg_Likelihood_lowPt_EndCap"]; if(mqgLikelihood_lowPt_EndCap && mqgLikelihood_lowPt_EndCap->getRootObject()) mqgLikelihood_lowPt_EndCap->Fill(QGLikelihood);
2120  mMass_lowPt_EndCap=map_of_MEs[DirName+"/"+"JetMass_lowPt_EndCap"]; if(mMass_lowPt_EndCap && mMass_lowPt_EndCap->getRootObject())mMass_lowPt_EndCap->Fill((*pfJets)[ijet].mass());
2121  mMVAPUJIDDiscriminant_lowPt_EndCap=map_of_MEs[DirName+"/"+"MVAPUJIDDiscriminant_lowPt_EndCap"]; if(mMVAPUJIDDiscriminant_lowPt_EndCap && mMVAPUJIDDiscriminant_lowPt_EndCap->getRootObject()) mMVAPUJIDDiscriminant_lowPt_EndCap->Fill(puidmva);
2122  mCutPUJIDDiscriminant_lowPt_EndCap=map_of_MEs[DirName+"/"+"CutPUJIDDiscriminant_lowPt_EndCap"]; if(mCutPUJIDDiscriminant_lowPt_EndCap && mCutPUJIDDiscriminant_lowPt_EndCap->getRootObject()) mCutPUJIDDiscriminant_lowPt_EndCap->Fill(puidcut);
2123  mCHFrac_lowPt_EndCap = map_of_MEs[DirName+"/"+"CHFrac_lowPt_EndCap"]; if (mCHFrac_lowPt_EndCap && mCHFrac_lowPt_EndCap->getRootObject()) mCHFrac_lowPt_EndCap->Fill((*pfJets)[ijet].chargedHadronEnergyFraction());
2124  mNHFrac_lowPt_EndCap = map_of_MEs[DirName+"/"+"NHFrac_lowPt_EndCap"]; if (mNHFrac_lowPt_EndCap && mNHFrac_lowPt_EndCap->getRootObject()) mNHFrac_lowPt_EndCap->Fill((*pfJets)[ijet].neutralHadronEnergyFraction());
2125  mPhFrac_lowPt_EndCap = map_of_MEs[DirName+"/"+"PhFrac_lowPt_EndCap"]; if (mPhFrac_lowPt_EndCap && mPhFrac_lowPt_EndCap->getRootObject()) mPhFrac_lowPt_EndCap->Fill((*pfJets)[ijet].neutralEmEnergyFraction());
2126  mCHEn_lowPt_EndCap = map_of_MEs[DirName+"/"+"CHEn_lowPt_EndCap"]; if (mCHEn_lowPt_EndCap && mCHEn_lowPt_EndCap->getRootObject()) mCHEn_lowPt_EndCap->Fill((*pfJets)[ijet].chargedHadronEnergy());
2127  mNHEn_lowPt_EndCap = map_of_MEs[DirName+"/"+"NHEn_lowPt_EndCap"]; if (mNHEn_lowPt_EndCap && mNHEn_lowPt_EndCap->getRootObject()) mNHEn_lowPt_EndCap->Fill((*pfJets)[ijet].neutralHadronEnergy());
2128  mPhEn_lowPt_EndCap = map_of_MEs[DirName+"/"+"PhEn_lowPt_EndCap"]; if (mPhEn_lowPt_EndCap && mPhEn_lowPt_EndCap->getRootObject()) mPhEn_lowPt_EndCap->Fill((*pfJets)[ijet].neutralEmEnergy());
2129  mElEn_lowPt_EndCap = map_of_MEs[DirName+"/"+"ElEn_lowPt_EndCap"]; if (mElEn_lowPt_EndCap && mElEn_lowPt_EndCap->getRootObject()) mElEn_lowPt_EndCap->Fill((*pfJets)[ijet].chargedEmEnergy());
2130  mMuEn_lowPt_EndCap = map_of_MEs[DirName+"/"+"MuEn_lowPt_EndCap"]; if (mMuEn_lowPt_EndCap && mMuEn_lowPt_EndCap->getRootObject()) mMuEn_lowPt_EndCap->Fill((*pfJets)[ijet].chargedMuEnergy());
2131  mChMultiplicity_lowPt_EndCap = map_of_MEs[DirName+"/"+"ChMultiplicity_lowPt_EndCap"]; if(mChMultiplicity_lowPt_EndCap && mChMultiplicity_lowPt_EndCap->getRootObject()) mChMultiplicity_lowPt_EndCap->Fill((*pfJets)[ijet].chargedMultiplicity());
2132  mNeutMultiplicity_lowPt_EndCap = map_of_MEs[DirName+"/"+"NeutMultiplicity_lowPt_EndCap"]; if(mNeutMultiplicity_lowPt_EndCap && mNeutMultiplicity_lowPt_EndCap->getRootObject()) mNeutMultiplicity_lowPt_EndCap->Fill((*pfJets)[ijet].neutralMultiplicity());
2133  mMuMultiplicity_lowPt_EndCap = map_of_MEs[DirName+"/"+"MuMultiplicity_lowPt_EndCap"]; if(mMuMultiplicity_lowPt_EndCap && mMuMultiplicity_lowPt_EndCap->getRootObject()) mMuMultiplicity_lowPt_EndCap->Fill((*pfJets)[ijet].muonMultiplicity());
2134  }
2135  if (correctedJet.pt()>50. && correctedJet.pt()<=140.) {
2136  //mAxis2_mediumPt_EndCap = map_of_MEs[DirName+"/"+"qg_Axis2_mediumPt_EndCap"];if(mAxis2_mediumPt_EndCap && mAxis2_mediumPt_EndCap->getRootObject()) mAxis2_mediumPt_EndCap->Fill(QGaxis2);
2137  //mpTD_mediumPt_EndCap = map_of_MEs[DirName+"/"+"qg_pTD_mediumPt_EndCap"]; if(mpTD_mediumPt_EndCap && mpTD_mediumPt_EndCap->getRootObject()) mpTD_mediumPt_EndCap->Fill(QGptD);
2138  //mMultiplicityQG_mediumPt_EndCap = map_of_MEs[DirName+"/"+"qg_multiplicity_mediumPt_EndCap"]; if(mMultiplicityQG_mediumPt_EndCap && mMultiplicityQG_mediumPt_EndCap->getRootObject()) mMultiplicityQG_mediumPt_EndCap->Fill(QGmulti);
2139  //mqgLikelihood_mediumPt_EndCap = map_of_MEs[DirName+"/"+"qg_Likelihood_mediumPt_EndCap"]; if(mqgLikelihood_mediumPt_EndCap && mqgLikelihood_mediumPt_EndCap->getRootObject()) mqgLikelihood_mediumPt_EndCap->Fill(QGLikelihood);
2140  mMass_mediumPt_EndCap=map_of_MEs[DirName+"/"+"JetMass_mediumPt_EndCap"]; if(mMass_mediumPt_EndCap && mMass_mediumPt_EndCap->getRootObject())mMass_mediumPt_EndCap->Fill((*pfJets)[ijet].mass());
2141  mMVAPUJIDDiscriminant_mediumPt_EndCap=map_of_MEs[DirName+"/"+"MVAPUJIDDiscriminant_mediumPt_EndCap"]; if(mMVAPUJIDDiscriminant_mediumPt_EndCap && mMVAPUJIDDiscriminant_mediumPt_EndCap->getRootObject()) mMVAPUJIDDiscriminant_mediumPt_EndCap->Fill(puidmva);
2142  mCutPUJIDDiscriminant_mediumPt_EndCap=map_of_MEs[DirName+"/"+"CutPUJIDDiscriminant_mediumPt_EndCap"]; if(mCutPUJIDDiscriminant_mediumPt_EndCap && mCutPUJIDDiscriminant_mediumPt_EndCap->getRootObject()) mCutPUJIDDiscriminant_mediumPt_EndCap->Fill(puidcut);
2143  mCHFrac_mediumPt_EndCap = map_of_MEs[DirName+"/"+"CHFrac_mediumPt_EndCap"]; if (mCHFrac_mediumPt_EndCap && mCHFrac_mediumPt_EndCap->getRootObject()) mCHFrac_mediumPt_EndCap->Fill((*pfJets)[ijet].chargedHadronEnergyFraction());
2144  mNHFrac_mediumPt_EndCap = map_of_MEs[DirName+"/"+"NHFrac_mediumPt_EndCap"]; if (mNHFrac_mediumPt_EndCap && mNHFrac_mediumPt_EndCap->getRootObject()) mNHFrac_mediumPt_EndCap->Fill((*pfJets)[ijet].neutralHadronEnergyFraction());
2145  mPhFrac_mediumPt_EndCap = map_of_MEs[DirName+"/"+"PhFrac_mediumPt_EndCap"]; if (mPhFrac_mediumPt_EndCap && mPhFrac_mediumPt_EndCap->getRootObject()) mPhFrac_mediumPt_EndCap->Fill((*pfJets)[ijet].neutralEmEnergyFraction());
2146  mCHEn_mediumPt_EndCap = map_of_MEs[DirName+"/"+"CHEn_mediumPt_EndCap"]; if (mCHEn_mediumPt_EndCap && mCHEn_mediumPt_EndCap->getRootObject()) mCHEn_mediumPt_EndCap->Fill((*pfJets)[ijet].chargedHadronEnergy());
2147  mNHEn_mediumPt_EndCap = map_of_MEs[DirName+"/"+"NHEn_mediumPt_EndCap"]; if (mNHEn_mediumPt_EndCap && mNHEn_mediumPt_EndCap->getRootObject()) mNHEn_mediumPt_EndCap->Fill((*pfJets)[ijet].neutralHadronEnergy());
2148  mPhEn_mediumPt_EndCap = map_of_MEs[DirName+"/"+"PhEn_mediumPt_EndCap"]; if (mPhEn_mediumPt_EndCap && mPhEn_mediumPt_EndCap->getRootObject()) mPhEn_mediumPt_EndCap->Fill((*pfJets)[ijet].neutralEmEnergy());
2149  mElEn_mediumPt_EndCap = map_of_MEs[DirName+"/"+"ElEn_mediumPt_EndCap"]; if (mElEn_mediumPt_EndCap && mElEn_mediumPt_EndCap->getRootObject()) mElEn_mediumPt_EndCap->Fill((*pfJets)[ijet].chargedEmEnergy());
2150  mMuEn_mediumPt_EndCap = map_of_MEs[DirName+"/"+"MuEn_mediumPt_EndCap"]; if (mMuEn_mediumPt_EndCap && mMuEn_mediumPt_EndCap->getRootObject()) mMuEn_mediumPt_EndCap->Fill((*pfJets)[ijet].chargedMuEnergy());
2151  mChMultiplicity_mediumPt_EndCap = map_of_MEs[DirName+"/"+"ChMultiplicity_mediumPt_EndCap"]; if(mChMultiplicity_mediumPt_EndCap && mChMultiplicity_mediumPt_EndCap->getRootObject()) mChMultiplicity_mediumPt_EndCap->Fill((*pfJets)[ijet].chargedMultiplicity());
2152  mNeutMultiplicity_mediumPt_EndCap = map_of_MEs[DirName+"/"+"NeutMultiplicity_mediumPt_EndCap"]; if(mNeutMultiplicity_mediumPt_EndCap && mNeutMultiplicity_mediumPt_EndCap->getRootObject()) mNeutMultiplicity_mediumPt_EndCap->Fill((*pfJets)[ijet].neutralMultiplicity());
2153  mMuMultiplicity_mediumPt_EndCap = map_of_MEs[DirName+"/"+"MuMultiplicity_mediumPt_EndCap"]; if(mMuMultiplicity_mediumPt_EndCap && mMuMultiplicity_mediumPt_EndCap->getRootObject()) mMuMultiplicity_mediumPt_EndCap->Fill((*pfJets)[ijet].muonMultiplicity());
2154  }
2155  if (correctedJet.pt()>140.) {
2156  //mAxis2_highPt_EndCap = map_of_MEs[DirName+"/"+"qg_Axis2_highPt_EndCap"];if(mAxis2_highPt_EndCap && mAxis2_highPt_EndCap->getRootObject()) mAxis2_highPt_EndCap->Fill(QGaxis2);
2157  //mpTD_highPt_EndCap = map_of_MEs[DirName+"/"+"qg_pTD_highPt_EndCap"]; if(mpTD_highPt_EndCap && mpTD_highPt_EndCap->getRootObject()) mpTD_highPt_EndCap->Fill(QGptD);
2158  //mMultiplicityQG_highPt_EndCap = map_of_MEs[DirName+"/"+"qg_multiplicity_highPt_EndCap"]; if(mMultiplicityQG_highPt_EndCap && mMultiplicityQG_highPt_EndCap->getRootObject()) mMultiplicityQG_highPt_EndCap->Fill(QGmulti);
2159  //mqgLikelihood_highPt_EndCap = map_of_MEs[DirName+"/"+"qg_Likelihood_highPt_EndCap"]; if(mqgLikelihood_highPt_EndCap && mqgLikelihood_highPt_EndCap->getRootObject()) mqgLikelihood_highPt_EndCap->Fill(QGLikelihood);
2160  mMass_highPt_EndCap=map_of_MEs[DirName+"/"+"JetMass_highPt_EndCap"]; if(mMass_highPt_EndCap && mMass_highPt_EndCap->getRootObject())mMass_highPt_EndCap->Fill((*pfJets)[ijet].mass());
2161  mMVAPUJIDDiscriminant_highPt_EndCap=map_of_MEs[DirName+"/"+"MVAPUJIDDiscriminant_highPt_EndCap"]; if(mMVAPUJIDDiscriminant_highPt_EndCap && mMVAPUJIDDiscriminant_highPt_EndCap->getRootObject()) mMVAPUJIDDiscriminant_highPt_EndCap->Fill(puidmva);
2162  mCutPUJIDDiscriminant_highPt_EndCap=map_of_MEs[DirName+"/"+"CutPUJIDDiscriminant_highPt_EndCap"]; if(mCutPUJIDDiscriminant_highPt_EndCap && mCutPUJIDDiscriminant_highPt_EndCap->getRootObject()) mCutPUJIDDiscriminant_highPt_EndCap->Fill(puidcut);
2163  mCHFrac_highPt_EndCap = map_of_MEs[DirName+"/"+"CHFrac_highPt_EndCap"]; if (mCHFrac_highPt_EndCap && mCHFrac_highPt_EndCap->getRootObject()) mCHFrac_highPt_EndCap->Fill((*pfJets)[ijet].chargedHadronEnergyFraction());
2164  mNHFrac_highPt_EndCap = map_of_MEs[DirName+"/"+"NHFrac_highPt_EndCap"]; if (mNHFrac_highPt_EndCap && mNHFrac_highPt_EndCap->getRootObject()) mNHFrac_highPt_EndCap->Fill((*pfJets)[ijet].neutralHadronEnergyFraction());
2165  mPhFrac_highPt_EndCap = map_of_MEs[DirName+"/"+"PhFrac_highPt_EndCap"]; if (mPhFrac_highPt_EndCap && mPhFrac_highPt_EndCap->getRootObject()) mPhFrac_highPt_EndCap->Fill((*pfJets)[ijet].neutralEmEnergyFraction());
2166  mCHEn_highPt_EndCap = map_of_MEs[DirName+"/"+"CHEn_highPt_EndCap"]; if (mCHEn_highPt_EndCap && mCHEn_highPt_EndCap->getRootObject()) mCHEn_highPt_EndCap->Fill((*pfJets)[ijet].chargedHadronEnergy());
2167  mNHEn_highPt_EndCap = map_of_MEs[DirName+"/"+"NHEn_highPt_EndCap"]; if (mNHEn_highPt_EndCap && mNHEn_highPt_EndCap->getRootObject()) mNHEn_highPt_EndCap->Fill((*pfJets)[ijet].neutralHadronEnergy());
2168  mPhEn_highPt_EndCap = map_of_MEs[DirName+"/"+"PhEn_highPt_EndCap"]; if (mPhEn_highPt_EndCap && mPhEn_highPt_EndCap->getRootObject()) mPhEn_highPt_EndCap->Fill((*pfJets)[ijet].neutralEmEnergy());
2169  mElEn_highPt_EndCap = map_of_MEs[DirName+"/"+"ElEn_highPt_EndCap"]; if (mElEn_highPt_EndCap && mElEn_highPt_EndCap->getRootObject()) mElEn_highPt_EndCap->Fill((*pfJets)[ijet].chargedEmEnergy());
2170  mMuEn_highPt_EndCap = map_of_MEs[DirName+"/"+"MuEn_highPt_EndCap"]; if (mMuEn_highPt_EndCap && mMuEn_highPt_EndCap->getRootObject()) mMuEn_highPt_EndCap->Fill((*pfJets)[ijet].chargedMuEnergy());
2171  mChMultiplicity_highPt_EndCap = map_of_MEs[DirName+"/"+"ChMultiplicity_highPt_EndCap"]; if(mChMultiplicity_highPt_EndCap && mChMultiplicity_highPt_EndCap->getRootObject()) mChMultiplicity_highPt_EndCap->Fill((*pfJets)[ijet].chargedMultiplicity());
2172  mNeutMultiplicity_highPt_EndCap = map_of_MEs[DirName+"/"+"NeutMultiplicity_highPt_EndCap"]; if(mNeutMultiplicity_highPt_EndCap && mNeutMultiplicity_highPt_EndCap->getRootObject()) mNeutMultiplicity_highPt_EndCap->Fill((*pfJets)[ijet].neutralMultiplicity());
2173  mMuMultiplicity_highPt_EndCap = map_of_MEs[DirName+"/"+"MuMultiplicity_highPt_EndCap"]; if(mMuMultiplicity_highPt_EndCap && mMuMultiplicity_highPt_EndCap->getRootObject()) mMuMultiplicity_highPt_EndCap->Fill((*pfJets)[ijet].muonMultiplicity());
2174  }
2175  mCHFracVSpT_EndCap = map_of_MEs[DirName+"/"+"CHFracVSpT_EndCap"]; if(mCHFracVSpT_EndCap && mCHFracVSpT_EndCap->getRootObject()) mCHFracVSpT_EndCap->Fill(correctedJet.pt(),(*pfJets)[ijet].chargedHadronEnergyFraction());
2176  mNHFracVSpT_EndCap = map_of_MEs[DirName+"/"+"NHFracVSpT_EndCap"];if (mNHFracVSpT_EndCap && mNHFracVSpT_EndCap->getRootObject()) mNHFracVSpT_EndCap->Fill(correctedJet.pt(),(*pfJets)[ijet].neutralHadronEnergyFraction());
2177  mPhFracVSpT_EndCap = map_of_MEs[DirName+"/"+"PhFracVSpT_EndCap"];if (mPhFracVSpT_EndCap && mPhFracVSpT_EndCap->getRootObject()) mPhFracVSpT_EndCap->Fill(correctedJet.pt(),(*pfJets)[ijet].neutralEmEnergyFraction());
2178  }else{
2179  mHFHFracVSpT_Forward = map_of_MEs[DirName+"/"+"HFHFracVSpT_Forward"]; if (mHFHFracVSpT_Forward && mHFHFracVSpT_Forward->getRootObject()) mHFHFracVSpT_Forward->Fill(correctedJet.pt(),(*pfJets)[ijet].HFHadronEnergyFraction ());
2180  mHFEFracVSpT_Forward = map_of_MEs[DirName+"/"+"HFEFracVSpT_Forward"]; if (mHFEFracVSpT_Forward && mHFEFracVSpT_Forward->getRootObject()) mHFEFracVSpT_Forward->Fill (correctedJet.pt(),(*pfJets)[ijet].HFEMEnergyFraction ());
2181  //fractions
2182  if (correctedJet.pt()<=50.) {
2183  //mAxis2_lowPt_Forward = map_of_MEs[DirName+"/"+"qg_Axis2_lowPt_Forward"];if(mAxis2_lowPt_Forward && mAxis2_lowPt_Forward->getRootObject()) mAxis2_lowPt_Forward->Fill(QGaxis2);
2184  //mpTD_lowPt_Forward = map_of_MEs[DirName+"/"+"qg_pTD_lowPt_Forward"]; if(mpTD_lowPt_Forward && mpTD_lowPt_Forward->getRootObject()) mpTD_lowPt_Forward->Fill(QGptD);
2185  //mMultiplicityQG_lowPt_Forward = map_of_MEs[DirName+"/"+"qg_multiplicity_lowPt_Forward"]; if(mMultiplicityQG_lowPt_Forward && mMultiplicityQG_lowPt_Forward->getRootObject()) mMultiplicityQG_lowPt_Forward->Fill(QGmulti);
2186  //mqgLikelihood_lowPt_Forward = map_of_MEs[DirName+"/"+"qg_Likelihood_lowPt_Forward"]; if(mqgLikelihood_lowPt_Forward && mqgLikelihood_lowPt_Forward->getRootObject()) mqgLikelihood_lowPt_Forward->Fill(QGLikelihood);
2187  mMass_lowPt_Forward=map_of_MEs[DirName+"/"+"JetMass_lowPt_Forward"]; if(mMass_lowPt_Forward && mMass_lowPt_Forward->getRootObject())mMass_lowPt_Forward->Fill((*pfJets)[ijet].mass());
2188  mMVAPUJIDDiscriminant_lowPt_Forward=map_of_MEs[DirName+"/"+"MVAPUJIDDiscriminant_lowPt_Forward"]; if(mMVAPUJIDDiscriminant_lowPt_Forward && mMVAPUJIDDiscriminant_lowPt_Forward->getRootObject()) mMVAPUJIDDiscriminant_lowPt_Forward->Fill(puidmva);
2189  mCutPUJIDDiscriminant_lowPt_Forward=map_of_MEs[DirName+"/"+"CutPUJIDDiscriminant_lowPt_Forward"]; if(mCutPUJIDDiscriminant_lowPt_Forward && mCutPUJIDDiscriminant_lowPt_Forward->getRootObject()) mCutPUJIDDiscriminant_lowPt_Forward->Fill(puidcut);
2190  mHFEFrac_lowPt_Forward = map_of_MEs[DirName+"/"+"HFEFrac_lowPt_Forward"]; if(mHFEFrac_lowPt_Forward && mHFEFrac_lowPt_Forward->getRootObject()) mHFEFrac_lowPt_Forward->Fill((*pfJets)[ijet].HFEMEnergyFraction());
2191  mHFHFrac_lowPt_Forward = map_of_MEs[DirName+"/"+"HFHFrac_lowPt_Forward"]; if(mHFHFrac_lowPt_Forward && mHFHFrac_lowPt_Forward->getRootObject()) mHFHFrac_lowPt_Forward->Fill((*pfJets)[ijet].HFHadronEnergyFraction());
2192  mHFEEn_lowPt_Forward = map_of_MEs[DirName+"/"+"HFEEn_lowPt_Forward"]; if(mHFEEn_lowPt_Forward && mHFEEn_lowPt_Forward->getRootObject()) mHFEEn_lowPt_Forward->Fill((*pfJets)[ijet].HFEMEnergy());
2193  mHFHEn_lowPt_Forward = map_of_MEs[DirName+"/"+"HFHEn_lowPt_Forward"]; if(mHFHEn_lowPt_Forward && mHFHEn_lowPt_Forward->getRootObject()) mHFHEn_lowPt_Forward->Fill((*pfJets)[ijet].HFHadronEnergy());
2194  mNeutMultiplicity_lowPt_Forward = map_of_MEs[DirName+"/"+"NeutMultiplicity_lowPt_Forward"]; if(mNeutMultiplicity_lowPt_Forward && mNeutMultiplicity_lowPt_Forward->getRootObject()) mNeutMultiplicity_lowPt_Forward->Fill((*pfJets)[ijet].neutralMultiplicity());
2195  }
2196  if (correctedJet.pt()>50. && correctedJet.pt()<=140.) {
2197  //mAxis2_mediumPt_Forward = map_of_MEs[DirName+"/"+"qg_Axis2_mediumPt_Forward"];if(mAxis2_mediumPt_Forward && mAxis2_mediumPt_Forward->getRootObject()) mAxis2_mediumPt_Forward->Fill(QGaxis2);
2198  //mpTD_mediumPt_Forward = map_of_MEs[DirName+"/"+"qg_pTD_mediumPt_Forward"]; if(mpTD_mediumPt_Forward && mpTD_mediumPt_Forward->getRootObject()) mpTD_mediumPt_Forward->Fill(QGptD);
2199  //mMultiplicityQG_mediumPt_Forward = map_of_MEs[DirName+"/"+"qg_multiplicity_mediumPt_Forward"]; if(mMultiplicityQG_mediumPt_Forward && mMultiplicityQG_mediumPt_Forward->getRootObject()) mMultiplicityQG_mediumPt_Forward->Fill(QGmulti);
2200  //mqgLikelihood_mediumPt_Forward = map_of_MEs[DirName+"/"+"qg_Likelihood_mediumPt_Forward"]; if(mqgLikelihood_mediumPt_Forward && mqgLikelihood_mediumPt_Forward->getRootObject()) mqgLikelihood_mediumPt_Forward->Fill(QGLikelihood);
2201  mMass_mediumPt_Forward=map_of_MEs[DirName+"/"+"JetMass_mediumPt_Forward"]; if(mMass_mediumPt_Forward && mMass_mediumPt_Forward->getRootObject())mMass_mediumPt_Forward->Fill((*pfJets)[ijet].mass());
2202  mMVAPUJIDDiscriminant_mediumPt_Forward=map_of_MEs[DirName+"/"+"MVAPUJIDDiscriminant_mediumPt_Forward"]; if(mMVAPUJIDDiscriminant_mediumPt_Forward && mMVAPUJIDDiscriminant_mediumPt_Forward->getRootObject()) mMVAPUJIDDiscriminant_mediumPt_Forward->Fill(puidmva);
2203  mCutPUJIDDiscriminant_mediumPt_Forward=map_of_MEs[DirName+"/"+"CutPUJIDDiscriminant_mediumPt_Forward"]; if(mCutPUJIDDiscriminant_mediumPt_Forward && mCutPUJIDDiscriminant_mediumPt_Forward->getRootObject()) mCutPUJIDDiscriminant_mediumPt_Forward->Fill(puidcut);
2204  mHFEFrac_mediumPt_Forward = map_of_MEs[DirName+"/"+"HFEFrac_mediumPt_Forward"]; if(mHFEFrac_mediumPt_Forward && mHFEFrac_mediumPt_Forward->getRootObject()) mHFEFrac_mediumPt_Forward->Fill((*pfJets)[ijet].HFEMEnergyFraction());
2205  mHFHFrac_mediumPt_Forward = map_of_MEs[DirName+"/"+"HFHFrac_mediumPt_Forward"]; if(mHFHFrac_mediumPt_Forward && mHFHFrac_mediumPt_Forward->getRootObject()) mHFHFrac_mediumPt_Forward->Fill((*pfJets)[ijet].HFHadronEnergyFraction());
2206  mHFEEn_mediumPt_Forward = map_of_MEs[DirName+"/"+"HFEEn_mediumPt_Forward"]; if(mHFEEn_mediumPt_Forward && mHFEEn_mediumPt_Forward->getRootObject()) mHFEEn_mediumPt_Forward->Fill((*pfJets)[ijet].HFEMEnergy());
2207  mHFHEn_mediumPt_Forward = map_of_MEs[DirName+"/"+"HFHEn_mediumPt_Forward"]; if(mHFHEn_mediumPt_Forward && mHFHEn_mediumPt_Forward->getRootObject()) mHFHEn_mediumPt_Forward->Fill((*pfJets)[ijet].HFHadronEnergy());
2208  mNeutMultiplicity_mediumPt_Forward = map_of_MEs[DirName+"/"+"NeutMultiplicity_mediumPt_Forward"]; if(mNeutMultiplicity_mediumPt_Forward && mNeutMultiplicity_mediumPt_Forward->getRootObject()) mNeutMultiplicity_mediumPt_Forward->Fill((*pfJets)[ijet].neutralMultiplicity());
2209  }
2210  if (correctedJet.pt()>140.) {
2211  //mAxis2_highPt_Forward = map_of_MEs[DirName+"/"+"qg_Axis2_highPt_Forward"];if(mAxis2_highPt_Forward && mAxis2_highPt_Forward->getRootObject()) mAxis2_highPt_Forward->Fill(QGaxis2);
2212  //mpTD_highPt_Forward = map_of_MEs[DirName+"/"+"qg_pTD_highPt_Forward"]; if(mpTD_highPt_Forward && mpTD_highPt_Forward->getRootObject()) mpTD_highPt_Forward->Fill(QGptD);
2213  //mMultiplicityQG_highPt_Forward = map_of_MEs[DirName+"/"+"qg_multiplicity_highPt_Forward"]; if(mMultiplicityQG_highPt_Forward && mMultiplicityQG_highPt_Forward->getRootObject()) mMultiplicityQG_highPt_Forward->Fill(QGmulti);
2214  //mqgLikelihood_highPt_Forward = map_of_MEs[DirName+"/"+"qg_Likelihood_highPt_Forward"]; if(mqgLikelihood_highPt_Forward && mqgLikelihood_highPt_Forward->getRootObject()) mqgLikelihood_highPt_Forward->Fill(QGLikelihood);
2215  mMass_highPt_Forward=map_of_MEs[DirName+"/"+"JetMass_highPt_Forward"]; if(mMass_highPt_Forward && mMass_highPt_Forward->getRootObject())mMass_highPt_Forward->Fill((*pfJets)[ijet].mass());
2216  mMVAPUJIDDiscriminant_highPt_Forward=map_of_MEs[DirName+"/"+"MVAPUJIDDiscriminant_highPt_Forward"]; if(mMVAPUJIDDiscriminant_highPt_Forward && mMVAPUJIDDiscriminant_highPt_Forward->getRootObject()) mMVAPUJIDDiscriminant_highPt_Forward->Fill(puidmva);
2217  mCutPUJIDDiscriminant_highPt_Forward=map_of_MEs[DirName+"/"+"CutPUJIDDiscriminant_highPt_Forward"]; if(mCutPUJIDDiscriminant_highPt_Forward && mCutPUJIDDiscriminant_highPt_Forward->getRootObject()) mCutPUJIDDiscriminant_highPt_Forward->Fill(puidcut);
2218  mHFEFrac_highPt_Forward = map_of_MEs[DirName+"/"+"HFEFrac_highPt_Forward"]; if(mHFEFrac_highPt_Forward && mHFEFrac_highPt_Forward->getRootObject()) mHFEFrac_highPt_Forward->Fill((*pfJets)[ijet].HFEMEnergyFraction());
2219  mHFHFrac_highPt_Forward = map_of_MEs[DirName+"/"+"HFHFrac_highPt_Forward"]; if(mHFHFrac_highPt_Forward && mHFHFrac_highPt_Forward->getRootObject()) mHFHFrac_highPt_Forward->Fill((*pfJets)[ijet].HFHadronEnergyFraction());
2220  mHFEEn_highPt_Forward = map_of_MEs[DirName+"/"+"HFEEn_highPt_Forward"]; if(mHFEEn_highPt_Forward && mHFEEn_highPt_Forward->getRootObject()) mHFEEn_highPt_Forward->Fill((*pfJets)[ijet].HFEMEnergy());
2221  mHFHEn_highPt_Forward = map_of_MEs[DirName+"/"+"HFHEn_highPt_Forward"]; if(mHFHEn_highPt_Forward && mHFHEn_highPt_Forward->getRootObject()) mHFHEn_highPt_Forward->Fill((*pfJets)[ijet].HFHadronEnergy());
2222  mNeutMultiplicity_highPt_Forward = map_of_MEs[DirName+"/"+"NeutMultiplicity_highPt_Forward"]; if(mNeutMultiplicity_highPt_Forward && mNeutMultiplicity_highPt_Forward->getRootObject()) mNeutMultiplicity_highPt_Forward->Fill((*pfJets)[ijet].neutralMultiplicity());
2223  }
2224  }
2225  //OOT plots
2226  if(techTriggerResultBx0 && techTriggerResultBxE && techTriggerResultBxF){
2227  meEta_BXm2BXm1Filled = map_of_MEs[DirName+"/"+"Eta_BXm2BXm1Filled"]; if ( meEta_BXm2BXm1Filled && meEta_BXm2BXm1Filled ->getRootObject()) meEta_BXm2BXm1Filled ->Fill((*pfJets)[ijet].eta());
2228  if(fabs(correctedJet.eta()) <= 1.3) {
2229  mePhFracBarrel_BXm2BXm1Filled = map_of_MEs[DirName+"/"+"PhFracBarrel_BXm2BXm1Filled"]; if ( mePhFracBarrel_BXm2BXm1Filled && mePhFracBarrel_BXm2BXm1Filled ->getRootObject()) mePhFracBarrel_BXm2BXm1Filled ->Fill((*pfJets)[ijet].photonEnergyFraction());
2230  meNHFracBarrel_BXm2BXm1Filled = map_of_MEs[DirName+"/"+"NHFracBarrel_BXm2BXm1Filled"]; if ( meNHFracBarrel_BXm2BXm1Filled && meNHFracBarrel_BXm2BXm1Filled ->getRootObject()) meNHFracBarrel_BXm2BXm1Filled ->Fill((*pfJets)[ijet].neutralHadronEnergyFraction());
2231  meCHFracBarrel_BXm2BXm1Filled = map_of_MEs[DirName+"/"+"CHFracBarrel_BXm2BXm1Filled"]; if ( meCHFracBarrel_BXm2BXm1Filled && meCHFracBarrel_BXm2BXm1Filled ->getRootObject()) meCHFracBarrel_BXm2BXm1Filled ->Fill((*pfJets)[ijet].chargedHadronEnergyFraction());
2232  mePtBarrel_BXm2BXm1Filled = map_of_MEs[DirName+"/"+"PtBarrel_BXm2BXm1Filled"]; if ( mePtBarrel_BXm2BXm1Filled && mePtBarrel_BXm2BXm1Filled ->getRootObject()) mePtBarrel_BXm2BXm1Filled ->Fill((*pfJets)[ijet].pt());
2233  }else if (correctedJet.eta() > -3.0 && correctedJet.eta() <= -1.3) {
2234  mePhFracEndCapMinus_BXm2BXm1Filled = map_of_MEs[DirName+"/"+"PhFracEndCapMinus_BXm2BXm1Filled"]; if ( mePhFracEndCapMinus_BXm2BXm1Filled && mePhFracEndCapMinus_BXm2BXm1Filled ->getRootObject()) mePhFracEndCapMinus_BXm2BXm1Filled ->Fill((*pfJets)[ijet].photonEnergyFraction());
2235  meNHFracEndCapMinus_BXm2BXm1Filled = map_of_MEs[DirName+"/"+"NHFracEndCapMinus_BXm2BXm1Filled"]; if ( meNHFracEndCapMinus_BXm2BXm1Filled && meNHFracEndCapMinus_BXm2BXm1Filled ->getRootObject()) meNHFracEndCapMinus_BXm2BXm1Filled ->Fill((*pfJets)[ijet].neutralHadronEnergyFraction());
2236  meCHFracEndCapMinus_BXm2BXm1Filled = map_of_MEs[DirName+"/"+"CHFracEndCapMinus_BXm2BXm1Filled"]; if ( meCHFracEndCapMinus_BXm2BXm1Filled && meCHFracEndCapMinus_BXm2BXm1Filled ->getRootObject()) meCHFracEndCapMinus_BXm2BXm1Filled ->Fill((*pfJets)[ijet].chargedHadronEnergyFraction());
2237  mePtEndCapMinus_BXm2BXm1Filled = map_of_MEs[DirName+"/"+"PtEndCapMinus_BXm2BXm1Filled"]; if ( mePtEndCapMinus_BXm2BXm1Filled && mePtEndCapMinus_BXm2BXm1Filled ->getRootObject()) mePtEndCapMinus_BXm2BXm1Filled ->Fill((*pfJets)[ijet].pt());
2238  }else if (correctedJet.eta() >= 1.3 && correctedJet.eta() < 3.0) {
2239  mePhFracEndCapPlus_BXm2BXm1Filled = map_of_MEs[DirName+"/"+"PhFracEndCapPlus_BXm2BXm1Filled"]; if ( mePhFracEndCapPlus_BXm2BXm1Filled && mePhFracEndCapPlus_BXm2BXm1Filled ->getRootObject()) mePhFracEndCapPlus_BXm2BXm1Filled ->Fill((*pfJets)[ijet].photonEnergyFraction());
2240  meNHFracEndCapPlus_BXm2BXm1Filled = map_of_MEs[DirName+"/"+"NHFracEndCapPlus_BXm2BXm1Filled"]; if ( meNHFracEndCapPlus_BXm2BXm1Filled && meNHFracEndCapPlus_BXm2BXm1Filled ->getRootObject()) meNHFracEndCapPlus_BXm2BXm1Filled ->Fill((*pfJets)[ijet].neutralHadronEnergyFraction());
2241  meCHFracEndCapPlus_BXm2BXm1Filled = map_of_MEs[DirName+"/"+"CHFracEndCapPlus_BXm2BXm1Filled"]; if ( meCHFracEndCapPlus_BXm2BXm1Filled && meCHFracEndCapPlus_BXm2BXm1Filled ->getRootObject()) meCHFracEndCapPlus_BXm2BXm1Filled ->Fill((*pfJets)[ijet].chargedHadronEnergyFraction());
2242  mePtEndCapPlus_BXm2BXm1Filled = map_of_MEs[DirName+"/"+"PtEndCapPlus_BXm2BXm1Filled"]; if ( mePtEndCapPlus_BXm2BXm1Filled && mePtEndCapPlus_BXm2BXm1Filled ->getRootObject()) mePtEndCapPlus_BXm2BXm1Filled ->Fill((*pfJets)[ijet].pt());
2243  }else if (correctedJet.eta() > -5.0 && correctedJet.eta() <= -3.0) {
2244  mePtForwardMinus_BXm2BXm1Filled = map_of_MEs[DirName+"/"+"PtForwardMinus_BXm2BXm1Filled"]; if ( mePtForwardMinus_BXm2BXm1Filled && mePtForwardMinus_BXm2BXm1Filled ->getRootObject()) mePtForwardMinus_BXm2BXm1Filled ->Fill((*pfJets)[ijet].pt());
2245  meHFHFracMinus_BXm2BXm1Filled = map_of_MEs[DirName+"/"+"HFHFracMinus_BXm2BXm1Filled"]; if ( meHFHFracMinus_BXm2BXm1Filled && meHFHFracMinus_BXm2BXm1Filled ->getRootObject()) meHFHFracMinus_BXm2BXm1Filled ->Fill((*pfJets)[ijet].HFHadronEnergyFraction());
2246  meHFEMFracMinus_BXm2BXm1Filled = map_of_MEs[DirName+"/"+"HFEMFracMinus_BXm2BXm1Filled"]; if ( meHFEMFracMinus_BXm2BXm1Filled && meHFEMFracMinus_BXm2BXm1Filled ->getRootObject()) meHFEMFracMinus_BXm2BXm1Filled ->Fill((*pfJets)[ijet].HFEMEnergyFraction());
2247  }else if (correctedJet.eta() >= 3.0 && correctedJet.eta() < 5.0) {
2248  mePtForwardPlus_BXm2BXm1Filled = map_of_MEs[DirName+"/"+"PtForwardPlus_BXm2BXm1Filled"]; if ( mePtForwardPlus_BXm2BXm1Filled && mePtForwardPlus_BXm2BXm1Filled ->getRootObject()) mePtForwardPlus_BXm2BXm1Filled ->Fill((*pfJets)[ijet].pt());
2249  meHFHFracPlus_BXm2BXm1Filled = map_of_MEs[DirName+"/"+"HFHFracPlus_BXm2BXm1Filled"]; if ( meHFHFracPlus_BXm2BXm1Filled && meHFHFracPlus_BXm2BXm1Filled ->getRootObject()) meHFHFracPlus_BXm2BXm1Filled ->Fill((*pfJets)[ijet].HFHadronEnergyFraction());
2250  meHFEMFracPlus_BXm2BXm1Filled = map_of_MEs[DirName+"/"+"HFEMFracPlus_BXm2BXm1Filled"]; if ( meHFEMFracPlus_BXm2BXm1Filled && meHFEMFracPlus_BXm2BXm1Filled ->getRootObject()) meHFEMFracPlus_BXm2BXm1Filled ->Fill((*pfJets)[ijet].HFEMEnergyFraction());
2251  }
2252  }
2253  if(techTriggerResultBx0 && techTriggerResultBxF){
2254  meEta_BXm1Filled = map_of_MEs[DirName+"/"+"Eta_BXm1Filled"]; if ( meEta_BXm1Filled && meEta_BXm1Filled ->getRootObject()) meEta_BXm1Filled ->Fill((*pfJets)[ijet].eta());
2255  if(fabs(correctedJet.eta()) <= 1.3) {
2256  mePhFracBarrel_BXm1Filled = map_of_MEs[DirName+"/"+"PhFracBarrel_BXm1Filled"]; if ( mePhFracBarrel_BXm1Filled && mePhFracBarrel_BXm1Filled ->getRootObject()) mePhFracBarrel_BXm1Filled ->Fill((*pfJets)[ijet].photonEnergyFraction());
2257  meNHFracBarrel_BXm1Filled = map_of_MEs[DirName+"/"+"NHFracBarrel_BXm1Filled"]; if ( meNHFracBarrel_BXm1Filled && meNHFracBarrel_BXm1Filled ->getRootObject()) meNHFracBarrel_BXm1Filled ->Fill((*pfJets)[ijet].neutralHadronEnergyFraction());
2258  meCHFracBarrel_BXm1Filled = map_of_MEs[DirName+"/"+"CHFracBarrel_BXm1Filled"]; if ( meCHFracBarrel_BXm1Filled && meCHFracBarrel_BXm1Filled ->getRootObject()) meCHFracBarrel_BXm1Filled ->Fill((*pfJets)[ijet].chargedHadronEnergyFraction());
2259  mePtBarrel_BXm1Filled = map_of_MEs[DirName+"/"+"PtBarrel_BXm1Filled"]; if ( mePtBarrel_BXm1Filled && mePtBarrel_BXm1Filled ->getRootObject()) mePtBarrel_BXm1Filled ->Fill((*pfJets)[ijet].pt());
2260  }else if (correctedJet.eta() > -3.0 && correctedJet.eta() <= -1.3) {
2261  mePhFracEndCapMinus_BXm1Filled = map_of_MEs[DirName+"/"+"PhFracEndCapMinus_BXm1Filled"]; if ( mePhFracEndCapMinus_BXm1Filled && mePhFracEndCapMinus_BXm1Filled ->getRootObject()) mePhFracEndCapMinus_BXm1Filled ->Fill((*pfJets)[ijet].photonEnergyFraction());
2262  meNHFracEndCapMinus_BXm1Filled = map_of_MEs[DirName+"/"+"NHFracEndCapMinus_BXm1Filled"]; if ( meNHFracEndCapMinus_BXm1Filled && meNHFracEndCapMinus_BXm1Filled ->getRootObject()) meNHFracEndCapMinus_BXm1Filled ->Fill((*pfJets)[ijet].neutralHadronEnergyFraction());
2263  meCHFracEndCapMinus_BXm1Filled = map_of_MEs[DirName+"/"+"CHFracEndCapMinus_BXm1Filled"]; if ( meCHFracEndCapMinus_BXm1Filled && meCHFracEndCapMinus_BXm1Filled ->getRootObject()) meCHFracEndCapMinus_BXm1Filled ->Fill((*pfJets)[ijet].chargedHadronEnergyFraction());
2264  mePtEndCapMinus_BXm1Filled = map_of_MEs[DirName+"/"+"PtEndCapMinus_BXm1Filled"]; if ( mePtEndCapMinus_BXm1Filled && mePtEndCapMinus_BXm1Filled ->getRootObject()) mePtEndCapMinus_BXm1Filled ->Fill((*pfJets)[ijet].pt());
2265  }else if (correctedJet.eta() >= 1.3 && correctedJet.eta() < 3.0) {
2266  mePhFracEndCapPlus_BXm1Filled = map_of_MEs[DirName+"/"+"PhFracEndCapPlus_BXm1Filled"]; if ( mePhFracEndCapPlus_BXm1Filled && mePhFracEndCapPlus_BXm1Filled ->getRootObject()) mePhFracEndCapPlus_BXm1Filled ->Fill((*pfJets)[ijet].photonEnergyFraction());
2267  meNHFracEndCapPlus_BXm1Filled = map_of_MEs[DirName+"/"+"NHFracEndCapPlus_BXm1Filled"]; if ( meNHFracEndCapPlus_BXm1Filled && meNHFracEndCapPlus_BXm1Filled ->getRootObject()) meNHFracEndCapPlus_BXm1Filled ->Fill((*pfJets)[ijet].neutralHadronEnergyFraction());
2268  meCHFracEndCapPlus_BXm1Filled = map_of_MEs[DirName+"/"+"CHFracEndCapPlus_BXm1Filled"]; if ( meCHFracEndCapPlus_BXm1Filled && meCHFracEndCapPlus_BXm1Filled ->getRootObject()) meCHFracEndCapPlus_BXm1Filled ->Fill((*pfJets)[ijet].chargedHadronEnergyFraction());
2269  mePtEndCapPlus_BXm1Filled = map_of_MEs[DirName+"/"+"PtEndCapPlus_BXm1Filled"]; if ( mePtEndCapPlus_BXm1Filled && mePtEndCapPlus_BXm1Filled ->getRootObject()) mePtEndCapPlus_BXm1Filled ->Fill((*pfJets)[ijet].pt());
2270  }else if (correctedJet.eta() > -5.0 && correctedJet.eta() <= -3.0) {
2271  mePtForwardMinus_BXm1Filled = map_of_MEs[DirName+"/"+"PtForwardMinus_BXm1Filled"]; if ( mePtForwardMinus_BXm1Filled && mePtForwardMinus_BXm1Filled ->getRootObject()) mePtForwardMinus_BXm1Filled ->Fill((*pfJets)[ijet].pt());
2272  meHFHFracMinus_BXm1Filled = map_of_MEs[DirName+"/"+"HFHFracMinus_BXm1Filled"]; if ( meHFHFracMinus_BXm1Filled && meHFHFracMinus_BXm1Filled ->getRootObject()) meHFHFracMinus_BXm1Filled ->Fill((*pfJets)[ijet].HFHadronEnergyFraction());
2273  meHFEMFracMinus_BXm1Filled = map_of_MEs[DirName+"/"+"HFEMFracMinus_BXm1Filled"]; if ( meHFEMFracMinus_BXm1Filled && meHFEMFracMinus_BXm1Filled ->getRootObject()) meHFEMFracMinus_BXm1Filled ->Fill((*pfJets)[ijet].HFEMEnergyFraction());
2274  }else if (correctedJet.eta() >= 3.0 && correctedJet.eta() < 5.0) {
2275  mePtForwardPlus_BXm1Filled = map_of_MEs[DirName+"/"+"PtForwardPlus_BXm1Filled"]; if ( mePtForwardPlus_BXm1Filled && mePtForwardPlus_BXm1Filled ->getRootObject()) mePtForwardPlus_BXm1Filled ->Fill((*pfJets)[ijet].pt());
2276  meHFHFracPlus_BXm1Filled = map_of_MEs[DirName+"/"+"HFHFracPlus_BXm1Filled"]; if ( meHFHFracPlus_BXm1Filled && meHFHFracPlus_BXm1Filled ->getRootObject()) meHFHFracPlus_BXm1Filled ->Fill((*pfJets)[ijet].HFHadronEnergyFraction());
2277  meHFEMFracPlus_BXm1Filled = map_of_MEs[DirName+"/"+"HFEMFracPlus_BXm1Filled"]; if ( meHFEMFracPlus_BXm1Filled && meHFEMFracPlus_BXm1Filled ->getRootObject()) meHFEMFracPlus_BXm1Filled ->Fill((*pfJets)[ijet].HFEMEnergyFraction());
2278  }
2279  }
2280  if(techTriggerResultBx0 && !techTriggerResultBxE && !techTriggerResultBxF){
2281  meEta_BXm2BXm1Empty = map_of_MEs[DirName+"/"+"Eta_BXm2BXm1Empty"]; if ( meEta_BXm2BXm1Empty && meEta_BXm2BXm1Empty ->getRootObject()) meEta_BXm2BXm1Empty ->Fill((*pfJets)[ijet].eta());
2282  if(fabs(correctedJet.eta()) <= 1.3) {
2283  mePhFracBarrel_BXm2BXm1Empty = map_of_MEs[DirName+"/"+"PhFracBarrel_BXm2BXm1Empty"]; if ( mePhFracBarrel_BXm2BXm1Empty && mePhFracBarrel_BXm2BXm1Empty ->getRootObject()) mePhFracBarrel_BXm2BXm1Empty ->Fill((*pfJets)[ijet].photonEnergyFraction());
2284  meNHFracBarrel_BXm2BXm1Empty = map_of_MEs[DirName+"/"+"NHFracBarrel_BXm2BXm1Empty"]; if ( meNHFracBarrel_BXm2BXm1Empty && meNHFracBarrel_BXm2BXm1Empty ->getRootObject()) meNHFracBarrel_BXm2BXm1Empty ->Fill((*pfJets)[ijet].neutralHadronEnergyFraction());
2285  meCHFracBarrel_BXm2BXm1Empty = map_of_MEs[DirName+"/"+"CHFracBarrel_BXm2BXm1Empty"]; if ( meCHFracBarrel_BXm2BXm1Empty && meCHFracBarrel_BXm2BXm1Empty ->getRootObject()) meCHFracBarrel_BXm2BXm1Empty ->Fill((*pfJets)[ijet].chargedHadronEnergyFraction());
2286  mePtBarrel_BXm2BXm1Empty = map_of_MEs[DirName+"/"+"PtBarrel_BXm2BXm1Empty"]; if ( mePtBarrel_BXm2BXm1Empty && mePtBarrel_BXm2BXm1Empty ->getRootObject()) mePtBarrel_BXm2BXm1Empty ->Fill((*pfJets)[ijet].pt());
2287  }else if (correctedJet.eta() > -3.0 && correctedJet.eta() <= -1.3) {
2288  mePhFracEndCapMinus_BXm2BXm1Empty = map_of_MEs[DirName+"/"+"PhFracEndCapMinus_BXm2BXm1Empty"]; if ( mePhFracEndCapMinus_BXm2BXm1Empty && mePhFracEndCapMinus_BXm2BXm1Empty ->getRootObject()) mePhFracEndCapMinus_BXm2BXm1Empty ->Fill((*pfJets)[ijet].photonEnergyFraction());
2289  meNHFracEndCapMinus_BXm2BXm1Empty = map_of_MEs[DirName+"/"+"NHFracEndCapMinus_BXm2BXm1Empty"]; if ( meNHFracEndCapMinus_BXm2BXm1Empty && meNHFracEndCapMinus_BXm2BXm1Empty ->getRootObject()) meNHFracEndCapMinus_BXm2BXm1Empty ->Fill((*pfJets)[ijet].neutralHadronEnergyFraction());
2290  meCHFracEndCapMinus_BXm2BXm1Empty = map_of_MEs[DirName+"/"+"CHFracEndCapMinus_BXm2BXm1Empty"]; if ( meCHFracEndCapMinus_BXm2BXm1Empty && meCHFracEndCapMinus_BXm2BXm1Empty ->getRootObject()) meCHFracEndCapMinus_BXm2BXm1Empty ->Fill((*pfJets)[ijet].chargedHadronEnergyFraction());
2291  mePtEndCapMinus_BXm2BXm1Empty = map_of_MEs[DirName+"/"+"PtEndCapMinus_BXm2BXm1Empty"]; if ( mePtEndCapMinus_BXm2BXm1Empty && mePtEndCapMinus_BXm2BXm1Empty ->getRootObject()) mePtEndCapMinus_BXm2BXm1Empty ->Fill((*pfJets)[ijet].pt());
2292  }else if (correctedJet.eta() >= 1.3 && correctedJet.eta() < 3.0) {
2293  mePhFracEndCapPlus_BXm2BXm1Empty = map_of_MEs[DirName+"/"+"PhFracEndCapPlus_BXm2BXm1Empty"]; if ( mePhFracEndCapPlus_BXm2BXm1Empty && mePhFracEndCapPlus_BXm2BXm1Empty ->getRootObject()) mePhFracEndCapPlus_BXm2BXm1Empty ->Fill((*pfJets)[ijet].photonEnergyFraction());
2294  meNHFracEndCapPlus_BXm2BXm1Empty = map_of_MEs[DirName+"/"+"NHFracEndCapPlus_BXm2BXm1Empty"]; if ( meNHFracEndCapPlus_BXm2BXm1Empty && meNHFracEndCapPlus_BXm2BXm1Empty ->getRootObject()) meNHFracEndCapPlus_BXm2BXm1Empty ->Fill((*pfJets)[ijet].neutralHadronEnergyFraction());
2295  meCHFracEndCapPlus_BXm2BXm1Empty = map_of_MEs[DirName+"/"+"CHFracEndCapPlus_BXm2BXm1Empty"]; if ( meCHFracEndCapPlus_BXm2BXm1Empty && meCHFracEndCapPlus_BXm2BXm1Empty ->getRootObject()) meCHFracEndCapPlus_BXm2BXm1Empty ->Fill((*pfJets)[ijet].chargedHadronEnergyFraction());
2296  mePtEndCapPlus_BXm2BXm1Empty = map_of_MEs[DirName+"/"+"PtEndCapPlus_BXm2BXm1Empty"]; if ( mePtEndCapPlus_BXm2BXm1Empty && mePtEndCapPlus_BXm2BXm1Empty ->getRootObject()) mePtEndCapPlus_BXm2BXm1Empty ->Fill((*pfJets)[ijet].pt());
2297  }else if (correctedJet.eta() > -5.0 && correctedJet.eta() <= -3.0) {
2298  mePtForwardMinus_BXm2BXm1Empty = map_of_MEs[DirName+"/"+"PtForwardMinus_BXm2BXm1Empty"]; if ( mePtForwardMinus_BXm2BXm1Empty && mePtForwardMinus_BXm2BXm1Empty ->getRootObject()) mePtForwardMinus_BXm2BXm1Empty ->Fill((*pfJets)[ijet].pt());
2299  meHFHFracMinus_BXm2BXm1Empty = map_of_MEs[DirName+"/"+"HFHFracMinus_BXm2BXm1Empty"]; if ( meHFHFracMinus_BXm2BXm1Empty && meHFHFracMinus_BXm2BXm1Empty ->getRootObject()) meHFHFracMinus_BXm2BXm1Empty ->Fill((*pfJets)[ijet].HFHadronEnergyFraction());
2300  meHFEMFracMinus_BXm2BXm1Empty = map_of_MEs[DirName+"/"+"HFEMFracMinus_BXm2BXm1Empty"]; if ( meHFEMFracMinus_BXm2BXm1Empty && meHFEMFracMinus_BXm2BXm1Empty ->getRootObject()) meHFEMFracMinus_BXm2BXm1Empty ->Fill((*pfJets)[ijet].HFEMEnergyFraction());
2301  }else if (correctedJet.eta() >= 3.0 && correctedJet.eta() < 5.0) {
2302  mePtForwardPlus_BXm2BXm1Empty = map_of_MEs[DirName+"/"+"PtForwardPlus_BXm2BXm1Empty"]; if ( mePtForwardPlus_BXm2BXm1Empty && mePtForwardPlus_BXm2BXm1Empty ->getRootObject()) mePtForwardPlus_BXm2BXm1Empty ->Fill((*pfJets)[ijet].pt());
2303  meHFHFracPlus_BXm2BXm1Empty = map_of_MEs[DirName+"/"+"HFHFracPlus_BXm2BXm1Empty"]; if ( meHFHFracPlus_BXm2BXm1Empty && meHFHFracPlus_BXm2BXm1Empty ->getRootObject()) meHFHFracPlus_BXm2BXm1Empty ->Fill((*pfJets)[ijet].HFHadronEnergyFraction());
2304  meHFEMFracPlus_BXm2BXm1Empty = map_of_MEs[DirName+"/"+"HFEMFracPlus_BXm2BXm1Empty"]; if ( meHFEMFracPlus_BXm2BXm1Empty && meHFEMFracPlus_BXm2BXm1Empty ->getRootObject()) meHFEMFracPlus_BXm2BXm1Empty ->Fill((*pfJets)[ijet].HFEMEnergyFraction());
2305  }
2306  }
2307  if(techTriggerResultBx0 && !techTriggerResultBxF){
2308  meEta_BXm1Empty = map_of_MEs[DirName+"/"+"Eta_BXm1Empty"]; if ( meEta_BXm1Empty && meEta_BXm1Empty ->getRootObject()) meEta_BXm1Empty ->Fill((*pfJets)[ijet].eta());
2309  if(fabs(correctedJet.eta()) <= 1.3) {
2310  mePhFracBarrel_BXm1Empty = map_of_MEs[DirName+"/"+"PhFracBarrel_BXm1Empty"]; if ( mePhFracBarrel_BXm1Empty && mePhFracBarrel_BXm1Empty ->getRootObject()) mePhFracBarrel_BXm1Empty ->Fill((*pfJets)[ijet].photonEnergyFraction());
2311  meNHFracBarrel_BXm1Empty = map_of_MEs[DirName+"/"+"NHFracBarrel_BXm1Empty"]; if ( meNHFracBarrel_BXm1Empty && meNHFracBarrel_BXm1Empty ->getRootObject()) meNHFracBarrel_BXm1Empty ->Fill((*pfJets)[ijet].neutralHadronEnergyFraction());
2312  meCHFracBarrel_BXm1Empty = map_of_MEs[DirName+"/"+"CHFracBarrel_BXm1Empty"]; if ( meCHFracBarrel_BXm1Empty && meCHFracBarrel_BXm1Empty ->getRootObject()) meCHFracBarrel_BXm1Empty ->Fill((*pfJets)[ijet].chargedHadronEnergyFraction());
2313  mePtBarrel_BXm1Empty = map_of_MEs[DirName+"/"+"PtBarrel_BXm1Empty"]; if ( mePtBarrel_BXm1Empty && mePtBarrel_BXm1Empty ->getRootObject()) mePtBarrel_BXm1Empty ->Fill((*pfJets)[ijet].pt());
2314  }else if (correctedJet.eta() > -3.0 && correctedJet.eta() <= -1.3) {
2315  mePhFracEndCapMinus_BXm1Empty = map_of_MEs[DirName+"/"+"PhFracEndCapMinus_BXm1Empty"]; if ( mePhFracEndCapMinus_BXm1Empty && mePhFracEndCapMinus_BXm1Empty ->getRootObject()) mePhFracEndCapMinus_BXm1Empty ->Fill((*pfJets)[ijet].photonEnergyFraction());
2316  meNHFracEndCapMinus_BXm1Empty = map_of_MEs[DirName+"/"+"NHFracEndCapMinus_BXm1Empty"]; if ( meNHFracEndCapMinus_BXm1Empty && meNHFracEndCapMinus_BXm1Empty ->getRootObject()) meNHFracEndCapMinus_BXm1Empty ->Fill((*pfJets)[ijet].neutralHadronEnergyFraction());
2317  meCHFracEndCapMinus_BXm1Empty = map_of_MEs[DirName+"/"+"CHFracEndCapMinus_BXm1Empty"]; if ( meCHFracEndCapMinus_BXm1Empty && meCHFracEndCapMinus_BXm1Empty ->getRootObject()) meCHFracEndCapMinus_BXm1Empty ->Fill((*pfJets)[ijet].chargedHadronEnergyFraction());
2318  mePtEndCapMinus_BXm1Empty = map_of_MEs[DirName+"/"+"PtEndCapMinus_BXm1Empty"]; if ( mePtEndCapMinus_BXm1Empty && mePtEndCapMinus_BXm1Empty ->getRootObject()) mePtEndCapMinus_BXm1Empty ->Fill((*pfJets)[ijet].pt());
2319  }else if (correctedJet.eta() >= 1.3 && correctedJet.eta() < 3.0) {
2320  mePhFracEndCapPlus_BXm1Empty = map_of_MEs[DirName+"/"+"PhFracEndCapPlus_BXm1Empty"]; if ( mePhFracEndCapPlus_BXm1Empty && mePhFracEndCapPlus_BXm1Empty ->getRootObject()) mePhFracEndCapPlus_BXm1Empty ->Fill((*pfJets)[ijet].photonEnergyFraction());
2321  meNHFracEndCapPlus_BXm1Empty = map_of_MEs[DirName+"/"+"NHFracEndCapPlus_BXm1Empty"]; if ( meNHFracEndCapPlus_BXm1Empty && meNHFracEndCapPlus_BXm1Empty ->getRootObject()) meNHFracEndCapPlus_BXm1Empty ->Fill((*pfJets)[ijet].neutralHadronEnergyFraction());
2322  meCHFracEndCapPlus_BXm1Empty = map_of_MEs[DirName+"/"+"CHFracEndCapPlus_BXm1Empty"]; if ( meCHFracEndCapPlus_BXm1Empty && meCHFracEndCapPlus_BXm1Empty ->getRootObject()) meCHFracEndCapPlus_BXm1Empty ->Fill((*pfJets)[ijet].chargedHadronEnergyFraction());
2323  mePtEndCapPlus_BXm1Empty = map_of_MEs[DirName+"/"+"PtEndCapPlus_BXm1Empty"]; if ( mePtEndCapPlus_BXm1Empty && mePtEndCapPlus_BXm1Empty ->getRootObject()) mePtEndCapPlus_BXm1Empty ->Fill((*pfJets)[ijet].pt());
2324  }else if (correctedJet.eta() > -5.0 && correctedJet.eta() <= -3.0) {
2325  mePtForwardMinus_BXm1Empty = map_of_MEs[DirName+"/"+"PtForwardMinus_BXm1Empty"]; if ( mePtForwardMinus_BXm1Empty && mePtForwardMinus_BXm1Empty ->getRootObject()) mePtForwardMinus_BXm1Empty ->Fill((*pfJets)[ijet].pt());
2326  meHFHFracMinus_BXm1Empty = map_of_MEs[DirName+"/"+"HFHFracMinus_BXm1Empty"]; if ( meHFHFracMinus_BXm1Empty && meHFHFracMinus_BXm1Empty ->getRootObject()) meHFHFracMinus_BXm1Empty ->Fill((*pfJets)[ijet].HFHadronEnergyFraction());
2327  meHFEMFracMinus_BXm1Empty = map_of_MEs[DirName+"/"+"HFEMFracMinus_BXm1Empty"]; if ( meHFEMFracMinus_BXm1Empty && meHFEMFracMinus_BXm1Empty ->getRootObject()) meHFEMFracMinus_BXm1Empty ->Fill((*pfJets)[ijet].HFEMEnergyFraction());
2328  }else if (correctedJet.eta() >= 3.0 && correctedJet.eta() < 5.0) {
2329  mePtForwardPlus_BXm1Empty = map_of_MEs[DirName+"/"+"PtForwardPlus_BXm1Empty"]; if ( mePtForwardPlus_BXm1Empty && mePtForwardPlus_BXm1Empty ->getRootObject()) mePtForwardPlus_BXm1Empty ->Fill((*pfJets)[ijet].pt());
2330  meHFHFracPlus_BXm1Empty = map_of_MEs[DirName+"/"+"HFHFracPlus_BXm1Empty"]; if ( meHFHFracPlus_BXm1Empty && meHFHFracPlus_BXm1Empty ->getRootObject()) meHFHFracPlus_BXm1Empty ->Fill((*pfJets)[ijet].HFHadronEnergyFraction());
2331  meHFEMFracPlus_BXm1Empty = map_of_MEs[DirName+"/"+"HFEMFracPlus_BXm1Empty"]; if ( meHFEMFracPlus_BXm1Empty && meHFEMFracPlus_BXm1Empty ->getRootObject()) meHFEMFracPlus_BXm1Empty ->Fill((*pfJets)[ijet].HFEMEnergyFraction());
2332  }
2333  }
2334  mChargedHadronEnergy = map_of_MEs[DirName+"/"+"ChargedHadronEnergy"]; if (mChargedHadronEnergy && mChargedHadronEnergy->getRootObject()) mChargedHadronEnergy->Fill ((*pfJets)[ijet].chargedHadronEnergy());
2335  mNeutralHadronEnergy = map_of_MEs[DirName+"/"+"NeutralHadronEnergy"]; if (mNeutralHadronEnergy && mNeutralHadronEnergy->getRootObject()) mNeutralHadronEnergy->Fill ((*pfJets)[ijet].neutralHadronEnergy());
2336  mChargedEmEnergy = map_of_MEs[DirName+"/"+"ChargedEmEnergy"]; if (mChargedEmEnergy && mChargedEmEnergy->getRootObject()) mChargedEmEnergy->Fill((*pfJets)[ijet].chargedEmEnergy());
2337  mChargedMuEnergy = map_of_MEs[DirName+"/"+"ChargedMuEnergy"]; if (mChargedMuEnergy && mChargedMuEnergy->getRootObject()) mChargedMuEnergy->Fill ((*pfJets)[ijet].chargedMuEnergy ());
2338  mNeutralEmEnergy = map_of_MEs[DirName+"/"+"NeutralEmEnergy"]; if (mNeutralEmEnergy && mNeutralEmEnergy->getRootObject()) mNeutralEmEnergy->Fill((*pfJets)[ijet].neutralEmEnergy());
2339  mChargedMultiplicity = map_of_MEs[DirName+"/"+"ChargedMultiplicity"]; if (mChargedMultiplicity && mChargedMultiplicity->getRootObject()) mChargedMultiplicity->Fill((*pfJets)[ijet].chargedMultiplicity());
2340  mNeutralMultiplicity = map_of_MEs[DirName+"/"+"NeutralMultiplicity"]; if (mNeutralMultiplicity && mNeutralMultiplicity->getRootObject()) mNeutralMultiplicity->Fill((*pfJets)[ijet].neutralMultiplicity());
2341  mMuonMultiplicity = map_of_MEs[DirName+"/"+"MuonMultiplicity"]; if (mMuonMultiplicity && mMuonMultiplicity->getRootObject()) mMuonMultiplicity->Fill ((*pfJets)[ijet]. muonMultiplicity());
2342  //_______________________________________________________
2343  mNeutralFraction = map_of_MEs[DirName+"/"+"NeutralConstituentsFraction"];if (mNeutralFraction && mNeutralFraction->getRootObject()) mNeutralFraction->Fill ((double)(*pfJets)[ijet].neutralMultiplicity()/(double)(*pfJets)[ijet].nConstituents());
2344  mChargedHadronEnergy_profile = map_of_MEs[DirName+"/"+"ChargedHadronEnergy_profile"]; if (mChargedHadronEnergy_profile && mChargedHadronEnergy_profile->getRootObject()) mChargedHadronEnergy_profile->Fill(numPV, (*pfJets)[ijet].chargedHadronEnergy());
2345  mNeutralHadronEnergy_profile = map_of_MEs[DirName+"/"+"NeutralHadronEnergy_profile"];if (mNeutralHadronEnergy_profile && mNeutralHadronEnergy_profile->getRootObject()) mNeutralHadronEnergy_profile->Fill(numPV, (*pfJets)[ijet].neutralHadronEnergy());
2346  mChargedEmEnergy_profile = map_of_MEs[DirName+"/"+"ChargedEmEnergy_profile"]; if (mChargedEmEnergy_profile && mChargedEmEnergy_profile->getRootObject()) mChargedEmEnergy_profile ->Fill(numPV, (*pfJets)[ijet].chargedEmEnergy());
2347  mChargedMuEnergy_profile = map_of_MEs[DirName+"/"+"ChargedMuEnergy_profile"];if (mChargedMuEnergy_profile && mChargedMuEnergy_profile->getRootObject()) mChargedMuEnergy_profile ->Fill(numPV, (*pfJets)[ijet].chargedMuEnergy ());
2348  mNeutralEmEnergy_profile = map_of_MEs[DirName+"/"+"NeutralEmEnergy_profile"];if (mNeutralEmEnergy_profile && mNeutralEmEnergy_profile->getRootObject()) mNeutralEmEnergy_profile ->Fill(numPV, (*pfJets)[ijet].neutralEmEnergy());
2349  mChargedMultiplicity_profile = map_of_MEs[DirName+"/"+"ChargedMultiplicity_profile"]; if (mChargedMultiplicity_profile && mChargedMultiplicity_profile->getRootObject()) mChargedMultiplicity_profile->Fill(numPV, (*pfJets)[ijet].chargedMultiplicity());
2350  mNeutralMultiplicity_profile = map_of_MEs[DirName+"/"+"NeutralMultiplicity_profile"];if (mNeutralMultiplicity_profile && mNeutralMultiplicity_profile->getRootObject()) mNeutralMultiplicity_profile->Fill(numPV, (*pfJets)[ijet].neutralMultiplicity());
2351  mMuonMultiplicity_profile = map_of_MEs[DirName+"/"+"MuonMultiplicity_profile"]; if (mMuonMultiplicity_profile && mMuonMultiplicity_profile->getRootObject()) mMuonMultiplicity_profile ->Fill(numPV, (*pfJets)[ijet].muonMultiplicity());
2352  }//cleaned PFJets
2353  }//PFJet specific loop
2354  //IDs have been defined by now
2355  //check here already for ordering of jets -> if we choose later to soften pt-thresholds for physics selections
2356  //compared to the default jet histograms
2357  if(pass_Z_selection){//if Z selection not passed, don't need to find out of muons and Jets are overlapping
2358  if(deltaR((*Muons)[mu_index0].eta(),(*Muons)[mu_index0].phi(),correctedJet.eta(),correctedJet.phi())>0.2 && deltaR((*Muons)[mu_index1].eta(),(*Muons)[mu_index1].phi(),correctedJet.eta(),correctedJet.phi())>0.2 ){
2359  if(correctedJet.pt()>pt1_mu_vetoed){
2360  pt2_mu_vetoed=pt1_mu_vetoed;
2361  ind2_mu_vetoed=ind1_mu_vetoed;
2362  cleaned_second_jet_mu_vetoed=cleaned_first_jet_mu_vetoed;
2363  pt1_mu_vetoed=correctedJet.pt();
2364  ind1_mu_vetoed=ijet;
2365  cleaned_first_jet_mu_vetoed=JetIDWPU;
2366  } else if(correctedJet.pt()>pt2_mu_vetoed){
2367  pt2_mu_vetoed=correctedJet.pt();
2368  ind2_mu_vetoed=ijet;
2369  cleaned_second_jet_mu_vetoed=JetIDWPU;
2370  }
2371  }
2372  }
2373 
2374  if(correctedJet.pt()>pt1){
2375  pt3=pt2;
2376  ind3=ind2;
2377  //cleaned_third_jet=cleaned_second_jet;
2378  pt2=pt1;
2379  ind2=ind1;
2380  cleaned_second_jet=cleaned_first_jet;
2381  pt1=correctedJet.pt();
2382  ind1=ijet;
2383  cleaned_first_jet=JetIDWPU;
2384  } else if(correctedJet.pt()>pt2){
2385  pt3=pt2;
2386  ind3=ind2;
2387  //cleaned_third_jet=cleaned_second_jet;
2388  pt2=correctedJet.pt();
2389  ind2=ijet;
2390  cleaned_second_jet=JetIDWPU;
2391  } else if(correctedJet.pt()>pt3){
2392  pt3=correctedJet.pt();
2393  ind3=ijet;
2394  //cleaned_third_jet=JetIDWPU;
2395  }
2396  if(!pass_corrected){
2397  continue;
2398  }
2399  //after jettype specific variables are filled -> perform histograms for all jets
2400  //fill JetID efficiencies if uncleaned selection is chosen
2401  if(!runcosmics_ && pass_corrected){
2402  if(jetpassid) {
2403  mLooseJIDPassFractionVSeta = map_of_MEs[DirName+"/"+"JetIDPassFractionVSeta"]; if (mLooseJIDPassFractionVSeta && mLooseJIDPassFractionVSeta->getRootObject()) mLooseJIDPassFractionVSeta->Fill(correctedJet.eta(),1.);
2404  mLooseJIDPassFractionVSpt = map_of_MEs[DirName+"/"+"JetIDPassFractionVSpt"]; if (mLooseJIDPassFractionVSpt && mLooseJIDPassFractionVSpt->getRootObject()) mLooseJIDPassFractionVSpt->Fill(correctedJet.pt(),1.);
2405  if(fabs(correctedJet.eta())<3.0){
2406  mLooseJIDPassFractionVSptNoHF= map_of_MEs[DirName+"/"+"JetIDPassFractionVSptNoHF"]; if (mLooseJIDPassFractionVSptNoHF && mLooseJIDPassFractionVSptNoHF->getRootObject()) mLooseJIDPassFractionVSptNoHF->Fill(correctedJet.pt(),1.);
2407  }
2408  } else {
2409  mLooseJIDPassFractionVSeta = map_of_MEs[DirName+"/"+"JetIDPassFractionVSeta"]; if (mLooseJIDPassFractionVSeta && mLooseJIDPassFractionVSeta->getRootObject()) mLooseJIDPassFractionVSeta->Fill(correctedJet.eta(),0.);
2410  mLooseJIDPassFractionVSpt = map_of_MEs[DirName+"/"+"JetIDPassFractionVSpt"]; if (mLooseJIDPassFractionVSpt && mLooseJIDPassFractionVSpt->getRootObject()) mLooseJIDPassFractionVSpt->Fill(correctedJet.pt(),0.);
2411  if(fabs(correctedJet.eta())<3.0){
2412  mLooseJIDPassFractionVSptNoHF= map_of_MEs[DirName+"/"+"JetIDPassFractionVSptNoHF"]; if (mLooseJIDPassFractionVSptNoHF && mLooseJIDPassFractionVSptNoHF->getRootObject()) mLooseJIDPassFractionVSptNoHF->Fill(correctedJet.pt(),0.);
2413  }
2414  }
2415  }
2416  //here we so far consider calojets ->check for PFJets and JPT jets again
2417  if(Thiscleaned && pass_corrected){//might be softer than loose jet ID
2418  numofjets++;
2419  if(isCaloJet_){
2420  jetME = map_of_MEs[DirName+"/"+"jetReco"]; if(jetME && jetME->getRootObject()) jetME->Fill(1);
2421  mJetEnergyCorr = map_of_MEs[DirName+"/"+"JetEnergyCorr"]; if(mJetEnergyCorr && mJetEnergyCorr->getRootObject()) mJetEnergyCorr->Fill(correctedJet.pt()/(*caloJets)[ijet].pt());
2422  mJetEnergyCorrVSEta = map_of_MEs[DirName+"/"+"JetEnergyCorrVSEta"]; if(mJetEnergyCorrVSEta && mJetEnergyCorrVSEta->getRootObject()) mJetEnergyCorrVSEta->Fill(correctedJet.eta(),correctedJet.pt()/(*caloJets)[ijet].pt());
2423  mJetEnergyCorrVSPt = map_of_MEs[DirName+"/"+"JetEnergyCorrVSPt"]; if(mJetEnergyCorrVSPt && mJetEnergyCorrVSPt->getRootObject()) mJetEnergyCorrVSPt->Fill(correctedJet.pt(),correctedJet.pt()/(*caloJets)[ijet].pt());
2424  }
2425  if(isPFJet_){
2426  jetME = map_of_MEs[DirName+"/"+"jetReco"]; if(jetME && jetME->getRootObject()) jetME->Fill(2);
2427  mJetEnergyCorr = map_of_MEs[DirName+"/"+"JetEnergyCorr"]; if(mJetEnergyCorr && mJetEnergyCorr->getRootObject()) mJetEnergyCorr->Fill(correctedJet.pt()/(*pfJets)[ijet].pt());
2428  mJetEnergyCorrVSEta = map_of_MEs[DirName+"/"+"JetEnergyCorrVSEta"]; if(mJetEnergyCorrVSEta && mJetEnergyCorrVSEta->getRootObject())mJetEnergyCorrVSEta->Fill(correctedJet.eta(),correctedJet.pt()/(*pfJets)[ijet].pt());
2429  mJetEnergyCorrVSPt = map_of_MEs[DirName+"/"+"JetEnergyCorrVSPt"]; if(mJetEnergyCorrVSPt && mJetEnergyCorrVSPt->getRootObject()) mJetEnergyCorrVSPt->Fill(correctedJet.pt(),correctedJet.pt()/(*pfJets)[ijet].pt());
2430  }
2431  if(isMiniAODJet_){
2432  jetME = map_of_MEs[DirName+"/"+"jetReco"]; if(jetME && jetME->getRootObject()) jetME->Fill(4);
2433  mJetEnergyCorr = map_of_MEs[DirName+"/"+"JetEnergyCorr"]; if(mJetEnergyCorr && mJetEnergyCorr->getRootObject()) mJetEnergyCorr->Fill(1./(*patJets)[ijet].jecFactor("Uncorrected"));
2434  mJetEnergyCorrVSEta = map_of_MEs[DirName+"/"+"JetEnergyCorrVSEta"]; if(mJetEnergyCorrVSEta && mJetEnergyCorrVSEta->getRootObject())mJetEnergyCorrVSEta->Fill(correctedJet.eta(),1./(*patJets)[ijet].jecFactor("Uncorrected"));
2435  mJetEnergyCorrVSPt = map_of_MEs[DirName+"/"+"JetEnergyCorrVSPt"]; if(mJetEnergyCorrVSPt && mJetEnergyCorrVSPt->getRootObject()) mJetEnergyCorrVSPt->Fill(correctedJet.pt(),1./(*patJets)[ijet].jecFactor("Uncorrected"));
2436  }
2437  // --- Event passed the low pt jet trigger
2438  if (jetLoPass_ == 1) {
2439  mPhi_Lo = map_of_MEs[DirName+"/"+"Phi_Lo"]; if (mPhi_Lo && mPhi_Lo->getRootObject()) mPhi_Lo->Fill (correctedJet.phi());
2440  mPt_Lo = map_of_MEs[DirName+"/"+"Pt_Lo"]; if (mPt_Lo && mPt_Lo->getRootObject()) mPt_Lo->Fill (correctedJet.pt());
2441 
2442  }
2443  // --- Event passed the high pt jet trigger
2444  if (jetHiPass_ == 1&& correctedJet.pt()>100. ) {
2445  mEta_Hi = map_of_MEs[DirName+"/"+"Eta_Hi"]; if (mEta_Hi && mEta_Hi->getRootObject()) mEta_Hi->Fill (correctedJet.eta());
2446  mPhi_Hi = map_of_MEs[DirName+"/"+"Phi_Hi"]; if (mPhi_Hi && mPhi_Hi->getRootObject()) mPhi_Hi->Fill (correctedJet.phi());
2447  mPt_Hi = map_of_MEs[DirName+"/"+"Pt_Hi"]; if (mPt_Hi && mPt_Hi->getRootObject()) mPt_Hi->Fill (correctedJet.pt());
2448  }
2449  mPt = map_of_MEs[DirName+"/"+"Pt"]; if (mPt && mPt->getRootObject()) mPt->Fill (correctedJet.pt());
2450  mPt_1 = map_of_MEs[DirName+"/"+"Pt_1"]; if (mPt_1 && mPt_1->getRootObject()) mPt_1->Fill (correctedJet.pt());
2451  mPt_2 = map_of_MEs[DirName+"/"+"Pt_2"]; if (mPt_2 && mPt_2->getRootObject()) mPt_2->Fill (correctedJet.pt());
2452  mPt_3 = map_of_MEs[DirName+"/"+"Pt_3"]; if (mPt_3 && mPt_3->getRootObject()) mPt_3->Fill (correctedJet.pt());
2453  mEta = map_of_MEs[DirName+"/"+"Eta"]; if (mEta && mEta->getRootObject()) mEta->Fill (correctedJet.eta());
2454  mPhi = map_of_MEs[DirName+"/"+"Phi"]; if (mPhi && mPhi->getRootObject()) mPhi->Fill (correctedJet.phi());
2455 
2456  mPhiVSEta = map_of_MEs[DirName+"/"+"PhiVSEta"]; if (mPhiVSEta && mPhiVSEta->getRootObject()) mPhiVSEta->Fill(correctedJet.eta(),correctedJet.phi());
2457  //if(!isJPTJet_){
2458  mConstituents = map_of_MEs[DirName+"/"+"Constituents"]; if (mConstituents && mConstituents->getRootObject()) mConstituents->Fill (correctedJet.nConstituents());
2459  //}
2460  // Fill NPV profiles
2461  //--------------------------------------------------------------------
2462  mPt_profile = map_of_MEs[DirName+"/"+"Pt_profile"]; if (mPt_profile && mPt_profile->getRootObject()) mPt_profile ->Fill(numPV, correctedJet.pt());
2463  mEta_profile = map_of_MEs[DirName+"/"+"Eta_profile"]; if (mEta_profile && mEta_profile->getRootObject()) mEta_profile ->Fill(numPV, correctedJet.eta());
2464  mPhi_profile = map_of_MEs[DirName+"/"+"Phi_profile"]; if (mPhi_profile && mPhi_profile->getRootObject()) mPhi_profile ->Fill(numPV, correctedJet.phi());
2465  //if(!isJPTJet_){
2466  mConstituents_profile = map_of_MEs[DirName+"/"+"Constituents_profile"]; if (mConstituents_profile && mConstituents_profile->getRootObject()) mConstituents_profile->Fill(numPV, correctedJet.nConstituents());
2467  //}
2468  if (fabs(correctedJet.eta()) <= 1.3) {
2469  mPt_Barrel = map_of_MEs[DirName+"/"+"Pt_Barrel"]; if (mPt_Barrel && mPt_Barrel->getRootObject()) mPt_Barrel->Fill (correctedJet.pt());
2470  mPhi_Barrel = map_of_MEs[DirName+"/"+"Phi_Barrel"]; if (mPhi_Barrel && mPhi_Barrel->getRootObject()) mPhi_Barrel->Fill (correctedJet.phi());
2471  //if (mE_Barrel) mE_Barrel->Fill (correctedJet.energy());
2472  //if(!isJPTJet_){
2473  mConstituents_Barrel = map_of_MEs[DirName+"/"+"Constituents_Barrel"]; if (mConstituents_Barrel && mConstituents_Barrel->getRootObject()) mConstituents_Barrel->Fill(correctedJet.nConstituents());
2474  //}
2475  }else if (fabs(correctedJet.eta()) <= 3) {
2476  mPt_EndCap = map_of_MEs[DirName+"/"+"Pt_EndCap"]; if (mPt_EndCap && mPt_EndCap->getRootObject()) mPt_EndCap->Fill (correctedJet.pt());
2477  mPhi_EndCap = map_of_MEs[DirName+"/"+"Phi_EndCap"]; if (mPhi_EndCap && mPhi_EndCap->getRootObject()) mPhi_EndCap->Fill (correctedJet.phi());
2478  //if (mE_EndCap) mE_EndCap->Fill (correctedJet.energy());
2479  //if(!isJPTJet_){
2480  mConstituents_EndCap = map_of_MEs[DirName+"/"+"Constituents_EndCap"]; if (mConstituents_EndCap && mConstituents_EndCap->getRootObject()) mConstituents_EndCap->Fill(correctedJet.nConstituents());
2481  //}
2482  }else{
2483  mPt_Forward = map_of_MEs[DirName+"/"+"Pt_Forward"]; if (mPt_Forward && mPt_Forward->getRootObject()) mPt_Forward->Fill (correctedJet.pt());
2484  mPhi_Forward = map_of_MEs[DirName+"/"+"Phi_Forward"]; if (mPhi_Forward && mPhi_Forward->getRootObject()) mPhi_Forward->Fill (correctedJet.phi());
2485  //if (mE_Forward) mE_Forward->Fill (correctedJet.energy());
2486  //if(!isJPTJet_){
2487  mConstituents_Forward = map_of_MEs[DirName+"/"+"Constituents_Forward"]; if (mConstituents_Forward && mConstituents_Forward->getRootObject()) mConstituents_Forward->Fill(correctedJet.nConstituents());
2488  //}
2489  }
2490  }// pass ID for corrected jets --> inclusive selection
2491  }//loop over uncorrected jets
2492 
2493 
2494  mNJets = map_of_MEs[DirName+"/"+"NJets"]; if (mNJets && mNJets->getRootObject()) mNJets->Fill (numofjets);
2495  mNJets_profile = map_of_MEs[DirName+"/"+"NJets_profile"]; if (mNJets_profile && mNJets_profile->getRootObject()) mNJets_profile->Fill(numPV, numofjets);
2496 
2497  sort(recoJets.begin(),recoJets.end(),jetSortingRule);
2498 
2499  //for non dijet selection, otherwise numofjets==0
2500  if(numofjets>0){//keep threshold for dijet counting at the original one
2501  //check ID of the leading jet
2502 
2503  if(cleaned_first_jet){
2504  mEtaFirst = map_of_MEs[DirName+"/"+"EtaFirst"]; if (mEtaFirst && mEtaFirst->getRootObject()) mEtaFirst->Fill ((recoJets)[0].eta());
2505  mPhiFirst = map_of_MEs[DirName+"/"+"PhiFirst"]; if (mPhiFirst && mPhiFirst->getRootObject()) mPhiFirst->Fill ((recoJets)[0].phi());
2506  mPtFirst = map_of_MEs[DirName+"/"+"PtFirst"]; if (mPtFirst && mPtFirst->getRootObject()) mPtFirst->Fill ((recoJets)[0].pt());
2507  //check ID of second check for DPhi plots
2508  if(numofjets>1 && cleaned_second_jet) {
2509  double dphi=fabs((recoJets)[0].phi()-(recoJets)[1].phi());
2510  if(dphi>acos(-1.)){
2511  dphi=2*acos(-1.)-dphi;
2512  }
2513  mDPhi = map_of_MEs[DirName+"/"+"DPhi"]; if (mDPhi && mDPhi->getRootObject()) mDPhi->Fill (dphi);
2514  }
2515  }
2516  //if(cleaned_second_jet && isJPTJet_){
2517  //mPtSecond = map_of_MEs[DirName+"/"+"PtSecond"]; if (mPtSecond && mPtSecond->getRootObject()) mPtSecond->Fill(recoJets[1].pt());
2518  //}
2519  //if(cleaned_third_jet && isJPTJet_){
2520  //mPtThird = map_of_MEs[DirName+"/"+"PtThird"]; if (mPtThird && mPtThird->getRootObject()) mPtThird->Fill(recoJets[2].pt());
2521  //}
2522  }
2523  //dijet selection -> recoJets are on corrected level, both jets cleaned, fill folder only for cleaned jet selection
2524  if(jetCleaningFlag_ && recoJets.size()>1 && cleaned_first_jet && cleaned_second_jet ){
2525  //pt threshold checked before filling
2526  if(jetCleaningFlag_){
2527  DirName = "JetMET/Jet/Cleaned"+mInputCollection_.label()+"/DiJet";
2528  }
2529  //if(fabs(recoJets[0].eta())<3. && fabs(recoJets[1].eta())<3. ){
2530  //calculate dphi
2531  double dphi=fabs((recoJets)[0].phi()-(recoJets)[1].phi());
2532  if(dphi>acos(-1.)){
2533  dphi=2*acos(-1.)-dphi;
2534  }
2535  mDPhi = map_of_MEs[DirName+"/"+"DPhi"]; if (mDPhi && mDPhi->getRootObject()) if (mDPhi) mDPhi->Fill (dphi);
2536  //dphi cut
2537  if(fabs(dphi)>2.1){
2538  if(isCaloJet_){
2539  if(!runcosmics_){
2540  reco::CaloJetRef calojetref1(caloJets, ind1);
2541  reco::JetID jetID1 = (*jetID_ValueMap_Handle)[calojetref1];
2542  reco::CaloJetRef calojetref2(caloJets, ind2);
2543  reco::JetID jetID2 = (*jetID_ValueMap_Handle)[calojetref2];
2544  mN90Hits = map_of_MEs[DirName+"/"+"N90Hits"]; if (mN90Hits && mN90Hits->getRootObject()) mN90Hits->Fill (jetID1.n90Hits);
2545  mfHPD = map_of_MEs[DirName+"/"+"fHPD"]; if (mfHPD && mfHPD->getRootObject()) mfHPD->Fill (jetID1.fHPD);
2546  mresEMF = map_of_MEs[DirName+"/"+"resEMF"]; if (mresEMF && mresEMF->getRootObject()) mresEMF->Fill (jetID1.restrictedEMF);
2547  mfRBX = map_of_MEs[DirName+"/"+"fRBX"]; if (mfRBX && mfRBX->getRootObject()) mfRBX->Fill (jetID1.fRBX);
2548  mN90Hits = map_of_MEs[DirName+"/"+"N90Hits"]; if (mN90Hits && mN90Hits->getRootObject()) mN90Hits->Fill (jetID2.n90Hits);
2549  mfHPD = map_of_MEs[DirName+"/"+"fHPD"]; if (mfHPD && mfHPD->getRootObject()) mfHPD->Fill (jetID2.fHPD);
2550  mresEMF = map_of_MEs[DirName+"/"+"resEMF"]; if (mresEMF && mresEMF->getRootObject()) mresEMF->Fill (jetID2.restrictedEMF);
2551  mfRBX = map_of_MEs[DirName+"/"+"fRBX"]; if (mfRBX && mfRBX->getRootObject()) mfRBX->Fill (jetID2.fRBX);
2552  }
2553  mHFrac = map_of_MEs[DirName+"/"+"HFrac"]; if (mHFrac && mHFrac->getRootObject()) mHFrac->Fill ((*caloJets)[ind1].energyFractionHadronic());
2554  mEFrac = map_of_MEs[DirName+"/"+"EFrac"]; if (mEFrac && mHFrac->getRootObject()) mEFrac->Fill ((*caloJets)[ind1].emEnergyFraction());
2555  mHFrac = map_of_MEs[DirName+"/"+"HFrac"]; if (mHFrac && mHFrac->getRootObject()) mHFrac->Fill ((*caloJets)[ind2].energyFractionHadronic());
2556  mEFrac = map_of_MEs[DirName+"/"+"EFrac"]; if (mEFrac && mHFrac->getRootObject()) mEFrac->Fill ((*caloJets)[ind2].emEnergyFraction());
2557  mHFrac_profile = map_of_MEs[DirName+"/"+"HFrac_profile"]; if (mHFrac_profile && mHFrac_profile->getRootObject()) mHFrac_profile ->Fill(numPV, (*caloJets)[ind1].energyFractionHadronic());
2558  mEFrac_profile = map_of_MEs[DirName+"/"+"EFrac_profile"]; if (mEFrac_profile && mEFrac_profile->getRootObject()) mEFrac_profile ->Fill(numPV, (*caloJets)[ind1].emEnergyFraction());
2559  mHFrac_profile = map_of_MEs[DirName+"/"+"HFrac_profile"]; if (mHFrac_profile && mHFrac_profile->getRootObject()) mHFrac_profile ->Fill(numPV, (*caloJets)[ind2].energyFractionHadronic());
2560  mEFrac_profile = map_of_MEs[DirName+"/"+"EFrac_profile"]; if (mEFrac_profile && mEFrac_profile->getRootObject()) mEFrac_profile ->Fill(numPV, (*caloJets)[ind2].emEnergyFraction());
2561 
2562  mJetEnergyCorr = map_of_MEs[DirName+"/"+"JetEnergyCorr"]; if(mJetEnergyCorr && mJetEnergyCorr->getRootObject()) mJetEnergyCorr->Fill(recoJets[0].pt()/(*caloJets)[ind1].pt());
2563  mJetEnergyCorrVSEta = map_of_MEs[DirName+"/"+"JetEnergyCorrVSEta"]; if(mJetEnergyCorrVSEta && mJetEnergyCorrVSEta->getRootObject()) mJetEnergyCorrVSEta->Fill(recoJets[0].eta(),recoJets[0].pt()/(*caloJets)[ind1].pt());
2564  mJetEnergyCorrVSPt = map_of_MEs[DirName+"/"+"JetEnergyCorrVSPt"]; if(mJetEnergyCorrVSPt && mJetEnergyCorrVSPt->getRootObject()) mJetEnergyCorrVSPt->Fill(recoJets[0].pt(),recoJets[0].pt()/(*caloJets)[ind1].pt());
2565  mJetEnergyCorr = map_of_MEs[DirName+"/"+"JetEnergyCorr"]; if(mJetEnergyCorr && mJetEnergyCorr->getRootObject()) mJetEnergyCorr->Fill(recoJets[1].pt()/(*caloJets)[ind2].pt());
2566  mJetEnergyCorrVSEta = map_of_MEs[DirName+"/"+"JetEnergyCorrVSEta"]; if(mJetEnergyCorrVSEta && mJetEnergyCorrVSEta->getRootObject()) mJetEnergyCorrVSEta->Fill(recoJets[1].eta(),recoJets[1].pt()/(*caloJets)[ind2].pt());
2567  mJetEnergyCorrVSPt = map_of_MEs[DirName+"/"+"JetEnergyCorrVSPt"]; if(mJetEnergyCorrVSPt && mJetEnergyCorrVSPt->getRootObject()) mJetEnergyCorrVSPt->Fill(recoJets[1].pt(),recoJets[1].pt()/(*caloJets)[ind2].pt());
2568  }
2569  //if(isJPTJet_){
2570  //mHFrac = map_of_MEs[DirName+"/"+"HFrac"]; if (mHFrac && mHFrac->getRootObject()) mHFrac->Fill ((*jptJets)[ind1].chargedHadronEnergyFraction()+(*jptJets)[ind1].neutralHadronEnergyFraction());
2571  //mEFrac = map_of_MEs[DirName+"/"+"EFrac"]; if (mEFrac && mHFrac->getRootObject()) mEFrac->Fill (1.-(*jptJets)[ind1].chargedHadronEnergyFraction()-(*jptJets)[ind1].neutralHadronEnergyFraction());
2572  //mHFrac_profile = map_of_MEs[DirName+"/"+"HFrac_profile"]; mHFrac_profile ->Fill(numPV, (*jptJets)[ind1].chargedHadronEnergyFraction()+(*jptJets)[ind1].neutralHadronEnergyFraction());
2573  //mEFrac_profile = map_of_MEs[DirName+"/"+"EFrac_profile"]; mEFrac_profile ->Fill(numPV, 1.-(*jptJets)[ind1].chargedHadronEnergyFraction()-(*jptJets)[ind1].neutralHadronEnergyFraction());
2574  //mHFrac = map_of_MEs[DirName+"/"+"HFrac"]; if (mHFrac && mHFrac->getRootObject()) mHFrac->Fill ((*jptJets)[ind2].chargedHadronEnergyFraction()+(*jptJets)[ind2].neutralHadronEnergyFraction());
2575  //mEFrac = map_of_MEs[DirName+"/"+"EFrac"]; if (mEFrac && mHFrac->getRootObject()) mEFrac->Fill (1.-(*jptJets)[ind2].chargedHadronEnergyFraction()-(*jptJets)[ind2].neutralHadronEnergyFraction());
2576  //mHFrac_profile = map_of_MEs[DirName+"/"+"HFrac_profile"]; mHFrac_profile ->Fill(numPV, (*jptJets)[ind2].chargedHadronEnergyFraction()+(*jptJets)[ind2].neutralHadronEnergyFraction());
2577  //mEFrac_profile = map_of_MEs[DirName+"/"+"EFrac_profile"]; mEFrac_profile ->Fill(numPV, 1.-(*jptJets)[ind2].chargedHadronEnergyFraction()-(*jptJets)[ind2].neutralHadronEnergyFraction());
2578  //
2579  //mJetEnergyCorr = map_of_MEs[DirName+"/"+"JetEnergyCorr"]; if(mJetEnergyCorr && mJetEnergyCorr->getRootObject()) mJetEnergyCorr->Fill(recoJets[0].pt()/(*jptJets)[ind1].pt());
2580  //mJetEnergyCorrVSEta = map_of_MEs[DirName+"/"+"JetEnergyCorrVSEta"]; if(mJetEnergyCorrVSEta && mJetEnergyCorrVSEta->getRootObject()) mJetEnergyCorrVSEta->Fill(recoJets[0].eta(),recoJets[0].pt()/(*jptJets)[ind1].pt());
2581  //mJetEnergyCorrVSPt = map_of_MEs[DirName+"/"+"JetEnergyCorrVSPt"]; if(mJetEnergyCorrVSPt && mJetEnergyCorrVSPt->getRootObject()) mJetEnergyCorrVSPt->Fill(recoJets[0].pt(),recoJets[0].pt()/(*jptJets)[ind1].pt());
2582  //mJetEnergyCorr = map_of_MEs[DirName+"/"+"JetEnergyCorr"]; if(mJetEnergyCorr && mJetEnergyCorr->getRootObject()) mJetEnergyCorr->Fill(recoJets[1].pt()/(*jptJets)[ind2].pt());
2583  //mJetEnergyCorrVSEta = map_of_MEs[DirName+"/"+"JetEnergyCorrVSEta"]; if(mJetEnergyCorrVSEta && mJetEnergyCorrVSEta->getRootObject()) mJetEnergyCorrVSEta->Fill(recoJets[1].eta(),recoJets[1].pt()/(*jptJets)[ind2].pt());
2584  //mJetEnergyCorrVSPt = map_of_MEs[DirName+"/"+"JetEnergyCorrVSPt"]; if(mJetEnergyCorrVSPt && mJetEnergyCorrVSPt->getRootObject()) mJetEnergyCorrVSPt->Fill(recoJets[1].pt(),recoJets[1].pt()/(*jptJets)[ind2].pt());
2585  //}
2586  if(isPFJet_){
2587  mCHFrac = map_of_MEs[DirName+"/"+"CHFrac"]; if (mCHFrac && mCHFrac->getRootObject()) mCHFrac ->Fill((*pfJets)[ind1].chargedHadronEnergyFraction());
2588  mNHFrac = map_of_MEs[DirName+"/"+"NHFrac"]; if (mNHFrac && mNHFrac->getRootObject()) mNHFrac ->Fill((*pfJets)[ind1].neutralHadronEnergyFraction());
2589  mPhFrac = map_of_MEs[DirName+"/"+"PhFrac"]; if (mPhFrac && mPhFrac->getRootObject()) mPhFrac ->Fill((*pfJets)[ind1].neutralEmEnergyFraction());
2590  mHFEMFrac = map_of_MEs[DirName+"/"+"HFEMFrac"]; if (mHFEMFrac && mHFEMFrac->getRootObject()) mHFEMFrac ->Fill((*pfJets)[ind1].HFEMEnergyFraction());
2591  mHFHFrac = map_of_MEs[DirName+"/"+"HFHFrac"]; if (mHFHFrac && mHFHFrac->getRootObject()) mHFHFrac ->Fill((*pfJets)[ind1].HFHadronEnergyFraction());
2592 
2593  mJetEnergyCorr = map_of_MEs[DirName+"/"+"JetEnergyCorr"]; if(mJetEnergyCorr && mJetEnergyCorr->getRootObject()) mJetEnergyCorr->Fill(recoJets[0].pt()/(*pfJets)[ind1].pt());
2594  mJetEnergyCorrVSEta = map_of_MEs[DirName+"/"+"JetEnergyCorrVSEta"]; if(mJetEnergyCorrVSEta && mJetEnergyCorrVSEta->getRootObject()) mJetEnergyCorrVSEta->Fill(recoJets[0].eta(),recoJets[0].pt()/(*pfJets)[ind1].pt());
2595  mJetEnergyCorrVSPt = map_of_MEs[DirName+"/"+"JetEnergyCorrVSPt"]; if(mJetEnergyCorrVSPt && mJetEnergyCorrVSPt->getRootObject()) mJetEnergyCorrVSPt->Fill(recoJets[0].pt(),recoJets[0].pt()/(*pfJets)[ind1].pt());
2596  mJetEnergyCorr = map_of_MEs[DirName+"/"+"JetEnergyCorr"]; if(mJetEnergyCorr && mJetEnergyCorr->getRootObject()) mJetEnergyCorr->Fill(recoJets[1].pt()/(*pfJets)[ind2].pt());
2597  mJetEnergyCorrVSEta = map_of_MEs[DirName+"/"+"JetEnergyCorrVSEta"]; if(mJetEnergyCorrVSEta && mJetEnergyCorrVSEta->getRootObject()) mJetEnergyCorrVSEta->Fill(recoJets[1].eta(),recoJets[1].pt()/(*pfJets)[ind2].pt());
2598  mJetEnergyCorrVSPt = map_of_MEs[DirName+"/"+"JetEnergyCorrVSPt"]; if(mJetEnergyCorrVSPt && mJetEnergyCorrVSPt->getRootObject()) mJetEnergyCorrVSPt->Fill(recoJets[1].pt(),recoJets[1].pt()/(*pfJets)[ind2].pt());
2599 
2600  mChargedMultiplicity = map_of_MEs[DirName+"/"+"ChargedMultiplicity"]; if(mChargedMultiplicity && mChargedMultiplicity->getRootObject()) mChargedMultiplicity->Fill((*pfJets)[ind1].chargedMultiplicity());
2601  mNeutralMultiplicity = map_of_MEs[DirName+"/"+"NeutralMultiplicity"]; if(mNeutralMultiplicity && mNeutralMultiplicity->getRootObject()) mNeutralMultiplicity->Fill((*pfJets)[ind1].neutralMultiplicity());
2602  mMuonMultiplicity = map_of_MEs[DirName+"/"+"MuonMultiplicity"]; if(mMuonMultiplicity && mMuonMultiplicity->getRootObject()) mMuonMultiplicity->Fill((*pfJets)[ind1].muonMultiplicity());
2603  //Filling variables for second jet
2604  mCHFrac = map_of_MEs[DirName+"/"+"CHFrac"]; if (mCHFrac && mCHFrac->getRootObject()) mCHFrac ->Fill((*pfJets)[ind2].chargedHadronEnergyFraction());
2605  mNHFrac = map_of_MEs[DirName+"/"+"NHFrac"]; if (mNHFrac && mNHFrac->getRootObject()) mNHFrac ->Fill((*pfJets)[ind2].neutralHadronEnergyFraction());
2606  mPhFrac = map_of_MEs[DirName+"/"+"PhFrac"]; if (mPhFrac && mPhFrac->getRootObject()) mPhFrac ->Fill((*pfJets)[ind2].neutralEmEnergyFraction());
2607  mHFEMFrac = map_of_MEs[DirName+"/"+"HFEMFrac"]; if (mHFEMFrac && mHFEMFrac->getRootObject()) mHFEMFrac ->Fill((*pfJets)[ind2].HFEMEnergyFraction());
2608  mHFHFrac = map_of_MEs[DirName+"/"+"HFHFrac"]; if (mHFHFrac && mHFHFrac->getRootObject()) mHFHFrac ->Fill((*pfJets)[ind2].HFHadronEnergyFraction());
2609 
2610  mNeutralFraction = map_of_MEs[DirName+"/"+"NeutralConstituentsFraction"];if (mNeutralFraction && mNeutralFraction->getRootObject()) mNeutralFraction->Fill ((double)(*pfJets)[ind1].neutralMultiplicity()/(double)(*pfJets)[ind1].nConstituents());
2611 
2612  mChargedMultiplicity = map_of_MEs[DirName+"/"+"ChargedMultiplicity"]; if(mChargedMultiplicity && mChargedMultiplicity->getRootObject()) mChargedMultiplicity->Fill((*pfJets)[ind2].chargedMultiplicity());
2613  mNeutralMultiplicity = map_of_MEs[DirName+"/"+"NeutralMultiplicity"]; if(mNeutralMultiplicity && mNeutralMultiplicity->getRootObject()) mNeutralMultiplicity->Fill((*pfJets)[ind2].neutralMultiplicity());
2614  mMuonMultiplicity = map_of_MEs[DirName+"/"+"MuonMultiplicity"]; if(mMuonMultiplicity && mMuonMultiplicity->getRootObject()) mMuonMultiplicity->Fill((*pfJets)[ind2].muonMultiplicity());
2615 
2616  //now fill PFJet profiles for leading jet
2617  mCHFrac_profile = map_of_MEs[DirName+"/"+"CHFrac_profile"]; if (mCHFrac_profile && mCHFrac_profile->getRootObject()) mCHFrac_profile ->Fill(numPV, (*pfJets)[ind1].chargedHadronEnergyFraction());
2618  mNHFrac_profile = map_of_MEs[DirName+"/"+"NHFrac_profile"]; if (mNHFrac_profile && mNHFrac_profile->getRootObject()) mNHFrac_profile ->Fill(numPV, (*pfJets)[ind1].neutralHadronEnergyFraction());
2619  mPhFrac_profile = map_of_MEs[DirName+"/"+"PhFrac_profile"]; if (mPhFrac_profile && mPhFrac_profile->getRootObject()) mPhFrac_profile ->Fill(numPV, (*pfJets)[ind1].neutralEmEnergyFraction());
2620  mHFEMFrac_profile = map_of_MEs[DirName+"/"+"HFEMFrac_profile"]; if (mHFEMFrac_profile && mHFEMFrac_profile->getRootObject()) mHFEMFrac_profile ->Fill(numPV, (*pfJets)[ind1].HFEMEnergyFraction());
2621  mHFHFrac_profile = map_of_MEs[DirName+"/"+"HFHFrac_profile"]; if (mHFHFrac_profile && mHFHFrac_profile->getRootObject()) mHFHFrac_profile ->Fill(numPV, (*pfJets)[ind1].HFHadronEnergyFraction());
2622 
2623  mNeutralFraction = map_of_MEs[DirName+"/"+"NeutralConstituentsFraction"];if (mNeutralFraction && mNeutralFraction->getRootObject()) mNeutralFraction->Fill ((double)(*pfJets)[ind2].neutralMultiplicity()/(double)(*pfJets)[ind2].nConstituents());
2624 
2625  mChargedMultiplicity_profile = map_of_MEs[DirName+"/"+"ChargedMultiplicity_profile"]; if(mChargedMultiplicity_profile && mChargedMultiplicity_profile->getRootObject()) mChargedMultiplicity_profile->Fill(numPV, (*pfJets)[ind1].chargedMultiplicity());
2626  mNeutralMultiplicity_profile = map_of_MEs[DirName+"/"+"NeutralMultiplicity_profile"]; if(mNeutralMultiplicity_profile && mNeutralMultiplicity_profile->getRootObject()) mNeutralMultiplicity_profile->Fill(numPV, (*pfJets)[ind1].neutralMultiplicity());
2627  mMuonMultiplicity_profile = map_of_MEs[DirName+"/"+"MuonMultiplicity_profile"]; if(mMuonMultiplicity_profile && mMuonMultiplicity_profile->getRootObject()) mMuonMultiplicity->Fill(numPV, (*pfJets)[ind1].muonMultiplicity());
2628  //now fill PFJet profiles for second leading jet
2629  mCHFrac_profile = map_of_MEs[DirName+"/"+"CHFrac_profile"]; if (mCHFrac_profile && mCHFrac_profile->getRootObject()) mCHFrac_profile ->Fill(numPV, (*pfJets)[ind2].chargedHadronEnergyFraction());
2630  mNHFrac_profile = map_of_MEs[DirName+"/"+"NHFrac_profile"]; if (mNHFrac_profile && mNHFrac_profile->getRootObject()) mNHFrac_profile ->Fill(numPV, (*pfJets)[ind2].neutralHadronEnergyFraction());
2631  mPhFrac_profile = map_of_MEs[DirName+"/"+"PhFrac_profile"]; if (mPhFrac_profile && mPhFrac_profile->getRootObject()) mPhFrac_profile ->Fill(numPV, (*pfJets)[ind2].neutralEmEnergyFraction());
2632  mHFEMFrac_profile = map_of_MEs[DirName+"/"+"HFEMFrac_profile"]; if (mHFEMFrac_profile && mHFEMFrac_profile->getRootObject()) mHFEMFrac_profile ->Fill(numPV, (*pfJets)[ind2].HFEMEnergyFraction());
2633  mHFHFrac_profile = map_of_MEs[DirName+"/"+"HFHFrac_profile"]; if (mHFHFrac_profile && mHFHFrac_profile->getRootObject()) mHFHFrac_profile ->Fill(numPV, (*pfJets)[ind2].HFHadronEnergyFraction());
2634 
2635  mChargedMultiplicity_profile = map_of_MEs[DirName+"/"+"ChargedMultiplicity_profile"]; if(mChargedMultiplicity_profile && mChargedMultiplicity_profile->getRootObject()) mChargedMultiplicity_profile->Fill(numPV, (*pfJets)[ind2].chargedMultiplicity());
2636  mNeutralMultiplicity_profile = map_of_MEs[DirName+"/"+"NeutralMultiplicity_profile"]; if(mNeutralMultiplicity_profile && mNeutralMultiplicity_profile->getRootObject()) mNeutralMultiplicity_profile->Fill(numPV, (*pfJets)[ind2].neutralMultiplicity());
2637  mMuonMultiplicity_profile = map_of_MEs[DirName+"/"+"MuonMultiplicity_profile"]; if(mMuonMultiplicity_profile && mMuonMultiplicity_profile->getRootObject()) mMuonMultiplicity_profile->Fill(numPV, (*pfJets)[ind2].muonMultiplicity());
2638 
2639 
2640  int QGmulti=-1;
2641  float QGLikelihood=-10;
2642  float QGptD=-10;
2643  float QGaxis2=-10;
2644  if(fill_CHS_histos){
2645  reco::PFJetRef pfjetref(pfJets,ind1);
2646  QGmulti=(*qgMultiplicity)[pfjetref];
2647  QGLikelihood=(*qgLikelihood)[pfjetref];
2648  QGptD=(*qgptD)[pfjetref];
2649  QGaxis2=(*qgaxis2)[pfjetref];
2650  if(fabs(recoJets[0].eta())<1.3){//barrel jets
2651  //fractions for barrel
2652  if (recoJets[0].pt()>=20. && recoJets[0].pt()<=50.) {
2653  mAxis2_lowPt_Barrel = map_of_MEs[DirName+"/"+"qg_Axis2_lowPt_Barrel"];if(mAxis2_lowPt_Barrel && mAxis2_lowPt_Barrel->getRootObject()) mAxis2_lowPt_Barrel->Fill(QGaxis2);
2654  mpTD_lowPt_Barrel = map_of_MEs[DirName+"/"+"qg_pTD_lowPt_Barrel"]; if(mpTD_lowPt_Barrel && mpTD_lowPt_Barrel->getRootObject()) mpTD_lowPt_Barrel->Fill(QGptD);
2655  mMultiplicityQG_lowPt_Barrel = map_of_MEs[DirName+"/"+"qg_multiplicity_lowPt_Barrel"]; if(mMultiplicityQG_lowPt_Barrel && mMultiplicityQG_lowPt_Barrel->getRootObject()) mMultiplicityQG_lowPt_Barrel->Fill(QGmulti);
2656  mqgLikelihood_lowPt_Barrel = map_of_MEs[DirName+"/"+"qg_Likelihood_lowPt_Barrel"]; if(mqgLikelihood_lowPt_Barrel && mqgLikelihood_lowPt_Barrel->getRootObject()) mqgLikelihood_lowPt_Barrel->Fill(QGLikelihood);
2657  }
2658  if (recoJets[0].pt()>50. && recoJets[0].pt()<=140.) {
2659  mAxis2_mediumPt_Barrel = map_of_MEs[DirName+"/"+"qg_Axis2_mediumPt_Barrel"];if(mAxis2_mediumPt_Barrel && mAxis2_mediumPt_Barrel->getRootObject()) mAxis2_mediumPt_Barrel->Fill(QGaxis2);
2660  mpTD_mediumPt_Barrel = map_of_MEs[DirName+"/"+"qg_pTD_mediumPt_Barrel"]; if(mpTD_mediumPt_Barrel && mpTD_mediumPt_Barrel->getRootObject()) mpTD_mediumPt_Barrel->Fill(QGptD);
2661  mMultiplicityQG_mediumPt_Barrel = map_of_MEs[DirName+"/"+"qg_multiplicity_mediumPt_Barrel"]; if(mMultiplicityQG_mediumPt_Barrel && mMultiplicityQG_mediumPt_Barrel->getRootObject()) mMultiplicityQG_mediumPt_Barrel->Fill(QGmulti);
2662  mqgLikelihood_mediumPt_Barrel = map_of_MEs[DirName+"/"+"qg_Likelihood_mediumPt_Barrel"]; if(mqgLikelihood_mediumPt_Barrel && mqgLikelihood_mediumPt_Barrel->getRootObject()) mqgLikelihood_mediumPt_Barrel->Fill(QGLikelihood);
2663  }
2664  if (recoJets[0].pt()>140.) {
2665  mAxis2_highPt_Barrel = map_of_MEs[DirName+"/"+"qg_Axis2_highPt_Barrel"];if(mAxis2_highPt_Barrel && mAxis2_highPt_Barrel->getRootObject()) mAxis2_highPt_Barrel->Fill(QGaxis2);
2666  mpTD_highPt_Barrel = map_of_MEs[DirName+"/"+"qg_pTD_highPt_Barrel"]; if(mpTD_highPt_Barrel && mpTD_highPt_Barrel->getRootObject()) mpTD_highPt_Barrel->Fill(QGptD);
2667  mMultiplicityQG_highPt_Barrel = map_of_MEs[DirName+"/"+"qg_multiplicity_highPt_Barrel"]; if(mMultiplicityQG_highPt_Barrel && mMultiplicityQG_highPt_Barrel->getRootObject()) mMultiplicityQG_highPt_Barrel->Fill(QGmulti);
2668  mqgLikelihood_highPt_Barrel = map_of_MEs[DirName+"/"+"qg_Likelihood_highPt_Barrel"]; if(mqgLikelihood_highPt_Barrel && mqgLikelihood_highPt_Barrel->getRootObject()) mqgLikelihood_highPt_Barrel->Fill(QGLikelihood);
2669  }
2670  }else if(fabs(recoJets[0].eta())<3.0){//endcap jets
2671  if (recoJets[0].pt()>20. && recoJets[0].pt()<=50.) {
2672  mAxis2_lowPt_EndCap = map_of_MEs[DirName+"/"+"qg_Axis2_lowPt_EndCap"];if(mAxis2_lowPt_EndCap && mAxis2_lowPt_EndCap->getRootObject()) mAxis2_lowPt_EndCap->Fill(QGaxis2);
2673  mpTD_lowPt_EndCap = map_of_MEs[DirName+"/"+"qg_pTD_lowPt_EndCap"]; if(mpTD_lowPt_EndCap && mpTD_lowPt_EndCap->getRootObject()) mpTD_lowPt_EndCap->Fill(QGptD);
2674  mMultiplicityQG_lowPt_EndCap = map_of_MEs[DirName+"/"+"qg_multiplicity_lowPt_EndCap"]; if(mMultiplicityQG_lowPt_EndCap && mMultiplicityQG_lowPt_EndCap->getRootObject()) mMultiplicityQG_lowPt_EndCap->Fill(QGmulti);
2675  mqgLikelihood_lowPt_EndCap = map_of_MEs[DirName+"/"+"qg_Likelihood_lowPt_EndCap"]; if(mqgLikelihood_lowPt_EndCap && mqgLikelihood_lowPt_EndCap->getRootObject()) mqgLikelihood_lowPt_EndCap->Fill(QGLikelihood);
2676  }
2677  if (recoJets[0].pt()>50. && recoJets[0].pt()<=140.) {
2678  mAxis2_mediumPt_EndCap = map_of_MEs[DirName+"/"+"qg_Axis2_mediumPt_EndCap"];if(mAxis2_mediumPt_EndCap && mAxis2_mediumPt_EndCap->getRootObject()) mAxis2_mediumPt_EndCap->Fill(QGaxis2);
2679  mpTD_mediumPt_EndCap = map_of_MEs[DirName+"/"+"qg_pTD_mediumPt_EndCap"]; if(mpTD_mediumPt_EndCap && mpTD_mediumPt_EndCap->getRootObject()) mpTD_mediumPt_EndCap->Fill(QGptD);
2680  mMultiplicityQG_mediumPt_EndCap = map_of_MEs[DirName+"/"+"qg_multiplicity_mediumPt_EndCap"]; if(mMultiplicityQG_mediumPt_EndCap && mMultiplicityQG_mediumPt_EndCap->getRootObject()) mMultiplicityQG_mediumPt_EndCap->Fill(QGmulti);
2681  mqgLikelihood_mediumPt_EndCap = map_of_MEs[DirName+"/"+"qg_Likelihood_mediumPt_EndCap"]; if(mqgLikelihood_mediumPt_EndCap && mqgLikelihood_mediumPt_EndCap->getRootObject()) mqgLikelihood_mediumPt_EndCap->Fill(QGLikelihood);
2682  }
2683  if (recoJets[0].pt()>140.) {
2684  mAxis2_highPt_EndCap = map_of_MEs[DirName+"/"+"qg_Axis2_highPt_EndCap"];if(mAxis2_highPt_EndCap && mAxis2_highPt_EndCap->getRootObject()) mAxis2_highPt_EndCap->Fill(QGaxis2);
2685  mpTD_highPt_EndCap = map_of_MEs[DirName+"/"+"qg_pTD_highPt_EndCap"]; if(mpTD_highPt_EndCap && mpTD_highPt_EndCap->getRootObject()) mpTD_highPt_EndCap->Fill(QGptD);
2686  mMultiplicityQG_highPt_EndCap = map_of_MEs[DirName+"/"+"qg_multiplicity_highPt_EndCap"]; if(mMultiplicityQG_highPt_EndCap && mMultiplicityQG_highPt_EndCap->getRootObject()) mMultiplicityQG_highPt_EndCap->Fill(QGmulti);
2687  mqgLikelihood_highPt_EndCap = map_of_MEs[DirName+"/"+"qg_Likelihood_highPt_EndCap"]; if(mqgLikelihood_highPt_EndCap && mqgLikelihood_highPt_EndCap->getRootObject()) mqgLikelihood_highPt_EndCap->Fill(QGLikelihood);
2688  }
2689  }else{
2690  if (recoJets[0].pt()>20. && recoJets[0].pt()<=50.) {
2691  mAxis2_lowPt_Forward = map_of_MEs[DirName+"/"+"qg_Axis2_lowPt_Forward"];if(mAxis2_lowPt_Forward && mAxis2_lowPt_Forward->getRootObject()) mAxis2_lowPt_Forward->Fill(QGaxis2);
2692  mpTD_lowPt_Forward = map_of_MEs[DirName+"/"+"qg_pTD_lowPt_Forward"]; if(mpTD_lowPt_Forward && mpTD_lowPt_Forward->getRootObject()) mpTD_lowPt_Forward->Fill(QGptD);
2693  mMultiplicityQG_lowPt_Forward = map_of_MEs[DirName+"/"+"qg_multiplicity_lowPt_Forward"]; if(mMultiplicityQG_lowPt_Forward && mMultiplicityQG_lowPt_Forward->getRootObject()) mMultiplicityQG_lowPt_Forward->Fill(QGmulti);
2694  mqgLikelihood_lowPt_Forward = map_of_MEs[DirName+"/"+"qg_Likelihood_lowPt_Forward"]; if(mqgLikelihood_lowPt_Forward && mqgLikelihood_lowPt_Forward->getRootObject()) mqgLikelihood_lowPt_Forward->Fill(QGLikelihood);
2695  }
2696  if (recoJets[0].pt()>50. && recoJets[0].pt()<=140.) {
2697  mAxis2_mediumPt_Forward = map_of_MEs[DirName+"/"+"qg_Axis2_mediumPt_Forward"];if(mAxis2_mediumPt_Forward && mAxis2_mediumPt_Forward->getRootObject()) mAxis2_mediumPt_Forward->Fill(QGaxis2);
2698  mpTD_mediumPt_Forward = map_of_MEs[DirName+"/"+"qg_pTD_mediumPt_Forward"]; if(mpTD_mediumPt_Forward && mpTD_mediumPt_Forward->getRootObject()) mpTD_mediumPt_Forward->Fill(QGptD);
2699  mMultiplicityQG_mediumPt_Forward = map_of_MEs[DirName+"/"+"qg_multiplicity_mediumPt_Forward"]; if(mMultiplicityQG_mediumPt_Forward && mMultiplicityQG_mediumPt_Forward->getRootObject()) mMultiplicityQG_mediumPt_Forward->Fill(QGmulti);
2700  mqgLikelihood_mediumPt_Forward = map_of_MEs[DirName+"/"+"qg_Likelihood_mediumPt_Forward"]; if(mqgLikelihood_mediumPt_Forward && mqgLikelihood_mediumPt_Forward->getRootObject()) mqgLikelihood_mediumPt_Forward->Fill(QGLikelihood);
2701  }
2702  if (recoJets[0].pt()>140.) {
2703  mAxis2_highPt_Forward = map_of_MEs[DirName+"/"+"qg_Axis2_highPt_Forward"];if(mAxis2_highPt_Forward && mAxis2_highPt_Forward->getRootObject()) mAxis2_highPt_Forward->Fill(QGaxis2);
2704  mpTD_highPt_Forward = map_of_MEs[DirName+"/"+"qg_pTD_highPt_Forward"]; if(mpTD_highPt_Forward && mpTD_highPt_Forward->getRootObject()) mpTD_highPt_Forward->Fill(QGptD);
2705  mMultiplicityQG_highPt_Forward = map_of_MEs[DirName+"/"+"qg_multiplicity_highPt_Forward"]; if(mMultiplicityQG_highPt_Forward && mMultiplicityQG_highPt_Forward->getRootObject()) mMultiplicityQG_highPt_Forward->Fill(QGmulti);
2706  mqgLikelihood_highPt_Forward = map_of_MEs[DirName+"/"+"qg_Likelihood_highPt_Forward"]; if(mqgLikelihood_highPt_Forward && mqgLikelihood_highPt_Forward->getRootObject()) mqgLikelihood_highPt_Forward->Fill(QGLikelihood);
2707  }
2708  }//done for first jet
2709  reco::PFJetRef pfjetref1(pfJets,ind2);
2710  QGmulti=(*qgMultiplicity)[pfjetref1];
2711  QGLikelihood=(*qgLikelihood)[pfjetref1];
2712  QGptD=(*qgptD)[pfjetref1];
2713  QGaxis2=(*qgaxis2)[pfjetref1];
2714  if(fabs(recoJets[1].eta())<1.3){//barrel jets
2715  //fractions for barrel
2716  if (recoJets[1].pt()>=20. && recoJets[1].pt()<=50.) {
2717  mAxis2_lowPt_Barrel = map_of_MEs[DirName+"/"+"qg_Axis2_lowPt_Barrel"];if(mAxis2_lowPt_Barrel && mAxis2_lowPt_Barrel->getRootObject()) mAxis2_lowPt_Barrel->Fill(QGaxis2);
2718  mpTD_lowPt_Barrel = map_of_MEs[DirName+"/"+"qg_pTD_lowPt_Barrel"]; if(mpTD_lowPt_Barrel && mpTD_lowPt_Barrel->getRootObject()) mpTD_lowPt_Barrel->Fill(QGptD);
2719  mMultiplicityQG_lowPt_Barrel = map_of_MEs[DirName+"/"+"qg_multiplicity_lowPt_Barrel"]; if(mMultiplicityQG_lowPt_Barrel && mMultiplicityQG_lowPt_Barrel->getRootObject()) mMultiplicityQG_lowPt_Barrel->Fill(QGmulti);
2720  mqgLikelihood_lowPt_Barrel = map_of_MEs[DirName+"/"+"qg_Likelihood_lowPt_Barrel"]; if(mqgLikelihood_lowPt_Barrel && mqgLikelihood_lowPt_Barrel->getRootObject()) mqgLikelihood_lowPt_Barrel->Fill(QGLikelihood);
2721  }
2722  if (recoJets[1].pt()>50. && recoJets[1].pt()<=140.) {
2723  mAxis2_mediumPt_Barrel = map_of_MEs[DirName+"/"+"qg_Axis2_mediumPt_Barrel"];if(mAxis2_mediumPt_Barrel && mAxis2_mediumPt_Barrel->getRootObject()) mAxis2_mediumPt_Barrel->Fill(QGaxis2);
2724  mpTD_mediumPt_Barrel = map_of_MEs[DirName+"/"+"qg_pTD_mediumPt_Barrel"]; if(mpTD_mediumPt_Barrel && mpTD_mediumPt_Barrel->getRootObject()) mpTD_mediumPt_Barrel->Fill(QGptD);
2725  mMultiplicityQG_mediumPt_Barrel = map_of_MEs[DirName+"/"+"qg_multiplicity_mediumPt_Barrel"]; if(mMultiplicityQG_mediumPt_Barrel && mMultiplicityQG_mediumPt_Barrel->getRootObject()) mMultiplicityQG_mediumPt_Barrel->Fill(QGmulti);
2726  mqgLikelihood_mediumPt_Barrel = map_of_MEs[DirName+"/"+"qg_Likelihood_mediumPt_Barrel"]; if(mqgLikelihood_mediumPt_Barrel && mqgLikelihood_mediumPt_Barrel->getRootObject()) mqgLikelihood_mediumPt_Barrel->Fill(QGLikelihood);
2727  }
2728  if (recoJets[1].pt()>140.) {
2729  mAxis2_highPt_Barrel = map_of_MEs[DirName+"/"+"qg_Axis2_highPt_Barrel"];if(mAxis2_highPt_Barrel && mAxis2_highPt_Barrel->getRootObject()) mAxis2_highPt_Barrel->Fill(QGaxis2);
2730  mpTD_highPt_Barrel = map_of_MEs[DirName+"/"+"qg_pTD_highPt_Barrel"]; if(mpTD_highPt_Barrel && mpTD_highPt_Barrel->getRootObject()) mpTD_highPt_Barrel->Fill(QGptD);
2731  mMultiplicityQG_highPt_Barrel = map_of_MEs[DirName+"/"+"qg_multiplicity_highPt_Barrel"]; if(mMultiplicityQG_highPt_Barrel && mMultiplicityQG_highPt_Barrel->getRootObject()) mMultiplicityQG_highPt_Barrel->Fill(QGmulti);
2732  mqgLikelihood_highPt_Barrel = map_of_MEs[DirName+"/"+"qg_Likelihood_highPt_Barrel"]; if(mqgLikelihood_highPt_Barrel && mqgLikelihood_highPt_Barrel->getRootObject()) mqgLikelihood_highPt_Barrel->Fill(QGLikelihood);
2733  }
2734  }else if(fabs(recoJets[1].eta())<3.0){//endcap jets
2735  if (recoJets[1].pt()>20. && recoJets[1].pt()<=50.) {
2736  mAxis2_lowPt_EndCap = map_of_MEs[DirName+"/"+"qg_Axis2_lowPt_EndCap"];if(mAxis2_lowPt_EndCap && mAxis2_lowPt_EndCap->getRootObject()) mAxis2_lowPt_EndCap->Fill(QGaxis2);
2737  mpTD_lowPt_EndCap = map_of_MEs[DirName+"/"+"qg_pTD_lowPt_EndCap"]; if(mpTD_lowPt_EndCap && mpTD_lowPt_EndCap->getRootObject()) mpTD_lowPt_EndCap->Fill(QGptD);
2738  mMultiplicityQG_lowPt_EndCap = map_of_MEs[DirName+"/"+"qg_multiplicity_lowPt_EndCap"]; if(mMultiplicityQG_lowPt_EndCap && mMultiplicityQG_lowPt_EndCap->getRootObject()) mMultiplicityQG_lowPt_EndCap->Fill(QGmulti);
2739  mqgLikelihood_lowPt_EndCap = map_of_MEs[DirName+"/"+"qg_Likelihood_lowPt_EndCap"]; if(mqgLikelihood_lowPt_EndCap && mqgLikelihood_lowPt_EndCap->getRootObject()) mqgLikelihood_lowPt_EndCap->Fill(QGLikelihood);
2740  }
2741  if (recoJets[1].pt()>50. && recoJets[1].pt()<=140.) {
2742  mAxis2_mediumPt_EndCap = map_of_MEs[DirName+"/"+"qg_Axis2_mediumPt_EndCap"];if(mAxis2_mediumPt_EndCap && mAxis2_mediumPt_EndCap->getRootObject()) mAxis2_mediumPt_EndCap->Fill(QGaxis2);
2743  mpTD_mediumPt_EndCap = map_of_MEs[DirName+"/"+"qg_pTD_mediumPt_EndCap"]; if(mpTD_mediumPt_EndCap && mpTD_mediumPt_EndCap->getRootObject()) mpTD_mediumPt_EndCap->Fill(QGptD);
2744  mMultiplicityQG_mediumPt_EndCap = map_of_MEs[DirName+"/"+"qg_multiplicity_mediumPt_EndCap"]; if(mMultiplicityQG_mediumPt_EndCap && mMultiplicityQG_mediumPt_EndCap->getRootObject()) mMultiplicityQG_mediumPt_EndCap->Fill(QGmulti);
2745  mqgLikelihood_mediumPt_EndCap = map_of_MEs[DirName+"/"+"qg_Likelihood_mediumPt_EndCap"]; if(mqgLikelihood_mediumPt_EndCap && mqgLikelihood_mediumPt_EndCap->getRootObject()) mqgLikelihood_mediumPt_EndCap->Fill(QGLikelihood);
2746  }
2747  if (recoJets[1].pt()>140.) {
2748  mAxis2_highPt_EndCap = map_of_MEs[DirName+"/"+"qg_Axis2_highPt_EndCap"];if(mAxis2_highPt_EndCap && mAxis2_highPt_EndCap->getRootObject()) mAxis2_highPt_EndCap->Fill(QGaxis2);
2749  mpTD_highPt_EndCap = map_of_MEs[DirName+"/"+"qg_pTD_highPt_EndCap"]; if(mpTD_highPt_EndCap && mpTD_highPt_EndCap->getRootObject()) mpTD_highPt_EndCap->Fill(QGptD);
2750  mMultiplicityQG_highPt_EndCap = map_of_MEs[DirName+"/"+"qg_multiplicity_highPt_EndCap"]; if(mMultiplicityQG_highPt_EndCap && mMultiplicityQG_highPt_EndCap->getRootObject()) mMultiplicityQG_highPt_EndCap->Fill(QGmulti);
2751  mqgLikelihood_highPt_EndCap = map_of_MEs[DirName+"/"+"qg_Likelihood_highPt_EndCap"]; if(mqgLikelihood_highPt_EndCap && mqgLikelihood_highPt_EndCap->getRootObject()) mqgLikelihood_highPt_EndCap->Fill(QGLikelihood);
2752  }
2753  }else{
2754  if (recoJets[1].pt()>20. && recoJets[1].pt()<=50.) {
2755  mAxis2_lowPt_Forward = map_of_MEs[DirName+"/"+"qg_Axis2_lowPt_Forward"];if(mAxis2_lowPt_Forward && mAxis2_lowPt_Forward->getRootObject()) mAxis2_lowPt_Forward->Fill(QGaxis2);
2756  mpTD_lowPt_Forward = map_of_MEs[DirName+"/"+"qg_pTD_lowPt_Forward"]; if(mpTD_lowPt_Forward && mpTD_lowPt_Forward->getRootObject()) mpTD_lowPt_Forward->Fill(QGptD);
2757  mMultiplicityQG_lowPt_Forward = map_of_MEs[DirName+"/"+"qg_multiplicity_lowPt_Forward"]; if(mMultiplicityQG_lowPt_Forward && mMultiplicityQG_lowPt_Forward->getRootObject()) mMultiplicityQG_lowPt_Forward->Fill(QGmulti);
2758  mqgLikelihood_lowPt_Forward = map_of_MEs[DirName+"/"+"qg_Likelihood_lowPt_Forward"]; if(mqgLikelihood_lowPt_Forward && mqgLikelihood_lowPt_Forward->getRootObject()) mqgLikelihood_lowPt_Forward->Fill(QGLikelihood);
2759  }
2760  if (recoJets[1].pt()>50. && recoJets[1].pt()<=140.) {
2761  mAxis2_mediumPt_Forward = map_of_MEs[DirName+"/"+"qg_Axis2_mediumPt_Forward"];if(mAxis2_mediumPt_Forward && mAxis2_mediumPt_Forward->getRootObject()) mAxis2_mediumPt_Forward->Fill(QGaxis2);
2762  mpTD_mediumPt_Forward = map_of_MEs[DirName+"/"+"qg_pTD_mediumPt_Forward"]; if(mpTD_mediumPt_Forward && mpTD_mediumPt_Forward->getRootObject()) mpTD_mediumPt_Forward->Fill(QGptD);
2763  mMultiplicityQG_mediumPt_Forward = map_of_MEs[DirName+"/"+"qg_multiplicity_mediumPt_Forward"]; if(mMultiplicityQG_mediumPt_Forward && mMultiplicityQG_mediumPt_Forward->getRootObject()) mMultiplicityQG_mediumPt_Forward->Fill(QGmulti);
2764  mqgLikelihood_mediumPt_Forward = map_of_MEs[DirName+"/"+"qg_Likelihood_mediumPt_Forward"]; if(mqgLikelihood_mediumPt_Forward && mqgLikelihood_mediumPt_Forward->getRootObject()) mqgLikelihood_mediumPt_Forward->Fill(QGLikelihood);
2765  }
2766  if (recoJets[1].pt()>140.) {
2767  mAxis2_highPt_Forward = map_of_MEs[DirName+"/"+"qg_Axis2_highPt_Forward"];if(mAxis2_highPt_Forward && mAxis2_highPt_Forward->getRootObject()) mAxis2_highPt_Forward->Fill(QGaxis2);
2768  mpTD_highPt_Forward = map_of_MEs[DirName+"/"+"qg_pTD_highPt_Forward"]; if(mpTD_highPt_Forward && mpTD_highPt_Forward->getRootObject()) mpTD_highPt_Forward->Fill(QGptD);
2769  mMultiplicityQG_highPt_Forward = map_of_MEs[DirName+"/"+"qg_multiplicity_highPt_Forward"]; if(mMultiplicityQG_highPt_Forward && mMultiplicityQG_highPt_Forward->getRootObject()) mMultiplicityQG_highPt_Forward->Fill(QGmulti);
2770  mqgLikelihood_highPt_Forward = map_of_MEs[DirName+"/"+"qg_Likelihood_highPt_Forward"]; if(mqgLikelihood_highPt_Forward && mqgLikelihood_highPt_Forward->getRootObject()) mqgLikelihood_highPt_Forward->Fill(QGLikelihood);
2771  }
2772  }//deal with second jet
2773  }//fill quark gluon tagged variables
2774  }//pfjet
2775  if(isMiniAODJet_){
2776  mCHFrac = map_of_MEs[DirName+"/"+"CHFrac"]; if (mCHFrac && mCHFrac->getRootObject()) mCHFrac ->Fill((*patJets)[ind1].chargedHadronEnergyFraction());
2777  mNHFrac = map_of_MEs[DirName+"/"+"NHFrac"]; if (mNHFrac && mNHFrac->getRootObject()) mNHFrac ->Fill((*patJets)[ind1].neutralHadronEnergyFraction());
2778  mPhFrac = map_of_MEs[DirName+"/"+"PhFrac"]; if (mPhFrac && mPhFrac->getRootObject()) mPhFrac ->Fill((*patJets)[ind1].neutralEmEnergyFraction());
2779  mHFEMFrac = map_of_MEs[DirName+"/"+"HFEMFrac"]; if (mHFEMFrac && mHFEMFrac->getRootObject()) mHFEMFrac ->Fill((*patJets)[ind1].HFEMEnergyFraction());
2780  mHFHFrac = map_of_MEs[DirName+"/"+"HFHFrac"]; if (mHFHFrac && mHFHFrac->getRootObject()) mHFHFrac ->Fill((*patJets)[ind1].HFHadronEnergyFraction());
2781 
2782  mJetEnergyCorr = map_of_MEs[DirName+"/"+"JetEnergyCorr"]; if(mJetEnergyCorr && mJetEnergyCorr->getRootObject()) mJetEnergyCorr->Fill(1./(*patJets)[ind1].jecFactor("Uncorrected"));
2783  mJetEnergyCorrVSEta = map_of_MEs[DirName+"/"+"JetEnergyCorrVSEta"]; if(mJetEnergyCorrVSEta && mJetEnergyCorrVSEta->getRootObject()) mJetEnergyCorrVSEta->Fill(recoJets[0].eta(),1./(*patJets)[ind1].jecFactor("Uncorrected"));
2784  mJetEnergyCorrVSPt = map_of_MEs[DirName+"/"+"JetEnergyCorrVSPt"]; if(mJetEnergyCorrVSPt && mJetEnergyCorrVSPt->getRootObject()) mJetEnergyCorrVSPt->Fill(recoJets[0].pt(),1./(*patJets)[ind1].jecFactor("Uncorrected"));
2785  mJetEnergyCorr = map_of_MEs[DirName+"/"+"JetEnergyCorr"]; if(mJetEnergyCorr && mJetEnergyCorr->getRootObject()) mJetEnergyCorr->Fill(1./(*patJets)[ind2].jecFactor("Uncorrected"));
2786  mJetEnergyCorrVSEta = map_of_MEs[DirName+"/"+"JetEnergyCorrVSEta"]; if(mJetEnergyCorrVSEta && mJetEnergyCorrVSEta->getRootObject()) mJetEnergyCorrVSEta->Fill(recoJets[0].eta(),1./(*patJets)[ind2].jecFactor("Uncorrected"));
2787  mJetEnergyCorrVSPt = map_of_MEs[DirName+"/"+"JetEnergyCorrVSPt"]; if(mJetEnergyCorrVSPt && mJetEnergyCorrVSPt->getRootObject()) mJetEnergyCorrVSPt->Fill(recoJets[0].pt(),1./(*patJets)[ind2].jecFactor("Uncorrected"));
2788 
2789  mChargedMultiplicity = map_of_MEs[DirName+"/"+"ChargedMultiplicity"]; if(mChargedMultiplicity && mChargedMultiplicity->getRootObject()) mChargedMultiplicity->Fill((*patJets)[ind1].chargedMultiplicity());
2790  mNeutralMultiplicity = map_of_MEs[DirName+"/"+"NeutralMultiplicity"]; if(mNeutralMultiplicity && mNeutralMultiplicity->getRootObject()) mNeutralMultiplicity->Fill((*patJets)[ind1].neutralMultiplicity());
2791  mMuonMultiplicity = map_of_MEs[DirName+"/"+"MuonMultiplicity"]; if(mMuonMultiplicity && mMuonMultiplicity->getRootObject()) mMuonMultiplicity->Fill((*patJets)[ind1].muonMultiplicity());
2792  //Filling variables for second jet
2793  mCHFrac = map_of_MEs[DirName+"/"+"CHFrac"]; if (mCHFrac && mCHFrac->getRootObject()) mCHFrac ->Fill((*patJets)[ind2].chargedHadronEnergyFraction());
2794  mNHFrac = map_of_MEs[DirName+"/"+"NHFrac"]; if (mNHFrac && mNHFrac->getRootObject()) mNHFrac ->Fill((*patJets)[ind2].neutralHadronEnergyFraction());
2795  mPhFrac = map_of_MEs[DirName+"/"+"PhFrac"]; if (mPhFrac && mPhFrac->getRootObject()) mPhFrac ->Fill((*patJets)[ind2].neutralEmEnergyFraction());
2796  mHFEMFrac = map_of_MEs[DirName+"/"+"HFEMFrac"]; if (mHFEMFrac && mHFEMFrac->getRootObject()) mHFEMFrac ->Fill((*patJets)[ind2].HFEMEnergyFraction());
2797  mHFHFrac = map_of_MEs[DirName+"/"+"HFHFrac"]; if (mHFHFrac && mHFHFrac->getRootObject()) mHFHFrac ->Fill((*patJets)[ind2].HFHadronEnergyFraction());
2798 
2799  mNeutralFraction = map_of_MEs[DirName+"/"+"NeutralConstituentsFraction"];if (mNeutralFraction && mNeutralFraction->getRootObject()) mNeutralFraction->Fill ((double)(*patJets)[ind1].neutralMultiplicity()/(double)(*patJets)[ind1].nConstituents());
2800 
2801  mChargedMultiplicity = map_of_MEs[DirName+"/"+"ChargedMultiplicity"]; if(mChargedMultiplicity && mChargedMultiplicity->getRootObject()) mChargedMultiplicity->Fill((*patJets)[ind2].chargedMultiplicity());
2802  mNeutralMultiplicity = map_of_MEs[DirName+"/"+"NeutralMultiplicity"]; if(mNeutralMultiplicity && mNeutralMultiplicity->getRootObject()) mNeutralMultiplicity->Fill((*patJets)[ind2].neutralMultiplicity());
2803  mMuonMultiplicity = map_of_MEs[DirName+"/"+"MuonMultiplicity"]; if(mMuonMultiplicity && mMuonMultiplicity->getRootObject()) mMuonMultiplicity->Fill((*patJets)[ind2].muonMultiplicity());
2804 
2805  //now fill PATJet profiles for leading jet
2806  mCHFrac_profile = map_of_MEs[DirName+"/"+"CHFrac_profile"]; if (mCHFrac_profile && mCHFrac_profile->getRootObject()) mCHFrac_profile ->Fill(numPV, (*patJets)[ind1].chargedHadronEnergyFraction());
2807  mNHFrac_profile = map_of_MEs[DirName+"/"+"NHFrac_profile"]; if (mNHFrac_profile && mNHFrac_profile->getRootObject()) mNHFrac_profile ->Fill(numPV, (*patJets)[ind1].neutralHadronEnergyFraction());
2808  mPhFrac_profile = map_of_MEs[DirName+"/"+"PhFrac_profile"]; if (mPhFrac_profile && mPhFrac_profile->getRootObject()) mPhFrac_profile ->Fill(numPV, (*patJets)[ind1].neutralEmEnergyFraction());
2809  mHFEMFrac_profile = map_of_MEs[DirName+"/"+"HFEMFrac_profile"]; if (mHFEMFrac_profile && mHFEMFrac_profile->getRootObject()) mHFEMFrac_profile ->Fill(numPV, (*patJets)[ind1].HFEMEnergyFraction());
2810  mHFHFrac_profile = map_of_MEs[DirName+"/"+"HFHFrac_profile"]; if (mHFHFrac_profile && mHFHFrac_profile->getRootObject()) mHFHFrac_profile ->Fill(numPV, (*patJets)[ind1].HFHadronEnergyFraction());
2811 
2812  mNeutralFraction = map_of_MEs[DirName+"/"+"NeutralConstituentsFraction"];if (mNeutralFraction && mNeutralFraction->getRootObject()) mNeutralFraction->Fill ((double)(*patJets)[ind2].neutralMultiplicity()/(double)(*patJets)[ind2].nConstituents());
2813 
2814  mChargedMultiplicity_profile = map_of_MEs[DirName+"/"+"ChargedMultiplicity_profile"]; if(mChargedMultiplicity_profile && mChargedMultiplicity_profile->getRootObject()) mChargedMultiplicity_profile->Fill(numPV, (*patJets)[ind1].chargedMultiplicity());
2815  mNeutralMultiplicity_profile = map_of_MEs[DirName+"/"+"NeutralMultiplicity_profile"]; if(mNeutralMultiplicity_profile && mNeutralMultiplicity_profile->getRootObject()) mNeutralMultiplicity_profile->Fill(numPV, (*patJets)[ind1].neutralMultiplicity());
2816  mMuonMultiplicity_profile = map_of_MEs[DirName+"/"+"MuonMultiplicity_profile"]; if(mMuonMultiplicity_profile && mMuonMultiplicity_profile->getRootObject()) mMuonMultiplicity->Fill(numPV, (*patJets)[ind1].muonMultiplicity());
2817  //now fill PATJet profiles for second leading jet
2818  mCHFrac_profile = map_of_MEs[DirName+"/"+"CHFrac_profile"]; if (mCHFrac_profile && mCHFrac_profile->getRootObject()) mCHFrac_profile ->Fill(numPV, (*patJets)[ind2].chargedHadronEnergyFraction());
2819  mNHFrac_profile = map_of_MEs[DirName+"/"+"NHFrac_profile"]; if (mNHFrac_profile && mNHFrac_profile->getRootObject()) mNHFrac_profile ->Fill(numPV, (*patJets)[ind2].neutralHadronEnergyFraction());
2820  mPhFrac_profile = map_of_MEs[DirName+"/"+"PhFrac_profile"]; if (mPhFrac_profile && mPhFrac_profile->getRootObject()) mPhFrac_profile ->Fill(numPV, (*patJets)[ind2].neutralEmEnergyFraction());
2821  mHFEMFrac_profile = map_of_MEs[DirName+"/"+"HFEMFrac_profile"]; if (mHFEMFrac_profile && mHFEMFrac_profile->getRootObject()) mHFEMFrac_profile ->Fill(numPV, (*patJets)[ind2].HFEMEnergyFraction());
2822  mHFHFrac_profile = map_of_MEs[DirName+"/"+"HFHFrac_profile"]; if (mHFHFrac_profile && mHFHFrac_profile->getRootObject()) mHFHFrac_profile ->Fill(numPV, (*patJets)[ind2].HFHadronEnergyFraction());
2823 
2824  mChargedMultiplicity_profile = map_of_MEs[DirName+"/"+"ChargedMultiplicity_profile"]; if(mChargedMultiplicity_profile && mChargedMultiplicity_profile->getRootObject()) mChargedMultiplicity_profile->Fill(numPV, (*patJets)[ind2].chargedMultiplicity());
2825  mNeutralMultiplicity_profile = map_of_MEs[DirName+"/"+"NeutralMultiplicity_profile"]; if(mNeutralMultiplicity_profile && mNeutralMultiplicity_profile->getRootObject()) mNeutralMultiplicity_profile->Fill(numPV, (*patJets)[ind2].neutralMultiplicity());
2826  mMuonMultiplicity_profile = map_of_MEs[DirName+"/"+"MuonMultiplicity_profile"]; if(mMuonMultiplicity_profile && mMuonMultiplicity_profile->getRootObject()) mMuonMultiplicity_profile->Fill(numPV, (*patJets)[ind2].muonMultiplicity());
2827  }
2828 
2829 
2830  //fill histos for first jet
2831  mPt = map_of_MEs[DirName+"/"+"Pt"]; if (mPt && mPt->getRootObject()) mPt->Fill (recoJets[0].pt());
2832  mEta = map_of_MEs[DirName+"/"+"Eta"]; if (mEta && mEta->getRootObject()) mEta->Fill (recoJets[0].eta());
2833  mPhi = map_of_MEs[DirName+"/"+"Phi"]; if (mPhi && mPhi->getRootObject()) mPhi->Fill (recoJets[0].phi());
2834  mPhiVSEta = map_of_MEs[DirName+"/"+"PhiVSEta"]; if (mPhiVSEta && mPhiVSEta->getRootObject()) mPhiVSEta->Fill(recoJets[0].eta(),recoJets[0].phi());
2835  //if(!isJPTJet_){
2836  mConstituents = map_of_MEs[DirName+"/"+"Constituents"]; if (mConstituents && mConstituents->getRootObject()) mConstituents->Fill (recoJets[0].nConstituents());
2837  //}
2838  mPt = map_of_MEs[DirName+"/"+"Pt"]; if (mPt && mPt->getRootObject()) mPt->Fill (recoJets[1].pt());
2839  mEta = map_of_MEs[DirName+"/"+"Eta"]; if (mEta && mEta->getRootObject()) mEta->Fill (recoJets[1].eta());
2840  mPhi = map_of_MEs[DirName+"/"+"Phi"]; if (mPhi && mPhi->getRootObject()) mPhi->Fill (recoJets[1].phi());
2841  mPhiVSEta = map_of_MEs[DirName+"/"+"PhiVSEta"]; if (mPhiVSEta && mPhiVSEta->getRootObject()) mPhiVSEta->Fill(recoJets[1].eta(),recoJets[1].phi());
2842  //if(!isJPTJet_){
2843  mConstituents = map_of_MEs[DirName+"/"+"Constituents"]; if (mConstituents && mConstituents->getRootObject()) mConstituents->Fill (recoJets[1].nConstituents());
2844  //}
2845  //PV profiles
2846  mPt_profile = map_of_MEs[DirName+"/"+"Pt_profile"]; if (mPt_profile && mPt_profile->getRootObject()) mPt_profile ->Fill(numPV, recoJets[0].pt());
2847  mEta_profile = map_of_MEs[DirName+"/"+"Eta_profile"]; if (mEta_profile && mEta_profile->getRootObject()) mEta_profile ->Fill(numPV, recoJets[0].eta());
2848  mPhi_profile = map_of_MEs[DirName+"/"+"Phi_profile"]; if (mPhi_profile && mPhi_profile->getRootObject()) mPhi_profile ->Fill(numPV, recoJets[0].phi());
2849  //if(!isJPTJet_){
2850  mConstituents_profile = map_of_MEs[DirName+"/"+"Constituents_profile"]; if (mConstituents_profile && mConstituents_profile->getRootObject()) mConstituents_profile->Fill(numPV, recoJets[0].nConstituents());
2851  //}
2852  mPt_profile = map_of_MEs[DirName+"/"+"Pt_profile"]; if (mPt_profile && mPt_profile->getRootObject()) mPt_profile ->Fill(numPV, recoJets[1].pt());
2853  mEta_profile = map_of_MEs[DirName+"/"+"Eta_profile"]; if (mEta_profile && mEta_profile->getRootObject()) mEta_profile ->Fill(numPV, recoJets[1].eta());
2854  mPhi_profile = map_of_MEs[DirName+"/"+"Phi_profile"]; if (mPhi_profile && mPhi_profile->getRootObject()) mPhi_profile ->Fill(numPV, recoJets[1].phi());
2855  //if(!isJPTJet_){
2856  mConstituents_profile = map_of_MEs[DirName+"/"+"Constituents_profile"]; if (mConstituents_profile && mConstituents_profile->getRootObject()) mConstituents_profile->Fill(numPV, recoJets[1].nConstituents());
2857  //}
2858  if (fabs(recoJets[0].eta() < 1.4)) {
2859  double pt_dijet = (recoJets[0].pt() + recoJets[1].pt())/2;
2860  if (dphi > 2.7) {//cut even toughter on dijet balance
2861  double pt_probe;
2862  double pt_barrel;
2863  int jet1, jet2;
2864  //int randJet = rand() % 2;
2865  int randJet =iEvent.id().event()%2;
2866  if (fabs(recoJets[1].eta() < 1.4)) {
2867  if (randJet) {
2868  jet1 = 0;
2869  jet2 = 1;
2870  }
2871  else {
2872  jet1 = 1;
2873  jet2 = 0;
2874  }
2875  // ***Di-Jet Asymmetry****
2876  // * leading jets eta < 1.4
2877  // * leading jets dphi > 2.7
2878  // * pt_third jet < threshold
2879  // * A = (pt_1 - pt_2)/(pt_1 + pt_2)
2880  // * jets 1 and two are randomly ordered
2881  // **
2882  bool thirdJetCut = true;
2883  //that doesn't make any sense -> imagine you have 5 jets,
2884  //jet 3 is quite hard (almost as hard as the second jet, i.e. 200/80/79/20/15, cutoff is 30
2885  //the 4th and 5th jet are soft enough -> then you would fill the asymmetry twice,
2886  //although jet 2 and 3 are basically identical
2887  //do third jet relative to second jet
2888  //JME-10-014 suggests pt3/pt_dijet<0.15
2889  if(ind3>0){
2890  if (pt3 > asymmetryThirdJetCut_){
2891  thirdJetCut=false;
2892  }
2893  }
2894  if(thirdJetCut){
2895  double dijetAsymmetry =(recoJets[jet1].pt() - recoJets[jet2].pt()) / (recoJets[jet1].pt() + recoJets[jet2].pt());
2896  mDijetAsymmetry = map_of_MEs[DirName+"/"+"DijetAsymmetry"]; if (mDijetAsymmetry && mDijetAsymmetry->getRootObject()) mDijetAsymmetry->Fill(dijetAsymmetry);
2897  }// end restriction on third jet pt in asymmetry calculation
2898 
2899  }
2900  else {
2901  jet1 = 0;
2902  jet2 = 1;
2903  }
2904 
2905  pt_barrel = recoJets[jet1].pt();
2906  pt_probe = recoJets[jet2].pt();
2907 
2908  //dijet balance cuts
2909  // ***Di-Jet Balance****
2910  // * pt_dijet = (pt_probe+pt_barrel)/2
2911  // * leading jets dphi > 2.7
2912  // * reject evnets where pt_third/pt_dijet > 0.2
2913  // * pv selection
2914  // * B = (pt_probe - pt_barrel)/pt_dijet
2915  // * select probe randomly from 2 jets if both leading jets are in the barrel
2916  bool thirdJetCut = true;
2917  if(ind3>0){
2918  if (pt3/pt_dijet > balanceThirdJetCut_){
2919  thirdJetCut = false;
2920  }
2921  }
2922  if (thirdJetCut) {
2923  double dijetBalance = (pt_probe - pt_barrel) / pt_dijet;
2924  mDijetBalance = map_of_MEs[DirName+"/"+"DijetBalance"]; if (mDijetBalance && mDijetBalance->getRootObject()) mDijetBalance->Fill(dijetBalance);
2925  }// end restriction on third jet pt ratio in balance calculation
2926 
2927  }// dPhi > 2.7 for dijetbalance and asymmetrie
2928  }//leading jet in barrel
2929  }//DPhi cut of 2.1
2930  }//dijet selection, check if both leading jets are IDed
2931  //now do the ZJets selection -> pass_Z_selection cuts already on the Z-pt>30 GeV
2932  if(pass_Z_selection && ind1_mu_vetoed>=0 && pt1_mu_vetoed>12 && cleaned_first_jet_mu_vetoed && isPFJet_){
2933  bool pass_second_jet_mu_vetoed=false;
2934  if(cleaned_second_jet_mu_vetoed){
2935  if(ind2_mu_vetoed>=0 && pt2_mu_vetoed/zCand.Pt()<0.2){
2936  pass_second_jet_mu_vetoed=true;
2937  }
2938  }
2939  if(pass_second_jet_mu_vetoed){
2940  Jet recoJet1;
2941  if(isPFJet_){
2942  recoJet1=(*pfJets)[ind1_mu_vetoed];
2943  }
2944  if (pass_correction_flag && !isMiniAODJet_) {
2945  double scale=1;
2946  if (isCaloJet_){
2947  scale = jetCorr->correction((*caloJets)[ind1_mu_vetoed]);
2948  }
2949  if (isPFJet_){
2950  scale = jetCorr->correction((*pfJets)[ind1_mu_vetoed]);
2951  }
2952  recoJet1.scaleEnergy(scale);
2953  }
2954  double dphi=fabs(recoJet1.phi()-zCand.Phi());
2955  if(dphi>acos(-1.)){
2956  dphi=2*acos(-1.)-dphi;
2957  }
2958  if(jetCleaningFlag_){
2959  DirName = "JetMET/Jet/Cleaned"+mInputCollection_.label()+"/ZJets";
2960  }
2961  mDPhiZJet = map_of_MEs[DirName+"/"+"DPhiZJ"]; if (mDPhiZJet && mDPhiZJet->getRootObject()) mDPhiZJet ->Fill(dphi);
2962  if(fabs(dphi-acos(-1.))<0.34){
2963  //get now MET collections for MPF studies
2966  //edm::Handle<pat::METCollection> patmetcoll;
2967  const MET *met=NULL;
2968  if(isCaloJet_){
2969  iEvent.getByToken(caloMetToken_, calometcoll);
2970  if(!calometcoll.isValid()) return;
2971  met=&(calometcoll->front());
2972  }
2973  if(isPFJet_){
2974  iEvent.getByToken(pfMetToken_, pfmetcoll);
2975  if(!pfmetcoll.isValid()) return;
2976  met=&(pfmetcoll->front());
2977  }
2978  //if(isMiniAODJet_){
2979  //iEvent.getByToken(patMetToken_, patmetcoll);
2980  //if(!patmetcoll.isValid()) return;
2981  //met=&(patmetcoll->front());
2982  //}
2983  mZMass = map_of_MEs[DirName+"/"+"DiMuonMass"]; if(mZMass && mZMass->getRootObject()) mZMass->Fill(zCand.M());
2984  mZJetAsymmetry = map_of_MEs[DirName+"/"+"ZJetAsymmetry"]; if(mZJetAsymmetry && mZJetAsymmetry->getRootObject()) mZJetAsymmetry->Fill((zCand.Pt()-recoJet1.pt())/(zCand.Pt()+recoJet1.pt()));
2985  if(recoJet1.pt()>20){
2986  mPt = map_of_MEs[DirName+"/"+"Pt"]; if (mPt && mPt->getRootObject()) mPt->Fill (recoJet1.pt());
2987  mEta = map_of_MEs[DirName+"/"+"Eta"]; if (mEta && mEta->getRootObject()) mEta->Fill (recoJet1.eta());
2988  mPhi = map_of_MEs[DirName+"/"+"Phi"]; if (mPhi && mPhi->getRootObject()) mPhi->Fill (recoJet1.phi());
2989  //PV profiles
2990  mPt_profile = map_of_MEs[DirName+"/"+"Pt_profile"]; if (mPt_profile && mPt_profile->getRootObject()) mPt_profile ->Fill(numPV, recoJet1.pt());
2991  mEta_profile = map_of_MEs[DirName+"/"+"Eta_profile"]; if (mEta_profile && mEta_profile->getRootObject()) mEta_profile ->Fill(numPV, recoJet1.eta());
2992  mPhi_profile = map_of_MEs[DirName+"/"+"Phi_profile"]; if (mPhi_profile && mPhi_profile->getRootObject()) mPhi_profile ->Fill(numPV, recoJet1.phi());
2993  mConstituents = map_of_MEs[DirName+"/"+"Constituents"]; if (mConstituents && mConstituents->getRootObject()) mConstituents->Fill(recoJet1.nConstituents());
2994  mConstituents_profile = map_of_MEs[DirName+"/"+"Constituents_profile"]; if (mConstituents_profile && mConstituents_profile->getRootObject()) mConstituents_profile->Fill(numPV, recoJet1.nConstituents());
2995  mJetEnergyCorr = map_of_MEs[DirName+"/"+"JetEnergyCorr"]; if(mJetEnergyCorr && mJetEnergyCorr->getRootObject()) mJetEnergyCorr->Fill(recoJet1.pt()/(*pfJets)[ind1_mu_vetoed].pt());
2996  mJetEnergyCorrVSEta = map_of_MEs[DirName+"/"+"JetEnergyCorrVSEta"]; if(mJetEnergyCorrVSEta && mJetEnergyCorrVSEta->getRootObject()) mJetEnergyCorrVSEta->Fill(recoJet1.eta(),recoJet1.pt()/(*pfJets)[ind1_mu_vetoed].pt());
2997  mJetEnergyCorrVSPt = map_of_MEs[DirName+"/"+"JetEnergyCorrVSPt"]; if(mJetEnergyCorrVSPt && mJetEnergyCorrVSPt->getRootObject()) mJetEnergyCorrVSPt->Fill(recoJet1.pt(),recoJet1.pt()/(*pfJets)[ind1_mu_vetoed].pt());
2998  mCHFrac = map_of_MEs[DirName+"/"+"CHFrac"]; if (mCHFrac && mCHFrac->getRootObject()) mCHFrac ->Fill((*pfJets)[ind1_mu_vetoed].chargedHadronEnergyFraction());
2999  mNHFrac = map_of_MEs[DirName+"/"+"NHFrac"]; if (mNHFrac && mNHFrac->getRootObject()) mNHFrac ->Fill((*pfJets)[ind1_mu_vetoed].neutralHadronEnergyFraction());
3000  mPhFrac = map_of_MEs[DirName+"/"+"PhFrac"]; if (mPhFrac && mPhFrac->getRootObject()) mPhFrac ->Fill((*pfJets)[ind1_mu_vetoed].neutralEmEnergyFraction());
3001  mHFEMFrac = map_of_MEs[DirName+"/"+"HFEMFrac"]; if (mHFEMFrac && mHFEMFrac->getRootObject()) mHFEMFrac ->Fill((*pfJets)[ind1_mu_vetoed].HFEMEnergyFraction());
3002  mHFHFrac = map_of_MEs[DirName+"/"+"HFHFrac"]; if (mHFHFrac && mHFHFrac->getRootObject()) mHFHFrac ->Fill((*pfJets)[ind1_mu_vetoed].HFHadronEnergyFraction());
3003  //now fill PFJet profiles for second leading jet
3004  mCHFrac_profile = map_of_MEs[DirName+"/"+"CHFrac_profile"]; if (mCHFrac_profile && mCHFrac_profile->getRootObject()) mCHFrac_profile ->Fill(numPV, (*pfJets)[ind1_mu_vetoed].chargedHadronEnergyFraction());
3005  mNHFrac_profile = map_of_MEs[DirName+"/"+"NHFrac_profile"]; if (mNHFrac_profile && mNHFrac_profile->getRootObject()) mNHFrac_profile ->Fill(numPV, (*pfJets)[ind1_mu_vetoed].neutralHadronEnergyFraction());
3006  mPhFrac_profile = map_of_MEs[DirName+"/"+"PhFrac_profile"]; if (mPhFrac_profile && mPhFrac_profile->getRootObject()) mPhFrac_profile ->Fill(numPV, (*pfJets)[ind1_mu_vetoed].neutralEmEnergyFraction());
3007  mHFEMFrac_profile = map_of_MEs[DirName+"/"+"HFEMFrac_profile"]; if (mHFEMFrac_profile && mHFEMFrac_profile->getRootObject()) mHFEMFrac_profile ->Fill(numPV, (*pfJets)[ind1_mu_vetoed].HFEMEnergyFraction());
3008  mHFHFrac_profile = map_of_MEs[DirName+"/"+"HFHFrac_profile"]; if (mHFHFrac_profile && mHFHFrac_profile->getRootObject()) mHFHFrac_profile ->Fill(numPV, (*pfJets)[ind1_mu_vetoed].HFHadronEnergyFraction());
3009  }
3010  double MPF=1.+(met->px()*zCand.Px()+met->py()*zCand.Py())/(zCand.Pt()*zCand.Pt());
3011  if(fabs(recoJet1.eta())<1.3){//barrel jets
3012  mJ1Pt_over_ZPt_J_Barrel = map_of_MEs[DirName+"/"+"J1Pt_over_ZPt_J_Barrel"]; if(mJ1Pt_over_ZPt_J_Barrel && mJ1Pt_over_ZPt_J_Barrel->getRootObject())mJ1Pt_over_ZPt_J_Barrel->Fill(recoJet1.pt()/zCand.Pt());
3013  mMPF_J_Barrel = map_of_MEs[DirName+"/"+"MPF_J_Barrel"]; if(mMPF_J_Barrel && mMPF_J_Barrel->getRootObject())mMPF_J_Barrel->Fill(MPF);
3014  if(zCand.Pt()<90){//lower cut on 30 already right from the start
3015  mJetZBalance_lowZPt_J_Barrel = map_of_MEs[DirName+"/"+"JZB_lowZPt_J_Barrel"]; if(mJetZBalance_lowZPt_J_Barrel && mJetZBalance_lowZPt_J_Barrel->getRootObject())mJetZBalance_lowZPt_J_Barrel->Fill(recoJet1.pt()-zCand.Pt());
3016  mJ1Pt_over_ZPt_lowZPt_J_Barrel = map_of_MEs[DirName+"/"+"J1Pt_over_ZPt_lowZPt_J_Barrel"]; if(mJ1Pt_over_ZPt_lowZPt_J_Barrel && mJ1Pt_over_ZPt_lowZPt_J_Barrel->getRootObject())mJ1Pt_over_ZPt_lowZPt_J_Barrel->Fill(recoJet1.pt()/zCand.Pt());
3017  mMPF_lowZPt_J_Barrel = map_of_MEs[DirName+"/"+"MPF_lowZPt_J_Barrel"]; if(mMPF_lowZPt_J_Barrel && mMPF_lowZPt_J_Barrel->getRootObject())mMPF_lowZPt_J_Barrel->Fill(MPF);
3018  //mMPF_J_Barrel = map_of_MEs[DirName+"/"+"MPF_J_Barrel"]; if(mMPF_J_Barrel && mMPF_J_Barrel->getRootObject())mMPF_J_Barrel->Fill(MPF);
3019  }else if (zCand.Pt()<140){
3020  mJetZBalance_mediumZPt_J_Barrel = map_of_MEs[DirName+"/"+"JZB_mediumZPt_J_Barrel"]; if(mJetZBalance_mediumZPt_J_Barrel && mJetZBalance_mediumZPt_J_Barrel->getRootObject())mJetZBalance_mediumZPt_J_Barrel->Fill(recoJet1.pt()-zCand.Pt());
3021  mJ1Pt_over_ZPt_mediumZPt_J_Barrel = map_of_MEs[DirName+"/"+"J1Pt_over_ZPt_mediumZPt_J_Barrel"]; if(mJ1Pt_over_ZPt_mediumZPt_J_Barrel && mJ1Pt_over_ZPt_mediumZPt_J_Barrel->getRootObject())mJ1Pt_over_ZPt_mediumZPt_J_Barrel->Fill(recoJet1.pt()/zCand.Pt());
3022  mMPF_mediumZPt_J_Barrel = map_of_MEs[DirName+"/"+"MPF_mediumZPt_J_Barrel"]; if(mMPF_mediumZPt_J_Barrel && mMPF_mediumZPt_J_Barrel->getRootObject())mMPF_mediumZPt_J_Barrel->Fill(MPF);
3023  }else{
3024  mJetZBalance_highZPt_J_Barrel = map_of_MEs[DirName+"/"+"JZB_highZPt_J_Barrel"]; if(mJetZBalance_highZPt_J_Barrel && mJetZBalance_highZPt_J_Barrel->getRootObject())mJetZBalance_highZPt_J_Barrel->Fill(recoJet1.pt()-zCand.Pt());
3025  mJ1Pt_over_ZPt_highZPt_J_Barrel = map_of_MEs[DirName+"/"+"J1Pt_over_ZPt_highZPt_J_Barrel"]; if(mJ1Pt_over_ZPt_highZPt_J_Barrel && mJ1Pt_over_ZPt_highZPt_J_Barrel->getRootObject())mJ1Pt_over_ZPt_highZPt_J_Barrel->Fill(recoJet1.pt()/zCand.Pt());
3026  mMPF_highZPt_J_Barrel = map_of_MEs[DirName+"/"+"MPF_highZPt_J_Barrel"]; if(mMPF_highZPt_J_Barrel && mMPF_highZPt_J_Barrel->getRootObject())mMPF_highZPt_J_Barrel->Fill(MPF);
3027  }
3028  if(zCand.Pt()>30){
3029  if(zCand.Pt()<55){
3030  mDeltaPt_Z_j1_over_ZPt_30_55_J_Barrel = map_of_MEs[DirName+"/"+"DeltaPt_Z_j1_over_ZPt_30_55_J_Barrel"];if(mDeltaPt_Z_j1_over_ZPt_30_55_J_Barrel && mDeltaPt_Z_j1_over_ZPt_30_55_J_Barrel->getRootObject() ) mDeltaPt_Z_j1_over_ZPt_30_55_J_Barrel->Fill((zCand.Pt()-recoJet1.pt())/zCand.Pt());
3031  }else if (zCand.Pt()<75){
3032  mDeltaPt_Z_j1_over_ZPt_55_75_J_Barrel = map_of_MEs[DirName+"/"+"DeltaPt_Z_j1_over_ZPt_55_75_J_Barrel"];if(mDeltaPt_Z_j1_over_ZPt_55_75_J_Barrel && mDeltaPt_Z_j1_over_ZPt_55_75_J_Barrel->getRootObject() ) mDeltaPt_Z_j1_over_ZPt_55_75_J_Barrel->Fill((zCand.Pt()-recoJet1.pt())/zCand.Pt());
3033  }else if (zCand.Pt()<150){
3034  mDeltaPt_Z_j1_over_ZPt_75_150_J_Barrel = map_of_MEs[DirName+"/"+"DeltaPt_Z_j1_over_ZPt_75_150_J_Barrel"];if(mDeltaPt_Z_j1_over_ZPt_75_150_J_Barrel && mDeltaPt_Z_j1_over_ZPt_75_150_J_Barrel->getRootObject() ) mDeltaPt_Z_j1_over_ZPt_75_150_J_Barrel->Fill((zCand.Pt()-recoJet1.pt())/zCand.Pt());
3035  }else if (zCand.Pt()<290){
3036  mDeltaPt_Z_j1_over_ZPt_150_290_J_Barrel = map_of_MEs[DirName+"/"+"DeltaPt_Z_j1_over_ZPt_150_290_J_Barrel"];if(mDeltaPt_Z_j1_over_ZPt_150_290_J_Barrel && mDeltaPt_Z_j1_over_ZPt_150_290_J_Barrel->getRootObject() ) mDeltaPt_Z_j1_over_ZPt_150_290_J_Barrel->Fill((zCand.Pt()-recoJet1.pt())/zCand.Pt());
3037  }else{
3038  mDeltaPt_Z_j1_over_ZPt_290_J_Barrel = map_of_MEs[DirName+"/"+"DeltaPt_Z_j1_over_ZPt_290_J_Barrel"];if(mDeltaPt_Z_j1_over_ZPt_290_J_Barrel && mDeltaPt_Z_j1_over_ZPt_290_J_Barrel->getRootObject() ) mDeltaPt_Z_j1_over_ZPt_290_J_Barrel->Fill((zCand.Pt()-recoJet1.pt())/zCand.Pt());
3039  }
3040  }
3041  }else if(fabs(recoJet1.eta())<3.0){//endcap jets
3042  mJ1Pt_over_ZPt_J_EndCap = map_of_MEs[DirName+"/"+"J1Pt_over_ZPt_J_EndCap"]; if(mJ1Pt_over_ZPt_J_EndCap && mJ1Pt_over_ZPt_J_EndCap->getRootObject())mJ1Pt_over_ZPt_J_EndCap->Fill(recoJet1.pt()/zCand.Pt());
3043  mMPF_J_EndCap = map_of_MEs[DirName+"/"+"MPF_J_EndCap"]; if(mMPF_J_EndCap && mMPF_J_EndCap->getRootObject())mMPF_J_EndCap->Fill(MPF);
3044  if(zCand.Pt()<90){//lower cut on 30 already right from the start
3045  mJetZBalance_lowZPt_J_EndCap = map_of_MEs[DirName+"/"+"JZB_lowZPt_J_EndCap"]; if(mJetZBalance_lowZPt_J_EndCap && mJetZBalance_lowZPt_J_EndCap->getRootObject())mJetZBalance_lowZPt_J_EndCap->Fill(recoJet1.pt()-zCand.Pt());
3046  mJ1Pt_over_ZPt_lowZPt_J_EndCap = map_of_MEs[DirName+"/"+"J1Pt_over_ZPt_lowZPt_J_EndCap"]; if(mJ1Pt_over_ZPt_lowZPt_J_EndCap && mJ1Pt_over_ZPt_lowZPt_J_EndCap->getRootObject())mJ1Pt_over_ZPt_lowZPt_J_EndCap->Fill(recoJet1.pt()/zCand.Pt());
3047  mMPF_lowZPt_J_EndCap = map_of_MEs[DirName+"/"+"MPF_lowZPt_J_EndCap"]; if(mMPF_lowZPt_J_EndCap && mMPF_lowZPt_J_EndCap->getRootObject())mMPF_lowZPt_J_EndCap->Fill(MPF);
3048  }else if (zCand.Pt()<140){
3049  mJetZBalance_mediumZPt_J_EndCap = map_of_MEs[DirName+"/"+"JZB_mediumZPt_J_EndCap"]; if(mJetZBalance_mediumZPt_J_EndCap && mJetZBalance_mediumZPt_J_EndCap->getRootObject())mJetZBalance_mediumZPt_J_EndCap->Fill(recoJet1.pt()-zCand.Pt());
3050  mJ1Pt_over_ZPt_mediumZPt_J_EndCap = map_of_MEs[DirName+"/"+"J1Pt_over_ZPt_mediumZPt_J_EndCap"]; if(mJ1Pt_over_ZPt_mediumZPt_J_EndCap && mJ1Pt_over_ZPt_mediumZPt_J_EndCap->getRootObject())mJ1Pt_over_ZPt_mediumZPt_J_EndCap->Fill(recoJet1.pt()/zCand.Pt());
3051  mMPF_mediumZPt_J_EndCap = map_of_MEs[DirName+"/"+"MPF_mediumZPt_J_EndCap"]; if(mMPF_mediumZPt_J_EndCap && mMPF_mediumZPt_J_EndCap->getRootObject())mMPF_mediumZPt_J_EndCap->Fill(MPF);
3052  }else{
3053  mJetZBalance_highZPt_J_EndCap = map_of_MEs[DirName+"/"+"JZB_highZPt_J_EndCap"]; if(mJetZBalance_highZPt_J_EndCap && mJetZBalance_highZPt_J_EndCap->getRootObject())mJetZBalance_highZPt_J_EndCap->Fill(recoJet1.pt()-zCand.Pt());
3054  mJ1Pt_over_ZPt_highZPt_J_EndCap = map_of_MEs[DirName+"/"+"J1Pt_over_ZPt_highZPt_J_EndCap"]; if(mJ1Pt_over_ZPt_highZPt_J_EndCap && mJ1Pt_over_ZPt_highZPt_J_EndCap->getRootObject())mJ1Pt_over_ZPt_highZPt_J_EndCap->Fill(recoJet1.pt()/zCand.Pt());
3055  mMPF_highZPt_J_EndCap = map_of_MEs[DirName+"/"+"MPF_highZPt_J_EndCap"]; if(mMPF_highZPt_J_EndCap && mMPF_highZPt_J_EndCap->getRootObject())mMPF_highZPt_J_EndCap->Fill(MPF);
3056  }
3057  if(zCand.Pt()>30){
3058  if(zCand.Pt()<55){
3059  mDeltaPt_Z_j1_over_ZPt_30_55_J_EndCap = map_of_MEs[DirName+"/"+"DeltaPt_Z_j1_over_ZPt_30_55_J_EndCap"];if(mDeltaPt_Z_j1_over_ZPt_30_55_J_EndCap && mDeltaPt_Z_j1_over_ZPt_30_55_J_EndCap->getRootObject() ) mDeltaPt_Z_j1_over_ZPt_30_55_J_EndCap->Fill((zCand.Pt()-recoJet1.pt())/zCand.Pt());
3060  }else if (zCand.Pt()<75){
3061  mDeltaPt_Z_j1_over_ZPt_55_75_J_EndCap = map_of_MEs[DirName+"/"+"DeltaPt_Z_j1_over_ZPt_55_75_J_EndCap"];if(mDeltaPt_Z_j1_over_ZPt_55_75_J_EndCap && mDeltaPt_Z_j1_over_ZPt_55_75_J_EndCap->getRootObject() ) mDeltaPt_Z_j1_over_ZPt_55_75_J_EndCap->Fill((zCand.Pt()-recoJet1.pt())/zCand.Pt());
3062  }else if (zCand.Pt()<150){
3063  mDeltaPt_Z_j1_over_ZPt_75_150_J_EndCap = map_of_MEs[DirName+"/"+"DeltaPt_Z_j1_over_ZPt_75_150_J_EndCap"];if(mDeltaPt_Z_j1_over_ZPt_75_150_J_EndCap && mDeltaPt_Z_j1_over_ZPt_75_150_J_EndCap->getRootObject() ) mDeltaPt_Z_j1_over_ZPt_75_150_J_EndCap->Fill((zCand.Pt()-recoJet1.pt())/zCand.Pt());
3064  }else if (zCand.Pt()<290){
3065  mDeltaPt_Z_j1_over_ZPt_150_290_J_EndCap = map_of_MEs[DirName+"/"+"DeltaPt_Z_j1_over_ZPt_150_290_J_EndCap"];if(mDeltaPt_Z_j1_over_ZPt_150_290_J_EndCap && mDeltaPt_Z_j1_over_ZPt_150_290_J_EndCap->getRootObject() ) mDeltaPt_Z_j1_over_ZPt_150_290_J_EndCap->Fill((zCand.Pt()-recoJet1.pt())/zCand.Pt());
3066  }else{
3067  mDeltaPt_Z_j1_over_ZPt_290_J_EndCap = map_of_MEs[DirName+"/"+"DeltaPt_Z_j1_over_ZPt_290_J_EndCap"];if(mDeltaPt_Z_j1_over_ZPt_290_J_EndCap && mDeltaPt_Z_j1_over_ZPt_290_J_EndCap->getRootObject() ) mDeltaPt_Z_j1_over_ZPt_290_J_EndCap->Fill((zCand.Pt()-recoJet1.pt())/zCand.Pt());
3068  }
3069  }
3070  }else{//forward jets
3071  mJ1Pt_over_ZPt_J_Forward = map_of_MEs[DirName+"/"+"J1Pt_over_ZPt_J_Forward"]; if(mJ1Pt_over_ZPt_J_Forward && mJ1Pt_over_ZPt_J_Forward->getRootObject())mJ1Pt_over_ZPt_J_Forward->Fill(recoJet1.pt()/zCand.Pt());
3072  mMPF_J_Forward = map_of_MEs[DirName+"/"+"MPF_J_Forward"]; if(mMPF_J_Forward && mMPF_J_Forward->getRootObject())mMPF_J_Forward->Fill(MPF);
3073  if(zCand.Pt()<90){//lower cut on 30 already right from the start
3074  mJetZBalance_lowZPt_J_Forward = map_of_MEs[DirName+"/"+"JZB_lowZPt_J_Forward"]; if(mJetZBalance_lowZPt_J_Forward && mJetZBalance_lowZPt_J_Forward->getRootObject())mJetZBalance_lowZPt_J_Forward->Fill(recoJet1.pt()-zCand.Pt());
3075  mJ1Pt_over_ZPt_lowZPt_J_Forward = map_of_MEs[DirName+"/"+"J1Pt_over_ZPt_lowZPt_J_Forward"]; if(mJ1Pt_over_ZPt_lowZPt_J_Forward && mJ1Pt_over_ZPt_lowZPt_J_Forward->getRootObject())mJ1Pt_over_ZPt_lowZPt_J_Forward->Fill(recoJet1.pt()/zCand.Pt());
3076  mMPF_lowZPt_J_Forward = map_of_MEs[DirName+"/"+"MPF_lowZPt_J_Forward"]; if(mMPF_lowZPt_J_Forward && mMPF_lowZPt_J_Forward->getRootObject())mMPF_lowZPt_J_Forward->Fill(MPF);
3077  }else if (zCand.Pt()<140){
3078  mJetZBalance_mediumZPt_J_Forward = map_of_MEs[DirName+"/"+"JZB_mediumZPt_J_Forward"]; if(mJetZBalance_mediumZPt_J_Forward && mJetZBalance_mediumZPt_J_Forward->getRootObject())mJetZBalance_mediumZPt_J_Forward->Fill(recoJet1.pt()-zCand.Pt());
3079  mJ1Pt_over_ZPt_mediumZPt_J_Forward = map_of_MEs[DirName+"/"+"J1Pt_over_ZPt_mediumZPt_J_Forward"]; if(mJ1Pt_over_ZPt_mediumZPt_J_Forward && mJ1Pt_over_ZPt_mediumZPt_J_Forward->getRootObject())mJ1Pt_over_ZPt_mediumZPt_J_Forward->Fill(recoJet1.pt()/zCand.Pt());
3080  mMPF_mediumZPt_J_Forward = map_of_MEs[DirName+"/"+"MPF_mediumZPt_J_Forward"]; if(mMPF_mediumZPt_J_Forward && mMPF_mediumZPt_J_Forward->getRootObject())mMPF_mediumZPt_J_Forward->Fill(MPF);
3081  }else{
3082  mJetZBalance_highZPt_J_Forward = map_of_MEs[DirName+"/"+"JZB_highZPt_J_Forward"]; if(mJetZBalance_highZPt_J_Forward && mJetZBalance_highZPt_J_Forward->getRootObject())mJetZBalance_highZPt_J_Forward->Fill(recoJet1.pt()-zCand.Pt());
3083  mJ1Pt_over_ZPt_highZPt_J_Forward = map_of_MEs[DirName+"/"+"J1Pt_over_ZPt_highZPt_J_Forward"]; if(mJ1Pt_over_ZPt_highZPt_J_Forward && mJ1Pt_over_ZPt_highZPt_J_Forward->getRootObject())mJ1Pt_over_ZPt_highZPt_J_Forward->Fill(recoJet1.pt()/zCand.Pt());
3084  mMPF_highZPt_J_Forward = map_of_MEs[DirName+"/"+"MPF_highZPt_J_Forward"]; if(mMPF_highZPt_J_Forward && mMPF_highZPt_J_Forward->getRootObject())mMPF_highZPt_J_Forward->Fill(MPF);
3085  }
3086  if(zCand.Pt()>30){
3087  if(zCand.Pt()<55){
3088  mDeltaPt_Z_j1_over_ZPt_30_55_J_Forward = map_of_MEs[DirName+"/"+"DeltaPt_Z_j1_over_ZPt_30_55_J_Forward"];if(mDeltaPt_Z_j1_over_ZPt_30_55_J_Forward && mDeltaPt_Z_j1_over_ZPt_30_55_J_Forward->getRootObject() ) mDeltaPt_Z_j1_over_ZPt_30_55_J_Forward->Fill((zCand.Pt()-recoJet1.pt())/zCand.Pt());
3089  }else if (zCand.Pt()<100){
3090  mDeltaPt_Z_j1_over_ZPt_55_100_J_Forward = map_of_MEs[DirName+"/"+"DeltaPt_Z_j1_over_ZPt_55_100_J_Forward"];if(mDeltaPt_Z_j1_over_ZPt_55_100_J_Forward && mDeltaPt_Z_j1_over_ZPt_55_100_J_Forward->getRootObject() ) mDeltaPt_Z_j1_over_ZPt_55_100_J_Forward->Fill((zCand.Pt()-recoJet1.pt())/zCand.Pt());
3091  }else{
3092  mDeltaPt_Z_j1_over_ZPt_100_J_Forward = map_of_MEs[DirName+"/"+"DeltaPt_Z_j1_over_ZPt_100_J_Forward"];if(mDeltaPt_Z_j1_over_ZPt_100_J_Forward && mDeltaPt_Z_j1_over_ZPt_100_J_Forward->getRootObject() ) mDeltaPt_Z_j1_over_ZPt_100_J_Forward->Fill((zCand.Pt()-recoJet1.pt())/zCand.Pt());
3093  }
3094  }
3095  }
3096  int QGmulti=-1;
3097  float QGLikelihood=-10;
3098  float QGptD=-10;
3099  float QGaxis2=-10;
3100  if(fill_CHS_histos){
3101  reco::PFJetRef pfjetref(pfJets, ind1_mu_vetoed);
3102  QGmulti=(*qgMultiplicity)[pfjetref];
3103  QGLikelihood=(*qgLikelihood)[pfjetref];
3104  QGptD=(*qgptD)[pfjetref];
3105  QGaxis2=(*qgaxis2)[pfjetref];
3106  if(fabs(recoJet1.eta())<1.3){//barrel jets
3107  //fractions for barrel
3108  if (recoJet1.pt()>=20. && recoJet1.pt()<=50.) {
3109  mAxis2_lowPt_Barrel = map_of_MEs[DirName+"/"+"qg_Axis2_lowPt_Barrel"];if(mAxis2_lowPt_Barrel && mAxis2_lowPt_Barrel->getRootObject()) mAxis2_lowPt_Barrel->Fill(QGaxis2);
3110  mpTD_lowPt_Barrel = map_of_MEs[DirName+"/"+"qg_pTD_lowPt_Barrel"]; if(mpTD_lowPt_Barrel && mpTD_lowPt_Barrel->getRootObject()) mpTD_lowPt_Barrel->Fill(QGptD);
3111  mMultiplicityQG_lowPt_Barrel = map_of_MEs[DirName+"/"+"qg_multiplicity_lowPt_Barrel"]; if(mMultiplicityQG_lowPt_Barrel && mMultiplicityQG_lowPt_Barrel->getRootObject()) mMultiplicityQG_lowPt_Barrel->Fill(QGmulti);
3112  mqgLikelihood_lowPt_Barrel = map_of_MEs[DirName+"/"+"qg_Likelihood_lowPt_Barrel"]; if(mqgLikelihood_lowPt_Barrel && mqgLikelihood_lowPt_Barrel->getRootObject()) mqgLikelihood_lowPt_Barrel->Fill(QGLikelihood);
3113  }
3114  if (recoJet1.pt()>50. && recoJet1.pt()<=140.) {
3115  mAxis2_mediumPt_Barrel = map_of_MEs[DirName+"/"+"qg_Axis2_mediumPt_Barrel"];if(mAxis2_mediumPt_Barrel && mAxis2_mediumPt_Barrel->getRootObject()) mAxis2_mediumPt_Barrel->Fill(QGaxis2);
3116  mpTD_mediumPt_Barrel = map_of_MEs[DirName+"/"+"qg_pTD_mediumPt_Barrel"]; if(mpTD_mediumPt_Barrel && mpTD_mediumPt_Barrel->getRootObject()) mpTD_mediumPt_Barrel->Fill(QGptD);
3117  mMultiplicityQG_mediumPt_Barrel = map_of_MEs[DirName+"/"+"qg_multiplicity_mediumPt_Barrel"]; if(mMultiplicityQG_mediumPt_Barrel && mMultiplicityQG_mediumPt_Barrel->getRootObject()) mMultiplicityQG_mediumPt_Barrel->Fill(QGmulti);
3118  mqgLikelihood_mediumPt_Barrel = map_of_MEs[DirName+"/"+"qg_Likelihood_mediumPt_Barrel"]; if(mqgLikelihood_mediumPt_Barrel && mqgLikelihood_mediumPt_Barrel->getRootObject()) mqgLikelihood_mediumPt_Barrel->Fill(QGLikelihood);
3119  }
3120  if (recoJet1.pt()>140.) {
3121  mAxis2_highPt_Barrel = map_of_MEs[DirName+"/"+"qg_Axis2_highPt_Barrel"];if(mAxis2_highPt_Barrel && mAxis2_highPt_Barrel->getRootObject()) mAxis2_highPt_Barrel->Fill(QGaxis2);
3122  mpTD_highPt_Barrel = map_of_MEs[DirName+"/"+"qg_pTD_highPt_Barrel"]; if(mpTD_highPt_Barrel && mpTD_highPt_Barrel->getRootObject()) mpTD_highPt_Barrel->Fill(QGptD);
3123  mMultiplicityQG_highPt_Barrel = map_of_MEs[DirName+"/"+"qg_multiplicity_highPt_Barrel"]; if(mMultiplicityQG_highPt_Barrel && mMultiplicityQG_highPt_Barrel->getRootObject()) mMultiplicityQG_highPt_Barrel->Fill(QGmulti);
3124  mqgLikelihood_highPt_Barrel = map_of_MEs[DirName+"/"+"qg_Likelihood_highPt_Barrel"]; if(mqgLikelihood_highPt_Barrel && mqgLikelihood_highPt_Barrel->getRootObject()) mqgLikelihood_highPt_Barrel->Fill(QGLikelihood);
3125  }
3126  }else if(fabs(recoJet1.eta())<3.0){//endcap jets
3127  if (recoJet1.pt()>20. && recoJet1.pt()<=50.) {
3128  mAxis2_lowPt_EndCap = map_of_MEs[DirName+"/"+"qg_Axis2_lowPt_EndCap"];if(mAxis2_lowPt_EndCap && mAxis2_lowPt_EndCap->getRootObject()) mAxis2_lowPt_EndCap->Fill(QGaxis2);
3129  mpTD_lowPt_EndCap = map_of_MEs[DirName+"/"+"qg_pTD_lowPt_EndCap"]; if(mpTD_lowPt_EndCap && mpTD_lowPt_EndCap->getRootObject()) mpTD_lowPt_EndCap->Fill(QGptD);
3130  mMultiplicityQG_lowPt_EndCap = map_of_MEs[DirName+"/"+"qg_multiplicity_lowPt_EndCap"]; if(mMultiplicityQG_lowPt_EndCap && mMultiplicityQG_lowPt_EndCap->getRootObject()) mMultiplicityQG_lowPt_EndCap->Fill(QGmulti);
3131  mqgLikelihood_lowPt_EndCap = map_of_MEs[DirName+"/"+"qg_Likelihood_lowPt_EndCap"]; if(mqgLikelihood_lowPt_EndCap && mqgLikelihood_lowPt_EndCap->getRootObject()) mqgLikelihood_lowPt_EndCap->Fill(QGLikelihood);
3132  }
3133  if (recoJet1.pt()>50. && recoJet1.pt()<=140.) {
3134  mAxis2_mediumPt_EndCap = map_of_MEs[DirName+"/"+"qg_Axis2_mediumPt_EndCap"];if(mAxis2_mediumPt_EndCap && mAxis2_mediumPt_EndCap->getRootObject()) mAxis2_mediumPt_EndCap->Fill(QGaxis2);
3135  mpTD_mediumPt_EndCap = map_of_MEs[DirName+"/"+"qg_pTD_mediumPt_EndCap"]; if(mpTD_mediumPt_EndCap && mpTD_mediumPt_EndCap->getRootObject()) mpTD_mediumPt_EndCap->Fill(QGptD);
3136  mMultiplicityQG_mediumPt_EndCap = map_of_MEs[DirName+"/"+"qg_multiplicity_mediumPt_EndCap"]; if(mMultiplicityQG_mediumPt_EndCap && mMultiplicityQG_mediumPt_EndCap->getRootObject()) mMultiplicityQG_mediumPt_EndCap->Fill(QGmulti);
3137  mqgLikelihood_mediumPt_EndCap = map_of_MEs[DirName+"/"+"qg_Likelihood_mediumPt_EndCap"]; if(mqgLikelihood_mediumPt_EndCap && mqgLikelihood_mediumPt_EndCap->getRootObject()) mqgLikelihood_mediumPt_EndCap->Fill(QGLikelihood);
3138  }
3139  if (recoJet1.pt()>140.) {
3140  mAxis2_highPt_EndCap = map_of_MEs[DirName+"/"+"qg_Axis2_highPt_EndCap"];if(mAxis2_highPt_EndCap && mAxis2_highPt_EndCap->getRootObject()) mAxis2_highPt_EndCap->Fill(QGaxis2);
3141  mpTD_highPt_EndCap = map_of_MEs[DirName+"/"+"qg_pTD_highPt_EndCap"]; if(mpTD_highPt_EndCap && mpTD_highPt_EndCap->getRootObject()) mpTD_highPt_EndCap->Fill(QGptD);
3142  mMultiplicityQG_highPt_EndCap = map_of_MEs[DirName+"/"+"qg_multiplicity_highPt_EndCap"]; if(mMultiplicityQG_highPt_EndCap && mMultiplicityQG_highPt_EndCap->getRootObject()) mMultiplicityQG_highPt_EndCap->Fill(QGmulti);
3143  mqgLikelihood_highPt_EndCap = map_of_MEs[DirName+"/"+"qg_Likelihood_highPt_EndCap"]; if(mqgLikelihood_highPt_EndCap && mqgLikelihood_highPt_EndCap->getRootObject()) mqgLikelihood_highPt_EndCap->Fill(QGLikelihood);
3144  }
3145  }else{
3146  if (recoJet1.pt()>20. && recoJet1.pt()<=50.) {
3147  mAxis2_lowPt_Forward = map_of_MEs[DirName+"/"+"qg_Axis2_lowPt_Forward"];if(mAxis2_lowPt_Forward && mAxis2_lowPt_Forward->getRootObject()) mAxis2_lowPt_Forward->Fill(QGaxis2);
3148  mpTD_lowPt_Forward = map_of_MEs[DirName+"/"+"qg_pTD_lowPt_Forward"]; if(mpTD_lowPt_Forward && mpTD_lowPt_Forward->getRootObject()) mpTD_lowPt_Forward->Fill(QGptD);
3149  mMultiplicityQG_lowPt_Forward = map_of_MEs[DirName+"/"+"qg_multiplicity_lowPt_Forward"]; if(mMultiplicityQG_lowPt_Forward && mMultiplicityQG_lowPt_Forward->getRootObject()) mMultiplicityQG_lowPt_Forward->Fill(QGmulti);
3150  mqgLikelihood_lowPt_Forward = map_of_MEs[DirName+"/"+"qg_Likelihood_lowPt_Forward"]; if(mqgLikelihood_lowPt_Forward && mqgLikelihood_lowPt_Forward->getRootObject()) mqgLikelihood_lowPt_Forward->Fill(QGLikelihood);
3151  }
3152  if (recoJet1.pt()>50. && recoJet1.pt()<=140.) {
3153  mAxis2_mediumPt_Forward = map_of_MEs[DirName+"/"+"qg_Axis2_mediumPt_Forward"];if(mAxis2_mediumPt_Forward && mAxis2_mediumPt_Forward->getRootObject()) mAxis2_mediumPt_Forward->Fill(QGaxis2);
3154  mpTD_mediumPt_Forward = map_of_MEs[DirName+"/"+"qg_pTD_mediumPt_Forward"]; if(mpTD_mediumPt_Forward && mpTD_mediumPt_Forward->getRootObject()) mpTD_mediumPt_Forward->Fill(QGptD);
3155  mMultiplicityQG_mediumPt_Forward = map_of_MEs[DirName+"/"+"qg_multiplicity_mediumPt_Forward"]; if(mMultiplicityQG_mediumPt_Forward && mMultiplicityQG_mediumPt_Forward->getRootObject()) mMultiplicityQG_mediumPt_Forward->Fill(QGmulti);
3156  mqgLikelihood_mediumPt_Forward = map_of_MEs[DirName+"/"+"qg_Likelihood_mediumPt_Forward"]; if(mqgLikelihood_mediumPt_Forward && mqgLikelihood_mediumPt_Forward->getRootObject()) mqgLikelihood_mediumPt_Forward->Fill(QGLikelihood);
3157  }
3158  if (recoJet1.pt()>140.) {
3159  mAxis2_highPt_Forward = map_of_MEs[DirName+"/"+"qg_Axis2_highPt_Forward"];if(mAxis2_highPt_Forward && mAxis2_highPt_Forward->getRootObject()) mAxis2_highPt_Forward->Fill(QGaxis2);
3160  mpTD_highPt_Forward = map_of_MEs[DirName+"/"+"qg_pTD_highPt_Forward"]; if(mpTD_highPt_Forward && mpTD_highPt_Forward->getRootObject()) mpTD_highPt_Forward->Fill(QGptD);
3161  mMultiplicityQG_highPt_Forward = map_of_MEs[DirName+"/"+"qg_multiplicity_highPt_Forward"]; if(mMultiplicityQG_highPt_Forward && mMultiplicityQG_highPt_Forward->getRootObject()) mMultiplicityQG_highPt_Forward->Fill(QGmulti);
3162  mqgLikelihood_highPt_Forward = map_of_MEs[DirName+"/"+"qg_Likelihood_highPt_Forward"]; if(mqgLikelihood_highPt_Forward && mqgLikelihood_highPt_Forward->getRootObject()) mqgLikelihood_highPt_Forward->Fill(QGLikelihood);
3163  }
3164  }
3165  }//fill quark gluon tagged variables
3166  }//jet back to back to Z
3167  }//2nd jet veto
3168  }//Z selection + hard leading jet
3169 }
#define LogDebug(id)
T getParameter(std::string const &) const
EventNumber_t event() const
Definition: EventID.h:41
T getUntrackedParameter(std::string const &, T const &) const
int i
Definition: DBlmapReader.cc:9
virtual edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const
Definition: Event.cc:208
virtual void scaleEnergy(double fScale)
scale energy of the jet
bool isPFMuon(HWW &, int index, bool requireSamePt=true, float dpt_max=1.0)
JetAnalyzer(const edm::ParameterSet &)
Constructor.
Definition: JetAnalyzer.cc:64
MonitorElement * bookProfile(Args &&...args)
Definition: DQMStore.h:157
float fHPD
Definition: JetID.h:45
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:449
Base class for all types of Jets.
Definition: Jet.h:20
float restrictedEMF
Definition: JetID.h:52
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)
float fRBX
Definition: JetID.h:46
#define NULL
Definition: scimark2.h:8
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
Provides a code based selection for trigger and DCS information in order to have no failing filters i...
Strings::size_type size() const
Definition: TriggerNames.cc:39
T eta() const
Jet ID object.
Definition: JetID.h:16
tuple vertexCollection
virtual double eta() const
momentum pseudorapidity
virtual double pt() const
transverse momentum
AlgorithmMap::const_iterator CItAlgo
iterators through map containing the algorithms
triggerResultsToken_(consumes< edm::TriggerResults >(edm::InputTag("TriggerResults")))
static bool passJetId(int flag, Id level)
int iEvent
Definition: GenABIO.cc:230
void endRun(const edm::Run &, const edm::EventSetup &)
Finish up a run.
virtual ~JetAnalyzer()
Destructor.
Definition: JetAnalyzer.cc:248
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
Definition: MET.h:42
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
std::vector< bool > TechnicalTriggerWord
technical trigger bits (64 bits)
bool isValid() const
Definition: HandleBase.h:75
#define LogTrace(id)
PF Jet selector for pat::Jets.
double deltaR(double eta1, double eta2, double phi1, double phi2)
Definition: TreeUtility.cc:17
Jet selector for pat::Jets and for CaloJets.
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:274
void dqmBeginRun(const edm::Run &, const edm::EventSetup &)
Initialize run-based parameters.
T const * product() const
Definition: Handle.h:81
virtual double px() const
x coordinate of momentum vector
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:133
std::string const & triggerName(unsigned int index) const
Definition: TriggerNames.cc:27
static std::string const triggerResults("TriggerResults")
const T & get() const
Definition: EventSetup.h:55
tuple recoJets
Definition: RecoJets_cff.py:56
T const * product() const
Definition: ESHandle.h:86
void analyze(const edm::Event &, const edm::EventSetup &)
Get the analysis.
edm::EventID id() const
Definition: EventBase.h:60
virtual int nConstituents() const
of constituents
Definition: Jet.h:65
static int position[264][3]
Definition: ReadPGInfo.cc:509
void bookMESetSelection(std::string, DQMStore::IBooker &)
tuple cout
Definition: gather_cfg.py:121
const AlgorithmMap & gtTechnicalTriggerMap() const
get / set the technical trigger map
TH2F * getTH2F(void) const
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Inizialize parameters for histo binning.
Definition: JetAnalyzer.cc:259
tuple pfJets
Definition: pfJets_cff.py:8
virtual double phi() const
momentum azimuthal angle
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
virtual double py() const
y coordinate of momentum vector
short n90Hits
Definition: JetID.h:47
Definition: Run.h:41
Definition: DDAxes.h:10
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
Definition: Candidate.h:39