CMS 3D CMS Logo

JetAnalyzer_HeavyIons.cc
Go to the documentation of this file.
1 //
2 // Jet Analyzer class for heavy ion jets. for DQM jet analysis monitoring
3 // For CMSSW_7_4_X, especially reading background subtracted jets
4 // author: Raghav Kunnawalkam Elayavalli, Mohammed Zakaria (co Author)
5 // Jan 12th 2015
6 // Rutgers University, email: raghav.k.e at CERN dot CH
7 // UIC, email: mzakaria @ CERN dot CH
8 
9 
11 
12 using namespace edm;
13 using namespace reco;
14 using namespace std;
15 
16 // declare the constructors:
17 
19  mInputCollection (iConfig.getParameter<edm::InputTag> ("src")),
20  mInputPFCandCollection (iConfig.getParameter<edm::InputTag> ("PFcands")),
21  mInputCsCandCollection (iConfig.exists("CScands") ? iConfig.getParameter<edm::InputTag>("CScands") : edm::InputTag()),
22  mOutputFile (iConfig.getUntrackedParameter<std::string>("OutputFile","")),
23  JetType (iConfig.getUntrackedParameter<std::string>("JetType")),
24  UEAlgo (iConfig.getUntrackedParameter<std::string>("UEAlgo")),
25  mRecoJetPtThreshold (iConfig.getParameter<double> ("recoJetPtThreshold")),
26  mReverseEnergyFractionThreshold(iConfig.getParameter<double> ("reverseEnergyFractionThreshold")),
27  mRThreshold (iConfig.getParameter<double> ("RThreshold")),
28  JetCorrectionService (iConfig.getParameter<std::string> ("JetCorrections"))
29 {
30  std::string inputCollectionLabel(mInputCollection.label());
31 
32  isCaloJet = (std::string("calo")==JetType);
33  isJPTJet = (std::string("jpt") ==JetType);
34  isPFJet = (std::string("pf") ==JetType);
35 
36  //consumes
37  pvToken_ = consumes<std::vector<reco::Vertex> >(edm::InputTag("offlinePrimaryVertices"));
38  caloTowersToken_ = consumes<CaloTowerCollection>(edm::InputTag("towerMaker"));
39  if (isCaloJet) caloJetsToken_ = consumes<reco::CaloJetCollection>(mInputCollection);
40  if (isJPTJet) jptJetsToken_ = consumes<reco::JPTJetCollection>(mInputCollection);
41  if (isPFJet) {
42  if(std::string("Pu")==UEAlgo) basicJetsToken_ = consumes<reco::BasicJetCollection>(mInputCollection);
43  if(std::string("Cs")==UEAlgo) pfJetsToken_ = consumes<reco::PFJetCollection>(mInputCollection);
44  }
45 
46  pfCandToken_ = consumes<reco::PFCandidateCollection>(mInputPFCandCollection);
47  csCandToken_ = mayConsume<reco::PFCandidateCollection>(mInputCsCandCollection);
48  pfCandViewToken_ = consumes<reco::CandidateView>(mInputPFCandCollection);
49  caloCandViewToken_ = consumes<reco::CandidateView>(edm::InputTag("towerMaker"));
50 
51  centralityTag_ = iConfig.getParameter<InputTag>("centralitycollection");
52  centralityToken = consumes<reco::Centrality>(centralityTag_);
53 
54  centralityBinToken = mayConsume<int>(iConfig.exists("centralitybincollection") ? iConfig.getParameter<edm::InputTag> ("centralitybincollection"): edm::InputTag());
55 
56  hiVertexToken_ = consumes<std::vector<reco::Vertex> >(edm::InputTag("hiSelectedVertex"));
57 
58  etaToken_ = mayConsume<std::vector<double>>(iConfig.exists("etaMap") ? iConfig.getParameter<edm::InputTag>( "etaMap" ) : edm::InputTag());
59  rhoToken_ = mayConsume<std::vector<double>>(iConfig.exists("rho") ? iConfig.getParameter<edm::InputTag>( "rho" ) : edm::InputTag());
60  rhomToken_ = mayConsume<std::vector<double>>(iConfig.exists("rhom") ? iConfig.getParameter<edm::InputTag>( "rhom" ): edm::InputTag());
61 
62  // need to initialize the PF cand histograms : which are also event variables
63  if(isPFJet){
64  mNPFpart = nullptr;
65  mPFPt = nullptr;
66  mPFEta = nullptr;
67  mPFPhi = nullptr;
68 
69  mSumPFPt = nullptr;
70  mSumPFPt_eta = nullptr;
71  mSumSquaredPFPt = nullptr;
72  mSumSquaredPFPt_eta = nullptr;
73  mSumPFPt_HF = nullptr;
74 
75  mPFDeltaR = nullptr;
76  mPFDeltaR_Scaled_R = nullptr;
77 
78  for(int ieta=0; ieta<etaBins_; ieta++){
79  mSumPFPtEtaDep[ieta] = nullptr;
80  }
81 
82  //cs-specific histograms
83  mRhoDist_vsEta=nullptr;
84  mRhoMDist_vsEta=nullptr;
85  mRhoDist_vsPt=nullptr;
86  mRhoMDist_vsPt=nullptr;
87  //mRhoDist_vsCent=0;
88  //mRhoMDist_vsCent=0;
89 
90  rhoEtaRange=nullptr;
91  for(int ieta=0; ieta<etaBins_; ieta++){
92  mCSCandpT_vsPt[ieta]=nullptr;
93  for(int ipt=0; ipt<ptBins_; ipt++){
94  mSubtractedEFrac[ipt][ieta]=nullptr;
95  mSubtractedE[ipt][ieta]=nullptr;
96  }
97  }
98 
99  mPFCandpT_vs_eta_Unknown = nullptr; // pf id 0
100  mPFCandpT_vs_eta_ChargedHadron = nullptr; // pf id - 1
101  mPFCandpT_vs_eta_electron = nullptr; // pf id - 2
102  mPFCandpT_vs_eta_muon = nullptr; // pf id - 3
103  mPFCandpT_vs_eta_photon = nullptr; // pf id - 4
104  mPFCandpT_vs_eta_NeutralHadron = nullptr; // pf id - 5
105  mPFCandpT_vs_eta_HadE_inHF = nullptr; // pf id - 6
106  mPFCandpT_vs_eta_EME_inHF = nullptr; // pf id - 7
107 
108  mPFCandpT_Barrel_Unknown = nullptr; // pf id 0
109  mPFCandpT_Barrel_ChargedHadron = nullptr; // pf id - 1
110  mPFCandpT_Barrel_electron = nullptr; // pf id - 2
111  mPFCandpT_Barrel_muon = nullptr; // pf id - 3
112  mPFCandpT_Barrel_photon = nullptr; // pf id - 4
113  mPFCandpT_Barrel_NeutralHadron = nullptr; // pf id - 5
114  mPFCandpT_Barrel_HadE_inHF = nullptr; // pf id - 6
115  mPFCandpT_Barrel_EME_inHF = nullptr; // pf id - 7
116 
117  mPFCandpT_Endcap_Unknown = nullptr; // pf id 0
118  mPFCandpT_Endcap_ChargedHadron = nullptr; // pf id - 1
119  mPFCandpT_Endcap_electron = nullptr; // pf id - 2
120  mPFCandpT_Endcap_muon = nullptr; // pf id - 3
121  mPFCandpT_Endcap_photon = nullptr; // pf id - 4
122  mPFCandpT_Endcap_NeutralHadron = nullptr; // pf id - 5
123  mPFCandpT_Endcap_HadE_inHF = nullptr; // pf id - 6
124  mPFCandpT_Endcap_EME_inHF = nullptr; // pf id - 7
125 
126  mPFCandpT_Forward_Unknown = nullptr; // pf id 0
127  mPFCandpT_Forward_ChargedHadron = nullptr; // pf id - 1
128  mPFCandpT_Forward_electron = nullptr; // pf id - 2
129  mPFCandpT_Forward_muon = nullptr; // pf id - 3
130  mPFCandpT_Forward_photon = nullptr; // pf id - 4
131  mPFCandpT_Forward_NeutralHadron = nullptr; // pf id - 5
132  mPFCandpT_Forward_HadE_inHF = nullptr; // pf id - 6
133  mPFCandpT_Forward_EME_inHF = nullptr; // pf id - 7
134 
135  }
136  if(isCaloJet){
137  mNCalopart = nullptr;
138  mCaloPt = nullptr;
139  mCaloEta = nullptr;
140  mCaloPhi = nullptr;
141 
142  mSumCaloPt = nullptr;
143  mSumCaloPt_eta = nullptr;
144  mSumSquaredCaloPt = nullptr;
145  mSumSquaredCaloPt_eta = nullptr;
146  mSumCaloPt_HF = nullptr;
147 
148  for(int ieta=0; ieta<etaBins_; ieta++){
149  mSumCaloPtEtaDep[ieta]=nullptr;
150  }
151  }
152 
153  mSumpt = nullptr;
154 
155  // Events variables
156  mNvtx = nullptr;
157  mHF = nullptr;
158 
159  // added Jan 12th 2015
160 
161  // Jet parameters
162  mEta = nullptr;
163  mPhi = nullptr;
164  mEnergy = nullptr;
165  mP = nullptr;
166  mPt = nullptr;
167  mMass = nullptr;
168  mConstituents = nullptr;
169  mJetArea = nullptr;
170  mjetpileup = nullptr;
171  mNJets_40 = nullptr;
172  mNJets = nullptr;
173 
174 
175 }
176 
178 {
179 
180  ibooker.setCurrentFolder("JetMET/HIJetValidation/"+mInputCollection.label());
181 
182  TH2F *h2D_etabins_vs_pt2 = new TH2F("h2D_etabins_vs_pt2",";#eta;sum p_{T}^{2}",etaBins_,edge_pseudorapidity,10000,0,10000);
183  TH2F *h2D_etabins_vs_pt = new TH2F("h2D_etabins_vs_pt",";#eta;sum p_{T}",etaBins_,edge_pseudorapidity,500,0,500);
184  TH2F *h2D_pfcand_etabins_vs_pt = new TH2F("h2D_etabins_vs_pt",";#eta;sum p_{T}",etaBins_,edge_pseudorapidity,300, 0, 300);
185 
186  TH2F *h2D_etabins_forRho = new TH2F("etabinsForRho","",etaBins_, edge_pseudorapidity, 500,0,300);
187  TH2F *h2D_ptBins_forRho = new TH2F("ptBinsForRho","",300,0,300,500,0,300);
188  TH2F *h2D_centBins_forRho = new TH2F("centBinsForRho","",200,0,200,500,0,300);
189 
190  TH2F *h2D_etabins_forRhoM = new TH2F("etabinsForRho","",etaBins_, edge_pseudorapidity, 100,0,1.5);
191  TH2F *h2D_ptBins_forRhoM = new TH2F("ptBinsForRho","",300,0,300,100,0,1.5);
192  //TH2F *h2D_centBins_forRhoM = new TH2F("centBinsForRho","",200,0,200,100,0,1.5);
193 
194  if(isPFJet){
195 
196  mNPFpart = ibooker.book1D("NPFpart","No of particle flow candidates",1000,0,1000);
197  mPFPt = ibooker.book1D("PFPt","PF candidate p_{T}",10000,-500,500);
198  mPFEta = ibooker.book1D("PFEta","PF candidate #eta",120,-6,6);
199  mPFPhi = ibooker.book1D("PFPhi","PF candidate #phi",70,-3.5,3.5);
200 
201  mPFDeltaR = ibooker.book1D("PFDeltaR","PF candidate DeltaR",100,0,4); //MZ
202  mPFDeltaR_Scaled_R = ibooker.book1D("PFDeltaR_Scaled_R","PF candidate DeltaR Divided by DeltaR square",100,0,4); //MZ
203 
204  mSumPFPt = ibooker.book1D("SumPFPt","Sum of initial PF p_{T}",1000,-10000,10000);
205  mSumPFPt_eta = ibooker.book2D("SumPFPt_etaBins",h2D_etabins_vs_pt);
206 
207  mSumSquaredPFPt = ibooker.book1D("SumSquaredPFPt","Sum of initial PF p_{T} squared",10000,0,10000);
208  mSumSquaredPFPt_eta = ibooker.book2D("SumSquaredPFPt_etaBins",h2D_etabins_vs_pt2);
209 
210  mSumPFPt_HF = ibooker.book2D("SumPFPt_HF","HF energy (y axis) vs Sum initial PF p_{T} (x axis)",1000,-1000,1000,1000,0,10000);
211 
212  for(int ieta=0; ieta<etaBins_; ieta++){
213  int range = 1000;
214  if(ieta<2 || etaBins_-ieta<=2) range = 500;
215  const char* lc = edge_pseudorapidity[ieta]<0 ? "n":"p";
216  const char* rc = edge_pseudorapidity[ieta+1]<0 ? "n":"p";
217  std::string histoName = Form("mSumCaloPt_%s%.3g_%s%.3g",lc,abs(edge_pseudorapidity[ieta]),rc,abs(edge_pseudorapidity[ieta+1]));
218  for(int id=0; id<2; id++){ if(histoName.find(".")!=std::string::npos) { histoName.replace(histoName.find("."), 1, "p"); } }
219  mSumPFPtEtaDep[ieta] = ibooker.book1D(histoName.c_str(),Form("Sum PFPt in the eta range %.3g to %.3g",edge_pseudorapidity[ieta],edge_pseudorapidity[ieta+1]),500,0,range);
220  }
221 
222  if(std::string("Cs")==UEAlgo){
223  mRhoDist_vsEta= ibooker.book2D("rhoDist_vsEta",h2D_etabins_forRho);
224  mRhoMDist_vsEta= ibooker.book2D("rhoMDist_vsEta",h2D_etabins_forRhoM);
225  mRhoDist_vsPt= ibooker.book2D("rhoDist_vsPt",h2D_ptBins_forRho);
226  mRhoMDist_vsPt= ibooker.book2D("rhoMDist_vsPt",h2D_ptBins_forRhoM);
227  //mRhoDist_vsCent=ibooker.book2D("rhoDist_vsCent",h2D_centBins_forRho);
228  //mRhoMDist_vsCent=ibooker.book2D("rhoMDist_vsCent",h2D_centBins_forRhoM);
229 
230  //this is kind of a janky way to fill the eta since i can't get it from the edm::Event here... - kjung
231  rhoEtaRange=ibooker.book1D("rhoEtaRange","",500,-5.5,5.5);
232  for(int ieta=0; ieta<etaBins_; ieta++){
233  mCSCandpT_vsPt[ieta]=ibooker.book1D(Form("csCandPt_etaBin%d",ieta),"CS candidate pt, eta-by-eta",150,0,300);
234  for(int ipt=0; ipt<ptBins_; ipt++){
235  mSubtractedEFrac[ipt][ieta]= ibooker.book1D(Form("subtractedEFrac_JetPt%d_to_%d_etaBin%d",ptBin[ipt],ptBin[ipt+1],ieta),"subtracted fraction of CS jet",50,0,1);
236  mSubtractedE[ipt][ieta]= ibooker.book1D(Form("subtractedE_JetPt%d_to_%d_etaBin%d",ptBin[ipt],ptBin[ipt+1],ieta),"subtracted total of CS jet",300,0,300);
237  }
238  mCSCand_corrPFcand[ieta] = ibooker.book2D(Form("csCandCorrPF%d",ieta), "CS to PF candidate correlation, eta-by-eta",300,0,300,300,0,300);
239  }
240  }
241 
242  mPFCandpT_vs_eta_Unknown = ibooker.book2D("PF_cand_X_unknown",h2D_pfcand_etabins_vs_pt); // pf id 0
243  mPFCandpT_vs_eta_ChargedHadron = ibooker.book2D("PF_cand_chargedHad",h2D_pfcand_etabins_vs_pt); // pf id - 1
244  mPFCandpT_vs_eta_electron = ibooker.book2D("PF_cand_electron",h2D_pfcand_etabins_vs_pt); // pf id - 2
245  mPFCandpT_vs_eta_muon = ibooker.book2D("PF_cand_muon",h2D_pfcand_etabins_vs_pt); // pf id - 3
246  mPFCandpT_vs_eta_photon = ibooker.book2D("PF_cand_photon",h2D_pfcand_etabins_vs_pt); // pf id - 4
247  mPFCandpT_vs_eta_NeutralHadron = ibooker.book2D("PF_cand_neutralHad",h2D_pfcand_etabins_vs_pt); // pf id - 5
248  mPFCandpT_vs_eta_HadE_inHF = ibooker.book2D("PF_cand_HadEner_inHF",h2D_pfcand_etabins_vs_pt); // pf id - 6
249  mPFCandpT_vs_eta_EME_inHF = ibooker.book2D("PF_cand_EMEner_inHF",h2D_pfcand_etabins_vs_pt); // pf id - 7
250 
251  mPFCandpT_Barrel_Unknown = ibooker.book1D("mPFCandpT_Barrel_Unknown",Form(";PF candidate p_{T}, |#eta|<%2.2f; counts", BarrelEta),300, 0, 300); // pf id - 0
252  mPFCandpT_Barrel_ChargedHadron = ibooker.book1D("mPFCandpT_Barrel_ChargedHadron",Form(";PF candidate p_{T}, |#eta|<%2.2f; counts", BarrelEta),300, 0, 300); // pf id - 1
253  mPFCandpT_Barrel_electron = ibooker.book1D("mPFCandpT_Barrel_electron",Form(";PF candidate p_{T}, |#eta|<%2.2f; counts", BarrelEta),300, 0, 300); // pf id - 2
254  mPFCandpT_Barrel_muon = ibooker.book1D("mPFCandpT_Barrel_muon",Form(";PF candidate p_{T}, |#eta|<%2.2f; counts", BarrelEta),300, 0, 300); // pf id - 3
255  mPFCandpT_Barrel_photon = ibooker.book1D("mPFCandpT_Barrel_photon",Form(";PF candidate p_{T}, |#eta|<%2.2f; counts", BarrelEta),300, 0, 300); // pf id - 4
256  mPFCandpT_Barrel_NeutralHadron = ibooker.book1D("mPFCandpT_Barrel_NeutralHadron",Form(";PF candidate p_{T}, |#eta|<%2.2f; counts", BarrelEta),300, 0, 300); // pf id - 5
257  mPFCandpT_Barrel_HadE_inHF = ibooker.book1D("mPFCandpT_Barrel_HadE_inHF",Form(";PF candidate p_{T}, |#eta|<%2.2f; counts", BarrelEta),300, 0, 300); // pf id - 6
258  mPFCandpT_Barrel_EME_inHF = ibooker.book1D("mPFCandpT_Barrel_EME_inHF",Form(";PF candidate p_{T}, |#eta|<%2.2f; counts", BarrelEta),300, 0, 300); // pf id - 7
259 
260  mPFCandpT_Endcap_Unknown = ibooker.book1D("mPFCandpT_Endcap_Unknown",Form(";PF candidate p_{T}, %2.2f<|#eta|<%2.2f; counts", BarrelEta, EndcapEta),300, 0, 300); // pf id - 0
261  mPFCandpT_Endcap_ChargedHadron = ibooker.book1D("mPFCandpT_Endcap_ChargedHadron",Form(";PF candidate p_{T}, %2.2f<|#eta|<%2.2f; counts", BarrelEta, EndcapEta),300, 0, 300); // pf id - 1
262  mPFCandpT_Endcap_electron = ibooker.book1D("mPFCandpT_Endcap_electron",Form(";PF candidate p_{T}, %2.2f<|#eta|<%2.2f; counts", BarrelEta, EndcapEta),300, 0, 300); // pf id - 2
263  mPFCandpT_Endcap_muon = ibooker.book1D("mPFCandpT_Endcap_muon",Form(";PF candidate p_{T}, %2.2f<|#eta|<%2.2f; counts", BarrelEta, EndcapEta),300, 0, 300); // pf id - 3
264  mPFCandpT_Endcap_photon = ibooker.book1D("mPFCandpT_Endcap_photon",Form(";PF candidate p_{T}, %2.2f<|#eta|<%2.2f; counts", BarrelEta, EndcapEta),300, 0, 300); // pf id - 4
265  mPFCandpT_Endcap_NeutralHadron = ibooker.book1D("mPFCandpT_Endcap_NeutralHadron",Form(";PF candidate p_{T}, %2.2f<|#eta|<%2.2f; counts", BarrelEta, EndcapEta),300, 0, 300); // pf id - 5
266  mPFCandpT_Endcap_HadE_inHF = ibooker.book1D("mPFCandpT_Endcap_HadE_inHF",Form(";PF candidate p_{T}, %2.2f<|#eta|<%2.2f; counts", BarrelEta, EndcapEta),300, 0, 300); // pf id - 6
267  mPFCandpT_Endcap_EME_inHF = ibooker.book1D("mPFCandpT_Endcap_EME_inHF",Form(";PF candidate p_{T}, %2.2f<|#eta|<%2.2f; counts", BarrelEta, EndcapEta),300, 0, 300); // pf id - 7
268 
269  mPFCandpT_Forward_Unknown = ibooker.book1D("mPFCandpT_Forward_Unknown",Form(";PF candidate p_{T}, %2.2f<|#eta|<%2.2f; counts", EndcapEta, ForwardEta),300, 0, 300); // pf id - 0
270  mPFCandpT_Forward_ChargedHadron = ibooker.book1D("mPFCandpT_Forward_ChargedHadron",Form(";PF candidate p_{T}, %2.2f<|#eta|<%2.2f; counts", EndcapEta, ForwardEta),300, 0, 300); // pf id - 1
271  mPFCandpT_Forward_electron = ibooker.book1D("mPFCandpT_Forward_electron",Form(";PF candidate p_{T}, %2.2f<|#eta|<%2.2f; counts", EndcapEta, ForwardEta),300, 0, 300); // pf id - 2
272  mPFCandpT_Forward_muon = ibooker.book1D("mPFCandpT_Forward_muon",Form(";PF candidate p_{T}, %2.2f<|#eta|<%2.2f; counts", EndcapEta, ForwardEta),300, 0, 300); // pf id - 3
273  mPFCandpT_Forward_photon = ibooker.book1D("mPFCandpT_Forward_photon",Form(";PF candidate p_{T}, %2.2f<|#eta|<%2.2f; counts", EndcapEta, ForwardEta),300, 0, 300); // pf id - 4
274  mPFCandpT_Forward_NeutralHadron = ibooker.book1D("mPFCandpT_Forward_NeutralHadron",Form(";PF candidate p_{T}, %2.2f<|#eta|<%2.2f; counts", EndcapEta, ForwardEta),300, 0, 300); // pf id - 5
275  mPFCandpT_Forward_HadE_inHF = ibooker.book1D("mPFCandpT_Forward_HadE_inHF",Form(";PF candidate p_{T}, %2.2f<|#eta|<%2.2f; counts", EndcapEta, ForwardEta),300, 0, 300); // pf id - 6
276  mPFCandpT_Forward_EME_inHF = ibooker.book1D("mPFCandpT_Forward_EME_inHF",Form(";PF candidate p_{T}, %2.2f<|#eta|<%2.2f; counts", EndcapEta, ForwardEta),300, 0, 300); // pf id - 7
277 
278  }
279 
280  if(isCaloJet){
281 
282  mNCalopart = ibooker.book1D("NCalopart","No of particle flow candidates",1000,0,10000);
283  mCaloPt = ibooker.book1D("CaloPt","Calo candidate p_{T}",1000,-5000,5000);
284  mCaloEta = ibooker.book1D("CaloEta","Calo candidate #eta",120,-6,6);
285  mCaloPhi = ibooker.book1D("CaloPhi","Calo candidate #phi",70,-3.5,3.5);
286 
287  mSumCaloPt = ibooker.book1D("SumCaloPt","Sum Calo p_{T}",1000,-10000,10000);
288  mSumCaloPt_eta = ibooker.book2D("SumCaloPt_etaBins",h2D_etabins_vs_pt);
289 
290  mSumSquaredCaloPt = ibooker.book1D("SumSquaredCaloPt","Sum of initial Calo tower p_{T} squared",10000,0,10000);
291  mSumSquaredCaloPt_eta = ibooker.book2D("SumSquaredCaloPt_etaBins",h2D_etabins_vs_pt2);
292 
293  mSumCaloPt_HF = ibooker.book2D("SumCaloPt_HF","HF Energy (y axis) vs Sum Calo tower p_{T}",1000,-1000,1000,1000,0,10000);
294 
295  for(int ieta=0; ieta<etaBins_; ieta++){
296  int range = 1000;
297  if(ieta<2 || etaBins_-ieta<=2) range = 5000;
298  const char* lc = edge_pseudorapidity[ieta]<0 ? "n":"p";
299  const char* rc = edge_pseudorapidity[ieta+1]<0 ? "n":"p";
300  std::string histoName = Form("mSumCaloPt_%s%.3g_%s%.3g",lc,abs(edge_pseudorapidity[ieta]),rc,abs(edge_pseudorapidity[ieta+1]));
301  for(int id=0; id<2; id++){ if(histoName.find(".")!=std::string::npos){ histoName.replace(histoName.find("."), 1, "p"); } }
302  mSumCaloPtEtaDep[ieta] = ibooker.book1D(histoName.c_str(),Form("Sum Calo tower Pt in the eta range %.3g to %.3g",edge_pseudorapidity[ieta],edge_pseudorapidity[ieta+1]),1000,-1*range,range);
303  }
304  }
305 
306  // particle flow variables histograms
307  mSumpt = ibooker.book1D("SumpT","Sum p_{T} of all the PF candidates per event",1000,0,10000);
308 
309  // Event variables
310  mNvtx = ibooker.book1D("Nvtx", "number of vertices", 60, 0, 60);
311  mHF = ibooker.book1D("HF", "HF energy distribution",1000,0,10000);
312 
313  // Jet parameters
314  mEta = ibooker.book1D("Eta", "Eta", 120, -6, 6);
315  mPhi = ibooker.book1D("Phi", "Phi", 70, -3.5, 3.5);
316  mPt = ibooker.book1D("Pt", "Pt", 1000, 0, 500);
317  mP = ibooker.book1D("P", "P", 100, 0, 1000);
318  mEnergy = ibooker.book1D("Energy", "Energy", 100, 0, 1000);
319  mMass = ibooker.book1D("Mass", "Mass", 100, 0, 200);
320  mConstituents = ibooker.book1D("Constituents", "Constituents", 100, 0, 100);
321  mJetArea = ibooker.book1D("JetArea", "JetArea", 100, 0, 4);
322  mjetpileup = ibooker.book1D("jetPileUp","jetPileUp",100,0,150);
323  mNJets_40 = ibooker.book1D("NJets_pt_greater_40", "NJets pT > 40 GeV", 50, 0, 50);
324  mNJets = ibooker.book1D("NJets", "NJets", 100, 0, 100);
325 
326  if (mOutputFile.empty ())
327  LogInfo("OutputInfo") << " Histograms will NOT be saved";
328  else
329  LogInfo("OutputInfo") << " Histograms will be saved to file:" << mOutputFile;
330 
331  delete h2D_etabins_vs_pt2;
332  delete h2D_etabins_vs_pt;
333  delete h2D_pfcand_etabins_vs_pt;
334  delete h2D_etabins_forRho;
335  delete h2D_ptBins_forRho;
336  delete h2D_centBins_forRho;
337 
338 }
339 
340 
341 
342 //------------------------------------------------------------------------------
343 // ~JetAnalyzer_HeavyIons
344 //------------------------------------------------------------------------------
346 
347 
348 //------------------------------------------------------------------------------
349 // beginJob
350 //------------------------------------------------------------------------------
351 //void JetAnalyzer_HeavyIons::beginJob() {
352 //}
353 
354 
355 //------------------------------------------------------------------------------
356 // endJob
357 //------------------------------------------------------------------------------
358 //void JetAnalyzer_HeavyIons::endJob()
359 //{
360 // if (!mOutputFile.empty() && &*edm::Service<DQMStore>())
361 // {
362 // edm::Service<DQMStore>()->save(mOutputFile);
363 // }
364 //}
365 
366 
367 //------------------------------------------------------------------------------
368 // analyze
369 //------------------------------------------------------------------------------
371 {
372 
373  // switch(mEvent.id().event() == 15296770)
374  // case 1:
375  // break;
376 
377  // Get the primary vertices
379  mEvent.getByToken(pvToken_, pvHandle);
380  reco::Vertex::Point vtx(0,0,0);
382 
383  mEvent.getByToken(hiVertexToken_, vtxs);
384  int greatestvtx = 0;
385  int nVertex = vtxs->size();
386 
387  for (unsigned int i = 0 ; i< vtxs->size(); ++i){
388  unsigned int daughter = (*vtxs)[i].tracksSize();
389  if( daughter > (*vtxs)[greatestvtx].tracksSize()) greatestvtx = i;
390  }
391 
392  if(nVertex<=0){
393  vtx = reco::Vertex::Point(0,0,0);
394  }
395  vtx = (*vtxs)[greatestvtx].position();
396 
397  int nGoodVertices = 0;
398 
399  if (pvHandle.isValid())
400  {
401  for (unsigned i=0; i<pvHandle->size(); i++)
402  {
403  if ((*pvHandle)[i].ndof() > 4 &&
404  (fabs((*pvHandle)[i].z()) <= 24) &&
405  (fabs((*pvHandle)[i].position().rho()) <= 2))
406  nGoodVertices++;
407  }
408  }
409 
410  mNvtx->Fill(nGoodVertices);
411 
412  // Get the Jet collection
413  //----------------------------------------------------------------------------
414 
415  std::vector<Jet> recoJets;
416  recoJets.clear();
417 
422 
423  // Get the Particle flow candidates and the Voronoi variables
426  edm::Handle<CaloTowerCollection> caloCandidates;
427  edm::Handle<reco::CandidateView> pfcandidates_;
428  edm::Handle<reco::CandidateView> calocandidates_;
429 
430  //Get the new CS stuff
434  if(std::string("Cs")==UEAlgo){
435  mEvent.getByToken(etaToken_, etaRanges);
436  mEvent.getByToken(rhoToken_, rho);
437  mEvent.getByToken(rhomToken_, rhom);
438  const int rhoSize = (int)etaRanges->size();
439  double rhoRange[rhoSize];
440  for(int irho=0; irho<rhoSize; irho++){ rhoRange[irho]=etaRanges->at(irho); }
441  double yaxisLimits[501];
442  for(int ibin=0; ibin<501; ibin++) yaxisLimits[ibin] = ibin*2;
443  if(mRhoDist_vsEta->getNbinsX() != rhoSize-1){
444  mRhoDist_vsEta->getTH2F()->SetBins(rhoSize-1,const_cast<double*>(rhoRange),500,const_cast<double*>(yaxisLimits));
445  mRhoMDist_vsEta->getTH2F()->SetBins(rhoSize-1,const_cast<double*>(rhoRange),500,const_cast<double*>(yaxisLimits));
446  }
447  }
448 
449  if (isCaloJet) mEvent.getByToken(caloJetsToken_, caloJets);
450  if (isJPTJet) mEvent.getByToken(jptJetsToken_, jptJets);
451  if (isPFJet) {
452  if(std::string("Pu")==UEAlgo) mEvent.getByToken(basicJetsToken_, basicJets);
453  if(std::string("Cs")==UEAlgo) mEvent.getByToken(pfJetsToken_, pfJets);
454  if(std::string("Vs")==UEAlgo) return; //avoid running Vs jets
455  }
456 
457  mEvent.getByToken(pfCandToken_, pfCandidates);
458  mEvent.getByToken(pfCandViewToken_, pfcandidates_);
459  if(std::string("Cs")==UEAlgo) mEvent.getByToken(csCandToken_, csCandidates);
460 
461  mEvent.getByToken(caloTowersToken_, caloCandidates);
462  mEvent.getByToken(caloCandViewToken_, calocandidates_);
463 
464  // get the centrality
466  mEvent.getByToken(centralityToken, cent); //_centralitytag comes from the cfg
467 
468  mHF->Fill(cent->EtHFtowerSum());
469  Float_t HF_energy = cent->EtHFtowerSum();
470 
471  //for later when centrality gets added to RelVal
472  //edm::Handle<int> cbin;
473  //mEvent.getByToken(centralityBinToken, cbin);
474 
475  if (!cent.isValid()) return;
476 
477  /*int hibin = -999;
478  if(cbin.isValid()){
479  hibin = *cbin;
480  }*/
481 
482  const reco::PFCandidateCollection *pfCandidateColl = pfCandidates.product();
483 
484  Int_t NPFpart = 0;
485  Int_t NCaloTower = 0;
486  Float_t pfPt = 0;
487  Float_t pfEta = 0;
488  Float_t pfPhi = 0;
489  Int_t pfID = 0;
490  Float_t pfDeltaR = 0;
491  Float_t caloPt = 0;
492  Float_t caloEta = 0;
493  Float_t caloPhi = 0;
494  Float_t SumPt_value = 0;
495 
496  vector < vector <float> > numbers;
497  vector <float> tempVector;
498  numbers.clear();
499  tempVector.clear();
500 
501  if(isCaloJet){
502 
503  Float_t SumCaloPt[etaBins_];
504  Float_t SumSquaredCaloPt[etaBins_];
505 
506  // Need to set up histograms to get the RMS values for each pT bin
507  TH1F *hSumCaloPt[nedge_pseudorapidity-1];
508 
509  for(int i = 0;i<etaBins_;++i)
510  {
511  SumCaloPt[i] = 0;
512  SumSquaredCaloPt[i] = 0;
513  hSumCaloPt[i] = new TH1F(Form("hSumCaloPt_%d",i),"",10000,-10000,10000);
514 
515  }
516 
517  for(unsigned icand = 0;icand<caloCandidates->size(); icand++){
518 
519  const CaloTower & tower = (*caloCandidates)[icand];
520  reco::CandidateViewRef ref(calocandidates_,icand);
521  //10 is tower pT min
522  if(tower.p4(vtx).Et() < 0.1) continue;
523 
524  NCaloTower++;
525 
526  caloPt = tower.p4(vtx).Et();
527  caloEta = tower.p4(vtx).Eta();
528  caloPhi = tower.p4(vtx).Phi();
529 
530 
531  for(size_t k = 0;k<nedge_pseudorapidity-1; k++){
532  if(caloEta >= edge_pseudorapidity[k] && caloEta < edge_pseudorapidity[k+1]){
533  SumCaloPt[k] = SumCaloPt[k] + caloPt;
534  SumSquaredCaloPt[k] = SumSquaredCaloPt[k] + caloPt*caloPt;
535  break;
536  }// eta selection statement
537 
538  }// eta bin loop
539 
540  SumPt_value = SumPt_value + caloPt;
541 
542  mCaloPt->Fill(caloPt);
543  mCaloEta->Fill(caloEta);
544  mCaloPhi->Fill(caloPhi);
545 
546  }// calo tower candidate loop
547 
548  for(int k = 0;k<nedge_pseudorapidity-1;k++){
549 
550  hSumCaloPt[k]->Fill(SumCaloPt[k]);
551 
552  }// eta bin loop
553 
554  Float_t Evt_SumCaloPt = 0;
555  Float_t Evt_SumSquaredCaloPt = 0;
556 
557  for(int ieta=0; ieta<etaBins_; ieta++){
558  mSumCaloPtEtaDep[ieta]->Fill(SumCaloPt[ieta]);
559  }
560 
561  for(size_t k = 0;k<nedge_pseudorapidity-1;k++){
562 
563  Evt_SumCaloPt = Evt_SumCaloPt + SumCaloPt[k];
564  mSumCaloPt_eta->Fill(edge_pseudorapidity[k],SumCaloPt[k]);
565 
566  Evt_SumSquaredCaloPt = Evt_SumSquaredCaloPt + SumSquaredCaloPt[k];
567  mSumSquaredCaloPt_eta->Fill(edge_pseudorapidity[k],hSumCaloPt[k]->GetRMS(1));
568 
569  delete hSumCaloPt[k];
570 
571  }// eta bin loop
572 
573  mSumCaloPt->Fill(Evt_SumCaloPt);
574  mSumCaloPt_HF->Fill(Evt_SumCaloPt,HF_energy);
575 
576  mSumSquaredCaloPt->Fill(Evt_SumSquaredCaloPt);
577 
578  mNCalopart->Fill(NCaloTower);
579  mSumpt->Fill(SumPt_value);
580 
581  }// is calo jet
582 
583  if(isPFJet){
584 
585  Float_t SumPFPt[etaBins_];
586 
587  Float_t SumSquaredPFPt[etaBins_];
588 
589  // Need to set up histograms to get the RMS values for each pT bin
590  TH1F *hSumPFPt[nedge_pseudorapidity-1];
591 
592  for(int i = 0;i<etaBins_;i++){
593 
594  SumPFPt[i] = 0;
595  SumSquaredPFPt[i] = 0;
596 
597  hSumPFPt[i] = new TH1F(Form("hSumPFPt_%d",i),"",10000,-10000,10000);
598 
599  }
600 
601  vector<vector <float> > PF_Space(1,vector<float>(3));
602 
603  if(std::string("Cs")==UEAlgo){
604  const reco::PFCandidateCollection *csCandidateColl = csCandidates.product();
605 
606  for(unsigned iCScand=0; iCScand<csCandidateColl->size(); iCScand++){
607  assert(csCandidateColl->size() <= pfCandidateColl->size());
608  const reco::PFCandidate csCandidate = csCandidateColl->at(iCScand);
609  const reco::PFCandidate pfCandidate = pfCandidateColl->at(iCScand);
610  int ieta=0;
611  while(csCandidate.eta()>edge_pseudorapidity[ieta] && ieta<etaBins_-1) ieta++;
612  mCSCandpT_vsPt[ieta]->Fill(csCandidate.pt());
613  mCSCand_corrPFcand[ieta]->Fill(csCandidate.pt(), pfCandidate.pt());
614  }
615  }
616 
617  for(unsigned icand=0;icand<pfCandidateColl->size(); icand++)
618  {
619  const reco::PFCandidate pfCandidate = pfCandidateColl->at(icand);
620  reco::CandidateViewRef ref(pfcandidates_,icand);
621  if(pfCandidate.pt() < 5) continue;
622 
623  NPFpart++;
624  pfPt = pfCandidate.pt();
625  pfEta = pfCandidate.eta();
626  pfPhi = pfCandidate.phi();
627  pfID = pfCandidate.particleId();
628 
629  bool isBarrel = false;
630  bool isEndcap = false;
631  bool isForward = false;
632 
633  if(fabs(pfEta)<BarrelEta) isBarrel = true;
634  if(fabs(pfEta)>=BarrelEta && fabs(pfEta)<EndcapEta) isEndcap = true;
635  if(fabs(pfEta)>=EndcapEta && fabs(pfEta)<ForwardEta) isForward = true;
636 
637  switch(pfID){
638  case 0 :
639  mPFCandpT_vs_eta_Unknown->Fill(pfPt, pfEta);
640  if(isBarrel) mPFCandpT_Barrel_Unknown->Fill(pfPt);
641  if(isEndcap) mPFCandpT_Endcap_Unknown->Fill(pfPt);
642  if(isForward) mPFCandpT_Forward_Unknown->Fill(pfPt);
643  case 1 :
644  mPFCandpT_vs_eta_ChargedHadron->Fill(pfPt, pfEta);
645  if(isBarrel) mPFCandpT_Barrel_ChargedHadron->Fill(pfPt);
646  if(isEndcap) mPFCandpT_Endcap_ChargedHadron->Fill(pfPt);
647  if(isForward) mPFCandpT_Forward_ChargedHadron->Fill(pfPt);
648  case 2 :
649  mPFCandpT_vs_eta_electron->Fill(pfPt, pfEta);
650  if(isBarrel) mPFCandpT_Barrel_electron->Fill(pfPt);
651  if(isEndcap) mPFCandpT_Endcap_electron->Fill(pfPt);
652  if(isForward) mPFCandpT_Forward_electron->Fill(pfPt);
653  case 3 :
654  mPFCandpT_vs_eta_muon->Fill(pfPt, pfEta);
655  if(isBarrel) mPFCandpT_Barrel_muon->Fill(pfPt);
656  if(isEndcap) mPFCandpT_Endcap_muon->Fill(pfPt);
657  if(isForward) mPFCandpT_Forward_muon->Fill(pfPt);
658  case 4 :
659  mPFCandpT_vs_eta_photon->Fill(pfPt, pfEta);
660  if(isBarrel) mPFCandpT_Barrel_photon->Fill(pfPt);
661  if(isEndcap) mPFCandpT_Endcap_photon->Fill(pfPt);
662  if(isForward) mPFCandpT_Forward_photon->Fill(pfPt);
663  case 5 :
664  mPFCandpT_vs_eta_NeutralHadron->Fill(pfPt, pfEta);
665  if(isBarrel) mPFCandpT_Barrel_NeutralHadron->Fill(pfPt);
666  if(isEndcap) mPFCandpT_Endcap_NeutralHadron->Fill(pfPt);
667  if(isForward) mPFCandpT_Forward_NeutralHadron->Fill(pfPt);
668  case 6 :
669  mPFCandpT_vs_eta_HadE_inHF->Fill(pfPt, pfEta);
670  if(isBarrel) mPFCandpT_Barrel_HadE_inHF->Fill(pfPt);
671  if(isEndcap) mPFCandpT_Endcap_HadE_inHF->Fill(pfPt);
672  if(isForward) mPFCandpT_Forward_HadE_inHF->Fill(pfPt);
673  case 7 :
674  mPFCandpT_vs_eta_EME_inHF->Fill(pfPt, pfEta);
675  if(isBarrel) mPFCandpT_Barrel_EME_inHF->Fill(pfPt);
676  if(isEndcap) mPFCandpT_Endcap_EME_inHF->Fill(pfPt);
677  if(isForward) mPFCandpT_Forward_EME_inHF->Fill(pfPt);
678  }
679 
680 
681  //Fill 2d vector matrix
682  tempVector.push_back(pfPt);
683  tempVector.push_back(pfEta);
684  tempVector.push_back(pfPhi);
685 
686  numbers.push_back(tempVector);
687  tempVector.clear();
688 
689  for(size_t k = 0;k<nedge_pseudorapidity-1; k++)
690  {
691  if(pfEta >= edge_pseudorapidity[k] && pfEta < edge_pseudorapidity[k+1]){
692  SumPFPt[k] = SumPFPt[k] + pfPt;
693  SumSquaredPFPt[k] = SumSquaredPFPt[k] + pfPt*pfPt;
694  break;
695  }// eta selection statement
696 
697  }// eta bin loop
698 
699  SumPt_value = SumPt_value + pfPt;
700 
701  mPFPt->Fill(pfPt);
702  mPFEta->Fill(pfEta);
703  mPFPhi->Fill(pfPhi);
704 
705  }// pf candidate loop
706 
707  for(int k = 0;k<nedge_pseudorapidity-1;k++){
708 
709  hSumPFPt[k]->Fill(SumPFPt[k]);
710 
711  }// eta bin loop
712 
713  Float_t Evt_SumPFPt = 0;
714  Float_t Evt_SumSquaredPFPt = 0;
715 
716  for(int ieta=0; ieta<etaBins_; ieta++){
717  mSumPFPtEtaDep[ieta]->Fill(SumPFPt[ieta]);
718  }
719 
720  for(size_t k = 0;k<nedge_pseudorapidity-1;k++){
721 
722  Evt_SumPFPt = Evt_SumPFPt + SumPFPt[k];
723  mSumPFPt_eta->Fill(edge_pseudorapidity[k],SumPFPt[k]);
724 
725  Evt_SumSquaredPFPt = Evt_SumSquaredPFPt + SumSquaredPFPt[k];
726  mSumSquaredPFPt_eta->Fill(edge_pseudorapidity[k],hSumPFPt[k]->GetRMS(1));
727 
728  delete hSumPFPt[k];
729 
730  }// eta bin loop
731 
732  mSumPFPt->Fill(Evt_SumPFPt);
733  mSumPFPt_HF->Fill(Evt_SumPFPt,HF_energy);
734 
735  mSumSquaredPFPt->Fill(Evt_SumSquaredPFPt);
736 
737  mNPFpart->Fill(NPFpart);
738  mSumpt->Fill(SumPt_value);
739 
740  }
741 
742  if (isCaloJet)
743  {
744  for (unsigned ijet=0; ijet<caloJets->size(); ijet++)
745  {
746  recoJets.push_back((*caloJets)[ijet]);
747  }
748  }
749 
750  if (isJPTJet)
751  {
752  for (unsigned ijet=0; ijet<jptJets->size(); ijet++)
753  recoJets.push_back((*jptJets)[ijet]);
754  }
755 
756  if (isPFJet)
757  {
758  if(std::string("Pu")==UEAlgo)
759  {
760  for (unsigned ijet=0; ijet<basicJets->size();ijet++)
761  {
762  recoJets.push_back((*basicJets)[ijet]);
763  }
764  }
765  if(std::string("Cs")==UEAlgo){
766  for(unsigned ijet=0; ijet<pfJets->size(); ijet++){
767  recoJets.push_back((*pfJets)[ijet]);
768  }
769  }
770  }
771 
772 
773  if (isCaloJet && !caloJets.isValid())
774  {
775  return;
776  }
777  if (isJPTJet && !jptJets.isValid())
778  {
779  return;
780  }
781  if (isPFJet){
782  if(std::string("Pu")==UEAlgo){if(!basicJets.isValid()) return;}
783  if(std::string("Cs")==UEAlgo){if(!pfJets.isValid()) return;}
784  if(std::string("Vs")==UEAlgo){return; }
785  }
786 
787 
788  int nJet_40 = 0;
789 
790  mNJets->Fill(recoJets.size());
791 
792  for (unsigned ijet=0; ijet<recoJets.size(); ijet++) {
793  if (recoJets[ijet].pt() > mRecoJetPtThreshold) {
794  //counting forward and barrel jets
795  // get an idea of no of jets with pT>40 GeV
796  if(recoJets[ijet].pt() > 40)
797  nJet_40++;
798  if (mEta) mEta->Fill(recoJets[ijet].eta());
799  if (mjetpileup) mjetpileup->Fill(recoJets[ijet].pileup());
800  if (mJetArea) mJetArea ->Fill(recoJets[ijet].jetArea());
801  if (mPhi) mPhi ->Fill(recoJets[ijet].phi());
802  if (mEnergy) mEnergy ->Fill(recoJets[ijet].energy());
803  if (mP) mP ->Fill(recoJets[ijet].p());
804  if (mPt) mPt ->Fill(recoJets[ijet].pt());
805  if (mMass) mMass ->Fill(recoJets[ijet].mass());
806  if (mConstituents) mConstituents->Fill(recoJets[ijet].nConstituents());
807 
808  if(std::string("Cs")==UEAlgo){
809  int ipt=0, ieta=0;
810  while(recoJets[ijet].pt()>ptBin[ipt+1] && ipt<ptBins_-1) ipt++;
811  while(recoJets[ijet].eta()>etaRanges->at(ieta+1) && ieta<(int)(rho->size()-1)) ieta++;
812  mSubtractedEFrac[ipt][ieta]->Fill((double)recoJets[ijet].pileup()/(double)recoJets[ijet].energy());
813  mSubtractedE[ipt][ieta]->Fill(recoJets[ijet].pileup());
814 
815  for(unsigned irho=0; irho<rho->size(); irho++){
816  mRhoDist_vsEta->Fill(recoJets[ijet].eta(), rho->at(irho));
817  mRhoMDist_vsEta->Fill(recoJets[ijet].eta(), rhom->at(irho));
818  mRhoDist_vsPt->Fill(recoJets[ijet].pt(), rho->at(irho));
819  mRhoMDist_vsPt->Fill(recoJets[ijet].pt(), rhom->at(irho));
820  //if(ijet==0) mRhoDist_vsCent->Fill(*cbin, rho->at(irho));
821  //if(ijet==0) mRhoMDist_vsCent->Fill(*cbin, rhom->at(irho));
822  }
823  }
824 
825  for(size_t iii = 0 ; iii < numbers.size() ; iii++)
826  {
827  pfDeltaR = sqrt((numbers[iii][2]-recoJets[ijet].phi())*(numbers[iii][2]-recoJets[ijet].phi()) + (numbers[iii][1]-recoJets[ijet].eta())*(numbers[iii][1]-recoJets[ijet].eta())); //MZ
828 
829  mPFDeltaR ->Fill(pfDeltaR); //MZ
830  mPFDeltaR_Scaled_R->Fill(pfDeltaR,1. / pow(pfDeltaR,2)); //MZ
831 
832  }
833 
834  }
835  }
836  if (mNJets_40) mNJets_40->Fill(nJet_40);
837 
838  numbers.clear();
839 
840 }
MonitorElement * mPFCandpT_Forward_photon
edm::EDGetTokenT< reco::CaloJetCollection > caloJetsToken_
edm::EDGetTokenT< reco::PFCandidateCollection > pfCandToken_
T getParameter(std::string const &) const
edm::InputTag mInputCsCandCollection
MonitorElement * mSumSquaredPFPt
MonitorElement * mPFCandpT_vs_eta_electron
edm::EDGetTokenT< reco::CandidateView > caloCandViewToken_
double eta() const final
momentum pseudorapidity
MonitorElement * mPFCandpT_Forward_EME_inHF
const Double_t EndcapEta
edm::EDGetTokenT< reco::JPTJetCollection > jptJetsToken_
math::PtEtaPhiMLorentzVector p4(double vtxZ) const
Definition: CaloTower.cc:129
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:508
MonitorElement * mPFCandpT_Forward_muon
edm::EDGetTokenT< reco::PFJetCollection > pfJetsToken_
MonitorElement * mCSCandpT_vsPt[etaBins_]
MonitorElement * mPFCandpT_Endcap_NeutralHadron
MonitorElement * mPFCandpT_vs_eta_EME_inHF
MonitorElement * mSumSquaredCaloPt
bool isForward(DetId const &)
bool exists(std::string const &parameterName) const
checks if a parameter exists
MonitorElement * mSubtractedEFrac[ptBins_][etaBins_]
void analyze(const edm::Event &, const edm::EventSetup &) override
double pt() const final
transverse momentum
MonitorElement * mSumPFPtEtaDep[etaBins_]
MonitorElement * mPFCandpT_Forward_electron
MonitorElement * mRhoMDist_vsEta
edm::EDGetTokenT< std::vector< reco::Vertex > > pvToken_
MonitorElement * mSumCaloPt_eta
MonitorElement * mPFCandpT_vs_eta_muon
void Fill(long long x)
MonitorElement * mCSCand_corrPFcand[etaBins_]
MonitorElement * mPFCandpT_Endcap_HadE_inHF
edm::EDGetTokenT< int > centralityBinToken
MonitorElement * mPFCandpT_Endcap_ChargedHadron
MonitorElement * mRhoMDist_vsPt
MonitorElement * mPFCandpT_vs_eta_NeutralHadron
MonitorElement * mSumCaloPtEtaDep[etaBins_]
MonitorElement * mSumCaloPt_HF
MonitorElement * mRhoDist_vsEta
MonitorElement * mPFCandpT_vs_eta_photon
edm::EDGetTokenT< reco::Centrality > centralityToken
MonitorElement * mPFCandpT_Forward_ChargedHadron
MonitorElement * mSubtractedE[ptBins_][etaBins_]
T sqrt(T t)
Definition: SSEVec.h:18
MonitorElement * mPFCandpT_Endcap_muon
MonitorElement * mPFCandpT_Endcap_photon
MonitorElement * mPFDeltaR_Scaled_R
edm::EDGetTokenT< std::vector< reco::Vertex > > hiVertexToken_
MonitorElement * mRhoDist_vsPt
MonitorElement * mConstituents
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
MonitorElement * mPFCandpT_Barrel_photon
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
math::XYZPoint Point
point in the space
Definition: Vertex.h:39
MonitorElement * mSumSquaredCaloPt_eta
MonitorElement * mPFCandpT_Barrel_Unknown
bool isValid() const
Definition: HandleBase.h:74
edm::EDGetTokenT< std::vector< double > > rhoToken_
edm::EDGetTokenT< std::vector< double > > rhomToken_
MonitorElement * mPFCandpT_Barrel_NeutralHadron
bool isEndcap(GeomDetEnumerators::SubDetector m)
MonitorElement * mPFCandpT_Endcap_Unknown
int k[5][pyjets_maxn]
const Double_t ForwardEta
nConstituents
Definition: jets_cff.py:201
MonitorElement * mPFCandpT_vs_eta_ChargedHadron
MonitorElement * mPFCandpT_Forward_HadE_inHF
edm::EDGetTokenT< reco::BasicJetCollection > basicJetsToken_
MonitorElement * mPFCandpT_Barrel_ChargedHadron
MonitorElement * mPFCandpT_Barrel_HadE_inHF
std::vector< reco::PFCandidate > PFCandidateCollection
collection of PFCandidates
edm::EDGetTokenT< reco::PFCandidateCollection > csCandToken_
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:277
const double edge_pseudorapidity[etaBins_+1]
double EtHFtowerSum() const
Definition: Centrality.h:23
edm::InputTag mInputPFCandCollection
T const * product() const
Definition: Handle.h:81
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:133
MonitorElement * mSumSquaredPFPt_eta
MonitorElement * mPFCandpT_Endcap_EME_inHF
MonitorElement * mPFCandpT_vs_eta_HadE_inHF
edm::EDGetTokenT< reco::CandidateView > pfCandViewToken_
edm::EDGetTokenT< CaloTowerCollection > caloTowersToken_
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
MonitorElement * mPFCandpT_Forward_Unknown
std::string const & label() const
Definition: InputTag.h:36
Particle reconstructed by the particle flow algorithm.
Definition: PFCandidate.h:39
fixed size matrix
HLT enums.
size_type size() const
MonitorElement * mPFCandpT_Barrel_electron
static int position[264][3]
Definition: ReadPGInfo.cc:509
MonitorElement * mPFCandpT_Endcap_electron
int getNbinsX(void) const
get # of bins in X-axis
edm::EDGetTokenT< std::vector< double > > etaToken_
const Double_t BarrelEta
virtual ParticleType particleId() const
Definition: PFCandidate.h:373
TH2F * getTH2F(void) const
JetAnalyzer_HeavyIons(const edm::ParameterSet &)
const int ptBin[ptBins_+1]
MonitorElement * mPFCandpT_Barrel_EME_inHF
double phi() const final
momentum azimuthal angle
MonitorElement * mPFCandpT_vs_eta_Unknown
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
MonitorElement * mPFCandpT_Forward_NeutralHadron
Definition: Run.h:43
MonitorElement * mPFCandpT_Barrel_muon