73 isMiniAOD_= (
std::string(
"Packed") == candidateType_);
78 pflowPackedToken_ = consumes<std::vector<pat::PackedCandidate> >(mInputCollection_);
80 pflowToken_ = consumes<std::vector<reco::PFCandidate> >(mInputCollection_);
91 diagnosticsParameters_ = pSet.
getParameter<std::vector<edm::ParameterSet> >(
"METDiagonisticsParameters");
98 METFilterMiniAODToken_=consumes<edm::TriggerResults>(METFilterMiniAODLabel_);
101 METFilterMiniAODToken2_=consumes<edm::TriggerResults>(METFilterMiniAODLabel2_);
109 hbheNoiseFilterResultToken_=consumes<bool>(hbheNoiseFilterResultTag_);
115 bypassAllPVChecks_ = cleaningParameters_.
getParameter<
bool>(
"bypassAllPVChecks");
116 bypassAllDCSChecks_ = cleaningParameters_.getParameter<
bool>(
"bypassAllDCSChecks");
117 vertexTag_ = cleaningParameters_.getParameter<
edm::InputTag>(
"vertexCollection");
128 LogTrace(
"DQMPFCandidateAnalyzer")<<
"[DQMPFCandidateAnalyzer] Saving the histos";
140 if(!occupancyPFCandRECO_.empty())occupancyPFCandRECO_.clear();
141 if(!occupancyPFCand_nameRECO_.empty())occupancyPFCand_nameRECO_.clear();
142 if(!etaMinPFCandRECO_.empty())etaMinPFCandRECO_.clear();
143 if(!etaMaxPFCandRECO_.empty())etaMaxPFCandRECO_.clear();
144 if(!typePFCandRECO_.empty())typePFCandRECO_.clear();
145 if(!countsPFCandRECO_.empty())countsPFCandRECO_.clear();
146 if(!ptPFCandRECO_.empty())ptPFCandRECO_.clear();
147 if(!ptPFCand_nameRECO_.empty())ptPFCand_nameRECO_.clear();
148 if(!multiplicityPFCandRECO_.empty())multiplicityPFCandRECO_.clear();
149 if(!multiplicityPFCand_nameRECO_.empty())multiplicityPFCand_nameRECO_.clear();
150 for (std::vector<edm::ParameterSet>::const_iterator
v = diagnosticsParameters_.begin();
v!=diagnosticsParameters_.end();
v++) {
151 int etaNBinsPFCand =
v->getParameter<
int>(
"etaNBins");
152 double etaMinPFCand =
v->getParameter<
double>(
"etaMin");
153 double etaMaxPFCand =
v->getParameter<
double>(
"etaMax");
154 int phiNBinsPFCand =
v->getParameter<
int>(
"phiNBins");
155 double phiMinPFCand =
v->getParameter<
double>(
"phiMin");
156 double phiMaxPFCand =
v->getParameter<
double>(
"phiMax");
157 int nMinPFCand =
v->getParameter<
int>(
"nMin");
158 int nMaxPFCand =
v->getParameter<
int>(
"nMax");
159 int nbinsPFCand =
v->getParameter<
double>(
"nbins");
160 etaMinPFCandRECO_.push_back(etaMinPFCand);
161 etaMaxPFCandRECO_.push_back(etaMaxPFCand);
162 typePFCandRECO_.push_back(
v->getParameter<
int>(
"type"));
163 countsPFCandRECO_.push_back(0);
165 multiplicityPFCand_nameRECO_.push_back(
std::string(
v->getParameter<
std::string>(
"name")).append(
"_multiplicity_").c_str());
166 map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+
"/"+ multiplicityPFCand_nameRECO_[multiplicityPFCand_nameRECO_.size()-1], multiplicityPFCandRECO_[multiplicityPFCandRECO_.size()-1]));
169 occupancyPFCand_nameRECO_.push_back(
std::string(
v->getParameter<
std::string>(
"name")).append(
"_occupancy_").c_str());
175 if(etaMinPFCand*etaMaxPFCand<0){
176 occupancyPFCandRECO_.push_back(ibooker.
book2D(
std::string(
v->getParameter<
std::string>(
"name")).append(
"_occupancy_").c_str(),
std::string(
v->getParameter<
std::string>(
"name"))+
"occupancy", etaNBinsPFCand, etaMinPFCand, etaMaxPFCand, phiNBinsPFCand, phiMinPFCand, phiMaxPFCand));
177 ptPFCandRECO_.push_back(ibooker.
book2D(
std::string(
v->getParameter<
std::string>(
"name")).append(
"_pt_").c_str(),
std::string(
v->getParameter<
std::string>(
"name"))+
"pt", etaNBinsPFCand, etaMinPFCand, etaMaxPFCand, phiNBinsPFCand, phiMinPFCand, phiMaxPFCand));
179 const int nbins_eta_endcap=2*(etaNBinsPFCand+1);
180 double eta_limits_endcap[nbins_eta_endcap];
181 for(
int i=0;
i<nbins_eta_endcap;
i++){
182 if(
i<(etaNBinsPFCand+1)){
183 eta_limits_endcap[
i]=etaMinPFCand+
i*(etaMaxPFCand-etaMinPFCand)/(
double)etaNBinsPFCand;
185 eta_limits_endcap[
i]= -etaMaxPFCand +(
i- (etaNBinsPFCand+1) )*(etaMaxPFCand-etaMinPFCand)/(
double)etaNBinsPFCand;
188 TH2F* hist_temp_occup =
new TH2F((occupancyPFCand_nameRECO_[occupancyPFCand_nameRECO_.size()-1]).c_str(),
"occupancy",nbins_eta_endcap-1, eta_limits_endcap, phiNBinsPFCand, phiMinPFCand, phiMaxPFCand);
189 occupancyPFCandRECO_.push_back(ibooker.
book2D(occupancyPFCand_nameRECO_[occupancyPFCand_nameRECO_.size()-1],hist_temp_occup));
190 TH2F* hist_temp_pt =
new TH2F((ptPFCand_nameRECO_[ptPFCand_nameRECO_.size()-1]).c_str(),
"pt",nbins_eta_endcap-1, eta_limits_endcap, phiNBinsPFCand, phiMinPFCand, phiMaxPFCand);
191 ptPFCandRECO_.push_back(ibooker.
book2D(ptPFCand_nameRECO_[ptPFCand_nameRECO_.size()-1], hist_temp_pt));
194 map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+
"/"+ occupancyPFCand_nameRECO_[occupancyPFCand_nameRECO_.size()-1], occupancyPFCandRECO_[occupancyPFCandRECO_.size()-1]));
195 map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+
"/"+ ptPFCand_nameRECO_[ptPFCand_nameRECO_.size()-1], ptPFCandRECO_[ptPFCandRECO_.size()-1]));
198 mProfileIsoPFChHad_TrackOccupancy=ibooker.
book2D(
"IsoPfChHad_Track_profile",
"Isolated PFChHadron Tracker_occupancy", 108, -2.7, 2.7, 160, -
M_PI,
M_PI);
199 map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+
"/"+
"IsoPfChHad_Track_profile" ,mProfileIsoPFChHad_TrackOccupancy));
200 mProfileIsoPFChHad_TrackPt=ibooker.
book2D(
"IsoPfChHad_TrackPt",
"Isolated PFChHadron TrackPt", 108, -2.7, 2.7, 160, -
M_PI,
M_PI);
201 map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+
"/"+
"IsoPfChHad_TrackPt" ,mProfileIsoPFChHad_TrackPt));
204 mProfileIsoPFChHad_EcalOccupancyCentral = ibooker.
book2D(
"IsoPfChHad_ECAL_profile_central",
"IsolatedPFChHa ECAL occupancy (Barrel)", 180, -1.479, 1.479, 125, -
M_PI,
M_PI);
205 map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+
"/"+
"IsoPfChHad_ECAL_profile_central" ,mProfileIsoPFChHad_EcalOccupancyCentral));
206 mProfileIsoPFChHad_EMPtCentral=ibooker.
book2D(
"IsoPfChHad_EMPt_central",
"Isolated PFChHadron HadPt_central", 180, -1.479, 1.479, 360, -
M_PI,
M_PI);
207 map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+
"/"+
"IsoPfChHad_EMPt_central" ,mProfileIsoPFChHad_EMPtCentral));
209 mProfileIsoPFChHad_EcalOccupancyEndcap = ibooker.
book2D(
"IsoPfChHad_ECAL_profile_endcap",
"IsolatedPFChHa ECAL occupancy (Endcap)", 110, -2.75, 2.75, 125, -
M_PI,
M_PI);
210 map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+
"/"+
"IsoPfChHad_ECAL_profile_endcap" ,mProfileIsoPFChHad_EcalOccupancyEndcap));
211 mProfileIsoPFChHad_EMPtEndcap=ibooker.
book2D(
"IsoPfChHad_EMPt_endcap",
"Isolated PFChHadron EMPt_endcap", 110, -2.75, 2.75, 125, -
M_PI,
M_PI);
212 map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+
"/"+
"IsoPfChHad_EMPt_endcap" ,mProfileIsoPFChHad_EMPtEndcap));
214 const int nbins_eta=16;
216 double eta_limits[nbins_eta]={-2.650,-2.500,-2.322,-2.172,-2.043,-1.930,-1.830,-1.740,1.740,1.830,1.930,2.043,2.172,2.3122,2.500,2.650};
218 TH2F* hist_temp_HCAL =
new TH2F(
"IsoPfChHad_HCAL_profile_endcap",
"IsolatedPFChHa HCAL occupancy (outer endcap)",nbins_eta-1,eta_limits, 36, -
M_PI,
M_PI);
219 TH2F* hist_tempPt_HCAL=(TH2F*)hist_temp_HCAL->Clone(
"Isolated PFCHHadron HadPt (outer endcap)");
221 mProfileIsoPFChHad_HcalOccupancyCentral = ibooker.
book2D(
"IsoPfChHad_HCAL_profile_central",
"IsolatedPFChHa HCAL occupancy (Central Part)", 40, -1.740, 1.740, 72, -
M_PI,
M_PI);
222 map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+
"/"+
"IsoPfChHad_HCAL_profile_central" ,mProfileIsoPFChHad_HcalOccupancyCentral));
223 mProfileIsoPFChHad_HadPtCentral=ibooker.
book2D(
"IsoPfChHad_HadPt_central",
"Isolated PFChHadron HadPt_central", 40, -1.740, 1.740, 72, -
M_PI,
M_PI);
224 map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+
"/"+
"IsoPfChHad_HadPt_central" ,mProfileIsoPFChHad_HadPtCentral));
226 mProfileIsoPFChHad_HcalOccupancyEndcap = ibooker.
book2D(
"IsoPfChHad_HCAL_profile_endcap",hist_temp_HCAL);
227 map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+
"/"+
"IsoPfChHad_HCAL_profile_endcap" ,mProfileIsoPFChHad_HcalOccupancyEndcap));
228 mProfileIsoPFChHad_HadPtEndcap=ibooker.
book2D(
"IsoPfChHad_HadPt_endcap",hist_tempPt_HCAL);
229 map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+
"/"+
"IsoPfChHad_HadPt_endcap" ,mProfileIsoPFChHad_HadPtEndcap));
239 const int nbins_eta_hcal_total=28;
240 double eta_limits_hcal_total[nbins_eta_hcal_total]={-2.650,-2.322,-2.043,-1.830,-1.653,-1.479,-1.305,-1.131,-0.957,-0.783,-0.609,-0.435,-0.261,-0.087,
241 0.087, 0.261, 0.435, 0.609, 0.783, 0.957, 1.131, 1.305, 1.479, 1.653, 1.830, 2.043, 2.322, 2.650};
242 float eta_limits_hcal_total_f[nbins_eta_hcal_total];
243 float log_bin_spacing =
log(200.)/40.;
244 const int nbins_pt_total_hcal= 41;
245 double pt_limits_hcal[nbins_pt_total_hcal];
246 float pt_limits_hcal_f[nbins_pt_total_hcal];
247 for(
int i=0;
i<nbins_pt_total_hcal;
i++){
248 pt_limits_hcal[
i]=
exp(
i*log_bin_spacing);
249 pt_limits_hcal_f[
i]=
exp(
i*log_bin_spacing);
251 for(
int i=0;
i<nbins_eta_hcal_total;
i++){
252 eta_limits_hcal_total_f[
i]=(float)eta_limits_hcal_total[
i];
254 m_HOverTrackP_trackPtVsEta= ibooker.
book2D(
"HOverTrackP_trackPtVsEta",
"HOverTrackP_trackPtVsEta",nbins_pt_total_hcal-1,pt_limits_hcal_f,nbins_eta_hcal_total-1,eta_limits_hcal_total_f);
255 m_HOverTrackPVsTrackP_Barrel = ibooker.
bookProfile(
"HOverTrackPVsTrackP_Barrel",
"HOverTrackPVsTrackP_Barrel",nbins_pt_total_hcal-1,pt_limits_hcal, 0, 4,
" ");
256 m_HOverTrackPVsTrackP_EndCap = ibooker.
bookProfile(
"HOverTrackPVsTrackP_EndCap",
"HOverTrackPVsTrackP_EndCap",nbins_pt_total_hcal-1,pt_limits_hcal, 0, 4,
" ");
257 m_HOverTrackPVsTrackPt_Barrel = ibooker.
bookProfile(
"HOverTrackPVsTrackPt_Barrel",
"HOverTrackPVsTrackPt_Barrel",nbins_pt_total_hcal-1,pt_limits_hcal, 0, 4,
" ");
258 m_HOverTrackPVsTrackPt_EndCap = ibooker.
bookProfile(
"HOverTrackPVsTrackPt_EndCap",
"HOverTrackPVsTrackPt_EndCap",nbins_pt_total_hcal-1,pt_limits_hcal, 0, 4,
" ");
260 m_HOverTrackPVsEta_hPt_1_10 = ibooker.
bookProfile(
"HOverTrackPVsEta_hPt_1_10",
"HOverTrackPVsEta, 1<hPt<10 GeV",nbins_eta_hcal_total-1, eta_limits_hcal_total, 0, 4,
" ");
261 m_HOverTrackPVsEta_hPt_10_20 = ibooker.
bookProfile(
"HOverTrackPVsEta_hPt_10_20",
"HOverTrackPVsEta, 10<hPt<20 GeV",nbins_eta_hcal_total-1, eta_limits_hcal_total, 0, 4,
" ");
262 m_HOverTrackPVsEta_hPt_20_50 = ibooker.
bookProfile(
"HOverTrackPVsEta_hPt_20_50",
"HOverTrackPVsEta, 20<hPt<50 GeV",nbins_eta_hcal_total-1, eta_limits_hcal_total, 0, 4,
" ");
263 m_HOverTrackPVsEta_hPt_50 = ibooker.
bookProfile(
"HOverTrackPVsEta_hPt_50",
"HOverTrackPVsEta, hPt>50 GeV",nbins_eta_hcal_total-1, eta_limits_hcal_total, 0, 4,
" ");
265 m_HOverTrackP_Barrel_hPt_1_10= ibooker.
book1D(
"HOverTrackP_Barrel_hPt_1_10",
"HOverTrackP_B, 1<hPt<10 GeV",50,0,4);
266 m_HOverTrackP_Barrel_hPt_10_20= ibooker.
book1D(
"HOverTrackP_Barrel_hPt_10_20",
"HOverTrackP_B, 10<hPt<20 GeV",50,0,4);
267 m_HOverTrackP_Barrel_hPt_20_50= ibooker.
book1D(
"HOverTrackP_Barrel_hPt_20_50",
"HOverTrackP_B, 20<hPt<50 GeV",50,0,4);
268 m_HOverTrackP_Barrel_hPt_50= ibooker.
book1D(
"HOverTrackP_Barrel_hPt_50",
"HOverTrackP_B, hPt>50 GeV",50,0,4);
270 m_HOverTrackP_EndCap_hPt_1_10= ibooker.
book1D(
"HOverTrackP_EndCap_hPt_1_10",
"HOverTrackP_E, 1<hPt<10 GeV",50,0,4);
271 m_HOverTrackP_EndCap_hPt_10_20= ibooker.
book1D(
"HOverTrackP_EndCap_hPt_10_20",
"HOverTrackP_E, 10<hPt<20 GeV",50,0,4);
272 m_HOverTrackP_EndCap_hPt_20_50= ibooker.
book1D(
"HOverTrackP_EndCap_hPt_20_50",
"HOverTrackP_E, 20<hPt<50 GeV",50,0,4);
273 m_HOverTrackP_EndCap_hPt_50= ibooker.
book1D(
"HOverTrackP_EndCap_hPt_50",
"HOverTrackP_E, hPt>50 GeV",50,0,4);
275 map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+
"/"+
"HOverTrackP_trackPtVsEta" ,m_HOverTrackP_trackPtVsEta));
276 map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+
"/"+
"HOverTrackPVsTrackP_Barrel" ,m_HOverTrackPVsTrackP_Barrel));
277 map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+
"/"+
"HOverTrackPVsTrackP_EndCap" ,m_HOverTrackPVsTrackP_EndCap));
278 map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+
"/"+
"HOverTrackPVsTrackPt_Barrel" ,m_HOverTrackPVsTrackPt_Barrel));
279 map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+
"/"+
"HOverTrackPVsTrackPt_EndCap" ,m_HOverTrackPVsTrackPt_EndCap));
280 map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+
"/"+
"HOverTrackPVsEta_hPt_1_10" ,m_HOverTrackPVsEta_hPt_1_10));
281 map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+
"/"+
"HOverTrackPVsEta_hPt_10_20" ,m_HOverTrackPVsEta_hPt_10_20));
282 map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+
"/"+
"HOverTrackPVsEta_hPt_20_50" ,m_HOverTrackPVsEta_hPt_20_50));
283 map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+
"/"+
"HOverTrackPVsEta_hPt_50" ,m_HOverTrackPVsEta_hPt_50));
284 map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+
"/"+
"HOverTrackP_Barrel_hPt_1_10" ,m_HOverTrackP_Barrel_hPt_1_10));
285 map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+
"/"+
"HOverTrackP_Barrel_hPt_10_20" ,m_HOverTrackP_Barrel_hPt_10_20));
286 map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+
"/"+
"HOverTrackP_Barrel_hPt_20_50" ,m_HOverTrackP_Barrel_hPt_20_50));
287 map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+
"/"+
"HOverTrackP_Barrel_hPt_50" ,m_HOverTrackP_Barrel_hPt_50));
288 map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+
"/"+
"HOverTrackP_EndCap_hPt_1_10" ,m_HOverTrackP_EndCap_hPt_1_10));
289 map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+
"/"+
"HOverTrackP_EndCap_hPt_10_20" ,m_HOverTrackP_EndCap_hPt_10_20));
290 map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+
"/"+
"HOverTrackP_EndCap_hPt_20_50" ,m_HOverTrackP_EndCap_hPt_20_50));
291 map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+
"/"+
"HOverTrackP_EndCap_hPt_50" ,m_HOverTrackP_EndCap_hPt_50));
293 if(!occupancyPFCand_.empty())occupancyPFCand_.clear();
294 if(!occupancyPFCand_name_.empty())occupancyPFCand_name_.clear();
295 if(!occupancyPFCand_puppiNolepWeight_.empty())occupancyPFCand_puppiNolepWeight_.clear();
296 if(!occupancyPFCand_name_puppiNolepWeight_.empty())occupancyPFCand_name_puppiNolepWeight_.clear();
297 if(!etaMinPFCand_.empty())etaMinPFCand_.clear();
298 if(!etaMaxPFCand_.empty())etaMaxPFCand_.clear();
299 if(!typePFCand_.empty())typePFCand_.clear();
300 if(!countsPFCand_.empty())countsPFCand_.clear();
301 if(!ptPFCand_.empty())ptPFCand_.clear();
302 if(!ptPFCand_name_.empty())ptPFCand_name_.clear();
303 if(!ptPFCand_puppiNolepWeight_.empty())ptPFCand_puppiNolepWeight_.clear();
304 if(!ptPFCand_name_puppiNolepWeight_.empty())ptPFCand_name_puppiNolepWeight_.clear();
305 if(!multiplicityPFCand_.empty())multiplicityPFCand_.clear();
306 if(!multiplicityPFCand_name_.empty())multiplicityPFCand_name_.clear();
307 for (std::vector<edm::ParameterSet>::const_iterator
v = diagnosticsParameters_.begin();
v!=diagnosticsParameters_.end();
v++) {
308 int etaNBinsPFCand =
v->getParameter<
int>(
"etaNBins");
309 double etaMinPFCand =
v->getParameter<
double>(
"etaMin");
310 double etaMaxPFCand =
v->getParameter<
double>(
"etaMax");
311 int phiNBinsPFCand =
v->getParameter<
int>(
"phiNBins");
312 double phiMinPFCand =
v->getParameter<
double>(
"phiMin");
313 double phiMaxPFCand =
v->getParameter<
double>(
"phiMax");
314 int nMinPFCand =
v->getParameter<
int>(
"nMin");
315 int nMaxPFCand =
v->getParameter<
int>(
"nMax");
316 int nbinsPFCand =
v->getParameter<
double>(
"nbins");
319 etaMinPFCand_.push_back(etaMinPFCand);
320 etaMaxPFCand_.push_back(etaMaxPFCand);
321 typePFCand_.push_back(
v->getParameter<
int>(
"type"));
322 countsPFCand_.push_back(0);
325 multiplicityPFCand_name_.push_back(
std::string(
v->getParameter<
std::string>(
"name")).append(
"_multiplicity_").c_str());
326 map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+
"/"+ multiplicityPFCand_name_[multiplicityPFCand_name_.size()-1], multiplicityPFCand_[multiplicityPFCand_.size()-1]));
328 occupancyPFCand_name_.push_back(
std::string(
v->getParameter<
std::string>(
"name")).append(
"_occupancy_puppiWeight_").c_str());
329 ptPFCand_name_.push_back(
std::string(
v->getParameter<
std::string>(
"name")).append(
"_pt_puppiWeight_").c_str());
331 occupancyPFCand_name_puppiNolepWeight_.push_back(
std::string(
v->getParameter<
std::string>(
"name")).append(
"_occupancy_puppiNolepWeight_").c_str());
332 ptPFCand_name_puppiNolepWeight_.push_back(
std::string(
v->getParameter<
std::string>(
"name")).append(
"_pt_puppiNolepWeight_").c_str());
336 if(etaMinPFCand*etaMaxPFCand<0){
337 occupancyPFCand_.push_back(ibooker.
book2D(
std::string(
v->getParameter<
std::string>(
"name")).append(
"_occupancy_puppiWeight_").c_str(),
std::string(
v->getParameter<
std::string>(
"name"))+
"occupancy_puppiWeight_", etaNBinsPFCand, etaMinPFCand, etaMaxPFCand, phiNBinsPFCand, phiMinPFCand, phiMaxPFCand));
338 ptPFCand_.push_back(ibooker.
book2D(
std::string(
v->getParameter<
std::string>(
"name")).append(
"_pt_puppiWeight_").c_str(),
std::string(
v->getParameter<
std::string>(
"name"))+
"pt_puppiWeight_", etaNBinsPFCand, etaMinPFCand, etaMaxPFCand, phiNBinsPFCand, phiMinPFCand, phiMaxPFCand));
339 occupancyPFCand_puppiNolepWeight_.push_back(ibooker.
book2D(
std::string(
v->getParameter<
std::string>(
"name")).append(
"_occupancy_puppiNolepWeight_").c_str(),
std::string(
v->getParameter<
std::string>(
"name"))+
"occupancy_puppiNolepWeight", etaNBinsPFCand, etaMinPFCand, etaMaxPFCand, phiNBinsPFCand, phiMinPFCand, phiMaxPFCand));
340 ptPFCand_puppiNolepWeight_.push_back(ibooker.
book2D(
std::string(
v->getParameter<
std::string>(
"name")).append(
"_pt_puppiNolepWeight_").c_str(),
std::string(
v->getParameter<
std::string>(
"name"))+
"pt_puppiNolepWeight", etaNBinsPFCand, etaMinPFCand, etaMaxPFCand, phiNBinsPFCand, phiMinPFCand, phiMaxPFCand));
342 const int nbins_eta_endcap=2*(etaNBinsPFCand+1);
343 double eta_limits_endcap[nbins_eta_endcap];
344 for(
int i=0;
i<nbins_eta_endcap;
i++){
345 if(
i<(etaNBinsPFCand+1)){
346 eta_limits_endcap[
i]=etaMinPFCand+
i*(etaMaxPFCand-etaMinPFCand)/(
double)etaNBinsPFCand;
348 eta_limits_endcap[
i]= -etaMaxPFCand +(
i- (etaNBinsPFCand+1) )*(etaMaxPFCand-etaMinPFCand)/(
double)etaNBinsPFCand;
351 TH2F* hist_temp_occup =
new TH2F((occupancyPFCand_name_[occupancyPFCand_name_.size()-1]).c_str(),(occupancyPFCand_name_[occupancyPFCand_name_.size()-1]).c_str(),nbins_eta_endcap-1, eta_limits_endcap, phiNBinsPFCand, phiMinPFCand, phiMaxPFCand);
352 occupancyPFCand_.push_back(ibooker.
book2D(occupancyPFCand_name_[occupancyPFCand_name_.size()-1],hist_temp_occup));
353 TH2F* hist_temp_pt =
new TH2F((ptPFCand_name_[ptPFCand_name_.size()-1]).c_str(),(ptPFCand_name_[ptPFCand_name_.size()-1]).c_str(),nbins_eta_endcap-1, eta_limits_endcap, phiNBinsPFCand, phiMinPFCand, phiMaxPFCand);
354 ptPFCand_.push_back(ibooker.
book2D(ptPFCand_name_[ptPFCand_name_.size()-1], hist_temp_pt));
355 TH2F* hist_temp_occup_puppiNolepWeight =
new TH2F((occupancyPFCand_name_puppiNolepWeight_[occupancyPFCand_name_puppiNolepWeight_.size()-1]).c_str(),(occupancyPFCand_name_puppiNolepWeight_[occupancyPFCand_name_puppiNolepWeight_.size()-1]).c_str(),nbins_eta_endcap-1, eta_limits_endcap, phiNBinsPFCand, phiMinPFCand, phiMaxPFCand);
356 occupancyPFCand_puppiNolepWeight_.push_back(ibooker.
book2D(occupancyPFCand_name_puppiNolepWeight_[occupancyPFCand_name_puppiNolepWeight_.size()-1],hist_temp_occup_puppiNolepWeight));
357 TH2F* hist_temp_pt_puppiNolepWeight =
new TH2F((ptPFCand_name_puppiNolepWeight_[ptPFCand_name_puppiNolepWeight_.size()-1]).c_str(),(ptPFCand_name_puppiNolepWeight_[ptPFCand_name_puppiNolepWeight_.size()-1]).c_str(),nbins_eta_endcap-1, eta_limits_endcap, phiNBinsPFCand, phiMinPFCand, phiMaxPFCand);
358 ptPFCand_puppiNolepWeight_.push_back(ibooker.
book2D(ptPFCand_name_puppiNolepWeight_[ptPFCand_name_puppiNolepWeight_.size()-1], hist_temp_pt_puppiNolepWeight));
360 map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+
"/"+ occupancyPFCand_name_puppiNolepWeight_[occupancyPFCand_name_puppiNolepWeight_.size()-1], occupancyPFCand_puppiNolepWeight_[occupancyPFCand_puppiNolepWeight_.size()-1]));
361 map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+
"/"+ ptPFCand_name_puppiNolepWeight_[ptPFCand_name_puppiNolepWeight_.size()-1], ptPFCand_puppiNolepWeight_[ptPFCand_puppiNolepWeight_.size()-1]));
362 map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+
"/"+ occupancyPFCand_name_[occupancyPFCand_name_.size()-1], occupancyPFCand_[occupancyPFCand_.size()-1]));
363 map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+
"/"+ ptPFCand_name_[ptPFCand_name_.size()-1], ptPFCand_[ptPFCand_.size()-1]));
374 miniaodfilterindex=-1;
377 bool changed_filter=
true;
378 if (FilterhltConfig_.init(iRun,iSetup,METFilterMiniAODLabel_.process(),changed_filter)){
380 for(
unsigned int i=0;
i<FilterhltConfig_.size();
i++){
383 std::size_t
found=search2.find(search);
384 if(found!=std::string::npos){
385 miniaodfilterindex=
i;
388 }
else if(FilterhltConfig_.init(iRun,iSetup,METFilterMiniAODLabel2_.process(),changed_filter)){
390 for(
unsigned int i=0;
i<FilterhltConfig_.size();
i++){
393 std::size_t
found=search2.find(search);
394 if(found!=std::string::npos){
395 miniaodfilterindex=
i;
399 edm::LogWarning(
"MiniAOD MET Filter HLT OBject version")<<
"nothing found with both RECO and reRECO label"<<std::endl;
418 LogDebug(
"") <<
"CaloMETAnalyzer: Could not find vertex collection" << std::endl;
419 if (verbose_)
std::cout <<
"CaloMETAnalyzer: Could not find vertex collection" << std::endl;
424 numPV_ = vertexCollection.size();
426 bool bPrimaryVertex = (bypassAllPVChecks_ || (numPV_>0));
429 int myLuminosityBlock;
432 if (myLuminosityBlock<LSBegin_)
return;
433 if (myLuminosityBlock>LSEnd_ && LSEnd_>0)
return;
436 if (verbose_)
std::cout <<
"METAnalyzer analyze" << std::endl;
440 bool hbhenoifilterdecision=
true;
443 iEvent.
getByToken(hbheNoiseFilterResultToken_, HBHENoiseFilterResultHandle);
444 if (!HBHENoiseFilterResultHandle.
isValid()) {
445 LogDebug(
"") <<
"METAnalyzer: Could not find HBHENoiseFilterResult" << std::endl;
446 if (verbose_)
std::cout <<
"METAnalyzer: Could not find HBHENoiseFilterResult" << std::endl;
448 hbhenoifilterdecision= *HBHENoiseFilterResultHandle;
451 iEvent.
getByToken(METFilterMiniAODToken_, metFilterResults);
452 if(metFilterResults.
isValid()){
453 if(miniaodfilterindex!=-1){
454 hbhenoifilterdecision = metFilterResults->accept(miniaodfilterindex);
457 iEvent.
getByToken(METFilterMiniAODToken2_, metFilterResults);
458 if(metFilterResults.
isValid()){
459 if(miniaodfilterindex!=-1){
460 hbhenoifilterdecision = metFilterResults->accept(miniaodfilterindex);
467 bool bDCSFilter = (bypassAllDCSChecks_ || DCSFilter_->filter(iEvent, iSetup));
469 for (
unsigned int i=0;
i<countsPFCand_.size();
i++) {
472 if(bDCSFilter && hbhenoifilterdecision && bPrimaryVertex){
475 iEvent.
getByToken(pflowPackedToken_, packedParticleFlow);
477 for (
unsigned int i = 0;
i < packedParticleFlow->size();
i++) {
479 for (
unsigned int j=0;
j<typePFCand_.size();
j++) {
482 if ( ((c.
eta()>etaMinPFCand_[
j]) && (c.
eta()<etaMaxPFCand_[
j])) || ((c.
eta()> (-etaMaxPFCand_[
j])) && (c.
eta()< (-etaMinPFCand_[
j]))) ){
484 ptPFCand_[
j] = map_of_MEs[DirName +
"/"+ptPFCand_name_[
j]];
485 if ( ptPFCand_[j] && ptPFCand_[j]->getRootObject()) ptPFCand_[j]->
Fill(c.
eta(), c.
phi(), c.
pt()*c.
puppiWeight());
486 occupancyPFCand_[
j] = map_of_MEs[DirName +
"/"+occupancyPFCand_name_[
j]];
487 if ( occupancyPFCand_[j] && occupancyPFCand_[j]->getRootObject()) occupancyPFCand_[j]->
Fill(c.
eta(), c.
phi(),c.
puppiWeight());
488 ptPFCand_puppiNolepWeight_[
j] = map_of_MEs[DirName +
"/"+ptPFCand_name_puppiNolepWeight_[
j]];
489 if ( ptPFCand_puppiNolepWeight_[j] && ptPFCand_puppiNolepWeight_[j]->getRootObject()) ptPFCand_puppiNolepWeight_[j]->
Fill(c.
eta(), c.
phi(), c.
pt()*c.
puppiWeightNoLep());
490 occupancyPFCand_puppiNolepWeight_[
j] = map_of_MEs[DirName +
"/"+occupancyPFCand_name_puppiNolepWeight_[
j]];
491 if ( occupancyPFCand_puppiNolepWeight_[j] && occupancyPFCand_puppiNolepWeight_[j]->getRootObject()){ occupancyPFCand_puppiNolepWeight_[
j]->Fill(c.
eta(), c.
phi(),c.
puppiWeightNoLep());
497 for (
unsigned int j=0;
j<countsPFCand_.size();
j++) {
498 multiplicityPFCand_[
j] = map_of_MEs[DirName +
"/"+multiplicityPFCand_name_[
j]];
499 if(multiplicityPFCand_[
j] && multiplicityPFCand_[
j]->getRootObject()){ multiplicityPFCand_[
j]->Fill(countsPFCand_[
j]);
505 for (
unsigned int i = 0;
i < particleFlow->size();
i++) {
507 for (
unsigned int j=0;
j<typePFCandRECO_.size();
j++) {
510 if ( ((c.
eta()>etaMinPFCandRECO_[
j]) && (c.
eta()<etaMaxPFCandRECO_[
j])) || ((c.
eta()> (-etaMaxPFCandRECO_[
j])) && (c.
eta()< (-etaMinPFCandRECO_[
j]))) ){
511 countsPFCandRECO_[
j]+=1;
512 ptPFCandRECO_[
j] = map_of_MEs[DirName +
"/"+ptPFCand_nameRECO_[
j]];
513 if ( ptPFCandRECO_[
j] && ptPFCandRECO_[
j]->getRootObject()) ptPFCandRECO_[
j]->
Fill(c.
eta(), c.
phi(), c.
pt());
514 occupancyPFCandRECO_[
j] = map_of_MEs[DirName +
"/"+occupancyPFCand_nameRECO_[
j]];
515 if ( occupancyPFCandRECO_[
j] && occupancyPFCandRECO_[
j]->getRootObject()) occupancyPFCandRECO_[
j]->
Fill(c.
eta(), c.
phi());
523 if ( (ecalRaw + hcalRaw) > hcalMin_ ){
525 if( theElements.empty() )
continue;
526 unsigned int iTrack=-999;
527 std::vector<unsigned int> iECAL;
528 std::vector<unsigned int> iHCAL;
533 for(
unsigned int iEle=0; iEle<elements.
size(); iEle++) {
537 case PFBlockElement::TRACK:
542 iECAL.push_back( iEle );
545 iHCAL.push_back( iEle );
554 mProfileIsoPFChHad_TrackOccupancy=map_of_MEs[DirName+
"/"+
"IsoPfChHad_Track_profile"];
555 if (mProfileIsoPFChHad_TrackOccupancy && mProfileIsoPFChHad_TrackOccupancy->getRootObject()) mProfileIsoPFChHad_TrackOccupancy->Fill(et.
trackRef()->eta(),et.
trackRef()->phi());
556 mProfileIsoPFChHad_TrackPt=map_of_MEs[DirName+
"/"+
"IsoPfChHad_TrackPt"];
557 if (mProfileIsoPFChHad_TrackPt && mProfileIsoPFChHad_TrackPt->getRootObject()) mProfileIsoPFChHad_TrackPt->Fill(et.
trackRef()->eta(),et.
trackRef()->phi(),et.
trackRef()->pt());
560 m_HOverTrackP_trackPtVsEta=map_of_MEs[DirName+
"/"+
"HOverTrackP_trackPtVsEta"];
561 if(m_HOverTrackP_trackPtVsEta && m_HOverTrackP_trackPtVsEta->getRootObject()) m_HOverTrackP_trackPtVsEta->Fill(c.
pt(), c.
eta(), c.
hcalEnergy()/et.
trackRef()->p());
562 if(c.
pt()>1 && c.
pt()<10){
563 m_HOverTrackPVsEta_hPt_1_10=map_of_MEs[DirName+
"/"+
"HOverTrackPVsEta_hPt_1_10"];
564 if(m_HOverTrackPVsEta_hPt_1_10 && m_HOverTrackPVsEta_hPt_1_10->getRootObject()) m_HOverTrackPVsEta_hPt_1_10->Fill(c.
eta(), c.
hcalEnergy()/et.
trackRef()->p());
565 }
else if(c.
pt()>10 && c.
pt()<20){
566 m_HOverTrackPVsEta_hPt_10_20=map_of_MEs[DirName+
"/"+
"HOverTrackPVsEta_hPt_10_20"];
567 if(m_HOverTrackPVsEta_hPt_10_20 && m_HOverTrackPVsEta_hPt_10_20->getRootObject()) m_HOverTrackPVsEta_hPt_10_20->Fill(c.
eta(), c.
hcalEnergy()/et.
trackRef()->p());
568 }
else if(c.
pt()>20 && c.
pt()<50){
569 m_HOverTrackPVsEta_hPt_20_50=map_of_MEs[DirName+
"/"+
"HOverTrackPVsEta_hPt_20_50"];
570 if(m_HOverTrackPVsEta_hPt_20_50 && m_HOverTrackPVsEta_hPt_20_50->getRootObject()) m_HOverTrackPVsEta_hPt_20_50->Fill(c.
eta(), c.
hcalEnergy()/et.
trackRef()->p());
572 m_HOverTrackPVsEta_hPt_50=map_of_MEs[DirName+
"/"+
"HOverTrackPVsEta_hPt_50"];
573 if(m_HOverTrackPVsEta_hPt_50 && m_HOverTrackPVsEta_hPt_50->getRootObject()) m_HOverTrackPVsEta_hPt_50->Fill(c.
eta(), c.
hcalEnergy()/et.
trackRef()->p());
575 if(fabs(c.
eta()<1.392)){
576 if(c.
pt()>1 && c.
pt()<10){
577 m_HOverTrackP_Barrel_hPt_1_10=map_of_MEs[DirName+
"/"+
"HOverTrackP_Barrel_hPt_1_10"];
578 if(m_HOverTrackP_Barrel_hPt_1_10 && m_HOverTrackP_Barrel_hPt_1_10->getRootObject()) m_HOverTrackP_Barrel_hPt_1_10->Fill(c.
hcalEnergy()/et.
trackRef()->p());
579 }
else if(c.
pt()>10 && c.
pt()<20){
580 m_HOverTrackP_Barrel_hPt_10_20=map_of_MEs[DirName+
"/"+
"HOverTrackP_Barrel_hPt_10_20"];
581 if(m_HOverTrackP_Barrel_hPt_10_20 && m_HOverTrackP_Barrel_hPt_10_20->getRootObject()) m_HOverTrackP_Barrel_hPt_10_20->Fill(c.
hcalEnergy()/et.
trackRef()->p());
582 }
else if(c.
pt()>20 && c.
pt()<50){
583 m_HOverTrackP_Barrel_hPt_20_50=map_of_MEs[DirName+
"/"+
"HOverTrackP_Barrel_hPt_20_50"];
584 if(m_HOverTrackP_Barrel_hPt_20_50 && m_HOverTrackP_Barrel_hPt_20_50->getRootObject()) m_HOverTrackP_Barrel_hPt_20_50->Fill(c.
hcalEnergy()/et.
trackRef()->p());
586 m_HOverTrackP_Barrel_hPt_50=map_of_MEs[DirName+
"/"+
"HOverTrackP_Barrel_hPt_50"];
587 if(m_HOverTrackP_Barrel_hPt_50 && m_HOverTrackP_Barrel_hPt_50->getRootObject()) m_HOverTrackP_Barrel_hPt_50->Fill(c.
hcalEnergy()/et.
trackRef()->p());
589 m_HOverTrackPVsTrackP_Barrel=map_of_MEs[DirName+
"/"+
"HOverTrackPVsTrackP_Barrel"];
590 if(m_HOverTrackPVsTrackP_Barrel && m_HOverTrackPVsTrackP_Barrel->getRootObject()) m_HOverTrackPVsTrackP_Barrel->Fill(et.
trackRef()->p(), c.
hcalEnergy()/et.
trackRef()->p());
591 m_HOverTrackPVsTrackPt_Barrel=map_of_MEs[DirName+
"/"+
"HOverTrackPVsTrackPt_Barrel"];
592 if(m_HOverTrackPVsTrackPt_Barrel && m_HOverTrackPVsTrackPt_Barrel->getRootObject()) m_HOverTrackPVsTrackPt_Barrel->Fill(et.
trackRef()->pt(), c.
hcalEnergy()/et.
trackRef()->p());
594 m_HOverTrackPVsTrackP_EndCap=map_of_MEs[DirName+
"/"+
"HOverTrackPVsTrackP_EndCap"];
595 if(m_HOverTrackPVsTrackP_EndCap && m_HOverTrackPVsTrackP_EndCap->getRootObject()) m_HOverTrackPVsTrackP_EndCap->Fill(et.
trackRef()->p(), c.
hcalEnergy()/et.
trackRef()->p());
596 m_HOverTrackPVsTrackPt_EndCap=map_of_MEs[DirName+
"/"+
"HOverTrackPVsTrackPt_EndCap"];
597 if(m_HOverTrackPVsTrackPt_EndCap && m_HOverTrackPVsTrackPt_EndCap->getRootObject())m_HOverTrackPVsTrackPt_EndCap->Fill(et.
trackRef()->pt(), c.
hcalEnergy()/et.
trackRef()->p());
598 if(c.
pt()>1 && c.
pt()<10){
599 m_HOverTrackP_EndCap_hPt_1_10=map_of_MEs[DirName+
"/"+
"HOverTrackP_EndCap_hPt_1_10"];
600 if(m_HOverTrackP_EndCap_hPt_1_10 && m_HOverTrackP_EndCap_hPt_1_10->getRootObject()) m_HOverTrackP_EndCap_hPt_1_10->Fill(c.
hcalEnergy()/et.
trackRef()->p());
601 }
else if(c.
pt()>10 && c.
pt()<20){
602 m_HOverTrackP_EndCap_hPt_10_20=map_of_MEs[DirName+
"/"+
"HOverTrackP_EndCap_hPt_10_20"];
603 if(m_HOverTrackP_EndCap_hPt_10_20 && m_HOverTrackP_EndCap_hPt_10_20->getRootObject()) m_HOverTrackP_EndCap_hPt_10_20->Fill(c.
hcalEnergy()/et.
trackRef()->p());
604 }
else if(c.
pt()>20 && c.
pt()<50){
605 m_HOverTrackP_EndCap_hPt_20_50=map_of_MEs[DirName+
"/"+
"HOverTrackP_EndCap_hPt_20_50"];
606 if(m_HOverTrackP_EndCap_hPt_20_50 && m_HOverTrackP_EndCap_hPt_20_50->getRootObject()) m_HOverTrackP_EndCap_hPt_20_50->Fill(c.
hcalEnergy()/et.
trackRef()->p());
608 m_HOverTrackP_EndCap_hPt_50=map_of_MEs[DirName+
"/"+
"HOverTrackP_EndCap_hPt_50"];
609 if(m_HOverTrackP_EndCap_hPt_50 && m_HOverTrackP_EndCap_hPt_50->getRootObject()) m_HOverTrackP_EndCap_hPt_50->Fill(c.
hcalEnergy()/et.
trackRef()->p());
614 for(
unsigned int ii=0;
ii<iECAL.size();
ii++) {
617 mProfileIsoPFChHad_EcalOccupancyCentral=map_of_MEs[DirName+
"/"+
"IsoPfChHad_ECAL_profile_central"];
618 if (mProfileIsoPFChHad_EcalOccupancyCentral && mProfileIsoPFChHad_EcalOccupancyCentral->getRootObject()) mProfileIsoPFChHad_EcalOccupancyCentral->Fill(eecal.
clusterRef()->eta(),eecal.
clusterRef()->phi());
619 mProfileIsoPFChHad_EMPtCentral=map_of_MEs[DirName+
"/"+
"IsoPfChHad_EMPt_central"];
620 if (mProfileIsoPFChHad_EMPtCentral && mProfileIsoPFChHad_EMPtCentral->getRootObject()) mProfileIsoPFChHad_EMPtCentral->Fill(eecal.
clusterRef()->eta(),eecal.
clusterRef()->phi(),eecal.
clusterRef()->pt());
622 mProfileIsoPFChHad_EcalOccupancyEndcap=map_of_MEs[DirName+
"/"+
"IsoPfChHad_ECAL_profile_endcap"];
623 if (mProfileIsoPFChHad_EcalOccupancyEndcap && mProfileIsoPFChHad_EcalOccupancyEndcap->getRootObject()) mProfileIsoPFChHad_EcalOccupancyEndcap->Fill(eecal.
clusterRef()->eta(),eecal.
clusterRef()->phi());
624 mProfileIsoPFChHad_EMPtEndcap=map_of_MEs[DirName+
"/"+
"IsoPfChHad_EMPt_endcap"];
625 if (mProfileIsoPFChHad_EMPtEndcap && mProfileIsoPFChHad_EMPtEndcap->getRootObject()) mProfileIsoPFChHad_EMPtEndcap->Fill(eecal.
clusterRef()->eta(),eecal.
clusterRef()->phi(),eecal.
clusterRef()->pt());
631 for(
unsigned int ii=0;
ii<iHCAL.size();
ii++) {
634 mProfileIsoPFChHad_HcalOccupancyCentral=map_of_MEs[DirName+
"/"+
"IsoPfChHad_HCAL_profile_central"];
635 if (mProfileIsoPFChHad_HcalOccupancyCentral && mProfileIsoPFChHad_HcalOccupancyCentral->getRootObject()) mProfileIsoPFChHad_HcalOccupancyCentral->Fill(ehcal.
clusterRef()->eta(),ehcal.
clusterRef()->phi());
636 mProfileIsoPFChHad_HadPtCentral=map_of_MEs[DirName+
"/"+
"IsoPfChHad_HadPt_central"];
637 if (mProfileIsoPFChHad_HadPtCentral && mProfileIsoPFChHad_HadPtCentral->getRootObject()) mProfileIsoPFChHad_HadPtCentral->Fill(ehcal.
clusterRef()->eta(),ehcal.
clusterRef()->phi(),ehcal.
clusterRef()->pt());
639 mProfileIsoPFChHad_HcalOccupancyEndcap=map_of_MEs[DirName+
"/"+
"IsoPfChHad_HCAL_profile_endcap"];
640 if (mProfileIsoPFChHad_HcalOccupancyEndcap && mProfileIsoPFChHad_HcalOccupancyEndcap->getRootObject()) mProfileIsoPFChHad_HcalOccupancyEndcap->Fill(ehcal.
clusterRef()->eta(),ehcal.
clusterRef()->phi());
641 mProfileIsoPFChHad_HadPtEndcap=map_of_MEs[DirName+
"/"+
"IsoPfChHad_HadPt_endcap"];
642 if (mProfileIsoPFChHad_HadPtEndcap && mProfileIsoPFChHad_HadPtEndcap->getRootObject()) mProfileIsoPFChHad_HadPtEndcap->Fill(ehcal.
clusterRef()->eta(),ehcal.
clusterRef()->phi(),ehcal.
clusterRef()->pt());
651 for (
unsigned int j=0;
j<countsPFCandRECO_.size();
j++) {
652 multiplicityPFCandRECO_[
j] = map_of_MEs[DirName +
"/"+multiplicityPFCand_nameRECO_[
j]];
653 if(multiplicityPFCandRECO_[
j] && multiplicityPFCandRECO_[
j]->getRootObject()){ multiplicityPFCandRECO_[
j]->Fill(countsPFCandRECO_[
j]);
float puppiWeight() const
Set both weights at once (with option for only full PUPPI)
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
const reco::TrackRef & trackRef() const
const unsigned int nTracks(const reco::Vertex &sv)
double rawEcalEnergy() const
return corrected Ecal energy
float puppiWeightNoLep() const
Weight from full PUPPI.
vertexToken_(consumes< reco::VertexCollection >(iConfig.getUntrackedParameter< edm::InputTag >("vertices")))
MonitorElement * bookProfile(Args &&...args)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::vector< T >::const_iterator search(const cond::Time_t &val, const std::vector< T > &container)
void dqmBeginRun(const edm::Run &, const edm::EventSetup &)
Initialize run-based parameters.
DQMPFCandidateAnalyzer(const edm::ParameterSet &)
Constructor.
edm::LuminosityBlockNumber_t luminosityBlock() const
virtual double phi() const final
momentum azimuthal angle
std::vector< Vertex > VertexCollection
collection of Vertex objects
void endRun(const edm::Run &, const edm::EventSetup &)
Finish up a run.
const PFClusterRef & clusterRef() const
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Inizialize parameters for histo binning.
virtual double pt() const
transverse momentum
virtual double eta() const
momentum pseudorapidity
std::vector< ElementInBlock > ElementsInBlocks
virtual double phi() const
momentum azimuthal angle
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
MonitorElement * book1D(Args &&...args)
Abs< T >::type abs(const T &t)
void setCurrentFolder(const std::string &fullpath)
T const * product() const
MonitorElement * book2D(Args &&...args)
virtual ~DQMPFCandidateAnalyzer()
Destructor.
void analyze(const edm::Event &, const edm::EventSetup &)
Get the analysis.
Particle reconstructed by the particle flow algorithm.
double hcalEnergy() const
return corrected Hcal energy
virtual double eta() const final
momentum pseudorapidity
virtual ParticleType particleId() const
virtual int pdgId() const
PDG identifier.
const ElementsInBlocks & elementsInBlocks() const
double rawHcalEnergy() const
return raw Hcal energy
virtual double pt() const final
transverse momentum