CMS 3D CMS Logo

FSQDiJetAve.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: DQMOffline/FSQDiJetAve
4 // Class: FSQDiJetAve
5 //
12 //
13 // Original Author: Tomasz Fruboes
14 // Created: Tue, 04 Nov 2014 11:36:27 GMT
15 //
16 //
17 // system include files
18 #include <memory>
19 
20 // user include files
23 
26 
30 
33 
36 
38 
47 
48 #include <boost/algorithm/string.hpp>
51 
52 using namespace edm;
53 using namespace std;
54 
55 namespace FSQ {
56  //################################################################################################
57  //
58  // Base Handler class
59  //
60  //################################################################################################
61  class BaseHandler {
62  public:
65 
66  BaseHandler();
67  virtual ~BaseHandler() = default;
69  : m_expression(triggerExpression::parse(iConfig.getParameter<std::string>("triggerSelection"))) {
70  // extract list of used paths
71  std::vector<std::string> strs;
72  std::string triggerSelection = iConfig.getParameter<std::string>("triggerSelection");
73  boost::split(strs, triggerSelection, boost::is_any_of("\t ,`!@#$%^&*()~/\\"));
74  for (auto& str : strs) {
75  if (str.find("HLT_") == 0) {
76  m_usedPaths.insert(str);
77  }
78  }
79 
80  m_eventCache = &eventCache;
81  std::string pathPartialName = iConfig.getParameter<std::string>("partialPathName");
82  m_dirname = iConfig.getUntrackedParameter("mainDQMDirname", std::string("HLT/FSQ/")) + pathPartialName + "/";
83  m_pset = iConfig;
84  };
85  virtual void analyze(const edm::Event& iEvent,
86  const edm::EventSetup& iSetup,
88  const trigger::TriggerEvent& trgEvent,
91  float weight) = 0;
92  virtual void book(DQMStore::IBooker& booker) = 0;
93  virtual void getAndStoreTokens(edm::ConsumesCollector&& iC) = 0;
94 
95  std::unique_ptr<triggerExpression::Evaluator> m_expression;
98  std::map<std::string, MonitorElement*> m_histos;
99  std::set<std::string> m_usedPaths;
101  };
102  //################################################################################################
103  //
104  // Handle objects saved into hlt event by hlt filters
105  //
106  //################################################################################################
108  template <class TInputCandidateType, class TOutputCandidateType, SpecialFilters filter = None>
109  class HandlerTemplate : public BaseHandler {
110  private:
112  std::string m_pathPartialName; //#("HLT_DiPFJetAve30_HFJEC_");
113  std::string m_filterPartialName; //#("ForHFJECBase"); // Calo jet preFilter
114 
116 
120  std::map<std::string, std::shared_ptr<StringObjectFunction<std::vector<TOutputCandidateType> > > >
122  std::map<std::string, std::shared_ptr<StringObjectFunction<TInputCandidateType> > > m_plottersSingleObject;
124  static const int SingleObjectPlotter = 0;
125  static const int CombinedObjectPlotter = 1;
126  std::map<std::string, int> m_plotterType;
127  std::vector<edm::ParameterSet> m_combinedObjectDrawables;
128  std::vector<edm::ParameterSet> m_singleObjectDrawables; // for all single objects passing preselection
129  bool m_isSetup;
131  std::map<std::string, edm::EDGetToken> m_tokens;
132 
133  public:
135  : BaseHandler(iConfig, eventCache),
136  m_singleObjectSelection(iConfig.getParameter<std::string>("singleObjectsPreselection")),
137  m_combinedObjectSelection(iConfig.getParameter<std::string>("combinedObjectSelection")),
138  m_combinedObjectSortFunction(iConfig.getParameter<std::string>("combinedObjectSortCriteria")) {
139  std::string type = iConfig.getParameter<std::string>("handlerType");
140  if (type != "FromHLT") {
141  m_input = iConfig.getParameter<edm::InputTag>("inputCol");
142  }
143 
144  m_dqmhistolabel = iConfig.getParameter<std::string>("dqmhistolabel");
145  m_filterPartialName =
146  iConfig.getParameter<std::string>("partialFilterName"); // std::string find is used to match filter
147  m_pathPartialName = iConfig.getParameter<std::string>("partialPathName");
148  m_combinedObjectDimension = iConfig.getParameter<int>("combinedObjectDimension");
149  m_combinedObjectDrawables = iConfig.getParameter<std::vector<edm::ParameterSet> >("combinedObjectDrawables");
150  m_singleObjectDrawables = iConfig.getParameter<std::vector<edm::ParameterSet> >("singleObjectDrawables");
151  m_isSetup = false;
152  }
153  ~HandlerTemplate() override = default;
154  void book(DQMStore::IBooker& booker) override {
155  if (!m_isSetup) {
156  booker.setCurrentFolder(m_dirname);
157  m_isSetup = true;
158  std::vector<std::vector<edm::ParameterSet>*> todo(2, (std::vector<edm::ParameterSet>*)nullptr);
159  todo[CombinedObjectPlotter] = &m_combinedObjectDrawables;
160  todo[SingleObjectPlotter] = &m_singleObjectDrawables;
161  for (size_t ti = 0; ti < todo.size(); ++ti) {
162  for (size_t i = 0; i < todo[ti]->size(); ++i) {
163  std::string histoName = m_dqmhistolabel + "_" + todo[ti]->at(i).template getParameter<std::string>("name");
164  std::string expression = todo[ti]->at(i).template getParameter<std::string>("expression");
165  int bins = todo[ti]->at(i).template getParameter<int>("bins");
166  double rangeLow = todo[ti]->at(i).template getParameter<double>("min");
167  double rangeHigh = todo[ti]->at(i).template getParameter<double>("max");
168  m_histos[histoName] = booker.book1D(histoName, histoName, bins, rangeLow, rangeHigh);
169  m_plotterType[histoName] = ti;
170  if (ti == CombinedObjectPlotter) {
172  m_plottersCombinedObject[histoName] =
173  std::shared_ptr<StringObjectFunction<std::vector<TOutputCandidateType> > >(func);
174  } else {
175  auto* func = new StringObjectFunction<TInputCandidateType>(expression);
176  m_plottersSingleObject[histoName] = std::shared_ptr<StringObjectFunction<TInputCandidateType> >(func);
177  }
178  }
179  }
180  }
181  }
183  edm::EDGetTokenT<std::vector<TInputCandidateType> > tok = iC.consumes<std::vector<TInputCandidateType> >(m_input);
184  m_tokens[m_input.encode()] = edm::EDGetToken(tok);
185  }
186 
187  //#############################################################################
188  // Count objects. To avoid code duplication we do it in a separate template -
189  // - partial specialization not easy...:
190  // http://stackoverflow.com/questions/21182729/specializing-single-method-in-a-big-template-class
191  //#############################################################################
192  template <class T>
194  int ret = 0;
195  Handle<std::vector<T> > hIn;
196  iEvent.getByToken(m_tokens[input.encode()], hIn);
197  if (!hIn.isValid()) {
198  edm::LogError("FSQDiJetAve") << "product not found: " << input.encode();
199  return -1; // return nonsense value
200  }
201  for (size_t i = 0; i < hIn->size(); ++i) {
202  bool preselection = sel(hIn->at(i));
203  if (preselection) {
204  fillSingleObjectPlots(hIn->at(i), weight);
205  ret += 1;
206  }
207  }
208  return ret;
209  }
210 
211  // FIXME (?): code duplication
212  void fillSingleObjectPlots(const TInputCandidateType& cand, float weight) {
213  std::map<std::string, MonitorElement*>::iterator it, itE;
214  it = m_histos.begin();
215  itE = m_histos.end();
216  for (; it != itE; ++it) {
217  if (m_plotterType[it->first] != SingleObjectPlotter)
218  continue;
219  float val = (*m_plottersSingleObject[it->first])(cand);
220  it->second->Fill(val, weight);
221  }
222  }
223  // Notes:
224  // - this function (and specialized versions) are responsible for calling
225  // fillSingleObjectPlots for all single objects passing the single
226  // object preselection criteria
227  // - FIXME this function should take only event/ event setup (?)
228  // - FIXME responsibility to apply preselection should be elsewhere
229  // hard to fix, since we dont want to copy all objects due to
230  // performance reasons
231  // - note: implementation below working when in/out types are equal
232  // in other cases you must provide specialized version (see below)
233  void getFilteredCands(TInputCandidateType*,
234  std::vector<TOutputCandidateType>& cands,
235  const edm::Event& iEvent,
236  const edm::EventSetup& iSetup,
238  const trigger::TriggerEvent& trgEvent,
239  float weight) {
241  iEvent.getByToken(m_tokens[m_input.encode()], hIn);
242 
243  if (!hIn.isValid()) {
244  edm::LogError("FSQDiJetAve") << "product not found: " << m_input.encode();
245  return;
246  }
247 
248  for (size_t i = 0; i < hIn->size(); ++i) {
249  bool preselection = m_singleObjectSelection(hIn->at(i));
250  if (preselection) {
251  fillSingleObjectPlots(hIn->at(i), weight);
252  cands.push_back(hIn->at(i));
253  }
254  }
255  }
256 
257  std::vector<std::string> findPathAndFilter(const HLTConfigProvider& hltConfig) {
258  std::vector<std::string> ret(2, "");
259  std::string filterFullName = "";
260  std::string pathFullName = "";
261  std::vector<std::string> filtersForThisPath;
262  //int pathIndex = -1;
263  int numPathMatches = 0;
264  int numFilterMatches = 0;
265  for (size_t i = 0; i < hltConfig.size(); ++i) {
266  if (hltConfig.triggerName(i).find(m_pathPartialName) == std::string::npos)
267  continue;
268  pathFullName = hltConfig.triggerName(i);
269  //pathIndex = i;
270  ++numPathMatches;
271  std::vector<std::string> moduleLabels = hltConfig.moduleLabels(i);
272  for (auto& moduleLabel : moduleLabels) {
273  if ("EDFilter" == hltConfig.moduleEDMType(moduleLabel)) {
274  filtersForThisPath.push_back(moduleLabel);
275  if (moduleLabel.find(m_filterPartialName) != std::string::npos) {
276  filterFullName = moduleLabel;
277  ++numFilterMatches;
278  }
279  }
280  }
281  }
282 
283  // LogWarning or LogError?
284  if (numPathMatches != 1) {
285  edm::LogInfo("FSQDiJetAve") << "Problem: found " << numPathMatches << " paths matching " << m_pathPartialName
286  << std::endl;
287  return ret;
288  }
289  ret[0] = pathFullName;
290  if (numFilterMatches != 1) {
291  edm::LogError("FSQDiJetAve") << "Problem: found " << numFilterMatches << " filter matching "
292  << m_filterPartialName << " in path " << m_pathPartialName << std::endl;
293  return ret;
294  }
295  ret[1] = filterFullName;
296  return ret;
297  }
298 
299  void analyze(const edm::Event& iEvent,
300  const edm::EventSetup& iSetup,
302  const trigger::TriggerEvent& trgEvent,
305  float weight) override {
306  size_t found = 0;
307  for (size_t i = 0; i < triggerNames.size(); ++i) {
308  auto itUsedPaths = m_usedPaths.begin();
309  for (; itUsedPaths != m_usedPaths.end(); ++itUsedPaths) {
310  if (triggerNames.triggerName(i).find(*itUsedPaths) != std::string::npos) {
311  ++found;
312  break;
313  }
314  }
315 
316  if (found == m_usedPaths.size())
317  break;
318  }
319  if (found != m_usedPaths.size()) {
320  edm::LogInfo("FSQDiJetAve") << "One of requested paths not found, skipping event";
321  return;
322  }
323  if (m_eventCache->configurationUpdated()) {
324  m_expression->init(*m_eventCache);
325  }
326  if (not(*m_expression)(*m_eventCache))
327  return;
328 
329  /*
330  std::vector<std::string> pathAndFilter = findPathAndFilter(hltConfig);
331 
332  std::string pathFullName = pathAndFilter[0];
333  if (pathFullName == "") {
334  return;
335  }
336  unsigned indexNum = triggerNames.triggerIndex(pathFullName);
337  if(indexNum >= triggerNames.size()){
338  edm::LogError("FSQDiJetAve") << "Problem determining trigger index for " << pathFullName << " " << m_pathPartialName;
339  }
340  if (!triggerResults.accept(indexNum)) return;*/
341 
342  std::vector<TOutputCandidateType> cands;
343  getFilteredCands((TInputCandidateType*)nullptr, cands, iEvent, iSetup, hltConfig, trgEvent, weight);
344 
345  if (cands.empty())
346  return;
347 
348  std::vector<TOutputCandidateType> bestCombinationFromCands = getBestCombination(cands);
349  if (bestCombinationFromCands.empty())
350  return;
351 
352  // plot
353  std::map<std::string, MonitorElement*>::iterator it, itE;
354  it = m_histos.begin();
355  itE = m_histos.end();
356  for (; it != itE; ++it) {
357  if (m_plotterType[it->first] != CombinedObjectPlotter)
358  continue;
359  float val = (*m_plottersCombinedObject[it->first])(bestCombinationFromCands);
360  it->second->Fill(val, weight);
361  }
362  }
363 
364  std::vector<TOutputCandidateType> getBestCombination(std::vector<TOutputCandidateType>& cands) {
365  int columnSize = cands.size();
366  std::vector<int> currentCombination(m_combinedObjectDimension, 0);
367  std::vector<int> bestCombination(m_combinedObjectDimension, -1);
368 
369  int maxCombinations = 1;
370  int cnt = 0;
371  while (cnt < m_combinedObjectDimension) {
372  cnt += 1;
373  maxCombinations *= columnSize;
374  }
375 
376  cnt = 0;
377  float bestCombinedCandVal = -1;
378  while (cnt < maxCombinations) {
379  cnt += 1;
380 
381  // 1. Check if current combination contains duplicates
382  std::vector<int> currentCombinationCopy(currentCombination);
383  std::vector<int>::iterator it;
384  std::sort(currentCombinationCopy.begin(), currentCombinationCopy.end());
385  it = std::unique(currentCombinationCopy.begin(), currentCombinationCopy.end());
386  currentCombinationCopy.resize(std::distance(currentCombinationCopy.begin(), it));
387  bool duplicatesPresent = currentCombination.size() != currentCombinationCopy.size();
388  // 2. If no duplicates found -
389  // - check if current combination passes the cut
390  // - rank current combination
391  if (!duplicatesPresent) { // no duplicates, we can consider this combined object
392  std::vector<TOutputCandidateType> currentCombinationFromCands;
393  for (int i = 0; i < m_combinedObjectDimension; ++i) {
394  currentCombinationFromCands.push_back(cands.at(currentCombination.at(i)));
395  }
396  bool isOK = m_combinedObjectSelection(currentCombinationFromCands);
397  if (isOK) {
398  float curVal = m_combinedObjectSortFunction(currentCombinationFromCands);
399  // FIXME
400  if (curVal < 0) {
401  edm::LogError("FSQDiJetAve")
402  << "Problem: ranking function returned negative value: " << curVal << std::endl;
403  } else if (curVal > bestCombinedCandVal) {
404  //std::cout << curVal << " " << bestCombinedCandVal << std::endl;
405  bestCombinedCandVal = curVal;
406  bestCombination = currentCombination;
407  }
408  }
409  }
410  // 3. Prepare next combination to test
411  // note to future self: less error prone method with modulo
412  currentCombination.at(m_combinedObjectDimension - 1) += 1; // increase last number
413  int carry = 0;
414  for (int i = m_combinedObjectDimension - 1; i >= 0;
415  --i) { // iterate over all numbers, check if we are out of range
416  currentCombination.at(i) += carry;
417  carry = 0;
418  if (currentCombination.at(i) >= columnSize) {
419  carry = 1;
420  currentCombination.at(i) = 0;
421  }
422  }
423  } // combinations loop ends
424 
425  std::vector<TOutputCandidateType> bestCombinationFromCands;
426  if (!bestCombination.empty() && bestCombination.at(0) >= 0) {
427  for (int i = 0; i < m_combinedObjectDimension; ++i) {
428  bestCombinationFromCands.push_back(cands.at(bestCombination.at(i)));
429  }
430  }
431  return bestCombinationFromCands;
432  }
433  };
434  //#############################################################################
435  // Read any object inheriting from reco::Candidate. Save p4
436  //
437  // problem: for reco::Candidate there is no reflex dictionary, so selector
438  // wont work
439  //#############################################################################
440  template <>
442  edm::ConsumesCollector&& iC) {
443  edm::EDGetTokenT<View<reco::Candidate> > tok = iC.consumes<View<reco::Candidate> >(m_input);
444  m_tokens[m_input.encode()] = edm::EDGetToken(tok);
445  }
446  template <>
448  reco::Candidate::LorentzVector*, // pass a dummy pointer, makes possible to select correct getFilteredCands
449  std::vector<reco::Candidate::LorentzVector>& cands, // output collection
450  const edm::Event& iEvent,
451  const edm::EventSetup& iSetup,
453  const trigger::TriggerEvent& trgEvent,
454  float weight) {
456  iEvent.getByToken(m_tokens[m_input.encode()], hIn);
457  if (!hIn.isValid()) {
458  edm::LogError("FSQDiJetAve") << "product not found: " << m_input.encode();
459  return;
460  }
461  for (auto const& i : *hIn) {
462  bool preselection = m_singleObjectSelection(i.p4());
463  if (preselection) {
464  fillSingleObjectPlots(i.p4(), weight);
465  cands.push_back(i.p4());
466  }
467  }
468  }
469  //#############################################################################
470  //
471  // Count any object inheriting from reco::Track. Save into std::vector<int>
472  // note: this is similar to recoCand counter (code duplication is hard to
473  // avoid in this case)
474  //
475  //#############################################################################
476  template <>
478  reco::Track*, // pass a dummy pointer, makes possible to select correct getFilteredCands
479  std::vector<int>& cands, // output collection
480  const edm::Event& iEvent,
481  const edm::EventSetup& iSetup,
483  const trigger::TriggerEvent& trgEvent,
484  float weight) {
485  cands.clear();
486  cands.push_back(count<reco::Track>(iEvent, m_input, m_singleObjectSelection, weight));
487  }
488  template <>
490  reco::GenParticle*, // pass a dummy pointer, makes possible to select correct getFilteredCands
491  std::vector<int>& cands, // output collection
492  const edm::Event& iEvent,
493  const edm::EventSetup& iSetup,
495  const trigger::TriggerEvent& trgEvent,
496  float weight) {
497  cands.clear();
498  cands.push_back(count<reco::GenParticle>(iEvent, m_input, m_singleObjectSelection, weight));
499  }
500  //#############################################################################
501  //
502  // Count any object inheriting from reco::Track that is not to distant from
503  // selected vertex. Save into std::vector<int>
504  // note: this is similar to recoCand counter (code duplication is hard to
505  // avoid in this case)
506  //
507  //#############################################################################
508  template <>
510  edm::EDGetTokenT<std::vector<reco::Track> > tok = iC.consumes<std::vector<reco::Track> >(m_input);
511  m_tokens[m_input.encode()] = edm::EDGetToken(tok);
512 
513  edm::InputTag lVerticesTag = m_pset.getParameter<edm::InputTag>("vtxCollection");
514  edm::EDGetTokenT<reco::VertexCollection> tok2 = iC.consumes<reco::VertexCollection>(lVerticesTag);
515  m_tokens[lVerticesTag.encode()] = edm::EDGetToken(tok2);
516  }
517 
518  template <>
520  reco::Track*, // pass a dummy pointer, makes possible to select correct getFilteredCands
521  std::vector<int>& cands, // output collection
522  const edm::Event& iEvent,
523  const edm::EventSetup& iSetup,
525  const trigger::TriggerEvent& trgEvent,
526  float weight) {
527  // this is not elegant, but should be thread safe
528  static const edm::InputTag lVerticesTag = m_pset.getParameter<edm::InputTag>("vtxCollection");
529  static const int lMinNDOF = m_pset.getParameter<int>("minNDOF"); //7
530  static const double lMaxZ = m_pset.getParameter<double>("maxZ"); // 15
531  static const double lMaxDZ = m_pset.getParameter<double>("maxDZ"); // 0.12
532  static const double lMaxDZ2dzsigma = m_pset.getParameter<double>("maxDZ2dzsigma"); // 3
533  static const double lMaxDXY = m_pset.getParameter<double>("maxDXY"); // 0.12
534  static const double lMaxDXY2dxysigma = m_pset.getParameter<double>("maxDXY2dxysigma"); // 3
535 
536  cands.clear();
537  cands.push_back(0);
538 
540  iEvent.getByToken(m_tokens[lVerticesTag.encode()], vertices);
541 
542  //double bestvz=-999.9, bestvx=-999.9, bestvy=-999.9;
543 
544  double dxy, dz, dzsigma, dxysigma;
545  math::XYZPoint vtxPoint(0.0, 0.0, 0.0);
546  double vzErr = 0.0, vxErr = 0.0, vyErr = 0.0;
547 
548  // take first vertex passing the criteria
549  int bestVtx = -1;
550  for (size_t i = 0; i < vertices->size(); ++i) {
551  if (vertices->at(i).ndof() < lMinNDOF)
552  continue;
553  if (fabs(vertices->at(i).z()) > lMaxZ)
554  continue;
555 
556  vtxPoint = vertices->at(i).position();
557  vzErr = vertices->at(i).zError();
558  vxErr = vertices->at(i).xError();
559  vyErr = vertices->at(i).yError();
560  bestVtx = i;
561  break;
562  }
563  if (bestVtx < 0)
564  return;
565  // const reco::Vertex & vtx = vertices->at(bestVtx);
566 
568  iEvent.getByToken(m_tokens[m_input.encode()], hIn);
569  if (!hIn.isValid()) {
570  edm::LogError("FSQDiJetAve") << "product not found: " << m_input.encode();
571  return;
572  }
573 
574  for (auto const& i : *hIn) {
575  if (!m_singleObjectSelection(i))
576  continue;
577  dxy = 0.0, dz = 0.0, dxysigma = 0.0, dzsigma = 0.0;
578  dxy = -1. * i.dxy(vtxPoint);
579  dz = i.dz(vtxPoint);
580  dxysigma = sqrt(i.dxyError() * i.dxyError() + vxErr * vyErr);
581  dzsigma = sqrt(i.dzError() * i.dzError() + vzErr * vzErr);
582 
583  if (fabs(dz) > lMaxDZ)
584  continue; // TODO...
585  if (fabs(dz / dzsigma) > lMaxDZ2dzsigma)
586  continue;
587  if (fabs(dxy) > lMaxDXY)
588  continue;
589  if (fabs(dxy / dxysigma) > lMaxDXY2dxysigma)
590  continue;
591 
592  cands.at(0) += 1;
593  } //loop over tracks
594  }
595  //#############################################################################
596  //
597  // Apply JEC to PFJets
598  //
599  //#############################################################################
600  template <>
602  edm::EDGetTokenT<std::vector<reco::PFJet> > tok = iC.consumes<std::vector<reco::PFJet> >(m_input);
603  m_tokens[m_input.encode()] = edm::EDGetToken(tok);
604 
605  edm::InputTag jetCorTag = m_pset.getParameter<edm::InputTag>("PFJetCorLabel");
606  edm::EDGetTokenT<reco::JetCorrector> jetcortoken = iC.consumes<reco::JetCorrector>(jetCorTag);
607  m_tokens[jetCorTag.encode()] = edm::EDGetToken(jetcortoken);
608  }
609 
610  template <>
612  reco::PFJet*, // pass a dummy pointer, makes possible to select correct getFilteredCands
613  std::vector<reco::PFJet>& cands, // output collection
614  const edm::Event& iEvent,
615  const edm::EventSetup& iSetup,
617  const trigger::TriggerEvent& trgEvent,
618  float weight) {
619  cands.clear();
620  static const edm::InputTag jetCorTag = m_pset.getParameter<edm::InputTag>("PFJetCorLabel");
622  iEvent.getByToken(m_tokens[jetCorTag.encode()], pfcorrector);
623 
625  iEvent.getByToken(m_tokens[m_input.encode()], hIn);
626 
627  if (!hIn.isValid()) {
628  edm::LogError("FSQDiJetAve") << "product not found: " << m_input.encode();
629  return;
630  }
631 
632  for (auto const& i : *hIn) {
633  double scale = pfcorrector->correction(i);
634  reco::PFJet newPFJet(scale * i.p4(), i.vertex(), i.getSpecific(), i.getJetConstituents());
635 
636  bool preselection = m_singleObjectSelection(newPFJet);
637  if (preselection) {
638  fillSingleObjectPlots(newPFJet, weight);
639  cands.push_back(newPFJet);
640  }
641  }
642  }
643  //#############################################################################
644  //
645  // Count any object inheriting from reco::Candidate. Save into std::vector<int>
646  // same problem as for reco::Candidate handler ()
647  //
648  //#############################################################################
649  template <>
651  edm::EDGetTokenT<View<reco::Candidate> > tok = iC.consumes<View<reco::Candidate> >(m_input);
652  m_tokens[m_input.encode()] = edm::EDGetToken(tok);
653  }
654  template <>
656  reco::Candidate::LorentzVector*, // pass a dummy pointer, makes possible to select correct getFilteredCands
657  std::vector<int>& cands, // output collection
658  const edm::Event& iEvent,
659  const edm::EventSetup& iSetup,
661  const trigger::TriggerEvent& trgEvent,
662  float weight) {
663  cands.clear();
664  cands.push_back(0);
665 
667  iEvent.getByToken(m_tokens[m_input.encode()], hIn);
668  if (!hIn.isValid()) {
669  edm::LogError("FSQDiJetAve") << "product not found: " << m_input.encode();
670  return;
671  }
672  for (auto const& i : *hIn) {
673  bool preselection = m_singleObjectSelection(i.p4());
674  if (preselection) {
675  fillSingleObjectPlots(i.p4(), weight);
676  cands.at(0) += 1;
677  }
678  }
679  }
680  //#############################################################################
681  //
682  // Read and save trigger::TriggerObject from triggerEvent
683  //
684  //#############################################################################
685  template <>
688  std::vector<trigger::TriggerObject>& cands,
689  const edm::Event& iEvent,
690  const edm::EventSetup& iSetup,
692  const trigger::TriggerEvent& trgEvent,
693  float weight) {
694  // 1. Find matching path. Inside matchin path find matching filter
695  std::string filterFullName = findPathAndFilter(hltConfig)[1];
696  if (filterFullName.empty()) {
697  return;
698  }
699 
700  // 2. Fetch HLT objects saved by selected filter. Save those fullfilling preselection
701  // objects are saved in cands variable
702  const std::string& process = trgEvent.usedProcessName(); // broken?
703  edm::InputTag hltTag(filterFullName, "", process);
704 
705  const int hltIndex = trgEvent.filterIndex(hltTag);
706  if (hltIndex >= trgEvent.sizeFilters()) {
707  edm::LogInfo("FSQDiJetAve") << "Cannot determine hlt index for |" << filterFullName << "|" << process;
708  return;
709  }
710 
711  const trigger::TriggerObjectCollection& toc(trgEvent.getObjects());
712  const trigger::Keys& khlt = trgEvent.filterKeys(hltIndex);
713 
714  auto kj = khlt.begin();
715 
716  for (; kj != khlt.end(); ++kj) {
717  bool preselection = m_singleObjectSelection(toc[*kj]);
718  if (preselection) {
719  fillSingleObjectPlots(toc[*kj], weight);
720  cands.push_back(toc[*kj]);
721  }
722  }
723  }
724 
727  RecoCandidateHandler; // in fact reco::Candidate, reco::Candidate::LorentzVector
738 } // namespace FSQ
739 //################################################################################################
740 //
741 // Plugin functions
742 //
743 //################################################################################################
745  : m_eventCache(iConfig.getParameterSet("triggerConfiguration"), consumesCollector()) {
746  m_useGenWeight = iConfig.getParameter<bool>("useGenWeight");
747  if (m_useGenWeight) {
748  m_genEvInfoToken = consumes<GenEventInfoProduct>(edm::InputTag("generator"));
749  }
750 
751  triggerSummaryLabel_ = iConfig.getParameter<edm::InputTag>("triggerSummaryLabel");
752  triggerResultsLabel_ = iConfig.getParameter<edm::InputTag>("triggerResultsLabel");
753  triggerSummaryToken = consumes<trigger::TriggerEvent>(triggerSummaryLabel_);
754  triggerResultsToken = consumes<edm::TriggerResults>(triggerResultsLabel_);
755 
756  triggerSummaryFUToken = consumes<trigger::TriggerEvent>(
758  triggerResultsFUToken = consumes<edm::TriggerResults>(
760 
761  std::vector<edm::ParameterSet> todo = iConfig.getParameter<std::vector<edm::ParameterSet> >("todo");
762  for (auto pset : todo) {
763  std::string type = pset.getParameter<std::string>("handlerType");
764  if (type == "FromHLT") {
765  m_handlers.push_back(std::make_shared<FSQ::HLTHandler>(pset, m_eventCache));
766  } else if (type == "RecoCandidateCounter") {
767  m_handlers.push_back(std::make_shared<FSQ::RecoCandidateCounter>(pset, m_eventCache));
768  } else if (type == "RecoTrackCounter") {
769  m_handlers.push_back(std::make_shared<FSQ::RecoTrackCounter>(pset, m_eventCache));
770  } else if (type == "RecoTrackCounterWithVertexConstraint") {
771  m_handlers.push_back(std::make_shared<FSQ::RecoTrackCounterWithVertexConstraint>(pset, m_eventCache));
772  } else if (type == "FromRecoCandidate") {
773  m_handlers.push_back(std::make_shared<FSQ::RecoCandidateHandler>(pset, m_eventCache));
774  } else if (type == "RecoPFJet") {
775  m_handlers.push_back(std::make_shared<FSQ::RecoPFJetHandler>(pset, m_eventCache));
776  } else if (type == "RecoPFJetWithJEC") {
777  m_handlers.push_back(std::make_shared<FSQ::RecoPFJetWithJECHandler>(pset, m_eventCache));
778  } else if (type == "RecoTrack") {
779  m_handlers.push_back(std::make_shared<FSQ::RecoTrackHandler>(pset, m_eventCache));
780  } else if (type == "RecoPhoton") {
781  m_handlers.push_back(std::make_shared<FSQ::RecoPhotonHandler>(pset, m_eventCache));
782  } else if (type == "RecoMuon") {
783  m_handlers.push_back(std::make_shared<FSQ::RecoMuonHandler>(pset, m_eventCache));
784  } else if (type == "RecoGenParticleCounter") {
785  m_handlers.push_back(std::make_shared<FSQ::RecoGenParticleCounter>(pset, m_eventCache));
786  } else if (type == "RecoGenParticleHandler") {
787  m_handlers.push_back(std::make_shared<FSQ::RecoGenParticleHandler>(pset, m_eventCache));
788  } else {
789  throw cms::Exception("FSQ DQM handler not know: " + type);
790  }
791  }
792  for (auto& m_handler : m_handlers) {
793  m_handler->getAndStoreTokens(consumesCollector());
794  }
795 }
796 
797 FSQDiJetAve::~FSQDiJetAve() = default;
798 
800  using namespace edm;
801  if (not m_eventCache.setEvent(iEvent, iSetup)) {
802  edm::LogError("FSQDiJetAve") << "Could not setup the filter";
803  }
804 
805  //---------- triggerResults ----------
807  if (!m_triggerResults.isValid()) {
809  if (!m_triggerResults.isValid()) {
810  edm::LogError("FSQDiJetAve") << "TriggerResults not valid, skippng event";
811  return;
812  }
813  }
814 
815  //---------- triggerResults ----------
816  if (m_triggerResults.isValid()) {
817  m_triggerNames = iEvent.triggerNames(*m_triggerResults);
818  } else {
819  edm::LogError("FSQDiJetAve") << "TriggerResults not found";
820  return;
821  }
822 
823  //---------- triggerSummary ----------
825  if (!m_trgEvent.isValid()) {
827  if (!m_trgEvent.isValid()) {
828  edm::LogInfo("FSQDiJetAve") << "TriggerEvent not found, ";
829  return;
830  }
831  }
832 
833  float weight = 1.;
834  if (m_useGenWeight) {
836  iEvent.getByToken(m_genEvInfoToken, hGW);
837  weight = hGW->weight();
838  }
839 
840  for (auto& m_handler : m_handlers) {
841  m_handler->analyze(
843  }
844 }
845 // ------------ method called when starting to processes a run ------------
846 //*
848  bool changed(true);
850  if (m_hltConfig.init(run, c, processName, changed)) {
851  LogDebug("FSQDiJetAve") << "HLTConfigProvider failed to initialize.";
852  }
853 }
855  for (auto& m_handler : m_handlers) {
856  m_handler->book(booker);
857  }
858 }
859 //*/
860 // ------------ method called when ending the processing of a run ------------
861 /*
862 void
863 FSQDiJetAve::endRun(edm::Run const&, edm::EventSetup const&)
864 {
865 }
866 */
867 
868 // ------------ method called when starting to processes a luminosity block ------------
869 /*
870 void
871 FSQDiJetAve::beginLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&)
872 {
873 }
874 */
875 
876 // ------------ method called when ending the processing of a luminosity block ------------
877 /*
878 void
879 FSQDiJetAve::endLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&)
880 {}
881 // */
882 
883 // ------------ method fills 'descriptions' with the allowed parameters for the module ------------
885  //The following says we do not know what parameters are allowed so do no validation
886  // Please change this to state exactly what you do use, even if it is no parameters
888  desc.setUnknown();
889  descriptions.addDefault(desc);
890 }
runTheMatrix.ret
ret
prodAgent to be discontinued
Definition: runTheMatrix.py:355
FSQ::HandlerTemplate
Definition: FSQDiJetAve.cc:109
FSQ::RecoCandidateCounter
HandlerTemplate< reco::Candidate::LorentzVector, int > RecoCandidateCounter
Definition: FSQDiJetAve.cc:734
FSQ::RecoTrackCounterWithVertexConstraint
HandlerTemplate< reco::Track, int, BestVertexMatching > RecoTrackCounterWithVertexConstraint
Definition: FSQDiJetAve.cc:736
trigger::TriggerEvent::sizeFilters
trigger::size_type sizeFilters() const
Definition: TriggerEvent.h:146
mps_fire.i
i
Definition: mps_fire.py:355
StringObjectFunction
Definition: StringObjectFunction.h:16
input
static const std::string input
Definition: EdmProvDump.cc:48
Muon.h
trigger::TriggerEvent::filterKeys
const Keys & filterKeys(trigger::size_type index) const
Definition: TriggerEvent.h:118
DQMOfflineHeavyIons_cff.todo
todo
Definition: DQMOfflineHeavyIons_cff.py:112
edm::Handle::product
T const * product() const
Definition: Handle.h:70
edm::InputTag::instance
std::string const & instance() const
Definition: InputTag.h:37
FSQ::BaseHandler::m_eventCache
triggerExpression::Data * m_eventCache
Definition: FSQDiJetAve.cc:96
FSQDiJetAve::m_genEvInfoToken
edm::EDGetTokenT< GenEventInfoProduct > m_genEvInfoToken
Definition: FSQDiJetAve.h:85
FSQ::HandlerTemplate::book
void book(DQMStore::IBooker &booker) override
Definition: FSQDiJetAve.cc:154
reco::GenParticle
Definition: GenParticle.h:21
FSQDiJetAve::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: FSQDiJetAve.cc:884
edm::Run
Definition: Run.h:45
edm::EDGetTokenT
Definition: EDGetToken.h:33
edm
HLT enums.
Definition: AlignableModifier.h:19
FSQ::HandlerTemplate::HandlerTemplate
HandlerTemplate(const edm::ParameterSet &iConfig, triggerExpression::Data &eventCache)
Definition: FSQDiJetAve.cc:134
mps_merge.weight
weight
Definition: mps_merge.py:88
FSQ::RecoGenParticleCounter
HandlerTemplate< reco::GenParticle, int > RecoGenParticleCounter
Definition: FSQDiJetAve.cc:737
FSQDiJetAve::m_handlers
std::vector< std::shared_ptr< FSQ::BaseHandler > > m_handlers
Definition: FSQDiJetAve.h:94
reco::VertexCollection
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
PFJet.h
FSQ::ApplyJEC
Definition: FSQDiJetAve.cc:107
FSQ::HandlerTemplate::m_tokens
std::map< std::string, edm::EDGetToken > m_tokens
Definition: FSQDiJetAve.cc:131
reco::JetCorrector
Definition: JetCorrector.h:35
edm::LogInfo
Definition: MessageLogger.h:254
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
HLT_2018_cff.distance
distance
Definition: HLT_2018_cff.py:6417
edm::InputTag::process
std::string const & process() const
Definition: InputTag.h:40
FSQDiJetAve::m_eventCache
triggerExpression::Data m_eventCache
Definition: FSQDiJetAve.h:74
FSQ::RecoTrackHandler
HandlerTemplate< reco::Track, reco::Track > RecoTrackHandler
Definition: FSQDiJetAve.cc:730
dqm::legacy::MonitorElement
Definition: MonitorElement.h:461
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
EDAnalyzer.h
FSQDiJetAve::triggerResultsToken
edm::EDGetTokenT< edm::TriggerResults > triggerResultsToken
Definition: FSQDiJetAve.h:81
cms::dd::split
std::vector< std::string_view > split(std::string_view, const char *)
FSQ::RecoPFJetHandler
HandlerTemplate< reco::PFJet, reco::PFJet > RecoPFJetHandler
Definition: FSQDiJetAve.cc:728
newFWLiteAna.found
found
Definition: newFWLiteAna.py:118
edm::Handle
Definition: AssociativeIterator.h:50
FSQ::HandlerTemplate::m_singleObjectSelection
StringCutObjectSelector< TInputCandidateType > m_singleObjectSelection
Definition: FSQDiJetAve.cc:117
FSQDiJetAve::FSQDiJetAve
FSQDiJetAve(const edm::ParameterSet &)
Definition: FSQDiJetAve.cc:744
FSQ
Definition: FSQDiJetAve.h:53
GenParticle.h
FSQDiJetAve::triggerSummaryFUToken
edm::EDGetTokenT< trigger::TriggerEvent > triggerSummaryFUToken
Definition: FSQDiJetAve.h:84
edm::InputTag::label
std::string const & label() const
Definition: InputTag.h:36
MakerMacros.h
FSQ::RecoCandidateHandler
HandlerTemplate< reco::Candidate::LorentzVector, reco::Candidate::LorentzVector > RecoCandidateHandler
Definition: FSQDiJetAve.cc:727
Photon.h
FSQ::BaseHandler::m_histos
std::map< std::string, MonitorElement * > m_histos
Definition: FSQDiJetAve.cc:98
FSQDiJetAve.h
FSQ::RecoMuonHandler
HandlerTemplate< reco::Muon, reco::Muon > RecoMuonHandler
Definition: FSQDiJetAve.cc:732
FSQ::HandlerTemplate::m_plottersSingleObject
std::map< std::string, std::shared_ptr< StringObjectFunction< TInputCandidateType > > > m_plottersSingleObject
Definition: FSQDiJetAve.cc:122
FSQ::HandlerTemplate::analyze
void analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup, const HLTConfigProvider &hltConfig, const trigger::TriggerEvent &trgEvent, const edm::TriggerResults &triggerResults, const edm::TriggerNames &triggerNames, float weight) override
Definition: FSQDiJetAve.cc:299
Track.h
None
Definition: APVGainStruct.h:52
dqm::legacy::DQMStore
Definition: DQMStore.h:727
L1TEGammaOffline_cfi.triggerNames
triggerNames
Definition: L1TEGammaOffline_cfi.py:40
Service.h
FSQDiJetAve::triggerResultsFUToken
edm::EDGetTokenT< edm::TriggerResults > triggerResultsFUToken
Definition: FSQDiJetAve.h:82
FSQ::HandlerTemplate::m_filterPartialName
std::string m_filterPartialName
Definition: FSQDiJetAve.cc:113
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
singleTopDQM_cfi.preselection
preselection
Definition: singleTopDQM_cfi.py:78
reco::Track
Definition: Track.h:27
str
#define str(s)
Definition: TestProcessor.cc:48
FSQ::HandlerTemplate::m_plottersCombinedObject
std::map< std::string, std::shared_ptr< StringObjectFunction< std::vector< TOutputCandidateType > > > > m_plottersCombinedObject
Definition: FSQDiJetAve.cc:121
FSQDiJetAve::bookHistograms
void bookHistograms(DQMStore::IBooker &, edm::Run const &run, edm::EventSetup const &c) override
Definition: FSQDiJetAve.cc:854
JetCorrector.h
EDGetToken.h
FSQ::HandlerTemplate::count
int count(const edm::Event &iEvent, InputTag &input, StringCutObjectSelector< T > &sel, float weight)
Definition: FSQDiJetAve.cc:193
trigger::TriggerObject
Single trigger physics object (e.g., an isolated muon)
Definition: TriggerObject.h:21
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
FSQ::BaseHandler::BaseHandler
BaseHandler(const edm::ParameterSet &iConfig, triggerExpression::Data &eventCache)
Definition: FSQDiJetAve.cc:68
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
Vertex.h
FSQ::BaseHandler::DQMStore
dqm::legacy::DQMStore DQMStore
Definition: FSQDiJetAve.cc:64
edm::View
Definition: CaloClusterFwd.h:14
dumpparser.parse
def parse(path, config)
Definition: dumpparser.py:13
Scenarios_cff.scale
scale
Definition: Scenarios_cff.py:2186
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:670
edm::ParameterSet
Definition: ParameterSet.h:36
math::XYZPoint
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
edm::LogError
Definition: MessageLogger.h:183
FSQ::BaseHandler::m_expression
std::unique_ptr< triggerExpression::Evaluator > m_expression
Definition: FSQDiJetAve.cc:95
FSQ::HandlerTemplate::m_singleObjectDrawables
std::vector< edm::ParameterSet > m_singleObjectDrawables
Definition: FSQDiJetAve.cc:128
Event.h
FSQ::HandlerTemplate::m_combinedObjectSortFunction
StringObjectFunction< std::vector< TOutputCandidateType > > m_combinedObjectSortFunction
Definition: FSQDiJetAve.cc:119
FSQ::HLTHandler
HandlerTemplate< trigger::TriggerObject, trigger::TriggerObject > HLTHandler
Definition: FSQDiJetAve.cc:725
FSQ::RecoPhotonHandler
HandlerTemplate< reco::Photon, reco::Photon > RecoPhotonHandler
Definition: FSQDiJetAve.cc:731
LaserDQM_cfg.process
process
Definition: LaserDQM_cfg.py:3
FSQ::HandlerTemplate::m_isSetup
bool m_isSetup
Definition: FSQDiJetAve.cc:129
trigger::TriggerObjectCollection
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
Definition: TriggerObject.h:75
FSQ::SpecialFilters
SpecialFilters
Definition: FSQDiJetAve.cc:107
FSQ::HandlerTemplate::m_combinedObjectDrawables
std::vector< edm::ParameterSet > m_combinedObjectDrawables
Definition: FSQDiJetAve.cc:127
cand
Definition: decayParser.h:34
iEvent
int iEvent
Definition: GenABIO.cc:224
trigger::TriggerEvent::filterIndex
trigger::size_type filterIndex(const edm::InputTag &filterTag) const
find index of filter in data-member vector from filter tag
Definition: TriggerEvent.h:132
trigger::Keys
std::vector< size_type > Keys
Definition: TriggerTypeDefs.h:19
triggerExpression::Data::setEvent
bool setEvent(const edm::Event &event, const edm::EventSetup &setup)
Definition: TriggerExpressionData.cc:18
triggerExpression::Data
Definition: TriggerExpressionData.h:22
edm::InputTag::encode
std::string encode() const
Definition: InputTag.cc:159
edm::ParameterSetDescription::setUnknown
void setUnknown()
Definition: ParameterSetDescription.cc:39
analyze
example_stream void analyze(const edm::Event &, const edm::EventSetup &) override
edm::EventSetup
Definition: EventSetup.h:57
FSQ::HandlerTemplate::getAndStoreTokens
void getAndStoreTokens(edm::ConsumesCollector &&iC) override
Definition: FSQDiJetAve.cc:182
FSQDiJetAve::m_useGenWeight
bool m_useGenWeight
Definition: FSQDiJetAve.h:75
FSQDiJetAve::~FSQDiJetAve
~FSQDiJetAve() override
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
trigger::TriggerEvent
The single EDProduct to be saved for each event (AOD case)
Definition: TriggerEvent.h:25
HLTConfigProvider.h
TrackCollections2monitor_cff.func
func
Definition: TrackCollections2monitor_cff.py:359
edm::EDGetToken
Definition: EDGetToken.h:35
trigger::TriggerEvent::getObjects
const TriggerObjectCollection & getObjects() const
Definition: TriggerEvent.h:101
FSQ::BaseHandler::m_usedPaths
std::set< std::string > m_usedPaths
Definition: FSQDiJetAve.cc:99
FSQDiJetAve::m_hltConfig
HLTConfigProvider m_hltConfig
Definition: FSQDiJetAve.h:76
InputTag.h
SimL1EmulatorRepack_CalouGT_cff.processName
processName
Definition: SimL1EmulatorRepack_CalouGT_cff.py:17
patRefSel_triggerSelection_cff.triggerSelection
triggerSelection
Definition: patRefSel_triggerSelection_cff.py:12
FSQ::HandlerTemplate::getBestCombination
std::vector< TOutputCandidateType > getBestCombination(std::vector< TOutputCandidateType > &cands)
Definition: FSQDiJetAve.cc:364
VertexFwd.h
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
edm::getParameterSet
ParameterSet const & getParameterSet(ParameterSetID const &id)
Definition: ParameterSet.cc:855
type
type
Definition: HCALResponse.h:21
HLTConfigProvider
Definition: HLTConfigProvider.h:28
heppy_batch.val
val
Definition: heppy_batch.py:351
std
Definition: JetResolutionObject.h:76
writedatasetfile.run
run
Definition: writedatasetfile.py:27
StringCutObjectSelector.h
HLTConfigProvider::init
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d'tor
Definition: HLTConfigProvider.cc:36
FSQ::HandlerTemplate::fillSingleObjectPlots
void fillSingleObjectPlots(const TInputCandidateType &cand, float weight)
Definition: FSQDiJetAve.cc:212
PVValHelper::dxy
Definition: PVValidationHelpers.h:47
tier0.unique
def unique(seq, keepstr=True)
Definition: tier0.py:24
PVValHelper::dz
Definition: PVValidationHelpers.h:50
Frameworkfwd.h
FSQDiJetAve::triggerSummaryToken
edm::EDGetTokenT< trigger::TriggerEvent > triggerSummaryToken
Definition: FSQDiJetAve.h:83
StringCutObjectSelector< TInputCandidateType >
Exception
Definition: hltDiff.cc:246
edm::TriggerNames
Definition: TriggerNames.h:55
reco::PFJet
Jets made from PFObjects.
Definition: PFJet.h:20
HLT_2018_cff.cands
cands
Definition: HLT_2018_cff.py:13762
FSQ::BaseHandler::MonitorElement
dqm::legacy::MonitorElement MonitorElement
Definition: FSQDiJetAve.cc:63
edm::triggerResults
static const std::string triggerResults("TriggerResults")
HltBtagPostValidation_cff.histoName
histoName
Definition: HltBtagPostValidation_cff.py:17
FSQ::HandlerTemplate::findPathAndFilter
std::vector< std::string > findPathAndFilter(const HLTConfigProvider &hltConfig)
Definition: FSQDiJetAve.cc:257
FSQDiJetAve::triggerResultsLabel_
edm::InputTag triggerResultsLabel_
Definition: FSQDiJetAve.h:91
triggerExpression
Definition: TriggerExpressionConstant.h:6
trigger::TriggerEvent::usedProcessName
const std::string & usedProcessName() const
getters
Definition: TriggerEvent.h:98
HltComparatorCreateWorkflow.hltConfig
hltConfig
Definition: HltComparatorCreateWorkflow.py:161
dqm::implementation::IBooker
Definition: DQMStore.h:43
FSQ::HandlerTemplate::m_dqmhistolabel
std::string m_dqmhistolabel
Definition: FSQDiJetAve.cc:111
FSQ::HandlerTemplate::m_combinedObjectSelection
StringCutObjectSelector< std::vector< TOutputCandidateType > > m_combinedObjectSelection
Definition: FSQDiJetAve.cc:118
EgHLTOfflineClient_cfi.hltTag
hltTag
Definition: EgHLTOfflineClient_cfi.py:9
FSQ::HandlerTemplate::getFilteredCands
void getFilteredCands(TInputCandidateType *, std::vector< TOutputCandidateType > &cands, const edm::Event &iEvent, const edm::EventSetup &iSetup, const HLTConfigProvider &hltConfig, const trigger::TriggerEvent &trgEvent, float weight)
Definition: FSQDiJetAve.cc:233
FSQ::RecoGenParticleHandler
HandlerTemplate< reco::GenParticle, reco::GenParticle > RecoGenParticleHandler
Definition: FSQDiJetAve.cc:733
ConsumesCollector.h
FSQ::RecoPFJetWithJECHandler
HandlerTemplate< reco::PFJet, reco::PFJet, ApplyJEC > RecoPFJetWithJECHandler
Definition: FSQDiJetAve.cc:729
Candidate.h
FSQ::BaseHandler::m_dirname
std::string m_dirname
Definition: FSQDiJetAve.cc:97
FSQ::HandlerTemplate::m_combinedObjectDimension
int m_combinedObjectDimension
Definition: FSQDiJetAve.cc:115
trigObjTnPSource_cfi.bins
bins
Definition: trigObjTnPSource_cfi.py:20
FSQ::HandlerTemplate::m_plotterType
std::map< std::string, int > m_plotterType
Definition: FSQDiJetAve.cc:126
ParameterSet.h
HerwigMaxPtPartonFilter_cfi.moduleLabel
moduleLabel
Definition: HerwigMaxPtPartonFilter_cfi.py:4
EgammaValidation_Wenu_cff.sel
sel
Definition: EgammaValidation_Wenu_cff.py:33
reco::Candidate::LorentzVector
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:36
FSQDiJetAve::triggerSummaryLabel_
edm::InputTag triggerSummaryLabel_
Definition: FSQDiJetAve.h:90
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
FSQ::BaseHandler::m_pset
edm::ParameterSet m_pset
Definition: FSQDiJetAve.cc:100
FSQDiJetAve::dqmBeginRun
void dqmBeginRun(edm::Run const &run, edm::EventSetup const &c) override
Definition: FSQDiJetAve.cc:847
edm::Event
Definition: Event.h:73
FSQ::HandlerTemplate::m_pathPartialName
std::string m_pathPartialName
Definition: FSQDiJetAve.cc:112
StringObjectFunction.h
edm::ConfigurationDescriptions::addDefault
void addDefault(ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:99
FSQ::HandlerTemplate::m_input
edm::InputTag m_input
Definition: FSQDiJetAve.cc:130
edm::InputTag
Definition: InputTag.h:15
edm::ConsumesCollector
Definition: ConsumesCollector.h:39
edm::TriggerResults
Definition: TriggerResults.h:35
FSQDiJetAve::m_trgEvent
edm::Handle< trigger::TriggerEvent > m_trgEvent
Definition: FSQDiJetAve.h:89
FSQDiJetAve::m_triggerNames
edm::TriggerNames m_triggerNames
Definition: FSQDiJetAve.h:87
weight
Definition: weight.py:1
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
dqm::implementation::IBooker::book1D
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
FSQDiJetAve::m_triggerResults
edm::Handle< edm::TriggerResults > m_triggerResults
Definition: FSQDiJetAve.h:88
FSQ::BestVertexMatching
Definition: FSQDiJetAve.cc:107
FSQ::RecoTrackCounter
HandlerTemplate< reco::Track, int > RecoTrackCounter
Definition: FSQDiJetAve.cc:735
GenEventInfoProduct::weight
double weight() const
Definition: GenEventInfoProduct.h:35
pwdgSkimBPark_cfi.vertices
vertices
Definition: pwdgSkimBPark_cfi.py:7
FSQ::BaseHandler
Definition: FSQDiJetAve.cc:61
FSQDiJetAve::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: FSQDiJetAve.cc:799