CMS 3D CMS Logo

PFAnalyzer.cc
Go to the documentation of this file.
1 
10 
11 // ***********************************************************
13  m_directory = "ParticleFlow";
14  parameters_ = pSet.getParameter<edm::ParameterSet>("pfAnalysis");
15 
16  thePfCandidateCollection_ = consumes<reco::PFCandidateCollection>(pSet.getParameter<edm::InputTag>("pfCandidates"));
17  pfJetsToken_ = consumes<reco::PFJetCollection>(pSet.getParameter<edm::InputTag>("pfJetCollection"));
18 
19  theTriggerResultsLabel_ = pSet.getParameter<edm::InputTag>("TriggerResultsLabel");
20  triggerResultsToken_ = consumes<edm::TriggerResults>(edm::InputTag(theTriggerResultsLabel_));
21  highPtJetExpr_ = pSet.getParameter<edm::InputTag>("TriggerName");
22 
23  srcWeights = pSet.getParameter<edm::InputTag>("srcWeights");
24  weightsToken_ = consumes<edm::ValueMap<float>>(srcWeights);
25 
26  m_pfNames = {"allPFC", "neutralHadPFC", "chargedHadPFC", "electronPFC", "muonPFC", "gammaPFC", "hadHFPFC", "emHFPFC"};
27  vertexTag_ = pSet.getParameter<edm::InputTag>("PVCollection");
28  vertexToken_ = consumes<std::vector<reco::Vertex>>(edm::InputTag(vertexTag_));
29 
30  tok_ew_ = consumes<GenEventInfoProduct>(edm::InputTag("generator"));
31 
33  m_eventObservables = parameters_.getParameter<vstring>("eventObservables");
34  m_pfInJetObservables = parameters_.getParameter<vstring>("pfInJetObservables");
36 
37  // List of cuts applied to PFCs that we want to plot
39  // List of jet cuts that we apply for the case of plotting PFCs in jets
41 
42  // Link observable strings to the static functions defined in the header file
43  // Many of these are quite trivial, but this enables a simple way to include a
44  // variety of observables on-the-fly.
45  m_funcMap["pt"] = &getPt;
46  m_funcMap["energy"] = getEnergy;
47  m_funcMap["eta"] = getEta;
48  m_funcMap["phi"] = getPhi;
49 
50  m_funcMap["HCalE_depth1"] = getHcalEnergy_depth1;
51  m_funcMap["HCalE_depth2"] = getHcalEnergy_depth2;
52  m_funcMap["HCalE_depth3"] = getHcalEnergy_depth3;
53  m_funcMap["HCalE_depth4"] = getHcalEnergy_depth4;
54  m_funcMap["HCalE_depth5"] = getHcalEnergy_depth5;
55  m_funcMap["HCalE_depth6"] = getHcalEnergy_depth6;
56  m_funcMap["HCalE_depth7"] = getHcalEnergy_depth7;
57 
58  m_funcMap["ECal_E"] = getEcalEnergy;
59  m_funcMap["RawECal_E"] = getRawEcalEnergy;
60  m_funcMap["HCal_E"] = getHcalEnergy;
61  m_funcMap["RawHCal_E"] = getRawHcalEnergy;
62  m_funcMap["HO_E"] = getHOEnergy;
63  m_funcMap["RawHO_E"] = getRawHOEnergy;
64  m_funcMap["PFHad_calibration"] = getHadCalibration;
65 
66  m_funcMap["MVAIsolated"] = getMVAIsolated;
67  m_funcMap["MVAEPi"] = getMVAEPi;
68  m_funcMap["MVAEMu"] = getMVAEMu;
69  m_funcMap["MVAPiMu"] = getMVAPiMu;
70  m_funcMap["MVANothingGamma"] = getMVANothingGamma;
71  m_funcMap["MVANothingNH"] = getMVANothingNH;
72  m_funcMap["MVAGammaNH"] = getMVAGammaNH;
73 
74  m_funcMap["DNNESigIsolated"] = getDNNESigIsolated;
75  m_funcMap["DNNESigNonIsolated"] = getDNNESigNonIsolated;
76  m_funcMap["DNNEBkgNonIsolated"] = getDNNEBkgNonIsolated;
77  m_funcMap["DNNEBkgTauIsolated"] = getDNNEBkgTauIsolated;
78  m_funcMap["DNNEBkgPhotonIsolated"] = getDNNEBkgPhotonIsolated;
79 
80  m_funcMap["hcalE"] = getHCalEnergy;
81  m_funcMap["eOverP"] = getEoverP;
82  m_funcMap["nTrkInBlock"] = getNTracksInBlock;
83 
84  m_eventFuncMap["NPFC"] = getNPFC;
86 
87  m_pfInJetFuncMap["PFSpectrum"] = getEnergySpectrum;
88 
89  // Link jet observables to static functions in the header file.
90  // This is very similar to m_funcMap, but for jets instead.
91  m_jetFuncMap["pt"] = getJetPt;
92 
93  // Convert the cutList strings into real cuts that can be applied
94  // The format should be three comma separated values
95  // with the first number being the name of the observable
96  // (corresponding to a key in m_funcMap),
97  // the second being the minimum value, and the last being the max.
98  //
99  for (unsigned int i = 0; i < m_cutList.size(); i++) {
100  m_fullCutList.push_back(std::vector<std::string>());
101  while (m_cutList[i].find("]") != std::string::npos) {
102  size_t pos = m_cutList[i].find("]");
103  m_fullCutList[i].push_back(m_cutList[i].substr(1, pos));
104  m_cutList[i].erase(0, pos + 1);
105  }
106  }
107 
108  for (unsigned int i = 0; i < m_fullCutList.size(); i++) {
109  m_binList.push_back(std::vector<std::vector<double>>());
110  for (unsigned int j = 0; j < m_fullCutList[i].size(); j++) {
111  size_t pos = m_fullCutList[i][j].find(";");
112  std::string observableName = m_fullCutList[i][j].substr(0, pos);
113  m_fullCutList[i][j].erase(0, pos + 1);
114 
115  m_binList[i].push_back(getBinList(m_fullCutList[i][j]));
116  m_fullCutList[i][j] = observableName;
117  }
118  }
119 
120  // Convert the jetCutList strings into real cuts that can be applied
121  // The format should be three comma separated values,
122  // with the first number being the name of the observable
123  // (corresponding to a key in m_jetFuncMap),
124  // the second being the minimum value, and the last being the max value.
125  //
126  for (unsigned int i = 0; i < m_jetCutList.size(); i++) {
127  m_fullJetCutList.push_back(std::vector<std::string>());
128  while (m_jetCutList[i].find("]") != std::string::npos) {
129  size_t pos = m_jetCutList[i].find("]");
130  m_fullJetCutList[i].push_back(m_jetCutList[i].substr(1, pos));
131  m_jetCutList[i].erase(0, pos + 1);
132  }
133  }
134 
135  for (unsigned int i = 0; i < m_fullJetCutList.size(); i++) {
136  m_jetBinList.push_back(std::vector<std::vector<double>>());
137  for (unsigned int j = 0; j < m_fullJetCutList[i].size(); j++) {
138  size_t pos = m_fullJetCutList[i][j].find(";");
139  std::string observableName = m_fullJetCutList[i][j].substr(0, pos);
140  m_fullJetCutList[i][j].erase(0, pos + 1);
141 
142  m_jetBinList[i].push_back(getBinList(m_fullJetCutList[i][j]));
143  m_fullJetCutList[i][j] = observableName;
144  }
145  }
146 }
147 
148 // ***********************************************************
149 PFAnalyzer::~PFAnalyzer() { LogTrace("PFAnalyzer") << "[PFAnalyzer] Saving the histos"; }
150 
151 // ***********************************************************
153  ibooker.setCurrentFolder(m_directory);
154 
155  for (unsigned int i = 0; i < m_fullCutList.size(); i++) {
157  }
158 
159  for (unsigned int i = 0; i < m_fullJetCutList.size(); i++) {
161  }
162 
163  for (unsigned int npv = 0; npv < m_npvBins.size() - 1; npv++) {
164  std::string npvString = Form("npv_%.0f_%.0f", m_npvBins[npv], m_npvBins[npv + 1]);
165  // TODO: Make it possible to use an arbitrary list of bins instead of evenly space bins?
166  // It is not clear if this is straightforward to do with these classes and CMSSW.
167  // If it is, it should be an easy change to the code.
168  //
169  //
170  // Books a histogram for each histogram in the config file.
171  // The format for the observables should be four comma separated values,
172  // with the first being the observable name (corresponding to one of
173  // the keys in m_funcMap), the second being the number of bins,
174  // and the last two being the min and max value for the histogram respectively.
175  for (unsigned int i = 0; i < m_observables.size(); i++) {
176  std::string cObservable = m_observables[i];
177  PFAnalyzer::binInfo obsInfo = getBinInfo(cObservable);
178 
179  if (npv == 0)
180  m_observableNames.push_back(obsInfo.observable);
181 
182  for (unsigned int j = 0; j < m_allSuffixes.size(); j++) {
183  for (unsigned int n = 0; n < m_allSuffixes[j].size(); n++) {
184  // Loop over all of the different types of PF candidates
185  for (unsigned int m = 0; m < m_pfNames.size(); m++) {
186  // For each observable, we make a couple histograms based on a few generic categorizations.
187  // In all cases, the PFCs that go into these histograms must pass the PFC selection from m_cutList.
188  std::string histName = Form("%s_%s%s_%s",
189  m_pfNames[m].c_str(),
190  obsInfo.observable.c_str(),
191  m_allSuffixes[j][n].c_str(),
192  npvString.c_str());
193  MonitorElement* mHist = ibooker.book1D(
194  histName, Form(";%s;", obsInfo.axisName.c_str()), obsInfo.nBins, obsInfo.binMin, obsInfo.binMax);
195  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(m_directory + "/" + histName, mHist));
196  }
197 
198  for (unsigned int k = 0; k < m_allJetSuffixes.size(); k++) {
199  for (unsigned int p = 0; p < m_allJetSuffixes[k].size(); p++) {
200  for (unsigned int m = 0; m < m_pfNames.size(); m++) {
201  // These histograms are for PFCs passing the basic selection, and which are matched to jets
202  // that pass the jet selection
203  std::string histName = Form("%s_jetMatched_%s%s_jetCuts%s_%s",
204  m_pfNames[m].c_str(),
205  obsInfo.observable.c_str(),
206  m_allSuffixes[j][n].c_str(),
207  m_allJetSuffixes[k][p].c_str(),
208  npvString.c_str());
209  MonitorElement* mHistInJet = ibooker.book1D(
210  histName, Form(";%s;", obsInfo.axisName.c_str()), obsInfo.nBins, obsInfo.binMin, obsInfo.binMax);
211  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(m_directory + "/" + histName, mHistInJet));
212  }
213  }
214  }
215  }
216  }
217  }
218 
219  // Do the same for global observables (things like the number of PFCs in an event, or in a jet, etc)
220  for (unsigned int i = 0; i < m_eventObservables.size(); i++) {
221  std::string cEventObservable = m_eventObservables[i];
222  size_t pos = cEventObservable.find(";");
223  std::string observableName = cEventObservable.substr(0, pos);
224  cEventObservable.erase(0, pos + 1);
225 
226  pos = cEventObservable.find(";");
227  std::string axisString = cEventObservable.substr(0, pos);
228  cEventObservable.erase(0, pos + 1);
229 
230  pos = cEventObservable.find(";");
231  int nBins = atoi(cEventObservable.substr(0, pos).c_str());
232  cEventObservable.erase(0, pos + 1);
233 
234  pos = cEventObservable.find(";");
235  float binMin = atof(cEventObservable.substr(0, pos).c_str());
236  cEventObservable.erase(0, pos + 1);
237 
238  pos = cEventObservable.find(";");
239  float binMax = atof(cEventObservable.substr(0, pos).c_str());
240  cEventObservable.erase(0, pos + 1);
241 
242  pos = cEventObservable.find(";");
243  int nBinsJet = atoi(cEventObservable.substr(0, pos).c_str());
244  cEventObservable.erase(0, pos + 1);
245 
246  pos = cEventObservable.find(";");
247  float binMinJet = atof(cEventObservable.substr(0, pos).c_str());
248  cEventObservable.erase(0, pos + 1);
249 
250  float binMaxJet = atof(cEventObservable.c_str());
251  if (npv == 0)
252  m_eventObservableNames.push_back(observableName);
253 
254  for (unsigned int m = 0; m < m_pfNames.size(); m++) {
255  std::string histName = Form("%s_%s_%s", m_pfNames[m].c_str(), observableName.c_str(), npvString.c_str());
256  MonitorElement* mHist = ibooker.book1D(histName, Form(";%s;", axisString.c_str()), nBins, binMin, binMax);
257  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(m_directory + "/" + histName, mHist));
258  }
259 
260  for (unsigned int k = 0; k < m_allJetSuffixes.size(); k++) {
261  for (unsigned int p = 0; p < m_allJetSuffixes[k].size(); p++) {
262  for (unsigned int m = 0; m < m_pfNames.size(); m++) {
263  // These histograms are for PFCs passing the basic selection, and which are matched to jets
264  // that pass the jet selection
265  std::string histName = Form("%s_jetMatched_%s_jetCuts%s_%s",
266  m_pfNames[m].c_str(),
267  observableName.c_str(),
268  m_allJetSuffixes[k][p].c_str(),
269  npvString.c_str());
270  MonitorElement* mHistInJet =
271  ibooker.book1D(histName, Form(";%s;", axisString.c_str()), nBinsJet, binMinJet, binMaxJet);
272  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(m_directory + "/" + histName, mHistInJet));
273  }
274  }
275  }
276  }
277 
278  for (unsigned int i = 0; i < m_pfInJetObservables.size(); i++) {
279  std::string cPfInJetObservable = m_pfInJetObservables[i];
280  PFAnalyzer::binInfo pfInJetInfo = getBinInfo(cPfInJetObservable);
281  if (npv == 0)
282  m_pfInJetObservableNames.push_back(pfInJetInfo.observable);
283 
284  for (unsigned int j = 0; j < m_allSuffixes.size(); j++) {
285  for (unsigned int n = 0; n < m_allSuffixes[j].size(); n++) {
286  for (unsigned int k = 0; k < m_allJetSuffixes.size(); k++) {
287  for (unsigned int p = 0; p < m_allJetSuffixes[k].size(); p++) {
288  for (unsigned int m = 0; m < m_pfNames.size(); m++) {
289  // These histograms are for PFCs passing the basic selection, and which are matched to jets
290  // that pass the jet selection
291  std::string histName = Form("%s_jetMatched_%s%s_jetCuts%s_%s",
292  m_pfNames[m].c_str(),
293  pfInJetInfo.observable.c_str(),
294  m_allSuffixes[j][n].c_str(),
295  m_allJetSuffixes[k][p].c_str(),
296  npvString.c_str());
297  MonitorElement* mHistInJet = ibooker.book1D(histName,
298  Form(";%s;", pfInJetInfo.axisName.c_str()),
299  pfInJetInfo.nBins,
300  pfInJetInfo.binMin,
301  pfInJetInfo.binMax);
302  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(m_directory + "/" + histName, mHistInJet));
303  }
304  }
305  }
306  }
307  }
308  }
309 
310  // Extra histograms for basic validation of the selection etc.
311  std::string histName = Form("jetPt_%s", npvString.c_str());
312  MonitorElement* mHist = ibooker.book1D(histName, Form(";%s;", "p_{T,jet}"), 2000, 0, 2000);
313  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(m_directory + "/" + histName, mHist));
314 
315  histName = Form("jetPtLead_%s", npvString.c_str());
316  mHist = ibooker.book1D(histName, Form(";%s;", "p_{T, leading jet}"), 2000, 0, 2000);
317  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(m_directory + "/" + histName, mHist));
318 
319  histName = Form("jetEta_%s", npvString.c_str());
320  mHist = ibooker.book1D(histName, Form(";%s;", "#eta_{jet}"), 200, -5, 5);
321  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(m_directory + "/" + histName, mHist));
322 
323  histName = Form("jetEtaLead_%s", npvString.c_str());
324  mHist = ibooker.book1D(histName, Form(";%s;", "#eta_{leading jet}"), 200, -5, 5);
325  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(m_directory + "/" + histName, mHist));
326  }
327 
328  std::string histName = Form("NPV");
329  MonitorElement* mHist = ibooker.book1D(histName, Form(";%s;", "N_PV"), 100, 0, 100);
330  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(m_directory + "/" + histName, mHist));
331 }
332 
334  PFAnalyzer::binInfo binningDetails;
335 
336  size_t pos = observableString.find(";");
337  binningDetails.observable = observableString.substr(0, pos);
338  observableString.erase(0, pos + 1);
339 
340  std::vector<double> binList = getBinList(observableString);
341  pos = observableString.find(";");
342  binningDetails.axisName = observableString.substr(0, pos);
343  observableString.erase(0, pos + 1);
344 
345  pos = observableString.find(";");
346  binningDetails.nBins = atoi(observableString.substr(0, pos).c_str());
347  observableString.erase(0, pos + 1);
348 
349  pos = observableString.find(";");
350  binningDetails.binMin = atof(observableString.substr(0, pos).c_str());
351  observableString.erase(0, pos + 1);
352 
353  binningDetails.binMax = atof(observableString.c_str());
354 
355  return binningDetails;
356 }
357 
359  ibooker.setCurrentFolder(DirName);
360 }
361 
362 // ***********************************************************
363 void PFAnalyzer::dqmBeginRun(const edm::Run& iRun, const edm::EventSetup& iSetup) {}
364 
366 
367 // How many significant digits do we need to save for the values to be distinct?
369  double diff = bins[bin + 1] - bins[bin];
370  double sigFigs = log10(diff);
371 
372  // We only want to save as many significant digits as we need to.
373  // Currently, we might lose some information, so we should think about
374  // if we want to specify more digits
375  if (sigFigs >= 1) {
376  return Form("%.0f_%.0f", bins[bin], bins[bin + 1]);
377  }
378 
379  int nDecimals = int(-1 * sigFigs) + 1;
380  // We do not want to use decimals since these can mess up histogram retrieval in some cases.
381  // Instead, we use a 'p' to indicate the decimal.
382  double newDigit = abs((bins[bin] - int(bins[bin])) * pow(10, nDecimals));
383  double newDigit2 = (bins[bin + 1] - int(bins[bin + 1])) * pow(10, nDecimals);
384  std::string signStringLow = "";
385  std::string signStringHigh = "";
386  if (bins[bin] < 0)
387  signStringLow = "m";
388  if (bins[bin + 1] < 0)
389  signStringHigh = "m";
390  return Form("%s%.0fp%.0f_%s%.0fp%.0f",
391  signStringLow.c_str(),
392  abs(bins[bin]),
393  newDigit,
394  signStringHigh.c_str(),
395  abs(bins[bin + 1]),
396  newDigit2);
397 }
398 
399 std::vector<double> PFAnalyzer::getBinList(std::string binString) {
400  std::vector<double> binList;
401 
402  while (binString.find(";") != std::string::npos) {
403  size_t pos = binString.find(";");
404  binList.push_back(atof(binString.substr(0, pos).c_str()));
405  binString.erase(0, pos + 1);
406  }
407  binList.push_back(atof(binString.c_str()));
408 
409  if (binList.size() == 3) {
410  int nBins = int(binList[0]);
411  double minVal = binList[1];
412  double maxVal = binList[2];
413  binList.clear();
414 
415  for (int i = 0; i <= nBins; i++) {
416  binList.push_back(minVal + i * (maxVal - minVal) / nBins);
417  }
418  }
419 
420  return binList;
421 }
422 
423 std::vector<std::string> PFAnalyzer::getAllSuffixes(std::vector<std::string> observables,
424  std::vector<std::vector<double>> binnings) {
425  int nTotalBins = 1;
426  std::vector<int> nBins;
427  for (unsigned int i = 0; i < binnings.size(); i++) {
428  nTotalBins = (binnings[i].size() - 1) * nTotalBins;
429  nBins.push_back(binnings[i].size() - 1);
430  }
431 
432  std::vector<std::vector<int>> binList;
433 
434  for (int i = 0; i < nTotalBins; i++) {
435  binList.push_back(std::vector<int>());
436  }
437 
438  int factor = nTotalBins;
439  int otherFactor = 1;
440  for (unsigned int i = 0; i < binnings.size(); i++) {
441  factor = factor / nBins[i];
442 
443  for (int j = 0; j < nBins[i]; j++) {
444  for (int k = 0; k < factor; k++) {
445  for (int m = 0; m < otherFactor; m++) {
446  binList[m * otherFactor + j * factor + k].push_back(j);
447  }
448  }
449  }
450  otherFactor = otherFactor * nBins[i];
451  }
452 
453  std::vector<std::string> allSuffixes;
454  for (int i = 0; i < nTotalBins; i++) {
455  allSuffixes.push_back(getSuffix(binList[i], observables, binnings));
456  }
457 
458  return allSuffixes;
459 }
460 
461 // Get a unique string corresponding to the selection cuts
462 std::string PFAnalyzer::getSuffix(std::vector<int> binList,
463  std::vector<std::string> observables,
464  std::vector<std::vector<double>> binnings) {
465  std::string suffix = "";
466  for (unsigned int i = 0; i < binList.size(); i++) {
467  if (binList[i] < 0)
468  return "";
469  std::string digitString = stringWithDecimals(binList[i], binnings[i]);
470 
471  suffix = Form("%s_%s_%s", suffix.c_str(), observables[i].c_str(), digitString.c_str());
472  }
473 
474  return suffix;
475 }
476 
477 int PFAnalyzer::getBinNumber(double binVal, std::vector<double> bins) {
478  if (binVal < bins[0])
479  return -1;
480  for (unsigned int i = 0; i < bins.size(); i++) {
481  if (binVal < bins[i])
482  return i - 1;
483  }
484 
485  return -1;
486 }
487 
488 int PFAnalyzer::getBinNumbers(std::vector<double> binVal, std::vector<std::vector<double>> bins) {
489  std::vector<int> cbins;
490  std::vector<int> nBins;
491  for (unsigned int i = 0; i < binVal.size(); i++) {
492  int cbin = getBinNumber(binVal[i], bins[i]);
493  if (cbin < 0)
494  return -1;
495  nBins.push_back(bins[i].size() - 1);
496  cbins.push_back(cbin);
497  }
498 
499  int bin = 0;
500  int factor = 1;
501  for (unsigned int i = 0; i < binVal.size(); i++) {
502  bin += cbins[i] * factor;
503  factor = factor * nBins[i];
504  }
505 
506  return bin;
507 }
508 
509 int PFAnalyzer::getPFBin(const reco::PFCandidate pfCand, int i) {
510  std::vector<double> binVals;
511  for (unsigned int j = 0; j < m_fullCutList[i].size(); j++) {
512  binVals.push_back(m_funcMap[m_fullCutList[i][j]](pfCand));
513  }
514 
515  return getBinNumbers(binVals, m_binList[i]);
516 }
517 
518 int PFAnalyzer::getJetBin(const reco::PFJet jetCand, int i) {
519  std::vector<double> binVals;
520  for (unsigned int j = 0; j < m_fullJetCutList[i].size(); j++) {
521  binVals.push_back(m_jetFuncMap[m_fullJetCutList[i][j]](jetCand));
522  }
523 
524  return getBinNumbers(binVals, m_jetBinList[i]);
525 }
526 
527 // ***********************************************************
530  double eventWeight = 1;
531  if (genEventInfo.isValid()) {
532  eventWeight = genEventInfo->weight();
533  }
534 
535  weights_ = &iEvent.get(weightsToken_);
536 
537  // **** Get the TriggerResults container
540 
541  // Hack to make it pass the lowest unprescaled HLT?
542  Int_t JetHiPass = 0;
543 
544  if (triggerResults.isValid()) {
545  const edm::TriggerNames& triggerNames = iEvent.triggerNames(*triggerResults);
546 
547  const unsigned int nTrig(triggerNames.size());
548  for (unsigned int i = 0; i < nTrig; ++i) {
549  if (triggerNames.triggerName(i).find(highPtJetExpr_.label()) != std::string::npos && triggerResults->accept(i)) {
550  JetHiPass = 1;
551  }
552  }
553  }
554 
555  //Vertex information
557  iEvent.getByToken(vertexToken_, vertexHandle);
558 
559  if (!vertexHandle.isValid()) {
560  LogDebug("") << "PFAnalyzer: Could not find vertex collection" << std::endl;
561  }
562  int numPV = 0;
563 
564  if (vertexHandle.isValid()) {
565  reco::VertexCollection vertex = *(vertexHandle.product());
566  for (reco::VertexCollection::const_iterator v = vertex.begin(); v != vertex.end(); ++v) {
567  if (v->isFake())
568  continue;
569  if (v->ndof() < 4)
570  continue;
571  if (fabs(v->z()) > 24.0)
572  continue;
573  ++numPV;
574  }
575  }
576 
577  int npvBin = getBinNumber(numPV, m_npvBins);
578  if (npvBin < 0)
579  return;
580  std::string npvString = Form("npv_%.0f_%.0f", m_npvBins[npvBin], m_npvBins[npvBin + 1]);
581 
582  if (!JetHiPass)
583  return;
584 
585  // Retrieve the PFCs
587  iEvent.getByToken(thePfCandidateCollection_, pfCollection);
588  if (!pfCollection.isValid()) {
589  edm::LogError("PFAnalyzer") << "invalid collection: PF candidate \n";
590  return;
591  }
592 
594  iEvent.getByToken(pfJetsToken_, pfJets);
595  if (!pfJets.isValid()) {
596  edm::LogError("PFAnalyzer") << "invalid collection: PF jets \n";
597  return;
598  }
599 
600  // Probably we want to define a few different options for how the selection will work
601  // Currently it is just a dummy function, and we hardcode the other cuts.
602  if (pfJets->size() < 2)
603  return;
604  if (pfJets->at(0).pt() < 450)
605  return;
606  if (pfJets->at(0).pt() / pfJets->at(1).pt() > 2)
607  return;
608 
610  return;
611 
612  for (reco::PFCandidateCollection::const_iterator recoPF = pfCollection->begin(); recoPF != pfCollection->end();
613  ++recoPF) {
614  for (unsigned int j = 0; j < m_fullCutList.size(); j++) {
615  int binNumber = getPFBin(*recoPF, j);
616  if (binNumber < 0)
617  continue;
618  if (binNumber >= int(m_allSuffixes[j].size())) {
619  continue;
620  }
621  std::string binString = m_allSuffixes[j][binNumber];
622 
623  // Eventually, we might want the hist name to include the cuts that we are applying,
624  // so I am keepking it as a separate string for now, even though it is redundant.
625  // Make plots of all observables
626  for (unsigned int i = 0; i < m_observables.size(); i++) {
627  std::string histName = Form("%s%s_%s", m_observableNames[i].c_str(), binString.c_str(), npvString.c_str());
628  map_of_MEs[m_directory + "/allPFC_" + histName]->Fill(m_funcMap[m_observableNames[i]](*recoPF), eventWeight);
629 
630  switch (recoPF->particleId()) {
632  map_of_MEs[m_directory + "/chargedHadPFC_" + histName]->Fill(m_funcMap[m_observableNames[i]](*recoPF),
633  eventWeight);
634  break;
635  case reco::PFCandidate::ParticleType::h0:
636  map_of_MEs[m_directory + "/neutralHadPFC_" + histName]->Fill(m_funcMap[m_observableNames[i]](*recoPF),
637  eventWeight);
638  break;
640  map_of_MEs[m_directory + "/electronPFC_" + histName]->Fill(m_funcMap[m_observableNames[i]](*recoPF),
641  eventWeight);
642  break;
644  map_of_MEs[m_directory + "/muonPFC_" + histName]->Fill(m_funcMap[m_observableNames[i]](*recoPF),
645  eventWeight);
646  break;
648  map_of_MEs[m_directory + "/gammaPFC_" + histName]->Fill(m_funcMap[m_observableNames[i]](*recoPF),
649  eventWeight);
650  break;
651  case reco::PFCandidate::ParticleType::h_HF:
652  map_of_MEs[m_directory + "/hadHFPFC_" + histName]->Fill(m_funcMap[m_observableNames[i]](*recoPF),
653  eventWeight);
654  break;
655  case reco::PFCandidate::ParticleType::egamma_HF:
656  map_of_MEs[m_directory + "/emHFPFC_" + histName]->Fill(m_funcMap[m_observableNames[i]](*recoPF),
657  eventWeight);
658  break;
659  default:
660  break;
661  }
662  }
663  }
664  }
665 
666  for (unsigned int i = 0; i < m_eventObservableNames.size(); i++) {
667  std::string histName = Form("%s_%s", m_eventObservableNames[i].c_str(), npvString.c_str());
668  map_of_MEs[m_directory + "/allPFC_" + histName]->Fill(
670  map_of_MEs[m_directory + "/chargedHadPFC_" + histName]->Fill(
672  map_of_MEs[m_directory + "/neutralHadPFC_" + histName]->Fill(
673  m_eventFuncMap[m_eventObservableNames[i]](*pfCollection, reco::PFCandidate::ParticleType::h0), eventWeight);
674  map_of_MEs[m_directory + "/electronPFC_" + histName]->Fill(
676  map_of_MEs[m_directory + "/muonPFC_" + histName]->Fill(
678  map_of_MEs[m_directory + "/gammaPFC_" + histName]->Fill(
680  map_of_MEs[m_directory + "/hadHFPFC_" + histName]->Fill(
681  m_eventFuncMap[m_eventObservableNames[i]](*pfCollection, reco::PFCandidate::ParticleType::h_HF), eventWeight);
682  map_of_MEs[m_directory + "/emHFPFC_" + histName]->Fill(
683  m_eventFuncMap[m_eventObservableNames[i]](*pfCollection, reco::PFCandidate::ParticleType::egamma_HF),
684  eventWeight);
685  }
686 
687  // Plots for generic debugging
688  map_of_MEs[m_directory + "/NPV"]->Fill(numPV, eventWeight);
689  map_of_MEs[m_directory + Form("/jetPtLead_%s", npvString.c_str())]->Fill(pfJets->begin()->pt(), eventWeight);
690  map_of_MEs[m_directory + Form("/jetEtaLead_%s", npvString.c_str())]->Fill(pfJets->begin()->eta(), eventWeight);
691 
692  // Make plots of all observables, this time for PF candidates within jets
693  for (reco::PFJetCollection::const_iterator cjet = pfJets->begin(); cjet != pfJets->end(); ++cjet) {
694  map_of_MEs[m_directory + Form("/jetPt_%s", npvString.c_str())]->Fill(cjet->pt(), eventWeight);
695  map_of_MEs[m_directory + Form("/jetEta_%s", npvString.c_str())]->Fill(cjet->eta(), eventWeight);
696 
697  for (unsigned int k = 0; k < m_fullJetCutList.size(); k++) {
698  int jetBinNumber = getJetBin(*cjet, k);
699  if (jetBinNumber < 0)
700  continue;
701  std::string jetBinString = m_allJetSuffixes[k][jetBinNumber];
702 
703  std::vector<reco::PFCandidatePtr> pfConstits = cjet->getPFConstituents();
704 
705  for (auto recoPF : pfConstits) {
706  for (unsigned int j = 0; j < m_fullCutList.size(); j++) {
707  int binNumber = getPFBin(*recoPF, j);
708  if (binNumber < 0)
709  continue;
710  if (binNumber >= int(m_allSuffixes[j].size())) {
711  continue;
712  }
713  std::string binString = m_allSuffixes[j][binNumber];
714 
715  for (unsigned int i = 0; i < m_observableNames.size(); i++) {
716  std::string histName = Form("%s%s_jetCuts%s_%s",
717  m_observableNames[i].c_str(),
718  binString.c_str(),
719  jetBinString.c_str(),
720  npvString.c_str());
721  map_of_MEs[m_directory + "/allPFC_jetMatched_" + histName]->Fill(m_funcMap[m_observableNames[i]](*recoPF),
722  eventWeight);
723 
724  switch (recoPF->particleId()) {
726  map_of_MEs[m_directory + "/chargedHadPFC_jetMatched_" + histName]->Fill(
727  m_funcMap[m_observableNames[i]](*recoPF), eventWeight);
728  break;
729  case reco::PFCandidate::ParticleType::h0:
730  map_of_MEs[m_directory + "/neutralHadPFC_jetMatched_" + histName]->Fill(
731  m_funcMap[m_observableNames[i]](*recoPF), eventWeight);
732  break;
734  map_of_MEs[m_directory + "/electronPFC_jetMatched_" + histName]->Fill(
735  m_funcMap[m_observableNames[i]](*recoPF), eventWeight);
736  break;
738  map_of_MEs[m_directory + "/muonPFC_jetMatched_" + histName]->Fill(
739  m_funcMap[m_observableNames[i]](*recoPF), eventWeight);
740  break;
742  map_of_MEs[m_directory + "/gammaPFC_jetMatched_" + histName]->Fill(
743  m_funcMap[m_observableNames[i]](*recoPF), eventWeight);
744  break;
745  case reco::PFCandidate::ParticleType::h_HF:
746  map_of_MEs[m_directory + "/hadHFPFC_jetMatched_" + histName]->Fill(
747  m_funcMap[m_observableNames[i]](*recoPF), eventWeight);
748  break;
749  case reco::PFCandidate::ParticleType::egamma_HF:
750  map_of_MEs[m_directory + "/emHFPFC_jetMatched_" + histName]->Fill(
751  m_funcMap[m_observableNames[i]](*recoPF), eventWeight);
752  break;
753  default:
754  break;
755  }
756  }
757 
758  for (unsigned int i = 0; i < m_pfInJetObservableNames.size(); i++) {
759  std::string histName = Form("%s%s_jetCuts%s_%s",
760  m_pfInJetObservableNames[i].c_str(),
761  binString.c_str(),
762  jetBinString.c_str(),
763  npvString.c_str());
764  map_of_MEs[m_directory + "/allPFC_jetMatched_" + histName]->Fill(
765  m_pfInJetFuncMap[m_pfInJetObservableNames[i]](*recoPF, *cjet), eventWeight);
766 
767  switch (recoPF->particleId()) {
769  map_of_MEs[m_directory + "/chargedHadPFC_jetMatched_" + histName]->Fill(
770  m_pfInJetFuncMap[m_pfInJetObservableNames[i]](*recoPF, *cjet), eventWeight);
771  break;
772  case reco::PFCandidate::ParticleType::h0:
773  map_of_MEs[m_directory + "/neutralHadPFC_jetMatched_" + histName]->Fill(
774  m_pfInJetFuncMap[m_pfInJetObservableNames[i]](*recoPF, *cjet), eventWeight);
775  break;
777  map_of_MEs[m_directory + "/electronPFC_jetMatched_" + histName]->Fill(
778  m_pfInJetFuncMap[m_pfInJetObservableNames[i]](*recoPF, *cjet), eventWeight);
779  break;
781  map_of_MEs[m_directory + "/muonPFC_jetMatched_" + histName]->Fill(
782  m_pfInJetFuncMap[m_pfInJetObservableNames[i]](*recoPF, *cjet), eventWeight);
783  break;
785  map_of_MEs[m_directory + "/gammaPFC_jetMatched_" + histName]->Fill(
786  m_pfInJetFuncMap[m_pfInJetObservableNames[i]](*recoPF, *cjet), eventWeight);
787  break;
788  case reco::PFCandidate::ParticleType::h_HF:
789  map_of_MEs[m_directory + "/hadHFPFC_jetMatched_" + histName]->Fill(
790  m_pfInJetFuncMap[m_pfInJetObservableNames[i]](*recoPF, *cjet), eventWeight);
791  break;
792  case reco::PFCandidate::ParticleType::egamma_HF:
793  map_of_MEs[m_directory + "/emHFPFC_jetMatched_" + histName]->Fill(
794  m_pfInJetFuncMap[m_pfInJetObservableNames[i]](*recoPF, *cjet), eventWeight);
795  break;
796  default:
797  break;
798  }
799  }
800  }
801 
802  for (unsigned int i = 0; i < m_eventObservableNames.size(); i++) {
803  std::string histName =
804  Form("%s_jetCuts%s_%s", m_eventObservableNames[i].c_str(), jetBinString.c_str(), npvString.c_str());
805  map_of_MEs[m_directory + "/allPFC_jetMatched_" + histName]->Fill(
807  map_of_MEs[m_directory + "/chargedHadPFC_jetMatched_" + histName]->Fill(
809  map_of_MEs[m_directory + "/neutralHadPFC_jetMatched_" + histName]->Fill(
810  m_jetWideFuncMap[m_eventObservableNames[i]](pfConstits, reco::PFCandidate::ParticleType::h0),
811  eventWeight);
812  map_of_MEs[m_directory + "/electronPFC_jetMatched_" + histName]->Fill(
814  map_of_MEs[m_directory + "/muonPFC_jetMatched_" + histName]->Fill(
816  eventWeight);
817  map_of_MEs[m_directory + "/gammaPFC_jetMatched_" + histName]->Fill(
819  eventWeight);
820  map_of_MEs[m_directory + "/hadHFPFC_jetMatched_" + histName]->Fill(
821  m_jetWideFuncMap[m_eventObservableNames[i]](pfConstits, reco::PFCandidate::ParticleType::h_HF),
822  eventWeight);
823  map_of_MEs[m_directory + "/emHFPFC_jetMatched_" + histName]->Fill(
824  m_jetWideFuncMap[m_eventObservableNames[i]](pfConstits, reco::PFCandidate::ParticleType::egamma_HF),
825  eventWeight);
826  }
827  }
828  }
829  }
830 }
size
Write out results.
edm::EDGetTokenT< edm::ValueMap< float > > weightsToken_
Definition: PFAnalyzer.h:276
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Inizialize parameters for histo binning.
Definition: PFAnalyzer.cc:152
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
std::vector< std::vector< std::vector< double > > > m_jetBinList
Definition: PFAnalyzer.h:330
static double getDNNESigIsolated(const reco::PFCandidate pfCand)
Definition: PFAnalyzer.h:171
std::vector< std::vector< std::vector< double > > > m_binList
Definition: PFAnalyzer.h:321
int getBinNumber(double binVal, std::vector< double > bins)
Definition: PFAnalyzer.cc:477
edm::EDGetTokenT< edm::TriggerResults > triggerResultsToken_
Definition: PFAnalyzer.h:284
void dqmBeginRun(const edm::Run &, const edm::EventSetup &) override
Initialize run-based parameters.
Definition: PFAnalyzer.cc:363
static double getRawHOEnergy(const reco::PFCandidate pfCand)
Definition: PFAnalyzer.h:161
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:36
static double getDNNEBkgPhotonIsolated(const reco::PFCandidate pfCand)
Definition: PFAnalyzer.h:175
static double getHcalEnergy_depth5(const reco::PFCandidate pfCand)
Definition: PFAnalyzer.h:152
binInfo getBinInfo(std::string)
Definition: PFAnalyzer.cc:333
T const * product() const
Definition: Handle.h:70
static double getHCalEnergy(const reco::PFCandidate pfCand)
Definition: PFAnalyzer.h:206
edm::InputTag highPtJetExpr_
Definition: PFAnalyzer.h:283
#define X(str)
Definition: MuonsGrabber.cc:38
std::map< std::string, std::function< double(const reco::PFJet)> > m_jetFuncMap
Definition: PFAnalyzer.h:80
void analyze(const edm::Event &, const edm::EventSetup &) override
Get the analysis.
Definition: PFAnalyzer.cc:528
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
static double getJetPt(const reco::PFJet jet)
Definition: PFAnalyzer.h:269
std::string const & label() const
Definition: InputTag.h:36
edm::ParameterSet parameters_
Definition: PFAnalyzer.h:296
Log< level::Error, false > LogError
std::vector< std::vector< std::string > > m_allJetSuffixes
Definition: PFAnalyzer.h:287
static double getHOEnergy(const reco::PFCandidate pfCand)
Definition: PFAnalyzer.h:160
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
std::vector< std::vector< std::string > > m_fullCutList
Definition: PFAnalyzer.h:320
int getPFBin(const reco::PFCandidate pfCand, int i)
Definition: PFAnalyzer.cc:509
std::vector< double > vDouble
Definition: PFAnalyzer.h:299
Jets made from PFObjects.
Definition: PFJet.h:20
vstring m_eventObservableNames
Definition: PFAnalyzer.h:311
static double getMVAEMu(const reco::PFCandidate pfCand)
Definition: PFAnalyzer.h:165
#define LogTrace(id)
std::vector< std::string > m_pfNames
Definition: PFAnalyzer.h:338
vstring m_jetCutList
Definition: PFAnalyzer.h:328
vDouble m_npvBins
Definition: PFAnalyzer.h:332
int iEvent
Definition: GenABIO.cc:224
std::map< std::string, MonitorElement * > map_of_MEs
Definition: PFAnalyzer.h:293
static double getNTracksInBlock(const reco::PFCandidate pfCand)
Definition: PFAnalyzer.h:250
std::string getSuffix(std::vector< int > binList, std::vector< std::string > observables, std::vector< std::vector< double >> binnings)
Definition: PFAnalyzer.cc:462
static double getEta(const reco::PFCandidate pfCand)
Definition: PFAnalyzer.h:136
def binNumber(station, sl)
vstring m_eventObservables
Definition: PFAnalyzer.h:307
static double getEnergy(const reco::PFCandidate pfCand)
Definition: PFAnalyzer.h:135
int getJetBin(const reco::PFJet jetCand, int i)
Definition: PFAnalyzer.cc:518
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
static double getDNNEBkgNonIsolated(const reco::PFCandidate pfCand)
Definition: PFAnalyzer.h:173
std::vector< std::string > vstring
Definition: PFAnalyzer.h:298
edm::InputTag vertexTag_
Definition: PFAnalyzer.h:282
static double getHadCalibration(const reco::PFCandidate pfCand)
Definition: PFAnalyzer.h:140
edm::InputTag theTriggerResultsLabel_
Definition: PFAnalyzer.h:281
vstring m_pfInJetObservables
Definition: PFAnalyzer.h:308
std::map< std::string, std::function< double(const reco::PFCandidate, const reco::PFJet)> > m_pfInJetFuncMap
Definition: PFAnalyzer.h:79
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
static double getHcalEnergy_depth3(const reco::PFCandidate pfCand)
Definition: PFAnalyzer.h:150
std::map< std::string, std::function< double(const std::vector< reco::PFCandidatePtr > pfCands, reco::PFCandidate::ParticleType pfType)> > m_jetWideFuncMap
Definition: PFAnalyzer.h:78
static double getEcalEnergy(const reco::PFCandidate pfCand)
Definition: PFAnalyzer.h:156
static std::string const triggerResults
Definition: EdmProvDump.cc:47
std::vector< std::string > getAllSuffixes(std::vector< std::string > observables, std::vector< std::vector< double >> binnings)
Definition: PFAnalyzer.cc:423
static double getRawHcalEnergy(const reco::PFCandidate pfCand)
Definition: PFAnalyzer.h:159
edm::EDGetTokenT< reco::PFJetCollection > pfJetsToken_
Definition: PFAnalyzer.h:273
edm::InputTag srcWeights
Definition: PFAnalyzer.h:274
PFAnalyzer(const edm::ParameterSet &)
Constructor.
Definition: PFAnalyzer.cc:12
static double getRawEcalEnergy(const reco::PFCandidate pfCand)
Definition: PFAnalyzer.h:157
std::vector< std::vector< std::string > > m_fullJetCutList
Definition: PFAnalyzer.h:329
int getBinNumbers(std::vector< double > binVal, std::vector< std::vector< double >> bins)
Definition: PFAnalyzer.cc:488
static double getEoverP(const reco::PFCandidate pfCand)
Definition: PFAnalyzer.h:185
std::string m_directory
Definition: PFAnalyzer.h:290
static double getMVAPiMu(const reco::PFCandidate pfCand)
Definition: PFAnalyzer.h:166
static double getPhi(const reco::PFCandidate pfCand)
Definition: PFAnalyzer.h:138
std::map< std::string, std::function< double(const reco::PFCandidateCollection, reco::PFCandidate::ParticleType pfType)> > m_eventFuncMap
Definition: PFAnalyzer.h:75
std::string observable
Definition: PFAnalyzer.h:342
bool passesEventSelection(const edm::Event &iEvent)
Definition: PFAnalyzer.cc:365
edm::ValueMap< float > const * weights_
Definition: PFAnalyzer.h:277
std::string stringWithDecimals(int bin, std::vector< double > bins)
Definition: PFAnalyzer.cc:368
static double getMVAEPi(const reco::PFCandidate pfCand)
Definition: PFAnalyzer.h:164
static double getMVAGammaNH(const reco::PFCandidate pfCand)
Definition: PFAnalyzer.h:169
bool isValid() const
Definition: HandleBase.h:70
static double getHcalEnergy_depth4(const reco::PFCandidate pfCand)
Definition: PFAnalyzer.h:151
edm::EDGetTokenT< reco::PFCandidateCollection > thePfCandidateCollection_
Definition: PFAnalyzer.h:271
void bookMESetSelection(std::string, DQMStore::IBooker &)
Definition: PFAnalyzer.cc:358
Particle reconstructed by the particle flow algorithm.
Definition: PFCandidate.h:41
const float binMin[32]
static double getHcalEnergy(const reco::PFCandidate pfCand)
Definition: PFAnalyzer.h:158
std::vector< double > getBinList(std::string binString)
Definition: PFAnalyzer.cc:399
edm::EDGetTokenT< GenEventInfoProduct > tok_ew_
Definition: PFAnalyzer.h:279
static double getNPFC(const reco::PFCandidateCollection pfCands, reco::PFCandidate::ParticleType pfType)
Definition: PFAnalyzer.h:110
static double getDNNESigNonIsolated(const reco::PFCandidate pfCand)
Definition: PFAnalyzer.h:172
static double getHcalEnergy_depth1(const reco::PFCandidate pfCand)
Definition: PFAnalyzer.h:148
static double getDNNEBkgTauIsolated(const reco::PFCandidate pfCand)
Definition: PFAnalyzer.h:174
static double getMVANothingGamma(const reco::PFCandidate pfCand)
Definition: PFAnalyzer.h:167
static double getNPFCinJet(const std::vector< reco::PFCandidatePtr > pfCands, reco::PFCandidate::ParticleType pfType)
Definition: PFAnalyzer.h:121
std::vector< std::vector< std::string > > m_allSuffixes
Definition: PFAnalyzer.h:286
static double getMVANothingNH(const reco::PFCandidate pfCand)
Definition: PFAnalyzer.h:168
std::string axisName
Definition: PFAnalyzer.h:343
edm::EDGetTokenT< std::vector< reco::Vertex > > vertexToken_
Definition: PFAnalyzer.h:272
vstring m_observableNames
Definition: PFAnalyzer.h:310
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
static double getEnergySpectrum(const reco::PFCandidate pfCand, const reco::PFJet jet)
Definition: PFAnalyzer.h:104
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
static double getHcalEnergy_depth6(const reco::PFCandidate pfCand)
Definition: PFAnalyzer.h:153
std::map< std::string, std::function< double(const reco::PFCandidate)> > m_funcMap
Definition: PFAnalyzer.h:69
vstring m_cutList
Definition: PFAnalyzer.h:319
static double getMVAIsolated(const reco::PFCandidate pfCand)
Definition: PFAnalyzer.h:163
~PFAnalyzer() override
Destructor.
Definition: PFAnalyzer.cc:149
static double getHcalEnergy_depth2(const reco::PFCandidate pfCand)
Definition: PFAnalyzer.h:149
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
vstring m_pfInJetObservableNames
Definition: PFAnalyzer.h:312
vstring m_observables
Definition: PFAnalyzer.h:306
Definition: Run.h:45
static double getHcalEnergy_depth7(const reco::PFCandidate pfCand)
Definition: PFAnalyzer.h:154
static double getPt(const reco::PFCandidate pfCand)
Definition: PFAnalyzer.h:134
#define LogDebug(id)