CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HLTTauDQMPlotter.cc
Go to the documentation of this file.
2 
3 #include "Math/GenVector/VectorUtil.h"
4 
6  dqmFullFolder_(dqmBaseFolder),
7  configValid_(false),
8  runValid_(false)
9 {
10  try {
11  dqmFolder_ = pset.getUntrackedParameter<std::string>("DQMFolder");
13  configValid_ = true;
14  } catch ( cms::Exception &e ) {
15  edm::LogWarning("HLTTauDQMOfflineSource") << "HLTTauDQMPlotter::HLTTauDQMPlotter(): " << e.what();
16  configValid_ = false;
17  }
18 }
19 
21 }
22 
23 std::pair<bool,LV> HLTTauDQMPlotter::match( const LV& jet, const LVColl& McInfo, double dr ) {
24  bool matched = false;
25  LV out;
26  for ( std::vector<LV>::const_iterator it = McInfo.begin(); it != McInfo.end(); ++it ) {
27  double delta = ROOT::Math::VectorUtil::DeltaR(jet,*it);
28  if ( delta < dr ) {
29  matched = true;
30  out = *it;
31  break;
32  }
33  }
34  return std::pair<bool,LV>(matched,out);
35 }
virtual char const * what() const
Definition: Exception.cc:141
dbl * delta
Definition: mlp_gen.cc:36
T getUntrackedParameter(std::string const &, T const &) const
std::string dqmFolder_
math::XYZTLorentzVectorD LV
std::vector< LV > LVColl
tuple out
Definition: dbtoconf.py:99
HLTTauDQMPlotter(const edm::ParameterSet &pset, const std::string &dqmBaseFolder)
volatile std::atomic< bool > shutdown_flag false
std::pair< bool, LV > match(const LV &, const LVColl &, double)
std::string dqmFullFolder_