CMS 3D CMS Logo

HLTTauDQMPlotter.cc
Go to the documentation of this file.
2 
3 #include "Math/GenVector/VectorUtil.h"
4 
6  dqmFullFolder_(dqmBaseFolder),
7  configValid_(false)
8 {
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),
17  dqmFolder_(dqmFolder),
19 {}
20 
22 }
23 
24 std::pair<bool,LV> HLTTauDQMPlotter::match( const LV& jet, const LVColl& McInfo, double dr ) {
25  bool matched = false;
26  LV out;
27  for ( std::vector<LV>::const_iterator it = McInfo.begin(); it != McInfo.end(); ++it ) {
28  double delta = ROOT::Math::VectorUtil::DeltaR(jet,*it);
29  if ( delta < dr ) {
30  matched = true;
31  out = *it;
32  break;
33  }
34  }
35  return std::pair<bool,LV>(matched,out);
36 }
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
HLTTauDQMPlotter(const edm::ParameterSet &pset, const std::string &dqmBaseFolder)
std::pair< bool, LV > match(const LV &, const LVColl &, double)
std::string dqmFullFolder_