CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
HLTTauDQMPlotter.cc
Go to the documentation of this file.
1 #include <utility>
2 
4 
5 #include "Math/GenVector/VectorUtil.h"
6 
8  : dqmFullFolder_(std::move(dqmBaseFolder)), configValid_(false) {
9  dqmFolder_ = pset.getUntrackedParameter<std::string>("DQMFolder");
10  dqmFullFolder_ += "/";
11  dqmFullFolder_ += dqmFolder_;
12  configValid_ = true;
13 }
14 
15 HLTTauDQMPlotter::HLTTauDQMPlotter(const std::string& dqmFolder, const std::string& dqmBaseFolder)
16  : dqmFullFolder_(dqmBaseFolder + "/" + dqmFolder), dqmFolder_(dqmFolder), configValid_(true) {}
17 
19 
20 std::pair<bool, LV> HLTTauDQMPlotter::match(const LV& jet, const LVColl& McInfo, double dr) {
21  bool matched = false;
22  LV out;
23  for (auto const& it : McInfo) {
24  double delta = ROOT::Math::VectorUtil::DeltaR(jet, it);
25  if (delta < dr) {
26  matched = true;
27  out = it;
28  break;
29  }
30  }
31  return std::pair<bool, LV>(matched, out);
32 }
T getUntrackedParameter(std::string const &, T const &) const
math::XYZTLorentzVectorD LV
std::string dqmFolder_
def move
Definition: eostools.py:511
HLTTauDQMPlotter(const edm::ParameterSet &pset, std::string dqmBaseFolder)
std::vector< LV > LVColl
std::pair< bool, LV > match(const LV &, const LVColl &, double)
std::string dqmFullFolder_